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 3f773de0533259e815bc446e6f367372ddc1ac52..68d8fd20dff3965e9169d7207e555ce746b62137 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 |
@@ -78,6 +78,12 @@ public class InfoBarContainer extends SwipableOverlayView { |
* @param isLast Whether the infobar container is going to be empty |
*/ |
void onRemoveInfoBar(InfoBarContainer container, InfoBar infoBar, boolean isLast); |
+ |
+ /** |
+ * Called when the InfobarContainer is attached to the window. |
+ * @param hasInfobars True if infobar container has infobars to show. |
+ */ |
+ void onInfoBarContainerAttachedToWindow(boolean hasInfobars); |
} |
/** Toggles visibility of the InfoBarContainer when the keyboard appears. */ |
@@ -354,6 +360,10 @@ public class InfoBarContainer extends SwipableOverlayView { |
setAlpha(0f); |
animate().alpha(1f).setDuration(REATTACH_FADE_IN_MS); |
} |
+ // Notify observers that the container has attached to the window. |
+ for (InfoBarContainerObserver observer : mObservers) { |
+ observer.onInfoBarContainerAttachedToWindow(!mInfoBars.isEmpty()); |
+ } |
} |
private native long nativeInit(); |