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

Side by Side Diff: components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/ColorPickerSimple.java

Issue 2398543003: Move Android view based ColorPicker from ui/ to components/ (Closed)
Patch Set: add owners Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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.ui; 5 package org.chromium.components.web_contents_delegate_android;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.graphics.Color; 8 import android.graphics.Color;
9 import android.util.AttributeSet; 9 import android.util.AttributeSet;
10 import android.widget.ListView; 10 import android.widget.ListView;
11 11
12 import org.chromium.ui.ColorSuggestionListAdapter.OnColorSuggestionClickListener ; 12 import org.chromium.components.web_contents_delegate_android.ColorSuggestionList Adapter.OnColorSuggestionClickListener;
13 13
14 /** 14 /**
15 * Draws a grid of (predefined) colors and allows the user to choose one of 15 * Draws a grid of (predefined) colors and allows the user to choose one of
16 * those colors. 16 * those colors.
17 */ 17 */
18 public class ColorPickerSimple extends ListView implements OnColorSuggestionClic kListener { 18 public class ColorPickerSimple extends ListView implements OnColorSuggestionClic kListener {
19 19
20 private OnColorChangedListener mOnColorChangedListener; 20 private OnColorChangedListener mOnColorChangedListener;
21 21
22 private static final int[] DEFAULT_COLORS = { 22 private static final int[] DEFAULT_COLORS = {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 getContext(), suggestions); 77 getContext(), suggestions);
78 adapter.setOnColorSuggestionClickListener(this); 78 adapter.setOnColorSuggestionClickListener(this);
79 setAdapter(adapter); 79 setAdapter(adapter);
80 } 80 }
81 81
82 @Override 82 @Override
83 public void onColorSuggestionClick(ColorSuggestion suggestion) { 83 public void onColorSuggestionClick(ColorSuggestion suggestion) {
84 mOnColorChangedListener.onColorChanged(suggestion.mColor); 84 mOnColorChangedListener.onColorChanged(suggestion.mColor);
85 } 85 }
86 } 86 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698