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/card_unmask_prompt_view_android.h" | 5 #include "chrome/browser/ui/android/autofill/card_unmask_prompt_view_android.h" |
6 | 6 |
7 #include "chrome/browser/android/resource_mapper.h" | 7 #include "chrome/browser/android/resource_mapper.h" |
8 #include "chrome/browser/ui/autofill/card_unmask_prompt_controller.h" | 8 #include "chrome/browser/ui/autofill/card_unmask_prompt_controller.h" |
9 #include "content/public/browser/web_contents.h" | 9 #include "content/public/browser/web_contents.h" |
10 #include "jni/CardUnmaskBridge_jni.h" | 10 #include "jni/CardUnmaskBridge_jni.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 controller_ = nullptr; | 81 controller_ = nullptr; |
82 JNIEnv* env = base::android::AttachCurrentThread(); | 82 JNIEnv* env = base::android::AttachCurrentThread(); |
83 Java_CardUnmaskBridge_dismiss(env, java_object_.obj()); | 83 Java_CardUnmaskBridge_dismiss(env, java_object_.obj()); |
84 } | 84 } |
85 | 85 |
86 void CardUnmaskPromptViewAndroid::DisableAndWaitForVerification() { | 86 void CardUnmaskPromptViewAndroid::DisableAndWaitForVerification() { |
87 JNIEnv* env = base::android::AttachCurrentThread(); | 87 JNIEnv* env = base::android::AttachCurrentThread(); |
88 Java_CardUnmaskBridge_disableAndWaitForVerification(env, java_object_.obj()); | 88 Java_CardUnmaskBridge_disableAndWaitForVerification(env, java_object_.obj()); |
89 } | 89 } |
90 | 90 |
91 void CardUnmaskPromptViewAndroid::GotVerificationResult(bool success) { | 91 void CardUnmaskPromptViewAndroid::GotVerificationResult( |
| 92 const base::string16& error_message, |
| 93 bool allow_retry) { |
92 JNIEnv* env = base::android::AttachCurrentThread(); | 94 JNIEnv* env = base::android::AttachCurrentThread(); |
93 Java_CardUnmaskBridge_verificationFinished(env, java_object_.obj(), success); | 95 // TODO(estade): pass |error_message| and |allow_retry|. |
| 96 Java_CardUnmaskBridge_verificationFinished(env, java_object_.obj(), |
| 97 error_message.empty()); |
94 } | 98 } |
95 | 99 |
96 // static | 100 // static |
97 bool CardUnmaskPromptViewAndroid::Register(JNIEnv* env) { | 101 bool CardUnmaskPromptViewAndroid::Register(JNIEnv* env) { |
98 return RegisterNativesImpl(env); | 102 return RegisterNativesImpl(env); |
99 } | 103 } |
100 | 104 |
101 } // namespace autofill | 105 } // namespace autofill |
OLD | NEW |