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

Side by Side Diff: components/autofill/content/renderer/password_autofill_agent.h

Issue 597983003: Refactor PasswordAutofillAgent: methods to functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit changes. Created 6 years, 2 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
« no previous file with comments | « no previous file | components/autofill/content/renderer/password_autofill_agent.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_
6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 const blink::WebFormElement& form) OVERRIDE; 146 const blink::WebFormElement& form) OVERRIDE;
147 147
148 // RenderView IPC handlers: 148 // RenderView IPC handlers:
149 void OnFillPasswordForm(const PasswordFormFillData& form_data); 149 void OnFillPasswordForm(const PasswordFormFillData& form_data);
150 void OnSetLoggingState(bool active); 150 void OnSetLoggingState(bool active);
151 151
152 // Scans the given frame for password forms and sends them up to the browser. 152 // Scans the given frame for password forms and sends them up to the browser.
153 // If |only_visible| is true, only forms visible in the layout are sent. 153 // If |only_visible| is true, only forms visible in the layout are sent.
154 void SendPasswordForms(blink::WebFrame* frame, bool only_visible); 154 void SendPasswordForms(blink::WebFrame* frame, bool only_visible);
155 155
156 void GetSuggestions(const PasswordFormFillData& fill_data,
157 const base::string16& input,
158 std::vector<base::string16>* suggestions,
159 std::vector<base::string16>* realms,
160 bool show_all);
161
162 bool ShowSuggestionPopup(const PasswordFormFillData& fill_data, 156 bool ShowSuggestionPopup(const PasswordFormFillData& fill_data,
163 const blink::WebInputElement& user_input, 157 const blink::WebInputElement& user_input,
164 bool show_all); 158 bool show_all);
165 159
166 // Attempts to fill |username_element| and |password_element| with the
167 // |fill_data|. Will use the data corresponding to the preferred username,
168 // unless the |username_element| already has a value set. In that case,
169 // attempts to fill the password matching the already filled username, if
170 // such a password exists.
171 void FillFormOnPasswordRecieved(const PasswordFormFillData& fill_data,
172 blink::WebInputElement username_element,
173 blink::WebInputElement password_element);
174
175 bool FillUserNameAndPassword(blink::WebInputElement* username_element,
176 blink::WebInputElement* password_element,
177 const PasswordFormFillData& fill_data,
178 bool exact_username_match,
179 bool set_selection);
180
181 // Fills |login_input| and |password| with the most relevant suggestion from 160 // Fills |login_input| and |password| with the most relevant suggestion from
182 // |fill_data| and shows a popup with other suggestions. 161 // |fill_data| and shows a popup with other suggestions.
183 void PerformInlineAutocomplete( 162 void PerformInlineAutocomplete(
184 const blink::WebInputElement& username, 163 const blink::WebInputElement& username,
185 const blink::WebInputElement& password, 164 const blink::WebInputElement& password,
186 const PasswordFormFillData& fill_data); 165 const PasswordFormFillData& fill_data);
187 166
188 // Invoked when the passed frame is closing. Gives us a chance to clear any 167 // Invoked when the passed frame is closing. Gives us a chance to clear any
189 // reference we may have to elements in that frame. 168 // reference we may have to elements in that frame.
190 void FrameClosing(const blink::WebFrame* frame); 169 void FrameClosing(const blink::WebFrame* frame);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 bool did_stop_loading_; 222 bool did_stop_loading_;
244 223
245 base::WeakPtrFactory<PasswordAutofillAgent> weak_ptr_factory_; 224 base::WeakPtrFactory<PasswordAutofillAgent> weak_ptr_factory_;
246 225
247 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent); 226 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent);
248 }; 227 };
249 228
250 } // namespace autofill 229 } // namespace autofill
251 230
252 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ 231 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_
OLDNEW
« no previous file with comments | « no previous file | components/autofill/content/renderer/password_autofill_agent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698