Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_COMMON_H_ | |
| 6 #define CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_COMMON_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "ash/system/tray/system_tray_delegate.h" | |
| 11 #include "base/compiler_specific.h" | |
| 12 #include "base/i18n/time_formatting.h" | |
| 13 #include "base/macros.h" | |
| 14 #include "base/memory/scoped_ptr.h" | |
| 15 #include "content/public/browser/notification_observer.h" | |
| 16 #include "content/public/browser/notification_registrar.h" | |
| 17 | |
| 18 namespace ash { | |
| 19 class SystemTrayNotifier; | |
| 20 } | |
| 21 | |
| 22 // Common base class for platform-specific implementations. | |
| 23 class SystemTrayDelegateCommon : public ash::SystemTrayDelegate, | |
| 24 public content::NotificationObserver { | |
| 25 public: | |
| 26 SystemTrayDelegateCommon(); | |
| 27 | |
| 28 virtual ~SystemTrayDelegateCommon(); | |
| 29 | |
| 30 // Overridden from ash::SystemTrayDelegate: | |
| 31 virtual void Initialize() OVERRIDE; | |
| 32 | |
|
sky
2014/10/07 16:01:13
style guide says no newlines between these. And us
ygorshenin1
2014/10/07 16:18:09
Done.
| |
| 33 virtual void Shutdown() OVERRIDE; | |
| 34 | |
| 35 virtual bool GetTrayVisibilityOnStartup() OVERRIDE; | |
| 36 | |
| 37 virtual ash::user::LoginStatus GetUserLoginStatus() const OVERRIDE; | |
| 38 | |
| 39 virtual void ChangeProfilePicture() OVERRIDE; | |
| 40 | |
| 41 virtual const std::string GetEnterpriseDomain() const OVERRIDE; | |
| 42 | |
| 43 virtual const base::string16 GetEnterpriseMessage() const OVERRIDE; | |
| 44 | |
| 45 virtual const std::string GetSupervisedUserManager() const OVERRIDE; | |
| 46 | |
| 47 virtual const base::string16 GetSupervisedUserManagerName() const OVERRIDE; | |
| 48 | |
| 49 virtual const base::string16 GetSupervisedUserMessage() const OVERRIDE; | |
| 50 | |
| 51 virtual bool IsUserSupervised() const OVERRIDE; | |
| 52 | |
| 53 virtual void GetSystemUpdateInfo(ash::UpdateInfo* info) const OVERRIDE; | |
| 54 | |
| 55 virtual base::HourClockType GetHourClockType() const OVERRIDE; | |
| 56 | |
| 57 virtual void ShowSettings() OVERRIDE; | |
| 58 | |
| 59 virtual bool ShouldShowSettings() OVERRIDE; | |
| 60 | |
| 61 virtual void ShowDateSettings() OVERRIDE; | |
| 62 | |
| 63 virtual void ShowSetTimeDialog() OVERRIDE; | |
| 64 | |
| 65 virtual void ShowNetworkSettings(const std::string& service_path) OVERRIDE; | |
| 66 | |
| 67 virtual void ShowBluetoothSettings() OVERRIDE; | |
| 68 | |
| 69 virtual void ShowDisplaySettings() OVERRIDE; | |
| 70 | |
| 71 virtual void ShowChromeSlow() OVERRIDE; | |
| 72 | |
| 73 virtual bool ShouldShowDisplayNotification() OVERRIDE; | |
| 74 | |
| 75 virtual void ShowIMESettings() OVERRIDE; | |
| 76 | |
| 77 virtual void ShowHelp() OVERRIDE; | |
| 78 | |
| 79 virtual void ShowAccessibilityHelp() OVERRIDE; | |
| 80 | |
| 81 virtual void ShowAccessibilitySettings() OVERRIDE; | |
| 82 | |
| 83 virtual void ShowPublicAccountInfo() OVERRIDE; | |
| 84 | |
| 85 virtual void ShowSupervisedUserInfo() OVERRIDE; | |
| 86 | |
| 87 virtual void ShowEnterpriseInfo() OVERRIDE; | |
| 88 | |
| 89 virtual void ShowUserLogin() OVERRIDE; | |
| 90 | |
| 91 virtual bool ShowSpringChargerReplacementDialog() OVERRIDE; | |
| 92 | |
| 93 virtual bool IsSpringChargerReplacementDialogVisible() OVERRIDE; | |
| 94 | |
| 95 virtual bool HasUserConfirmedSafeSpringCharger() OVERRIDE; | |
| 96 | |
| 97 virtual void ShutDown() OVERRIDE; | |
| 98 | |
| 99 virtual void SignOut() OVERRIDE; | |
| 100 | |
| 101 virtual void RequestLockScreen() OVERRIDE; | |
| 102 | |
| 103 virtual void RequestRestartForUpdate() OVERRIDE; | |
| 104 | |
| 105 virtual void GetAvailableBluetoothDevices( | |
| 106 ash::BluetoothDeviceList* list) OVERRIDE; | |
| 107 | |
| 108 virtual void BluetoothStartDiscovering() OVERRIDE; | |
| 109 | |
| 110 virtual void BluetoothStopDiscovering() OVERRIDE; | |
| 111 | |
| 112 virtual void ConnectToBluetoothDevice(const std::string& address) OVERRIDE; | |
| 113 | |
| 114 virtual bool IsBluetoothDiscovering() OVERRIDE; | |
| 115 | |
| 116 virtual void GetCurrentIME(ash::IMEInfo* info) OVERRIDE; | |
| 117 | |
| 118 virtual void GetAvailableIMEList(ash::IMEInfoList* list) OVERRIDE; | |
| 119 | |
| 120 virtual void GetCurrentIMEProperties(ash::IMEPropertyInfoList* list) OVERRIDE; | |
| 121 | |
| 122 virtual void SwitchIME(const std::string& ime_id) OVERRIDE; | |
| 123 | |
| 124 virtual void ActivateIMEProperty(const std::string& key) OVERRIDE; | |
| 125 | |
| 126 virtual void ShowNetworkConfigure(const std::string& network_id) OVERRIDE; | |
| 127 | |
| 128 virtual bool EnrollNetwork(const std::string& network_id) OVERRIDE; | |
| 129 | |
| 130 virtual void ManageBluetoothDevices() OVERRIDE; | |
| 131 | |
| 132 virtual void ToggleBluetooth() OVERRIDE; | |
| 133 | |
| 134 virtual void ShowMobileSimDialog() OVERRIDE; | |
| 135 | |
| 136 virtual void ShowMobileSetupDialog(const std::string& service_path) OVERRIDE; | |
| 137 | |
| 138 virtual void ShowOtherNetworkDialog(const std::string& type) OVERRIDE; | |
| 139 | |
| 140 virtual bool GetBluetoothAvailable() OVERRIDE; | |
| 141 | |
| 142 virtual bool GetBluetoothEnabled() OVERRIDE; | |
| 143 | |
| 144 virtual bool GetBluetoothDiscovering() OVERRIDE; | |
| 145 | |
| 146 virtual void ChangeProxySettings() OVERRIDE; | |
| 147 | |
| 148 virtual ash::VolumeControlDelegate* GetVolumeControlDelegate() const OVERRIDE; | |
| 149 | |
| 150 virtual void SetVolumeControlDelegate( | |
| 151 scoped_ptr<ash::VolumeControlDelegate> delegate) OVERRIDE; | |
| 152 | |
| 153 virtual bool GetSessionStartTime( | |
| 154 base::TimeTicks* session_start_time) OVERRIDE; | |
| 155 | |
| 156 virtual bool GetSessionLengthLimit( | |
| 157 base::TimeDelta* session_length_limit) OVERRIDE; | |
| 158 | |
| 159 virtual int GetSystemTrayMenuWidth() OVERRIDE; | |
| 160 | |
| 161 virtual void ActiveUserWasChanged() OVERRIDE; | |
| 162 | |
| 163 virtual bool IsSearchKeyMappedToCapsLock() OVERRIDE; | |
| 164 | |
| 165 virtual ash::tray::UserAccountsDelegate* GetUserAccountsDelegate( | |
| 166 const std::string& user_id) OVERRIDE; | |
| 167 | |
| 168 private: | |
| 169 ash::SystemTrayNotifier* GetSystemTrayNotifier(); | |
| 170 | |
| 171 void UpdateClockType(); | |
| 172 | |
| 173 // content::NotificationObserver implementation. | |
| 174 virtual void Observe(int type, | |
| 175 const content::NotificationSource& source, | |
| 176 const content::NotificationDetails& details) OVERRIDE; | |
| 177 | |
| 178 scoped_ptr<content::NotificationRegistrar> registrar_; | |
| 179 base::HourClockType clock_type_; | |
| 180 | |
| 181 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateCommon); | |
| 182 }; | |
| 183 | |
| 184 ash::SystemTrayDelegate* CreateSystemTrayDelegate(); | |
| 185 | |
| 186 #endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_COMMON_H_ | |
| OLD | NEW |