Chromium Code Reviews| Index: chrome/browser/password_manager/password_form_android_utils.h |
| diff --git a/chrome/browser/password_manager/password_form_android_utils.h b/chrome/browser/password_manager/password_form_android_utils.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..bf159e6aebd51c5561dd2d159b7ac30b1916501b |
| --- /dev/null |
| +++ b/chrome/browser/password_manager/password_form_android_utils.h |
| @@ -0,0 +1,34 @@ |
| +// 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_PASSWORD_FORM_ANDROID_UTILS_H_ |
| +#define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_FORM_ANDROID_UTILS_H_ |
| + |
| +#include "base/android/jni_array.h" |
| +#include "base/android/scoped_java_ref.h" |
| +#include "components/autofill/core/common/password_form.h" |
| + |
| +// Creates Java counterpart of autofill::PasswordForm, assigning it a |position| |
| +// in case form is part of some array of forms (or zero in case of single |
| +// credential element) and |type| which should be either local or federated. |
| +base::android::ScopedJavaLocalRef<jobject> CreateNativeCredential( |
|
newt (away)
2015/03/17 06:04:18
I'd avoid overloading this method unless it's real
melandory
2015/03/17 13:05:33
I'm planing to use this method in a future when I'
|
| + JNIEnv* env, |
| + const autofill::PasswordForm& password_form, |
| + int type); |
| + |
| +base::android::ScopedJavaLocalRef<jobject> CreateNativeCredential( |
| + JNIEnv* env, |
| + const autofill::PasswordForm& password_form, |
| + int position, |
| + int type); |
| + |
| +// Creates Java Credential[] array of size |size|. |
| +base::android::ScopedJavaLocalRef<jobjectArray> CreateNativeCredentialArray( |
| + JNIEnv* env, |
| + size_t size); |
| + |
| +// Registers the Credential native method. |
| +bool RegisterCredential(JNIEnv* env); |
| + |
| +#endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_FORM_ANDROID_UTILS_H_ |