| 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 #include "chrome/browser/ui/android/autofill/credit_card_scanner_view_android.h" | 5 #include "chrome/browser/ui/android/autofill/credit_card_scanner_view_android.h" |
| 6 | 6 |
| 7 #include "base/android/context_utils.h" |
| 7 #include "base/android/jni_android.h" | 8 #include "base/android/jni_android.h" |
| 8 #include "base/android/jni_string.h" | 9 #include "base/android/jni_string.h" |
| 9 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/ui/android/window_android_helper.h" | 11 #include "chrome/browser/ui/android/window_android_helper.h" |
| 11 #include "chrome/browser/ui/autofill/credit_card_scanner_view_delegate.h" | 12 #include "chrome/browser/ui/autofill/credit_card_scanner_view_delegate.h" |
| 12 #include "content/public/browser/android/content_view_core.h" | 13 #include "content/public/browser/android/content_view_core.h" |
| 13 #include "jni/CreditCardScanner_jni.h" | 14 #include "jni/CreditCardScanner_jni.h" |
| 14 #include "ui/android/view_android.h" | 15 #include "ui/android/view_android.h" |
| 15 #include "ui/android/window_android.h" | 16 #include "ui/android/window_android.h" |
| 16 | 17 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 base::android::ConvertJavaStringToUTF16(env, card_number), | 65 base::android::ConvertJavaStringToUTF16(env, card_number), |
| 65 static_cast<int>(expiration_month), static_cast<int>(expiration_year)); | 66 static_cast<int>(expiration_month), static_cast<int>(expiration_year)); |
| 66 } | 67 } |
| 67 | 68 |
| 68 void CreditCardScannerViewAndroid::Show() { | 69 void CreditCardScannerViewAndroid::Show() { |
| 69 JNIEnv* env = base::android::AttachCurrentThread(); | 70 JNIEnv* env = base::android::AttachCurrentThread(); |
| 70 Java_CreditCardScanner_scan(env, java_object_.obj()); | 71 Java_CreditCardScanner_scan(env, java_object_.obj()); |
| 71 } | 72 } |
| 72 | 73 |
| 73 } // namespace autofill | 74 } // namespace autofill |
| OLD | NEW |