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

Side by Side Diff: chrome/browser/ui/ash/system_tray_delegate_chromeos.h

Issue 2568413002: Revert of ash: Use system tray mojo interface to show system update tray icon (Closed)
Patch Set: Created 4 years 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
OLDNEW
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
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
73 void InitializeOnAdapterReady( 77 void InitializeOnAdapterReady(
74 scoped_refptr<device::BluetoothAdapter> adapter); 78 scoped_refptr<device::BluetoothAdapter> adapter);
75 79
76 // Overridden from ash::SystemTrayDelegate: 80 // Overridden from ash::SystemTrayDelegate:
77 void Initialize() override; 81 void Initialize() override;
78 ash::LoginStatus GetUserLoginStatus() const override; 82 ash::LoginStatus GetUserLoginStatus() const override;
79 std::string GetEnterpriseDomain() const override; 83 std::string GetEnterpriseDomain() const override;
80 std::string GetEnterpriseRealm() const override; 84 std::string GetEnterpriseRealm() const override;
81 base::string16 GetEnterpriseMessage() const override; 85 base::string16 GetEnterpriseMessage() const override;
82 std::string GetSupervisedUserManager() const override; 86 std::string GetSupervisedUserManager() const override;
83 base::string16 GetSupervisedUserManagerName() const override; 87 base::string16 GetSupervisedUserManagerName() const override;
84 base::string16 GetSupervisedUserMessage() const override; 88 base::string16 GetSupervisedUserMessage() const override;
85 bool IsUserSupervised() const override; 89 bool IsUserSupervised() const override;
86 bool IsUserChild() const override; 90 bool IsUserChild() const override;
91 void GetSystemUpdateInfo(ash::UpdateInfo* info) const override;
87 bool ShouldShowSettings() const override; 92 bool ShouldShowSettings() const override;
88 bool ShouldShowNotificationTray() const override; 93 bool ShouldShowNotificationTray() const override;
89 void ShowEnterpriseInfo() override; 94 void ShowEnterpriseInfo() override;
90 void ShowUserLogin() override; 95 void ShowUserLogin() override;
91 void GetAvailableBluetoothDevices(ash::BluetoothDeviceList* list) override; 96 void GetAvailableBluetoothDevices(ash::BluetoothDeviceList* list) override;
92 void BluetoothStartDiscovering() override; 97 void BluetoothStartDiscovering() override;
93 void BluetoothStopDiscovering() override; 98 void BluetoothStopDiscovering() override;
94 void ConnectToBluetoothDevice(const std::string& address) override; 99 void ConnectToBluetoothDevice(const std::string& address) override;
95 bool IsBluetoothDiscovering() const override; 100 bool IsBluetoothDiscovering() const override;
96 void GetCurrentIME(ash::IMEInfo* info) override; 101 void GetCurrentIME(ash::IMEInfo* info) override;
(...skipping 18 matching lines...) Expand all
115 ash::CustodianInfoTrayObserver* observer) override; 120 ash::CustodianInfoTrayObserver* observer) override;
116 std::unique_ptr<ash::SystemTrayItem> CreateRotationLockTrayItem( 121 std::unique_ptr<ash::SystemTrayItem> CreateRotationLockTrayItem(
117 ash::SystemTray* tray) override; 122 ash::SystemTray* tray) override;
118 123
119 // Overridden from user_manager::UserManager::UserSessionStateObserver: 124 // Overridden from user_manager::UserManager::UserSessionStateObserver:
120 void UserAddedToSession(const user_manager::User* active_user) override; 125 void UserAddedToSession(const user_manager::User* active_user) override;
121 void ActiveUserChanged(const user_manager::User* active_user) override; 126 void ActiveUserChanged(const user_manager::User* active_user) override;
122 127
123 void UserChangedChildStatus(user_manager::User* user) override; 128 void UserChangedChildStatus(user_manager::User* user) override;
124 129
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
125 private: 135 private:
126 ash::SystemTrayNotifier* GetSystemTrayNotifier(); 136 ash::SystemTrayNotifier* GetSystemTrayNotifier();
127 137
128 void SetProfile(Profile* profile); 138 void SetProfile(Profile* profile);
129 139
130 bool UnsetProfile(Profile* profile); 140 bool UnsetProfile(Profile* profile);
131 141
132 void UpdateShowLogoutButtonInTray(); 142 void UpdateShowLogoutButtonInTray();
133 143
134 void UpdateLogoutDialogDuration(); 144 void UpdateLogoutDialogDuration();
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 Profile* user_profile_ = nullptr; 237 Profile* user_profile_ = nullptr;
228 int search_key_mapped_to_ = input_method::kSearchKey; 238 int search_key_mapped_to_ = input_method::kSearchKey;
229 bool have_session_start_time_ = false; 239 bool have_session_start_time_ = false;
230 base::TimeTicks session_start_time_; 240 base::TimeTicks session_start_time_;
231 bool have_session_length_limit_ = false; 241 bool have_session_length_limit_ = false;
232 base::TimeDelta session_length_limit_; 242 base::TimeDelta session_length_limit_;
233 std::string enterprise_domain_; 243 std::string enterprise_domain_;
234 std::string enterprise_realm_; 244 std::string enterprise_realm_;
235 bool should_run_bluetooth_discovery_ = false; 245 bool should_run_bluetooth_discovery_ = false;
236 bool session_started_ = false; 246 bool session_started_ = false;
247 bool flash_update_available_ = false;
237 248
238 scoped_refptr<device::BluetoothAdapter> bluetooth_adapter_; 249 scoped_refptr<device::BluetoothAdapter> bluetooth_adapter_;
239 std::unique_ptr<device::BluetoothDiscoverySession> 250 std::unique_ptr<device::BluetoothDiscoverySession>
240 bluetooth_discovery_session_; 251 bluetooth_discovery_session_;
241 std::unique_ptr<ash::NetworkingConfigDelegate> networking_config_delegate_; 252 std::unique_ptr<ash::NetworkingConfigDelegate> networking_config_delegate_;
242 std::unique_ptr<AccessibilityStatusSubscription> accessibility_subscription_; 253 std::unique_ptr<AccessibilityStatusSubscription> accessibility_subscription_;
243 254
244 base::ObserverList<ash::CustodianInfoTrayObserver> 255 base::ObserverList<ash::CustodianInfoTrayObserver>
245 custodian_info_changed_observers_; 256 custodian_info_changed_observers_;
246 257
247 base::WeakPtrFactory<SystemTrayDelegateChromeOS> weak_ptr_factory_; 258 base::WeakPtrFactory<SystemTrayDelegateChromeOS> weak_ptr_factory_;
248 259
249 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateChromeOS); 260 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateChromeOS);
250 }; 261 };
251 262
252 ash::SystemTrayDelegate* CreateSystemTrayDelegate(); 263 ash::SystemTrayDelegate* CreateSystemTrayDelegate();
253 264
254 } // namespace chromeos 265 } // namespace chromeos
255 266
256 #endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_ 267 #endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/system_tray_client_browsertest.cc ('k') | chrome/browser/ui/ash/system_tray_delegate_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698