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

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

Issue 2604453003: Show Form-Not-Secure warning on page load (Closed)
Patch Set: meacer, jochen comments Created 3 years, 11 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/autofill_agent.h" 5 #include "components/autofill/content/renderer/autofill_agent.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <tuple> 9 #include <tuple>
10 10
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 if (form_data.wait_for_username) 566 if (form_data.wait_for_username)
567 return; 567 return;
568 568
569 ShowSuggestionsOptions options; 569 ShowSuggestionsOptions options;
570 options.autofill_on_empty_values = true; 570 options.autofill_on_empty_values = true;
571 options.show_full_suggestion_list = true; 571 options.show_full_suggestion_list = true;
572 for (auto element : elements) 572 for (auto element : elements)
573 ShowSuggestions(element, options); 573 ShowSuggestions(element, options);
574 } 574 }
575 575
576 void AutofillAgent::ShowNotSecureWarning(
577 const blink::WebInputElement& element) {
578 if (is_generation_popup_possibly_visible_)
579 return;
580 HidePopup();
581 password_autofill_agent_->ShowNotSecureWarning(element);
582 is_popup_possibly_visible_ = true;
583 }
584
576 void AutofillAgent::OnSamePageNavigationCompleted() { 585 void AutofillAgent::OnSamePageNavigationCompleted() {
577 if (last_interacted_form_.isNull()) { 586 if (last_interacted_form_.isNull()) {
578 // If no last interacted form is available (i.e., there is no form tag), 587 // If no last interacted form is available (i.e., there is no form tag),
579 // we check if all the elements the user has interacted with are gone, 588 // we check if all the elements the user has interacted with are gone,
580 // to decide if submission has occurred. 589 // to decide if submission has occurred.
581 if (formless_elements_user_edited_.size() == 0 || 590 if (formless_elements_user_edited_.size() == 0 ||
582 form_util::IsSomeControlElementVisible(formless_elements_user_edited_)) 591 form_util::IsSomeControlElementVisible(formless_elements_user_edited_))
583 return; 592 return;
584 593
585 FormData constructed_form; 594 FormData constructed_form;
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 void AutofillAgent::LegacyAutofillAgent::OnDestruct() { 818 void AutofillAgent::LegacyAutofillAgent::OnDestruct() {
810 // No-op. Don't delete |this|. 819 // No-op. Don't delete |this|.
811 } 820 }
812 821
813 void AutofillAgent::LegacyAutofillAgent::FocusChangeComplete() { 822 void AutofillAgent::LegacyAutofillAgent::FocusChangeComplete() {
814 if (agent_) 823 if (agent_)
815 agent_->FocusChangeComplete(); 824 agent_->FocusChangeComplete();
816 } 825 }
817 826
818 } // namespace autofill 827 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/content/renderer/autofill_agent.h ('k') | components/autofill/content/renderer/password_autofill_agent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698