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

Unified Diff: chrome/browser/ui/android/autofill/country_adapter_android.h

Issue 436563005: Turn Autofill country text input into a Spinner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix findbugs found bugs Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
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..042edc4f38713ffd39abcf0e0d7161abb33221b1
--- /dev/null
+++ b/chrome/browser/ui/android/autofill/country_adapter_android.h
@@ -0,0 +1,38 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// 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);
+
+ // Gets all the country codes and names. Every even index is a country name,
+ // and the following odd index is the associated country code.
+ base::android::ScopedJavaLocalRef<jobjectArray>
+ GetItems(JNIEnv* env, jobject unused_obj);
+
+ // 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_

Powered by Google App Engine
This is Rietveld 408576698