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

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

Issue 1466143002: arc-bridge: Enable ARC with a command-line flag (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: Rebased to ToT Created 5 years 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
« no previous file with comments | « chrome/browser/chromeos/chrome_browser_main_chromeos.h ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 #include "components/rlz/rlz_tracker.h" 137 #include "components/rlz/rlz_tracker.h"
138 #endif 138 #endif
139 139
140 // Exclude X11 dependents for ozone 140 // Exclude X11 dependents for ozone
141 #if defined(USE_X11) 141 #if defined(USE_X11)
142 #include "chrome/browser/chromeos/device_uma.h" 142 #include "chrome/browser/chromeos/device_uma.h"
143 #include "chrome/browser/chromeos/events/system_key_event_listener.h" 143 #include "chrome/browser/chromeos/events/system_key_event_listener.h"
144 #include "chrome/browser/chromeos/events/xinput_hierarchy_changed_event_listener .h" 144 #include "chrome/browser/chromeos/events/xinput_hierarchy_changed_event_listener .h"
145 #endif 145 #endif
146 146
147 #if defined(ENABLE_ARC)
148 #include "components/arc/arc_bridge_service.h" 147 #include "components/arc/arc_bridge_service.h"
149 #endif
150 148
151 namespace chromeos { 149 namespace chromeos {
152 150
153 namespace { 151 namespace {
154 152
155 void ChromeOSVersionCallback(const std::string& version) { 153 void ChromeOSVersionCallback(const std::string& version) {
156 base::SetLinuxDistro(std::string("CrOS ") + version); 154 base::SetLinuxDistro(std::string("CrOS ") + version);
157 } 155 }
158 156
159 bool ShouldAutoLaunchKioskApp(const base::CommandLine& command_line) { 157 bool ShouldAutoLaunchKioskApp(const base::CommandLine& command_line) {
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 content::BrowserThread::FILE), 381 content::BrowserThread::FILE),
384 load_oem_statistics); 382 load_oem_statistics);
385 383
386 base::FilePath downloads_directory; 384 base::FilePath downloads_directory;
387 CHECK(PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &downloads_directory)); 385 CHECK(PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &downloads_directory));
388 386
389 DeviceOAuth2TokenServiceFactory::Initialize(); 387 DeviceOAuth2TokenServiceFactory::Initialize();
390 388
391 wake_on_wifi_manager_.reset(new WakeOnWifiManager()); 389 wake_on_wifi_manager_.reset(new WakeOnWifiManager());
392 390
393 #if defined(ENABLE_ARC)
394 arc_bridge_service_.reset(new arc::ArcBridgeService( 391 arc_bridge_service_.reset(new arc::ArcBridgeService(
395 content::BrowserThread::GetMessageLoopProxyForThread( 392 content::BrowserThread::GetMessageLoopProxyForThread(
396 content::BrowserThread::IO), 393 content::BrowserThread::IO),
397 content::BrowserThread::GetMessageLoopProxyForThread( 394 content::BrowserThread::GetMessageLoopProxyForThread(
398 content::BrowserThread::FILE))); 395 content::BrowserThread::FILE)));
399 arc_bridge_service_->DetectAvailability(); 396 arc_bridge_service_->DetectAvailability();
400 #endif
401 397
402 ChromeBrowserMainPartsLinux::PreMainMessageLoopRun(); 398 ChromeBrowserMainPartsLinux::PreMainMessageLoopRun();
403 } 399 }
404 400
405 void ChromeBrowserMainPartsChromeos::PreProfileInit() { 401 void ChromeBrowserMainPartsChromeos::PreProfileInit() {
406 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() 402 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun()
407 // -- immediately before Profile creation(). 403 // -- immediately before Profile creation().
408 404
409 // Now that the file thread exists we can record our stats. 405 // Now that the file thread exists we can record our stats.
410 BootTimesRecorder::Get()->RecordChromeMainStats(); 406 BootTimesRecorder::Get()->RecordChromeMainStats();
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 new EventRewriter(ash::Shell::GetInstance()->sticky_keys_controller()))); 701 new EventRewriter(ash::Shell::GetInstance()->sticky_keys_controller())));
706 keyboard_event_rewriters_->Init(); 702 keyboard_event_rewriters_->Init();
707 703
708 ChromeBrowserMainPartsLinux::PostBrowserStart(); 704 ChromeBrowserMainPartsLinux::PostBrowserStart();
709 } 705 }
710 706
711 // Shut down services before the browser process, etc are destroyed. 707 // Shut down services before the browser process, etc are destroyed.
712 void ChromeBrowserMainPartsChromeos::PostMainMessageLoopRun() { 708 void ChromeBrowserMainPartsChromeos::PostMainMessageLoopRun() {
713 BootTimesRecorder::Get()->AddLogoutTimeMarker("UIMessageLoopEnded", true); 709 BootTimesRecorder::Get()->AddLogoutTimeMarker("UIMessageLoopEnded", true);
714 710
715 #if defined(ENABLE_ARC)
716 arc_bridge_service_->Shutdown(); 711 arc_bridge_service_->Shutdown();
717 #endif
718 712
719 // Destroy the application name notifier for Kiosk mode. 713 // Destroy the application name notifier for Kiosk mode.
720 KioskModeIdleAppNameNotification::Shutdown(); 714 KioskModeIdleAppNameNotification::Shutdown();
721 715
722 // Shutdown the upgrade detector for Chrome OS. The upgrade detector 716 // Shutdown the upgrade detector for Chrome OS. The upgrade detector
723 // stops monitoring changes from the update engine. 717 // stops monitoring changes from the update engine.
724 if (UpgradeDetectorChromeos::GetInstance()) 718 if (UpgradeDetectorChromeos::GetInstance())
725 UpgradeDetectorChromeos::GetInstance()->Shutdown(); 719 UpgradeDetectorChromeos::GetInstance()->Shutdown();
726 720
727 // Shutdown the network change notifier for Chrome OS. The network 721 // Shutdown the network change notifier for Chrome OS. The network
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 // Destroy DBus services immediately after threads are stopped. 819 // Destroy DBus services immediately after threads are stopped.
826 dbus_services_.reset(); 820 dbus_services_.reset();
827 821
828 ChromeBrowserMainPartsLinux::PostDestroyThreads(); 822 ChromeBrowserMainPartsLinux::PostDestroyThreads();
829 823
830 // Destroy DeviceSettingsService after g_browser_process. 824 // Destroy DeviceSettingsService after g_browser_process.
831 DeviceSettingsService::Shutdown(); 825 DeviceSettingsService::Shutdown();
832 } 826 }
833 827
834 } // namespace chromeos 828 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/chrome_browser_main_chromeos.h ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698