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

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

Issue 9203001: Implement input type=color UI (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fixed comment Created 8 years, 10 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 unified diff | Download patch
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_DIALOG_H_
6 #define CHROME_BROWSER_UI_COLOR_CHOOSER_DIALOG_H_
7 #pragma once
8
9 #include "chrome/browser/ui/base_shell_dialog.h"
10 #include "base/memory/ref_counted.h"
11 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebColor.h"
12
13 // Shows a dialog for choosing color.
14 class ColorChooserDialog
15 : public base::RefCountedThreadSafe<ColorChooserDialog>,
16 public BaseShellDialog {
17 public:
18 // An interface implemented by a Listener object wishing to know about the
19 // the results from the color chooser dialog.
20 class Listener {
21 public:
22 virtual void DidChooseColor(WebKit::WebColor color) = 0;
23 virtual void DidEnd() = 0;
24 };
25
26 // Creates a dialog box helper. This object is ref-counted, but the returned
27 // object will have no reference (refcount is 0).
28 static ColorChooserDialog* Create(Listener* listener);
29
30 // Opens the color chooser dialog.
31 virtual void SelectColor(WebKit::WebColor initial_color,
32 gfx::NativeWindow owning_window) = 0;
33
34 explicit ColorChooserDialog() { }
35
36 DISALLOW_COPY_AND_ASSIGN(ColorChooserDialog);
37 };
38
39 #endif // CHROME_BROWSER_UI_COLOR_CHOOSER_DIALOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698