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

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

Issue 2623493003: Refactor the view hierarchy of snackbars and infobars (Closed)
Patch Set: comments Created 3 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
Index: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
index 7c09524aace87a747fb8016bb8a80c738e844b8d..c6225c5bda436e350b1db4f3db02ec0150cbf201 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
@@ -340,6 +340,12 @@ public class CustomTabActivity extends ChromeActivity {
ApiCompatibilityUtils.setStatusBarColor(getWindow(),
ColorUtils.getDarkenedColorForStatusBar(toolbarColor));
}
+ // Properly attach tab's infobar to the view hierarchy, as the main tab might have been
+ // initialized prior to inflation.
+ if (mMainTab != null) {
+ ViewGroup bottomContainer = (ViewGroup) findViewById(R.id.bottom_container);
+ mMainTab.getInfoBarContainer().setParentView(bottomContainer);
+ }
// Setting task title and icon to be null will preserve the client app's title and icon.
ApiCompatibilityUtils.setTaskDescription(this, null, null, toolbarColor);

Powered by Google App Engine
This is Rietveld 408576698