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

Unified Diff: services/window_manager/window_manager_app.cc

Issue 868463010: Move gesture recognition from WindowManagerApp to Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 | « services/window_manager/window_manager_app.h ('k') | sky/viewer/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/window_manager/window_manager_app.cc
diff --git a/services/window_manager/window_manager_app.cc b/services/window_manager/window_manager_app.cc
index a23aea02eecb6b969eda5500a23840af260be8f3..a9db0c051634be267f97403688cd598c5ae38dd1 100644
--- a/services/window_manager/window_manager_app.cc
+++ b/services/window_manager/window_manager_app.cc
@@ -21,7 +21,6 @@
#include "services/window_manager/view_target.h"
#include "services/window_manager/view_targeter.h"
#include "services/window_manager/window_manager_delegate.h"
-#include "ui/events/gestures/gesture_recognizer.h"
using mojo::ApplicationConnection;
using mojo::Id;
@@ -75,7 +74,6 @@ WindowManagerApp::~WindowManagerApp() {
DCHECK(!root_);
STLDeleteElements(&connections_);
- ui::GestureRecognizer::Get()->CleanupStateForConsumer(this);
}
void WindowManagerApp::AddConnection(WindowManagerImpl* connection) {
@@ -237,28 +235,8 @@ void WindowManagerApp::OnEvent(ui::Event* event) {
if (focus_controller_)
focus_controller_->OnEvent(event);
- auto gesture_recognizer = ui::GestureRecognizer::Get();
- ui::TouchEvent* touch_event =
- event->IsTouchEvent() ? static_cast<ui::TouchEvent*>(event) : nullptr;
-
- if (touch_event)
- gesture_recognizer->ProcessTouchEventPreDispatch(*touch_event, this);
-
window_manager_client_->DispatchInputEventToView(view->id(),
mojo::Event::From(*event));
-
- if (touch_event) {
- scoped_ptr<ScopedVector<ui::GestureEvent>> gestures(
- gesture_recognizer->ProcessTouchEventPostDispatch(
- *touch_event, ui::ER_UNHANDLED, this));
-
- if (gestures) {
- for (auto& gesture : *gestures) {
- window_manager_client_->DispatchInputEventToView(
- view->id(), mojo::Event::From(*gesture));
- }
- }
- }
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « services/window_manager/window_manager_app.h ('k') | sky/viewer/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698