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

Unified Diff: components/exo/shell_surface.cc

Issue 2968593002: exo: Drop window on touch release (Closed)
Patch Set: Link to bug in TODO Created 3 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 | « components/exo/shell_surface.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/shell_surface.cc
diff --git a/components/exo/shell_surface.cc b/components/exo/shell_surface.cc
index 565afe40560b9392a8a78bb158febb303d20936b..c9be39ba8d50200277c1621d16d8705a3c959765 100644
--- a/components/exo/shell_surface.cc
+++ b/components/exo/shell_surface.cc
@@ -1118,6 +1118,50 @@ void ShellSurface::OnMouseEvent(ui::MouseEvent* event) {
}
}
+void ShellSurface::OnGestureEvent(ui::GestureEvent* event) {
+ if (!resizer_) {
+ views::View::OnGestureEvent(event);
+ return;
+ }
+
+ if (event->handled())
+ return;
+
+ // TODO(domlaskowski): Handle touch dragging/resizing for BoundsMode::SHELL.
+ // See crbug.com/738606.
+ switch (event->type()) {
+ case ui::ET_GESTURE_END: {
+ ScopedConfigure scoped_configure(this, false);
+ EndDrag(false /* revert */);
+ break;
+ }
+ case ui::ET_GESTURE_SCROLL_BEGIN:
+ case ui::ET_GESTURE_SCROLL_END:
+ case ui::ET_GESTURE_SCROLL_UPDATE:
+ case ui::ET_GESTURE_TAP:
+ case ui::ET_GESTURE_TAP_DOWN:
+ case ui::ET_GESTURE_TAP_CANCEL:
+ case ui::ET_GESTURE_TAP_UNCONFIRMED:
+ case ui::ET_GESTURE_DOUBLE_TAP:
+ case ui::ET_GESTURE_BEGIN:
+ case ui::ET_GESTURE_TWO_FINGER_TAP:
+ case ui::ET_GESTURE_PINCH_BEGIN:
+ case ui::ET_GESTURE_PINCH_END:
+ case ui::ET_GESTURE_PINCH_UPDATE:
+ case ui::ET_GESTURE_LONG_PRESS:
+ case ui::ET_GESTURE_LONG_TAP:
+ case ui::ET_GESTURE_SWIPE:
+ case ui::ET_GESTURE_SHOW_PRESS:
+ case ui::ET_SCROLL:
+ case ui::ET_SCROLL_FLING_START:
+ case ui::ET_SCROLL_FLING_CANCEL:
+ break;
+ default:
+ NOTREACHED();
+ break;
+ }
+}
+
////////////////////////////////////////////////////////////////////////////////
// ui::AcceleratorTarget overrides:
« no previous file with comments | « components/exo/shell_surface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698