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

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

Issue 410333005: Remove the drive status from the ash try. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix windows build. Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « ash/system/user/tray_user.cc ('k') | 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 "apps/app_window_registry.h" 8 #include "apps/app_window_registry.h"
9 #include "ash/ime/input_method_menu_manager.h" 9 #include "ash/ime/input_method_menu_manager.h"
10 #include "ash/session/session_state_observer.h" 10 #include "ash/session/session_state_observer.h"
11 #include "ash/system/tray/system_tray.h" 11 #include "ash/system/tray/system_tray.h"
12 #include "ash/system/tray/system_tray_delegate.h" 12 #include "ash/system/tray/system_tray_delegate.h"
13 #include "ash/system/tray/system_tray_notifier.h" 13 #include "ash/system/tray/system_tray_notifier.h"
14 #include "base/callback_list.h" 14 #include "base/callback_list.h"
15 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
16 #include "base/containers/scoped_ptr_hash_map.h" 16 #include "base/containers/scoped_ptr_hash_map.h"
17 #include "base/memory/ref_counted.h" 17 #include "base/memory/ref_counted.h"
18 #include "base/memory/weak_ptr.h" 18 #include "base/memory/weak_ptr.h"
19 #include "base/prefs/pref_change_registrar.h" 19 #include "base/prefs/pref_change_registrar.h"
20 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 20 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
21 #include "chrome/browser/chromeos/drive/drive_integration_service.h"
22 #include "chrome/browser/chromeos/drive/job_list.h"
23 #include "chrome/browser/profiles/profile.h" 21 #include "chrome/browser/profiles/profile.h"
24 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" 22 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h"
25 #include "chrome/browser/ui/browser_list_observer.h" 23 #include "chrome/browser/ui/browser_list_observer.h"
26 #include "chromeos/audio/cras_audio_handler.h" 24 #include "chromeos/audio/cras_audio_handler.h"
27 #include "chromeos/dbus/session_manager_client.h" 25 #include "chromeos/dbus/session_manager_client.h"
28 #include "chromeos/ime/input_method_manager.h" 26 #include "chromeos/ime/input_method_manager.h"
29 #include "chromeos/login/login_state.h" 27 #include "chromeos/login/login_state.h"
30 #include "components/policy/core/common/cloud/cloud_policy_store.h" 28 #include "components/policy/core/common/cloud/cloud_policy_store.h"
31 #include "content/public/browser/notification_observer.h" 29 #include "content/public/browser/notification_observer.h"
32 #include "content/public/browser/notification_registrar.h" 30 #include "content/public/browser/notification_registrar.h"
33 #include "device/bluetooth/bluetooth_adapter.h" 31 #include "device/bluetooth/bluetooth_adapter.h"
34 #include "device/bluetooth/bluetooth_discovery_session.h" 32 #include "device/bluetooth/bluetooth_discovery_session.h"
35 33
36 namespace chromeos { 34 namespace chromeos {
37 35
38 class SystemTrayDelegateChromeOS 36 class SystemTrayDelegateChromeOS
39 : public ash::ime::InputMethodMenuManager::Observer, 37 : public ash::ime::InputMethodMenuManager::Observer,
40 public ash::SystemTrayDelegate, 38 public ash::SystemTrayDelegate,
41 public SessionManagerClient::Observer, 39 public SessionManagerClient::Observer,
42 public drive::JobListObserver,
43 public content::NotificationObserver, 40 public content::NotificationObserver,
44 public input_method::InputMethodManager::Observer, 41 public input_method::InputMethodManager::Observer,
45 public chromeos::LoginState::Observer, 42 public chromeos::LoginState::Observer,
46 public chromeos::CrasAudioHandler::AudioObserver, 43 public chromeos::CrasAudioHandler::AudioObserver,
47 public device::BluetoothAdapter::Observer, 44 public device::BluetoothAdapter::Observer,
48 public policy::CloudPolicyStore::Observer, 45 public policy::CloudPolicyStore::Observer,
49 public ash::SessionStateObserver, 46 public ash::SessionStateObserver,
50 public chrome::BrowserListObserver, 47 public chrome::BrowserListObserver,
51 public apps::AppWindowRegistry::Observer { 48 public apps::AppWindowRegistry::Observer {
52 public: 49 public:
(...skipping 19 matching lines...) Expand all
72 virtual base::HourClockType GetHourClockType() const OVERRIDE; 69 virtual base::HourClockType GetHourClockType() const OVERRIDE;
73 virtual void ShowSettings() OVERRIDE; 70 virtual void ShowSettings() OVERRIDE;
74 virtual bool ShouldShowSettings() OVERRIDE; 71 virtual bool ShouldShowSettings() OVERRIDE;
75 virtual void ShowDateSettings() OVERRIDE; 72 virtual void ShowDateSettings() OVERRIDE;
76 virtual void ShowSetTimeDialog() OVERRIDE; 73 virtual void ShowSetTimeDialog() OVERRIDE;
77 virtual void ShowNetworkSettings(const std::string& service_path) OVERRIDE; 74 virtual void ShowNetworkSettings(const std::string& service_path) OVERRIDE;
78 virtual void ShowBluetoothSettings() OVERRIDE; 75 virtual void ShowBluetoothSettings() OVERRIDE;
79 virtual void ShowDisplaySettings() OVERRIDE; 76 virtual void ShowDisplaySettings() OVERRIDE;
80 virtual void ShowChromeSlow() OVERRIDE; 77 virtual void ShowChromeSlow() OVERRIDE;
81 virtual bool ShouldShowDisplayNotification() OVERRIDE; 78 virtual bool ShouldShowDisplayNotification() OVERRIDE;
82 virtual void ShowDriveSettings() OVERRIDE;
83 virtual void ShowIMESettings() OVERRIDE; 79 virtual void ShowIMESettings() OVERRIDE;
84 virtual void ShowHelp() OVERRIDE; 80 virtual void ShowHelp() OVERRIDE;
85 virtual void ShowAccessibilityHelp() OVERRIDE; 81 virtual void ShowAccessibilityHelp() OVERRIDE;
86 virtual void ShowAccessibilitySettings() OVERRIDE; 82 virtual void ShowAccessibilitySettings() OVERRIDE;
87 virtual void ShowPublicAccountInfo() OVERRIDE; 83 virtual void ShowPublicAccountInfo() OVERRIDE;
88 virtual void ShowSupervisedUserInfo() OVERRIDE; 84 virtual void ShowSupervisedUserInfo() OVERRIDE;
89 virtual void ShowEnterpriseInfo() OVERRIDE; 85 virtual void ShowEnterpriseInfo() OVERRIDE;
90 virtual void ShowUserLogin() OVERRIDE; 86 virtual void ShowUserLogin() OVERRIDE;
91 virtual bool ShowSpringChargerReplacementDialog() OVERRIDE; 87 virtual bool ShowSpringChargerReplacementDialog() OVERRIDE;
92 virtual bool IsSpringChargerReplacementDialogVisible() OVERRIDE; 88 virtual bool IsSpringChargerReplacementDialogVisible() OVERRIDE;
93 virtual bool HasUserConfirmedSafeSpringCharger() OVERRIDE; 89 virtual bool HasUserConfirmedSafeSpringCharger() OVERRIDE;
94 virtual void ShutDown() OVERRIDE; 90 virtual void ShutDown() OVERRIDE;
95 virtual void SignOut() OVERRIDE; 91 virtual void SignOut() OVERRIDE;
96 virtual void RequestLockScreen() OVERRIDE; 92 virtual void RequestLockScreen() OVERRIDE;
97 virtual void RequestRestartForUpdate() OVERRIDE; 93 virtual void RequestRestartForUpdate() OVERRIDE;
98 virtual void GetAvailableBluetoothDevices(ash::BluetoothDeviceList* list) 94 virtual void GetAvailableBluetoothDevices(ash::BluetoothDeviceList* list)
99 OVERRIDE; 95 OVERRIDE;
100 virtual void BluetoothStartDiscovering() OVERRIDE; 96 virtual void BluetoothStartDiscovering() OVERRIDE;
101 virtual void BluetoothStopDiscovering() OVERRIDE; 97 virtual void BluetoothStopDiscovering() OVERRIDE;
102 virtual void ConnectToBluetoothDevice(const std::string& address) OVERRIDE; 98 virtual void ConnectToBluetoothDevice(const std::string& address) OVERRIDE;
103 virtual bool IsBluetoothDiscovering() OVERRIDE; 99 virtual bool IsBluetoothDiscovering() OVERRIDE;
104 virtual void GetCurrentIME(ash::IMEInfo* info) OVERRIDE; 100 virtual void GetCurrentIME(ash::IMEInfo* info) OVERRIDE;
105 virtual void GetAvailableIMEList(ash::IMEInfoList* list) OVERRIDE; 101 virtual void GetAvailableIMEList(ash::IMEInfoList* list) OVERRIDE;
106 virtual void GetCurrentIMEProperties(ash::IMEPropertyInfoList* list) OVERRIDE; 102 virtual void GetCurrentIMEProperties(ash::IMEPropertyInfoList* list) OVERRIDE;
107 virtual void SwitchIME(const std::string& ime_id) OVERRIDE; 103 virtual void SwitchIME(const std::string& ime_id) OVERRIDE;
108 virtual void ActivateIMEProperty(const std::string& key) OVERRIDE; 104 virtual void ActivateIMEProperty(const std::string& key) OVERRIDE;
109 virtual void CancelDriveOperation(int32 operation_id) OVERRIDE;
110 virtual void GetDriveOperationStatusList(ash::DriveOperationStatusList* list)
111 OVERRIDE;
112 virtual void ShowNetworkConfigure(const std::string& network_id, 105 virtual void ShowNetworkConfigure(const std::string& network_id,
113 gfx::NativeWindow parent_window) OVERRIDE; 106 gfx::NativeWindow parent_window) OVERRIDE;
114 virtual bool EnrollNetwork(const std::string& network_id, 107 virtual bool EnrollNetwork(const std::string& network_id,
115 gfx::NativeWindow parent_window) OVERRIDE; 108 gfx::NativeWindow parent_window) OVERRIDE;
116 virtual void ManageBluetoothDevices() OVERRIDE; 109 virtual void ManageBluetoothDevices() OVERRIDE;
117 virtual void ToggleBluetooth() OVERRIDE; 110 virtual void ToggleBluetooth() OVERRIDE;
118 virtual void ShowMobileSimDialog() OVERRIDE; 111 virtual void ShowMobileSimDialog() OVERRIDE;
119 virtual void ShowMobileSetupDialog(const std::string& service_path) OVERRIDE; 112 virtual void ShowMobileSetupDialog(const std::string& service_path) OVERRIDE;
120 virtual void ShowOtherNetworkDialog(const std::string& type) OVERRIDE; 113 virtual void ShowOtherNetworkDialog(const std::string& type) OVERRIDE;
121 virtual bool GetBluetoothAvailable() OVERRIDE; 114 virtual bool GetBluetoothAvailable() OVERRIDE;
(...skipping 22 matching lines...) Expand all
144 CrosSettingsObserverSubscription; 137 CrosSettingsObserverSubscription;
145 138
146 ash::SystemTray* GetPrimarySystemTray(); 139 ash::SystemTray* GetPrimarySystemTray();
147 140
148 ash::SystemTrayNotifier* GetSystemTrayNotifier(); 141 ash::SystemTrayNotifier* GetSystemTrayNotifier();
149 142
150 void SetProfile(Profile* profile); 143 void SetProfile(Profile* profile);
151 144
152 bool UnsetProfile(Profile* profile); 145 bool UnsetProfile(Profile* profile);
153 146
154 void ObserveDriveUpdates();
155
156 void UnobserveDriveUpdates();
157
158 bool ShouldUse24HourClock() const; 147 bool ShouldUse24HourClock() const;
159 148
160 void UpdateClockType(); 149 void UpdateClockType();
161 150
162 void UpdateShowLogoutButtonInTray(); 151 void UpdateShowLogoutButtonInTray();
163 152
164 void UpdateLogoutDialogDuration(); 153 void UpdateLogoutDialogDuration();
165 154
166 void UpdateSessionStartTime(); 155 void UpdateSessionStartTime();
167 156
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 193
205 // Overridden from CrasAudioHandler::AudioObserver. 194 // Overridden from CrasAudioHandler::AudioObserver.
206 virtual void OnOutputVolumeChanged() OVERRIDE; 195 virtual void OnOutputVolumeChanged() OVERRIDE;
207 virtual void OnOutputMuteChanged() OVERRIDE; 196 virtual void OnOutputMuteChanged() OVERRIDE;
208 virtual void OnInputGainChanged() OVERRIDE; 197 virtual void OnInputGainChanged() OVERRIDE;
209 virtual void OnInputMuteChanged() OVERRIDE; 198 virtual void OnInputMuteChanged() OVERRIDE;
210 virtual void OnAudioNodesChanged() OVERRIDE; 199 virtual void OnAudioNodesChanged() OVERRIDE;
211 virtual void OnActiveOutputNodeChanged() OVERRIDE; 200 virtual void OnActiveOutputNodeChanged() OVERRIDE;
212 virtual void OnActiveInputNodeChanged() OVERRIDE; 201 virtual void OnActiveInputNodeChanged() OVERRIDE;
213 202
214 // drive::JobListObserver overrides.
215 virtual void OnJobAdded(const drive::JobInfo& job_info) OVERRIDE;
216
217 virtual void OnJobDone(const drive::JobInfo& job_info,
218 drive::FileError error) OVERRIDE;
219
220 virtual void OnJobUpdated(const drive::JobInfo& job_info) OVERRIDE;
221
222 drive::DriveIntegrationService* FindDriveIntegrationService();
223
224 // Overridden from BluetoothAdapter::Observer. 203 // Overridden from BluetoothAdapter::Observer.
225 virtual void AdapterPresentChanged(device::BluetoothAdapter* adapter, 204 virtual void AdapterPresentChanged(device::BluetoothAdapter* adapter,
226 bool present) OVERRIDE; 205 bool present) OVERRIDE;
227 virtual void AdapterPoweredChanged(device::BluetoothAdapter* adapter, 206 virtual void AdapterPoweredChanged(device::BluetoothAdapter* adapter,
228 bool powered) OVERRIDE; 207 bool powered) OVERRIDE;
229 virtual void AdapterDiscoveringChanged(device::BluetoothAdapter* adapter, 208 virtual void AdapterDiscoveringChanged(device::BluetoothAdapter* adapter,
230 bool discovering) OVERRIDE; 209 bool discovering) OVERRIDE;
231 virtual void DeviceAdded(device::BluetoothAdapter* adapter, 210 virtual void DeviceAdded(device::BluetoothAdapter* adapter,
232 device::BluetoothDevice* device) OVERRIDE; 211 device::BluetoothDevice* device) OVERRIDE;
233 virtual void DeviceChanged(device::BluetoothAdapter* adapter, 212 virtual void DeviceChanged(device::BluetoothAdapter* adapter,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 base::ScopedPtrHashMap<std::string, ash::tray::UserAccountsDelegate> 258 base::ScopedPtrHashMap<std::string, ash::tray::UserAccountsDelegate>
280 accounts_delegates_; 259 accounts_delegates_;
281 260
282 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateChromeOS); 261 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateChromeOS);
283 }; 262 };
284 263
285 ash::SystemTrayDelegate* CreateSystemTrayDelegate(); 264 ash::SystemTrayDelegate* CreateSystemTrayDelegate();
286 265
287 } // namespace chromeos 266 } // namespace chromeos
288 #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 | « ash/system/user/tray_user.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