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

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

Issue 637533002: Added calls for deferred supervised user status change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Lost method added. Created 6 years, 2 months 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
« no previous file with comments | « no previous file | chrome/browser/ui/ash/system_tray_delegate_chromeos.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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"
11 #include "ash/system/tray/system_tray_delegate.h" 11 #include "ash/system/tray/system_tray_delegate.h"
12 #include "ash/system/tray/system_tray_notifier.h" 12 #include "ash/system/tray/system_tray_notifier.h"
13 #include "base/callback_list.h" 13 #include "base/callback_list.h"
14 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
15 #include "base/containers/scoped_ptr_hash_map.h" 15 #include "base/containers/scoped_ptr_hash_map.h"
16 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
17 #include "base/memory/weak_ptr.h" 17 #include "base/memory/weak_ptr.h"
18 #include "base/prefs/pref_change_registrar.h" 18 #include "base/prefs/pref_change_registrar.h"
19 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 19 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
20 #include "chrome/browser/profiles/profile.h" 20 #include "chrome/browser/profiles/profile.h"
21 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" 21 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h"
22 #include "chrome/browser/ui/browser_list_observer.h" 22 #include "chrome/browser/ui/browser_list_observer.h"
23 #include "chromeos/audio/cras_audio_handler.h" 23 #include "chromeos/audio/cras_audio_handler.h"
24 #include "chromeos/dbus/session_manager_client.h" 24 #include "chromeos/dbus/session_manager_client.h"
25 #include "chromeos/ime/input_method_manager.h" 25 #include "chromeos/ime/input_method_manager.h"
26 #include "chromeos/login/login_state.h" 26 #include "chromeos/login/login_state.h"
27 #include "components/policy/core/common/cloud/cloud_policy_store.h" 27 #include "components/policy/core/common/cloud/cloud_policy_store.h"
28 #include "components/user_manager/user_manager.h"
28 #include "content/public/browser/notification_observer.h" 29 #include "content/public/browser/notification_observer.h"
29 #include "content/public/browser/notification_registrar.h" 30 #include "content/public/browser/notification_registrar.h"
30 #include "device/bluetooth/bluetooth_adapter.h" 31 #include "device/bluetooth/bluetooth_adapter.h"
31 #include "device/bluetooth/bluetooth_discovery_session.h" 32 #include "device/bluetooth/bluetooth_discovery_session.h"
32 #include "extensions/browser/app_window/app_window_registry.h" 33 #include "extensions/browser/app_window/app_window_registry.h"
33 34
35 namespace user_manager {
36 class User;
37 }
38
34 namespace chromeos { 39 namespace chromeos {
35 40
36 class SystemTrayDelegateChromeOS 41 class SystemTrayDelegateChromeOS
37 : public ash::ime::InputMethodMenuManager::Observer, 42 : public ash::ime::InputMethodMenuManager::Observer,
38 public ash::SystemTrayDelegate, 43 public ash::SystemTrayDelegate,
39 public SessionManagerClient::Observer, 44 public SessionManagerClient::Observer,
40 public content::NotificationObserver, 45 public content::NotificationObserver,
41 public input_method::InputMethodManager::Observer, 46 public input_method::InputMethodManager::Observer,
42 public chromeos::LoginState::Observer, 47 public chromeos::LoginState::Observer,
43 public chromeos::CrasAudioHandler::AudioObserver, 48 public chromeos::CrasAudioHandler::AudioObserver,
44 public device::BluetoothAdapter::Observer, 49 public device::BluetoothAdapter::Observer,
45 public policy::CloudPolicyStore::Observer, 50 public policy::CloudPolicyStore::Observer,
46 public ash::SessionStateObserver, 51 public ash::SessionStateObserver,
47 public chrome::BrowserListObserver, 52 public chrome::BrowserListObserver,
48 public extensions::AppWindowRegistry::Observer { 53 public extensions::AppWindowRegistry::Observer,
54 public user_manager::UserManager::UserSessionStateObserver {
49 public: 55 public:
50 SystemTrayDelegateChromeOS(); 56 SystemTrayDelegateChromeOS();
51 57
52 virtual ~SystemTrayDelegateChromeOS(); 58 virtual ~SystemTrayDelegateChromeOS();
53 59
54 void InitializeOnAdapterReady( 60 void InitializeOnAdapterReady(
55 scoped_refptr<device::BluetoothAdapter> adapter); 61 scoped_refptr<device::BluetoothAdapter> adapter);
56 62
57 // Overridden from ash::SystemTrayDelegate: 63 // Overridden from ash::SystemTrayDelegate:
58 virtual void Initialize() override; 64 virtual void Initialize() override;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 virtual bool GetSessionStartTime(base::TimeTicks* session_start_time) 126 virtual bool GetSessionStartTime(base::TimeTicks* session_start_time)
121 override; 127 override;
122 virtual bool GetSessionLengthLimit(base::TimeDelta* session_length_limit) 128 virtual bool GetSessionLengthLimit(base::TimeDelta* session_length_limit)
123 override; 129 override;
124 virtual int GetSystemTrayMenuWidth() override; 130 virtual int GetSystemTrayMenuWidth() override;
125 virtual void ActiveUserWasChanged() override; 131 virtual void ActiveUserWasChanged() override;
126 virtual bool IsSearchKeyMappedToCapsLock() override; 132 virtual bool IsSearchKeyMappedToCapsLock() override;
127 virtual ash::tray::UserAccountsDelegate* GetUserAccountsDelegate( 133 virtual ash::tray::UserAccountsDelegate* GetUserAccountsDelegate(
128 const std::string& user_id) override; 134 const std::string& user_id) override;
129 135
136 // Overridden from user_manager::UserManager::UserSessionStateObserver:
137 virtual void UserAddedToSession(const user_manager::User* active_user)
138 override;
139
140 virtual void UserChangedSupervisedStatus(
141 user_manager::User* user) override;
142
130 // browser tests need to call ShouldUse24HourClock(). 143 // browser tests need to call ShouldUse24HourClock().
131 bool GetShouldUse24HourClockForTesting() const; 144 bool GetShouldUse24HourClockForTesting() const;
132 145
133 private: 146 private:
134 // Should be the same as CrosSettings::ObserverSubscription. 147 // Should be the same as CrosSettings::ObserverSubscription.
135 typedef base::CallbackList<void(void)>::Subscription 148 typedef base::CallbackList<void(void)>::Subscription
136 CrosSettingsObserverSubscription; 149 CrosSettingsObserverSubscription;
137 150
138 ash::SystemTray* GetPrimarySystemTray(); 151 ash::SystemTray* GetPrimarySystemTray();
139 152
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 Profile* user_profile_; 253 Profile* user_profile_;
241 base::HourClockType clock_type_; 254 base::HourClockType clock_type_;
242 int search_key_mapped_to_; 255 int search_key_mapped_to_;
243 bool screen_locked_; 256 bool screen_locked_;
244 bool have_session_start_time_; 257 bool have_session_start_time_;
245 base::TimeTicks session_start_time_; 258 base::TimeTicks session_start_time_;
246 bool have_session_length_limit_; 259 bool have_session_length_limit_;
247 base::TimeDelta session_length_limit_; 260 base::TimeDelta session_length_limit_;
248 std::string enterprise_domain_; 261 std::string enterprise_domain_;
249 bool should_run_bluetooth_discovery_; 262 bool should_run_bluetooth_discovery_;
263 bool session_started_;
250 264
251 scoped_refptr<device::BluetoothAdapter> bluetooth_adapter_; 265 scoped_refptr<device::BluetoothAdapter> bluetooth_adapter_;
252 scoped_ptr<device::BluetoothDiscoverySession> bluetooth_discovery_session_; 266 scoped_ptr<device::BluetoothDiscoverySession> bluetooth_discovery_session_;
253 scoped_ptr<ash::VolumeControlDelegate> volume_control_delegate_; 267 scoped_ptr<ash::VolumeControlDelegate> volume_control_delegate_;
254 scoped_ptr<CrosSettingsObserverSubscription> device_settings_observer_; 268 scoped_ptr<CrosSettingsObserverSubscription> device_settings_observer_;
255 scoped_ptr<AccessibilityStatusSubscription> accessibility_subscription_; 269 scoped_ptr<AccessibilityStatusSubscription> accessibility_subscription_;
256 base::ScopedPtrHashMap<std::string, ash::tray::UserAccountsDelegate> 270 base::ScopedPtrHashMap<std::string, ash::tray::UserAccountsDelegate>
257 accounts_delegates_; 271 accounts_delegates_;
258 272
259 base::WeakPtrFactory<SystemTrayDelegateChromeOS> weak_ptr_factory_; 273 base::WeakPtrFactory<SystemTrayDelegateChromeOS> weak_ptr_factory_;
260 274
261 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateChromeOS); 275 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateChromeOS);
262 }; 276 };
263 277
264 ash::SystemTrayDelegate* CreateSystemTrayDelegate(); 278 ash::SystemTrayDelegate* CreateSystemTrayDelegate();
265 279
266 } // namespace chromeos 280 } // namespace chromeos
267 #endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_ 281 #endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/ash/system_tray_delegate_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698