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

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

Issue 2897993003: chromeos: converts WindowResizer to aura::Window (Closed)
Patch Set: remove include from exo Created 3 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
« no previous file with comments | « ash/wm/drag_window_resizer.cc ('k') | ash/wm/overview/window_selector_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/public/cpp/shell_window_ids.h" 8 #include "ash/public/cpp/shell_window_ids.h"
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/shelf/shelf_layout_manager.h" 10 #include "ash/shelf/shelf_layout_manager.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 133 }
134 134
135 ShelfLayoutManager* shelf_layout_manager() { 135 ShelfLayoutManager* shelf_layout_manager() {
136 return Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager(); 136 return Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager();
137 } 137 }
138 138
139 static WindowResizer* CreateDragWindowResizer( 139 static WindowResizer* CreateDragWindowResizer(
140 aura::Window* window, 140 aura::Window* window,
141 const gfx::Point& point_in_parent, 141 const gfx::Point& point_in_parent,
142 int window_component) { 142 int window_component) {
143 return CreateWindowResizer(WmWindow::Get(window), point_in_parent, 143 return CreateWindowResizer(window, point_in_parent, window_component,
144 window_component,
145 aura::client::WINDOW_MOVE_SOURCE_MOUSE) 144 aura::client::WINDOW_MOVE_SOURCE_MOUSE)
146 .release(); 145 .release();
147 } 146 }
148 147
149 bool TestIfMouseWarpsAt(const gfx::Point& point_in_screen) { 148 bool TestIfMouseWarpsAt(const gfx::Point& point_in_screen) {
150 return test::AshTestBase::TestIfMouseWarpsAt(GetEventGenerator(), 149 return test::AshTestBase::TestIfMouseWarpsAt(GetEventGenerator(),
151 point_in_screen); 150 point_in_screen);
152 } 151 }
153 152
154 aura::test::TestWindowDelegate delegate_; 153 aura::test::TestWindowDelegate delegate_;
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 ASSERT_TRUE(resizer.get()); 742 ASSERT_TRUE(resizer.get());
744 resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0); 743 resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0);
745 EXPECT_TRUE(TestIfMouseWarpsAt(gfx::Point(399, 200))); 744 EXPECT_TRUE(TestIfMouseWarpsAt(gfx::Point(399, 200)));
746 EXPECT_EQ("401,200", 745 EXPECT_EQ("401,200",
747 aura::Env::GetInstance()->last_mouse_location().ToString()); 746 aura::Env::GetInstance()->last_mouse_location().ToString());
748 resizer->CompleteDrag(); 747 resizer->CompleteDrag();
749 } 748 }
750 } 749 }
751 750
752 } // namespace ash 751 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/drag_window_resizer.cc ('k') | ash/wm/overview/window_selector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698