| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.components.web_contents_delegate_android; | 5 package org.chromium.components.web_contents_delegate_android; |
| 6 | 6 |
| 7 import android.content.Context; | 7 import android.content.Context; |
| 8 | 8 |
| 9 import org.chromium.base.annotations.CalledByNative; | 9 import org.chromium.base.annotations.CalledByNative; |
| 10 import org.chromium.base.annotations.JNINamespace; | 10 import org.chromium.base.annotations.JNINamespace; |
| 11 import org.chromium.content.browser.ContentViewCore; | 11 import org.chromium.content.browser.ContentViewCore; |
| 12 import org.chromium.ui.ColorPickerDialog; | |
| 13 import org.chromium.ui.ColorSuggestion; | |
| 14 import org.chromium.ui.OnColorChangedListener; | |
| 15 import org.chromium.ui.base.WindowAndroid; | 12 import org.chromium.ui.base.WindowAndroid; |
| 16 | 13 |
| 17 /** | 14 /** |
| 18 * ColorChooserAndroid communicates with the java ColorPickerDialog and the | 15 * ColorChooserAndroid communicates with the java ColorPickerDialog and the |
| 19 * native color_chooser_android.cc | 16 * native color_chooser_android.cc |
| 20 */ | 17 */ |
| 21 @JNINamespace("web_contents_delegate_android") | 18 @JNINamespace("web_contents_delegate_android") |
| 22 public class ColorChooserAndroid { | 19 public class ColorChooserAndroid { |
| 23 private final ColorPickerDialog mDialog; | 20 private final ColorPickerDialog mDialog; |
| 24 private final long mNativeColorChooserAndroid; | 21 private final long mNativeColorChooserAndroid; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 */ | 71 */ |
| 75 @CalledByNative | 72 @CalledByNative |
| 76 private static void addToColorSuggestionArray(ColorSuggestion[] array, int i
ndex, | 73 private static void addToColorSuggestionArray(ColorSuggestion[] array, int i
ndex, |
| 77 int color, String label) { | 74 int color, String label) { |
| 78 array[index] = new ColorSuggestion(color, label); | 75 array[index] = new ColorSuggestion(color, label); |
| 79 } | 76 } |
| 80 | 77 |
| 81 // Implemented in color_chooser_android.cc | 78 // Implemented in color_chooser_android.cc |
| 82 private native void nativeOnColorChosen(long nativeColorChooserAndroid, int
color); | 79 private native void nativeOnColorChosen(long nativeColorChooserAndroid, int
color); |
| 83 } | 80 } |
| OLD | NEW |