OLD | NEW |
---|---|
(Empty) | |
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. | |
4 | |
5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_INFOBAR_DELEGATE_ANDROID _H_ | |
6 #define CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_INFOBAR_DELEGATE_ANDROID _H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h" | |
10 #include "components/infobars/core/infobar_delegate.h" | |
11 | |
12 class InfoBarService; | |
13 | |
14 namespace password_manager { | |
15 enum class CredentialType : unsigned int; | |
16 } | |
17 | |
18 namespace autofill { | |
19 struct PasswordForm; | |
20 } | |
21 | |
22 // Android-only infobar to allow user to choose credentials for login. | |
Peter Kasting
2015/02/18 00:23:05
Nit: Technically this is an infobar delegate, not
melandory
2015/02/18 21:15:34
Done.
| |
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); | |
29 | |
30 ~AccountChooserInfoBarDelegateAndroid() override = default; | |
31 | |
32 const ScopedVector<autofill::PasswordForm>& local_credentials_forms() const { | |
33 return ui_controller_->local_credentials_forms(); | |
34 } | |
35 | |
36 void ChooseCredential(size_t credential_index, | |
37 password_manager::CredentialType credential_type); | |
38 | |
39 private: | |
40 explicit AccountChooserInfoBarDelegateAndroid( | |
41 ManagePasswordsUIController* ui_controller); | |
42 | |
43 // infobars::InfoBarDelegate | |
Peter Kasting
2015/02/18 00:23:05
Nit: Need trailing colon
melandory
2015/02/18 21:15:34
Done.
| |
44 Type GetInfoBarType() const override; | |
45 | |
46 // Owned by WebContents. | |
47 ManagePasswordsUIController* ui_controller_; | |
48 | |
49 DISALLOW_COPY_AND_ASSIGN(AccountChooserInfoBarDelegateAndroid); | |
50 }; | |
51 | |
52 #endif // CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_INFOBAR_DELEGATE_ANDR OID_H_ | |
OLD | NEW |