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

Side by Side Diff: chrome/browser/ui/color_chooser.h

Issue 7685006: Implement input type=color UI (common part) (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: forgot to turn off flag Created 9 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_COLOR_CHOOSER_H_
6 #define CHROME_BROWSER_UI_COLOR_CHOOSER_H_
7 #pragma once
8
9 #if defined(ENABLE_INPUT_COLOR)
10
11 #include "base/memory/singleton.h"
12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebColor.h"
13 #include "ui/gfx/native_widget_types.h"
14
15 // Abstraction object for color choosers of each platforms.
16 class ColorChooser {
17 public:
18 // An interface implemented by a Listener object wishing to know about the
19 // the results from the color chooser.
20 class Listener {
21 public:
22 virtual void DidChooseColor(WebKit::WebColor color) = 0;
23 virtual void DidCleanup() = 0;
24 };
25
26 // Returns singleton instance of ColorChooserImpl.
27 static ColorChooser* GetInstance();
28
29 void open(Listener* listener, WebKit::WebColor initial_color);
30 void cleanup(Listener* listener);
31 void setSelectedColor(WebKit::WebColor color);
32
33 protected:
34 virtual ~ColorChooser();
35 virtual void openImpl(Listener* listener, WebKit::WebColor initial_color) = 0;
36 virtual void cleanupImpl(Listener* listener) = 0;
37 virtual void setSelectedColorImpl(WebKit::WebColor color) = 0;
38 };
39
40 #endif // defined(ENABLE_INPUT_COLOR)
41
42 #endif // CHROME_BROWSER_UI_COLOR_CHOOSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698