Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2013 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 | |
| 8 #include "base/basictypes.h" | |
| 9 #include "content/public/browser/color_chooser.h" | |
| 10 #include "third_party/skia/include/core/SkColor.h" | |
| 11 | |
| 12 class ColorChooser : public content::ColorChooser { | |
| 13 public: | |
| 14 static ColorChooser* get_current_color_chooser() { | |
|
Ben Goodger (Google)
2013/04/17 15:34:15
you don't need this. having current_color_chooser_
| |
| 15 return current_color_chooser_; | |
| 16 } | |
| 17 | |
| 18 static ColorChooser* Open(content::WebContents* web_contents, | |
| 19 SkColor initial_color); | |
| 20 | |
| 21 protected: | |
| 22 explicit ColorChooser(content::WebContents* web_contents); | |
| 23 virtual ~ColorChooser(); | |
| 24 | |
| 25 void DidChooseColor(SkColor color); | |
| 26 void DidEndColorChooser(); | |
| 27 | |
| 28 private: | |
| 29 static ColorChooser* current_color_chooser_; | |
| 30 | |
| 31 // The web contents invoking the color chooser. No ownership because it will | |
| 32 // outlive this class. | |
| 33 content::WebContents* web_contents_; | |
| 34 | |
| 35 DISALLOW_COPY_AND_ASSIGN(ColorChooser); | |
| 36 }; | |
| 37 | |
| 38 #endif // CHROME_BROWSER_UI_COLOR_CHOOSER_H_ | |
| OLD | NEW |