| 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/ui/passwords/manage_passwords_ui_controller.h" | 5 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "chrome/app/chrome_command_ids.h" | 10 #include "chrome/app/chrome_command_ids.h" |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 credential_type); | 313 credential_type); |
| 314 // Copy the argument before destroying the controller. |form| is a member of | 314 // Copy the argument before destroying the controller. |form| is a member of |
| 315 // |dialog_controller_|. | 315 // |dialog_controller_|. |
| 316 autofill::PasswordForm copy_form = form; | 316 autofill::PasswordForm copy_form = form; |
| 317 dialog_controller_.reset(); | 317 dialog_controller_.reset(); |
| 318 passwords_data_.ChooseCredential(©_form); | 318 passwords_data_.ChooseCredential(©_form); |
| 319 passwords_data_.TransitionToState(password_manager::ui::MANAGE_STATE); | 319 passwords_data_.TransitionToState(password_manager::ui::MANAGE_STATE); |
| 320 UpdateBubbleAndIconVisibility(); | 320 UpdateBubbleAndIconVisibility(); |
| 321 } | 321 } |
| 322 | 322 |
| 323 void ManagePasswordsUIController::NavigateToExternalPasswordManager() { | |
| 324 chrome::NavigateParams params( | |
| 325 chrome::FindBrowserWithWebContents(web_contents()), | |
| 326 GURL(password_manager::kPasswordManagerAccountDashboardURL), | |
| 327 ui::PAGE_TRANSITION_LINK); | |
| 328 params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB; | |
| 329 chrome::Navigate(¶ms); | |
| 330 } | |
| 331 | |
| 332 void ManagePasswordsUIController::NavigateToSmartLockHelpPage() { | 323 void ManagePasswordsUIController::NavigateToSmartLockHelpPage() { |
| 333 chrome::NavigateParams params( | 324 chrome::NavigateParams params( |
| 334 chrome::FindBrowserWithWebContents(web_contents()), | 325 chrome::FindBrowserWithWebContents(web_contents()), |
| 335 GURL(chrome::kSmartLockHelpPage), ui::PAGE_TRANSITION_LINK); | 326 GURL(chrome::kSmartLockHelpPage), ui::PAGE_TRANSITION_LINK); |
| 336 params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB; | 327 params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB; |
| 337 chrome::Navigate(¶ms); | 328 chrome::Navigate(¶ms); |
| 338 } | 329 } |
| 339 | 330 |
| 340 void ManagePasswordsUIController::NavigateToPasswordManagerSettingsPage() { | 331 void ManagePasswordsUIController::NavigateToPasswordManagerSettingsPage() { |
| 341 chrome::ShowSettingsSubPage( | 332 chrome::ShowSettingsSubPage( |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 passwords_data_.TransitionToState(password_manager::ui::MANAGE_STATE); | 444 passwords_data_.TransitionToState(password_manager::ui::MANAGE_STATE); |
| 454 } | 445 } |
| 455 } | 446 } |
| 456 | 447 |
| 457 void ManagePasswordsUIController::WebContentsDestroyed() { | 448 void ManagePasswordsUIController::WebContentsDestroyed() { |
| 458 password_manager::PasswordStore* password_store = | 449 password_manager::PasswordStore* password_store = |
| 459 GetPasswordStore(web_contents()); | 450 GetPasswordStore(web_contents()); |
| 460 if (password_store) | 451 if (password_store) |
| 461 password_store->RemoveObserver(this); | 452 password_store->RemoveObserver(this); |
| 462 } | 453 } |
| OLD | NEW |