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_CREDIT_CARD_SCANNER_VIEW_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_CREDIT_CARD_SCANNER_VIEW_DELEGATE_H_ |
6 #define CHROME_BROWSER_UI_AUTOFILL_CREDIT_CARD_SCANNER_VIEW_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_CREDIT_CARD_SCANNER_VIEW_DELEGATE_H_ |
7 | 7 |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "ui/gfx/native_widget_types.h" | 9 #include "ui/gfx/native_widget_types.h" |
10 | 10 |
11 namespace autofill { | 11 namespace autofill { |
12 | 12 |
| 13 class CreditCard; |
| 14 |
13 // Receives notifications when credit card scanner UI is dismissed either due to | 15 // Receives notifications when credit card scanner UI is dismissed either due to |
14 // user cancelling the scan or successfully completing the scan. | 16 // user cancelling the scan or successfully completing the scan. |
15 class CreditCardScannerViewDelegate { | 17 class CreditCardScannerViewDelegate { |
16 public: | 18 public: |
17 // Called when user cancelled the scan. | 19 // Called when user cancelled the scan. |
18 virtual void ScanCancelled() = 0; | 20 virtual void ScanCancelled() = 0; |
19 | 21 |
20 // Called when the scan completed successfully. | 22 // Called when the scan completed successfully. |
21 virtual void ScanCompleted(const base::string16& card_number, | 23 virtual void ScanCompleted(const CreditCard& card) = 0; |
22 int expiration_month, | |
23 int expiration_year) = 0; | |
24 | 24 |
25 protected: | 25 protected: |
26 // Destroys the delegate. | 26 // Destroys the delegate. |
27 virtual ~CreditCardScannerViewDelegate() {} | 27 virtual ~CreditCardScannerViewDelegate() {} |
28 }; | 28 }; |
29 | 29 |
30 } // namespace autofill | 30 } // namespace autofill |
31 | 31 |
32 #endif // CHROME_BROWSER_UI_AUTOFILL_CREDIT_CARD_SCANNER_VIEW_DELEGATE_H_ | 32 #endif // CHROME_BROWSER_UI_AUTOFILL_CREDIT_CARD_SCANNER_VIEW_DELEGATE_H_ |
OLD | NEW |