Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: components/autofill/content/browser/form_data_android.h

Issue 2745803003: autofill-try
Patch Set: before I leave Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_CONTENT_BROWSER_FORM_DATA_ANDROID_H_
6 #define COMPONENTS_AUTOFILL_CONTENT_BROWSER_FORM_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_data.h"
11
12 namespace autofill {
13
14 class FormFieldDataAndroid;
15
16 class FormDataAndroid {
17 public:
18 FormDataAndroid(const FormData& form);
19 virtual ~FormDataAndroid();
20
21 base::android::ScopedJavaLocalRef<jobject> GetJavaPeer();
22
23 // Pull autofill values from Java side and return FormData.
24 const FormData& PullAutofillValues();
25
26 base::android::ScopedJavaLocalRef<jobject> GetNextFormFieldData(
27 JNIEnv*env,
28 const base::android::JavaParamRef<jobject>& jcaller);
29
30 // Get index of given field, return True and index of focus field if found.
31 bool GetFieldIndex(const FormFieldData& field, size_t* index);
32
33 bool SameFormAs(const FormData& form);
34
35 void OnTextFieldDidChange(size_t index, const base::string16& value);
36 private:
37 FormData form_;
38 FormFieldData* focus_field_;
39 std::vector<std::unique_ptr<FormFieldDataAndroid>> fields_;
40 JavaObjectWeakGlobalRef java_ref_;
41 // index to popup fields to Java.
42 size_t index_;
43
44 DISALLOW_COPY_AND_ASSIGN(FormDataAndroid);
45 };
46
47 bool RegisterFormDataAndroid(JNIEnv* env);
48
49 } // namespace autofill
50
51 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_FORM_DATA_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698