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

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

Issue 1634083002: Ensure all infobars disappear when navigating between pages with infobars. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/infobar/InfoBarContainerLayout.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/InfoBarWrapper.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarWrapper.java b/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarWrapper.java
index 2ed608c73798498c77b33aedcd39829546d6128b..f0c5e8cdf860e31f5b2ffafd12281e6788e843ae 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarWrapper.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarWrapper.java
@@ -17,11 +17,14 @@ import org.chromium.chrome.R;
*/
class InfoBarWrapper extends FrameLayout {
+ private final InfoBarContainerLayout.Item mItem;
+
/**
* Constructor for inflating from Java.
*/
- InfoBarWrapper(Context context) {
+ InfoBarWrapper(Context context, InfoBarContainerLayout.Item item) {
super(context);
+ mItem = item;
Resources res = context.getResources();
int peekingHeight = res.getDimensionPixelSize(R.dimen.infobar_peeking_height);
int shadowHeight = res.getDimensionPixelSize(R.dimen.infobar_shadow_height);
@@ -32,6 +35,10 @@ class InfoBarWrapper extends FrameLayout {
setPadding(0, shadowHeight, 0, 0);
}
+ InfoBarContainerLayout.Item getItem() {
+ return mItem;
+ }
+
@Override
public void onViewAdded(View child) {
child.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT,
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarContainerLayout.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698