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