Chromium Code Reviews| 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..149cc75bc5a606bbf7a17775513d08f326506f46 |
| --- /dev/null |
| +++ b/ui/android/view_client.h |
| @@ -0,0 +1,29 @@ |
| +// 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 <jni.h> |
| + |
| +#include "ui/android/ui_android_export.h" |
| +#include "ui/events/android/motion_event_android.h" |
|
boliu
2017/02/27 19:21:57
forward declare is enough
Jinsuk Kim
2017/02/28 06:56:04
Done.
|
| + |
| +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); |
| + virtual bool OnMouseEvent(const MotionEventAndroid& event, int action_button); |
| +}; |
| + |
| +} // namespace ui |
| + |
| +#endif // UI_ANDROID_VIEW_CLIENT_H_ |