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