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

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

Issue 1049383008: Properly attach InfoBarContainer when it is swapped to a new WebContents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments Created 5 years, 8 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/android/java/src/org/chromium/chrome/browser/banners/SwipableOverlayView.java » ('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 1cec7a3dfc01b343dd7d1c6e3487640b3a31ae11..7825f1ea9d768cea5640de1305821fa584534381 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/Tab.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/Tab.java
@@ -1601,9 +1601,7 @@ public class Tab implements ViewGroup.OnHierarchyChangeListener,
if (mInfoBarContainer == null) {
// The InfoBarContainer needs to be created after the ContentView has been natively
// initialized.
- WebContents webContents = mContentViewCore.getWebContents();
- mInfoBarContainer = new InfoBarContainer(
- mContext, getId(), mContentViewParent, webContents, this);
+ mInfoBarContainer = new InfoBarContainer(mContext, getId(), mContentViewParent, this);
} else {
mInfoBarContainer.onParentViewChanged(getId(), mContentViewParent);
}
@@ -2161,8 +2159,9 @@ public class Tab implements ViewGroup.OnHierarchyChangeListener,
}
/** This is currently called when committing a pre-rendered page. */
+ @VisibleForTesting
@CalledByNative
- private void swapWebContents(
+ public void swapWebContents(
WebContents webContents, boolean didStartLoad, boolean didFinishLoad) {
ContentViewCore cvc = new ContentViewCore(mContext);
ContentView cv = ContentView.newInstance(mContext, cvc);
@@ -2223,11 +2222,6 @@ public class Tab implements ViewGroup.OnHierarchyChangeListener,
mNativeTabAndroid = nativePtr;
}
- @CalledByNative
- private long getNativeInfoBarContainer() {
- return getInfoBarContainer().getNative();
- }
-
/**
* @return Whether the TabState representing this Tab has been updated.
*/
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/banners/SwipableOverlayView.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698