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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/widget/ButtonCompat.java

Issue 868663009: Add infobar layout for app install banners. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 5 years, 10 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/InfoBarLayout.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/widget/ButtonCompat.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/widget/ButtonCompat.java b/chrome/android/java/src/org/chromium/chrome/browser/widget/ButtonCompat.java
index 43c17c34709061e60fba0792d2d436b1a8f26fa4..a27cb3d983fe748144ba3fe6e9dc76a609e6d9d7 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/widget/ButtonCompat.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/widget/ButtonCompat.java
@@ -43,6 +43,14 @@ public class ButtonCompat extends Button {
private int mColor;
/**
+ * Returns a new borderless material-style button.
+ */
+ public static Button createBorderlessButton(Context context) {
+ Context wrapper = new ContextThemeWrapper(context, R.style.ButtonBorderlessCompat);
+ return new Button(wrapper, null, 0);
+ }
+
+ /**
* Constructs a button with the given buttonColor as its background.
*/
public ButtonCompat(Context context, int buttonColor) {
@@ -81,6 +89,7 @@ public class ButtonCompat extends Button {
* Sets the background color of the button.
*/
public void setButtonColor(int color) {
+ if (color == mColor) return;
mColor = color;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarLayout.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698