| 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/browser/stub_password_manager_client.
h" | 10 #include "components/password_manager/core/browser/stub_password_manager_client.
h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 bool unblacklist_site() const { return unblacklist_site_; } | 49 bool unblacklist_site() const { return unblacklist_site_; } |
| 50 | 50 |
| 51 void ChooseCredential(const autofill::PasswordForm& form, | 51 void ChooseCredential(const autofill::PasswordForm& form, |
| 52 password_manager::CredentialType form_type) override; | 52 password_manager::CredentialType form_type) override; |
| 53 bool choose_credential() const { return choose_credential_; } | 53 bool choose_credential() const { return choose_credential_; } |
| 54 autofill::PasswordForm chosen_credential() { return chosen_credential_; } | 54 autofill::PasswordForm chosen_credential() { return chosen_credential_; } |
| 55 | 55 |
| 56 const autofill::PasswordForm& PendingPassword() const override; | 56 const autofill::PasswordForm& PendingPassword() const override; |
| 57 void SetPendingPassword(autofill::PasswordForm pending_password); | 57 void SetPendingPassword(autofill::PasswordForm pending_password); |
| 58 | 58 |
| 59 void ManageAccounts() override; |
| 60 bool manage_accounts() const { return manage_accounts_; } |
| 61 |
| 59 void UpdateBubbleAndIconVisibility() override; | 62 void UpdateBubbleAndIconVisibility() override; |
| 60 | 63 |
| 61 void UpdateAndroidAccountChooserInfoBarVisibility() override; | 64 void UpdateAndroidAccountChooserInfoBarVisibility() override; |
| 62 | 65 |
| 63 // Simulate the pending password state. |best_matches| can't be empty. | 66 // Simulate the pending password state. |best_matches| can't be empty. |
| 64 void PretendSubmittedPassword( | 67 void PretendSubmittedPassword( |
| 65 ScopedVector<autofill::PasswordForm> best_matches); | 68 ScopedVector<autofill::PasswordForm> best_matches); |
| 66 | 69 |
| 67 static scoped_ptr<password_manager::PasswordFormManager> CreateFormManager( | 70 static scoped_ptr<password_manager::PasswordFormManager> CreateFormManager( |
| 68 password_manager::PasswordManagerClient* client, | 71 password_manager::PasswordManagerClient* client, |
| 69 const autofill::PasswordForm& observed_form, | 72 const autofill::PasswordForm& observed_form, |
| 70 ScopedVector<autofill::PasswordForm> best_matches); | 73 ScopedVector<autofill::PasswordForm> best_matches); |
| 71 | 74 |
| 72 private: | 75 private: |
| 73 bool navigated_to_settings_page_; | 76 bool navigated_to_settings_page_; |
| 74 bool saved_password_; | 77 bool saved_password_; |
| 75 bool never_saved_password_; | 78 bool never_saved_password_; |
| 76 bool unblacklist_site_; | 79 bool unblacklist_site_; |
| 77 bool choose_credential_; | 80 bool choose_credential_; |
| 81 bool manage_accounts_; |
| 78 base::TimeDelta elapsed_; | 82 base::TimeDelta elapsed_; |
| 79 | 83 |
| 80 autofill::PasswordForm chosen_credential_; | 84 autofill::PasswordForm chosen_credential_; |
| 81 autofill::PasswordForm pending_password_; | 85 autofill::PasswordForm pending_password_; |
| 82 | 86 |
| 83 password_manager::StubPasswordManagerClient client_; | 87 password_manager::StubPasswordManagerClient client_; |
| 84 | 88 |
| 85 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsUIControllerMock); | 89 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsUIControllerMock); |
| 86 }; | 90 }; |
| 87 | 91 |
| 88 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_MOCK_H_ | 92 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_MOCK_H_ |
| OLD | NEW |