Commit 7e5386f5 authored by yoz's avatar yoz Committed by Commit bot

Run app_shell on Windows.

Remove/ifdef (as appropriate) a few Linux-specific assumptions.

BUG=399363
TEST=app_shell_browsertests

Review URL: https://codereview.chromium.org/586583002

Cr-Commit-Position: refs/heads/master@{#296136}
parent d8178964
...@@ -253,7 +253,7 @@ ...@@ -253,7 +253,7 @@
'../google_apis/gcm/gcm.gyp:*', '../google_apis/gcm/gcm.gyp:*',
], ],
}], }],
['chromeos==1 or (OS=="linux" and use_aura==1)', { ['chromeos==1 or (OS=="linux" and use_aura==1) or OS=="win"', {
'dependencies': [ 'dependencies': [
'../extensions/shell/app_shell.gyp:*', '../extensions/shell/app_shell.gyp:*',
], ],
......
...@@ -22,10 +22,12 @@ ...@@ -22,10 +22,12 @@
#endif #endif
#if !defined(DISABLE_NACL) #if !defined(DISABLE_NACL)
#include "components/nacl/common/nacl_paths.h"
#include "components/nacl/common/nacl_switches.h" #include "components/nacl/common/nacl_switches.h"
#if defined(OS_LINUX)
#include "components/nacl/common/nacl_paths.h"
#include "components/nacl/zygote/nacl_fork_delegate_linux.h" #include "components/nacl/zygote/nacl_fork_delegate_linux.h"
#endif #endif // OS_LINUX
#endif // !DISABLE_NACL
namespace { namespace {
...@@ -59,7 +61,7 @@ bool ShellMainDelegate::BasicStartupComplete(int* exit_code) { ...@@ -59,7 +61,7 @@ bool ShellMainDelegate::BasicStartupComplete(int* exit_code) {
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
chromeos::RegisterPathProvider(); chromeos::RegisterPathProvider();
#endif #endif
#if !defined(DISABLE_NACL) #if !defined(DISABLE_NACL) && defined(OS_LINUX)
nacl::RegisterPathProvider(); nacl::RegisterPathProvider();
#endif #endif
extensions::RegisterPathProvider(); extensions::RegisterPathProvider();
...@@ -85,12 +87,14 @@ ShellMainDelegate::CreateContentRendererClient() { ...@@ -85,12 +87,14 @@ ShellMainDelegate::CreateContentRendererClient() {
return renderer_client_.get(); return renderer_client_.get();
} }
#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
void ShellMainDelegate::ZygoteStarting( void ShellMainDelegate::ZygoteStarting(
ScopedVector<content::ZygoteForkDelegate>* delegates) { ScopedVector<content::ZygoteForkDelegate>* delegates) {
#if !defined(DISABLE_NACL) #if !defined(DISABLE_NACL)
nacl::AddNaClZygoteForkDelegates(delegates); nacl::AddNaClZygoteForkDelegates(delegates);
#endif #endif // DISABLE_NACL
} }
#endif // OS_POSIX && !OS_MACOSX && !OS_ANDROID
content::ContentClient* ShellMainDelegate::CreateContentClient() { content::ContentClient* ShellMainDelegate::CreateContentClient() {
return new ShellContentClient(); return new ShellContentClient();
......
...@@ -30,8 +30,10 @@ class ShellMainDelegate : public content::ContentMainDelegate { ...@@ -30,8 +30,10 @@ class ShellMainDelegate : public content::ContentMainDelegate {
virtual content::ContentBrowserClient* CreateContentBrowserClient() OVERRIDE; virtual content::ContentBrowserClient* CreateContentBrowserClient() OVERRIDE;
virtual content::ContentRendererClient* CreateContentRendererClient() virtual content::ContentRendererClient* CreateContentRendererClient()
OVERRIDE; OVERRIDE;
#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
virtual void ZygoteStarting( virtual void ZygoteStarting(
ScopedVector<content::ZygoteForkDelegate>* delegates) OVERRIDE; ScopedVector<content::ZygoteForkDelegate>* delegates) OVERRIDE;
#endif
protected: protected:
// The created object is owned by this object. // The created object is owned by this object.
......
...@@ -112,12 +112,16 @@ ...@@ -112,12 +112,16 @@
'<(DEPTH)/ui/display/display.gyp:display', '<(DEPTH)/ui/display/display.gyp:display',
], ],
}], }],
['disable_nacl==0 and OS=="linux"', {
'dependencies': [
'<(DEPTH)/components/nacl.gyp:nacl_helper',
],
}],
['disable_nacl==0', { ['disable_nacl==0', {
'dependencies': [ 'dependencies': [
'<(DEPTH)/components/nacl.gyp:nacl', '<(DEPTH)/components/nacl.gyp:nacl',
'<(DEPTH)/components/nacl.gyp:nacl_browser', '<(DEPTH)/components/nacl.gyp:nacl_browser',
'<(DEPTH)/components/nacl.gyp:nacl_common', '<(DEPTH)/components/nacl.gyp:nacl_common',
'<(DEPTH)/components/nacl.gyp:nacl_helper',
'<(DEPTH)/components/nacl.gyp:nacl_renderer', '<(DEPTH)/components/nacl.gyp:nacl_renderer',
'<(DEPTH)/components/nacl.gyp:nacl_switches', '<(DEPTH)/components/nacl.gyp:nacl_switches',
], ],
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <string> #include <string>
#include "base/base_paths.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/path_service.h" #include "base/path_service.h"
#include "base/strings/string_split.h" #include "base/strings/string_split.h"
...@@ -83,7 +84,12 @@ bool ShellNaClBrowserDelegate::DialogsAreSuppressed() { ...@@ -83,7 +84,12 @@ bool ShellNaClBrowserDelegate::DialogsAreSuppressed() {
bool ShellNaClBrowserDelegate::GetCacheDirectory(base::FilePath* cache_dir) { bool ShellNaClBrowserDelegate::GetCacheDirectory(base::FilePath* cache_dir) {
// Just use the general cache directory, not a subdirectory like Chrome does. // Just use the general cache directory, not a subdirectory like Chrome does.
#if defined(OS_POSIX)
return PathService::Get(base::DIR_CACHE, cache_dir); return PathService::Get(base::DIR_CACHE, cache_dir);
#elif defined(OS_WIN)
// TODO(yoz): Find an appropriate persistent directory to use here.
return PathService::Get(base::DIR_TEMP, cache_dir);
#endif
} }
bool ShellNaClBrowserDelegate::GetPluginDirectory(base::FilePath* plugin_dir) { bool ShellNaClBrowserDelegate::GetPluginDirectory(base::FilePath* plugin_dir) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment