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/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 Loading... | |
36 #include "base/bind_helpers.h" | 36 #include "base/bind_helpers.h" |
37 #include "base/callback.h" | 37 #include "base/callback.h" |
38 #include "base/chromeos/chromeos_version.h" | 38 #include "base/chromeos/chromeos_version.h" |
39 #include "base/command_line.h" | 39 #include "base/command_line.h" |
40 #include "base/logging.h" | 40 #include "base/logging.h" |
41 #include "base/memory/weak_ptr.h" | 41 #include "base/memory/weak_ptr.h" |
42 #include "base/prefs/pref_service.h" | 42 #include "base/prefs/pref_service.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/cros/cros_library.h" | 50 #include "chrome/browser/chromeos/cros/cros_library.h" |
51 #include "chrome/browser/chromeos/cros/network_library.h" | 51 #include "chrome/browser/chromeos/cros/network_library.h" |
52 #include "chrome/browser/chromeos/drive/drive_system_service.h" | 52 #include "chrome/browser/chromeos/drive/drive_system_service.h" |
53 #include "chrome/browser/chromeos/input_method/input_method_configuration.h" | 53 #include "chrome/browser/chromeos/input_method/input_method_configuration.h" |
54 #include "chrome/browser/chromeos/input_method/input_method_manager.h" | 54 #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
55 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 55 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
56 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" | 56 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" |
(...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
997 return l10n_util::GetLocalizedContentsWidthInPixels( | 997 return l10n_util::GetLocalizedContentsWidthInPixels( |
998 IDS_SYSTEM_TRAY_MENU_BUBBLE_WIDTH_PIXELS); | 998 IDS_SYSTEM_TRAY_MENU_BUBBLE_WIDTH_PIXELS); |
999 } | 999 } |
1000 | 1000 |
1001 virtual string16 FormatTimeDuration( | 1001 virtual string16 FormatTimeDuration( |
1002 const base::TimeDelta& delta) const OVERRIDE { | 1002 const base::TimeDelta& delta) const OVERRIDE { |
1003 return TimeFormat::TimeDurationLong(delta); | 1003 return TimeFormat::TimeDurationLong(delta); |
1004 } | 1004 } |
1005 | 1005 |
1006 virtual void MaybeSpeak(const std::string& utterance) const OVERRIDE { | 1006 virtual void MaybeSpeak(const std::string& utterance) const OVERRIDE { |
1007 accessibility::MaybeSpeak(utterance); | 1007 AccessibilityManager::Get()->MaybeSpeak(utterance); |
1008 } | 1008 } |
1009 | 1009 |
1010 private: | 1010 private: |
1011 ash::SystemTray* GetPrimarySystemTray() { | 1011 ash::SystemTray* GetPrimarySystemTray() { |
1012 return ash::Shell::GetInstance()->GetPrimarySystemTray(); | 1012 return ash::Shell::GetInstance()->GetPrimarySystemTray(); |
1013 } | 1013 } |
1014 | 1014 |
1015 ash::SystemTrayNotifier* GetSystemTrayNotifier() { | 1015 ash::SystemTrayNotifier* GetSystemTrayNotifier() { |
1016 return ash::Shell::GetInstance()->system_tray_notifier(); | 1016 return ash::Shell::GetInstance()->system_tray_notifier(); |
1017 } | 1017 } |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1311 } | 1311 } |
1312 case chrome::NOTIFICATION_SESSION_STARTED: { | 1312 case chrome::NOTIFICATION_SESSION_STARTED: { |
1313 ash::Shell::GetInstance()->UpdateAfterLoginStatusChange( | 1313 ash::Shell::GetInstance()->UpdateAfterLoginStatusChange( |
1314 GetUserLoginStatus()); | 1314 GetUserLoginStatus()); |
1315 SetProfile(ProfileManager::GetDefaultProfile()); | 1315 SetProfile(ProfileManager::GetDefaultProfile()); |
1316 break; | 1316 break; |
1317 } | 1317 } |
1318 case chrome::NOTIFICATION_CROS_ACCESSIBILITY_TOGGLE_SPOKEN_FEEDBACK: | 1318 case chrome::NOTIFICATION_CROS_ACCESSIBILITY_TOGGLE_SPOKEN_FEEDBACK: |
1319 case chrome::NOTIFICATION_CROS_ACCESSIBILITY_TOGGLE_HIGH_CONTRAST_MODE: | 1319 case chrome::NOTIFICATION_CROS_ACCESSIBILITY_TOGGLE_HIGH_CONTRAST_MODE: |
1320 case chrome::NOTIFICATION_CROS_ACCESSIBILITY_TOGGLE_SCREEN_MAGNIFIER: { | 1320 case chrome::NOTIFICATION_CROS_ACCESSIBILITY_TOGGLE_SCREEN_MAGNIFIER: { |
1321 accessibility::AccessibilityStatusEventDetails* accessibility_status = | 1321 AccessibilityStatusEventDetails* accessibility_status = |
1322 content::Details<accessibility::AccessibilityStatusEventDetails>( | 1322 content::Details<AccessibilityStatusEventDetails>( |
1323 details).ptr(); | 1323 details).ptr(); |
Daniel Erat
2013/04/26 13:58:58
unwrap this too?
yoshiki
2013/05/24 18:49:45
Done.
| |
1324 OnAccessibilityModeChanged(accessibility_status->notify); | 1324 OnAccessibilityModeChanged(accessibility_status->notify); |
1325 break; | 1325 break; |
1326 } | 1326 } |
1327 default: | 1327 default: |
1328 NOTREACHED(); | 1328 NOTREACHED(); |
1329 } | 1329 } |
1330 } | 1330 } |
1331 | 1331 |
1332 void OnLanguageRemapSearchKeyToChanged() { | 1332 void OnLanguageRemapSearchKeyToChanged() { |
1333 search_key_mapped_to_ = user_pref_registrar_->prefs()->GetInteger( | 1333 search_key_mapped_to_ = user_pref_registrar_->prefs()->GetInteger( |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1594 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1594 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
1595 }; | 1595 }; |
1596 | 1596 |
1597 } // namespace | 1597 } // namespace |
1598 | 1598 |
1599 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1599 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
1600 return new chromeos::SystemTrayDelegate(); | 1600 return new chromeos::SystemTrayDelegate(); |
1601 } | 1601 } |
1602 | 1602 |
1603 } // namespace chromeos | 1603 } // namespace chromeos |
OLD | NEW |