OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_AUTOFILL_ANDROID_FORM_FIELD_DATA_ANDROID_H_ |
| 6 #define COMPONENTS_AUTOFILL_ANDROID_FORM_FIELD_DATA_ANDROID_H_ |
| 7 |
| 8 #include "base/android/jni_weak_ref.h" |
| 9 #include "base/android/scoped_java_ref.h" |
| 10 #include "components/autofill/core/common/form_field_data.h" |
| 11 |
| 12 namespace autofill { |
| 13 |
| 14 // This class is native peer of FormFieldData.java, makes |
| 15 // autofill::FormFieldData available in Java. |
| 16 class FormFieldDataAndroid { |
| 17 public: |
| 18 FormFieldDataAndroid(FormFieldData* field); |
| 19 virtual ~FormFieldDataAndroid() {} |
| 20 |
| 21 base::android::ScopedJavaLocalRef<jobject> GetJavaPeer(); |
| 22 void GetValue(); |
| 23 void OnTextFieldDidChange(const base::string16& value); |
| 24 |
| 25 private: |
| 26 // Not owned. |
| 27 FormFieldData* field_ptr_; |
| 28 JavaObjectWeakGlobalRef java_ref_; |
| 29 |
| 30 DISALLOW_COPY_AND_ASSIGN(FormFieldDataAndroid); |
| 31 }; |
| 32 |
| 33 } // namespace autofill |
| 34 |
| 35 #endif // COMPONENTS_AUTOFILL_ANDROID_FORM_FIELD_DATA_ANDROID_H_ |
OLD | NEW |