| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/system/tray/test_system_tray_delegate.h" | 5 #include "ash/system/tray/test_system_tray_delegate.h" |
| 6 | 6 |
| 7 #include <string> |
| 8 |
| 7 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 8 #include "ash/shell_delegate.h" | 10 #include "ash/shell_delegate.h" |
| 9 #include "ash/volume_control_delegate.h" | 11 #include "ash/volume_control_delegate.h" |
| 10 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
| 11 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
| 12 | 14 |
| 13 namespace ash { | 15 namespace ash { |
| 14 namespace test { | 16 namespace test { |
| 15 | 17 |
| 16 namespace { | 18 namespace { |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // but there's no browser session available yet so use SessionStarted(). | 87 // but there's no browser session available yet so use SessionStarted(). |
| 86 if (!Shell::GetInstance()->delegate()->IsSessionStarted()) | 88 if (!Shell::GetInstance()->delegate()->IsSessionStarted()) |
| 87 return ash::user::LOGGED_IN_NONE; | 89 return ash::user::LOGGED_IN_NONE; |
| 88 if (Shell::GetInstance()->IsScreenLocked()) | 90 if (Shell::GetInstance()->IsScreenLocked()) |
| 89 return user::LOGGED_IN_LOCKED; | 91 return user::LOGGED_IN_LOCKED; |
| 90 // TODO(nkostylev): Support LOGGED_IN_OWNER, LOGGED_IN_GUEST, LOGGED_IN_KIOSK, | 92 // TODO(nkostylev): Support LOGGED_IN_OWNER, LOGGED_IN_GUEST, LOGGED_IN_KIOSK, |
| 91 // LOGGED_IN_PUBLIC. | 93 // LOGGED_IN_PUBLIC. |
| 92 return user::LOGGED_IN_USER; | 94 return user::LOGGED_IN_USER; |
| 93 } | 95 } |
| 94 | 96 |
| 97 const std::string TestSystemTrayDelegate::GetEnterpriseDomain() const { |
| 98 return std::string(); |
| 99 } |
| 100 |
| 95 bool TestSystemTrayDelegate::SystemShouldUpgrade() const { | 101 bool TestSystemTrayDelegate::SystemShouldUpgrade() const { |
| 96 return true; | 102 return true; |
| 97 } | 103 } |
| 98 | 104 |
| 99 base::HourClockType TestSystemTrayDelegate::GetHourClockType() const { | 105 base::HourClockType TestSystemTrayDelegate::GetHourClockType() const { |
| 100 return base::k24HourClock; | 106 return base::k24HourClock; |
| 101 } | 107 } |
| 102 | 108 |
| 103 PowerSupplyStatus TestSystemTrayDelegate::GetPowerSupplyStatus() const { | 109 PowerSupplyStatus TestSystemTrayDelegate::GetPowerSupplyStatus() const { |
| 104 return PowerSupplyStatus(); | 110 return PowerSupplyStatus(); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 127 | 133 |
| 128 void TestSystemTrayDelegate::ShowIMESettings() { | 134 void TestSystemTrayDelegate::ShowIMESettings() { |
| 129 } | 135 } |
| 130 | 136 |
| 131 void TestSystemTrayDelegate::ShowHelp() { | 137 void TestSystemTrayDelegate::ShowHelp() { |
| 132 } | 138 } |
| 133 | 139 |
| 134 void TestSystemTrayDelegate::ShowAccessibilityHelp() { | 140 void TestSystemTrayDelegate::ShowAccessibilityHelp() { |
| 135 } | 141 } |
| 136 | 142 |
| 143 void TestSystemTrayDelegate::ShowPublicAccountInfo() { |
| 144 } |
| 145 |
| 137 void TestSystemTrayDelegate::ShutDown() { | 146 void TestSystemTrayDelegate::ShutDown() { |
| 138 MessageLoop::current()->Quit(); | 147 MessageLoop::current()->Quit(); |
| 139 } | 148 } |
| 140 | 149 |
| 141 void TestSystemTrayDelegate::SignOut() { | 150 void TestSystemTrayDelegate::SignOut() { |
| 142 MessageLoop::current()->Quit(); | 151 MessageLoop::current()->Quit(); |
| 143 } | 152 } |
| 144 | 153 |
| 145 void TestSystemTrayDelegate::RequestLockScreen() { | 154 void TestSystemTrayDelegate::RequestLockScreen() { |
| 146 } | 155 } |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 return volume_control_delegate_.get(); | 298 return volume_control_delegate_.get(); |
| 290 } | 299 } |
| 291 | 300 |
| 292 void TestSystemTrayDelegate::SetVolumeControlDelegate( | 301 void TestSystemTrayDelegate::SetVolumeControlDelegate( |
| 293 scoped_ptr<VolumeControlDelegate> delegate) { | 302 scoped_ptr<VolumeControlDelegate> delegate) { |
| 294 volume_control_delegate_ = delegate.Pass(); | 303 volume_control_delegate_ = delegate.Pass(); |
| 295 } | 304 } |
| 296 | 305 |
| 297 } // namespace test | 306 } // namespace test |
| 298 } // namespace ash | 307 } // namespace ash |
| OLD | NEW |