Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarContainer.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarContainer.java b/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarContainer.java |
| index 830205ebaaf56e0c712cb481c6d26af252193a8b..e5e1d9bc7eb0812c4f7909bf8d0538e97747d59d 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarContainer.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarContainer.java |
| @@ -14,7 +14,6 @@ import org.chromium.base.VisibleForTesting; |
| import org.chromium.base.annotations.CalledByNative; |
| import org.chromium.chrome.browser.banners.SwipableOverlayView; |
| import org.chromium.chrome.browser.tab.Tab; |
| -import org.chromium.chrome.browser.tab.TabObserver; |
| import org.chromium.content.browser.ContentViewCore; |
| import org.chromium.content_public.browser.WebContents; |
| import org.chromium.ui.base.DeviceFormFactor; |
| @@ -175,22 +174,12 @@ public class InfoBarContainer extends SwipableOverlayView { |
| addToParentView(); |
| } |
| - @Override |
| - protected TabObserver createTabObserver() { |
| - return new SwipableOverlayViewTabObserver() { |
| - @Override |
| - public void onPageLoadStarted(Tab tab, String url) { |
| - onPageStarted(); |
| - } |
| - }; |
| - } |
| - |
| /** |
| * Adds an InfoBar to the view hierarchy. |
| * @param infoBar InfoBar to add to the View hierarchy. |
| */ |
| @CalledByNative |
| - public void addInfoBar(InfoBar infoBar) { |
| + private void addInfoBar(InfoBar infoBar) { |
| assert !mDestroyed; |
| if (infoBar == null) { |
| return; |
| @@ -228,6 +217,9 @@ public class InfoBarContainer extends SwipableOverlayView { |
| /** |
| * Removes an InfoBar from the view hierarchy. |
| + * |
| + * This should only be called by the base InfoBar class and by tests. |
| + * |
| * @param infoBar InfoBar to remove from the View hierarchy. |
| */ |
| public void removeInfoBar(InfoBar infoBar) { |
|
newt (away)
2016/01/19 21:54:43
@VisibleForTesting
or make this private and add a
gone
2016/01/19 23:43:03
I think I actually nuked the test that was using t
|
| @@ -254,21 +246,6 @@ public class InfoBarContainer extends SwipableOverlayView { |
| return mDestroyed; |
| } |
| - // Called by the tab when it has started loading a new page. |
| - public void onPageStarted() { |
| - ArrayList<InfoBar> barsToRemove = new ArrayList<>(); |
| - |
| - for (InfoBar infoBar : mInfoBars) { |
| - if (infoBar.shouldExpire()) { |
| - barsToRemove.add(infoBar); |
| - } |
| - } |
| - |
| - for (InfoBar infoBar : barsToRemove) { |
| - infoBar.dismissJavaOnlyInfoBar(); |
| - } |
| - } |
| - |
| public void destroy() { |
| mDestroyed = true; |
| if (mNativeInfoBarContainer != 0) { |