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..ba042207d54b6000a930a19b67a38652f37065ea |
| --- /dev/null |
| +++ b/chrome/browser/ui/color_chooser.h |
| @@ -0,0 +1,38 @@ |
| +// 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() { |
|
Ben Goodger (Google)
2013/04/17 15:34:15
you don't need this. having current_color_chooser_
|
| + return current_color_chooser_; |
| + } |
| + |
| + static ColorChooser* Open(content::WebContents* web_contents, |
| + SkColor initial_color); |
| + |
| + protected: |
| + explicit ColorChooser(content::WebContents* web_contents); |
| + virtual ~ColorChooser(); |
| + |
| + 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_ |