OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_AUTOFILL_CARD_UNMASK_PROMPT_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_CARD_UNMASK_PROMPT_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_AUTOFILL_CARD_UNMASK_PROMPT_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_CARD_UNMASK_PROMPT_CONTROLLER_H_ |
7 | 7 |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 | 9 |
10 namespace base { | 10 namespace base { |
11 class TimeDelta; | 11 class TimeDelta; |
12 } | 12 } |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 class WebContents; | 15 class WebContents; |
16 } | 16 } |
17 | 17 |
18 namespace autofill { | 18 namespace autofill { |
19 | 19 |
20 class CardUnmaskPromptController { | 20 class CardUnmaskPromptController { |
21 public: | 21 public: |
22 // Interaction. | 22 // Interaction. |
23 virtual void OnUnmaskDialogClosed() = 0; | 23 virtual void OnUnmaskDialogClosed() = 0; |
24 virtual void OnUnmaskResponse(const base::string16& cvc, | 24 virtual void OnUnmaskResponse(const base::string16& cvc, |
25 const base::string16& exp_month, | 25 const base::string16& exp_month, |
26 const base::string16& exp_year, | 26 const base::string16& exp_year, |
27 bool should_store_pan) = 0; | 27 bool should_store_pan) = 0; |
| 28 virtual void NewCardLinkClicked() = 0; |
28 | 29 |
29 // State. | 30 // State. |
30 virtual content::WebContents* GetWebContents() = 0; | 31 virtual content::WebContents* GetWebContents() = 0; |
31 virtual base::string16 GetWindowTitle() const = 0; | 32 virtual base::string16 GetWindowTitle() const = 0; |
32 virtual base::string16 GetInstructionsMessage() const = 0; | 33 virtual base::string16 GetInstructionsMessage() const = 0; |
33 virtual int GetCvcImageRid() const = 0; | 34 virtual int GetCvcImageRid() const = 0; |
34 virtual bool ShouldRequestExpirationDate() const = 0; | 35 virtual bool ShouldRequestExpirationDate() const = 0; |
35 virtual bool CanStoreLocally() const = 0; | 36 virtual bool CanStoreLocally() const = 0; |
36 virtual bool GetStoreLocallyStartState() const = 0; | 37 virtual bool GetStoreLocallyStartState() const = 0; |
37 virtual base::TimeDelta GetSuccessMessageDuration() const = 0; | 38 virtual base::TimeDelta GetSuccessMessageDuration() const = 0; |
38 | 39 |
39 // Utilities. | 40 // Utilities. |
40 virtual bool InputCvcIsValid(const base::string16& input_text) const = 0; | 41 virtual bool InputCvcIsValid(const base::string16& input_text) const = 0; |
41 virtual bool InputExpirationIsValid(const base::string16& month, | 42 virtual bool InputExpirationIsValid(const base::string16& month, |
42 const base::string16& year) const = 0; | 43 const base::string16& year) const = 0; |
43 }; | 44 }; |
44 | 45 |
45 } // namespace autofill | 46 } // namespace autofill |
46 | 47 |
47 #endif // CHROME_BROWSER_UI_AUTOFILL_CARD_UNMASK_PROMPT_CONTROLLER_H_ | 48 #endif // CHROME_BROWSER_UI_AUTOFILL_CARD_UNMASK_PROMPT_CONTROLLER_H_ |
OLD | NEW |