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

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

Powered by Google App Engine
This is Rietveld 408576698