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

Side by Side Diff: ash/wm/drag_window_resizer_unittest.cc

Issue 270863005: Use native coordinates to warp the cursor to another display. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « ash/wm/coordinate_conversion.cc ('k') | ash/wm/immersive_fullscreen_controller_unittest.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) 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/wm/drag_window_resizer.h" 5 #include "ash/wm/drag_window_resizer.h"
6 6
7 #include "ash/display/mouse_cursor_event_filter.h" 7 #include "ash/display/mouse_cursor_event_filter.h"
8 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/shelf/shelf_layout_manager.h" 9 #include "ash/shelf/shelf_layout_manager.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 window, 118 window,
119 point_in_parent, 119 point_in_parent,
120 window_component, 120 window_component,
121 aura::client::WINDOW_MOVE_SOURCE_MOUSE).release(); 121 aura::client::WINDOW_MOVE_SOURCE_MOUSE).release();
122 } 122 }
123 123
124 bool WarpMouseCursorIfNecessary(aura::Window* target_root, 124 bool WarpMouseCursorIfNecessary(aura::Window* target_root,
125 const gfx::Point& point_in_screen) { 125 const gfx::Point& point_in_screen) {
126 MouseCursorEventFilter* event_filter = 126 MouseCursorEventFilter* event_filter =
127 Shell::GetInstance()->mouse_cursor_filter(); 127 Shell::GetInstance()->mouse_cursor_filter();
128 bool is_warped = event_filter->WarpMouseCursorIfNecessary(target_root, 128 bool is_warped = event_filter->WarpMouseCursorIfNecessaryForTest(
129 point_in_screen); 129 target_root, point_in_screen);
130 event_filter->reset_was_mouse_warped_for_test(); 130 event_filter->reset_was_mouse_warped_for_test();
131 return is_warped; 131 return is_warped;
132 } 132 }
133 133
134 aura::test::TestWindowDelegate delegate_; 134 aura::test::TestWindowDelegate delegate_;
135 aura::test::TestWindowDelegate delegate2_; 135 aura::test::TestWindowDelegate delegate2_;
136 aura::test::TestWindowDelegate delegate3_; 136 aura::test::TestWindowDelegate delegate3_;
137 aura::test::TestWindowDelegate delegate4_; 137 aura::test::TestWindowDelegate delegate4_;
138 aura::test::TestWindowDelegate delegate5_; 138 aura::test::TestWindowDelegate delegate5_;
139 aura::test::TestWindowDelegate delegate6_; 139 aura::test::TestWindowDelegate delegate6_;
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 window, gfx::Point(), HTCAPTION)); 626 window, gfx::Point(), HTCAPTION));
627 ASSERT_TRUE(resizer.get()); 627 ASSERT_TRUE(resizer.get());
628 resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0); 628 resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0);
629 EXPECT_TRUE(WarpMouseCursorIfNecessary(root_windows[0], 629 EXPECT_TRUE(WarpMouseCursorIfNecessary(root_windows[0],
630 gfx::Point(399, 200))); 630 gfx::Point(399, 200)));
631 resizer->CompleteDrag(); 631 resizer->CompleteDrag();
632 } 632 }
633 } 633 }
634 634
635 } // namespace ash 635 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/coordinate_conversion.cc ('k') | ash/wm/immersive_fullscreen_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698