OLD | NEW |
| (Empty) |
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/common/system/tray/default_system_tray_delegate.h" | |
6 | |
7 #include <string> | |
8 | |
9 namespace ash { | |
10 | |
11 DefaultSystemTrayDelegate::DefaultSystemTrayDelegate() | |
12 : bluetooth_enabled_(true) {} | |
13 | |
14 DefaultSystemTrayDelegate::~DefaultSystemTrayDelegate() {} | |
15 | |
16 LoginStatus DefaultSystemTrayDelegate::GetUserLoginStatus() const { | |
17 return LoginStatus::USER; | |
18 } | |
19 | |
20 std::string DefaultSystemTrayDelegate::GetSupervisedUserManager() const { | |
21 if (!IsUserSupervised()) | |
22 return std::string(); | |
23 return "manager@chrome.com"; | |
24 } | |
25 | |
26 bool DefaultSystemTrayDelegate::IsUserSupervised() const { | |
27 return GetUserLoginStatus() == LoginStatus::SUPERVISED; | |
28 } | |
29 | |
30 bool DefaultSystemTrayDelegate::ShouldShowSettings() const { | |
31 return true; | |
32 } | |
33 | |
34 bool DefaultSystemTrayDelegate::ShouldShowNotificationTray() const { | |
35 return true; | |
36 } | |
37 | |
38 void DefaultSystemTrayDelegate::ToggleBluetooth() { | |
39 bluetooth_enabled_ = !bluetooth_enabled_; | |
40 } | |
41 | |
42 bool DefaultSystemTrayDelegate::IsBluetoothDiscovering() const { | |
43 return false; | |
44 } | |
45 | |
46 bool DefaultSystemTrayDelegate::GetBluetoothAvailable() { | |
47 return true; | |
48 } | |
49 | |
50 bool DefaultSystemTrayDelegate::GetBluetoothEnabled() { | |
51 return bluetooth_enabled_; | |
52 } | |
53 | |
54 bool DefaultSystemTrayDelegate::GetBluetoothDiscovering() { | |
55 return false; | |
56 } | |
57 | |
58 int DefaultSystemTrayDelegate::GetSystemTrayMenuWidth() { | |
59 // This is the default width for English languages. | |
60 return 300; | |
61 } | |
62 | |
63 } // namespace ash | |
OLD | NEW |