Chromium Code Reviews

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

Issue 1408263006: chromeos: Add ArcInputBridge to components/arc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@arcxx
Patch Set: Moved IO to IO thread. Fixed style issues pointed out by jochen@ Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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 128 matching lines...)
139 #endif 139 #endif
140 140
141 // Exclude X11 dependents for ozone 141 // Exclude X11 dependents for ozone
142 #if defined(USE_X11) 142 #if defined(USE_X11)
143 #include "chrome/browser/chromeos/device_uma.h" 143 #include "chrome/browser/chromeos/device_uma.h"
144 #include "chrome/browser/chromeos/events/system_key_event_listener.h" 144 #include "chrome/browser/chromeos/events/system_key_event_listener.h"
145 #include "chrome/browser/chromeos/events/xinput_hierarchy_changed_event_listener .h" 145 #include "chrome/browser/chromeos/events/xinput_hierarchy_changed_event_listener .h"
146 #endif 146 #endif
147 147
148 #include "components/arc/arc_bridge_service.h" 148 #include "components/arc/arc_bridge_service.h"
149 #include "components/arc/input/arc_input_bridge.h"
149 150
150 namespace chromeos { 151 namespace chromeos {
151 152
152 namespace { 153 namespace {
153 154
154 void ChromeOSVersionCallback(const std::string& version) { 155 void ChromeOSVersionCallback(const std::string& version) {
155 base::SetLinuxDistro(std::string("CrOS ") + version); 156 base::SetLinuxDistro(std::string("CrOS ") + version);
156 } 157 }
157 158
158 bool ShouldAutoLaunchKioskApp(const base::CommandLine& command_line) { 159 bool ShouldAutoLaunchKioskApp(const base::CommandLine& command_line) {
(...skipping 228 matching lines...)
387 388
388 DeviceOAuth2TokenServiceFactory::Initialize(); 389 DeviceOAuth2TokenServiceFactory::Initialize();
389 390
390 wake_on_wifi_manager_.reset(new WakeOnWifiManager()); 391 wake_on_wifi_manager_.reset(new WakeOnWifiManager());
391 392
392 arc_bridge_service_ = arc::ArcBridgeService::Create( 393 arc_bridge_service_ = arc::ArcBridgeService::Create(
393 content::BrowserThread::GetMessageLoopProxyForThread( 394 content::BrowserThread::GetMessageLoopProxyForThread(
394 content::BrowserThread::IO), 395 content::BrowserThread::IO),
395 content::BrowserThread::GetMessageLoopProxyForThread( 396 content::BrowserThread::GetMessageLoopProxyForThread(
396 content::BrowserThread::FILE)); 397 content::BrowserThread::FILE));
398 arc_input_bridge_.reset(new arc::ArcInputBridge(
399 arc_bridge_service_->AsWeakPtr(),
400 content::BrowserThread::GetMessageLoopProxyForThread(
401 content::BrowserThread::IO)));
397 arc_bridge_service_->DetectAvailability(); 402 arc_bridge_service_->DetectAvailability();
398 403
399 chromeos::ResourceReporter::GetInstance()->StartMonitoring(); 404 chromeos::ResourceReporter::GetInstance()->StartMonitoring();
400 405
401 ChromeBrowserMainPartsLinux::PreMainMessageLoopRun(); 406 ChromeBrowserMainPartsLinux::PreMainMessageLoopRun();
402 } 407 }
403 408
404 void ChromeBrowserMainPartsChromeos::PreProfileInit() { 409 void ChromeBrowserMainPartsChromeos::PreProfileInit() {
405 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() 410 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun()
406 // -- immediately before Profile creation(). 411 // -- immediately before Profile creation().
(...skipping 417 matching lines...)
824 // Destroy DBus services immediately after threads are stopped. 829 // Destroy DBus services immediately after threads are stopped.
825 dbus_services_.reset(); 830 dbus_services_.reset();
826 831
827 ChromeBrowserMainPartsLinux::PostDestroyThreads(); 832 ChromeBrowserMainPartsLinux::PostDestroyThreads();
828 833
829 // Destroy DeviceSettingsService after g_browser_process. 834 // Destroy DeviceSettingsService after g_browser_process.
830 DeviceSettingsService::Shutdown(); 835 DeviceSettingsService::Shutdown();
831 } 836 }
832 837
833 } // namespace chromeos 838 } // namespace chromeos
OLDNEW

Powered by Google App Engine