Chromium Code Reviews| 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_H_ | |
| 6 #define CHROME_BROWSER_UI_COLOR_CHOOSER_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebColor.h" | |
| 10 #include "ui/gfx/native_widget_types.h" | |
| 11 | |
| 12 class RenderViewHost; | |
| 13 | |
| 14 // Abstraction object for color choosers of each platforms. | |
| 15 class ColorChooser { | |
| 16 public: | |
| 17 // An interface implemented by a Listener object wishing to know about the | |
| 18 // the results from the color chooser. | |
| 19 class Listener { | |
| 20 public: | |
| 21 virtual void DidChooseColor(WebKit::WebColor color) = 0; | |
|
Peter Kasting
2012/01/27 18:27:15
Don't use WebKit:: types in Chrome code. Use SkCo
keishi
2012/02/06 15:01:57
Done.
| |
| 22 virtual void DidEnd() = 0; | |
| 23 virtual RenderViewHost* GetRenderViewHost() = 0; | |
| 24 }; | |
| 25 | |
| 26 static ColorChooser* Create(); | |
|
Peter Kasting
2012/01/27 18:27:15
Why not have this function take a listener, instea
keishi
2012/02/06 15:01:57
Done.
| |
| 27 virtual ~ColorChooser() {} | |
| 28 | |
| 29 virtual void Open(Listener* listener, WebKit::WebColor initial_color) = 0; | |
| 30 virtual void End(Listener* listener) = 0; | |
| 31 virtual void SetSelectedColor(WebKit::WebColor color) = 0; | |
| 32 }; | |
| 33 | |
| 34 #endif // CHROME_BROWSER_UI_COLOR_CHOOSER_H_ | |
| OLD | NEW |