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 ANDROID_WEBVIEW_NATIVE_AW_AUTOFILL_CLIENT_H_ | 5 #ifndef ANDROID_WEBVIEW_NATIVE_AW_AUTOFILL_CLIENT_H_ |
6 #define ANDROID_WEBVIEW_NATIVE_AW_AUTOFILL_CLIENT_H_ | 6 #define ANDROID_WEBVIEW_NATIVE_AW_AUTOFILL_CLIENT_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 void HideAutofillPopup() override; | 89 void HideAutofillPopup() override; |
90 bool IsAutocompleteEnabled() override; | 90 bool IsAutocompleteEnabled() override; |
91 void PropagateAutofillPredictions( | 91 void PropagateAutofillPredictions( |
92 content::RenderFrameHost* rfh, | 92 content::RenderFrameHost* rfh, |
93 const std::vector<autofill::FormStructure*>& forms) override; | 93 const std::vector<autofill::FormStructure*>& forms) override; |
94 void DidFillOrPreviewField(const base::string16& autofilled_value, | 94 void DidFillOrPreviewField(const base::string16& autofilled_value, |
95 const base::string16& profile_full_name) override; | 95 const base::string16& profile_full_name) override; |
96 void OnFirstUserGestureObserved() override; | 96 void OnFirstUserGestureObserved() override; |
97 bool IsContextSecure(const GURL& form_origin) override; | 97 bool IsContextSecure(const GURL& form_origin) override; |
98 | 98 |
99 void SuggestionSelected(JNIEnv* env, jobject obj, jint position); | 99 void SuggestionSelected(JNIEnv* env, |
| 100 const base::android::JavaParamRef<jobject>& obj, |
| 101 jint position); |
100 | 102 |
101 private: | 103 private: |
102 AwAutofillClient(content::WebContents* web_contents); | 104 AwAutofillClient(content::WebContents* web_contents); |
103 friend class content::WebContentsUserData<AwAutofillClient>; | 105 friend class content::WebContentsUserData<AwAutofillClient>; |
104 | 106 |
105 void ShowAutofillPopupImpl( | 107 void ShowAutofillPopupImpl( |
106 const gfx::RectF& element_bounds, | 108 const gfx::RectF& element_bounds, |
107 bool is_rtl, | 109 bool is_rtl, |
108 const std::vector<autofill::Suggestion>& suggestions); | 110 const std::vector<autofill::Suggestion>& suggestions); |
109 | 111 |
110 // The web_contents associated with this delegate. | 112 // The web_contents associated with this delegate. |
111 content::WebContents* web_contents_; | 113 content::WebContents* web_contents_; |
112 bool save_form_data_; | 114 bool save_form_data_; |
113 JavaObjectWeakGlobalRef java_ref_; | 115 JavaObjectWeakGlobalRef java_ref_; |
114 | 116 |
115 // The current Autofill query values. | 117 // The current Autofill query values. |
116 std::vector<autofill::Suggestion> suggestions_; | 118 std::vector<autofill::Suggestion> suggestions_; |
117 base::WeakPtr<autofill::AutofillPopupDelegate> delegate_; | 119 base::WeakPtr<autofill::AutofillPopupDelegate> delegate_; |
118 | 120 |
119 DISALLOW_COPY_AND_ASSIGN(AwAutofillClient); | 121 DISALLOW_COPY_AND_ASSIGN(AwAutofillClient); |
120 }; | 122 }; |
121 | 123 |
122 bool RegisterAwAutofillClient(JNIEnv* env); | 124 bool RegisterAwAutofillClient(JNIEnv* env); |
123 | 125 |
124 } // namespace android_webview | 126 } // namespace android_webview |
125 | 127 |
126 #endif // ANDROID_WEBVIEW_NATIVE_AW_AUTOFILL_CLIENT_H_ | 128 #endif // ANDROID_WEBVIEW_NATIVE_AW_AUTOFILL_CLIENT_H_ |
OLD | NEW |