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

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

Issue 9235072: Adding Mouse Support for new GTK Autofill (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Responding to comments Created 8 years, 10 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
OLDNEW
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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 const std::vector<string16>& values, 98 const std::vector<string16>& values,
99 const std::vector<string16>& labels, 99 const std::vector<string16>& labels,
100 const std::vector<string16>& icons, 100 const std::vector<string16>& icons,
101 const std::vector<int>& unique_ids); 101 const std::vector<int>& unique_ids);
102 void OnFormDataFilled(int query_id, const webkit::forms::FormData& form); 102 void OnFormDataFilled(int query_id, const webkit::forms::FormData& form);
103 void OnFieldTypePredictionsAvailable( 103 void OnFieldTypePredictionsAvailable(
104 const std::vector<webkit::forms::FormDataPredictions>& forms); 104 const std::vector<webkit::forms::FormDataPredictions>& forms);
105 105
106 // For external Autofill selection. 106 // For external Autofill selection.
107 void OnSelectAutofillSuggestionAtIndex(int listIndex); 107 void OnSelectAutofillSuggestionAtIndex(int listIndex);
108 void OnSetAutofillActionFill();
109 void OnClearForm();
110 void OnSetAutofillActionPreview();
111 void OnClearPreviewedForm();
112 void OnSetNodeText(string16 value);
108 113
109 // Called in a posted task by textFieldDidChange() to work-around a WebKit bug 114 // Called in a posted task by textFieldDidChange() to work-around a WebKit bug
110 // http://bugs.webkit.org/show_bug.cgi?id=16976 115 // http://bugs.webkit.org/show_bug.cgi?id=16976
111 void TextFieldDidChangeImpl(const WebKit::WebInputElement& element); 116 void TextFieldDidChangeImpl(const WebKit::WebInputElement& element);
112 117
113 // Shows the autofill suggestions for |element|. 118 // Shows the autofill suggestions for |element|.
114 // This call is asynchronous and may or may not lead to the showing of a 119 // This call is asynchronous and may or may not lead to the showing of a
115 // suggestion popup (no popup is shown if there are no available suggestions). 120 // suggestion popup (no popup is shown if there are no available suggestions).
116 // |autofill_on_empty_values| specifies whether suggestions should be shown 121 // |autofill_on_empty_values| specifies whether suggestions should be shown
117 // when |element| contains no text. 122 // when |element| contains no text.
(...skipping 21 matching lines...) Expand all
139 int unique_id, 144 int unique_id,
140 AutofillAction action); 145 AutofillAction action);
141 146
142 // Fills |form| and |field| with the FormData and FormField corresponding to 147 // Fills |form| and |field| with the FormData and FormField corresponding to
143 // |node|. Returns true if the data was found; and false otherwise. 148 // |node|. Returns true if the data was found; and false otherwise.
144 bool FindFormAndFieldForNode( 149 bool FindFormAndFieldForNode(
145 const WebKit::WebNode& node, 150 const WebKit::WebNode& node,
146 webkit::forms::FormData* form, 151 webkit::forms::FormData* form,
147 webkit::forms::FormField* field) WARN_UNUSED_RESULT; 152 webkit::forms::FormField* field) WARN_UNUSED_RESULT;
148 153
154 // Set |node| to display the given |value|.
155 void SetNodeText(WebKit::WebInputElement node, string16 value);
Ilya Sherman 2012/02/08 17:01:57 nit: Might as well pass the |node| and the |value|
csharp 2012/02/08 19:05:43 changed value, but we modify node so it can't chan
Ilya Sherman 2012/02/08 19:23:55 In that case we should pass it as a pointer, and r
csharp 2012/02/08 20:11:40 Done.
156
149 FormCache form_cache_; 157 FormCache form_cache_;
150 158
151 PasswordAutofillManager* password_autofill_manager_; // WEAK reference. 159 PasswordAutofillManager* password_autofill_manager_; // WEAK reference.
152 160
153 // The ID of the last request sent for form field Autofill. Used to ignore 161 // The ID of the last request sent for form field Autofill. Used to ignore
154 // out of date responses. 162 // out of date responses.
155 int autofill_query_id_; 163 int autofill_query_id_;
156 164
157 // The element corresponding to the last request sent for form field Autofill. 165 // The element corresponding to the last request sent for form field Autofill.
158 WebKit::WebInputElement autofill_query_element_; 166 WebKit::WebInputElement autofill_query_element_;
(...skipping 25 matching lines...) Expand all
184 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillManagerTest, WaitUsername); 192 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillManagerTest, WaitUsername);
185 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillManagerTest, SuggestionAccept); 193 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillManagerTest, SuggestionAccept);
186 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillManagerTest, SuggestionSelect); 194 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillManagerTest, SuggestionSelect);
187 195
188 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); 196 DISALLOW_COPY_AND_ASSIGN(AutofillAgent);
189 }; 197 };
190 198
191 } // namespace autofill 199 } // namespace autofill
192 200
193 #endif // CHROME_RENDERER_AUTOFILL_AUTOFILL_AGENT_H_ 201 #endif // CHROME_RENDERER_AUTOFILL_AUTOFILL_AGENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698