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

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

Issue 9999018: chrome/browser/chromeos/input_method/ refactoring [part 6 of 6] (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/chromeos/chromeos_version.h" 9 #include "base/chromeos/chromeos_version.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/lazy_instance.h" 11 #include "base/lazy_instance.h"
12 #include "base/message_loop.h" 12 #include "base/message_loop.h"
13 #include "base/string_number_conversions.h" 13 #include "base/string_number_conversions.h"
14 #include "base/string_split.h"
14 #include "chrome/browser/browser_process_impl.h" 15 #include "chrome/browser/browser_process_impl.h"
15 #include "chrome/browser/chromeos/audio/audio_handler.h" 16 #include "chrome/browser/chromeos/audio/audio_handler.h"
16 #include "chrome/browser/chromeos/background/desktop_background_observer.h" 17 #include "chrome/browser/chromeos/background/desktop_background_observer.h"
17 #include "chrome/browser/chromeos/boot_times_loader.h" 18 #include "chrome/browser/chromeos/boot_times_loader.h"
18 #include "chrome/browser/chromeos/cros/cros_library.h" 19 #include "chrome/browser/chromeos/cros/cros_library.h"
19 #include "chrome/browser/chromeos/cryptohome/async_method_caller.h" 20 #include "chrome/browser/chromeos/cryptohome/async_method_caller.h"
20 #include "chrome/browser/chromeos/dbus/cros_dbus_service.h" 21 #include "chrome/browser/chromeos/dbus/cros_dbus_service.h"
21 #include "chrome/browser/chromeos/disks/disk_mount_manager.h" 22 #include "chrome/browser/chromeos/disks/disk_mount_manager.h"
22 #include "chrome/browser/chromeos/external_metrics.h" 23 #include "chrome/browser/chromeos/external_metrics.h"
23 #include "chrome/browser/chromeos/imageburner/burn_manager.h" 24 #include "chrome/browser/chromeos/imageburner/burn_manager.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 chromeos::disks::DiskMountManager::Shutdown(); 201 chromeos::disks::DiskMountManager::Shutdown();
201 202
202 // CrosLibrary is shut down before DBusThreadManager even though the former 203 // CrosLibrary is shut down before DBusThreadManager even though the former
203 // is initialized before the latter becuase some of its libraries depend 204 // is initialized before the latter becuase some of its libraries depend
204 // on DBus clients. 205 // on DBus clients.
205 // TODO(hashimoto): Resolve this situation by removing CrosLibrary. 206 // TODO(hashimoto): Resolve this situation by removing CrosLibrary.
206 // (crosbug.com/26160) 207 // (crosbug.com/26160)
207 if (!parameters().ui_task && chromeos::CrosLibrary::Get()) 208 if (!parameters().ui_task && chromeos::CrosLibrary::Get())
208 chromeos::CrosLibrary::Shutdown(); 209 chromeos::CrosLibrary::Shutdown();
209 210
211 chromeos::input_method::InputMethodManager::Shutdown();
212
210 chromeos::CrosDBusService::Shutdown(); 213 chromeos::CrosDBusService::Shutdown();
211 chromeos::DBusThreadManager::Shutdown(); 214 chromeos::DBusThreadManager::Shutdown();
212 215
213 // To be precise, logout (browser shutdown) is not yet done, but the 216 // To be precise, logout (browser shutdown) is not yet done, but the
214 // remaining work is negligible, hence we say LogoutDone here. 217 // remaining work is negligible, hence we say LogoutDone here.
215 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", 218 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone",
216 false); 219 false);
217 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); 220 chromeos::BootTimesLoader::Get()->WriteLogoutTimes();
218 } 221 }
219 222
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 267
265 // Initialize the network change notifier for Chrome OS. The network 268 // Initialize the network change notifier for Chrome OS. The network
266 // change notifier starts to monitor changes from the power manager and 269 // change notifier starts to monitor changes from the power manager and
267 // the network manager. 270 // the network manager.
268 chromeos::CrosNetworkChangeNotifierFactory::GetInstance()->Init(); 271 chromeos::CrosNetworkChangeNotifierFactory::GetInstance()->Init();
269 272
270 // Likewise, initialize the upgrade detector for Chrome OS. The upgrade 273 // Likewise, initialize the upgrade detector for Chrome OS. The upgrade
271 // detector starts to monitor changes from the update engine. 274 // detector starts to monitor changes from the update engine.
272 UpgradeDetectorChromeos::GetInstance()->Init(); 275 UpgradeDetectorChromeos::GetInstance()->Init();
273 276
277 // This function and SystemKeyEventListener use InputMethodManager.
278 chromeos::input_method::InputMethodManager::Initialize();
279
274 if (base::chromeos::IsRunningOnChromeOS()) { 280 if (base::chromeos::IsRunningOnChromeOS()) {
275 // Enable Num Lock on X start up for http://crosbug.com/p/5795 and 281 // Enable Num Lock on X start up for http://crosbug.com/p/5795 and
276 // http://crosbug.com/p/6245. We don't do this for Chromium OS since many 282 // http://crosbug.com/p/6245. We don't do this for Chromium OS since many
277 // netbooks do not work as intended when Num Lock is on (e.g. On a netbook 283 // netbooks do not work as intended when Num Lock is on (e.g. On a netbook
278 // with a small keyboard, u, i, o, p, ... keys might be repurposed as 284 // with a small keyboard, u, i, o, p, ... keys might be repurposed as
279 // cursor keys when Num Lock is on). 285 // cursor keys when Num Lock is on).
280 #if defined(GOOGLE_CHROME_BUILD) 286 #if defined(GOOGLE_CHROME_BUILD)
281 chromeos::input_method::InputMethodManager::GetInstance()-> 287 chromeos::input_method::InputMethodManager::GetInstance()->
282 GetXKeyboard()->SetNumLockEnabled(true); 288 GetXKeyboard()->SetNumLockEnabled(true);
283 #endif 289 #endif
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 493
488 // Let VideoPropertyWriter unregister itself as an observer of the ash::Shell 494 // Let VideoPropertyWriter unregister itself as an observer of the ash::Shell
489 // singleton before the shell is destroyed. 495 // singleton before the shell is destroyed.
490 video_property_writer_.reset(); 496 video_property_writer_.reset();
491 // Remove PowerButtonObserver attached to a D-Bus client before 497 // Remove PowerButtonObserver attached to a D-Bus client before
492 // DBusThreadManager is shut down. 498 // DBusThreadManager is shut down.
493 power_button_observer_.reset(); 499 power_button_observer_.reset();
494 500
495 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun(); 501 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun();
496 } 502 }
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray_delegate.h ('k') | chrome/browser/chromeos/extensions/input_method_event_router.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698