| OLD | NEW |
| 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 <memory> | 9 #include <memory> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 DISALLOW_COPY_AND_ASSIGN(PasswordValueGatekeeper); | 193 DISALLOW_COPY_AND_ASSIGN(PasswordValueGatekeeper); |
| 194 }; | 194 }; |
| 195 | 195 |
| 196 // RenderFrameObserver: | 196 // RenderFrameObserver: |
| 197 void DidFinishDocumentLoad() override; | 197 void DidFinishDocumentLoad() override; |
| 198 void DidFinishLoad() override; | 198 void DidFinishLoad() override; |
| 199 void FrameDetached() override; | 199 void FrameDetached() override; |
| 200 void DidStartProvisionalLoad(blink::WebDataSource* data_source) override; | 200 void DidStartProvisionalLoad(blink::WebDataSource* data_source) override; |
| 201 void WillCommitProvisionalLoad() override; | 201 void WillCommitProvisionalLoad() override; |
| 202 void DidCommitProvisionalLoad(bool is_new_navigation, | 202 void DidCommitProvisionalLoad(bool is_new_navigation, |
| 203 bool is_same_page_navigation) override; | 203 bool is_same_document_navigation) override; |
| 204 void WillSendSubmitEvent(const blink::WebFormElement& form) override; | 204 void WillSendSubmitEvent(const blink::WebFormElement& form) override; |
| 205 void WillSubmitForm(const blink::WebFormElement& form) override; | 205 void WillSubmitForm(const blink::WebFormElement& form) override; |
| 206 void OnDestruct() override; | 206 void OnDestruct() override; |
| 207 | 207 |
| 208 // Scans the given frame for password forms and sends them up to the browser. | 208 // Scans the given frame for password forms and sends them up to the browser. |
| 209 // If |only_visible| is true, only forms visible in the layout are sent. | 209 // If |only_visible| is true, only forms visible in the layout are sent. |
| 210 void SendPasswordForms(bool only_visible); | 210 void SendPasswordForms(bool only_visible); |
| 211 | 211 |
| 212 // Instructs the browser to show a pop-up suggesting which credentials could | 212 // Instructs the browser to show a pop-up suggesting which credentials could |
| 213 // be filled. |show_in_password_field| should indicate whether the pop-up is | 213 // be filled. |show_in_password_field| should indicate whether the pop-up is |
| (...skipping 30 matching lines...) Expand all Loading... |
| 244 // as long as it satisfies |restriction|. |form| and |input| are the elements | 244 // as long as it satisfies |restriction|. |form| and |input| are the elements |
| 245 // user has just been interacting with before the form save. |form| or |input| | 245 // user has just been interacting with before the form save. |form| or |input| |
| 246 // can be null but not both at the same time. For example: if the form is | 246 // can be null but not both at the same time. For example: if the form is |
| 247 // unowned, |form| will be null; if the user has submitted the form, |input| | 247 // unowned, |form| will be null; if the user has submitted the form, |input| |
| 248 // will be null. | 248 // will be null. |
| 249 void ProvisionallySavePassword(std::unique_ptr<PasswordForm> password_form, | 249 void ProvisionallySavePassword(std::unique_ptr<PasswordForm> password_form, |
| 250 const blink::WebFormElement& form, | 250 const blink::WebFormElement& form, |
| 251 const blink::WebInputElement& input, | 251 const blink::WebInputElement& input, |
| 252 ProvisionallySaveRestriction restriction); | 252 ProvisionallySaveRestriction restriction); |
| 253 | 253 |
| 254 // Helper function called when in-page navigation completed | 254 // Helper function called when same-document navigation completed |
| 255 void OnSamePageNavigationCompleted(); | 255 void OnSameDocumentNavigationCompleted(); |
| 256 | 256 |
| 257 const mojom::AutofillDriverPtr& GetAutofillDriver(); | 257 const mojom::AutofillDriverPtr& GetAutofillDriver(); |
| 258 | 258 |
| 259 // The logins we have filled so far with their associated info. | 259 // The logins we have filled so far with their associated info. |
| 260 WebInputToPasswordInfoMap web_input_to_password_info_; | 260 WebInputToPasswordInfoMap web_input_to_password_info_; |
| 261 // A (sort-of) reverse map to |login_to_password_info_|. | 261 // A (sort-of) reverse map to |login_to_password_info_|. |
| 262 PasswordToLoginMap password_to_username_; | 262 PasswordToLoginMap password_to_username_; |
| 263 | 263 |
| 264 // Set if the user might be submitting a password form on the current page, | 264 // Set if the user might be submitting a password form on the current page, |
| 265 // but the submit may still fail (i.e. doesn't pass JavaScript validation). | 265 // but the submit may still fail (i.e. doesn't pass JavaScript validation). |
| (...skipping 29 matching lines...) Expand all Loading... |
| 295 mojom::PasswordManagerDriverPtr password_manager_driver_; | 295 mojom::PasswordManagerDriverPtr password_manager_driver_; |
| 296 | 296 |
| 297 mojo::Binding<mojom::PasswordAutofillAgent> binding_; | 297 mojo::Binding<mojom::PasswordAutofillAgent> binding_; |
| 298 | 298 |
| 299 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent); | 299 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent); |
| 300 }; | 300 }; |
| 301 | 301 |
| 302 } // namespace autofill | 302 } // namespace autofill |
| 303 | 303 |
| 304 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ | 304 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ |
| OLD | NEW |