Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_ | |
| OLD | NEW |