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

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

Issue 571813003: Fix Tab.getWebContents for downstream instrumentation tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove native method Created 6 years, 3 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 | « no previous file | chrome/browser/android/tab_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/Tab.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/Tab.java b/chrome/android/java/src/org/chromium/chrome/browser/Tab.java
index a3ab6d981d35ccc69290ff1825812598773c182d..648d6446e166b08ca043ee3c15239e457b884c1a 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/Tab.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/Tab.java
@@ -569,8 +569,7 @@ public class Tab implements NavigationClient {
* @return The web contents associated with this tab.
*/
public WebContents getWebContents() {
- if (mNativeTabAndroid == 0) return null;
- return nativeGetWebContents(mNativeTabAndroid);
+ return mContentViewCore != null ? mContentViewCore.getWebContents() : null;
}
/**
@@ -1200,7 +1199,6 @@ public class Tab implements NavigationClient {
ContentViewCore contentViewCore, ChromeWebContentsDelegateAndroid delegate,
ContextMenuPopulator contextMenuPopulator);
private native void nativeDestroyWebContents(long nativeTabAndroid, boolean deleteNative);
- private native WebContents nativeGetWebContents(long nativeTabAndroid);
private native Profile nativeGetProfileAndroid(long nativeTabAndroid);
private native int nativeLoadUrl(long nativeTabAndroid, String url, String extraHeaders,
byte[] postData, int transition, String referrerUrl, int referrerPolicy,
« no previous file with comments | « no previous file | chrome/browser/android/tab_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698