Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / ui / android / autofill / card_unmask_prompt_view_android.h
blob0928fc78503c68c2dc14ad2198a3daa5274a3b8c
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
3 // found in the LICENSE file.
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_
8 #include <jni.h>
10 #include "base/android/jni_string.h"
11 #include "base/android/scoped_java_ref.h"
12 #include "base/strings/string16.h"
13 #include "components/autofill/core/browser/ui/card_unmask_prompt_view.h"
15 namespace content {
16 class WebContents;
19 namespace autofill {
21 class CardUnmaskPromptViewAndroid : public CardUnmaskPromptView {
22 public:
23 explicit CardUnmaskPromptViewAndroid(CardUnmaskPromptController* controller,
24 content::WebContents* web_contents);
26 bool CheckUserInputValidity(JNIEnv* env, jobject obj, jstring response);
27 void OnUserInput(JNIEnv* env,
28 jobject obj,
29 jstring cvc,
30 jstring month,
31 jstring year,
32 jboolean should_store_locally);
33 void OnNewCardLinkClicked(JNIEnv* env, jobject obj);
34 void PromptDismissed(JNIEnv* env, jobject obj);
36 // CardUnmaskPromptView implementation.
37 void Show() override;
38 void ControllerGone() override;
39 void DisableAndWaitForVerification() override;
40 void GotVerificationResult(const base::string16& error_message,
41 bool allow_retry) override;
43 static bool Register(JNIEnv* env);
45 private:
46 ~CardUnmaskPromptViewAndroid() override;
48 // The corresponding java object.
49 base::android::ScopedJavaGlobalRef<jobject> java_object_;
51 CardUnmaskPromptController* controller_;
52 content::WebContents* web_contents_;
54 DISALLOW_COPY_AND_ASSIGN(CardUnmaskPromptViewAndroid);
57 } // namespace autofill
59 #endif // CHROME_BROWSER_UI_ANDROID_AUTOFILL_CARD_UNMASK_PROMPT_VIEW_ANDROID_H_