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

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

Issue 1107663003: Properly attach InfoBarContainer when it is swapped to a new WebContents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2357
Patch Set: 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 a000dbdf49145ffc806199b4169a9934c83b5059..a087e845227cfe7a91f903e355c621beb5e8e15a 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/Tab.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/Tab.java
@@ -1584,9 +1584,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);
}
@@ -2137,8 +2135,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);
@@ -2199,11 +2198,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