Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(884)

Unified Diff: chrome/browser/ui/color_chooser.h

Issue 13150004: Support color chooser inside extesions, apps, chrome frame, dev tool (Closed) Base URL: http://git.chromium.org/chromium/src.git@ngcolor
Patch Set: Used static class member Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/color_chooser_mac.mm ('k') | chrome/browser/ui/color_chooser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « chrome/browser/ui/cocoa/color_chooser_mac.mm ('k') | chrome/browser/ui/color_chooser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698