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

Side by Side Diff: chrome/browser/ui/android/autofill/credit_card_scanner_view_android.h

Issue 2249773002: Scan card holder name. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pass CreditCard, don't alter the constructor. Created 4 years, 4 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 unified diff | Download patch
OLDNEW
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_ANDROID_AUTOFILL_CREDIT_CARD_SCANNER_VIEW_ANDROID_H_ 5 #ifndef CHROME_BROWSER_UI_ANDROID_AUTOFILL_CREDIT_CARD_SCANNER_VIEW_ANDROID_H_
6 #define CHROME_BROWSER_UI_ANDROID_AUTOFILL_CREDIT_CARD_SCANNER_VIEW_ANDROID_H_ 6 #define CHROME_BROWSER_UI_ANDROID_AUTOFILL_CREDIT_CARD_SCANNER_VIEW_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 19 matching lines...) Expand all
30 CreditCardScannerViewAndroid( 30 CreditCardScannerViewAndroid(
31 const base::WeakPtr<CreditCardScannerViewDelegate>& delegate, 31 const base::WeakPtr<CreditCardScannerViewDelegate>& delegate,
32 content::WebContents* web_contents); 32 content::WebContents* web_contents);
33 ~CreditCardScannerViewAndroid() override; 33 ~CreditCardScannerViewAndroid() override;
34 34
35 // Called by JNI when user cancelled credit card scan. 35 // Called by JNI when user cancelled credit card scan.
36 void ScanCancelled(JNIEnv* env, 36 void ScanCancelled(JNIEnv* env,
37 const base::android::JavaParamRef<jobject>& object); 37 const base::android::JavaParamRef<jobject>& object);
38 38
39 // Called by JNI when credit card scan completed successfully. 39 // Called by JNI when credit card scan completed successfully.
40 void ScanCompleted(JNIEnv* env, 40 void ScanCompleted(
41 const base::android::JavaParamRef<jobject>& object, 41 JNIEnv* env,
42 const base::android::JavaParamRef<jstring>& card_number, 42 const base::android::JavaParamRef<jobject>& object,
43 jint expiration_month, 43 const base::android::JavaParamRef<jstring>& card_holder_name,
44 jint expiration_year); 44 const base::android::JavaParamRef<jstring>& card_number,
45 jint expiration_month,
46 jint expiration_year);
45 47
46 private: 48 private:
47 // CreditCardScannerView implementation. 49 // CreditCardScannerView implementation.
48 void Show() override; 50 void Show() override;
49 51
50 // The object to be notified when scanning was cancelled or completed. 52 // The object to be notified when scanning was cancelled or completed.
51 base::WeakPtr<CreditCardScannerViewDelegate> delegate_; 53 base::WeakPtr<CreditCardScannerViewDelegate> delegate_;
52 54
53 // The corresponding Java object that uses Android APIs for scanning. 55 // The corresponding Java object that uses Android APIs for scanning.
54 base::android::ScopedJavaGlobalRef<jobject> java_object_; 56 base::android::ScopedJavaGlobalRef<jobject> java_object_;
55 57
56 DISALLOW_COPY_AND_ASSIGN(CreditCardScannerViewAndroid); 58 DISALLOW_COPY_AND_ASSIGN(CreditCardScannerViewAndroid);
57 }; 59 };
58 60
59 } // namespace autofill 61 } // namespace autofill
60 62
61 #endif // CHROME_BROWSER_UI_ANDROID_AUTOFILL_CREDIT_CARD_SCANNER_VIEW_ANDROID_H _ 63 #endif // CHROME_BROWSER_UI_ANDROID_AUTOFILL_CREDIT_CARD_SCANNER_VIEW_ANDROID_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698