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

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

Issue 2378503002: Observe visibility of password inputs, for HTTP-bad phase 1 (Closed)
Patch Set: fix components_unittests build failure Created 4 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 #include "components/autofill/content/renderer/password_autofill_agent.h" 5 #include "components/autofill/content/renderer/password_autofill_agent.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 } 905 }
906 906
907 void PasswordAutofillAgent::OnDynamicFormsSeen() { 907 void PasswordAutofillAgent::OnDynamicFormsSeen() {
908 SendPasswordForms(false /* only_visible */); 908 SendPasswordForms(false /* only_visible */);
909 } 909 }
910 910
911 void PasswordAutofillAgent::AJAXSucceeded() { 911 void PasswordAutofillAgent::AJAXSucceeded() {
912 OnSamePageNavigationCompleted(); 912 OnSamePageNavigationCompleted();
913 } 913 }
914 914
915 void PasswordAutofillAgent::OnPasswordFieldVisible() {
916 GetPasswordManagerDriver()->PasswordFieldVisible();
917 }
918
915 void PasswordAutofillAgent::OnSamePageNavigationCompleted() { 919 void PasswordAutofillAgent::OnSamePageNavigationCompleted() {
916 if (!ProvisionallySavedPasswordIsValid()) 920 if (!ProvisionallySavedPasswordIsValid())
917 return; 921 return;
918 922
919 // Prompt to save only if the form is now gone, either invisible or 923 // Prompt to save only if the form is now gone, either invisible or
920 // removed from the DOM. 924 // removed from the DOM.
921 blink::WebFrame* frame = render_frame()->GetWebFrame(); 925 blink::WebFrame* frame = render_frame()->GetWebFrame();
922 if (form_util::IsFormVisible(frame, provisionally_saved_form_->action, 926 if (form_util::IsFormVisible(frame, provisionally_saved_form_->action,
923 provisionally_saved_form_->origin, 927 provisionally_saved_form_->origin,
924 provisionally_saved_form_->form_data) || 928 provisionally_saved_form_->form_data) ||
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
1501 PasswordAutofillAgent::GetPasswordManagerDriver() { 1505 PasswordAutofillAgent::GetPasswordManagerDriver() {
1502 if (!password_manager_driver_) { 1506 if (!password_manager_driver_) {
1503 render_frame()->GetRemoteInterfaces()->GetInterface( 1507 render_frame()->GetRemoteInterfaces()->GetInterface(
1504 mojo::GetProxy(&password_manager_driver_)); 1508 mojo::GetProxy(&password_manager_driver_));
1505 } 1509 }
1506 1510
1507 return password_manager_driver_; 1511 return password_manager_driver_;
1508 } 1512 }
1509 1513
1510 } // namespace autofill 1514 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698