Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
|
aurimas (slooooooooow)
2014/08/01 15:18:21
s/2013/2014
Evan Stade
2014/08/01 18:59:23
Acknowledged.
Evan Stade
2014/08/04 20:36:04
Done.
| |
| 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 CHROME_BROWSER_UI_ANDROID_AUTOFILL_COUNTRY_ADAPTER_ANDROID_H_ | |
| 6 #define CHROME_BROWSER_UI_ANDROID_AUTOFILL_COUNTRY_ADAPTER_ANDROID_H_ | |
| 7 | |
| 8 #include "base/android/jni_weak_ref.h" | |
| 9 #include "base/android/scoped_java_ref.h" | |
| 10 #include "chrome/browser/ui/autofill/country_combobox_model.h" | |
| 11 | |
| 12 namespace autofill { | |
| 13 | |
| 14 // A bridge class for showing a list of countries in the Android settings UI. | |
| 15 class CountryAdapterAndroid { | |
| 16 public: | |
| 17 CountryAdapterAndroid(JNIEnv* env, jobject obj); | |
| 18 | |
| 19 // Returns the number of items in the model. | |
| 20 jint GetItemCount(JNIEnv* unused_env, jobject unused_obj); | |
| 21 | |
| 22 // Gets the country code at the given index. | |
| 23 base::android::ScopedJavaLocalRef<jstring> | |
|
aurimas (slooooooooow)
2014/08/01 15:18:21
I know its not really used in Chromium much, but w
Evan Stade
2014/08/01 18:59:23
Only in .cc files
| |
| 24 GetCountryCodeAt(JNIEnv* env, jobject unused_obj, jint position); | |
| 25 | |
| 26 // Gets the country display name at the given index. | |
| 27 base::android::ScopedJavaLocalRef<jstring> | |
| 28 GetCountryNameAt(JNIEnv* env, jobject unused_obj, jint position); | |
| 29 | |
| 30 // Registers the JNI bindings for this class. | |
| 31 static bool Register(JNIEnv* env); | |
| 32 | |
| 33 private: | |
| 34 ~CountryAdapterAndroid(); | |
| 35 | |
| 36 // Pointer to the java counterpart. | |
| 37 JavaObjectWeakGlobalRef weak_java_obj_; | |
| 38 | |
| 39 CountryComboboxModel country_combobox_model_; | |
| 40 }; | |
| 41 | |
| 42 } // namespace autofill | |
| 43 | |
| 44 #endif // CHROME_BROWSER_UI_ANDROID_AUTOFILL_COUNTRY_ADAPTER_ANDROID_H_ | |
| OLD | NEW |