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

Unified Diff: components/exo/shell_surface.cc

Issue 2968593002: exo: Drop window on touch release (Closed)
Patch Set: Address nits 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..1ce97a9ffe60ed261949a99db7b2f6299dcc3f3e 100644
--- a/components/exo/shell_surface.cc
+++ b/components/exo/shell_surface.cc
@@ -1118,6 +1118,49 @@ 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.
reveman 2017/06/30 22:30:07 nit: please add bug number
Dominik Laskowski 2017/06/30 22:44:16 Done.
+ 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