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/ash_test_base.h" | 5 #include "ash/test/ash_test_base.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/common/ash_switches.h" | 10 #include "ash/common/ash_switches.h" |
11 #include "ash/common/wm/window_positioner.h" | 11 #include "ash/common/wm/window_positioner.h" |
12 #include "ash/common/wm_root_window_controller.h" | |
13 #include "ash/common/wm_shell.h" | 12 #include "ash/common/wm_shell.h" |
14 #include "ash/common/wm_window.h" | |
15 #include "ash/display/window_tree_host_manager.h" | 13 #include "ash/display/window_tree_host_manager.h" |
16 #include "ash/ime/input_method_event_handler.h" | 14 #include "ash/ime/input_method_event_handler.h" |
17 #include "ash/shell.h" | 15 #include "ash/shell.h" |
18 #include "ash/shell/toplevel_window.h" | 16 #include "ash/shell/toplevel_window.h" |
19 #include "ash/test/ash_test_helper.h" | 17 #include "ash/test/ash_test_helper.h" |
20 #include "ash/test/display_manager_test_api.h" | 18 #include "ash/test/display_manager_test_api.h" |
21 #include "ash/test/test_session_state_delegate.h" | 19 #include "ash/test/test_session_state_delegate.h" |
22 #include "ash/test/test_shell_delegate.h" | 20 #include "ash/test/test_shell_delegate.h" |
23 #include "ash/test/test_system_tray_delegate.h" | 21 #include "ash/test/test_system_tray_delegate.h" |
24 #include "base/command_line.h" | 22 #include "base/command_line.h" |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 // static | 200 // static |
203 bool AshTestBase::SupportsMultipleDisplays() { | 201 bool AshTestBase::SupportsMultipleDisplays() { |
204 return AshTestHelper::SupportsMultipleDisplays(); | 202 return AshTestHelper::SupportsMultipleDisplays(); |
205 } | 203 } |
206 | 204 |
207 // static | 205 // static |
208 bool AshTestBase::SupportsHostWindowResize() { | 206 bool AshTestBase::SupportsHostWindowResize() { |
209 return AshTestHelper::SupportsHostWindowResize(); | 207 return AshTestHelper::SupportsHostWindowResize(); |
210 } | 208 } |
211 | 209 |
212 // static | |
213 WmShelf* AshTestBase::GetPrimaryShelf() { | |
214 return WmShell::Get() | |
215 ->GetPrimaryRootWindow() | |
216 ->GetRootWindowController() | |
217 ->GetShelf(); | |
218 } | |
219 | |
220 void AshTestBase::UpdateDisplay(const std::string& display_specs) { | 210 void AshTestBase::UpdateDisplay(const std::string& display_specs) { |
221 DisplayManagerTestApi().UpdateDisplay(display_specs); | 211 DisplayManagerTestApi().UpdateDisplay(display_specs); |
222 } | 212 } |
223 | 213 |
224 aura::Window* AshTestBase::CurrentContext() { | 214 aura::Window* AshTestBase::CurrentContext() { |
225 return ash_test_helper_->CurrentContext(); | 215 return ash_test_helper_->CurrentContext(); |
226 } | 216 } |
227 | 217 |
228 aura::Window* AshTestBase::CreateTestWindowInShellWithId(int id) { | 218 aura::Window* AshTestBase::CreateTestWindowInShellWithId(int id) { |
229 return CreateTestWindowInShellWithDelegate(NULL, id, gfx::Rect()); | 219 return CreateTestWindowInShellWithDelegate(NULL, id, gfx::Rect()); |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 | 346 |
357 void AshTestBase::DisableIME() { | 347 void AshTestBase::DisableIME() { |
358 Shell::GetInstance()->RemovePreTargetHandler( | 348 Shell::GetInstance()->RemovePreTargetHandler( |
359 Shell::GetInstance() | 349 Shell::GetInstance() |
360 ->window_tree_host_manager() | 350 ->window_tree_host_manager() |
361 ->input_method_event_handler()); | 351 ->input_method_event_handler()); |
362 } | 352 } |
363 | 353 |
364 } // namespace test | 354 } // namespace test |
365 } // namespace ash | 355 } // namespace ash |
OLD | NEW |