OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_RENDERER_AUTOFILL_AUTOFILL_AGENT_H_ | 5 #ifndef CHROME_RENDERER_AUTOFILL_AUTOFILL_AGENT_H_ |
6 #define CHROME_RENDERER_AUTOFILL_AUTOFILL_AGENT_H_ | 6 #define CHROME_RENDERER_AUTOFILL_AUTOFILL_AGENT_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 | 97 |
98 void OnSuggestionsReturned(int query_id, | 98 void OnSuggestionsReturned(int query_id, |
99 const std::vector<string16>& values, | 99 const std::vector<string16>& values, |
100 const std::vector<string16>& labels, | 100 const std::vector<string16>& labels, |
101 const std::vector<string16>& icons, | 101 const std::vector<string16>& icons, |
102 const std::vector<int>& unique_ids); | 102 const std::vector<int>& unique_ids); |
103 void OnFormDataFilled(int query_id, const webkit_glue::FormData& form); | 103 void OnFormDataFilled(int query_id, const webkit_glue::FormData& form); |
104 void OnFieldTypePredictionsAvailable( | 104 void OnFieldTypePredictionsAvailable( |
105 const std::vector<webkit_glue::FormDataPredictions>& forms); | 105 const std::vector<webkit_glue::FormDataPredictions>& forms); |
106 | 106 |
| 107 // For external autofill selection. |
| 108 void OnSelectAutofillSuggestionAtIndex(int listIndex); |
| 109 |
107 // Called in a posted task by textFieldDidChange() to work-around a WebKit bug | 110 // Called in a posted task by textFieldDidChange() to work-around a WebKit bug |
108 // http://bugs.webkit.org/show_bug.cgi?id=16976 | 111 // http://bugs.webkit.org/show_bug.cgi?id=16976 |
109 void TextFieldDidChangeImpl(const WebKit::WebInputElement& element); | 112 void TextFieldDidChangeImpl(const WebKit::WebInputElement& element); |
110 | 113 |
111 // Shows the autofill suggestions for |element|. | 114 // Shows the autofill suggestions for |element|. |
112 // This call is asynchronous and may or may not lead to the showing of a | 115 // This call is asynchronous and may or may not lead to the showing of a |
113 // suggestion popup (no popup is shown if there are no available suggestions). | 116 // suggestion popup (no popup is shown if there are no available suggestions). |
114 // |autofill_on_empty_values| specifies whether suggestions should be shown | 117 // |autofill_on_empty_values| specifies whether suggestions should be shown |
115 // when |element| contains no text. | 118 // when |element| contains no text. |
116 // |requires_caret_at_end| specifies whether suggestions should be shown when | 119 // |requires_caret_at_end| specifies whether suggestions should be shown when |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillManagerTest, WaitUsername); | 185 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillManagerTest, WaitUsername); |
183 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillManagerTest, SuggestionAccept); | 186 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillManagerTest, SuggestionAccept); |
184 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillManagerTest, SuggestionSelect); | 187 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillManagerTest, SuggestionSelect); |
185 | 188 |
186 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); | 189 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); |
187 }; | 190 }; |
188 | 191 |
189 } // namespace autofill | 192 } // namespace autofill |
190 | 193 |
191 #endif // CHROME_RENDERER_AUTOFILL_AUTOFILL_AGENT_H_ | 194 #endif // CHROME_RENDERER_AUTOFILL_AUTOFILL_AGENT_H_ |
OLD | NEW |