OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "apps/shell/browser/shell_browser_main_parts.h" | 5 #include "apps/shell/browser/shell_browser_main_parts.h" |
6 | 6 |
7 #include "apps/shell/browser/shell_browser_context.h" | 7 #include "apps/shell/browser/shell_browser_context.h" |
8 #include "apps/shell/browser/shell_browser_main_delegate.h" | 8 #include "apps/shell/browser/shell_browser_main_delegate.h" |
9 #include "apps/shell/browser/shell_desktop_controller.h" | 9 #include "apps/shell/browser/shell_desktop_controller.h" |
10 #include "apps/shell/browser/shell_extension_system.h" | 10 #include "apps/shell/browser/shell_extension_system.h" |
11 #include "apps/shell/browser/shell_extension_system_factory.h" | 11 #include "apps/shell/browser/shell_extension_system_factory.h" |
12 #include "apps/shell/browser/shell_extensions_browser_client.h" | 12 #include "apps/shell/browser/shell_extensions_browser_client.h" |
13 #include "apps/shell/common/shell_extensions_client.h" | 13 #include "apps/shell/common/shell_extensions_client.h" |
14 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
15 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 15 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
16 #include "content/public/common/result_codes.h" | 16 #include "content/public/common/result_codes.h" |
17 #include "content/shell/browser/shell_devtools_delegate.h" | 17 #include "content/shell/browser/shell_devtools_delegate.h" |
18 #include "content/shell/browser/shell_net_log.h" | 18 #include "content/shell/browser/shell_net_log.h" |
19 #include "extensions/browser/browser_context_keyed_service_factories.h" | 19 #include "extensions/browser/browser_context_keyed_service_factories.h" |
20 #include "extensions/browser/extension_system.h" | 20 #include "extensions/browser/extension_system.h" |
21 #include "ui/aura/window_tree_host.h" | 21 #include "ui/aura/window_tree_host.h" |
| 22 #include "ui/base/ime/input_method_initializer.h" |
22 #include "ui/base/resource/resource_bundle.h" | 23 #include "ui/base/resource/resource_bundle.h" |
23 | 24 |
24 #if defined(OS_CHROMEOS) | 25 #if defined(OS_CHROMEOS) |
25 #include "apps/shell/browser/shell_network_controller_chromeos.h" | 26 #include "apps/shell/browser/shell_network_controller_chromeos.h" |
26 #include "chromeos/dbus/dbus_thread_manager.h" | 27 #include "chromeos/dbus/dbus_thread_manager.h" |
27 #endif | 28 #endif |
28 | 29 |
29 using content::BrowserContext; | 30 using content::BrowserContext; |
30 using extensions::Extension; | 31 using extensions::Extension; |
31 using extensions::ExtensionSystem; | 32 using extensions::ExtensionSystem; |
(...skipping 25 matching lines...) Expand all Loading... |
57 } | 58 } |
58 | 59 |
59 void ShellBrowserMainParts::PreMainMessageLoopStart() { | 60 void ShellBrowserMainParts::PreMainMessageLoopStart() { |
60 // TODO(jamescook): Initialize touch here? | 61 // TODO(jamescook): Initialize touch here? |
61 } | 62 } |
62 | 63 |
63 void ShellBrowserMainParts::PostMainMessageLoopStart() { | 64 void ShellBrowserMainParts::PostMainMessageLoopStart() { |
64 #if defined(OS_CHROMEOS) | 65 #if defined(OS_CHROMEOS) |
65 chromeos::DBusThreadManager::Initialize(); | 66 chromeos::DBusThreadManager::Initialize(); |
66 network_controller_.reset(new ShellNetworkController); | 67 network_controller_.reset(new ShellNetworkController); |
| 68 #else |
| 69 // Non-Chrome OS platforms are for developer convenience, so use a test IME. |
| 70 ui::InitializeInputMethodForTesting(); |
67 #endif | 71 #endif |
68 } | 72 } |
69 | 73 |
70 void ShellBrowserMainParts::PreEarlyInitialization() { | 74 void ShellBrowserMainParts::PreEarlyInitialization() { |
71 } | 75 } |
72 | 76 |
73 int ShellBrowserMainParts::PreCreateThreads() { | 77 int ShellBrowserMainParts::PreCreateThreads() { |
74 // TODO(jamescook): Initialize chromeos::CrosSettings here? | 78 // TODO(jamescook): Initialize chromeos::CrosSettings here? |
75 | 79 |
76 // Return no error. | 80 // Return no error. |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 } | 151 } |
148 | 152 |
149 void ShellBrowserMainParts::CreateExtensionSystem() { | 153 void ShellBrowserMainParts::CreateExtensionSystem() { |
150 DCHECK(browser_context_); | 154 DCHECK(browser_context_); |
151 extension_system_ = static_cast<ShellExtensionSystem*>( | 155 extension_system_ = static_cast<ShellExtensionSystem*>( |
152 ExtensionSystem::Get(browser_context_.get())); | 156 ExtensionSystem::Get(browser_context_.get())); |
153 extension_system_->InitForRegularProfile(true); | 157 extension_system_->InitForRegularProfile(true); |
154 } | 158 } |
155 | 159 |
156 } // namespace apps | 160 } // namespace apps |
OLD | NEW |