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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java

Issue 2708613002: Add EventForwarder for routing touch events (Closed)
Patch Set: - Created 3 years, 10 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
Index: chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
index 3d676f0a74e3a7539570d6625d8dbe892e73d6c6..6e8a3882924dd5444173219f6b023111548c8f9b 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
@@ -94,6 +94,7 @@ import org.chromium.content.browser.ContentView;
import org.chromium.content.browser.ContentViewClient;
import org.chromium.content.browser.ContentViewCore;
import org.chromium.content.browser.crypto.CipherFactory;
+import org.chromium.content_public.browser.EventForwarder;
import org.chromium.content_public.browser.GestureStateListener;
import org.chromium.content_public.browser.LoadUrlParams;
import org.chromium.content_public.browser.WebContents;
@@ -1088,6 +1089,15 @@ public class Tab implements ViewGroup.OnHierarchyChangeListener,
}
/**
+ * @return The {@link EventForwarder} used to forward input/view events down to native, or
+ * {@code null} if the tab is displaying native page for which the native content
+ * is not present.
+ */
+ public EventForwarder getEventForwarder() {
+ return mNativePage == null ? getWebContents().getEventForwarder() : null;
+ }
+
+ /**
* @return The {@link NativePage} associated with the current page, or {@code null} if there is
* no current page or the current page is displayed using something besides
* {@link NativePage}.

Powered by Google App Engine
This is Rietveld 408576698