Chromium Code Reviews| Index: components/autofill/android/form_field_data_android.h |
| diff --git a/components/autofill/android/form_field_data_android.h b/components/autofill/android/form_field_data_android.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b3d6062bebcff86bdd3cca2bcab1f581f6e28537 |
| --- /dev/null |
| +++ b/components/autofill/android/form_field_data_android.h |
| @@ -0,0 +1,34 @@ |
| +// Copyright 2017 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 COMPONENTS_AUTOFILL_ANDROID_FORM_FIELD_DATA_ANDROID_H_ |
| +#define COMPONENTS_AUTOFILL_ANDROID_FORM_FIELD_DATA_ANDROID_H_ |
| + |
| +#include "base/android/jni_weak_ref.h" |
| +#include "base/android/scoped_java_ref.h" |
| +#include "components/autofill/core/common/form_field_data.h" |
| + |
| +namespace autofill { |
| + |
| +// This class is native peer of FormFieldData.java, makes |
| +// autofill::FormFieldData avaliable in Java. |
|
Mathieu
2017/05/24 18:02:02
available
michaelbai
2017/05/26 23:12:07
Done.
|
| +class FormFieldDataAndroid { |
| + public: |
| + FormFieldDataAndroid(FormFieldData* field); |
|
Mathieu
2017/05/24 18:02:02
Can you mention the expected lifetime of |field| w
michaelbai
2017/05/26 23:12:07
Done. see field_ptr_ declaration.
|
| + virtual ~FormFieldDataAndroid() {} |
| + |
| + base::android::ScopedJavaLocalRef<jobject> GetJavaPeer(); |
| + void GetValue(); |
| + void OnTextFieldDidChange(const base::string16& value); |
| + |
| + private: |
| + FormFieldData* field_ptr_; |
| + JavaObjectWeakGlobalRef java_ref_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(FormFieldDataAndroid); |
| +}; |
| + |
| +} // namespace autofill |
| + |
| +#endif // COMPONENTS_AUTOFILL_ANDROID_FORM_FIELD_DATA_ANDROID_H_ |