| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #ifndef CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_ |
| 6 #define CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_ | 6 #define CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_ |
| 7 | 7 |
| 8 #include "ash/ime/input_method_menu_manager.h" | 8 #include "ash/ime/input_method_menu_manager.h" |
| 9 #include "ash/session/session_state_observer.h" | 9 #include "ash/session/session_state_observer.h" |
| 10 #include "ash/system/tray/system_tray.h" | 10 #include "ash/system/tray/system_tray.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 public extensions::AppWindowRegistry::Observer { | 48 public extensions::AppWindowRegistry::Observer { |
| 49 public: | 49 public: |
| 50 SystemTrayDelegateChromeOS(); | 50 SystemTrayDelegateChromeOS(); |
| 51 | 51 |
| 52 virtual ~SystemTrayDelegateChromeOS(); | 52 virtual ~SystemTrayDelegateChromeOS(); |
| 53 | 53 |
| 54 void InitializeOnAdapterReady( | 54 void InitializeOnAdapterReady( |
| 55 scoped_refptr<device::BluetoothAdapter> adapter); | 55 scoped_refptr<device::BluetoothAdapter> adapter); |
| 56 | 56 |
| 57 // Overridden from ash::SystemTrayDelegate: | 57 // Overridden from ash::SystemTrayDelegate: |
| 58 virtual void Initialize() OVERRIDE; | 58 virtual void Initialize() override; |
| 59 virtual void Shutdown() OVERRIDE; | 59 virtual void Shutdown() override; |
| 60 virtual bool GetTrayVisibilityOnStartup() OVERRIDE; | 60 virtual bool GetTrayVisibilityOnStartup() override; |
| 61 virtual ash::user::LoginStatus GetUserLoginStatus() const OVERRIDE; | 61 virtual ash::user::LoginStatus GetUserLoginStatus() const override; |
| 62 virtual void ChangeProfilePicture() OVERRIDE; | 62 virtual void ChangeProfilePicture() override; |
| 63 virtual const std::string GetEnterpriseDomain() const OVERRIDE; | 63 virtual const std::string GetEnterpriseDomain() const override; |
| 64 virtual const base::string16 GetEnterpriseMessage() const OVERRIDE; | 64 virtual const base::string16 GetEnterpriseMessage() const override; |
| 65 virtual const std::string GetSupervisedUserManager() const OVERRIDE; | 65 virtual const std::string GetSupervisedUserManager() const override; |
| 66 virtual const base::string16 GetSupervisedUserManagerName() const OVERRIDE; | 66 virtual const base::string16 GetSupervisedUserManagerName() const override; |
| 67 virtual const base::string16 GetSupervisedUserMessage() const OVERRIDE; | 67 virtual const base::string16 GetSupervisedUserMessage() const override; |
| 68 virtual bool IsUserSupervised() const OVERRIDE; | 68 virtual bool IsUserSupervised() const override; |
| 69 virtual bool SystemShouldUpgrade() const OVERRIDE; | 69 virtual bool SystemShouldUpgrade() const override; |
| 70 virtual base::HourClockType GetHourClockType() const OVERRIDE; | 70 virtual base::HourClockType GetHourClockType() const override; |
| 71 virtual void ShowSettings() OVERRIDE; | 71 virtual void ShowSettings() override; |
| 72 virtual bool ShouldShowSettings() OVERRIDE; | 72 virtual bool ShouldShowSettings() override; |
| 73 virtual void ShowDateSettings() OVERRIDE; | 73 virtual void ShowDateSettings() override; |
| 74 virtual void ShowSetTimeDialog() OVERRIDE; | 74 virtual void ShowSetTimeDialog() override; |
| 75 virtual void ShowNetworkSettings(const std::string& service_path) OVERRIDE; | 75 virtual void ShowNetworkSettings(const std::string& service_path) override; |
| 76 virtual void ShowBluetoothSettings() OVERRIDE; | 76 virtual void ShowBluetoothSettings() override; |
| 77 virtual void ShowDisplaySettings() OVERRIDE; | 77 virtual void ShowDisplaySettings() override; |
| 78 virtual void ShowChromeSlow() OVERRIDE; | 78 virtual void ShowChromeSlow() override; |
| 79 virtual bool ShouldShowDisplayNotification() OVERRIDE; | 79 virtual bool ShouldShowDisplayNotification() override; |
| 80 virtual void ShowIMESettings() OVERRIDE; | 80 virtual void ShowIMESettings() override; |
| 81 virtual void ShowHelp() OVERRIDE; | 81 virtual void ShowHelp() override; |
| 82 virtual void ShowAccessibilityHelp() OVERRIDE; | 82 virtual void ShowAccessibilityHelp() override; |
| 83 virtual void ShowAccessibilitySettings() OVERRIDE; | 83 virtual void ShowAccessibilitySettings() override; |
| 84 virtual void ShowPublicAccountInfo() OVERRIDE; | 84 virtual void ShowPublicAccountInfo() override; |
| 85 virtual void ShowSupervisedUserInfo() OVERRIDE; | 85 virtual void ShowSupervisedUserInfo() override; |
| 86 virtual void ShowEnterpriseInfo() OVERRIDE; | 86 virtual void ShowEnterpriseInfo() override; |
| 87 virtual void ShowUserLogin() OVERRIDE; | 87 virtual void ShowUserLogin() override; |
| 88 virtual bool ShowSpringChargerReplacementDialog() OVERRIDE; | 88 virtual bool ShowSpringChargerReplacementDialog() override; |
| 89 virtual bool IsSpringChargerReplacementDialogVisible() OVERRIDE; | 89 virtual bool IsSpringChargerReplacementDialogVisible() override; |
| 90 virtual bool HasUserConfirmedSafeSpringCharger() OVERRIDE; | 90 virtual bool HasUserConfirmedSafeSpringCharger() override; |
| 91 virtual void ShutDown() OVERRIDE; | 91 virtual void ShutDown() override; |
| 92 virtual void SignOut() OVERRIDE; | 92 virtual void SignOut() override; |
| 93 virtual void RequestLockScreen() OVERRIDE; | 93 virtual void RequestLockScreen() override; |
| 94 virtual void RequestRestartForUpdate() OVERRIDE; | 94 virtual void RequestRestartForUpdate() override; |
| 95 virtual void GetAvailableBluetoothDevices(ash::BluetoothDeviceList* list) | 95 virtual void GetAvailableBluetoothDevices(ash::BluetoothDeviceList* list) |
| 96 OVERRIDE; | 96 override; |
| 97 virtual void BluetoothStartDiscovering() OVERRIDE; | 97 virtual void BluetoothStartDiscovering() override; |
| 98 virtual void BluetoothStopDiscovering() OVERRIDE; | 98 virtual void BluetoothStopDiscovering() override; |
| 99 virtual void ConnectToBluetoothDevice(const std::string& address) OVERRIDE; | 99 virtual void ConnectToBluetoothDevice(const std::string& address) override; |
| 100 virtual bool IsBluetoothDiscovering() OVERRIDE; | 100 virtual bool IsBluetoothDiscovering() override; |
| 101 virtual void GetCurrentIME(ash::IMEInfo* info) OVERRIDE; | 101 virtual void GetCurrentIME(ash::IMEInfo* info) override; |
| 102 virtual void GetAvailableIMEList(ash::IMEInfoList* list) OVERRIDE; | 102 virtual void GetAvailableIMEList(ash::IMEInfoList* list) override; |
| 103 virtual void GetCurrentIMEProperties(ash::IMEPropertyInfoList* list) OVERRIDE; | 103 virtual void GetCurrentIMEProperties(ash::IMEPropertyInfoList* list) override; |
| 104 virtual void SwitchIME(const std::string& ime_id) OVERRIDE; | 104 virtual void SwitchIME(const std::string& ime_id) override; |
| 105 virtual void ActivateIMEProperty(const std::string& key) OVERRIDE; | 105 virtual void ActivateIMEProperty(const std::string& key) override; |
| 106 virtual void ShowNetworkConfigure(const std::string& network_id) OVERRIDE; | 106 virtual void ShowNetworkConfigure(const std::string& network_id) override; |
| 107 virtual bool EnrollNetwork(const std::string& network_id) OVERRIDE; | 107 virtual bool EnrollNetwork(const std::string& network_id) override; |
| 108 virtual void ManageBluetoothDevices() OVERRIDE; | 108 virtual void ManageBluetoothDevices() override; |
| 109 virtual void ToggleBluetooth() OVERRIDE; | 109 virtual void ToggleBluetooth() override; |
| 110 virtual void ShowMobileSimDialog() OVERRIDE; | 110 virtual void ShowMobileSimDialog() override; |
| 111 virtual void ShowMobileSetupDialog(const std::string& service_path) OVERRIDE; | 111 virtual void ShowMobileSetupDialog(const std::string& service_path) override; |
| 112 virtual void ShowOtherNetworkDialog(const std::string& type) OVERRIDE; | 112 virtual void ShowOtherNetworkDialog(const std::string& type) override; |
| 113 virtual bool GetBluetoothAvailable() OVERRIDE; | 113 virtual bool GetBluetoothAvailable() override; |
| 114 virtual bool GetBluetoothEnabled() OVERRIDE; | 114 virtual bool GetBluetoothEnabled() override; |
| 115 virtual bool GetBluetoothDiscovering() OVERRIDE; | 115 virtual bool GetBluetoothDiscovering() override; |
| 116 virtual void ChangeProxySettings() OVERRIDE; | 116 virtual void ChangeProxySettings() override; |
| 117 virtual ash::VolumeControlDelegate* GetVolumeControlDelegate() const OVERRIDE; | 117 virtual ash::VolumeControlDelegate* GetVolumeControlDelegate() const override; |
| 118 virtual void SetVolumeControlDelegate( | 118 virtual void SetVolumeControlDelegate( |
| 119 scoped_ptr<ash::VolumeControlDelegate> delegate) OVERRIDE; | 119 scoped_ptr<ash::VolumeControlDelegate> delegate) override; |
| 120 virtual bool GetSessionStartTime(base::TimeTicks* session_start_time) | 120 virtual bool GetSessionStartTime(base::TimeTicks* session_start_time) |
| 121 OVERRIDE; | 121 override; |
| 122 virtual bool GetSessionLengthLimit(base::TimeDelta* session_length_limit) | 122 virtual bool GetSessionLengthLimit(base::TimeDelta* session_length_limit) |
| 123 OVERRIDE; | 123 override; |
| 124 virtual int GetSystemTrayMenuWidth() OVERRIDE; | 124 virtual int GetSystemTrayMenuWidth() override; |
| 125 virtual void ActiveUserWasChanged() OVERRIDE; | 125 virtual void ActiveUserWasChanged() override; |
| 126 virtual bool IsSearchKeyMappedToCapsLock() OVERRIDE; | 126 virtual bool IsSearchKeyMappedToCapsLock() override; |
| 127 virtual ash::tray::UserAccountsDelegate* GetUserAccountsDelegate( | 127 virtual ash::tray::UserAccountsDelegate* GetUserAccountsDelegate( |
| 128 const std::string& user_id) OVERRIDE; | 128 const std::string& user_id) override; |
| 129 | 129 |
| 130 // browser tests need to call ShouldUse24HourClock(). | 130 // browser tests need to call ShouldUse24HourClock(). |
| 131 bool GetShouldUse24HourClockForTesting() const; | 131 bool GetShouldUse24HourClockForTesting() const; |
| 132 | 132 |
| 133 private: | 133 private: |
| 134 // Should be the same as CrosSettings::ObserverSubscription. | 134 // Should be the same as CrosSettings::ObserverSubscription. |
| 135 typedef base::CallbackList<void(void)>::Subscription | 135 typedef base::CallbackList<void(void)>::Subscription |
| 136 CrosSettingsObserverSubscription; | 136 CrosSettingsObserverSubscription; |
| 137 | 137 |
| 138 ash::SystemTray* GetPrimarySystemTray(); | 138 ash::SystemTray* GetPrimarySystemTray(); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 155 | 155 |
| 156 void UpdateSessionLengthLimit(); | 156 void UpdateSessionLengthLimit(); |
| 157 | 157 |
| 158 void StopObservingAppWindowRegistry(); | 158 void StopObservingAppWindowRegistry(); |
| 159 | 159 |
| 160 // Notify observers if the current user has no more open browser or app | 160 // Notify observers if the current user has no more open browser or app |
| 161 // windows. | 161 // windows. |
| 162 void NotifyIfLastWindowClosed(); | 162 void NotifyIfLastWindowClosed(); |
| 163 | 163 |
| 164 // LoginState::Observer overrides. | 164 // LoginState::Observer overrides. |
| 165 virtual void LoggedInStateChanged() OVERRIDE; | 165 virtual void LoggedInStateChanged() override; |
| 166 | 166 |
| 167 // Overridden from SessionManagerClient::Observer. | 167 // Overridden from SessionManagerClient::Observer. |
| 168 virtual void ScreenIsLocked() OVERRIDE; | 168 virtual void ScreenIsLocked() override; |
| 169 virtual void ScreenIsUnlocked() OVERRIDE; | 169 virtual void ScreenIsUnlocked() override; |
| 170 | 170 |
| 171 gfx::NativeWindow GetNativeWindow() const; | 171 gfx::NativeWindow GetNativeWindow() const; |
| 172 | 172 |
| 173 // content::NotificationObserver implementation. | 173 // content::NotificationObserver implementation. |
| 174 virtual void Observe(int type, | 174 virtual void Observe(int type, |
| 175 const content::NotificationSource& source, | 175 const content::NotificationSource& source, |
| 176 const content::NotificationDetails& details) OVERRIDE; | 176 const content::NotificationDetails& details) override; |
| 177 | 177 |
| 178 void OnLanguageRemapSearchKeyToChanged(); | 178 void OnLanguageRemapSearchKeyToChanged(); |
| 179 | 179 |
| 180 void OnAccessibilityModeChanged( | 180 void OnAccessibilityModeChanged( |
| 181 ash::AccessibilityNotificationVisibility notify); | 181 ash::AccessibilityNotificationVisibility notify); |
| 182 | 182 |
| 183 void UpdatePerformanceTracing(); | 183 void UpdatePerformanceTracing(); |
| 184 | 184 |
| 185 // Overridden from InputMethodManager::Observer. | 185 // Overridden from InputMethodManager::Observer. |
| 186 virtual void InputMethodChanged(input_method::InputMethodManager* manager, | 186 virtual void InputMethodChanged(input_method::InputMethodManager* manager, |
| 187 bool show_message) OVERRIDE; | 187 bool show_message) override; |
| 188 | 188 |
| 189 // Overridden from InputMethodMenuManager::Observer. | 189 // Overridden from InputMethodMenuManager::Observer. |
| 190 virtual void InputMethodMenuItemChanged( | 190 virtual void InputMethodMenuItemChanged( |
| 191 ash::ime::InputMethodMenuManager* manager) OVERRIDE; | 191 ash::ime::InputMethodMenuManager* manager) override; |
| 192 | 192 |
| 193 // Overridden from CrasAudioHandler::AudioObserver. | 193 // Overridden from CrasAudioHandler::AudioObserver. |
| 194 virtual void OnOutputVolumeChanged() OVERRIDE; | 194 virtual void OnOutputVolumeChanged() override; |
| 195 virtual void OnOutputMuteChanged() OVERRIDE; | 195 virtual void OnOutputMuteChanged() override; |
| 196 virtual void OnInputGainChanged() OVERRIDE; | 196 virtual void OnInputGainChanged() override; |
| 197 virtual void OnInputMuteChanged() OVERRIDE; | 197 virtual void OnInputMuteChanged() override; |
| 198 virtual void OnAudioNodesChanged() OVERRIDE; | 198 virtual void OnAudioNodesChanged() override; |
| 199 virtual void OnActiveOutputNodeChanged() OVERRIDE; | 199 virtual void OnActiveOutputNodeChanged() override; |
| 200 virtual void OnActiveInputNodeChanged() OVERRIDE; | 200 virtual void OnActiveInputNodeChanged() override; |
| 201 | 201 |
| 202 // Overridden from BluetoothAdapter::Observer. | 202 // Overridden from BluetoothAdapter::Observer. |
| 203 virtual void AdapterPresentChanged(device::BluetoothAdapter* adapter, | 203 virtual void AdapterPresentChanged(device::BluetoothAdapter* adapter, |
| 204 bool present) OVERRIDE; | 204 bool present) override; |
| 205 virtual void AdapterPoweredChanged(device::BluetoothAdapter* adapter, | 205 virtual void AdapterPoweredChanged(device::BluetoothAdapter* adapter, |
| 206 bool powered) OVERRIDE; | 206 bool powered) override; |
| 207 virtual void AdapterDiscoveringChanged(device::BluetoothAdapter* adapter, | 207 virtual void AdapterDiscoveringChanged(device::BluetoothAdapter* adapter, |
| 208 bool discovering) OVERRIDE; | 208 bool discovering) override; |
| 209 virtual void DeviceAdded(device::BluetoothAdapter* adapter, | 209 virtual void DeviceAdded(device::BluetoothAdapter* adapter, |
| 210 device::BluetoothDevice* device) OVERRIDE; | 210 device::BluetoothDevice* device) override; |
| 211 virtual void DeviceChanged(device::BluetoothAdapter* adapter, | 211 virtual void DeviceChanged(device::BluetoothAdapter* adapter, |
| 212 device::BluetoothDevice* device) OVERRIDE; | 212 device::BluetoothDevice* device) override; |
| 213 virtual void DeviceRemoved(device::BluetoothAdapter* adapter, | 213 virtual void DeviceRemoved(device::BluetoothAdapter* adapter, |
| 214 device::BluetoothDevice* device) OVERRIDE; | 214 device::BluetoothDevice* device) override; |
| 215 | 215 |
| 216 void OnStartBluetoothDiscoverySession( | 216 void OnStartBluetoothDiscoverySession( |
| 217 scoped_ptr<device::BluetoothDiscoverySession> discovery_session); | 217 scoped_ptr<device::BluetoothDiscoverySession> discovery_session); |
| 218 | 218 |
| 219 void UpdateEnterpriseDomain(); | 219 void UpdateEnterpriseDomain(); |
| 220 | 220 |
| 221 // Overridden from CloudPolicyStore::Observer | 221 // Overridden from CloudPolicyStore::Observer |
| 222 virtual void OnStoreLoaded(policy::CloudPolicyStore* store) OVERRIDE; | 222 virtual void OnStoreLoaded(policy::CloudPolicyStore* store) override; |
| 223 virtual void OnStoreError(policy::CloudPolicyStore* store) OVERRIDE; | 223 virtual void OnStoreError(policy::CloudPolicyStore* store) override; |
| 224 | 224 |
| 225 // Overridden from ash::SessionStateObserver | 225 // Overridden from ash::SessionStateObserver |
| 226 virtual void UserAddedToSession(const std::string& user_id) OVERRIDE; | 226 virtual void UserAddedToSession(const std::string& user_id) override; |
| 227 | 227 |
| 228 // Overridden from chrome::BrowserListObserver: | 228 // Overridden from chrome::BrowserListObserver: |
| 229 virtual void OnBrowserRemoved(Browser* browser) OVERRIDE; | 229 virtual void OnBrowserRemoved(Browser* browser) override; |
| 230 | 230 |
| 231 // Overridden from extensions::AppWindowRegistry::Observer: | 231 // Overridden from extensions::AppWindowRegistry::Observer: |
| 232 virtual void OnAppWindowRemoved(extensions::AppWindow* app_window) OVERRIDE; | 232 virtual void OnAppWindowRemoved(extensions::AppWindow* app_window) override; |
| 233 | 233 |
| 234 void OnAccessibilityStatusChanged( | 234 void OnAccessibilityStatusChanged( |
| 235 const AccessibilityStatusEventDetails& details); | 235 const AccessibilityStatusEventDetails& details); |
| 236 | 236 |
| 237 scoped_ptr<content::NotificationRegistrar> registrar_; | 237 scoped_ptr<content::NotificationRegistrar> registrar_; |
| 238 scoped_ptr<PrefChangeRegistrar> local_state_registrar_; | 238 scoped_ptr<PrefChangeRegistrar> local_state_registrar_; |
| 239 scoped_ptr<PrefChangeRegistrar> user_pref_registrar_; | 239 scoped_ptr<PrefChangeRegistrar> user_pref_registrar_; |
| 240 Profile* user_profile_; | 240 Profile* user_profile_; |
| 241 base::HourClockType clock_type_; | 241 base::HourClockType clock_type_; |
| 242 int search_key_mapped_to_; | 242 int search_key_mapped_to_; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 258 | 258 |
| 259 base::WeakPtrFactory<SystemTrayDelegateChromeOS> weak_ptr_factory_; | 259 base::WeakPtrFactory<SystemTrayDelegateChromeOS> weak_ptr_factory_; |
| 260 | 260 |
| 261 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateChromeOS); | 261 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateChromeOS); |
| 262 }; | 262 }; |
| 263 | 263 |
| 264 ash::SystemTrayDelegate* CreateSystemTrayDelegate(); | 264 ash::SystemTrayDelegate* CreateSystemTrayDelegate(); |
| 265 | 265 |
| 266 } // namespace chromeos | 266 } // namespace chromeos |
| 267 #endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_ | 267 #endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_ |
| OLD | NEW |