Chromium Code Reviews| 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; |
| } |