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() { | |
| 15 return current_color_chooser_; | |
| 16 } | |
| 17 | |
| 18 // 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
| |
| 19 static ColorChooser* Open(content::WebContents* web_contents, | |
| 20 SkColor initial_color); | |
| 21 | |
| 22 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.
| |
| 23 virtual ~ColorChooser(); | |
| 24 | |
| 25 protected: | |
| 26 void DidChooseColor(SkColor color); | |
| 27 void DidEndColorChooser(); | |
| 28 | |
| 29 private: | |
| 30 static ColorChooser* current_color_chooser_; | |
| 31 | |
| 32 // The web contents invoking the color chooser. No ownership because it will | |
| 33 // outlive this class. | |
| 34 content::WebContents* web_contents_; | |
| 35 | |
| 36 DISALLOW_COPY_AND_ASSIGN(ColorChooser); | |
| 37 }; | |
| 38 | |
| 39 #endif // CHROME_BROWSER_UI_COLOR_CHOOSER_H_ | |
| OLD | NEW |