| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_PASSWORD_MANAGER_ACCOUNT_CHOOSER_INFOBAR_DELEGATE_ANDROID
_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_INFOBAR_DELEGATE_ANDROID
_H_ |
| 6 #define CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_INFOBAR_DELEGATE_ANDROID
_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_INFOBAR_DELEGATE_ANDROID
_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.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/infobars/core/infobar_delegate.h" | 10 #include "components/infobars/core/infobar_delegate.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 static void Create(InfoBarService* infobar_service, | 27 static void Create(InfoBarService* infobar_service, |
| 28 ManagePasswordsUIController* ui_controller); | 28 ManagePasswordsUIController* ui_controller); |
| 29 | 29 |
| 30 ~AccountChooserInfoBarDelegateAndroid() override; | 30 ~AccountChooserInfoBarDelegateAndroid() override; |
| 31 | 31 |
| 32 const std::vector<const autofill::PasswordForm*>& | 32 const std::vector<const autofill::PasswordForm*>& |
| 33 local_credentials_forms() const { | 33 local_credentials_forms() const { |
| 34 return ui_controller_->GetCurrentForms(); | 34 return ui_controller_->GetCurrentForms(); |
| 35 } | 35 } |
| 36 | 36 |
| 37 const std::vector<const autofill::PasswordForm*>& |
| 38 federated_credentials_forms() const { |
| 39 return ui_controller_->GetFederatedForms(); |
| 40 } |
| 41 |
| 37 void ChooseCredential(size_t credential_index, | 42 void ChooseCredential(size_t credential_index, |
| 38 password_manager::CredentialType credential_type); | 43 password_manager::CredentialType credential_type); |
| 39 | 44 |
| 40 private: | 45 private: |
| 41 explicit AccountChooserInfoBarDelegateAndroid( | 46 explicit AccountChooserInfoBarDelegateAndroid( |
| 42 ManagePasswordsUIController* ui_controller); | 47 ManagePasswordsUIController* ui_controller); |
| 43 | 48 |
| 44 // infobars::InfoBarDelegate: | 49 // infobars::InfoBarDelegate: |
| 45 void InfoBarDismissed() override; | 50 void InfoBarDismissed() override; |
| 46 Type GetInfoBarType() const override; | 51 Type GetInfoBarType() const override; |
| 47 | 52 |
| 48 // Owned by WebContents. | 53 // Owned by WebContents. |
| 49 ManagePasswordsUIController* ui_controller_; | 54 ManagePasswordsUIController* ui_controller_; |
| 50 | 55 |
| 51 DISALLOW_COPY_AND_ASSIGN(AccountChooserInfoBarDelegateAndroid); | 56 DISALLOW_COPY_AND_ASSIGN(AccountChooserInfoBarDelegateAndroid); |
| 52 }; | 57 }; |
| 53 | 58 |
| 54 #endif // CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_INFOBAR_DELEGATE_ANDR
OID_H_ | 59 #endif // CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_INFOBAR_DELEGATE_ANDR
OID_H_ |
| OLD | NEW |