Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: ash/test/ash_test_base.cc

Issue 2314853003: Move ash::DisplayManager switches to ui::display (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 #include "ash/common/wm/window_positioner.h" 10 #include "ash/common/wm/window_positioner.h"
12 #include "ash/common/wm_root_window_controller.h" 11 #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" 13 #include "ash/common/wm_window.h"
15 #include "ash/display/window_tree_host_manager.h" 14 #include "ash/display/window_tree_host_manager.h"
16 #include "ash/ime/input_method_event_handler.h" 15 #include "ash/ime/input_method_event_handler.h"
17 #include "ash/shell.h" 16 #include "ash/shell.h"
18 #include "ash/shell/toplevel_window.h" 17 #include "ash/shell/toplevel_window.h"
19 #include "ash/test/ash_test_environment.h" 18 #include "ash/test/ash_test_environment.h"
20 #include "ash/test/ash_test_helper.h" 19 #include "ash/test/ash_test_helper.h"
21 #include "ash/test/display_manager_test_api.h" 20 #include "ash/test/display_manager_test_api.h"
22 #include "ash/test/test_session_state_delegate.h" 21 #include "ash/test/test_session_state_delegate.h"
23 #include "ash/test/test_shell_delegate.h" 22 #include "ash/test/test_shell_delegate.h"
24 #include "ash/test/test_system_tray_delegate.h" 23 #include "ash/test/test_system_tray_delegate.h"
25 #include "base/command_line.h" 24 #include "base/command_line.h"
26 #include "ui/aura/client/aura_constants.h" 25 #include "ui/aura/client/aura_constants.h"
27 #include "ui/aura/client/screen_position_client.h" 26 #include "ui/aura/client/screen_position_client.h"
28 #include "ui/aura/client/window_tree_client.h" 27 #include "ui/aura/client/window_tree_client.h"
29 #include "ui/aura/test/event_generator_delegate_aura.h" 28 #include "ui/aura/test/event_generator_delegate_aura.h"
30 #include "ui/aura/test/test_window_delegate.h" 29 #include "ui/aura/test/test_window_delegate.h"
31 #include "ui/aura/window.h" 30 #include "ui/aura/window.h"
32 #include "ui/aura/window_delegate.h" 31 #include "ui/aura/window_delegate.h"
33 #include "ui/aura/window_tree_host.h" 32 #include "ui/aura/window_tree_host.h"
34 #include "ui/base/ime/input_method_initializer.h" 33 #include "ui/base/ime/input_method_initializer.h"
35 #include "ui/display/display.h" 34 #include "ui/display/display.h"
35 #include "ui/display/display_switches.h"
36 #include "ui/display/screen.h" 36 #include "ui/display/screen.h"
37 #include "ui/events/gesture_detection/gesture_configuration.h" 37 #include "ui/events/gesture_detection/gesture_configuration.h"
38 #include "ui/gfx/geometry/point.h" 38 #include "ui/gfx/geometry/point.h"
39 #include "ui/wm/core/coordinate_conversion.h" 39 #include "ui/wm/core/coordinate_conversion.h"
40 40
41 #if defined(OS_CHROMEOS) 41 #if defined(OS_CHROMEOS)
42 #include "ash/system/chromeos/tray_display.h" 42 #include "ash/system/chromeos/tray_display.h"
43 #endif 43 #endif
44 44
45 #if defined(OS_WIN) 45 #if defined(OS_WIN)
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 setup_called_ = true; 121 setup_called_ = true;
122 122
123 // Clears the saved state so that test doesn't use on the wrong 123 // Clears the saved state so that test doesn't use on the wrong
124 // default state. 124 // default state.
125 shell::ToplevelWindow::ClearSavedStateForTest(); 125 shell::ToplevelWindow::ClearSavedStateForTest();
126 126
127 // TODO(jamescook): Can we do this without changing command line? 127 // TODO(jamescook): Can we do this without changing command line?
128 // Use the origin (1,1) so that it doesn't over 128 // Use the origin (1,1) so that it doesn't over
129 // lap with the native mouse cursor. 129 // lap with the native mouse cursor.
130 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 130 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
131 if (!command_line->HasSwitch(switches::kAshHostWindowBounds)) { 131 if (!command_line->HasSwitch(::switches::kHostWindowBounds)) {
132 command_line->AppendSwitchASCII(switches::kAshHostWindowBounds, 132 command_line->AppendSwitchASCII(::switches::kHostWindowBounds,
133 "1+1-800x600"); 133 "1+1-800x600");
134 } 134 }
135 #if defined(OS_WIN) 135 #if defined(OS_WIN)
136 ui::test::SetUsePopupAsRootWindowForTest(true); 136 ui::test::SetUsePopupAsRootWindowForTest(true);
137 #endif 137 #endif
138 138
139 ash_test_helper_->SetUp(start_session_, material_mode_); 139 ash_test_helper_->SetUp(start_session_, material_mode_);
140 140
141 Shell::GetPrimaryRootWindow()->Show(); 141 Shell::GetPrimaryRootWindow()->Show();
142 Shell::GetPrimaryRootWindow()->GetHost()->Show(); 142 Shell::GetPrimaryRootWindow()->GetHost()->Show();
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 380
381 void AshTestBase::DisableIME() { 381 void AshTestBase::DisableIME() {
382 Shell::GetInstance()->RemovePreTargetHandler( 382 Shell::GetInstance()->RemovePreTargetHandler(
383 Shell::GetInstance() 383 Shell::GetInstance()
384 ->window_tree_host_manager() 384 ->window_tree_host_manager()
385 ->input_method_event_handler()); 385 ->input_method_event_handler());
386 } 386 }
387 387
388 } // namespace test 388 } // namespace test
389 } // namespace ash 389 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698