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

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

Issue 1639673002: Add attachToWindow event to infobar observer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 4 years, 11 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 | « chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManager.java ('k') | no next file » | 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/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();
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManager.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698