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