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

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

Issue 1381003004: Better distinguish didFinishLoad and didStopLoading (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // to RenderFrameObserver. Should eventually be removed. 144 // to RenderFrameObserver. Should eventually be removed.
145 // http://crbug.com/433486 145 // http://crbug.com/433486
146 class LegacyPasswordAutofillAgent : public content::RenderViewObserver { 146 class LegacyPasswordAutofillAgent : public content::RenderViewObserver {
147 public: 147 public:
148 LegacyPasswordAutofillAgent(content::RenderView* render_view, 148 LegacyPasswordAutofillAgent(content::RenderView* render_view,
149 PasswordAutofillAgent* agent); 149 PasswordAutofillAgent* agent);
150 ~LegacyPasswordAutofillAgent() override; 150 ~LegacyPasswordAutofillAgent() override;
151 151
152 // RenderViewObserver: 152 // RenderViewObserver:
153 void OnDestruct() override; 153 void OnDestruct() override;
154 void DidStartLoading() override;
155 void DidStopLoading() override;
156 void DidStartProvisionalLoad(blink::WebLocalFrame* frame) override; 154 void DidStartProvisionalLoad(blink::WebLocalFrame* frame) override;
157 155
158 private: 156 private:
159 PasswordAutofillAgent* agent_; 157 PasswordAutofillAgent* agent_;
160 158
161 DISALLOW_COPY_AND_ASSIGN(LegacyPasswordAutofillAgent); 159 DISALLOW_COPY_AND_ASSIGN(LegacyPasswordAutofillAgent);
162 }; 160 };
163 friend class LegacyPasswordAutofillAgent; 161 friend class LegacyPasswordAutofillAgent;
164 162
165 // RenderFrameObserver: 163 // RenderFrameObserver:
166 bool OnMessageReceived(const IPC::Message& message) override; 164 bool OnMessageReceived(const IPC::Message& message) override;
167 void DidFinishDocumentLoad() override; 165 void DidFinishDocumentLoad() override;
168 void DidFinishLoad() override; 166 void DidFinishLoad() override;
169 void FrameDetached() override; 167 void FrameDetached() override;
170 void FrameWillClose() override; 168 void FrameWillClose() override;
171 void DidCommitProvisionalLoad(bool is_new_navigation, 169 void DidCommitProvisionalLoad(bool is_new_navigation,
172 bool is_same_page_navigation) override; 170 bool is_same_page_navigation) override;
173 void WillSendSubmitEvent(const blink::WebFormElement& form) override; 171 void WillSendSubmitEvent(const blink::WebFormElement& form) override;
174 void WillSubmitForm(const blink::WebFormElement& form) override; 172 void WillSubmitForm(const blink::WebFormElement& form) override;
175 173
176 // Legacy RenderViewObserver: 174 // Legacy RenderViewObserver:
177 void DidStartLoading();
178 void DidStopLoading();
179 void LegacyDidStartProvisionalLoad(blink::WebLocalFrame* frame); 175 void LegacyDidStartProvisionalLoad(blink::WebLocalFrame* frame);
180 176
181 // RenderView IPC handlers: 177 // RenderView IPC handlers:
182 void OnFillPasswordForm(int key, const PasswordFormFillData& form_data); 178 void OnFillPasswordForm(int key, const PasswordFormFillData& form_data);
183 void OnSetLoggingState(bool active); 179 void OnSetLoggingState(bool active);
184 void OnAutofillUsernameAndPasswordDataReceived( 180 void OnAutofillUsernameAndPasswordDataReceived(
185 const FormsPredictionsMap& predictions); 181 const FormsPredictionsMap& predictions);
186 void OnFindFocusedPasswordForm(); 182 void OnFindFocusedPasswordForm();
187 183
188 // Scans the given frame for password forms and sends them up to the browser. 184 // Scans the given frame for password forms and sends them up to the browser.
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 bool logging_state_active_; 258 bool logging_state_active_;
263 259
264 // True indicates that the username field was autofilled, false otherwise. 260 // True indicates that the username field was autofilled, false otherwise.
265 bool was_username_autofilled_; 261 bool was_username_autofilled_;
266 // True indicates that the password field was autofilled, false otherwise. 262 // True indicates that the password field was autofilled, false otherwise.
267 bool was_password_autofilled_; 263 bool was_password_autofilled_;
268 264
269 // Records the username typed before suggestions preview. 265 // Records the username typed before suggestions preview.
270 base::string16 username_query_prefix_; 266 base::string16 username_query_prefix_;
271 267
272 // True indicates that all frames in a page have been rendered.
273 bool did_stop_loading_;
274
275 // Contains server predictions for username, password and/or new password 268 // Contains server predictions for username, password and/or new password
276 // fields for individual forms. 269 // fields for individual forms.
277 FormsPredictionsMap form_predictions_; 270 FormsPredictionsMap form_predictions_;
278 271
279 base::WeakPtrFactory<PasswordAutofillAgent> weak_ptr_factory_; 272 base::WeakPtrFactory<PasswordAutofillAgent> weak_ptr_factory_;
280 273
281 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent); 274 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent);
282 }; 275 };
283 276
284 } // namespace autofill 277 } // namespace autofill
285 278
286 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ 279 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698