cygprofile: increase timeouts to allow showing web contents
[chromium-blink-merge.git] / ash / system / tray / default_system_tray_delegate.cc
blob49386b4601cfa48029c807449e563f739e719713
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.
5 #include "ash/system/tray/default_system_tray_delegate.h"
7 #include <string>
9 #include "ash/networking_config_delegate.h"
10 #include "ash/session/session_state_delegate.h"
11 #include "ash/shell.h"
12 #include "ash/volume_control_delegate.h"
13 #include "base/message_loop/message_loop.h"
14 #include "base/time/time.h"
16 namespace ash {
18 DefaultSystemTrayDelegate::DefaultSystemTrayDelegate()
19 : bluetooth_enabled_(true) {
22 DefaultSystemTrayDelegate::~DefaultSystemTrayDelegate() {
25 bool DefaultSystemTrayDelegate::GetTrayVisibilityOnStartup() {
26 return true;
29 user::LoginStatus DefaultSystemTrayDelegate::GetUserLoginStatus() const {
30 return user::LOGGED_IN_USER;
33 const std::string DefaultSystemTrayDelegate::GetSupervisedUserManager() const {
34 if (!IsUserSupervised())
35 return std::string();
36 return "manager@chrome.com";
39 bool DefaultSystemTrayDelegate::IsUserSupervised() const {
40 return GetUserLoginStatus() == ash::user::LOGGED_IN_SUPERVISED;
43 void DefaultSystemTrayDelegate::GetSystemUpdateInfo(UpdateInfo* info) const {
44 DCHECK(info);
45 info->severity = UpdateInfo::UPDATE_NORMAL;
46 info->update_required = true;
47 info->factory_reset_required = false;
50 bool DefaultSystemTrayDelegate::ShouldShowSettings() {
51 return true;
54 bool DefaultSystemTrayDelegate::ShouldShowDisplayNotification() {
55 return false;
58 void DefaultSystemTrayDelegate::ToggleBluetooth() {
59 bluetooth_enabled_ = !bluetooth_enabled_;
62 bool DefaultSystemTrayDelegate::IsBluetoothDiscovering() {
63 return false;
66 bool DefaultSystemTrayDelegate::GetBluetoothAvailable() {
67 return true;
70 bool DefaultSystemTrayDelegate::GetBluetoothEnabled() {
71 return bluetooth_enabled_;
74 bool DefaultSystemTrayDelegate::GetBluetoothDiscovering() {
75 return false;
78 VolumeControlDelegate* DefaultSystemTrayDelegate::GetVolumeControlDelegate()
79 const {
80 return volume_control_delegate_.get();
83 void DefaultSystemTrayDelegate::SetVolumeControlDelegate(
84 scoped_ptr<VolumeControlDelegate> delegate) {
85 volume_control_delegate_ = delegate.Pass();
88 int DefaultSystemTrayDelegate::GetSystemTrayMenuWidth() {
89 // This is the default width for English languages.
90 return 300;
93 } // namespace ash