OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "extensions/shell/app/shell_main_delegate.h" | 5 #include "extensions/shell/app/shell_main_delegate.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
11 #include "content/public/browser/browser_main_runner.h" | 11 #include "content/public/browser/browser_main_runner.h" |
12 #include "content/public/common/content_switches.h" | 12 #include "content/public/common/content_switches.h" |
13 #include "extensions/common/extension_paths.h" | 13 #include "extensions/common/extension_paths.h" |
14 #include "extensions/shell/browser/default_shell_browser_main_delegate.h" | 14 #include "extensions/shell/browser/default_shell_browser_main_delegate.h" |
15 #include "extensions/shell/browser/shell_content_browser_client.h" | 15 #include "extensions/shell/browser/shell_content_browser_client.h" |
16 #include "extensions/shell/common/shell_content_client.h" | 16 #include "extensions/shell/common/shell_content_client.h" |
17 #include "extensions/shell/renderer/shell_content_renderer_client.h" | 17 #include "extensions/shell/renderer/shell_content_renderer_client.h" |
18 #include "extensions/shell/utility/shell_content_utility_client.h" | 18 #include "extensions/shell/utility/shell_content_utility_client.h" |
19 #include "ui/base/resource/resource_bundle.h" | 19 #include "ui/base/resource/resource_bundle.h" |
20 | 20 |
21 #if defined(OS_CHROMEOS) | 21 #if defined(OS_CHROMEOS) |
22 #include "chromeos/chromeos_paths.h" | 22 #include "chromeos/chromeos_paths.h" |
23 #endif | 23 #endif |
24 | 24 |
25 #if !defined(DISABLE_NACL) | 25 #if !defined(DISABLE_NACL) |
26 #include "components/nacl/common/nacl_switches.h" | 26 #include "components/nacl/common/nacl_switches.h" |
27 #if defined(OS_LINUX) | 27 #if defined(OS_LINUX) |
28 #include "components/nacl/common/nacl_paths.h" | 28 #include "components/nacl/common/nacl_paths.h" |
| 29 #endif // OS_LINUX |
| 30 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) |
29 #include "components/nacl/zygote/nacl_fork_delegate_linux.h" | 31 #include "components/nacl/zygote/nacl_fork_delegate_linux.h" |
30 #endif // OS_LINUX | 32 #endif // OS_POSIX && !OS_MACOSX && !OS_ANDROID |
31 #endif // !DISABLE_NACL | 33 #endif // !DISABLE_NACL |
32 | 34 |
33 namespace { | 35 namespace { |
34 | 36 |
35 void InitLogging() { | 37 void InitLogging() { |
36 base::FilePath log_filename; | 38 base::FilePath log_filename; |
37 PathService::Get(base::DIR_EXE, &log_filename); | 39 PathService::Get(base::DIR_EXE, &log_filename); |
38 log_filename = log_filename.AppendASCII("app_shell.log"); | 40 log_filename = log_filename.AppendASCII("app_shell.log"); |
39 logging::LoggingSettings settings; | 41 logging::LoggingSettings settings; |
40 settings.logging_dest = logging::LOG_TO_ALL; | 42 settings.logging_dest = logging::LOG_TO_ALL; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 bool ShellMainDelegate::ProcessNeedsResourceBundle( | 135 bool ShellMainDelegate::ProcessNeedsResourceBundle( |
134 const std::string& process_type) { | 136 const std::string& process_type) { |
135 // The browser process has no process type flag, but needs resources. | 137 // The browser process has no process type flag, but needs resources. |
136 // On Linux the zygote process opens the resources for the renderers. | 138 // On Linux the zygote process opens the resources for the renderers. |
137 return process_type.empty() || | 139 return process_type.empty() || |
138 process_type == switches::kZygoteProcess || | 140 process_type == switches::kZygoteProcess || |
139 process_type == switches::kRendererProcess || | 141 process_type == switches::kRendererProcess || |
140 #if !defined(DISABLE_NACL) | 142 #if !defined(DISABLE_NACL) |
141 process_type == switches::kNaClLoaderProcess || | 143 process_type == switches::kNaClLoaderProcess || |
142 #endif | 144 #endif |
| 145 #if defined(OS_MACOSX) |
| 146 process_type == switches::kGpuProcess || |
| 147 #endif |
143 process_type == switches::kUtilityProcess; | 148 process_type == switches::kUtilityProcess; |
144 } | 149 } |
145 | 150 |
146 } // namespace extensions | 151 } // namespace extensions |
OLD | NEW |