| 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_DIALOG_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_DIALOG_ANDROID_H_ |
| 6 #define CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_DIALOG_ANDROID_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_DIALOG_ANDROID_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/android/jni_android.h" | 12 #include "base/android/jni_android.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "chrome/browser/ui/passwords/manage_passwords_state.h" | 14 #include "chrome/browser/ui/passwords/manage_passwords_state.h" |
| 15 #include "content/public/browser/web_contents_observer.h" | 15 #include "content/public/browser/web_contents_observer.h" |
| 16 | 16 |
| 17 namespace content { | 17 namespace content { |
| 18 class WebContents; | 18 class WebContents; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace password_manager { | |
| 22 struct CredentialInfo; | |
| 23 } | |
| 24 | |
| 25 // Native counterpart for the android dialog which allows users to select | 21 // Native counterpart for the android dialog which allows users to select |
| 26 // credentials which will be passed to the web site in order to log in the user. | 22 // credentials which will be passed to the web site in order to log in the user. |
| 27 class AccountChooserDialogAndroid : public content::WebContentsObserver { | 23 class AccountChooserDialogAndroid : public content::WebContentsObserver { |
| 28 public: | 24 public: |
| 29 AccountChooserDialogAndroid( | 25 AccountChooserDialogAndroid( |
| 30 content::WebContents* web_contents, | 26 content::WebContents* web_contents, |
| 31 std::vector<std::unique_ptr<autofill::PasswordForm>> local_credentials, | 27 std::vector<std::unique_ptr<autofill::PasswordForm>> local_credentials, |
| 32 std::vector<std::unique_ptr<autofill::PasswordForm>> federation_providers, | 28 std::vector<std::unique_ptr<autofill::PasswordForm>> federation_providers, |
| 33 const GURL& origin, | 29 const GURL& origin, |
| 34 const ManagePasswordsState::CredentialsCallback& callback); | 30 const ManagePasswordsState::CredentialsCallback& callback); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 GURL origin_; | 71 GURL origin_; |
| 76 base::android::ScopedJavaGlobalRef<jobject> dialog_jobject_; | 72 base::android::ScopedJavaGlobalRef<jobject> dialog_jobject_; |
| 77 | 73 |
| 78 DISALLOW_COPY_AND_ASSIGN(AccountChooserDialogAndroid); | 74 DISALLOW_COPY_AND_ASSIGN(AccountChooserDialogAndroid); |
| 79 }; | 75 }; |
| 80 | 76 |
| 81 // Native JNI methods | 77 // Native JNI methods |
| 82 bool RegisterAccountChooserDialogAndroid(JNIEnv* env); | 78 bool RegisterAccountChooserDialogAndroid(JNIEnv* env); |
| 83 | 79 |
| 84 #endif // CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_DIALOG_ANDROID_H_ | 80 #endif // CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_DIALOG_ANDROID_H_ |
| OLD | NEW |