• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3 // found in the LICENSE file.
4 
5 #include "ash/system/tray/default_system_tray_delegate.h"
6 
7 #include <string>
8 
9 #include "ash/session/session_state_delegate.h"
10 #include "ash/shell.h"
11 #include "ash/volume_control_delegate.h"
12 #include "base/message_loop/message_loop.h"
13 #include "base/time/time.h"
14 
15 namespace ash {
16 
17 namespace {
18 
19 class DefaultVolumnControlDelegate : public VolumeControlDelegate {
20  public:
DefaultVolumnControlDelegate()21   DefaultVolumnControlDelegate() {}
~DefaultVolumnControlDelegate()22   virtual ~DefaultVolumnControlDelegate() {}
23 
HandleVolumeMute(const ui::Accelerator & accelerator)24   virtual bool HandleVolumeMute(const ui::Accelerator& accelerator) OVERRIDE {
25     return true;
26   }
HandleVolumeDown(const ui::Accelerator & accelerator)27   virtual bool HandleVolumeDown(const ui::Accelerator& accelerator) OVERRIDE {
28     return true;
29   }
HandleVolumeUp(const ui::Accelerator & accelerator)30   virtual bool HandleVolumeUp(const ui::Accelerator& accelerator) OVERRIDE {
31     return true;
32   }
33 
34  private:
35   DISALLOW_COPY_AND_ASSIGN(DefaultVolumnControlDelegate);
36 };
37 
38 }  // namespace
39 
DefaultSystemTrayDelegate()40 DefaultSystemTrayDelegate::DefaultSystemTrayDelegate()
41     : bluetooth_enabled_(true),
42       volume_control_delegate_(new DefaultVolumnControlDelegate) {
43 }
44 
~DefaultSystemTrayDelegate()45 DefaultSystemTrayDelegate::~DefaultSystemTrayDelegate() {
46 }
47 
Initialize()48 void DefaultSystemTrayDelegate::Initialize() {
49 }
50 
Shutdown()51 void DefaultSystemTrayDelegate::Shutdown() {
52 }
53 
GetTrayVisibilityOnStartup()54 bool DefaultSystemTrayDelegate::GetTrayVisibilityOnStartup() {
55   return true;
56 }
57 
GetUserLoginStatus() const58 user::LoginStatus DefaultSystemTrayDelegate::GetUserLoginStatus() const {
59   return user::LOGGED_IN_USER;
60 }
61 
ChangeProfilePicture()62 void DefaultSystemTrayDelegate::ChangeProfilePicture() {
63 }
64 
GetEnterpriseDomain() const65 const std::string DefaultSystemTrayDelegate::GetEnterpriseDomain() const {
66   return std::string();
67 }
68 
GetEnterpriseMessage() const69 const base::string16 DefaultSystemTrayDelegate::GetEnterpriseMessage() const {
70   return base::string16();
71 }
72 
73 const std::string
GetLocallyManagedUserManager() const74 DefaultSystemTrayDelegate::GetLocallyManagedUserManager() const {
75   return std::string();
76 }
77 
78 const base::string16
GetLocallyManagedUserManagerName() const79 DefaultSystemTrayDelegate::GetLocallyManagedUserManagerName()
80     const {
81   return base::string16();
82 }
83 
GetLocallyManagedUserMessage() const84 const base::string16 DefaultSystemTrayDelegate::GetLocallyManagedUserMessage()
85     const {
86   return base::string16();
87 }
88 
SystemShouldUpgrade() const89 bool DefaultSystemTrayDelegate::SystemShouldUpgrade() const {
90   return true;
91 }
92 
GetHourClockType() const93 base::HourClockType DefaultSystemTrayDelegate::GetHourClockType() const {
94   return base::k24HourClock;
95 }
96 
ShowSettings()97 void DefaultSystemTrayDelegate::ShowSettings() {
98 }
99 
ShouldShowSettings()100 bool DefaultSystemTrayDelegate::ShouldShowSettings() {
101   return true;
102 }
103 
ShowDateSettings()104 void DefaultSystemTrayDelegate::ShowDateSettings() {
105 }
106 
ShowSetTimeDialog()107 void DefaultSystemTrayDelegate::ShowSetTimeDialog() {
108 }
109 
ShowNetworkSettings(const std::string & service_path)110 void DefaultSystemTrayDelegate::ShowNetworkSettings(
111     const std::string& service_path) {
112 }
113 
ShowBluetoothSettings()114 void DefaultSystemTrayDelegate::ShowBluetoothSettings() {
115 }
116 
ShowDisplaySettings()117 void DefaultSystemTrayDelegate::ShowDisplaySettings() {
118 }
119 
ShowChromeSlow()120 void DefaultSystemTrayDelegate::ShowChromeSlow() {
121 }
122 
ShouldShowDisplayNotification()123 bool DefaultSystemTrayDelegate::ShouldShowDisplayNotification() {
124   return false;
125 }
126 
ShowDriveSettings()127 void DefaultSystemTrayDelegate::ShowDriveSettings() {
128 }
129 
ShowIMESettings()130 void DefaultSystemTrayDelegate::ShowIMESettings() {
131 }
132 
ShowHelp()133 void DefaultSystemTrayDelegate::ShowHelp() {
134 }
135 
ShowAccessibilityHelp()136 void DefaultSystemTrayDelegate::ShowAccessibilityHelp() {
137 }
138 
ShowAccessibilitySettings()139 void DefaultSystemTrayDelegate::ShowAccessibilitySettings() {
140 }
141 
ShowPublicAccountInfo()142 void DefaultSystemTrayDelegate::ShowPublicAccountInfo() {
143 }
144 
ShowEnterpriseInfo()145 void DefaultSystemTrayDelegate::ShowEnterpriseInfo() {
146 }
147 
ShowLocallyManagedUserInfo()148 void DefaultSystemTrayDelegate::ShowLocallyManagedUserInfo() {
149 }
150 
ShowUserLogin()151 void DefaultSystemTrayDelegate::ShowUserLogin() {
152 }
153 
ShowSpringChargerReplacementDialog()154 bool DefaultSystemTrayDelegate::ShowSpringChargerReplacementDialog() {
155   return false;
156 }
157 
IsSpringChargerReplacementDialogVisible()158 bool DefaultSystemTrayDelegate::IsSpringChargerReplacementDialogVisible() {
159   return false;
160 }
161 
HasUserConfirmedSafeSpringCharger()162 bool DefaultSystemTrayDelegate::HasUserConfirmedSafeSpringCharger() {
163   return false;
164 }
165 
ShutDown()166 void DefaultSystemTrayDelegate::ShutDown() {
167 }
168 
SignOut()169 void DefaultSystemTrayDelegate::SignOut() {
170 }
171 
RequestLockScreen()172 void DefaultSystemTrayDelegate::RequestLockScreen() {
173 }
174 
RequestRestartForUpdate()175 void DefaultSystemTrayDelegate::RequestRestartForUpdate() {
176 }
177 
GetAvailableBluetoothDevices(BluetoothDeviceList * list)178 void DefaultSystemTrayDelegate::GetAvailableBluetoothDevices(
179     BluetoothDeviceList* list) {
180 }
181 
BluetoothStartDiscovering()182 void DefaultSystemTrayDelegate::BluetoothStartDiscovering() {
183 }
184 
BluetoothStopDiscovering()185 void DefaultSystemTrayDelegate::BluetoothStopDiscovering() {
186 }
187 
ConnectToBluetoothDevice(const std::string & address)188 void DefaultSystemTrayDelegate::ConnectToBluetoothDevice(
189     const std::string& address) {
190 }
191 
GetCurrentIME(IMEInfo * info)192 void DefaultSystemTrayDelegate::GetCurrentIME(IMEInfo* info) {
193 }
194 
GetAvailableIMEList(IMEInfoList * list)195 void DefaultSystemTrayDelegate::GetAvailableIMEList(IMEInfoList* list) {
196 }
197 
GetCurrentIMEProperties(IMEPropertyInfoList * list)198 void DefaultSystemTrayDelegate::GetCurrentIMEProperties(
199     IMEPropertyInfoList* list) {
200 }
201 
SwitchIME(const std::string & ime_id)202 void DefaultSystemTrayDelegate::SwitchIME(const std::string& ime_id) {
203 }
204 
ActivateIMEProperty(const std::string & key)205 void DefaultSystemTrayDelegate::ActivateIMEProperty(const std::string& key) {
206 }
207 
CancelDriveOperation(int32 operation_id)208 void DefaultSystemTrayDelegate::CancelDriveOperation(int32 operation_id) {
209 }
210 
GetDriveOperationStatusList(ash::DriveOperationStatusList *)211 void DefaultSystemTrayDelegate::GetDriveOperationStatusList(
212     ash::DriveOperationStatusList*) {
213 }
214 
ShowNetworkConfigure(const std::string & network_id,gfx::NativeWindow parent_window)215 void DefaultSystemTrayDelegate::ShowNetworkConfigure(
216     const std::string& network_id,
217     gfx::NativeWindow parent_window) {
218 }
219 
EnrollNetwork(const std::string & network_id,gfx::NativeWindow parent_window)220 bool DefaultSystemTrayDelegate::EnrollNetwork(const std::string& network_id,
221                                               gfx::NativeWindow parent_window) {
222   return true;
223 }
224 
ManageBluetoothDevices()225 void DefaultSystemTrayDelegate::ManageBluetoothDevices() {
226 }
227 
ToggleBluetooth()228 void DefaultSystemTrayDelegate::ToggleBluetooth() {
229   bluetooth_enabled_ = !bluetooth_enabled_;
230 }
231 
IsBluetoothDiscovering()232 bool DefaultSystemTrayDelegate::IsBluetoothDiscovering() {
233   return false;
234 }
235 
ShowMobileSimDialog()236 void DefaultSystemTrayDelegate::ShowMobileSimDialog() {
237 }
238 
ShowMobileSetupDialog(const std::string & service_path)239 void DefaultSystemTrayDelegate::ShowMobileSetupDialog(
240     const std::string& service_path) {
241 }
242 
ShowOtherNetworkDialog(const std::string & type)243 void DefaultSystemTrayDelegate::ShowOtherNetworkDialog(
244     const std::string& type) {
245 }
246 
GetBluetoothAvailable()247 bool DefaultSystemTrayDelegate::GetBluetoothAvailable() {
248   return true;
249 }
250 
GetBluetoothEnabled()251 bool DefaultSystemTrayDelegate::GetBluetoothEnabled() {
252   return bluetooth_enabled_;
253 }
254 
GetBluetoothDiscovering()255 bool DefaultSystemTrayDelegate::GetBluetoothDiscovering() {
256   return false;
257 }
258 
ChangeProxySettings()259 void DefaultSystemTrayDelegate::ChangeProxySettings() {
260 }
261 
GetVolumeControlDelegate() const262 VolumeControlDelegate* DefaultSystemTrayDelegate::GetVolumeControlDelegate()
263     const {
264   return volume_control_delegate_.get();
265 }
266 
SetVolumeControlDelegate(scoped_ptr<VolumeControlDelegate> delegate)267 void DefaultSystemTrayDelegate::SetVolumeControlDelegate(
268     scoped_ptr<VolumeControlDelegate> delegate) {
269   volume_control_delegate_ = delegate.Pass();
270 }
271 
GetSessionStartTime(base::TimeTicks * session_start_time)272 bool DefaultSystemTrayDelegate::GetSessionStartTime(
273     base::TimeTicks* session_start_time) {
274   return false;
275 }
276 
GetSessionLengthLimit(base::TimeDelta * session_length_limit)277 bool DefaultSystemTrayDelegate::GetSessionLengthLimit(
278      base::TimeDelta* session_length_limit) {
279   return false;
280 }
281 
GetSystemTrayMenuWidth()282 int DefaultSystemTrayDelegate::GetSystemTrayMenuWidth() {
283   // This is the default width for English languages.
284   return 300;
285 }
286 
ActiveUserWasChanged()287 void DefaultSystemTrayDelegate::ActiveUserWasChanged() {
288 }
289 
IsNetworkBehindCaptivePortal(const std::string &) const290 bool DefaultSystemTrayDelegate::IsNetworkBehindCaptivePortal(
291     const std::string& /* service_path */) const {
292   return false;
293 }
294 
IsSearchKeyMappedToCapsLock()295 bool DefaultSystemTrayDelegate::IsSearchKeyMappedToCapsLock() {
296   return false;
297 }
298 
GetUserAccountsDelegate(const std::string & user_id)299 tray::UserAccountsDelegate* DefaultSystemTrayDelegate::GetUserAccountsDelegate(
300     const std::string& user_id) {
301   return NULL;
302 }
303 
304 }  // namespace ash
305