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/host/root_window_host_factory.h" | 10 #include "ash/host/root_window_host_factory.h" |
11 #include "ash/shell.h" | 11 #include "ash/shell.h" |
12 #include "ash/shell_window_ids.h" | 12 #include "ash/shell_window_ids.h" |
13 #include "ash/test/test_launcher_delegate.h" | 13 #include "ash/test/test_launcher_delegate.h" |
14 #include "ash/wm/stacking_controller.h" | |
15 #include "ash/wm/window_util.h" | 14 #include "ash/wm/window_util.h" |
16 #include "content/public/test/test_browser_context.h" | 15 #include "content/public/test/test_browser_context.h" |
17 #include "ui/aura/window.h" | 16 #include "ui/aura/window.h" |
18 | 17 |
19 namespace ash { | 18 namespace ash { |
20 namespace test { | 19 namespace test { |
21 | 20 |
22 TestShellDelegate::TestShellDelegate() | 21 TestShellDelegate::TestShellDelegate() |
23 : locked_(false), | 22 : locked_(false), |
24 session_started_(true), | 23 session_started_(true), |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 } | 196 } |
198 | 197 |
199 ui::MenuModel* TestShellDelegate::CreateContextMenu(aura::RootWindow* root) { | 198 ui::MenuModel* TestShellDelegate::CreateContextMenu(aura::RootWindow* root) { |
200 return NULL; | 199 return NULL; |
201 } | 200 } |
202 | 201 |
203 double TestShellDelegate::GetSavedScreenMagnifierScale() { | 202 double TestShellDelegate::GetSavedScreenMagnifierScale() { |
204 return std::numeric_limits<double>::min(); | 203 return std::numeric_limits<double>::min(); |
205 } | 204 } |
206 | 205 |
207 aura::client::StackingClient* TestShellDelegate::CreateStackingClient() { | |
208 return new StackingController; | |
209 } | |
210 | |
211 RootWindowHostFactory* TestShellDelegate::CreateRootWindowHostFactory() { | 206 RootWindowHostFactory* TestShellDelegate::CreateRootWindowHostFactory() { |
212 return RootWindowHostFactory::Create(); | 207 return RootWindowHostFactory::Create(); |
213 } | 208 } |
214 | 209 |
215 void TestShellDelegate::SetSessionStarted(bool session_started) { | 210 void TestShellDelegate::SetSessionStarted(bool session_started) { |
216 session_started_ = session_started; | 211 session_started_ = session_started; |
217 if (session_started) | 212 if (session_started) |
218 user_logged_in_ = true; | 213 user_logged_in_ = true; |
219 } | 214 } |
220 | 215 |
221 void TestShellDelegate::SetUserLoggedIn(bool user_logged_in) { | 216 void TestShellDelegate::SetUserLoggedIn(bool user_logged_in) { |
222 user_logged_in_ = user_logged_in; | 217 user_logged_in_ = user_logged_in; |
223 if (!user_logged_in) | 218 if (!user_logged_in) |
224 session_started_ = false; | 219 session_started_ = false; |
225 } | 220 } |
226 | 221 |
227 void TestShellDelegate::SetCanLockScreen(bool can_lock_screen) { | 222 void TestShellDelegate::SetCanLockScreen(bool can_lock_screen) { |
228 can_lock_screen_ = can_lock_screen; | 223 can_lock_screen_ = can_lock_screen; |
229 } | 224 } |
230 | 225 |
231 } // namespace test | 226 } // namespace test |
232 } // namespace ash | 227 } // namespace ash |
OLD | NEW |