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

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

Issue 7690004: Implement input type=color UI (win part) (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: rebased Created 9 years, 3 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_dialog.h
diff --git a/chrome/browser/ui/color_chooser_dialog.h b/chrome/browser/ui/color_chooser_dialog.h
new file mode 100644
index 0000000000000000000000000000000000000000..5a82158fafd4ef3e1d5567bb7bbd903b391162ec
--- /dev/null
+++ b/chrome/browser/ui/color_chooser_dialog.h
@@ -0,0 +1,40 @@
+// Copyright (c) 2011 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_DIALOG_H_
+#define CHROME_BROWSER_UI_COLOR_CHOOSER_DIALOG_H_
+#pragma once
+
+#if defined(ENABLE_INPUT_COLOR)
+
+#include "chrome/browser/ui/shell_dialogs.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebColor.h"
+#include "ui/gfx/native_widget_types.h"
+
+// Gtk and Mac use ColorChooser. Windows uses ColorChooserDialog instead
yosin_UTC9 2011/12/06 07:31:50 This comment may be: This class wraps Windows's c
+// becuase it is not a singleton and it needs to inherit BaseShellDialog.
+class ColorChooserDialog
+ : public base::RefCountedThreadSafe<ColorChooserDialog>,
+ public BaseShellDialog {
+ public:
+ // An interface implemented by a Listener object wishing to know about the
+ // the results from the color chooser dialog.
+ class Listener {
+ public:
+ virtual void DidChooseColor(WebKit::WebColor color) = 0;
+ };
+
+ // Creates a dialog box helper. This object is ref-counted, but the returned
+ // object will have no reference (refcount is 0).
+ static ColorChooserDialog* Create(Listener* listener);
yosin_UTC9 2011/12/06 07:31:50 It is better to have private ctor since this class
+
+ // Opens the color chooser dialog.
+ virtual void SelectColor(WebKit::WebColor initial_color,
+ gfx::NativeWindow owning_window) = 0;
+};
yosin_UTC9 2011/12/06 07:31:50 Please put DISALLOW_COPY_AND_ASSIGN(ColorChooserDi
+
+#endif // defined(ENABLE_INPUT_COLOR)
+
+#endif // CHROME_BROWSER_UI_COLOR_CHOOSER_DIALOG_H_
+
« no previous file with comments | « no previous file | chrome/browser/ui/views/shell_dialogs_win.cc » ('j') | chrome/browser/ui/views/shell_dialogs_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698