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

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

Issue 2732813002: chromeos: Move files in //ash/common to //ash, part 1 (Closed)
Patch Set: rebase 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
(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
OLDNEW
« no previous file with comments | « ash/common/system/tray/default_system_tray_delegate.h ('k') | ash/common/system/tray/fixed_sized_image_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698