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