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

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

Issue 2833163002: Change ui cursor identifiers to an enum class. (Closed)
Patch Set: OK, it can't be explicit for mac. Created 3 years, 8 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/test/mirror_window_test_api.h ('k') | ash/utility/screenshot_controller.cc » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/mirror_window_test_api.h" 5 #include "ash/test/mirror_window_test_api.h"
6 6
7 #include "ash/display/cursor_window_controller.h" 7 #include "ash/display/cursor_window_controller.h"
8 #include "ash/display/mirror_window_controller.h" 8 #include "ash/display/mirror_window_controller.h"
9 #include "ash/display/root_window_transformers.h" 9 #include "ash/display/root_window_transformers.h"
10 #include "ash/display/window_tree_host_manager.h" 10 #include "ash/display/window_tree_host_manager.h"
11 #include "ash/host/root_window_transformer.h" 11 #include "ash/host/root_window_transformer.h"
12 #include "ash/shell.h" 12 #include "ash/shell.h"
13 #include "ui/gfx/geometry/point.h" 13 #include "ui/gfx/geometry/point.h"
14 14
15 namespace ash { 15 namespace ash {
16 namespace test { 16 namespace test {
17 17
18 const aura::WindowTreeHost* MirrorWindowTestApi::GetHost() const { 18 const aura::WindowTreeHost* MirrorWindowTestApi::GetHost() const {
19 aura::Window* window = Shell::Get() 19 aura::Window* window = Shell::Get()
20 ->window_tree_host_manager() 20 ->window_tree_host_manager()
21 ->mirror_window_controller() 21 ->mirror_window_controller()
22 ->GetWindow(); 22 ->GetWindow();
23 return window ? window->GetHost() : NULL; 23 return window ? window->GetHost() : NULL;
24 } 24 }
25 25
26 int MirrorWindowTestApi::GetCurrentCursorType() const { 26 ui::CursorType MirrorWindowTestApi::GetCurrentCursorType() const {
27 return Shell::Get() 27 return Shell::Get()
28 ->window_tree_host_manager() 28 ->window_tree_host_manager()
29 ->cursor_window_controller() 29 ->cursor_window_controller()
30 ->cursor_type_; 30 ->cursor_type_;
31 } 31 }
32 32
33 const gfx::Point& MirrorWindowTestApi::GetCursorHotPoint() const { 33 const gfx::Point& MirrorWindowTestApi::GetCursorHotPoint() const {
34 return Shell::Get() 34 return Shell::Get()
35 ->window_tree_host_manager() 35 ->window_tree_host_manager()
36 ->cursor_window_controller() 36 ->cursor_window_controller()
(...skipping 14 matching lines...) Expand all
51 51
52 gfx::Point MirrorWindowTestApi::GetCursorLocation() const { 52 gfx::Point MirrorWindowTestApi::GetCursorLocation() const {
53 gfx::Point point = GetCursorWindow()->GetBoundsInScreen().origin(); 53 gfx::Point point = GetCursorWindow()->GetBoundsInScreen().origin();
54 const gfx::Point hot_point = GetCursorHotPoint(); 54 const gfx::Point hot_point = GetCursorHotPoint();
55 point.Offset(hot_point.x(), hot_point.y()); 55 point.Offset(hot_point.x(), hot_point.y());
56 return point; 56 return point;
57 } 57 }
58 58
59 } // namespace test 59 } // namespace test
60 } // namespace ash 60 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/mirror_window_test_api.h ('k') | ash/utility/screenshot_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698