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

Unified Diff: components/exo/shell_surface.cc

Issue 2968593002: exo: Drop window on touch release (Closed)
Patch Set: DCHECK events 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..ea3c4e9a35f049e8fa6f96459e1588ab647ad4dd 100644
--- a/components/exo/shell_surface.cc
+++ b/components/exo/shell_surface.cc
@@ -1118,6 +1118,29 @@ void ShellSurface::OnMouseEvent(ui::MouseEvent* event) {
}
}
+void ShellSurface::OnGestureEvent(ui::GestureEvent* event) {
+ if (!resizer_) {
+ views::View::OnGestureEvent(event);
+ return;
+ }
+
+ if (event->handled())
+ return;
+
+ switch (event->type()) {
+ case ui::ET_GESTURE_END: {
+ ScopedConfigure scoped_configure(this, false);
+ EndDrag(false /* revert */);
+ break;
+ }
+
reveman 2017/06/30 21:48:16 nit: remove this blank line
Dominik Laskowski 2017/06/30 22:27:57 Done.
+ default:
+ DCHECK_GE(event->type(), ui::ET_GESTURE_TYPE_START);
reveman 2017/06/30 21:48:16 either add all enum values above even if there's a
Dominik Laskowski 2017/06/30 22:27:57 Done.
+ DCHECK_LE(event->type(), ui::ET_GESTURE_TYPE_END);
+ 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