OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/android/autofill/autofill_popup_view_android.h" | 5 #include "chrome/browser/ui/android/autofill/autofill_popup_view_android.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
9 #include "chrome/browser/ui/android/window_android_helper.h" | 9 #include "chrome/browser/ui/android/window_android_helper.h" |
10 #include "chrome/browser/ui/autofill/autofill_popup_controller.h" | 10 #include "chrome/browser/ui/autofill/autofill_popup_controller.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 identifier); | 73 identifier); |
74 env->SetObjectArrayElement(data_array.obj(), i, data.obj()); | 74 env->SetObjectArrayElement(data_array.obj(), i, data.obj()); |
75 base::android::CheckException(env); | 75 base::android::CheckException(env); |
76 } | 76 } |
77 | 77 |
78 Java_AutofillPopupGlue_show(env, java_object_.obj(), data_array.obj()); | 78 Java_AutofillPopupGlue_show(env, java_object_.obj(), data_array.obj()); |
79 } | 79 } |
80 | 80 |
81 void AutofillPopupViewAndroid::SuggestionSelected(JNIEnv* env, | 81 void AutofillPopupViewAndroid::SuggestionSelected(JNIEnv* env, |
82 jobject obj, | 82 jobject obj, |
83 jint list_index, | 83 jint list_index) { |
84 jstring /*name*/, | |
85 jint /*identifier*/) { | |
86 controller_->AcceptSuggestion(list_index); | 84 controller_->AcceptSuggestion(list_index); |
87 } | 85 } |
88 | 86 |
89 void AutofillPopupViewAndroid::Dismissed(JNIEnv* env, jobject obj) { | 87 void AutofillPopupViewAndroid::Dismissed(JNIEnv* env, jobject obj) { |
90 delete this; | 88 delete this; |
91 } | 89 } |
92 | 90 |
93 void AutofillPopupViewAndroid::InvalidateRow(size_t) {} | 91 void AutofillPopupViewAndroid::InvalidateRow(size_t) {} |
94 | 92 |
95 // static | 93 // static |
96 bool AutofillPopupViewAndroid::RegisterAutofillPopupViewAndroid(JNIEnv* env) { | 94 bool AutofillPopupViewAndroid::RegisterAutofillPopupViewAndroid(JNIEnv* env) { |
97 return RegisterNativesImpl(env); | 95 return RegisterNativesImpl(env); |
98 } | 96 } |
99 | 97 |
100 // static | 98 // static |
101 AutofillPopupView* AutofillPopupView::Create( | 99 AutofillPopupView* AutofillPopupView::Create( |
102 AutofillPopupController* controller) { | 100 AutofillPopupController* controller) { |
103 return new AutofillPopupViewAndroid(controller); | 101 return new AutofillPopupViewAndroid(controller); |
104 } | 102 } |
OLD | NEW |