OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "chrome/browser/chromeos/chrome_browser_main_chromeos.h" | 5 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 #include "components/rlz/rlz_tracker.h" | 146 #include "components/rlz/rlz_tracker.h" |
147 #endif | 147 #endif |
148 | 148 |
149 // Exclude X11 dependents for ozone | 149 // Exclude X11 dependents for ozone |
150 #if defined(USE_X11) | 150 #if defined(USE_X11) |
151 #include "chrome/browser/chromeos/device_uma.h" | 151 #include "chrome/browser/chromeos/device_uma.h" |
152 #include "chrome/browser/chromeos/events/system_key_event_listener.h" | 152 #include "chrome/browser/chromeos/events/system_key_event_listener.h" |
153 #include "chrome/browser/chromeos/events/xinput_hierarchy_changed_event_listener
.h" | 153 #include "chrome/browser/chromeos/events/xinput_hierarchy_changed_event_listener
.h" |
154 #endif | 154 #endif |
155 | 155 |
| 156 #if defined(MOJO_SHELL_CLIENT) |
| 157 #include "chrome/browser/chromeos/chrome_interface_factory.h" |
| 158 #endif |
| 159 |
156 namespace chromeos { | 160 namespace chromeos { |
157 | 161 |
158 namespace { | 162 namespace { |
159 | 163 |
160 void ChromeOSVersionCallback(const std::string& version) { | 164 void ChromeOSVersionCallback(const std::string& version) { |
161 base::SetLinuxDistro(std::string("CrOS ") + version); | 165 base::SetLinuxDistro(std::string("CrOS ") + version); |
162 } | 166 } |
163 | 167 |
164 bool ShouldAutoLaunchKioskApp(const base::CommandLine& command_line) { | 168 bool ShouldAutoLaunchKioskApp(const base::CommandLine& command_line) { |
165 KioskAppManager* app_manager = KioskAppManager::Get(); | 169 KioskAppManager* app_manager = KioskAppManager::Get(); |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 // Enable support for SSL server sockets, which must be done while still | 370 // Enable support for SSL server sockets, which must be done while still |
367 // single-threaded. This is required for remote assistance host on Chrome OS. | 371 // single-threaded. This is required for remote assistance host on Chrome OS. |
368 net::EnableSSLServerSockets(); | 372 net::EnableSSLServerSockets(); |
369 | 373 |
370 ChromeBrowserMainPartsLinux::PostMainMessageLoopStart(); | 374 ChromeBrowserMainPartsLinux::PostMainMessageLoopStart(); |
371 } | 375 } |
372 | 376 |
373 // Threads are initialized between MainMessageLoopStart and MainMessageLoopRun. | 377 // Threads are initialized between MainMessageLoopStart and MainMessageLoopRun. |
374 // about_flags settings are applied in ChromeBrowserMainParts::PreCreateThreads. | 378 // about_flags settings are applied in ChromeBrowserMainParts::PreCreateThreads. |
375 void ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() { | 379 void ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() { |
| 380 #if defined(MOJO_SHELL_CLIENT) |
| 381 if (content::MojoShellConnection::Get()) { |
| 382 interface_factory_.reset(new ChromeInterfaceFactory); |
| 383 content::MojoShellConnection::Get()->AddListener(interface_factory_.get()); |
| 384 } |
| 385 #endif |
| 386 |
376 // Set the crypto thread after the IO thread has been created/started. | 387 // Set the crypto thread after the IO thread has been created/started. |
377 TPMTokenLoader::Get()->SetCryptoTaskRunner( | 388 TPMTokenLoader::Get()->SetCryptoTaskRunner( |
378 content::BrowserThread::GetMessageLoopProxyForThread( | 389 content::BrowserThread::GetMessageLoopProxyForThread( |
379 content::BrowserThread::IO)); | 390 content::BrowserThread::IO)); |
380 | 391 |
381 CrasAudioHandler::Initialize( | 392 CrasAudioHandler::Initialize( |
382 new AudioDevicesPrefHandlerImpl(g_browser_process->local_state())); | 393 new AudioDevicesPrefHandlerImpl(g_browser_process->local_state())); |
383 | 394 |
384 // Start loading machine statistics here. StatisticsProvider::Shutdown() | 395 // Start loading machine statistics here. StatisticsProvider::Shutdown() |
385 // will ensure that loading is aborted on early exit. | 396 // will ensure that loading is aborted on early exit. |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
832 // Destroy DBus services immediately after threads are stopped. | 843 // Destroy DBus services immediately after threads are stopped. |
833 dbus_services_.reset(); | 844 dbus_services_.reset(); |
834 | 845 |
835 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 846 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
836 | 847 |
837 // Destroy DeviceSettingsService after g_browser_process. | 848 // Destroy DeviceSettingsService after g_browser_process. |
838 DeviceSettingsService::Shutdown(); | 849 DeviceSettingsService::Shutdown(); |
839 } | 850 } |
840 | 851 |
841 } // namespace chromeos | 852 } // namespace chromeos |
OLD | NEW |