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

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

Issue 425363002: Moving coordinate conversion methods from ash/wm to ui/wm. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More fixes Created 6 years, 4 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
« no previous file with comments | « ash/shelf/shelf_view_unittest.cc ('k') | ash/wm/coordinate_conversion.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ash_switches.h" 10 #include "ash/ash_switches.h"
11 #include "ash/display/display_controller.h" 11 #include "ash/display/display_controller.h"
12 #include "ash/shell.h" 12 #include "ash/shell.h"
13 #include "ash/shell/toplevel_window.h" 13 #include "ash/shell/toplevel_window.h"
14 #include "ash/test/ash_test_helper.h" 14 #include "ash/test/ash_test_helper.h"
15 #include "ash/test/display_manager_test_api.h" 15 #include "ash/test/display_manager_test_api.h"
16 #include "ash/test/test_session_state_delegate.h" 16 #include "ash/test/test_session_state_delegate.h"
17 #include "ash/test/test_shell_delegate.h" 17 #include "ash/test/test_shell_delegate.h"
18 #include "ash/test/test_system_tray_delegate.h" 18 #include "ash/test/test_system_tray_delegate.h"
19 #include "ash/wm/coordinate_conversion.h"
20 #include "ash/wm/window_positioner.h" 19 #include "ash/wm/window_positioner.h"
21 #include "base/command_line.h" 20 #include "base/command_line.h"
22 #include "ui/aura/client/aura_constants.h" 21 #include "ui/aura/client/aura_constants.h"
23 #include "ui/aura/client/screen_position_client.h" 22 #include "ui/aura/client/screen_position_client.h"
24 #include "ui/aura/client/window_tree_client.h" 23 #include "ui/aura/client/window_tree_client.h"
25 #include "ui/aura/test/event_generator_delegate_aura.h" 24 #include "ui/aura/test/event_generator_delegate_aura.h"
26 #include "ui/aura/test/test_window_delegate.h" 25 #include "ui/aura/test/test_window_delegate.h"
27 #include "ui/aura/window.h" 26 #include "ui/aura/window.h"
28 #include "ui/aura/window_delegate.h" 27 #include "ui/aura/window_delegate.h"
29 #include "ui/aura/window_tree_host.h" 28 #include "ui/aura/window_tree_host.h"
30 #include "ui/base/ime/input_method_initializer.h" 29 #include "ui/base/ime/input_method_initializer.h"
31 #include "ui/events/gestures/gesture_configuration.h" 30 #include "ui/events/gestures/gesture_configuration.h"
32 #include "ui/gfx/display.h" 31 #include "ui/gfx/display.h"
33 #include "ui/gfx/point.h" 32 #include "ui/gfx/point.h"
34 #include "ui/gfx/screen.h" 33 #include "ui/gfx/screen.h"
34 #include "ui/wm/core/coordinate_conversion.h"
35 35
36 #if defined(OS_CHROMEOS) 36 #if defined(OS_CHROMEOS)
37 #include "ash/system/chromeos/tray_display.h" 37 #include "ash/system/chromeos/tray_display.h"
38 #endif 38 #endif
39 39
40 #if defined(OS_WIN) 40 #if defined(OS_WIN)
41 #include "ash/test/test_metro_viewer_process_host.h" 41 #include "ash/test/test_metro_viewer_process_host.h"
42 #include "base/test/test_process_killer_win.h" 42 #include "base/test/test_process_killer_win.h"
43 #include "base/win/metro.h" 43 #include "base/win/metro.h"
44 #include "base/win/windows_version.h" 44 #include "base/win/windows_version.h"
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 window->Show(); 255 window->Show();
256 256
257 if (bounds.IsEmpty()) { 257 if (bounds.IsEmpty()) {
258 ParentWindowInPrimaryRootWindow(window); 258 ParentWindowInPrimaryRootWindow(window);
259 } else { 259 } else {
260 gfx::Display display = 260 gfx::Display display =
261 Shell::GetScreen()->GetDisplayMatching(bounds); 261 Shell::GetScreen()->GetDisplayMatching(bounds);
262 aura::Window* root = ash::Shell::GetInstance()->display_controller()-> 262 aura::Window* root = ash::Shell::GetInstance()->display_controller()->
263 GetRootWindowForDisplayId(display.id()); 263 GetRootWindowForDisplayId(display.id());
264 gfx::Point origin = bounds.origin(); 264 gfx::Point origin = bounds.origin();
265 wm::ConvertPointFromScreen(root, &origin); 265 ::wm::ConvertPointFromScreen(root, &origin);
266 window->SetBounds(gfx::Rect(origin, bounds.size())); 266 window->SetBounds(gfx::Rect(origin, bounds.size()));
267 aura::client::ParentWindowWithContext(window, root, bounds); 267 aura::client::ParentWindowWithContext(window, root, bounds);
268 } 268 }
269 window->SetProperty(aura::client::kCanMaximizeKey, true); 269 window->SetProperty(aura::client::kCanMaximizeKey, true);
270 return window; 270 return window;
271 } 271 }
272 272
273 void AshTestBase::ParentWindowInPrimaryRootWindow(aura::Window* window) { 273 void AshTestBase::ParentWindowInPrimaryRootWindow(aura::Window* window) {
274 aura::client::ParentWindowWithContext( 274 aura::client::ParentWindowWithContext(
275 window, Shell::GetPrimaryRootWindow(), gfx::Rect()); 275 window, Shell::GetPrimaryRootWindow(), gfx::Rect());
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 336
337 void AshTestBase::UnblockUserSession() { 337 void AshTestBase::UnblockUserSession() {
338 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); 338 Shell::GetInstance()->session_state_delegate()->UnlockScreen();
339 SetSessionStarted(true); 339 SetSessionStarted(true);
340 SetUserAddingScreenRunning(false); 340 SetUserAddingScreenRunning(false);
341 } 341 }
342 342
343 343
344 } // namespace test 344 } // namespace test
345 } // namespace ash 345 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_view_unittest.cc ('k') | ash/wm/coordinate_conversion.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698