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 <limits> | 7 #include <limits> |
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/session_state_delegate.h" | 11 #include "ash/session_state_delegate.h" |
12 #include "ash/shell.h" | 12 #include "ash/shell.h" |
13 #include "ash/shell_window_ids.h" | 13 #include "ash/shell_window_ids.h" |
14 #include "ash/test/test_launcher_delegate.h" | 14 #include "ash/test/test_launcher_delegate.h" |
15 #include "ash/test/test_session_state_delegate.h" | 15 #include "ash/test/test_session_state_delegate.h" |
16 #include "ash/wm/window_util.h" | 16 #include "ash/wm/window_util.h" |
17 #include "base/logging.h" | 17 #include "base/logging.h" |
18 #include "content/public/test/test_browser_context.h" | 18 #include "content/public/test/test_browser_context.h" |
19 #include "ui/aura/window.h" | 19 #include "ui/aura/window.h" |
20 #include "ui/compositor/compositor.h" | |
21 | 20 |
22 namespace ash { | 21 namespace ash { |
23 namespace test { | 22 namespace test { |
24 | 23 |
25 TestShellDelegate::TestShellDelegate() | 24 TestShellDelegate::TestShellDelegate() |
26 : spoken_feedback_enabled_(false), | 25 : spoken_feedback_enabled_(false), |
27 high_contrast_enabled_(false), | 26 high_contrast_enabled_(false), |
28 screen_magnifier_enabled_(false), | 27 screen_magnifier_enabled_(false), |
29 screen_magnifier_type_(kDefaultMagnifierType), | 28 screen_magnifier_type_(kDefaultMagnifierType), |
30 large_cursor_enabled_(false), | 29 large_cursor_enabled_(false), |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 | 196 |
198 ui::MenuModel* TestShellDelegate::CreateContextMenu(aura::RootWindow* root) { | 197 ui::MenuModel* TestShellDelegate::CreateContextMenu(aura::RootWindow* root) { |
199 return NULL; | 198 return NULL; |
200 } | 199 } |
201 | 200 |
202 double TestShellDelegate::GetSavedScreenMagnifierScale() { | 201 double TestShellDelegate::GetSavedScreenMagnifierScale() { |
203 return std::numeric_limits<double>::min(); | 202 return std::numeric_limits<double>::min(); |
204 } | 203 } |
205 | 204 |
206 RootWindowHostFactory* TestShellDelegate::CreateRootWindowHostFactory() { | 205 RootWindowHostFactory* TestShellDelegate::CreateRootWindowHostFactory() { |
207 // The ContextFactory must exist before any Compositors are created. | |
208 bool allow_test_contexts = true; | |
209 ui::Compositor::InitializeContextFactoryForTests(allow_test_contexts); | |
210 | |
211 return RootWindowHostFactory::Create(); | 206 return RootWindowHostFactory::Create(); |
212 } | 207 } |
213 | 208 |
214 base::string16 TestShellDelegate::GetProductName() const { | 209 base::string16 TestShellDelegate::GetProductName() const { |
215 return base::string16(); | 210 return base::string16(); |
216 } | 211 } |
217 | 212 |
218 TestSessionStateDelegate* TestShellDelegate::test_session_state_delegate() { | 213 TestSessionStateDelegate* TestShellDelegate::test_session_state_delegate() { |
219 return test_session_state_delegate_; | 214 return test_session_state_delegate_; |
220 } | 215 } |
221 | 216 |
222 } // namespace test | 217 } // namespace test |
223 } // namespace ash | 218 } // namespace ash |
OLD | NEW |