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

Side by Side Diff: components/password_manager/content/browser/content_password_manager_driver.cc

Issue 2468833002: Count visible password fields on a page (Closed)
Patch Set: dcheng comments Created 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/password_manager/content/browser/content_password_manager_d river.h" 5 #include "components/password_manager/content/browser/content_password_manager_d river.h"
6 6
7 #include "components/autofill/content/browser/content_autofill_driver.h" 7 #include "components/autofill/content/browser/content_autofill_driver.h"
8 #include "components/autofill/core/common/form_data.h" 8 #include "components/autofill/core/common/form_data.h"
9 #include "components/autofill/core/common/password_form.h" 9 #include "components/autofill/core/common/password_form.h"
10 #include "components/password_manager/content/browser/bad_message.h" 10 #include "components/password_manager/content/browser/bad_message.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 password_form.origin, 204 password_form.origin,
205 BadMessageReason::CPMD_BAD_ORIGIN_FOCUSED_PASSWORD_FORM_FOUND)) 205 BadMessageReason::CPMD_BAD_ORIGIN_FOCUSED_PASSWORD_FORM_FOUND))
206 return; 206 return;
207 GetPasswordManager()->OnPasswordFormForceSaveRequested(this, password_form); 207 GetPasswordManager()->OnPasswordFormForceSaveRequested(this, password_form);
208 } 208 }
209 209
210 void ContentPasswordManagerDriver::PasswordFieldVisibleInInsecureContext() { 210 void ContentPasswordManagerDriver::PasswordFieldVisibleInInsecureContext() {
211 MaybeNotifyPasswordInputShownOnHttp(render_frame_host_); 211 MaybeNotifyPasswordInputShownOnHttp(render_frame_host_);
212 } 212 }
213 213
214 void ContentPasswordManagerDriver::
215 AllPasswordFieldsInInsecureContextInvisible() {
216 // TODO(estark): if all frames in the frame tree have their password
217 // fields hidden, then notify the WebContents that there are no
218 // visible password fields left. https://crbug.com/658764
219 }
220
214 void ContentPasswordManagerDriver::DidNavigateFrame( 221 void ContentPasswordManagerDriver::DidNavigateFrame(
215 const content::LoadCommittedDetails& details, 222 const content::LoadCommittedDetails& details,
216 const content::FrameNavigateParams& params) { 223 const content::FrameNavigateParams& params) {
217 // Clear page specific data after main frame navigation. 224 // Clear page specific data after main frame navigation.
218 if (!render_frame_host_->GetParent() && !details.is_in_page) { 225 if (!render_frame_host_->GetParent() && !details.is_in_page) {
219 GetPasswordManager()->DidNavigateMainFrame(); 226 GetPasswordManager()->DidNavigateMainFrame();
220 GetPasswordAutofillManager()->DidNavigateMainFrame(); 227 GetPasswordAutofillManager()->DidNavigateMainFrame();
221 } 228 }
222 } 229 }
223 230
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 ContentPasswordManagerDriver::GetPasswordGenerationAgent() { 329 ContentPasswordManagerDriver::GetPasswordGenerationAgent() {
323 if (!password_gen_agent_) { 330 if (!password_gen_agent_) {
324 render_frame_host_->GetRemoteInterfaces()->GetInterface( 331 render_frame_host_->GetRemoteInterfaces()->GetInterface(
325 mojo::GetProxy(&password_gen_agent_)); 332 mojo::GetProxy(&password_gen_agent_));
326 } 333 }
327 334
328 return password_gen_agent_; 335 return password_gen_agent_;
329 } 336 }
330 337
331 } // namespace password_manager 338 } // namespace password_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698