Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: chrome/browser/chromeos/chrome_browser_main_chromeos.cc

Issue 1684823004: Refactors keyboard related code so mash can use a keyboard (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: always compile mojo_shell Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 #include "components/rlz/rlz_tracker.h" 145 #include "components/rlz/rlz_tracker.h"
146 #endif 146 #endif
147 147
148 // Exclude X11 dependents for ozone 148 // Exclude X11 dependents for ozone
149 #if defined(USE_X11) 149 #if defined(USE_X11)
150 #include "chrome/browser/chromeos/device_uma.h" 150 #include "chrome/browser/chromeos/device_uma.h"
151 #include "chrome/browser/chromeos/events/system_key_event_listener.h" 151 #include "chrome/browser/chromeos/events/system_key_event_listener.h"
152 #include "chrome/browser/chromeos/events/xinput_hierarchy_changed_event_listener .h" 152 #include "chrome/browser/chromeos/events/xinput_hierarchy_changed_event_listener .h"
153 #endif 153 #endif
154 154
155 #if defined(MOJO_SHELL_CLIENT)
156 #include "chrome/browser/chromeos/chrome_interface_factory.h"
157 #endif
158
155 namespace chromeos { 159 namespace chromeos {
156 160
157 namespace { 161 namespace {
158 162
159 void ChromeOSVersionCallback(const std::string& version) { 163 void ChromeOSVersionCallback(const std::string& version) {
160 base::SetLinuxDistro(std::string("CrOS ") + version); 164 base::SetLinuxDistro(std::string("CrOS ") + version);
161 } 165 }
162 166
163 bool ShouldAutoLaunchKioskApp(const base::CommandLine& command_line) { 167 bool ShouldAutoLaunchKioskApp(const base::CommandLine& command_line) {
164 KioskAppManager* app_manager = KioskAppManager::Get(); 168 KioskAppManager* app_manager = KioskAppManager::Get();
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 // Enable support for SSL server sockets, which must be done while still 368 // Enable support for SSL server sockets, which must be done while still
365 // single-threaded. This is required for remote assistance host on Chrome OS. 369 // single-threaded. This is required for remote assistance host on Chrome OS.
366 net::EnableSSLServerSockets(); 370 net::EnableSSLServerSockets();
367 371
368 ChromeBrowserMainPartsLinux::PostMainMessageLoopStart(); 372 ChromeBrowserMainPartsLinux::PostMainMessageLoopStart();
369 } 373 }
370 374
371 // Threads are initialized between MainMessageLoopStart and MainMessageLoopRun. 375 // Threads are initialized between MainMessageLoopStart and MainMessageLoopRun.
372 // about_flags settings are applied in ChromeBrowserMainParts::PreCreateThreads. 376 // about_flags settings are applied in ChromeBrowserMainParts::PreCreateThreads.
373 void ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() { 377 void ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() {
378 #if defined(MOJO_SHELL_CLIENT)
379 if (content::MojoShellConnection::Get()) {
380 interface_factory_.reset(new ChromeInterfaceFactory);
381 content::MojoShellConnection::Get()->AddListener(interface_factory_.get());
382 }
383 #endif
384
374 // Set the crypto thread after the IO thread has been created/started. 385 // Set the crypto thread after the IO thread has been created/started.
375 TPMTokenLoader::Get()->SetCryptoTaskRunner( 386 TPMTokenLoader::Get()->SetCryptoTaskRunner(
376 content::BrowserThread::GetMessageLoopProxyForThread( 387 content::BrowserThread::GetMessageLoopProxyForThread(
377 content::BrowserThread::IO)); 388 content::BrowserThread::IO));
378 389
379 CrasAudioHandler::Initialize( 390 CrasAudioHandler::Initialize(
380 new AudioDevicesPrefHandlerImpl(g_browser_process->local_state())); 391 new AudioDevicesPrefHandlerImpl(g_browser_process->local_state()));
381 392
382 // Start loading machine statistics here. StatisticsProvider::Shutdown() 393 // Start loading machine statistics here. StatisticsProvider::Shutdown()
383 // will ensure that loading is aborted on early exit. 394 // will ensure that loading is aborted on early exit.
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 // Destroy DBus services immediately after threads are stopped. 841 // Destroy DBus services immediately after threads are stopped.
831 dbus_services_.reset(); 842 dbus_services_.reset();
832 843
833 ChromeBrowserMainPartsLinux::PostDestroyThreads(); 844 ChromeBrowserMainPartsLinux::PostDestroyThreads();
834 845
835 // Destroy DeviceSettingsService after g_browser_process. 846 // Destroy DeviceSettingsService after g_browser_process.
836 DeviceSettingsService::Shutdown(); 847 DeviceSettingsService::Shutdown();
837 } 848 }
838 849
839 } // namespace chromeos 850 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698