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

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

Issue 378043002: Visual makeover for infobars. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: don't show buttons with empty text Created 6 years, 5 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/TranslateNeverPanel.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/TwoButtonInfoBar.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/infobar/TwoButtonInfoBar.java b/chrome/android/java/src/org/chromium/chrome/browser/infobar/TwoButtonInfoBar.java
deleted file mode 100644
index 0eb4aeff5cdfd79f954cde243e373652b94b433f..0000000000000000000000000000000000000000
--- a/chrome/android/java/src/org/chromium/chrome/browser/infobar/TwoButtonInfoBar.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.chrome.browser.infobar;
-
-import android.content.Context;
-import android.widget.Button;
-
-import org.chromium.chrome.R;
-
-/**
- * An infobar that presents the user with up to 2 buttons.
- */
-public abstract class TwoButtonInfoBar extends InfoBar {
- public TwoButtonInfoBar(InfoBarListeners.Dismiss dismissListener, int backgroundType,
- int iconDrawableId) {
- super(dismissListener, iconDrawableId);
- }
-
- public TwoButtonInfoBar(InfoBarListeners.Dismiss dismissListener, int iconDrawableId) {
- super(dismissListener, iconDrawableId);
- }
-
- /**
- * Creates controls for the current InfoBar.
- * @param layout InfoBarLayout to find controls in.
- */
- @Override
- public void createContent(InfoBarLayout layout) {
- Context context = layout.getContext();
- layout.addButtons(getPrimaryButtonText(context), getSecondaryButtonText(context));
- }
-
- @Override
- public void setControlsEnabled(boolean state) {
- super.setControlsEnabled(state);
-
- // Handle the buttons.
- ContentWrapperView wrapper = getContentWrapper(false);
- if (wrapper != null) {
- Button primary = (Button) wrapper.findViewById(R.id.button_primary);
- Button secondary = (Button) wrapper.findViewById(R.id.button_secondary);
- if (primary != null) primary.setEnabled(state);
- if (secondary != null) secondary.setEnabled(state);
- }
- }
-}
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/infobar/TranslateNeverPanel.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698