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