don't pretend to support dbus on windows in dbus_export.h
[chromium-blink-merge.git] / ash / system / tray / default_system_tray_delegate.cc
blobe2aeae30744d6dca3f4081bac4f5ed37a55f72e6
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/session/session_state_delegate.h"
10 #include "ash/shell.h"
11 #include "ash/volume_control_delegate.h"
12 #include "base/message_loop/message_loop.h"
13 #include "base/time/time.h"
15 namespace ash {
17 namespace {
19 class DefaultVolumnControlDelegate : public VolumeControlDelegate {
20 public:
21 DefaultVolumnControlDelegate() {}
22 virtual ~DefaultVolumnControlDelegate() {}
24 virtual bool HandleVolumeMute(const ui::Accelerator& accelerator) OVERRIDE {
25 return true;
27 virtual bool HandleVolumeDown(const ui::Accelerator& accelerator) OVERRIDE {
28 return true;
30 virtual bool HandleVolumeUp(const ui::Accelerator& accelerator) OVERRIDE {
31 return true;
34 private:
35 DISALLOW_COPY_AND_ASSIGN(DefaultVolumnControlDelegate);
38 } // namespace
40 DefaultSystemTrayDelegate::DefaultSystemTrayDelegate()
41 : bluetooth_enabled_(true),
42 volume_control_delegate_(new DefaultVolumnControlDelegate) {
45 DefaultSystemTrayDelegate::~DefaultSystemTrayDelegate() {
48 void DefaultSystemTrayDelegate::Initialize() {
51 void DefaultSystemTrayDelegate::Shutdown() {
54 bool DefaultSystemTrayDelegate::GetTrayVisibilityOnStartup() {
55 return true;
58 user::LoginStatus DefaultSystemTrayDelegate::GetUserLoginStatus() const {
59 return user::LOGGED_IN_USER;
62 void DefaultSystemTrayDelegate::ChangeProfilePicture() {
65 const std::string DefaultSystemTrayDelegate::GetEnterpriseDomain() const {
66 return std::string();
69 const base::string16 DefaultSystemTrayDelegate::GetEnterpriseMessage() const {
70 return base::string16();
73 const std::string
74 DefaultSystemTrayDelegate::GetSupervisedUserManager() const {
75 return std::string();
78 const base::string16
79 DefaultSystemTrayDelegate::GetSupervisedUserManagerName()
80 const {
81 return base::string16();
84 const base::string16 DefaultSystemTrayDelegate::GetSupervisedUserMessage()
85 const {
86 return base::string16();
89 bool DefaultSystemTrayDelegate::SystemShouldUpgrade() const {
90 return true;
93 base::HourClockType DefaultSystemTrayDelegate::GetHourClockType() const {
94 return base::k24HourClock;
97 void DefaultSystemTrayDelegate::ShowSettings() {
100 bool DefaultSystemTrayDelegate::ShouldShowSettings() {
101 return true;
104 void DefaultSystemTrayDelegate::ShowDateSettings() {
107 void DefaultSystemTrayDelegate::ShowSetTimeDialog() {
110 void DefaultSystemTrayDelegate::ShowNetworkSettings(
111 const std::string& service_path) {
114 void DefaultSystemTrayDelegate::ShowBluetoothSettings() {
117 void DefaultSystemTrayDelegate::ShowDisplaySettings() {
120 void DefaultSystemTrayDelegate::ShowChromeSlow() {
123 bool DefaultSystemTrayDelegate::ShouldShowDisplayNotification() {
124 return false;
127 void DefaultSystemTrayDelegate::ShowIMESettings() {
130 void DefaultSystemTrayDelegate::ShowHelp() {
133 void DefaultSystemTrayDelegate::ShowAccessibilityHelp() {
136 void DefaultSystemTrayDelegate::ShowAccessibilitySettings() {
139 void DefaultSystemTrayDelegate::ShowPublicAccountInfo() {
142 void DefaultSystemTrayDelegate::ShowEnterpriseInfo() {
145 void DefaultSystemTrayDelegate::ShowSupervisedUserInfo() {
148 void DefaultSystemTrayDelegate::ShowUserLogin() {
151 bool DefaultSystemTrayDelegate::ShowSpringChargerReplacementDialog() {
152 return false;
155 bool DefaultSystemTrayDelegate::IsSpringChargerReplacementDialogVisible() {
156 return false;
159 bool DefaultSystemTrayDelegate::HasUserConfirmedSafeSpringCharger() {
160 return false;
163 void DefaultSystemTrayDelegate::ShutDown() {
166 void DefaultSystemTrayDelegate::SignOut() {
169 void DefaultSystemTrayDelegate::RequestLockScreen() {
172 void DefaultSystemTrayDelegate::RequestRestartForUpdate() {
175 void DefaultSystemTrayDelegate::GetAvailableBluetoothDevices(
176 BluetoothDeviceList* list) {
179 void DefaultSystemTrayDelegate::BluetoothStartDiscovering() {
182 void DefaultSystemTrayDelegate::BluetoothStopDiscovering() {
185 void DefaultSystemTrayDelegate::ConnectToBluetoothDevice(
186 const std::string& address) {
189 void DefaultSystemTrayDelegate::GetCurrentIME(IMEInfo* info) {
192 void DefaultSystemTrayDelegate::GetAvailableIMEList(IMEInfoList* list) {
195 void DefaultSystemTrayDelegate::GetCurrentIMEProperties(
196 IMEPropertyInfoList* list) {
199 void DefaultSystemTrayDelegate::SwitchIME(const std::string& ime_id) {
202 void DefaultSystemTrayDelegate::ActivateIMEProperty(const std::string& key) {
205 void DefaultSystemTrayDelegate::ShowNetworkConfigure(
206 const std::string& network_id,
207 gfx::NativeWindow parent_window) {
210 bool DefaultSystemTrayDelegate::EnrollNetwork(const std::string& network_id,
211 gfx::NativeWindow parent_window) {
212 return true;
215 void DefaultSystemTrayDelegate::ManageBluetoothDevices() {
218 void DefaultSystemTrayDelegate::ToggleBluetooth() {
219 bluetooth_enabled_ = !bluetooth_enabled_;
222 bool DefaultSystemTrayDelegate::IsBluetoothDiscovering() {
223 return false;
226 void DefaultSystemTrayDelegate::ShowMobileSimDialog() {
229 void DefaultSystemTrayDelegate::ShowMobileSetupDialog(
230 const std::string& service_path) {
233 void DefaultSystemTrayDelegate::ShowOtherNetworkDialog(
234 const std::string& type) {
237 bool DefaultSystemTrayDelegate::GetBluetoothAvailable() {
238 return true;
241 bool DefaultSystemTrayDelegate::GetBluetoothEnabled() {
242 return bluetooth_enabled_;
245 bool DefaultSystemTrayDelegate::GetBluetoothDiscovering() {
246 return false;
249 void DefaultSystemTrayDelegate::ChangeProxySettings() {
252 VolumeControlDelegate* DefaultSystemTrayDelegate::GetVolumeControlDelegate()
253 const {
254 return volume_control_delegate_.get();
257 void DefaultSystemTrayDelegate::SetVolumeControlDelegate(
258 scoped_ptr<VolumeControlDelegate> delegate) {
259 volume_control_delegate_ = delegate.Pass();
262 bool DefaultSystemTrayDelegate::GetSessionStartTime(
263 base::TimeTicks* session_start_time) {
264 return false;
267 bool DefaultSystemTrayDelegate::GetSessionLengthLimit(
268 base::TimeDelta* session_length_limit) {
269 return false;
272 int DefaultSystemTrayDelegate::GetSystemTrayMenuWidth() {
273 // This is the default width for English languages.
274 return 300;
277 void DefaultSystemTrayDelegate::ActiveUserWasChanged() {
280 bool DefaultSystemTrayDelegate::IsSearchKeyMappedToCapsLock() {
281 return false;
284 tray::UserAccountsDelegate* DefaultSystemTrayDelegate::GetUserAccountsDelegate(
285 const std::string& user_id) {
286 return NULL;
289 } // namespace ash