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

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

Issue 2558043006: ash: Use system tray mojo interface to show system update tray icon (Closed)
Patch Set: fix gcc Created 4 years 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 #include <utility>
9
10 #include "ash/common/system/networking_config_delegate.h"
11 #include "base/message_loop/message_loop.h"
12 #include "base/time/time.h"
13 8
14 namespace ash { 9 namespace ash {
15 10
16 DefaultSystemTrayDelegate::DefaultSystemTrayDelegate() 11 DefaultSystemTrayDelegate::DefaultSystemTrayDelegate()
17 : bluetooth_enabled_(true) {} 12 : bluetooth_enabled_(true) {}
18 13
19 DefaultSystemTrayDelegate::~DefaultSystemTrayDelegate() {} 14 DefaultSystemTrayDelegate::~DefaultSystemTrayDelegate() {}
20 15
21 LoginStatus DefaultSystemTrayDelegate::GetUserLoginStatus() const { 16 LoginStatus DefaultSystemTrayDelegate::GetUserLoginStatus() const {
22 return LoginStatus::USER; 17 return LoginStatus::USER;
23 } 18 }
24 19
25 std::string DefaultSystemTrayDelegate::GetSupervisedUserManager() const { 20 std::string DefaultSystemTrayDelegate::GetSupervisedUserManager() const {
26 if (!IsUserSupervised()) 21 if (!IsUserSupervised())
27 return std::string(); 22 return std::string();
28 return "manager@chrome.com"; 23 return "manager@chrome.com";
29 } 24 }
30 25
31 bool DefaultSystemTrayDelegate::IsUserSupervised() const { 26 bool DefaultSystemTrayDelegate::IsUserSupervised() const {
32 return GetUserLoginStatus() == LoginStatus::SUPERVISED; 27 return GetUserLoginStatus() == LoginStatus::SUPERVISED;
33 } 28 }
34 29
35 void DefaultSystemTrayDelegate::GetSystemUpdateInfo(UpdateInfo* info) const {
36 DCHECK(info);
37 info->severity = UpdateInfo::UPDATE_NONE;
38 info->update_required = true;
39 info->factory_reset_required = false;
40 }
41
42 bool DefaultSystemTrayDelegate::ShouldShowSettings() const { 30 bool DefaultSystemTrayDelegate::ShouldShowSettings() const {
43 return true; 31 return true;
44 } 32 }
45 33
46 bool DefaultSystemTrayDelegate::ShouldShowNotificationTray() const { 34 bool DefaultSystemTrayDelegate::ShouldShowNotificationTray() const {
47 return true; 35 return true;
48 } 36 }
49 37
50 void DefaultSystemTrayDelegate::ToggleBluetooth() { 38 void DefaultSystemTrayDelegate::ToggleBluetooth() {
51 bluetooth_enabled_ = !bluetooth_enabled_; 39 bluetooth_enabled_ = !bluetooth_enabled_;
(...skipping 14 matching lines...) Expand all
66 bool DefaultSystemTrayDelegate::GetBluetoothDiscovering() { 54 bool DefaultSystemTrayDelegate::GetBluetoothDiscovering() {
67 return false; 55 return false;
68 } 56 }
69 57
70 int DefaultSystemTrayDelegate::GetSystemTrayMenuWidth() { 58 int DefaultSystemTrayDelegate::GetSystemTrayMenuWidth() {
71 // This is the default width for English languages. 59 // This is the default width for English languages.
72 return 300; 60 return 300;
73 } 61 }
74 62
75 } // namespace ash 63 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/tray/default_system_tray_delegate.h ('k') | ash/common/system/tray/system_tray.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698