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

Side by Side Diff: ash/wm/workspace/workspace_window_resizer_unittest.cc

Issue 13896026: Stick windows to sides of workspaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Dock with zero width (rebase) Created 7 years, 6 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/workspace/workspace_window_resizer.cc ('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) 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/workspace/workspace_window_resizer.h" 5 #include "ash/wm/workspace/workspace_window_resizer.h"
6 6
7 #include "ash/ash_constants.h" 7 #include "ash/ash_constants.h"
8 #include "ash/ash_switches.h" 8 #include "ash/ash_switches.h"
9 #include "ash/display/display_controller.h" 9 #include "ash/display/display_controller.h"
10 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 result += base::IntToString((*i)->id()); 133 result += base::IntToString((*i)->id());
134 } 134 }
135 } 135 }
136 return result; 136 return result;
137 } 137 }
138 138
139 protected: 139 protected:
140 gfx::Point CalculateDragPoint(const WorkspaceWindowResizer& resizer, 140 gfx::Point CalculateDragPoint(const WorkspaceWindowResizer& resizer,
141 int delta_x, 141 int delta_x,
142 int delta_y) const { 142 int delta_y) const {
143 gfx::Point location = resizer.GetInitialLocationInParentForTest(); 143 gfx::Point location = resizer.GetInitialLocation();
144 location.set_x(location.x() + delta_x); 144 location.set_x(location.x() + delta_x);
145 location.set_y(location.y() + delta_y); 145 location.set_y(location.y() + delta_y);
146 return location; 146 return location;
147 } 147 }
148 148
149 std::vector<aura::Window*> empty_windows() const { 149 std::vector<aura::Window*> empty_windows() const {
150 return std::vector<aura::Window*>(); 150 return std::vector<aura::Window*>();
151 } 151 }
152 152
153 internal::ShelfLayoutManager* shelf_layout_manager() { 153 internal::ShelfLayoutManager* shelf_layout_manager() {
(...skipping 1646 matching lines...) Expand 10 before | Expand all | Expand 10 after
1800 // Drag even more to snap to the edge. 1800 // Drag even more to snap to the edge.
1801 generator.GestureScrollSequence(gfx::Point(400, kRootHeight - 40), 1801 generator.GestureScrollSequence(gfx::Point(400, kRootHeight - 40),
1802 gfx::Point(400, kRootHeight - 25), 1802 gfx::Point(400, kRootHeight - 25),
1803 base::TimeDelta::FromMilliseconds(100), 1803 base::TimeDelta::FromMilliseconds(100),
1804 1); 1804 1);
1805 EXPECT_EQ(gfx::Rect(100, 100, 600, kRootHeight - 100).ToString(), 1805 EXPECT_EQ(gfx::Rect(100, 100, 600, kRootHeight - 100).ToString(),
1806 touch_resize_window_->bounds().ToString()); 1806 touch_resize_window_->bounds().ToString());
1807 } 1807 }
1808 } // namespace internal 1808 } // namespace internal
1809 } // namespace ash 1809 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_window_resizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698