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 @@
'../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': [
'../extensions/shell/app_shell.gyp:*',
],
......
......@@ -22,10 +22,12 @@
#endif
#if !defined(DISABLE_NACL)
#include "components/nacl/common/nacl_paths.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"
#endif
#endif // OS_LINUX
#endif // !DISABLE_NACL
namespace {
......@@ -59,7 +61,7 @@ bool ShellMainDelegate::BasicStartupComplete(int* exit_code) {
#if defined(OS_CHROMEOS)
chromeos::RegisterPathProvider();
#endif
#if !defined(DISABLE_NACL)
#if !defined(DISABLE_NACL) && defined(OS_LINUX)
nacl::RegisterPathProvider();
#endif
extensions::RegisterPathProvider();
......@@ -85,12 +87,14 @@ ShellMainDelegate::CreateContentRendererClient() {
return renderer_client_.get();
}
#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
void ShellMainDelegate::ZygoteStarting(
ScopedVector<content::ZygoteForkDelegate>* delegates) {
#if !defined(DISABLE_NACL)
nacl::AddNaClZygoteForkDelegates(delegates);
#endif
#endif // DISABLE_NACL
}
#endif // OS_POSIX && !OS_MACOSX && !OS_ANDROID
content::ContentClient* ShellMainDelegate::CreateContentClient() {
return new ShellContentClient();
......
......@@ -30,8 +30,10 @@ class ShellMainDelegate : public content::ContentMainDelegate {
virtual content::ContentBrowserClient* CreateContentBrowserClient() OVERRIDE;
virtual content::ContentRendererClient* CreateContentRendererClient()
OVERRIDE;
#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
virtual void ZygoteStarting(
ScopedVector<content::ZygoteForkDelegate>* delegates) OVERRIDE;
#endif
protected:
// The created object is owned by this object.
......
......@@ -112,12 +112,16 @@
'<(DEPTH)/ui/display/display.gyp:display',
],
}],
['disable_nacl==0 and OS=="linux"', {
'dependencies': [
'<(DEPTH)/components/nacl.gyp:nacl_helper',
],
}],
['disable_nacl==0', {
'dependencies': [
'<(DEPTH)/components/nacl.gyp:nacl',
'<(DEPTH)/components/nacl.gyp:nacl_browser',
'<(DEPTH)/components/nacl.gyp:nacl_common',
'<(DEPTH)/components/nacl.gyp:nacl_helper',
'<(DEPTH)/components/nacl.gyp:nacl_renderer',
'<(DEPTH)/components/nacl.gyp:nacl_switches',
],
......
......@@ -6,6 +6,7 @@
#include <string>
#include "base/base_paths.h"
#include "base/command_line.h"
#include "base/path_service.h"
#include "base/strings/string_split.h"
......@@ -83,7 +84,12 @@ bool ShellNaClBrowserDelegate::DialogsAreSuppressed() {
bool ShellNaClBrowserDelegate::GetCacheDirectory(base::FilePath* cache_dir) {
// Just use the general cache directory, not a subdirectory like Chrome does.
#if defined(OS_POSIX)
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) {
......
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