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_ANDROID_AUTOFILL_CARD_UNMASK_PROMPT_VIEW_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_UI_ANDROID_AUTOFILL_CARD_UNMASK_PROMPT_VIEW_ANDROID_H_ |
6 #define CHROME_BROWSER_UI_ANDROID_AUTOFILL_CARD_UNMASK_PROMPT_VIEW_ANDROID_H_ | 6 #define CHROME_BROWSER_UI_ANDROID_AUTOFILL_CARD_UNMASK_PROMPT_VIEW_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
11 #include "base/android/scoped_java_ref.h" | 11 #include "base/android/scoped_java_ref.h" |
12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
13 #include "chrome/browser/ui/autofill/card_unmask_prompt_view.h" | 13 #include "chrome/browser/ui/autofill/card_unmask_prompt_view.h" |
14 | 14 |
15 namespace autofill { | 15 namespace autofill { |
16 | 16 |
17 class CardUnmaskPromptViewAndroid : public CardUnmaskPromptView { | 17 class CardUnmaskPromptViewAndroid : public CardUnmaskPromptView { |
18 public: | 18 public: |
19 explicit CardUnmaskPromptViewAndroid(CardUnmaskPromptController* controller); | 19 explicit CardUnmaskPromptViewAndroid(CardUnmaskPromptController* controller); |
20 | 20 |
21 void Show(); | 21 void Show(); |
22 | 22 |
23 bool CheckUserInputValidity(JNIEnv* env, jobject obj, jstring response); | 23 bool CheckUserInputValidity(JNIEnv* env, jobject obj, jstring response); |
24 void OnUserInput(JNIEnv* env, | 24 void OnUserInput(JNIEnv* env, |
25 jobject obj, | 25 jobject obj, |
26 jstring cvc, | 26 jstring cvc, |
27 jstring month, | 27 jstring month, |
28 jstring year); | 28 jstring year, |
| 29 jboolean should_store_locally); |
29 void PromptDismissed(JNIEnv* env, jobject obj); | 30 void PromptDismissed(JNIEnv* env, jobject obj); |
30 | 31 |
31 // CardUnmaskPromptView implementation. | 32 // CardUnmaskPromptView implementation. |
32 void ControllerGone() override; | 33 void ControllerGone() override; |
33 void DisableAndWaitForVerification() override; | 34 void DisableAndWaitForVerification() override; |
34 void GotVerificationResult(bool success) override; | 35 void GotVerificationResult(bool success) override; |
35 | 36 |
36 static bool Register(JNIEnv* env); | 37 static bool Register(JNIEnv* env); |
37 | 38 |
38 private: | 39 private: |
39 ~CardUnmaskPromptViewAndroid() override; | 40 ~CardUnmaskPromptViewAndroid() override; |
40 | 41 |
41 // The corresponding java object. | 42 // The corresponding java object. |
42 base::android::ScopedJavaGlobalRef<jobject> java_object_; | 43 base::android::ScopedJavaGlobalRef<jobject> java_object_; |
43 | 44 |
44 CardUnmaskPromptController* controller_; | 45 CardUnmaskPromptController* controller_; |
45 | 46 |
46 DISALLOW_COPY_AND_ASSIGN(CardUnmaskPromptViewAndroid); | 47 DISALLOW_COPY_AND_ASSIGN(CardUnmaskPromptViewAndroid); |
47 }; | 48 }; |
48 | 49 |
49 } // namespace autofill | 50 } // namespace autofill |
50 | 51 |
51 #endif // CHROME_BROWSER_UI_ANDROID_AUTOFILL_CARD_UNMASK_PROMPT_VIEW_ANDROID_H_ | 52 #endif // CHROME_BROWSER_UI_ANDROID_AUTOFILL_CARD_UNMASK_PROMPT_VIEW_ANDROID_H_ |
OLD | NEW |