OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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/ash_test_helper.h" | 5 #include "ash/test/ash_test_helper.h" |
6 | 6 |
7 #include "ash/accelerators/accelerator_controller.h" | 7 #include "ash/accelerators/accelerator_controller.h" |
8 #include "ash/ash_switches.h" | 8 #include "ash/ash_switches.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/test/display_manager_test_api.h" | 10 #include "ash/test/display_manager_test_api.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "ui/message_center/message_center.h" | 23 #include "ui/message_center/message_center.h" |
24 #include "ui/wm/core/capture_controller.h" | 24 #include "ui/wm/core/capture_controller.h" |
25 #include "ui/wm/core/wm_state.h" | 25 #include "ui/wm/core/wm_state.h" |
26 | 26 |
27 #if defined(OS_CHROMEOS) | 27 #if defined(OS_CHROMEOS) |
28 #include "chromeos/audio/cras_audio_handler.h" | 28 #include "chromeos/audio/cras_audio_handler.h" |
29 #include "chromeos/dbus/dbus_thread_manager.h" | 29 #include "chromeos/dbus/dbus_thread_manager.h" |
30 #include "ui/keyboard/keyboard.h" | 30 #include "ui/keyboard/keyboard.h" |
31 #endif | 31 #endif |
32 | 32 |
| 33 #if defined(OS_WIN) |
| 34 #include "base/win/windows_version.h" |
| 35 #endif |
| 36 |
33 #if defined(USE_X11) | 37 #if defined(USE_X11) |
34 #include "ui/aura/window_tree_host_x11.h" | 38 #include "ui/aura/window_tree_host_x11.h" |
35 #endif | 39 #endif |
36 | 40 |
37 namespace ash { | 41 namespace ash { |
38 namespace test { | 42 namespace test { |
39 | 43 |
40 AshTestHelper::AshTestHelper(base::MessageLoopForUI* message_loop) | 44 AshTestHelper::AshTestHelper(base::MessageLoopForUI* message_loop) |
41 : message_loop_(message_loop), | 45 : message_loop_(message_loop), |
42 test_shell_delegate_(NULL), | 46 test_shell_delegate_(NULL), |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 } | 144 } |
141 | 145 |
142 aura::Window* AshTestHelper::CurrentContext() { | 146 aura::Window* AshTestHelper::CurrentContext() { |
143 aura::Window* root_window = Shell::GetTargetRootWindow(); | 147 aura::Window* root_window = Shell::GetTargetRootWindow(); |
144 if (!root_window) | 148 if (!root_window) |
145 root_window = Shell::GetPrimaryRootWindow(); | 149 root_window = Shell::GetPrimaryRootWindow(); |
146 DCHECK(root_window); | 150 DCHECK(root_window); |
147 return root_window; | 151 return root_window; |
148 } | 152 } |
149 | 153 |
| 154 // static |
| 155 bool AshTestHelper::SupportsMultipleDisplays() { |
| 156 #if defined(OS_WIN) |
| 157 return base::win::GetVersion() < base::win::VERSION_WIN8; |
| 158 #else |
| 159 return true; |
| 160 #endif |
| 161 } |
| 162 |
| 163 // static |
| 164 bool AshTestHelper::SupportsHostWindowResize() { |
| 165 #if defined(OS_WIN) |
| 166 return base::win::GetVersion() < base::win::VERSION_WIN8; |
| 167 #else |
| 168 return true; |
| 169 #endif |
| 170 } |
| 171 |
150 } // namespace test | 172 } // namespace test |
151 } // namespace ash | 173 } // namespace ash |
OLD | NEW |