Chromium Code Reviews| Index: chrome/browser/ui/android/autofill/country_adapter_android.h |
| diff --git a/chrome/browser/ui/android/autofill/country_adapter_android.h b/chrome/browser/ui/android/autofill/country_adapter_android.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3886901814e370dd3ff608dccffbcfd40c6f922f |
| --- /dev/null |
| +++ b/chrome/browser/ui/android/autofill/country_adapter_android.h |
| @@ -0,0 +1,44 @@ |
| +// 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.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_UI_ANDROID_AUTOFILL_COUNTRY_ADAPTER_ANDROID_H_ |
| +#define CHROME_BROWSER_UI_ANDROID_AUTOFILL_COUNTRY_ADAPTER_ANDROID_H_ |
| + |
| +#include "base/android/jni_weak_ref.h" |
| +#include "base/android/scoped_java_ref.h" |
| +#include "chrome/browser/ui/autofill/country_combobox_model.h" |
| + |
| +namespace autofill { |
| + |
| +// A bridge class for showing a list of countries in the Android settings UI. |
| +class CountryAdapterAndroid { |
| + public: |
| + CountryAdapterAndroid(JNIEnv* env, jobject obj); |
| + |
| + // Returns the number of items in the model. |
| + jint GetItemCount(JNIEnv* unused_env, jobject unused_obj); |
| + |
| + // Gets the country code at the given index. |
| + 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
|
| + GetCountryCodeAt(JNIEnv* env, jobject unused_obj, jint position); |
| + |
| + // Gets the country display name at the given index. |
| + base::android::ScopedJavaLocalRef<jstring> |
| + GetCountryNameAt(JNIEnv* env, jobject unused_obj, jint position); |
| + |
| + // Registers the JNI bindings for this class. |
| + static bool Register(JNIEnv* env); |
| + |
| + private: |
| + ~CountryAdapterAndroid(); |
| + |
| + // Pointer to the java counterpart. |
| + JavaObjectWeakGlobalRef weak_java_obj_; |
| + |
| + CountryComboboxModel country_combobox_model_; |
| +}; |
| + |
| +} // namespace autofill |
| + |
| +#endif // CHROME_BROWSER_UI_ANDROID_AUTOFILL_COUNTRY_ADAPTER_ANDROID_H_ |