| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 public chrome::BrowserListObserver, | 63 public chrome::BrowserListObserver, |
| 64 public extensions::AppWindowRegistry::Observer, | 64 public extensions::AppWindowRegistry::Observer, |
| 65 public user_manager::UserManager::UserSessionStateObserver, | 65 public user_manager::UserManager::UserSessionStateObserver, |
| 66 public SupervisedUserServiceObserver, | 66 public SupervisedUserServiceObserver, |
| 67 public input_method::InputMethodManager::ImeMenuObserver { | 67 public input_method::InputMethodManager::ImeMenuObserver { |
| 68 public: | 68 public: |
| 69 SystemTrayDelegateChromeOS(); | 69 SystemTrayDelegateChromeOS(); |
| 70 | 70 |
| 71 ~SystemTrayDelegateChromeOS() override; | 71 ~SystemTrayDelegateChromeOS() override; |
| 72 | 72 |
| 73 // Access a global pointer to the single instance of the | |
| 74 // SystemTrayDelegateChromeOS class. | |
| 75 static SystemTrayDelegateChromeOS* instance(); | |
| 76 | |
| 77 void InitializeOnAdapterReady( | 73 void InitializeOnAdapterReady( |
| 78 scoped_refptr<device::BluetoothAdapter> adapter); | 74 scoped_refptr<device::BluetoothAdapter> adapter); |
| 79 | 75 |
| 80 // Overridden from ash::SystemTrayDelegate: | 76 // Overridden from ash::SystemTrayDelegate: |
| 81 void Initialize() override; | 77 void Initialize() override; |
| 82 ash::LoginStatus GetUserLoginStatus() const override; | 78 ash::LoginStatus GetUserLoginStatus() const override; |
| 83 std::string GetEnterpriseDomain() const override; | 79 std::string GetEnterpriseDomain() const override; |
| 84 std::string GetEnterpriseRealm() const override; | 80 std::string GetEnterpriseRealm() const override; |
| 85 base::string16 GetEnterpriseMessage() const override; | 81 base::string16 GetEnterpriseMessage() const override; |
| 86 std::string GetSupervisedUserManager() const override; | 82 std::string GetSupervisedUserManager() const override; |
| 87 base::string16 GetSupervisedUserManagerName() const override; | 83 base::string16 GetSupervisedUserManagerName() const override; |
| 88 base::string16 GetSupervisedUserMessage() const override; | 84 base::string16 GetSupervisedUserMessage() const override; |
| 89 bool IsUserSupervised() const override; | 85 bool IsUserSupervised() const override; |
| 90 bool IsUserChild() const override; | 86 bool IsUserChild() const override; |
| 91 void GetSystemUpdateInfo(ash::UpdateInfo* info) const override; | |
| 92 bool ShouldShowSettings() const override; | 87 bool ShouldShowSettings() const override; |
| 93 bool ShouldShowNotificationTray() const override; | 88 bool ShouldShowNotificationTray() const override; |
| 94 void ShowEnterpriseInfo() override; | 89 void ShowEnterpriseInfo() override; |
| 95 void ShowUserLogin() override; | 90 void ShowUserLogin() override; |
| 96 void GetAvailableBluetoothDevices(ash::BluetoothDeviceList* list) override; | 91 void GetAvailableBluetoothDevices(ash::BluetoothDeviceList* list) override; |
| 97 void BluetoothStartDiscovering() override; | 92 void BluetoothStartDiscovering() override; |
| 98 void BluetoothStopDiscovering() override; | 93 void BluetoothStopDiscovering() override; |
| 99 void ConnectToBluetoothDevice(const std::string& address) override; | 94 void ConnectToBluetoothDevice(const std::string& address) override; |
| 100 bool IsBluetoothDiscovering() const override; | 95 bool IsBluetoothDiscovering() const override; |
| 101 void GetCurrentIME(ash::IMEInfo* info) override; | 96 void GetCurrentIME(ash::IMEInfo* info) override; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 120 ash::CustodianInfoTrayObserver* observer) override; | 115 ash::CustodianInfoTrayObserver* observer) override; |
| 121 std::unique_ptr<ash::SystemTrayItem> CreateRotationLockTrayItem( | 116 std::unique_ptr<ash::SystemTrayItem> CreateRotationLockTrayItem( |
| 122 ash::SystemTray* tray) override; | 117 ash::SystemTray* tray) override; |
| 123 | 118 |
| 124 // Overridden from user_manager::UserManager::UserSessionStateObserver: | 119 // Overridden from user_manager::UserManager::UserSessionStateObserver: |
| 125 void UserAddedToSession(const user_manager::User* active_user) override; | 120 void UserAddedToSession(const user_manager::User* active_user) override; |
| 126 void ActiveUserChanged(const user_manager::User* active_user) override; | 121 void ActiveUserChanged(const user_manager::User* active_user) override; |
| 127 | 122 |
| 128 void UserChangedChildStatus(user_manager::User* user) override; | 123 void UserChangedChildStatus(user_manager::User* user) override; |
| 129 | 124 |
| 130 // This notifies the system that a flash update is now available, and so the | |
| 131 // user should reboot. | |
| 132 void SetFlashUpdateAvailable(); | |
| 133 bool GetFlashUpdateAvailable(); | |
| 134 | |
| 135 private: | 125 private: |
| 136 ash::SystemTrayNotifier* GetSystemTrayNotifier(); | 126 ash::SystemTrayNotifier* GetSystemTrayNotifier(); |
| 137 | 127 |
| 138 void SetProfile(Profile* profile); | 128 void SetProfile(Profile* profile); |
| 139 | 129 |
| 140 bool UnsetProfile(Profile* profile); | 130 bool UnsetProfile(Profile* profile); |
| 141 | 131 |
| 142 void UpdateShowLogoutButtonInTray(); | 132 void UpdateShowLogoutButtonInTray(); |
| 143 | 133 |
| 144 void UpdateLogoutDialogDuration(); | 134 void UpdateLogoutDialogDuration(); |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 Profile* user_profile_ = nullptr; | 227 Profile* user_profile_ = nullptr; |
| 238 int search_key_mapped_to_ = input_method::kSearchKey; | 228 int search_key_mapped_to_ = input_method::kSearchKey; |
| 239 bool have_session_start_time_ = false; | 229 bool have_session_start_time_ = false; |
| 240 base::TimeTicks session_start_time_; | 230 base::TimeTicks session_start_time_; |
| 241 bool have_session_length_limit_ = false; | 231 bool have_session_length_limit_ = false; |
| 242 base::TimeDelta session_length_limit_; | 232 base::TimeDelta session_length_limit_; |
| 243 std::string enterprise_domain_; | 233 std::string enterprise_domain_; |
| 244 std::string enterprise_realm_; | 234 std::string enterprise_realm_; |
| 245 bool should_run_bluetooth_discovery_ = false; | 235 bool should_run_bluetooth_discovery_ = false; |
| 246 bool session_started_ = false; | 236 bool session_started_ = false; |
| 247 bool flash_update_available_ = false; | |
| 248 | 237 |
| 249 scoped_refptr<device::BluetoothAdapter> bluetooth_adapter_; | 238 scoped_refptr<device::BluetoothAdapter> bluetooth_adapter_; |
| 250 std::unique_ptr<device::BluetoothDiscoverySession> | 239 std::unique_ptr<device::BluetoothDiscoverySession> |
| 251 bluetooth_discovery_session_; | 240 bluetooth_discovery_session_; |
| 252 std::unique_ptr<ash::NetworkingConfigDelegate> networking_config_delegate_; | 241 std::unique_ptr<ash::NetworkingConfigDelegate> networking_config_delegate_; |
| 253 std::unique_ptr<AccessibilityStatusSubscription> accessibility_subscription_; | 242 std::unique_ptr<AccessibilityStatusSubscription> accessibility_subscription_; |
| 254 | 243 |
| 255 base::ObserverList<ash::CustodianInfoTrayObserver> | 244 base::ObserverList<ash::CustodianInfoTrayObserver> |
| 256 custodian_info_changed_observers_; | 245 custodian_info_changed_observers_; |
| 257 | 246 |
| 258 base::WeakPtrFactory<SystemTrayDelegateChromeOS> weak_ptr_factory_; | 247 base::WeakPtrFactory<SystemTrayDelegateChromeOS> weak_ptr_factory_; |
| 259 | 248 |
| 260 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateChromeOS); | 249 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateChromeOS); |
| 261 }; | 250 }; |
| 262 | 251 |
| 263 ash::SystemTrayDelegate* CreateSystemTrayDelegate(); | 252 ash::SystemTrayDelegate* CreateSystemTrayDelegate(); |
| 264 | 253 |
| 265 } // namespace chromeos | 254 } // namespace chromeos |
| 266 | 255 |
| 267 #endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_ | 256 #endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_ |
| OLD | NEW |