default_system_tray_delegate.cc revision 0529e5d033099cbfc42635f6f6183833b09dff6e
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_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::ShowNetworkSettings(
108    const std::string& service_path) {
109}
110
111void DefaultSystemTrayDelegate::ShowBluetoothSettings() {
112}
113
114void DefaultSystemTrayDelegate::ShowDisplaySettings() {
115}
116
117void DefaultSystemTrayDelegate::ShowChromeSlow() {
118}
119
120bool DefaultSystemTrayDelegate::ShouldShowDisplayNotification() {
121  return false;
122}
123
124void DefaultSystemTrayDelegate::ShowDriveSettings() {
125}
126
127void DefaultSystemTrayDelegate::ShowIMESettings() {
128}
129
130void DefaultSystemTrayDelegate::ShowHelp() {
131}
132
133void DefaultSystemTrayDelegate::ShowAccessibilityHelp() {
134}
135
136void DefaultSystemTrayDelegate::ShowAccessibilitySettings() {
137}
138
139void DefaultSystemTrayDelegate::ShowPublicAccountInfo() {
140}
141
142void DefaultSystemTrayDelegate::ShowEnterpriseInfo() {
143}
144
145void DefaultSystemTrayDelegate::ShowLocallyManagedUserInfo() {
146}
147
148void DefaultSystemTrayDelegate::ShowUserLogin() {
149}
150
151bool DefaultSystemTrayDelegate::ShowSpringChargerReplacementDialog() {
152  return false;
153}
154
155bool DefaultSystemTrayDelegate::IsSpringChargerReplacementDialogVisible() {
156  return false;
157}
158
159bool DefaultSystemTrayDelegate::HasUserConfirmedSafeSpringCharger() {
160  return false;
161}
162
163void DefaultSystemTrayDelegate::ShutDown() {
164}
165
166void DefaultSystemTrayDelegate::SignOut() {
167}
168
169void DefaultSystemTrayDelegate::RequestLockScreen() {
170}
171
172void DefaultSystemTrayDelegate::RequestRestartForUpdate() {
173}
174
175void DefaultSystemTrayDelegate::GetAvailableBluetoothDevices(
176    BluetoothDeviceList* list) {
177}
178
179void DefaultSystemTrayDelegate::BluetoothStartDiscovering() {
180}
181
182void DefaultSystemTrayDelegate::BluetoothStopDiscovering() {
183}
184
185void DefaultSystemTrayDelegate::ConnectToBluetoothDevice(
186    const std::string& address) {
187}
188
189void DefaultSystemTrayDelegate::GetCurrentIME(IMEInfo* info) {
190}
191
192void DefaultSystemTrayDelegate::GetAvailableIMEList(IMEInfoList* list) {
193}
194
195void DefaultSystemTrayDelegate::GetCurrentIMEProperties(
196    IMEPropertyInfoList* list) {
197}
198
199void DefaultSystemTrayDelegate::SwitchIME(const std::string& ime_id) {
200}
201
202void DefaultSystemTrayDelegate::ActivateIMEProperty(const std::string& key) {
203}
204
205void DefaultSystemTrayDelegate::CancelDriveOperation(int32 operation_id) {
206}
207
208void DefaultSystemTrayDelegate::GetDriveOperationStatusList(
209    ash::DriveOperationStatusList*) {
210}
211
212void DefaultSystemTrayDelegate::ShowNetworkConfigure(
213    const std::string& network_id,
214    gfx::NativeWindow parent_window) {
215}
216
217bool DefaultSystemTrayDelegate::EnrollNetwork(const std::string& network_id,
218                                              gfx::NativeWindow parent_window) {
219  return true;
220}
221
222void DefaultSystemTrayDelegate::ManageBluetoothDevices() {
223}
224
225void DefaultSystemTrayDelegate::ToggleBluetooth() {
226  bluetooth_enabled_ = !bluetooth_enabled_;
227}
228
229bool DefaultSystemTrayDelegate::IsBluetoothDiscovering() {
230  return false;
231}
232
233void DefaultSystemTrayDelegate::ShowMobileSimDialog() {
234}
235
236void DefaultSystemTrayDelegate::ShowMobileSetupDialog(
237    const std::string& service_path) {
238}
239
240void DefaultSystemTrayDelegate::ShowOtherNetworkDialog(
241    const std::string& type) {
242}
243
244bool DefaultSystemTrayDelegate::GetBluetoothAvailable() {
245  return true;
246}
247
248bool DefaultSystemTrayDelegate::GetBluetoothEnabled() {
249  return bluetooth_enabled_;
250}
251
252bool DefaultSystemTrayDelegate::GetBluetoothDiscovering() {
253  return false;
254}
255
256void DefaultSystemTrayDelegate::ChangeProxySettings() {
257}
258
259VolumeControlDelegate* DefaultSystemTrayDelegate::GetVolumeControlDelegate()
260    const {
261  return volume_control_delegate_.get();
262}
263
264void DefaultSystemTrayDelegate::SetVolumeControlDelegate(
265    scoped_ptr<VolumeControlDelegate> delegate) {
266  volume_control_delegate_ = delegate.Pass();
267}
268
269bool DefaultSystemTrayDelegate::GetSessionStartTime(
270    base::TimeTicks* session_start_time) {
271  return false;
272}
273
274bool DefaultSystemTrayDelegate::GetSessionLengthLimit(
275     base::TimeDelta* session_length_limit) {
276  return false;
277}
278
279int DefaultSystemTrayDelegate::GetSystemTrayMenuWidth() {
280  // This is the default width for English languages.
281  return 300;
282}
283
284void DefaultSystemTrayDelegate::ActiveUserWasChanged() {
285}
286
287bool DefaultSystemTrayDelegate::IsNetworkBehindCaptivePortal(
288    const std::string& /* service_path */) const {
289  return false;
290}
291
292bool DefaultSystemTrayDelegate::IsSearchKeyMappedToCapsLock() {
293  return false;
294}
295
296tray::UserAccountsDelegate* DefaultSystemTrayDelegate::GetUserAccountsDelegate(
297    const std::string& user_id) {
298  return NULL;
299}
300
301}  // namespace ash
302