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

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

Issue 7690004: Implement input type=color UI (win part) (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: rebased Created 9 years, 2 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 | 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_DIALOG_H_
6 #define CHROME_BROWSER_UI_COLOR_CHOOSER_DIALOG_H_
7 #pragma once
8
9 #if defined(ENABLE_INPUT_COLOR)
10
11 #include "chrome/browser/ui/shell_dialogs.h"
12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebColor.h"
13 #include "ui/gfx/native_widget_types.h"
14
15 // Gtk and Mac use ColorChooser. Windows uses ColorChooserDialog instead
yosin_UTC9 2011/12/06 07:31:50 This comment may be: This class wraps Windows's c
16 // becuase it is not a singleton and it needs to inherit BaseShellDialog.
17 class ColorChooserDialog
18 : public base::RefCountedThreadSafe<ColorChooserDialog>,
19 public BaseShellDialog {
20 public:
21 // An interface implemented by a Listener object wishing to know about the
22 // the results from the color chooser dialog.
23 class Listener {
24 public:
25 virtual void DidChooseColor(WebKit::WebColor color) = 0;
26 };
27
28 // Creates a dialog box helper. This object is ref-counted, but the returned
29 // object will have no reference (refcount is 0).
30 static ColorChooserDialog* Create(Listener* listener);
yosin_UTC9 2011/12/06 07:31:50 It is better to have private ctor since this class
31
32 // Opens the color chooser dialog.
33 virtual void SelectColor(WebKit::WebColor initial_color,
34 gfx::NativeWindow owning_window) = 0;
35 };
yosin_UTC9 2011/12/06 07:31:50 Please put DISALLOW_COPY_AND_ASSIGN(ColorChooserDi
36
37 #endif // defined(ENABLE_INPUT_COLOR)
38
39 #endif // CHROME_BROWSER_UI_COLOR_CHOOSER_DIALOG_H_
40
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/shell_dialogs_win.cc » ('j') | chrome/browser/ui/views/shell_dialogs_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698