Update broken references to image assets
[chromium-blink-merge.git] / chrome / browser / password_manager / account_chooser_infobar_delegate_android.h
blob1f120c57732f6074699f7402721bce20ed2c02d5
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_INFOBAR_DELEGATE_ANDROID_H_
6 #define CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_INFOBAR_DELEGATE_ANDROID_H_
8 #include "base/macros.h"
9 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h"
10 #include "components/infobars/core/infobar_delegate.h"
12 class InfoBarService;
14 namespace password_manager {
15 enum class CredentialType;
18 namespace autofill {
19 struct PasswordForm;
22 // Android-only infobar delegate to allow user to choose credentials for login.
23 class AccountChooserInfoBarDelegateAndroid : public infobars::InfoBarDelegate {
24 public:
25 // Creates an account chooser infobar and delegate and adds the infobar to
26 // |infobar_service|.
27 static void Create(InfoBarService* infobar_service,
28 ManagePasswordsUIController* ui_controller);
30 ~AccountChooserInfoBarDelegateAndroid() override;
32 const std::vector<const autofill::PasswordForm*>&
33 local_credentials_forms() const {
34 return ui_controller_->GetCurrentForms();
37 const std::vector<const autofill::PasswordForm*>&
38 federated_credentials_forms() const {
39 return ui_controller_->GetFederatedForms();
42 void ChooseCredential(size_t credential_index,
43 password_manager::CredentialType credential_type);
45 private:
46 explicit AccountChooserInfoBarDelegateAndroid(
47 ManagePasswordsUIController* ui_controller);
49 // infobars::InfoBarDelegate:
50 void InfoBarDismissed() override;
51 Type GetInfoBarType() const override;
53 // Owned by WebContents.
54 ManagePasswordsUIController* ui_controller_;
56 DISALLOW_COPY_AND_ASSIGN(AccountChooserInfoBarDelegateAndroid);
59 #endif // CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_INFOBAR_DELEGATE_ANDROID_H_