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

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 issues/removed color_select_helper/added color_chooser_id 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) 2012 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 "base/memory/ref_counted.h"
10 #include "chrome/browser/ui/base_shell_dialog.h"
11 #include "third_party/skia/include/core/SkColor.h"
12
13 // Shows a dialog for choosing color.
14 class ColorChooserDialog
Peter Kasting 2012/02/07 01:46:24 ColorChooserDialogWin is the only implementer of t
keishi 2012/02/17 11:31:05 Done.
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 ~Listener {}
23 virtual void DidChooseColor(SkColor color) = 0;
24 virtual void DidEnd() = 0;
25 };
26
27 // Creates a dialog box helper. This object is ref-counted, but the returned
28 // object will have no reference (refcount is 0).
29 static ColorChooserDialog* Create(Listener* listener);
Peter Kasting 2012/02/07 01:46:24 Nit: The combined class can just use a standard co
keishi 2012/02/17 11:31:05 Done.
30
31 // Opens the color chooser dialog.
32 virtual void SelectColor(SkColor initial_color,
33 gfx::NativeWindow owning_window) = 0;
Peter Kasting 2012/02/07 01:46:24 Nit: Why aren't these args to the constructor inst
keishi 2012/02/17 11:31:05 Done.
34
35 explicit ColorChooserDialog() { }
Peter Kasting 2012/02/07 01:46:24 Nit: Don't use "explicit" on no-arg constructor fo
keishi 2012/02/17 11:31:05 Done.
36
37 DISALLOW_COPY_AND_ASSIGN(ColorChooserDialog);
38 };
39
40 #endif // CHROME_BROWSER_UI_COLOR_CHOOSER_DIALOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698