| 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/test/test_shell_delegate.h" | 5 #include "ash/test/test_shell_delegate.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ash/caps_lock_delegate_stub.h" | 9 #include "ash/caps_lock_delegate_stub.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| 11 #include "ash/shell_window_ids.h" | 11 #include "ash/shell_window_ids.h" |
| 12 #include "ash/test/test_launcher_delegate.h" | 12 #include "ash/test/test_launcher_delegate.h" |
| 13 #include "ash/wm/window_util.h" | 13 #include "ash/wm/window_util.h" |
| 14 #include "content/public/test/test_browser_context.h" | 14 #include "content/public/test/test_browser_context.h" |
| 15 #include "ui/aura/window.h" | 15 #include "ui/aura/window.h" |
| 16 | 16 |
| 17 namespace ash { | 17 namespace ash { |
| 18 namespace test { | 18 namespace test { |
| 19 | 19 |
| 20 TestShellDelegate::TestShellDelegate() | 20 TestShellDelegate::TestShellDelegate() |
| 21 : locked_(false), | 21 : locked_(false), |
| 22 spoken_feedback_enabled_(false) { | 22 spoken_feedback_enabled_(false), |
| 23 num_exit_requests_(0) { |
| 23 } | 24 } |
| 24 | 25 |
| 25 TestShellDelegate::~TestShellDelegate() { | 26 TestShellDelegate::~TestShellDelegate() { |
| 26 } | 27 } |
| 27 | 28 |
| 28 bool TestShellDelegate::IsUserLoggedIn() { | 29 bool TestShellDelegate::IsUserLoggedIn() { |
| 29 return true; | 30 return true; |
| 30 } | 31 } |
| 31 | 32 |
| 32 bool TestShellDelegate::IsSessionStarted() { | 33 bool TestShellDelegate::IsSessionStarted() { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 46 } | 47 } |
| 47 | 48 |
| 48 bool TestShellDelegate::IsScreenLocked() const { | 49 bool TestShellDelegate::IsScreenLocked() const { |
| 49 return locked_; | 50 return locked_; |
| 50 } | 51 } |
| 51 | 52 |
| 52 void TestShellDelegate::Shutdown() { | 53 void TestShellDelegate::Shutdown() { |
| 53 } | 54 } |
| 54 | 55 |
| 55 void TestShellDelegate::Exit() { | 56 void TestShellDelegate::Exit() { |
| 57 num_exit_requests_++; |
| 56 } | 58 } |
| 57 | 59 |
| 58 void TestShellDelegate::NewTab() { | 60 void TestShellDelegate::NewTab() { |
| 59 } | 61 } |
| 60 | 62 |
| 61 void TestShellDelegate::NewWindow(bool incognito) { | 63 void TestShellDelegate::NewWindow(bool incognito) { |
| 62 } | 64 } |
| 63 | 65 |
| 64 void TestShellDelegate::ToggleMaximized() { | 66 void TestShellDelegate::ToggleMaximized() { |
| 65 aura::Window* window = ash::wm::GetActiveWindow(); | 67 aura::Window* window = ash::wm::GetActiveWindow(); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 | 151 |
| 150 void TestShellDelegate::SaveScreenMagnifierScale(double scale) { | 152 void TestShellDelegate::SaveScreenMagnifierScale(double scale) { |
| 151 } | 153 } |
| 152 | 154 |
| 153 double TestShellDelegate::GetSavedScreenMagnifierScale() { | 155 double TestShellDelegate::GetSavedScreenMagnifierScale() { |
| 154 return std::numeric_limits<double>::min(); | 156 return std::numeric_limits<double>::min(); |
| 155 } | 157 } |
| 156 | 158 |
| 157 } // namespace test | 159 } // namespace test |
| 158 } // namespace ash | 160 } // namespace ash |
| OLD | NEW |