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

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

Issue 2493973003: Display "Restart to update" dialog to Chrome OS users. (Closed)
Patch Set: Rebased CL 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;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 ash::CustodianInfoTrayObserver* observer) override; 120 ash::CustodianInfoTrayObserver* observer) override;
117 std::unique_ptr<ash::SystemTrayItem> CreateRotationLockTrayItem( 121 std::unique_ptr<ash::SystemTrayItem> CreateRotationLockTrayItem(
118 ash::SystemTray* tray) override; 122 ash::SystemTray* tray) override;
119 123
120 // Overridden from user_manager::UserManager::UserSessionStateObserver: 124 // Overridden from user_manager::UserManager::UserSessionStateObserver:
121 void UserAddedToSession(const user_manager::User* active_user) override; 125 void UserAddedToSession(const user_manager::User* active_user) override;
122 void ActiveUserChanged(const user_manager::User* active_user) override; 126 void ActiveUserChanged(const user_manager::User* active_user) override;
123 127
124 void UserChangedChildStatus(user_manager::User* user) override; 128 void UserChangedChildStatus(user_manager::User* user) override;
125 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
126 private: 135 private:
127 ash::SystemTrayNotifier* GetSystemTrayNotifier(); 136 ash::SystemTrayNotifier* GetSystemTrayNotifier();
128 137
129 void SetProfile(Profile* profile); 138 void SetProfile(Profile* profile);
130 139
131 bool UnsetProfile(Profile* profile); 140 bool UnsetProfile(Profile* profile);
132 141
133 void UpdateShowLogoutButtonInTray(); 142 void UpdateShowLogoutButtonInTray();
134 143
135 void UpdateLogoutDialogDuration(); 144 void UpdateLogoutDialogDuration();
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 Profile* user_profile_ = nullptr; 237 Profile* user_profile_ = nullptr;
229 int search_key_mapped_to_ = input_method::kSearchKey; 238 int search_key_mapped_to_ = input_method::kSearchKey;
230 bool have_session_start_time_ = false; 239 bool have_session_start_time_ = false;
231 base::TimeTicks session_start_time_; 240 base::TimeTicks session_start_time_;
232 bool have_session_length_limit_ = false; 241 bool have_session_length_limit_ = false;
233 base::TimeDelta session_length_limit_; 242 base::TimeDelta session_length_limit_;
234 std::string enterprise_domain_; 243 std::string enterprise_domain_;
235 std::string enterprise_realm_; 244 std::string enterprise_realm_;
236 bool should_run_bluetooth_discovery_ = false; 245 bool should_run_bluetooth_discovery_ = false;
237 bool session_started_ = false; 246 bool session_started_ = false;
247 bool flash_update_available_ = false;
238 248
239 scoped_refptr<device::BluetoothAdapter> bluetooth_adapter_; 249 scoped_refptr<device::BluetoothAdapter> bluetooth_adapter_;
240 std::unique_ptr<device::BluetoothDiscoverySession> 250 std::unique_ptr<device::BluetoothDiscoverySession>
241 bluetooth_discovery_session_; 251 bluetooth_discovery_session_;
242 std::unique_ptr<ash::NetworkingConfigDelegate> networking_config_delegate_; 252 std::unique_ptr<ash::NetworkingConfigDelegate> networking_config_delegate_;
243 std::unique_ptr<AccessibilityStatusSubscription> accessibility_subscription_; 253 std::unique_ptr<AccessibilityStatusSubscription> accessibility_subscription_;
244 254
245 base::ObserverList<ash::CustodianInfoTrayObserver> 255 base::ObserverList<ash::CustodianInfoTrayObserver>
246 custodian_info_changed_observers_; 256 custodian_info_changed_observers_;
247 257
248 base::WeakPtrFactory<SystemTrayDelegateChromeOS> weak_ptr_factory_; 258 base::WeakPtrFactory<SystemTrayDelegateChromeOS> weak_ptr_factory_;
249 259
250 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateChromeOS); 260 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateChromeOS);
251 }; 261 };
252 262
253 ash::SystemTrayDelegate* CreateSystemTrayDelegate(); 263 ash::SystemTrayDelegate* CreateSystemTrayDelegate();
254 264
255 } // namespace chromeos 265 } // namespace chromeos
256 266
257 #endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_ 267 #endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698