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

Unified Diff: ash/wm/workspace/multi_window_resize_controller.cc

Issue 10008084: Add ctrl+drag feature for allowing resizing window with exact positioning. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nits. Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/workspace/multi_window_resize_controller.h ('k') | ash/wm/workspace/workspace_event_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/multi_window_resize_controller.cc
diff --git a/ash/wm/workspace/multi_window_resize_controller.cc b/ash/wm/workspace/multi_window_resize_controller.cc
index ef776450ce8cf7a2632898443b3440374c9dbc12..cde8b66dd1545e5bd860263b6d0e80e92f06025a 100644
--- a/ash/wm/workspace/multi_window_resize_controller.cc
+++ b/ash/wm/workspace/multi_window_resize_controller.cc
@@ -86,11 +86,11 @@ class MultiWindowResizeController::ResizeView : public views::View {
virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE {
gfx::Point location(event.location());
views::View::ConvertPointToScreen(this, &location);
- controller_->Resize(location);
+ controller_->Resize(location, event.flags());
return true;
}
virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE {
- controller_->CompleteResize();
+ controller_->CompleteResize(event.flags());
}
virtual void OnMouseCaptureLost() OVERRIDE {
controller_->CancelResize();
@@ -400,15 +400,16 @@ void MultiWindowResizeController::StartResize(
}
int component = windows_.direction == LEFT_RIGHT ? HTRIGHT : HTBOTTOM;
window_resizer_.reset(WorkspaceWindowResizer::Create(
- windows_.window1, parent_location, component, grid_size_, windows));
+ windows_.window1, parent_location, component, windows));
}
-void MultiWindowResizeController::Resize(const gfx::Point& screen_location) {
+void MultiWindowResizeController::Resize(const gfx::Point& screen_location,
+ int event_flags) {
gfx::Point parent_location(screen_location);
aura::Window::ConvertPointToWindow(windows_.window1->GetRootWindow(),
windows_.window1->parent(),
&parent_location);
- window_resizer_->Drag(parent_location);
+ window_resizer_->Drag(parent_location, event_flags);
gfx::Rect bounds = CalculateResizeWidgetBounds(parent_location);
if (windows_.direction == LEFT_RIGHT)
bounds.set_y(show_bounds_.y());
@@ -417,8 +418,8 @@ void MultiWindowResizeController::Resize(const gfx::Point& screen_location) {
resize_widget_->SetBounds(bounds);
}
-void MultiWindowResizeController::CompleteResize() {
- window_resizer_->CompleteDrag();
+void MultiWindowResizeController::CompleteResize(int event_flags) {
+ window_resizer_->CompleteDrag(event_flags);
window_resizer_.reset();
// Mouse may still be over resizer, if not hide.
« no previous file with comments | « ash/wm/workspace/multi_window_resize_controller.h ('k') | ash/wm/workspace/workspace_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698