OLD | NEW |
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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 return; | 265 return; |
266 GetPasswordManager()->OnPresaveGeneratedPassword(password_form); | 266 GetPasswordManager()->OnPresaveGeneratedPassword(password_form); |
267 } | 267 } |
268 | 268 |
269 void ContentPasswordManagerDriver::PasswordNoLongerGenerated( | 269 void ContentPasswordManagerDriver::PasswordNoLongerGenerated( |
270 const autofill::PasswordForm& password_form) { | 270 const autofill::PasswordForm& password_form) { |
271 if (!CheckChildProcessSecurityPolicy( | 271 if (!CheckChildProcessSecurityPolicy( |
272 password_form.origin, | 272 password_form.origin, |
273 BadMessageReason::CPMD_BAD_ORIGIN_PASSWORD_NO_LONGER_GENERATED)) | 273 BadMessageReason::CPMD_BAD_ORIGIN_PASSWORD_NO_LONGER_GENERATED)) |
274 return; | 274 return; |
275 GetPasswordManager()->SetHasGeneratedPasswordForForm(this, password_form, | 275 GetPasswordManager()->OnPasswordNoLongerGenerated(password_form); |
276 false); | |
277 } | 276 } |
278 | 277 |
279 void ContentPasswordManagerDriver::SaveGenerationFieldDetectedByClassifier( | 278 void ContentPasswordManagerDriver::SaveGenerationFieldDetectedByClassifier( |
280 const autofill::PasswordForm& password_form, | 279 const autofill::PasswordForm& password_form, |
281 const base::string16& generation_field) { | 280 const base::string16& generation_field) { |
282 if (!CheckChildProcessSecurityPolicy( | 281 if (!CheckChildProcessSecurityPolicy( |
283 password_form.origin, | 282 password_form.origin, |
284 BadMessageReason:: | 283 BadMessageReason:: |
285 CPMD_BAD_ORIGIN_SAVE_GENERATION_FIELD_DETECTED_BY_CLASSIFIER)) | 284 CPMD_BAD_ORIGIN_SAVE_GENERATION_FIELD_DETECTED_BY_CLASSIFIER)) |
286 return; | 285 return; |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 const gfx::RectF& bounds_in_frame_coordinates) { | 369 const gfx::RectF& bounds_in_frame_coordinates) { |
371 content::RenderWidgetHostView* rwhv = render_frame_host_->GetView(); | 370 content::RenderWidgetHostView* rwhv = render_frame_host_->GetView(); |
372 if (!rwhv) | 371 if (!rwhv) |
373 return bounds_in_frame_coordinates; | 372 return bounds_in_frame_coordinates; |
374 return gfx::RectF(rwhv->TransformPointToRootCoordSpaceF( | 373 return gfx::RectF(rwhv->TransformPointToRootCoordSpaceF( |
375 bounds_in_frame_coordinates.origin()), | 374 bounds_in_frame_coordinates.origin()), |
376 bounds_in_frame_coordinates.size()); | 375 bounds_in_frame_coordinates.size()); |
377 } | 376 } |
378 | 377 |
379 } // namespace password_manager | 378 } // namespace password_manager |
OLD | NEW |