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

Unified Diff: chrome/browser/ui/views/color_chooser_dialog_win.h

Issue 9203001: Implement input type=color UI (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fixed issues/removed color_select_helper/added color_chooser_id Created 8 years, 10 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/views/color_chooser_dialog_win.h
diff --git a/chrome/browser/ui/views/color_chooser_dialog_win.h b/chrome/browser/ui/views/color_chooser_dialog_win.h
new file mode 100644
index 0000000000000000000000000000000000000000..62384879cf65dc9f6e785f02099f32cf6a160aea
--- /dev/null
+++ b/chrome/browser/ui/views/color_chooser_dialog_win.h
@@ -0,0 +1,47 @@
+// Copyright (c) 2012 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_VIEWS_COLOR_CHOOSER_DIALOG_WIN_H_
+#define CHROME_BROWSER_UI_VIEWS_COLOR_CHOOSER_DIALOG_WIN_H_
+#pragma once
+
+#include "chrome/browser/ui/color_chooser_dialog.h"
+#include "chrome/browser/ui/views/base_shell_dialog_win.h"
+
+class ColorChooserDialogWin
+ : public ColorChooserDialog,
+ public BaseShellDialogImpl {
+ public:
+ explicit ColorChooserDialogWin(Listener* listener);
+
+ virtual bool IsRunning(HWND owning_hwnd) const;
+ virtual void ListenerDestroyed() OVERRIDE;
+
+ virtual void SelectColor(SkColor initial_color,
+ gfx::NativeWindow owning_window);
+
+ private:
+ virtual ~ColorChooserDialogWin();
+
+ struct ExecuteOpenParams {
+ ExecuteOpenParams(SkColor color,
Peter Kasting 2012/02/07 01:46:24 Nit: Don't inline this constructor, since the memb
keishi 2012/02/17 11:31:05 Done.
+ RunState run_state,
+ HWND owner)
+ : color(color),
+ run_state(run_state),
+ owner(owner) {
+ }
+ SkColor color;
+ RunState run_state;
+ HWND owner;
+ };
+ void ExecuteOpen(const ExecuteOpenParams& params);
+ void DidChooseColor(SkColor color, RunState run_state);
+ void DidDetach(RunState run_state);
+
+ COLORREF custom_colors_[16];
+ Listener* listener_;
+};
+
+#endif // CHROME_BROWSER_UI_VIEWS_COLOR_CHOOSER_DIALOG_WIN_H_

Powered by Google App Engine
This is Rietveld 408576698