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

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

Issue 2179563003: Android: Remove ContentViewCore::GetLayer() from public interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 5 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 0dc4f334d2bfbe3dc6428dafbf1680faced883fa..71313304b525e0377897de69f8c8604e1775f89e 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
@@ -1652,7 +1652,9 @@ public class Tab implements ViewGroup.OnHierarchyChangeListener,
assert !mOverlayContentViewCores.contains(content);
mOverlayContentViewCores.add(content);
- if (attachLayer) nativeAttachOverlayContentViewCore(mNativeTabAndroid, content, visible);
+ if (attachLayer) {
+ nativeAttachOverlayWebContents(mNativeTabAndroid, content.getWebContents(), visible);
+ }
for (TabObserver observer : mObservers) {
observer.onOverlayContentViewCoreAdded(this, content);
}
@@ -1674,7 +1676,7 @@ public class Tab implements ViewGroup.OnHierarchyChangeListener,
assert mOverlayContentViewCores.contains(content);
mOverlayContentViewCores.remove(content);
- nativeDetachOverlayContentViewCore(mNativeTabAndroid, content);
+ nativeDetachOverlayWebContents(mNativeTabAndroid, content.getWebContents());
}
/**
@@ -1853,10 +1855,10 @@ public class Tab implements ViewGroup.OnHierarchyChangeListener,
mDownloadDelegate = new ChromeDownloadDelegate(mThemedApplicationContext, this);
assert mNativeTabAndroid != 0;
- nativeInitWebContents(
- mNativeTabAndroid, mIncognito, mContentViewCore, mWebContentsDelegate,
- new TabContextMenuPopulator(mDelegateFactory.createContextMenuPopulator(this),
- this));
+ nativeInitWebContents(mNativeTabAndroid, mIncognito, mContentViewCore.getWebContents(),
+ mWebContentsDelegate,
+ new TabContextMenuPopulator(
+ mDelegateFactory.createContextMenuPopulator(this), this));
// TODO(shaktisahu): Add logic for blimp version of navigation handler.
mNavigationHandler = new TabWebContentsNavigationHandler(getWebContents());
@@ -3260,7 +3262,7 @@ public class Tab implements ViewGroup.OnHierarchyChangeListener,
private native void nativeInit();
private native void nativeDestroy(long nativeTabAndroid);
private native void nativeInitWebContents(long nativeTabAndroid, boolean incognito,
- ContentViewCore contentViewCore, TabWebContentsDelegateAndroid delegate,
+ WebContents webContents, TabWebContentsDelegateAndroid delegate,
ContextMenuPopulator contextMenuPopulator);
private native void nativeUpdateDelegates(long nativeTabAndroid,
TabWebContentsDelegateAndroid delegate, ContextMenuPopulator contextMenuPopulator);
@@ -3286,9 +3288,9 @@ public class Tab implements ViewGroup.OnHierarchyChangeListener,
InterceptNavigationDelegate delegate);
private native void nativeAttachToTabContentManager(long nativeTabAndroid,
TabContentManager tabContentManager);
- private native void nativeAttachOverlayContentViewCore(long nativeTabAndroid,
- ContentViewCore content, boolean visible);
- private native void nativeDetachOverlayContentViewCore(long nativeTabAndroid,
- ContentViewCore content);
+ private native void nativeAttachOverlayWebContents(
+ long nativeTabAndroid, WebContents webContents, boolean visible);
+ private native void nativeDetachOverlayWebContents(
+ long nativeTabAndroid, WebContents webContents);
private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String url);
}

Powered by Google App Engine
This is Rietveld 408576698