Chromium Code Reviews| Index: chrome/browser/ui/color_chooser.h |
| diff --git a/chrome/browser/ui/color_chooser.h b/chrome/browser/ui/color_chooser.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..491d01b8666a8a3b21567932427264b51b1adc9b |
| --- /dev/null |
| +++ b/chrome/browser/ui/color_chooser.h |
| @@ -0,0 +1,39 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_UI_COLOR_CHOOSER_H_ |
| +#define CHROME_BROWSER_UI_COLOR_CHOOSER_H_ |
| + |
| +#include "base/basictypes.h" |
| +#include "content/public/browser/color_chooser.h" |
| +#include "third_party/skia/include/core/SkColor.h" |
| + |
| +class ColorChooser : public content::ColorChooser { |
| + public: |
| + static ColorChooser* get_current_color_chooser() { |
| + return current_color_chooser_; |
| + } |
| + |
| + // Returns NULL on failure. |
|
Ben Goodger (Google)
2013/04/16 16:20:17
I left you a comment earlier about this. It's not
keishi
2013/04/17 10:49:48
I'm sorry I didn't understand what you were gettin
|
| + static ColorChooser* Open(content::WebContents* web_contents, |
| + SkColor initial_color); |
| + |
| + explicit ColorChooser(content::WebContents* web_contents); |
|
Ben Goodger (Google)
2013/04/16 16:20:17
ctor/dtor should be protected.
keishi
2013/04/17 10:49:48
Done.
|
| + virtual ~ColorChooser(); |
| + |
| + protected: |
| + void DidChooseColor(SkColor color); |
| + void DidEndColorChooser(); |
| + |
| + private: |
| + static ColorChooser* current_color_chooser_; |
| + |
| + // The web contents invoking the color chooser. No ownership because it will |
| + // outlive this class. |
| + content::WebContents* web_contents_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ColorChooser); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_COLOR_CHOOSER_H_ |