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

Unified Diff: ash/wm/toplevel_window_event_handler.cc

Issue 15008002: Make touch-resizing windows to screen edge possible (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adjust unit tests with final behavior 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/toplevel_window_event_handler.h ('k') | ash/wm/window_resizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/toplevel_window_event_handler.cc
diff --git a/ash/wm/toplevel_window_event_handler.cc b/ash/wm/toplevel_window_event_handler.cc
index d611354b8dcb49f2d6e66696edfcbb6e08581b46..ed4818f9b1fb282af396e2e4028c3c0b77fe0e79 100644
--- a/ash/wm/toplevel_window_event_handler.cc
+++ b/ash/wm/toplevel_window_event_handler.cc
@@ -228,7 +228,8 @@ void ToplevelWindowEventHandler::OnGestureEvent(ui::GestureEvent* event) {
pre_drag_window_bounds_ = target->bounds();
gfx::Point location_in_parent(
ConvertPointToParent(target, event->location()));
- CreateScopedWindowResizer(target, location_in_parent, component);
+ CreateScopedWindowResizer(target, location_in_parent, component,
+ aura::client::WINDOW_MOVE_SOURCE_TOUCH);
break;
}
case ui::ET_GESTURE_SCROLL_UPDATE: {
@@ -323,7 +324,7 @@ aura::client::WindowMoveResult ToplevelWindowEventHandler::RunMoveLoop(
aura::Window::ConvertPointToTarget(
root_window, source->parent(), &drag_location);
}
- CreateScopedWindowResizer(source, drag_location, HTCAPTION);
+ CreateScopedWindowResizer(source, drag_location, HTCAPTION, move_source);
aura::client::CursorClient* cursor_client =
aura::client::GetCursorClient(root_window);
if (cursor_client)
@@ -370,10 +371,12 @@ void ToplevelWindowEventHandler::OnDisplayConfigurationChanging() {
void ToplevelWindowEventHandler::CreateScopedWindowResizer(
aura::Window* window,
const gfx::Point& point_in_parent,
- int window_component) {
+ int window_component,
+ aura::client::WindowMoveSource source) {
window_resizer_.reset();
WindowResizer* resizer =
- CreateWindowResizer(window, point_in_parent, window_component).release();
+ CreateWindowResizer(window, point_in_parent, window_component,
+ source).release();
if (resizer)
window_resizer_.reset(new ScopedWindowResizer(this, resizer));
}
@@ -407,7 +410,8 @@ void ToplevelWindowEventHandler::HandleMousePressed(
WindowResizer::GetBoundsChangeForWindowComponent(component)) {
gfx::Point location_in_parent(
ConvertPointToParent(target, event->location()));
- CreateScopedWindowResizer(target, location_in_parent, component);
+ CreateScopedWindowResizer(target, location_in_parent, component,
+ aura::client::WINDOW_MOVE_SOURCE_MOUSE);
} else {
window_resizer_.reset();
}
« no previous file with comments | « ash/wm/toplevel_window_event_handler.h ('k') | ash/wm/window_resizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698