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

Unified Diff: chrome/browser/ui/views/autofill/autofill_dialog_views.h

Issue 12221040: Interactive autofill: Handle Online Wallet being unavailable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 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
Index: chrome/browser/ui/views/autofill/autofill_dialog_views.h
diff --git a/chrome/browser/ui/views/autofill/autofill_dialog_views.h b/chrome/browser/ui/views/autofill/autofill_dialog_views.h
index 012ee435ba6baa6a523864e5df8f1bb508ce56d2..d7792754bf9953f29d030f5c12f52fc29fc375a9 100644
--- a/chrome/browser/ui/views/autofill/autofill_dialog_views.h
+++ b/chrome/browser/ui/views/autofill/autofill_dialog_views.h
@@ -11,6 +11,7 @@
#include "chrome/browser/ui/autofill/autofill_dialog_view.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/controls/button/menu_button_listener.h"
+#include "ui/views/controls/link.h"
#include "ui/views/controls/link_listener.h"
#include "ui/views/controls/progress_bar.h"
#include "ui/views/controls/textfield/textfield_controller.h"
@@ -138,10 +139,27 @@ class AutofillDialogViews : public AutofillDialogView,
DISALLOW_COPY_AND_ASSIGN(DecoratedTextfield);
};
- // An area for notifications. Some types of notifications point at stuff.
+ // An area to choose which account to use to make a transaction. If wallet is
+ // available, choices include "Sign in to a different wallet account...", the
+ // current Wallet account (if signed in), or a "Pay without Wallet" option. If
+ // wallet is unavailable, only "Pay without Wallet" will be available.
+ class AccountChooserLink : public views::Link {
+ public:
+ AccountChooserLink();
+ virtual ~AccountChooserLink();
+
+ // Get the width of only the text (not the whole view). This is required
+ // as views::Link::GetTextSize() is protected.
+ size_t GetTextWidth() const;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AccountChooserLink);
+ };
+
+ // An area for notifications. Some notifications point at the account chooser.
class NotificationArea : public views::View {
public:
- NotificationArea();
+ explicit NotificationArea(AccountChooserLink* arrow_centering_anchor);
virtual ~NotificationArea();
void SetNotification(const DialogNotification& notification);
@@ -152,6 +170,7 @@ class AutofillDialogViews : public AutofillDialogView,
private:
views::Label* label_;
+ AccountChooserLink* arrow_centering_anchor_;
DialogNotification notification_;
DISALLOW_COPY_AND_ASSIGN(NotificationArea);
@@ -330,8 +349,8 @@ class AutofillDialogViews : public AutofillDialogView,
// Runs the suggestion menu (triggered by each section's |suggested_button|.
scoped_ptr<views::MenuRunner> menu_runner_;
- // The link that initiates the sign in flow.
- views::Link* sign_in_link_;
+ // A link to allow choosing different accounts to pay with.
+ AccountChooserLink* account_chooser_link_;
// View to host the signin dialog and related controls.
views::View* sign_in_container_;

Powered by Google App Engine
This is Rietveld 408576698