Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Side by Side Diff: chrome/renderer/autofill/autofill_agent.h

Issue 10307004: Support datalist UI for <input type=email multiple> (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nits Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 void ShowSuggestions(const WebKit::WebInputElement& element, 132 void ShowSuggestions(const WebKit::WebInputElement& element,
133 bool autofill_on_empty_values, 133 bool autofill_on_empty_values,
134 bool requires_caret_at_end, 134 bool requires_caret_at_end,
135 bool display_warning_if_disabled); 135 bool display_warning_if_disabled);
136 136
137 // Queries the browser for Autocomplete and Autofill suggestions for the given 137 // Queries the browser for Autocomplete and Autofill suggestions for the given
138 // |element|. 138 // |element|.
139 void QueryAutofillSuggestions(const WebKit::WebInputElement& element, 139 void QueryAutofillSuggestions(const WebKit::WebInputElement& element,
140 bool display_warning_if_disabled); 140 bool display_warning_if_disabled);
141 141
142 // Combines DataList suggestion entries with the autofill ones and show them
143 // to the user.
142 void CombineDataListEntriesAndShow(const WebKit::WebInputElement& element, 144 void CombineDataListEntriesAndShow(const WebKit::WebInputElement& element,
143 const std::vector<string16>& values, 145 const std::vector<string16>& values,
144 const std::vector<string16>& labels, 146 const std::vector<string16>& labels,
145 const std::vector<string16>& icons, 147 const std::vector<string16>& icons,
146 const std::vector<int>& item_ids, 148 const std::vector<int>& item_ids,
147 bool has_autofill_item); 149 bool has_autofill_item);
148 150
151 // Sets the element value to reflect the selected suggestion |value|.
152 void ApplyDataListSuggestionToValue(const string16& value);
Ilya Sherman 2012/05/16 18:05:31 nit: Perhaps "AcceptDataListSuggestion(const strin
keishi 2012/05/17 02:24:09 Done.
153
149 // Queries the AutofillManager for form data for the form containing |node|. 154 // Queries the AutofillManager for form data for the form containing |node|.
150 // |value| is the current text in the field, and |unique_id| is the selected 155 // |value| is the current text in the field, and |unique_id| is the selected
151 // profile's unique ID. |action| specifies whether to Fill or Preview the 156 // profile's unique ID. |action| specifies whether to Fill or Preview the
152 // values returned from the AutofillManager. 157 // values returned from the AutofillManager.
153 void FillAutofillFormData(const WebKit::WebNode& node, 158 void FillAutofillFormData(const WebKit::WebNode& node,
154 int unique_id, 159 int unique_id,
155 AutofillAction action); 160 AutofillAction action);
156 161
157 // Fills |form| and |field| with the FormData and FormField corresponding to 162 // Fills |form| and |field| with the FormData and FormField corresponding to
158 // |node|. Returns true if the data was found; and false otherwise. 163 // |node|. Returns true if the data was found; and false otherwise.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillManagerTest, WaitUsername); 201 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillManagerTest, WaitUsername);
197 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillManagerTest, SuggestionAccept); 202 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillManagerTest, SuggestionAccept);
198 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillManagerTest, SuggestionSelect); 203 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillManagerTest, SuggestionSelect);
199 204
200 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); 205 DISALLOW_COPY_AND_ASSIGN(AutofillAgent);
201 }; 206 };
202 207
203 } // namespace autofill 208 } // namespace autofill
204 209
205 #endif // CHROME_RENDERER_AUTOFILL_AUTOFILL_AGENT_H_ 210 #endif // CHROME_RENDERER_AUTOFILL_AUTOFILL_AGENT_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/autofill/autofill_agent.cc » ('j') | chrome/renderer/autofill/autofill_agent.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698