| Index: content/browser/android/event_forwarder_impl.h
|
| diff --git a/content/browser/android/event_forwarder_impl.h b/content/browser/android/event_forwarder_impl.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ccec709891b4d7cea8fe1ace8bef244b772801ce
|
| --- /dev/null
|
| +++ b/content/browser/android/event_forwarder_impl.h
|
| @@ -0,0 +1,65 @@
|
| +// 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 CONTENT_BROWSER_ANDROID_EVENT_FORWARDER_IMPL_H_
|
| +#define CONTENT_BROWSER_ANDROID_EVENT_FORWARDER_IMPL_H_
|
| +
|
| +#include "base/android/jni_android.h"
|
| +
|
| +namespace ui {
|
| +class ViewAndroid;
|
| +}
|
| +
|
| +namespace content {
|
| +class RenderWidgetHostViewAndroid;
|
| +class WebContentsImpl;
|
| +
|
| +class EventForwarderImpl {
|
| + public:
|
| + EventForwarderImpl(WebContentsImpl* web_contents);
|
| + jboolean OnTouchEvent(
|
| + JNIEnv* env,
|
| + const base::android::JavaParamRef<jobject>& obj,
|
| + const base::android::JavaParamRef<jobject>& motion_event,
|
| + jlong time_ms,
|
| + jint android_action,
|
| + jint pointer_count,
|
| + jint history_size,
|
| + jint action_index,
|
| + jfloat pos_x_0,
|
| + jfloat pos_y_0,
|
| + jfloat pos_x_1,
|
| + jfloat pos_y_1,
|
| + jint pointer_id_0,
|
| + jint pointer_id_1,
|
| + jfloat touch_major_0,
|
| + jfloat touch_major_1,
|
| + jfloat touch_minor_0,
|
| + jfloat touch_minor_1,
|
| + jfloat orientation_0,
|
| + jfloat orientation_1,
|
| + jfloat tilt_0,
|
| + jfloat tilt_1,
|
| + jfloat raw_pos_x,
|
| + jfloat raw_pos_y,
|
| + jint android_tool_type_0,
|
| + jint android_tool_type_1,
|
| + jint android_button_state,
|
| + jint android_meta_state,
|
| + jboolean is_touch_handle_event);
|
| +
|
| + private:
|
| + ui::ViewAndroid* GetViewAndroid() const;
|
| + RenderWidgetHostViewAndroid* GetRenderWidgetHostViewAndroid() const;
|
| +
|
| + // Reference to the current WebContents.
|
| + WebContentsImpl* web_contents_;
|
| + float dip_scale_;
|
| +};
|
| +
|
| +bool RegisterEventForwarderImpl(JNIEnv* env);
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_BROWSER_ANDROID_EVENT_FORWARDER_IMPL_H_
|
|
|