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

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

Issue 948583005: Add more tests for mouse rotation,scale&position after display change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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') | no next file » | 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/display_controller.h" 8 #include "ash/display/display_controller.h"
9 #include "ash/display/mirror_window_controller.h" 9 #include "ash/display/mirror_window_controller.h"
10 #include "ash/host/root_window_transformer.h" 10 #include "ash/host/root_window_transformer.h"
(...skipping 14 matching lines...) Expand all
25 int MirrorWindowTestApi::GetCurrentCursorType() const { 25 int MirrorWindowTestApi::GetCurrentCursorType() const {
26 return Shell::GetInstance()->display_controller()-> 26 return Shell::GetInstance()->display_controller()->
27 cursor_window_controller()->cursor_type_; 27 cursor_window_controller()->cursor_type_;
28 } 28 }
29 29
30 const gfx::Point& MirrorWindowTestApi::GetCursorHotPoint() const { 30 const gfx::Point& MirrorWindowTestApi::GetCursorHotPoint() const {
31 return Shell::GetInstance()->display_controller()-> 31 return Shell::GetInstance()->display_controller()->
32 cursor_window_controller()->hot_point_; 32 cursor_window_controller()->hot_point_;
33 } 33 }
34 34
35 gfx::Point MirrorWindowTestApi::GetCursorHotPointLocationInRootWindow() const {
36 return GetCursorWindow()->GetBoundsInRootWindow().origin() +
37 GetCursorHotPoint().OffsetFromOrigin();
38 }
39
35 const aura::Window* MirrorWindowTestApi::GetCursorWindow() const { 40 const aura::Window* MirrorWindowTestApi::GetCursorWindow() const {
36 return Shell::GetInstance()->display_controller()-> 41 return Shell::GetInstance()->display_controller()->
37 cursor_window_controller()->cursor_window_.get(); 42 cursor_window_controller()->cursor_window_.get();
38 } 43 }
39 44
40 gfx::Point MirrorWindowTestApi::GetCursorLocation() const { 45 gfx::Point MirrorWindowTestApi::GetCursorLocation() const {
41 gfx::Point point = GetCursorWindow()->GetBoundsInScreen().origin(); 46 gfx::Point point = GetCursorWindow()->GetBoundsInScreen().origin();
42 const gfx::Point hot_point = GetCursorHotPoint(); 47 const gfx::Point hot_point = GetCursorHotPoint();
43 point.Offset(hot_point.x(), hot_point.y()); 48 point.Offset(hot_point.x(), hot_point.y());
44 return point; 49 return point;
45 } 50 }
46 51
47 scoped_ptr<RootWindowTransformer> 52 scoped_ptr<RootWindowTransformer>
48 MirrorWindowTestApi::CreateCurrentRootWindowTransformer() const { 53 MirrorWindowTestApi::CreateCurrentRootWindowTransformer() const {
49 return Shell::GetInstance()->display_controller()-> 54 return Shell::GetInstance()->display_controller()->
50 mirror_window_controller()->CreateRootWindowTransformer(); 55 mirror_window_controller()->CreateRootWindowTransformer();
51 } 56 }
52 57
53 } // namespace test 58 } // namespace test
54 } // namespace ash 59 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/mirror_window_test_api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698