| 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/browser/shell_browser_main_parts.h" | 5 #include "extensions/shell/browser/shell_browser_main_parts.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 9 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
| 10 #include "components/omaha_query_params/omaha_query_params.h" | 10 #include "components/omaha_query_params/omaha_query_params.h" |
| 11 #include "content/public/browser/child_process_security_policy.h" |
| 11 #include "content/public/browser/context_factory.h" | 12 #include "content/public/browser/context_factory.h" |
| 12 #include "content/public/common/result_codes.h" | 13 #include "content/public/common/result_codes.h" |
| 13 #include "content/shell/browser/shell_devtools_delegate.h" | 14 #include "content/shell/browser/shell_devtools_delegate.h" |
| 14 #include "content/shell/browser/shell_net_log.h" | 15 #include "content/shell/browser/shell_net_log.h" |
| 15 #include "extensions/browser/app_window/apps_client.h" | 16 #include "extensions/browser/app_window/apps_client.h" |
| 16 #include "extensions/browser/browser_context_keyed_service_factories.h" | 17 #include "extensions/browser/browser_context_keyed_service_factories.h" |
| 17 #include "extensions/browser/extension_system.h" | 18 #include "extensions/browser/extension_system.h" |
| 19 #include "extensions/common/constants.cc" |
| 18 #include "extensions/shell/browser/shell_browser_context.h" | 20 #include "extensions/shell/browser/shell_browser_context.h" |
| 19 #include "extensions/shell/browser/shell_browser_main_delegate.h" | 21 #include "extensions/shell/browser/shell_browser_main_delegate.h" |
| 20 #include "extensions/shell/browser/shell_desktop_controller.h" | 22 #include "extensions/shell/browser/shell_desktop_controller.h" |
| 21 #include "extensions/shell/browser/shell_device_client.h" | 23 #include "extensions/shell/browser/shell_device_client.h" |
| 22 #include "extensions/shell/browser/shell_extension_system.h" | 24 #include "extensions/shell/browser/shell_extension_system.h" |
| 23 #include "extensions/shell/browser/shell_extension_system_factory.h" | 25 #include "extensions/shell/browser/shell_extension_system_factory.h" |
| 24 #include "extensions/shell/browser/shell_extensions_browser_client.h" | 26 #include "extensions/shell/browser/shell_extensions_browser_client.h" |
| 25 #include "extensions/shell/browser/shell_omaha_query_params_delegate.h" | 27 #include "extensions/shell/browser/shell_omaha_query_params_delegate.h" |
| 26 #include "extensions/shell/common/shell_extensions_client.h" | 28 #include "extensions/shell/common/shell_extensions_client.h" |
| 27 #include "extensions/shell/common/switches.h" | 29 #include "extensions/shell/common/switches.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 ui::InitializeInputMethodForTesting(); | 91 ui::InitializeInputMethodForTesting(); |
| 90 #endif | 92 #endif |
| 91 } | 93 } |
| 92 | 94 |
| 93 void ShellBrowserMainParts::PreEarlyInitialization() { | 95 void ShellBrowserMainParts::PreEarlyInitialization() { |
| 94 } | 96 } |
| 95 | 97 |
| 96 int ShellBrowserMainParts::PreCreateThreads() { | 98 int ShellBrowserMainParts::PreCreateThreads() { |
| 97 // TODO(jamescook): Initialize chromeos::CrosSettings here? | 99 // TODO(jamescook): Initialize chromeos::CrosSettings here? |
| 98 | 100 |
| 101 content::ChildProcessSecurityPolicy::GetInstance()->RegisterWebSafeScheme( |
| 102 kExtensionScheme); |
| 103 content::ChildProcessSecurityPolicy::GetInstance()->RegisterWebSafeScheme( |
| 104 kExtensionResourceScheme); |
| 105 |
| 99 // Return no error. | 106 // Return no error. |
| 100 return 0; | 107 return 0; |
| 101 } | 108 } |
| 102 | 109 |
| 103 void ShellBrowserMainParts::PreMainMessageLoopRun() { | 110 void ShellBrowserMainParts::PreMainMessageLoopRun() { |
| 104 // Initialize our "profile" equivalent. | 111 // Initialize our "profile" equivalent. |
| 105 browser_context_.reset(new ShellBrowserContext); | 112 browser_context_.reset(new ShellBrowserContext); |
| 106 | 113 |
| 107 aura::Env::GetInstance()->set_context_factory(content::GetContextFactory()); | 114 aura::Env::GetInstance()->set_context_factory(content::GetContextFactory()); |
| 108 | 115 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 } | 212 } |
| 206 | 213 |
| 207 void ShellBrowserMainParts::CreateExtensionSystem() { | 214 void ShellBrowserMainParts::CreateExtensionSystem() { |
| 208 DCHECK(browser_context_); | 215 DCHECK(browser_context_); |
| 209 extension_system_ = static_cast<ShellExtensionSystem*>( | 216 extension_system_ = static_cast<ShellExtensionSystem*>( |
| 210 ExtensionSystem::Get(browser_context_.get())); | 217 ExtensionSystem::Get(browser_context_.get())); |
| 211 extension_system_->InitForRegularProfile(true); | 218 extension_system_->InitForRegularProfile(true); |
| 212 } | 219 } |
| 213 | 220 |
| 214 } // namespace extensions | 221 } // namespace extensions |
| OLD | NEW |