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

Unified Diff: chrome/browser/password_manager/account_chooser_infobar_delegate_android.h

Issue 861103002: Credentials chooser UI for Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/password_manager/account_chooser_infobar_delegate_android.h
diff --git a/chrome/browser/password_manager/account_chooser_infobar_delegate_android.h b/chrome/browser/password_manager/account_chooser_infobar_delegate_android.h
new file mode 100644
index 0000000000000000000000000000000000000000..f1fa20f56bda960121bed6591488e10a0af62fa2
--- /dev/null
+++ b/chrome/browser/password_manager/account_chooser_infobar_delegate_android.h
@@ -0,0 +1,52 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_INFOBAR_DELEGATE_ANDROID_H_
+#define CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_INFOBAR_DELEGATE_ANDROID_H_
+
+#include "base/macros.h"
+#include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h"
+#include "components/infobars/core/infobar_delegate.h"
+
+class InfoBarService;
+
+namespace password_manager {
+enum class CredentialType : unsigned int;
+}
+
+namespace autofill {
+struct PasswordForm;
+}
+
+// Android-only infobar delegate to allow user to choose credentials for login.
+class AccountChooserInfoBarDelegateAndroid : public infobars::InfoBarDelegate {
+ public:
+ // Creates an account chooser infobar and delegate and adds the infobar to
+ // |infobar_service|.
+ static void Create(InfoBarService* infobar_service,
+ ManagePasswordsUIController* ui_controller);
+
+ ~AccountChooserInfoBarDelegateAndroid() override = default;
Peter Kasting 2015/02/18 21:44:17 Nit: I would define this in the .cc file rather th
melandory 2015/02/19 13:38:01 Done.
+
+ const ScopedVector<autofill::PasswordForm>& local_credentials_forms() const {
+ return ui_controller_->local_credentials_forms();
+ }
+
+ void ChooseCredential(size_t credential_index,
+ password_manager::CredentialType credential_type);
+
+ private:
+ explicit AccountChooserInfoBarDelegateAndroid(
+ ManagePasswordsUIController* ui_controller);
+
+ // infobars::InfoBarDelegate:
+ Type GetInfoBarType() const override;
+
+ // Owned by WebContents.
+ ManagePasswordsUIController* ui_controller_;
+
+ DISALLOW_COPY_AND_ASSIGN(AccountChooserInfoBarDelegateAndroid);
+};
+
+#endif // CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_INFOBAR_DELEGATE_ANDROID_H_

Powered by Google App Engine
This is Rietveld 408576698