Chromium Code Reviews| 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 avaliable in Java. | |
|
Mathieu
2017/05/24 18:02:02
available
michaelbai
2017/05/26 23:12:07
Done.
| |
| 16 class FormFieldDataAndroid { | |
| 17 public: | |
| 18 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.
| |
| 19 virtual ~FormFieldDataAndroid() {} | |
| 20 | |
| 21 base::android::ScopedJavaLocalRef<jobject> GetJavaPeer(); | |
| 22 void GetValue(); | |
| 23 void OnTextFieldDidChange(const base::string16& value); | |
| 24 | |
| 25 private: | |
| 26 FormFieldData* field_ptr_; | |
| 27 JavaObjectWeakGlobalRef java_ref_; | |
| 28 | |
| 29 DISALLOW_COPY_AND_ASSIGN(FormFieldDataAndroid); | |
| 30 }; | |
| 31 | |
| 32 } // namespace autofill | |
| 33 | |
| 34 #endif // COMPONENTS_AUTOFILL_ANDROID_FORM_FIELD_DATA_ANDROID_H_ | |
| OLD | NEW |