| Index: components/autofill/core/browser/ui/save_card_bubble_controller.h
|
| diff --git a/chrome/browser/ui/autofill/save_card_bubble_controller.h b/components/autofill/core/browser/ui/save_card_bubble_controller.h
|
| similarity index 61%
|
| rename from chrome/browser/ui/autofill/save_card_bubble_controller.h
|
| rename to components/autofill/core/browser/ui/save_card_bubble_controller.h
|
| index 6f74eb3f09414ffee90bbd3e3c8f7bf04c2c129f..f01cac3f2200f820fb9318bd9af167b46695e6a3 100644
|
| --- a/chrome/browser/ui/autofill/save_card_bubble_controller.h
|
| +++ b/components/autofill/core/browser/ui/save_card_bubble_controller.h
|
| @@ -2,8 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_H_
|
| -#define CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_H_
|
| +#ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_UI_SAVE_CARD_BUBBLE_CONTROLLER_H_
|
| +#define COMPONENTS_AUTOFILL_CORE_BROWSER_UI_SAVE_CARD_BUBBLE_CONTROLLER_H_
|
|
|
| #include <memory>
|
| #include <vector>
|
| @@ -21,6 +21,9 @@ class SaveCardBubbleView;
|
| // Interface that exposes controller functionality to SaveCardBubbleView.
|
| class SaveCardBubbleController {
|
| public:
|
| + SaveCardBubbleController() {}
|
| + virtual ~SaveCardBubbleController() {}
|
| +
|
| // Returns the title that should be displayed in the bubble.
|
| virtual base::string16 GetWindowTitle() const = 0;
|
|
|
| @@ -31,8 +34,20 @@ class SaveCardBubbleController {
|
| // Returns the card that will be uploaded if the user accepts.
|
| virtual const CreditCard GetCard() const = 0;
|
|
|
| + // Returns the CVC image icon resource ID.
|
| + virtual int GetCvcImageResourceId() const = 0;
|
| +
|
| + // Returns whether the dialog should include a field requesting the card's CVC
|
| + // from the user.
|
| + virtual bool ShouldRequestCvcFromUser() const = 0;
|
| +
|
| + // Returns the CVC provided by the user in the save card bubble.
|
| + virtual base::string16 GetCvcEnteredByUser() const = 0;
|
| +
|
| // Interaction.
|
| - virtual void OnSaveButton() = 0;
|
| + // OnSaveButton takes in a string value representing the CVC entered by the
|
| + // user if it was requested, or an empty string otherwise.
|
| + virtual void OnSaveButton(const base::string16& cvc) = 0;
|
| virtual void OnCancelButton() = 0;
|
| virtual void OnLearnMoreClicked() = 0;
|
| virtual void OnLegalMessageLinkClicked(const GURL& url) = 0;
|
| @@ -43,13 +58,13 @@ class SaveCardBubbleController {
|
| // Returns empty vector if no legal message should be shown.
|
| virtual const LegalMessageLines& GetLegalMessageLines() const = 0;
|
|
|
| - protected:
|
| - SaveCardBubbleController() {}
|
| - virtual ~SaveCardBubbleController() {}
|
| + // Utilities.
|
| + virtual bool InputCvcIsValid(const base::string16& input_text) const = 0;
|
|
|
| + private:
|
| DISALLOW_COPY_AND_ASSIGN(SaveCardBubbleController);
|
| };
|
|
|
| } // namespace autofill
|
|
|
| -#endif // CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_H_
|
| +#endif // COMPONENTS_AUTOFILL_CORE_BROWSER_UI_SAVE_CARD_BUBBLE_CONTROLLER_H_
|
|
|