Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: ash/common/system/tray/default_system_tray_delegate.cc

Issue 2761993002: cros: Eliminate bluetooth methods from SystemTrayDelegate (Closed)
Patch Set: review comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/common/system/tray/default_system_tray_delegate.h" 5 #include "ash/common/system/tray/default_system_tray_delegate.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 namespace ash { 9 namespace ash {
10 10
11 DefaultSystemTrayDelegate::DefaultSystemTrayDelegate() 11 DefaultSystemTrayDelegate::DefaultSystemTrayDelegate() {}
12 : bluetooth_enabled_(true) {}
13 12
14 DefaultSystemTrayDelegate::~DefaultSystemTrayDelegate() {} 13 DefaultSystemTrayDelegate::~DefaultSystemTrayDelegate() {}
15 14
16 LoginStatus DefaultSystemTrayDelegate::GetUserLoginStatus() const { 15 LoginStatus DefaultSystemTrayDelegate::GetUserLoginStatus() const {
17 return LoginStatus::USER; 16 return LoginStatus::USER;
18 } 17 }
19 18
20 std::string DefaultSystemTrayDelegate::GetSupervisedUserManager() const { 19 std::string DefaultSystemTrayDelegate::GetSupervisedUserManager() const {
21 if (!IsUserSupervised()) 20 if (!IsUserSupervised())
22 return std::string(); 21 return std::string();
23 return "manager@chrome.com"; 22 return "manager@chrome.com";
24 } 23 }
25 24
26 bool DefaultSystemTrayDelegate::IsUserSupervised() const { 25 bool DefaultSystemTrayDelegate::IsUserSupervised() const {
27 return GetUserLoginStatus() == LoginStatus::SUPERVISED; 26 return GetUserLoginStatus() == LoginStatus::SUPERVISED;
28 } 27 }
29 28
30 bool DefaultSystemTrayDelegate::ShouldShowSettings() const { 29 bool DefaultSystemTrayDelegate::ShouldShowSettings() const {
31 return true; 30 return true;
32 } 31 }
33 32
34 bool DefaultSystemTrayDelegate::ShouldShowNotificationTray() const { 33 bool DefaultSystemTrayDelegate::ShouldShowNotificationTray() const {
35 return true; 34 return true;
36 } 35 }
37 36
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() { 37 int DefaultSystemTrayDelegate::GetSystemTrayMenuWidth() {
59 // This is the default width for English languages. 38 // This is the default width for English languages.
60 return 300; 39 return 300;
61 } 40 }
62 41
63 } // namespace ash 42 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/tray/default_system_tray_delegate.h ('k') | ash/common/system/tray/system_tray_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698