OLD | NEW |
---|---|
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 <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
272 // Disable Num Lock on X start up for http://crosbug.com/29169. | 272 // Disable Num Lock on X start up for http://crosbug.com/29169. |
273 input_method::GetInputMethodManager()->GetXKeyboard()-> | 273 input_method::GetInputMethodManager()->GetXKeyboard()-> |
274 SetNumLockEnabled(false); | 274 SetNumLockEnabled(false); |
275 } | 275 } |
276 | 276 |
277 // Initialize the device settings service so that we'll take actions per | 277 // Initialize the device settings service so that we'll take actions per |
278 // signals sent from the session manager. | 278 // signals sent from the session manager. |
279 DeviceSettingsService::Get()->Initialize( | 279 DeviceSettingsService::Get()->Initialize( |
280 DBusThreadManager::Get()->GetSessionManagerClient(), | 280 DBusThreadManager::Get()->GetSessionManagerClient(), |
281 OwnerKeyUtil::Create()); | 281 OwnerKeyUtil::Create()); |
282 | |
bshe
2013/01/21 22:53:07
In order to add CrosSettingsObserver in ctor of Wa
| |
283 // Add observers for WallpaperManager. This depends on PowerManagerClient(). | |
284 WallpaperManager::Get()->AddObservers(); | |
285 } | 282 } |
286 | 283 |
287 // TODO(stevenjb): Move this into DBusServices() once the switch is no | 284 // TODO(stevenjb): Move this into DBusServices() once the switch is no |
288 // longer required. (Switch is set in about_flags.cc and not applied until | 285 // longer required. (Switch is set in about_flags.cc and not applied until |
289 // after DBusServices() is called). | 286 // after DBusServices() is called). |
290 void InitializeNetworkHandlers() { | 287 void InitializeNetworkHandlers() { |
291 network_handlers_initialized_ = true; | 288 network_handlers_initialized_ = true; |
292 | 289 |
293 // Always initialize these handlers which should not conflict with | 290 // Always initialize these handlers which should not conflict with |
294 // NetworkLibrary. | 291 // NetworkLibrary. |
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
726 | 723 |
727 // Detach D-Bus clients before DBusThreadManager is shut down. | 724 // Detach D-Bus clients before DBusThreadManager is shut down. |
728 power_button_observer_.reset(); | 725 power_button_observer_.reset(); |
729 screen_dimming_observer_.reset(); | 726 screen_dimming_observer_.reset(); |
730 | 727 |
731 // Delete ContactManager while |g_browser_process| is still alive. | 728 // Delete ContactManager while |g_browser_process| is still alive. |
732 contact_manager_.reset(); | 729 contact_manager_.reset(); |
733 | 730 |
734 chromeos::MagnificationManager::Shutdown(); | 731 chromeos::MagnificationManager::Shutdown(); |
735 | 732 |
736 // Let the UserManager unregister itself as an observer of the CrosSettings | 733 // Let the UserManager and WallpaperManager unregister itself as an observer |
737 // singleton before it is destroyed. | 734 // of the CrosSettings singleton before it is destroyed. |
738 UserManager::Get()->Shutdown(); | 735 UserManager::Get()->Shutdown(); |
736 WallpaperManager::Get()->Shutdown(); | |
739 | 737 |
740 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun(); | 738 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun(); |
741 } | 739 } |
742 | 740 |
743 void ChromeBrowserMainPartsChromeos::SetupPlatformFieldTrials() { | 741 void ChromeBrowserMainPartsChromeos::SetupPlatformFieldTrials() { |
744 SetupLowMemoryHeadroomFieldTrial(); | 742 SetupLowMemoryHeadroomFieldTrial(); |
745 SetupZramFieldTrial(); | 743 SetupZramFieldTrial(); |
746 } | 744 } |
747 | 745 |
748 void ChromeBrowserMainPartsChromeos::SetupLowMemoryHeadroomFieldTrial() { | 746 void ChromeBrowserMainPartsChromeos::SetupLowMemoryHeadroomFieldTrial() { |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
828 trial->AppendGroup("2GB_RAM_3GB_swap", zram_group == '2' ? 1 : 0); | 826 trial->AppendGroup("2GB_RAM_3GB_swap", zram_group == '2' ? 1 : 0); |
829 trial->AppendGroup("4GB_RAM_no_swap", zram_group == '3' ? 1 : 0); | 827 trial->AppendGroup("4GB_RAM_no_swap", zram_group == '3' ? 1 : 0); |
830 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); | 828 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); |
831 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); | 829 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); |
832 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); | 830 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); |
833 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); | 831 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); |
834 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); | 832 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); |
835 } | 833 } |
836 | 834 |
837 } // namespace chromeos | 835 } // namespace chromeos |
OLD | NEW |