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