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

Unified Diff: components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/ColorChooserAndroid.java

Issue 23026006: Add support for color input datalist on Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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: components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/ColorChooserAndroid.java
diff --git a/components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/ColorChooserAndroid.java b/components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/ColorChooserAndroid.java
index babf91ea359650690a8f383ad2b63492deb3c29f..75c1bd547ba3d5ac8b4c67ddce7c0b0cf4a31186 100644
--- a/components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/ColorChooserAndroid.java
+++ b/components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/ColorChooserAndroid.java
@@ -22,7 +22,7 @@ public class ColorChooserAndroid {
private final int mNativeColorChooserAndroid;
private ColorChooserAndroid(int nativeColorChooserAndroid,
- Context context, int initialColor) {
+ Context context, int initialColor, int[] suggestions, String[] suggestionLabels) {
Miguel Garcia 2013/08/19 14:43:27 there is a cost (albeit small) in JNIfying the arr
keishi 2013/08/26 05:28:54 I reimplemented the simple color chooser so I can
OnColorChangedListener listener = new OnColorChangedListener() {
@Override
public void onColorChanged(int color) {
@@ -32,7 +32,8 @@ public class ColorChooserAndroid {
};
mNativeColorChooserAndroid = nativeColorChooserAndroid;
- mDialog = new ColorPickerDialog(context, listener, initialColor);
+ mDialog = new ColorPickerDialog(context, listener, initialColor,
+ suggestions, suggestionLabels);
}
private void openColorChooser() {
@@ -48,9 +49,11 @@ public class ColorChooserAndroid {
public static ColorChooserAndroid createColorChooserAndroid(
int nativeColorChooserAndroid,
ContentViewCore contentViewCore,
- int initialColor) {
+ int initialColor,
+ int[] suggestions,
+ String[] suggestionLabels) {
ColorChooserAndroid chooser = new ColorChooserAndroid(nativeColorChooserAndroid,
- contentViewCore.getContext(), initialColor);
+ contentViewCore.getContext(), initialColor, suggestions, suggestionLabels);
chooser.openColorChooser();
return chooser;
}

Powered by Google App Engine
This is Rietveld 408576698