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

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

Issue 2568413002: Revert of ash: Use system tray mojo interface to show system update tray icon (Closed)
Patch Set: 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"
8 13
9 namespace ash { 14 namespace ash {
10 15
11 DefaultSystemTrayDelegate::DefaultSystemTrayDelegate() 16 DefaultSystemTrayDelegate::DefaultSystemTrayDelegate()
12 : bluetooth_enabled_(true) {} 17 : bluetooth_enabled_(true) {}
13 18
14 DefaultSystemTrayDelegate::~DefaultSystemTrayDelegate() {} 19 DefaultSystemTrayDelegate::~DefaultSystemTrayDelegate() {}
15 20
16 LoginStatus DefaultSystemTrayDelegate::GetUserLoginStatus() const { 21 LoginStatus DefaultSystemTrayDelegate::GetUserLoginStatus() const {
17 return LoginStatus::USER; 22 return LoginStatus::USER;
18 } 23 }
19 24
20 std::string DefaultSystemTrayDelegate::GetSupervisedUserManager() const { 25 std::string DefaultSystemTrayDelegate::GetSupervisedUserManager() const {
21 if (!IsUserSupervised()) 26 if (!IsUserSupervised())
22 return std::string(); 27 return std::string();
23 return "manager@chrome.com"; 28 return "manager@chrome.com";
24 } 29 }
25 30
26 bool DefaultSystemTrayDelegate::IsUserSupervised() const { 31 bool DefaultSystemTrayDelegate::IsUserSupervised() const {
27 return GetUserLoginStatus() == LoginStatus::SUPERVISED; 32 return GetUserLoginStatus() == LoginStatus::SUPERVISED;
28 } 33 }
29 34
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
30 bool DefaultSystemTrayDelegate::ShouldShowSettings() const { 42 bool DefaultSystemTrayDelegate::ShouldShowSettings() const {
31 return true; 43 return true;
32 } 44 }
33 45
34 bool DefaultSystemTrayDelegate::ShouldShowNotificationTray() const { 46 bool DefaultSystemTrayDelegate::ShouldShowNotificationTray() const {
35 return true; 47 return true;
36 } 48 }
37 49
38 void DefaultSystemTrayDelegate::ToggleBluetooth() { 50 void DefaultSystemTrayDelegate::ToggleBluetooth() {
39 bluetooth_enabled_ = !bluetooth_enabled_; 51 bluetooth_enabled_ = !bluetooth_enabled_;
(...skipping 14 matching lines...) Expand all
54 bool DefaultSystemTrayDelegate::GetBluetoothDiscovering() { 66 bool DefaultSystemTrayDelegate::GetBluetoothDiscovering() {
55 return false; 67 return false;
56 } 68 }
57 69
58 int DefaultSystemTrayDelegate::GetSystemTrayMenuWidth() { 70 int DefaultSystemTrayDelegate::GetSystemTrayMenuWidth() {
59 // This is the default width for English languages. 71 // This is the default width for English languages.
60 return 300; 72 return 300;
61 } 73 }
62 74
63 } // namespace ash 75 } // 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