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_
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"
21 class CardUnmaskPromptViewAndroid
: public CardUnmaskPromptView
{
23 explicit CardUnmaskPromptViewAndroid(CardUnmaskPromptController
* controller
,
24 content::WebContents
* web_contents
);
26 bool CheckUserInputValidity(JNIEnv
* env
, jobject obj
, jstring response
);
27 void OnUserInput(JNIEnv
* env
,
32 jboolean should_store_locally
);
33 void OnNewCardLinkClicked(JNIEnv
* env
, jobject obj
);
34 void PromptDismissed(JNIEnv
* env
, jobject obj
);
36 // CardUnmaskPromptView implementation.
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
);
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_