| 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 "chrome/browser/password_manager/chrome_password_manager_client.h" | 5 #include "chrome/browser/password_manager/chrome_password_manager_client.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 GeneratedPasswordSavedInfoBarDelegateAndroid::Create(web_contents()); | 346 GeneratedPasswordSavedInfoBarDelegateAndroid::Create(web_contents()); |
| 347 #else | 347 #else |
| 348 PasswordsClientUIDelegate* manage_passwords_ui_controller = | 348 PasswordsClientUIDelegate* manage_passwords_ui_controller = |
| 349 PasswordsClientUIDelegateFromWebContents(web_contents()); | 349 PasswordsClientUIDelegateFromWebContents(web_contents()); |
| 350 manage_passwords_ui_controller->OnAutomaticPasswordSave( | 350 manage_passwords_ui_controller->OnAutomaticPasswordSave( |
| 351 std::move(saved_form)); | 351 std::move(saved_form)); |
| 352 #endif | 352 #endif |
| 353 } | 353 } |
| 354 | 354 |
| 355 void ChromePasswordManagerClient::PasswordWasAutofilled( | 355 void ChromePasswordManagerClient::PasswordWasAutofilled( |
| 356 const autofill::PasswordFormMap& best_matches, | 356 const std::map<base::string16, const autofill::PasswordForm*>& best_matches, |
| 357 const GURL& origin, | 357 const GURL& origin, |
| 358 const std::vector<std::unique_ptr<autofill::PasswordForm>>* | 358 const std::vector<const autofill::PasswordForm*>* federated_matches) const { |
| 359 federated_matches) const { | |
| 360 #if !BUILDFLAG(ANDROID_JAVA_UI) | 359 #if !BUILDFLAG(ANDROID_JAVA_UI) |
| 361 PasswordsClientUIDelegate* manage_passwords_ui_controller = | 360 PasswordsClientUIDelegate* manage_passwords_ui_controller = |
| 362 PasswordsClientUIDelegateFromWebContents(web_contents()); | 361 PasswordsClientUIDelegateFromWebContents(web_contents()); |
| 363 manage_passwords_ui_controller->OnPasswordAutofilled(best_matches, origin, | 362 manage_passwords_ui_controller->OnPasswordAutofilled(best_matches, origin, |
| 364 federated_matches); | 363 federated_matches); |
| 365 #endif | 364 #endif |
| 366 } | 365 } |
| 367 | 366 |
| 368 void ChromePasswordManagerClient::HidePasswordGenerationPopup() { | 367 void ChromePasswordManagerClient::HidePasswordGenerationPopup() { |
| 369 if (popup_controller_) | 368 if (popup_controller_) |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 password_manager::mojom::CredentialManagerRequest request) { | 593 password_manager::mojom::CredentialManagerRequest request) { |
| 595 content::WebContents* web_contents = | 594 content::WebContents* web_contents = |
| 596 content::WebContents::FromRenderFrameHost(render_frame_host); | 595 content::WebContents::FromRenderFrameHost(render_frame_host); |
| 597 DCHECK(web_contents); | 596 DCHECK(web_contents); |
| 598 | 597 |
| 599 ChromePasswordManagerClient* instance = | 598 ChromePasswordManagerClient* instance = |
| 600 ChromePasswordManagerClient::FromWebContents(web_contents); | 599 ChromePasswordManagerClient::FromWebContents(web_contents); |
| 601 DCHECK(instance); | 600 DCHECK(instance); |
| 602 instance->credential_manager_impl_.BindRequest(std::move(request)); | 601 instance->credential_manager_impl_.BindRequest(std::move(request)); |
| 603 } | 602 } |
| OLD | NEW |