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

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

Issue 2789843004: [Payments] Upload card UI now has a CVC prompt (Closed)
Patch Set: Addressing code review comments Created 3 years, 9 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/save_card_bubble_views.h
diff --git a/chrome/browser/ui/views/autofill/save_card_bubble_views.h b/chrome/browser/ui/views/autofill/save_card_bubble_views.h
index a7390a28024914f6a5e63bf8170c4f6c48a3c014..a0d45d6cf78c16e2c4b4a98a5a09cd6847e0d128 100644
--- a/chrome/browser/ui/views/autofill/save_card_bubble_views.h
+++ b/chrome/browser/ui/views/autofill/save_card_bubble_views.h
@@ -6,11 +6,12 @@
#define CHROME_BROWSER_UI_VIEWS_AUTOFILL_SAVE_CARD_BUBBLE_VIEWS_H_
#include "base/macros.h"
-#include "chrome/browser/ui/autofill/save_card_bubble_controller.h"
#include "chrome/browser/ui/autofill/save_card_bubble_view.h"
#include "chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view.h"
+#include "components/autofill/core/browser/ui/save_card_bubble_controller.h"
#include "ui/views/controls/link_listener.h"
#include "ui/views/controls/styled_label_listener.h"
+#include "ui/views/controls/textfield/textfield_controller.h"
namespace content {
class WebContents;
@@ -19,6 +20,7 @@ class WebContents;
namespace views {
class Link;
class StyledLabel;
+class Textfield;
}
namespace autofill {
@@ -29,7 +31,8 @@ namespace autofill {
class SaveCardBubbleViews : public SaveCardBubbleView,
public LocationBarBubbleDelegateView,
public views::LinkListener,
- public views::StyledLabelListener {
+ public views::StyledLabelListener,
+ public views::TextfieldController {
public:
// Bubble will be anchored to |anchor_view|.
SaveCardBubbleViews(views::View* anchor_view,
@@ -49,6 +52,7 @@ class SaveCardBubbleViews : public SaveCardBubbleView,
bool Close() override;
int GetDialogButtons() const override;
base::string16 GetDialogButtonLabel(ui::DialogButton button) const override;
+ bool IsDialogButtonEnabled(ui::DialogButton button) const override;
bool ShouldDefaultButtonBeBlue() const override;
// views::View
@@ -66,16 +70,23 @@ class SaveCardBubbleViews : public SaveCardBubbleView,
const gfx::Range& range,
int event_flags) override;
+ // views::TextfieldController
+ void ContentsChanged(views::Textfield* sender,
+ const base::string16& new_contents) override;
+
private:
~SaveCardBubbleViews() override;
std::unique_ptr<views::View> CreateMainContentView();
+ std::unique_ptr<views::View> CreateRequestCvcView();
// views::BubbleDialogDelegateView
void Init() override;
SaveCardBubbleController* controller_; // Weak reference.
+ views::Textfield* cvc_input_;
Mathieu 2017/04/03 19:46:09 prefer cvc_textfield_ so that it's clear what the
Jared Saul 2017/04/03 21:19:18 SGTM, done.
+
views::Link* learn_more_link_;
DISALLOW_COPY_AND_ASSIGN(SaveCardBubbleViews);

Powered by Google App Engine
This is Rietveld 408576698