| 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 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_MOCK_H_ | 5 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_MOCK_H_ |
| 6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_MOCK_H_ | 6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_MOCK_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h" | 9 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h" |
| 10 #include "components/password_manager/core/common/password_manager_ui.h" | 10 #include "components/password_manager/core/common/password_manager_ui.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 void ChooseCredential(const autofill::PasswordForm& form, | 47 void ChooseCredential(const autofill::PasswordForm& form, |
| 48 password_manager::CredentialType form_type) override; | 48 password_manager::CredentialType form_type) override; |
| 49 bool choose_credential() const { return choose_credential_; } | 49 bool choose_credential() const { return choose_credential_; } |
| 50 | 50 |
| 51 const autofill::PasswordForm& PendingPassword() const override; | 51 const autofill::PasswordForm& PendingPassword() const override; |
| 52 void SetPendingPassword(autofill::PasswordForm pending_password); | 52 void SetPendingPassword(autofill::PasswordForm pending_password); |
| 53 | 53 |
| 54 void UpdateBubbleAndIconVisibility() override; | 54 void UpdateBubbleAndIconVisibility() override; |
| 55 | 55 |
| 56 void UpdateAndroidAccountChooserInfoBarVisibility() override; |
| 57 |
| 56 base::TimeDelta Elapsed() const override; | 58 base::TimeDelta Elapsed() const override; |
| 57 | 59 |
| 58 // Sneaky setters for testing. | 60 // Sneaky setters for testing. |
| 59 void SetPasswordFormMap(const autofill::ConstPasswordFormMap& map) { | 61 void SetPasswordFormMap(const autofill::ConstPasswordFormMap& map) { |
| 60 password_form_map_ = map; | 62 password_form_map_ = map; |
| 61 } | 63 } |
| 62 using ManagePasswordsUIController::SetState; | 64 using ManagePasswordsUIController::SetState; |
| 63 | 65 |
| 64 void SetElapsed(base::TimeDelta elapsed) { elapsed_ = elapsed; } | 66 void SetElapsed(base::TimeDelta elapsed) { elapsed_ = elapsed; } |
| 65 | 67 |
| 66 // True if this controller is installed on |web_contents()|. | 68 // True if this controller is installed on |web_contents()|. |
| 67 bool IsInstalled() const; | 69 bool IsInstalled() const; |
| 68 | 70 |
| 69 using ManagePasswordsUIController::DidNavigateMainFrame; | 71 using ManagePasswordsUIController::DidNavigateMainFrame; |
| 70 | 72 |
| 71 private: | 73 private: |
| 72 bool navigated_to_settings_page_; | 74 bool navigated_to_settings_page_; |
| 73 bool saved_password_; | 75 bool saved_password_; |
| 74 bool never_saved_password_; | 76 bool never_saved_password_; |
| 75 bool choose_credential_; | 77 bool choose_credential_; |
| 76 base::TimeDelta elapsed_; | 78 base::TimeDelta elapsed_; |
| 77 | 79 |
| 78 autofill::PasswordForm pending_password_; | 80 autofill::PasswordForm pending_password_; |
| 79 | 81 |
| 80 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsUIControllerMock); | 82 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsUIControllerMock); |
| 81 }; | 83 }; |
| 82 | 84 |
| 83 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_MOCK_H_ | 85 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_MOCK_H_ |
| OLD | NEW |