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