OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_BROWSER_AW_AUTOFILL_MANAGER_DELEGATE_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_AW_AUTOFILL_MANAGER_DELEGATE_H_ |
6 #define ANDROID_WEBVIEW_BROWSER_AW_AUTOFILL_MANAGER_DELEGATE_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_AW_AUTOFILL_MANAGER_DELEGATE_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 const autofill::AutofillMetrics& metric_logger, | 67 const autofill::AutofillMetrics& metric_logger, |
68 const base::Closure& save_card_callback) OVERRIDE; | 68 const base::Closure& save_card_callback) OVERRIDE; |
69 virtual void ShowRequestAutocompleteDialog( | 69 virtual void ShowRequestAutocompleteDialog( |
70 const autofill::FormData& form, | 70 const autofill::FormData& form, |
71 const GURL& source_url, | 71 const GURL& source_url, |
72 const base::Callback<void(const autofill::FormStructure*)>& callback) | 72 const base::Callback<void(const autofill::FormStructure*)>& callback) |
73 OVERRIDE; | 73 OVERRIDE; |
74 virtual void ShowAutofillPopup( | 74 virtual void ShowAutofillPopup( |
75 const gfx::RectF& element_bounds, | 75 const gfx::RectF& element_bounds, |
76 base::i18n::TextDirection text_direction, | 76 base::i18n::TextDirection text_direction, |
77 const std::vector<string16>& values, | 77 const std::vector<base::string16>& values, |
78 const std::vector<string16>& labels, | 78 const std::vector<base::string16>& labels, |
79 const std::vector<string16>& icons, | 79 const std::vector<base::string16>& icons, |
80 const std::vector<int>& identifiers, | 80 const std::vector<int>& identifiers, |
81 base::WeakPtr<autofill::AutofillPopupDelegate> delegate) OVERRIDE; | 81 base::WeakPtr<autofill::AutofillPopupDelegate> delegate) OVERRIDE; |
82 virtual void UpdateAutofillPopupDataListValues( | 82 virtual void UpdateAutofillPopupDataListValues( |
83 const std::vector<base::string16>& values, | 83 const std::vector<base::string16>& values, |
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 const std::vector<autofill::FormStructure*>& forms) OVERRIDE; | 88 const std::vector<autofill::FormStructure*>& forms) OVERRIDE; |
89 | 89 |
90 void SuggestionSelected(JNIEnv* env, | 90 void SuggestionSelected(JNIEnv* env, |
91 jobject obj, | 91 jobject obj, |
92 jint position); | 92 jint position); |
93 private: | 93 private: |
94 AwAutofillManagerDelegate(content::WebContents* web_contents); | 94 AwAutofillManagerDelegate(content::WebContents* web_contents); |
95 friend class content::WebContentsUserData<AwAutofillManagerDelegate>; | 95 friend class content::WebContentsUserData<AwAutofillManagerDelegate>; |
96 | 96 |
97 void ShowAutofillPopupImpl(const gfx::RectF& element_bounds, | 97 void ShowAutofillPopupImpl(const gfx::RectF& element_bounds, |
98 const std::vector<string16>& values, | 98 const std::vector<base::string16>& values, |
99 const std::vector<string16>& labels, | 99 const std::vector<base::string16>& labels, |
100 const std::vector<int>& identifiers); | 100 const std::vector<int>& identifiers); |
101 | 101 |
102 // The web_contents associated with this delegate. | 102 // The web_contents associated with this delegate. |
103 content::WebContents* web_contents_; | 103 content::WebContents* web_contents_; |
104 bool save_form_data_; | 104 bool save_form_data_; |
105 JavaObjectWeakGlobalRef java_ref_; | 105 JavaObjectWeakGlobalRef java_ref_; |
106 | 106 |
107 // The current Autofill query values. | 107 // The current Autofill query values. |
108 std::vector<string16> values_; | 108 std::vector<base::string16> values_; |
109 std::vector<int> identifiers_; | 109 std::vector<int> identifiers_; |
110 base::WeakPtr<autofill::AutofillPopupDelegate> delegate_; | 110 base::WeakPtr<autofill::AutofillPopupDelegate> delegate_; |
111 | 111 |
112 DISALLOW_COPY_AND_ASSIGN(AwAutofillManagerDelegate); | 112 DISALLOW_COPY_AND_ASSIGN(AwAutofillManagerDelegate); |
113 }; | 113 }; |
114 | 114 |
115 bool RegisterAwAutofillManagerDelegate(JNIEnv* env); | 115 bool RegisterAwAutofillManagerDelegate(JNIEnv* env); |
116 | 116 |
117 } // namespace android_webview | 117 } // namespace android_webview |
118 | 118 |
119 #endif // ANDROID_WEBVIEW_BROWSER_AW_AUTOFILL_MANAGER_DELEGATE_H_ | 119 #endif // ANDROID_WEBVIEW_BROWSER_AW_AUTOFILL_MANAGER_DELEGATE_H_ |
OLD | NEW |