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

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

Issue 14200048: Introduce AcccessibilityManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 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) 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"
11 #include "ash/shell.h" 11 #include "ash/shell.h"
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/callback.h" 13 #include "base/callback.h"
14 #include "base/chromeos/chromeos_version.h" 14 #include "base/chromeos/chromeos_version.h"
15 #include "base/command_line.h" 15 #include "base/command_line.h"
16 #include "base/file_util.h" 16 #include "base/file_util.h"
17 #include "base/lazy_instance.h" 17 #include "base/lazy_instance.h"
18 #include "base/linux_util.h" 18 #include "base/linux_util.h"
19 #include "base/message_loop.h" 19 #include "base/message_loop.h"
20 #include "base/path_service.h" 20 #include "base/path_service.h"
21 #include "base/prefs/pref_service.h" 21 #include "base/prefs/pref_service.h"
22 #include "base/strings/string_number_conversions.h" 22 #include "base/strings/string_number_conversions.h"
23 #include "base/strings/string_split.h" 23 #include "base/strings/string_split.h"
24 #include "base/time/default_tick_clock.h" 24 #include "base/time/default_tick_clock.h"
25 #include "base/time/tick_clock.h" 25 #include "base/time/tick_clock.h"
26 #include "chrome/browser/browser_process.h" 26 #include "chrome/browser/browser_process.h"
27 #include "chrome/browser/browser_process_platform_part_chromeos.h" 27 #include "chrome/browser/browser_process_platform_part_chromeos.h"
28 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" 28 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
29 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" 29 #include "chrome/browser/chromeos/accessibility/magnification_manager.h"
30 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h" 30 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h"
31 #include "chrome/browser/chromeos/app_mode/kiosk_app_launcher.h" 31 #include "chrome/browser/chromeos/app_mode/kiosk_app_launcher.h"
32 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" 32 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
33 #include "chrome/browser/chromeos/audio/audio_handler.h" 33 #include "chrome/browser/chromeos/audio/audio_handler.h"
34 #include "chrome/browser/chromeos/boot_times_loader.h" 34 #include "chrome/browser/chromeos/boot_times_loader.h"
35 #include "chrome/browser/chromeos/contacts/contact_manager.h" 35 #include "chrome/browser/chromeos/contacts/contact_manager.h"
36 #include "chrome/browser/chromeos/cros/cert_library.h" 36 #include "chrome/browser/chromeos/cros/cert_library.h"
37 #include "chrome/browser/chromeos/cros/cros_library.h" 37 #include "chrome/browser/chromeos/cros/cros_library.h"
38 #include "chrome/browser/chromeos/dbus/cros_dbus_service.h" 38 #include "chrome/browser/chromeos/dbus/cros_dbus_service.h"
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 new default_app_order::ExternalLoader(false /* async */)); 555 new default_app_order::ExternalLoader(false /* async */));
556 } 556 }
557 557
558 if (!app_order_loader_) { 558 if (!app_order_loader_) {
559 app_order_loader_.reset( 559 app_order_loader_.reset(
560 new default_app_order::ExternalLoader(true /* async */)); 560 new default_app_order::ExternalLoader(true /* async */));
561 } 561 }
562 562
563 // Initialize magnification manager before ash tray is created. And this must 563 // Initialize magnification manager before ash tray is created. And this must
564 // be placed after UserManager::SessionStarted(); 564 // be placed after UserManager::SessionStarted();
565 AccessibilityManager::Initialize();
565 MagnificationManager::Initialize(); 566 MagnificationManager::Initialize();
566 567
567 // Add observers for WallpaperManager. This depends on PowerManagerClient, 568 // Add observers for WallpaperManager. This depends on PowerManagerClient,
568 // TimezoneSettings and CrosSettings. 569 // TimezoneSettings and CrosSettings.
569 WallpaperManager::Get()->AddObservers(); 570 WallpaperManager::Get()->AddObservers();
570 571
571 #if defined(USE_LINUX_BREAKPAD) 572 #if defined(USE_LINUX_BREAKPAD)
572 cros_version_loader_.GetVersion(VersionLoader::VERSION_FULL, 573 cros_version_loader_.GetVersion(VersionLoader::VERSION_FULL,
573 base::Bind(&ChromeOSVersionCallback), 574 base::Bind(&ChromeOSVersionCallback),
574 &tracker_); 575 &tracker_);
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 if (CommandLine::ForCurrentProcess()->HasSwitch( 659 if (CommandLine::ForCurrentProcess()->HasSwitch(
659 switches::kEnableScreensaverExtensions)) { 660 switches::kEnableScreensaverExtensions)) {
660 screensaver_controller_.reset(new ScreensaverController()); 661 screensaver_controller_.reset(new ScreensaverController());
661 } 662 }
662 suspend_observer_.reset(new SuspendObserver()); 663 suspend_observer_.reset(new SuspendObserver());
663 if (KioskModeSettings::Get()->IsKioskModeEnabled()) { 664 if (KioskModeSettings::Get()->IsKioskModeEnabled()) {
664 retail_mode_power_save_blocker_ = content::PowerSaveBlocker::Create( 665 retail_mode_power_save_blocker_ = content::PowerSaveBlocker::Create(
665 content::PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep, 666 content::PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep,
666 "Retail mode"); 667 "Retail mode");
667 } 668 }
668 chromeos::accessibility::Initialize();
669 669
670 peripheral_battery_observer_.reset(new PeripheralBatteryObserver()); 670 peripheral_battery_observer_.reset(new PeripheralBatteryObserver());
671 671
672 // Initialize the network portal detector for Chrome OS. The network 672 // Initialize the network portal detector for Chrome OS. The network
673 // portal detector starts to listen for notifications from 673 // portal detector starts to listen for notifications from
674 // NetworkLibrary about changes in the NetworkManager and initiates 674 // NetworkLibrary about changes in the NetworkManager and initiates
675 // captive portal detection for active networks. 675 // captive portal detection for active networks.
676 NetworkPortalDetector* detector = NetworkPortalDetector::GetInstance(); 676 NetworkPortalDetector* detector = NetworkPortalDetector::GetInstance();
677 if (NetworkPortalDetector::IsEnabledInCommandLine() && detector) { 677 if (NetworkPortalDetector::IsEnabledInCommandLine() && detector) {
678 detector->Init(); 678 detector->Init();
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 803
804 // Detach D-Bus clients before DBusThreadManager is shut down. 804 // Detach D-Bus clients before DBusThreadManager is shut down.
805 power_button_observer_.reset(); 805 power_button_observer_.reset();
806 screensaver_controller_.reset(); 806 screensaver_controller_.reset();
807 idle_action_warning_observer_.reset(); 807 idle_action_warning_observer_.reset();
808 808
809 // Delete ContactManager while |g_browser_process| is still alive. 809 // Delete ContactManager while |g_browser_process| is still alive.
810 contact_manager_.reset(); 810 contact_manager_.reset();
811 811
812 MagnificationManager::Shutdown(); 812 MagnificationManager::Shutdown();
813 AccessibilityManager::Shutdown();
813 814
814 // Let the UserManager and WallpaperManager unregister itself as an observer 815 // Let the UserManager and WallpaperManager unregister itself as an observer
815 // of the CrosSettings singleton before it is destroyed. 816 // of the CrosSettings singleton before it is destroyed.
816 UserManager::Get()->Shutdown(); 817 UserManager::Get()->Shutdown();
817 WallpaperManager::Get()->Shutdown(); 818 WallpaperManager::Get()->Shutdown();
818 819
819 // Let the AutomaticRebootManager unregister itself as an observer of several 820 // Let the AutomaticRebootManager unregister itself as an observer of several
820 // subsystems. 821 // subsystems.
821 automatic_reboot_manager_.reset(); 822 automatic_reboot_manager_.reset();
822 823
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); 882 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0);
882 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); 883 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0);
883 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); 884 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0);
884 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); 885 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0);
885 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); 886 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0);
886 // This is necessary to start the experiment as a side effect. 887 // This is necessary to start the experiment as a side effect.
887 trial->group(); 888 trial->group();
888 } 889 }
889 890
890 } // namespace chromeos 891 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698