Chromium Code Reviews| Index: components/autofill/core/common/password_form.h |
| diff --git a/components/autofill/core/common/password_form.h b/components/autofill/core/common/password_form.h |
| index 783eda54786c8e433d20807d7799e65c5523b62b..ab2fec419b77ec77f0906f6e1c927b8e6e6fcd58 100644 |
| --- a/components/autofill/core/common/password_form.h |
| +++ b/components/autofill/core/common/password_form.h |
| @@ -9,6 +9,10 @@ |
| #include <string> |
| #include <vector> |
| +#if defined(OS_ANDROID) |
| +#include "base/android/jni_array.h" |
| +#include "base/android/scoped_java_ref.h" |
| +#endif |
| #include "base/time/time.h" |
| #include "components/autofill/core/common/form_data.h" |
| #include "url/gurl.h" |
| @@ -245,6 +249,17 @@ struct PasswordForm { |
| bool operator==(const PasswordForm& form) const; |
| bool operator!=(const PasswordForm& form) const; |
| +#if defined(OS_ANDROID) |
| + base::android::ScopedJavaLocalRef<jobject> createNativeCredential(JNIEnv* env, |
|
vabr (Chromium)
2015/02/26 09:29:32
Note that PasswordForm is a struct, so all its dat
|
| + int type); |
| + |
| + // Creates Java counterpart of PasswordForm, assigning it a |position| in case |
| + // form is part of some array of forms and |type| which should be either local |
| + // or federated. |
| + base::android::ScopedJavaLocalRef<jobject> |
| + createNativeCredential(JNIEnv* env, int position, int type); |
| +#endif |
| + |
| PasswordForm(); |
| ~PasswordForm(); |
| }; |
| @@ -257,6 +272,13 @@ typedef std::map<base::string16, const PasswordForm*> ConstPasswordFormMap; |
| // For testing. |
| std::ostream& operator<<(std::ostream& os, |
| const autofill::PasswordForm& form); |
| +#if defined(OS_ANDROID) |
| +base::android::ScopedJavaLocalRef<jobjectArray> CreateNativeCredentialArray( |
| + JNIEnv* env, |
| + size_t size); |
| + |
| +bool RegisterCredential(JNIEnv* env); |
| +#endif |
| } // namespace autofill |