| OLD | NEW |
| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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->WarpMouseCursorIfNecessaryForTest( | 128 bool is_warped = event_filter->WarpMouseCursorIfNecessaryForTest( |
| 129 target_root, point_in_screen); | 129 target_root, point_in_screen); |
| 130 event_filter->reset_was_mouse_warped_for_test(); | |
| 131 return is_warped; | 130 return is_warped; |
| 132 } | 131 } |
| 133 | 132 |
| 134 aura::test::TestWindowDelegate delegate_; | 133 aura::test::TestWindowDelegate delegate_; |
| 135 aura::test::TestWindowDelegate delegate2_; | 134 aura::test::TestWindowDelegate delegate2_; |
| 136 aura::test::TestWindowDelegate delegate3_; | 135 aura::test::TestWindowDelegate delegate3_; |
| 137 aura::test::TestWindowDelegate delegate4_; | 136 aura::test::TestWindowDelegate delegate4_; |
| 138 aura::test::TestWindowDelegate delegate5_; | 137 aura::test::TestWindowDelegate delegate5_; |
| 139 aura::test::TestWindowDelegate delegate6_; | 138 aura::test::TestWindowDelegate delegate6_; |
| 140 | 139 |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 window, gfx::Point(), HTCAPTION)); | 627 window, gfx::Point(), HTCAPTION)); |
| 629 ASSERT_TRUE(resizer.get()); | 628 ASSERT_TRUE(resizer.get()); |
| 630 resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0); | 629 resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0); |
| 631 EXPECT_TRUE(WarpMouseCursorIfNecessary(root_windows[0], | 630 EXPECT_TRUE(WarpMouseCursorIfNecessary(root_windows[0], |
| 632 gfx::Point(399, 200))); | 631 gfx::Point(399, 200))); |
| 633 resizer->CompleteDrag(); | 632 resizer->CompleteDrag(); |
| 634 } | 633 } |
| 635 } | 634 } |
| 636 | 635 |
| 637 } // namespace ash | 636 } // namespace ash |
| OLD | NEW |