| Index: content/public/android/java/src/org/chromium/content_public/browser/EventForwarder.java
|
| diff --git a/content/public/android/java/src/org/chromium/content_public/browser/EventForwarder.java b/content/public/android/java/src/org/chromium/content_public/browser/EventForwarder.java
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a727bca6b680898887265a2b453a49b6d4947336
|
| --- /dev/null
|
| +++ b/content/public/android/java/src/org/chromium/content_public/browser/EventForwarder.java
|
| @@ -0,0 +1,34 @@
|
| +// 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.
|
| +
|
| +package org.chromium.content_public.browser;
|
| +
|
| +import android.view.MotionEvent;
|
| +
|
| +/**
|
| + * Public interface which defines the methods used to forward input/view events
|
| + * to native. Call {@link WebContents#getEventForwarder()} to get the instance
|
| + * implemented for the associated {@link WebContents} internally.
|
| + */
|
| +public interface EventForwarder {
|
| + /**
|
| + * Sets the current amount to offset incoming touch events by (including MotionEvent and
|
| + * DragEvent). This is used to handle content moving and not lining up properly with the
|
| + * android input system.
|
| + * @param dx The X offset in pixels to shift touch events.
|
| + * @param dy The Y offset in pixels to shift touch events.
|
| + */
|
| + void setCurrentTouchEventOffsets(float dx, float dy);
|
| +
|
| + /**
|
| + * @see {@link android.view.View.onTouchEvent(MotionEvent)
|
| + */
|
| + boolean onTouchEvent(MotionEvent event);
|
| +
|
| + /**
|
| + * Called by PopupWindow-based touch handles.
|
| + * @param event the MotionEvent targeting the handle.
|
| + */
|
| + boolean onTouchHandleEvent(MotionEvent event);
|
| +}
|
|
|