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 |
323 void ManagePasswordsUIController::NavigateToSmartLockHelpPage() { | 332 void ManagePasswordsUIController::NavigateToSmartLockHelpPage() { |
324 chrome::NavigateParams params( | 333 chrome::NavigateParams params( |
325 chrome::FindBrowserWithWebContents(web_contents()), | 334 chrome::FindBrowserWithWebContents(web_contents()), |
326 GURL(chrome::kSmartLockHelpPage), ui::PAGE_TRANSITION_LINK); | 335 GURL(chrome::kSmartLockHelpPage), ui::PAGE_TRANSITION_LINK); |
327 params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB; | 336 params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB; |
328 chrome::Navigate(¶ms); | 337 chrome::Navigate(¶ms); |
329 } | 338 } |
330 | 339 |
331 void ManagePasswordsUIController::NavigateToPasswordManagerSettingsPage() { | 340 void ManagePasswordsUIController::NavigateToPasswordManagerSettingsPage() { |
332 chrome::ShowSettingsSubPage( | 341 chrome::ShowSettingsSubPage( |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 passwords_data_.TransitionToState(password_manager::ui::MANAGE_STATE); | 453 passwords_data_.TransitionToState(password_manager::ui::MANAGE_STATE); |
445 } | 454 } |
446 } | 455 } |
447 | 456 |
448 void ManagePasswordsUIController::WebContentsDestroyed() { | 457 void ManagePasswordsUIController::WebContentsDestroyed() { |
449 password_manager::PasswordStore* password_store = | 458 password_manager::PasswordStore* password_store = |
450 GetPasswordStore(web_contents()); | 459 GetPasswordStore(web_contents()); |
451 if (password_store) | 460 if (password_store) |
452 password_store->RemoveObserver(this); | 461 password_store->RemoveObserver(this); |
453 } | 462 } |
OLD | NEW |