| 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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 const base::string16& generation_field) { | 276 const base::string16& generation_field) { |
| 277 if (!CheckChildProcessSecurityPolicy( | 277 if (!CheckChildProcessSecurityPolicy( |
| 278 password_form.origin, | 278 password_form.origin, |
| 279 BadMessageReason:: | 279 BadMessageReason:: |
| 280 CPMD_BAD_ORIGIN_SAVE_GENERATION_FIELD_DETECTED_BY_CLASSIFIER)) | 280 CPMD_BAD_ORIGIN_SAVE_GENERATION_FIELD_DETECTED_BY_CLASSIFIER)) |
| 281 return; | 281 return; |
| 282 GetPasswordManager()->SaveGenerationFieldDetectedByClassifier( | 282 GetPasswordManager()->SaveGenerationFieldDetectedByClassifier( |
| 283 password_form, generation_field); | 283 password_form, generation_field); |
| 284 } | 284 } |
| 285 | 285 |
| 286 void ContentPasswordManagerDriver::CheckSafeBrowsingReputation( |
| 287 const GURL& form_action, |
| 288 const GURL& frame_url) { |
| 289 #if defined(SAFE_BROWSING_DB_LOCAL) |
| 290 client_->CheckSafeBrowsingReputation(form_action, frame_url); |
| 291 #endif |
| 292 } |
| 293 |
| 286 void ContentPasswordManagerDriver::ShowPasswordSuggestions( | 294 void ContentPasswordManagerDriver::ShowPasswordSuggestions( |
| 287 int key, | 295 int key, |
| 288 base::i18n::TextDirection text_direction, | 296 base::i18n::TextDirection text_direction, |
| 289 const base::string16& typed_username, | 297 const base::string16& typed_username, |
| 290 int options, | 298 int options, |
| 291 const gfx::RectF& bounds) { | 299 const gfx::RectF& bounds) { |
| 292 password_autofill_manager_.OnShowPasswordSuggestions( | 300 password_autofill_manager_.OnShowPasswordSuggestions( |
| 293 key, text_direction, typed_username, options, | 301 key, text_direction, typed_username, options, |
| 294 TransformToRootCoordinates(bounds)); | 302 TransformToRootCoordinates(bounds)); |
| 295 } | 303 } |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 const gfx::RectF& bounds_in_frame_coordinates) { | 366 const gfx::RectF& bounds_in_frame_coordinates) { |
| 359 content::RenderWidgetHostView* rwhv = render_frame_host_->GetView(); | 367 content::RenderWidgetHostView* rwhv = render_frame_host_->GetView(); |
| 360 if (!rwhv) | 368 if (!rwhv) |
| 361 return bounds_in_frame_coordinates; | 369 return bounds_in_frame_coordinates; |
| 362 return gfx::RectF(rwhv->TransformPointToRootCoordSpaceF( | 370 return gfx::RectF(rwhv->TransformPointToRootCoordSpaceF( |
| 363 bounds_in_frame_coordinates.origin()), | 371 bounds_in_frame_coordinates.origin()), |
| 364 bounds_in_frame_coordinates.size()); | 372 bounds_in_frame_coordinates.size()); |
| 365 } | 373 } |
| 366 | 374 |
| 367 } // namespace password_manager | 375 } // namespace password_manager |
| OLD | NEW |