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: chrome/browser/ui/android/autofill/autofill_popup_view_android.cc

Issue 11778043: Cleaning up Android's Autofill call suggestionSelected. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing the test Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/android/autofill/autofill_popup_view_android.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/android/autofill/autofill_popup_view_android.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698