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

Unified Diff: ui/android/view_client.h

Issue 2595263002: Introduce ViewRoot forwarding input/view events to native (Closed)
Patch Set: unittest Created 3 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 | « ui/android/view_android_unittest.cc ('k') | ui/android/view_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/view_client.h
diff --git a/ui/android/view_client.h b/ui/android/view_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..6e5d41f396c7195feea94660c3f9e4343e1a7a5c
--- /dev/null
+++ b/ui/android/view_client.h
@@ -0,0 +1,26 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_ANDROID_VIEW_CLIENT_H_
+#define UI_ANDROID_VIEW_CLIENT_H_
+
+#include "ui/android/ui_android_export.h"
+#include "ui/events/android/motion_event_android.h"
+
+namespace ui {
+
+// Client interface used to forward events from Java to native views.
+// Calls are dispatched to its children along the hierarchy of ViewAndroid.
+// Use bool return type to stop propagating the call i.e. overriden method
+// should return true to indicate that the event was handled and stop
+// the processing.
+class UI_ANDROID_EXPORT ViewClient {
+ public:
+ virtual bool OnTouchEvent(const MotionEventAndroid& event,
+ bool is_touch_handle_event);
+};
+
+} // namespace ui
+
+#endif // UI_ANDROID_VIEW_CLIENT_H_
« no previous file with comments | « ui/android/view_android_unittest.cc ('k') | ui/android/view_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698