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

Side by Side Diff: chrome/browser/chromeos/system/ash_system_tray_delegate.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) 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/system/ash_system_tray_delegate.h" 5 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 25 matching lines...) Expand all
36 #include "base/callback.h" 36 #include "base/callback.h"
37 #include "base/chromeos/chromeos_version.h" 37 #include "base/chromeos/chromeos_version.h"
38 #include "base/command_line.h" 38 #include "base/command_line.h"
39 #include "base/logging.h" 39 #include "base/logging.h"
40 #include "base/memory/weak_ptr.h" 40 #include "base/memory/weak_ptr.h"
41 #include "base/prefs/pref_service.h" 41 #include "base/prefs/pref_service.h"
42 #include "base/stringprintf.h" 42 #include "base/stringprintf.h"
43 #include "base/time.h" 43 #include "base/time.h"
44 #include "base/utf_string_conversions.h" 44 #include "base/utf_string_conversions.h"
45 #include "chrome/browser/browser_process.h" 45 #include "chrome/browser/browser_process.h"
46 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" 46 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
47 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" 47 #include "chrome/browser/chromeos/accessibility/magnification_manager.h"
48 #include "chrome/browser/chromeos/audio/audio_handler.h" 48 #include "chrome/browser/chromeos/audio/audio_handler.h"
49 #include "chrome/browser/chromeos/bluetooth/bluetooth_pairing_dialog.h" 49 #include "chrome/browser/chromeos/bluetooth/bluetooth_pairing_dialog.h"
50 #include "chrome/browser/chromeos/choose_mobile_network_dialog.h" 50 #include "chrome/browser/chromeos/choose_mobile_network_dialog.h"
51 #include "chrome/browser/chromeos/cros/cros_library.h" 51 #include "chrome/browser/chromeos/cros/cros_library.h"
52 #include "chrome/browser/chromeos/cros/network_library.h" 52 #include "chrome/browser/chromeos/cros/network_library.h"
53 #include "chrome/browser/chromeos/drive/drive_integration_service.h" 53 #include "chrome/browser/chromeos/drive/drive_integration_service.h"
54 #include "chrome/browser/chromeos/input_method/input_method_util.h" 54 #include "chrome/browser/chromeos/input_method/input_method_util.h"
55 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" 55 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h"
56 #include "chrome/browser/chromeos/login/help_app_launcher.h" 56 #include "chrome/browser/chromeos/login/help_app_launcher.h"
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 return l10n_util::GetLocalizedContentsWidthInPixels( 875 return l10n_util::GetLocalizedContentsWidthInPixels(
876 IDS_SYSTEM_TRAY_MENU_BUBBLE_WIDTH_PIXELS); 876 IDS_SYSTEM_TRAY_MENU_BUBBLE_WIDTH_PIXELS);
877 } 877 }
878 878
879 virtual string16 FormatTimeDuration( 879 virtual string16 FormatTimeDuration(
880 const base::TimeDelta& delta) const OVERRIDE { 880 const base::TimeDelta& delta) const OVERRIDE {
881 return TimeFormat::TimeDurationLong(delta); 881 return TimeFormat::TimeDurationLong(delta);
882 } 882 }
883 883
884 virtual void MaybeSpeak(const std::string& utterance) const OVERRIDE { 884 virtual void MaybeSpeak(const std::string& utterance) const OVERRIDE {
885 accessibility::MaybeSpeak(utterance); 885 AccessibilityManager::Get()->MaybeSpeak(utterance);
886 } 886 }
887 887
888 private: 888 private:
889 ash::SystemTray* GetPrimarySystemTray() { 889 ash::SystemTray* GetPrimarySystemTray() {
890 return ash::Shell::GetInstance()->GetPrimarySystemTray(); 890 return ash::Shell::GetInstance()->GetPrimarySystemTray();
891 } 891 }
892 892
893 ash::SystemTrayNotifier* GetSystemTrayNotifier() { 893 ash::SystemTrayNotifier* GetSystemTrayNotifier() {
894 return ash::Shell::GetInstance()->system_tray_notifier(); 894 return ash::Shell::GetInstance()->system_tray_notifier();
895 } 895 }
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1096 } 1096 }
1097 case chrome::NOTIFICATION_SESSION_STARTED: { 1097 case chrome::NOTIFICATION_SESSION_STARTED: {
1098 ash::Shell::GetInstance()->UpdateAfterLoginStatusChange( 1098 ash::Shell::GetInstance()->UpdateAfterLoginStatusChange(
1099 GetUserLoginStatus()); 1099 GetUserLoginStatus());
1100 SetProfile(ProfileManager::GetDefaultProfile()); 1100 SetProfile(ProfileManager::GetDefaultProfile());
1101 break; 1101 break;
1102 } 1102 }
1103 case chrome::NOTIFICATION_CROS_ACCESSIBILITY_TOGGLE_SPOKEN_FEEDBACK: 1103 case chrome::NOTIFICATION_CROS_ACCESSIBILITY_TOGGLE_SPOKEN_FEEDBACK:
1104 case chrome::NOTIFICATION_CROS_ACCESSIBILITY_TOGGLE_HIGH_CONTRAST_MODE: 1104 case chrome::NOTIFICATION_CROS_ACCESSIBILITY_TOGGLE_HIGH_CONTRAST_MODE:
1105 case chrome::NOTIFICATION_CROS_ACCESSIBILITY_TOGGLE_SCREEN_MAGNIFIER: { 1105 case chrome::NOTIFICATION_CROS_ACCESSIBILITY_TOGGLE_SCREEN_MAGNIFIER: {
1106 accessibility::AccessibilityStatusEventDetails* accessibility_status = 1106 AccessibilityStatusEventDetails* accessibility_status =
1107 content::Details<accessibility::AccessibilityStatusEventDetails>( 1107 content::Details<AccessibilityStatusEventDetails>(details).ptr();
1108 details).ptr();
1109 OnAccessibilityModeChanged(accessibility_status->notify); 1108 OnAccessibilityModeChanged(accessibility_status->notify);
1110 break; 1109 break;
1111 } 1110 }
1112 default: 1111 default:
1113 NOTREACHED(); 1112 NOTREACHED();
1114 } 1113 }
1115 } 1114 }
1116 1115
1117 void OnLanguageRemapSearchKeyToChanged() { 1116 void OnLanguageRemapSearchKeyToChanged() {
1118 search_key_mapped_to_ = user_pref_registrar_->prefs()->GetInteger( 1117 search_key_mapped_to_ = user_pref_registrar_->prefs()->GetInteger(
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
1325 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); 1324 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate);
1326 }; 1325 };
1327 1326
1328 } // namespace 1327 } // namespace
1329 1328
1330 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { 1329 ash::SystemTrayDelegate* CreateSystemTrayDelegate() {
1331 return new chromeos::SystemTrayDelegate(); 1330 return new chromeos::SystemTrayDelegate();
1332 } 1331 }
1333 1332
1334 } // namespace chromeos 1333 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/preferences.cc ('k') | chrome/browser/chromeos/system/tray_accessibility_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698