| 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..f52145bf54451d52df17947442f3072cb2ad13f0 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* point_at);
|
| virtual ~NotificationArea();
|
|
|
| void SetNotification(const DialogNotification& notification);
|
| @@ -152,6 +170,7 @@ class AutofillDialogViews : public AutofillDialogView,
|
|
|
| private:
|
| views::Label* label_;
|
| + AccountChooserLink* point_at_;
|
| 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_;
|
|
|