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

Unified Diff: chrome/browser/ui/color_chooser_controller.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: Created 7 years, 9 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
Index: chrome/browser/ui/color_chooser_controller.h
diff --git a/chrome/browser/ui/color_chooser_controller.h b/chrome/browser/ui/color_chooser_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..31e60d00c65800ec1ffdfeaabddf610d360b43c2
--- /dev/null
+++ b/chrome/browser/ui/color_chooser_controller.h
@@ -0,0 +1,40 @@
+// 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_CONTROLLER_H_
+#define CHROME_BROWSER_UI_COLOR_CHOOSER_CONTROLLER_H_
+
+#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
+#include "third_party/skia/include/core/SkColor.h"
+
+namespace content {
+class ColorChooser;
+class WebContents;
+}
+
+// BookmarkPromptController is a kind of singleton object held by
+// BrowserProcessImpl, and controls showing bookmark prompt for frequently
+// visited URLs.
+class ColorChooserController {
+ public:
+ ColorChooserController();
+ virtual ~ColorChooserController();
+
+ static ColorChooserController* GetInstance();
+
+ // Returns NULL on failure.
+ content::ColorChooser* OpenColorChooser(SkColor initial_color,
+ content::WebContents* web_contents,
+ int color_chooser_id);
+
+ void DidEndColorChooser();
+
+ private:
+ scoped_ptr<content::ColorChooser> color_chooser_;
+
+ DISALLOW_COPY_AND_ASSIGN(ColorChooserController);
+};
+
+#endif // CHROME_BROWSER_UI_COLOR_CHOOSER_CONTROLLER_H_

Powered by Google App Engine
This is Rietveld 408576698