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

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

Issue 346853005: Update infobar assets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: don't break downstream infobar users Created 6 years, 6 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/infobar/ContentWrapperView.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/infobar/ContentWrapperView.java b/chrome/android/java/src/org/chromium/chrome/browser/infobar/ContentWrapperView.java
index 1bf45fd43ea44db120907a892ab27d4a1b9c6026..56cb5230f4691f8221d93dd7b73eca26a41b46d8 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/infobar/ContentWrapperView.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/infobar/ContentWrapperView.java
@@ -16,7 +16,6 @@ import android.view.ViewGroup;
import android.view.ViewParent;
import android.widget.FrameLayout;
-import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.chrome.R;
import java.util.ArrayList;
@@ -46,7 +45,7 @@ public class ContentWrapperView extends FrameLayout {
* Constructs a ContentWrapperView object.
* @param context The context to create this View with.
*/
- public ContentWrapperView(Context context, InfoBar infoBar, int backgroundType, View panel,
+ public ContentWrapperView(Context context, InfoBar infoBar, View panel,
boolean infoBarsFromTop) {
// Set up this ViewGroup.
super(context);
@@ -54,24 +53,16 @@ public class ContentWrapperView extends FrameLayout {
mGravity = infoBarsFromTop ? Gravity.BOTTOM : Gravity.TOP;
mInfoBarsFromTop = infoBarsFromTop;
- // Pull out resources we need for the backgrounds. Defaults to the INFO type.
- int separatorBackground = R.color.infobar_info_background_separator;
- int layoutBackground = R.drawable.infobar_info_background;
- if (backgroundType == InfoBar.BACKGROUND_TYPE_WARNING) {
- layoutBackground = R.drawable.infobar_warning_background;
- separatorBackground = R.color.infobar_warning_background_separator;
- }
-
// Set up this view.
Resources resources = context.getResources();
LayoutParams wrapParams = new LayoutParams(LayoutParams.MATCH_PARENT,
LayoutParams.WRAP_CONTENT);
setLayoutParams(wrapParams);
- ApiCompatibilityUtils.setBackgroundForView(this, resources.getDrawable(layoutBackground));
+ setBackgroundColor(resources.getColor(R.color.infobar_background));
// Add a separator line that delineates different InfoBars.
View separator = new View(context);
- separator.setBackgroundColor(resources.getColor(separatorBackground));
+ separator.setBackgroundColor(resources.getColor(R.color.infobar_background_separator));
addView(separator, new LayoutParams(LayoutParams.MATCH_PARENT, getBoundaryHeight(context),
mGravity));

Powered by Google App Engine
This is Rietveld 408576698