Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Side by Side Diff: chrome/browser/password_manager/account_chooser_infobar_delegate_android.h

Issue 925593006: Pass all info to account chooser infobar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@java_cpp_enum
Patch Set: Removing avatar URL Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 11 matching lines...) Expand all
22 // Android-only infobar delegate to allow user to choose credentials for login. 22 // Android-only infobar delegate to allow user to choose credentials for login.
23 class AccountChooserInfoBarDelegateAndroid : public infobars::InfoBarDelegate { 23 class AccountChooserInfoBarDelegateAndroid : public infobars::InfoBarDelegate {
24 public: 24 public:
25 // Creates an account chooser infobar and delegate and adds the infobar to 25 // Creates an account chooser infobar and delegate and adds the infobar to
26 // |infobar_service|. 26 // |infobar_service|.
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 ScopedVector<autofill::PasswordForm>& federated_credentials_forms()
33 const {
34 return ui_controller_->federated_credentials_forms();
35 }
36
32 const ScopedVector<autofill::PasswordForm>& local_credentials_forms() const { 37 const ScopedVector<autofill::PasswordForm>& local_credentials_forms() const {
33 return ui_controller_->local_credentials_forms(); 38 return ui_controller_->local_credentials_forms();
34 } 39 }
35 40
36 void ChooseCredential(size_t credential_index, 41 void ChooseCredential(size_t credential_index,
37 password_manager::CredentialType credential_type); 42 password_manager::CredentialType credential_type);
38 43
39 private: 44 private:
40 explicit AccountChooserInfoBarDelegateAndroid( 45 explicit AccountChooserInfoBarDelegateAndroid(
41 ManagePasswordsUIController* ui_controller); 46 ManagePasswordsUIController* ui_controller);
42 47
43 // infobars::InfoBarDelegate: 48 // infobars::InfoBarDelegate:
44 void InfoBarDismissed() override; 49 void InfoBarDismissed() override;
45 Type GetInfoBarType() const override; 50 Type GetInfoBarType() const override;
46 51
47 // Owned by WebContents. 52 // Owned by WebContents.
48 ManagePasswordsUIController* ui_controller_; 53 ManagePasswordsUIController* ui_controller_;
49 54
50 DISALLOW_COPY_AND_ASSIGN(AccountChooserInfoBarDelegateAndroid); 55 DISALLOW_COPY_AND_ASSIGN(AccountChooserInfoBarDelegateAndroid);
51 }; 56 };
52 57
53 #endif // CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_INFOBAR_DELEGATE_ANDR OID_H_ 58 #endif // CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_INFOBAR_DELEGATE_ANDR OID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698