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

Unified Diff: content/renderer/renderer_webcolorchooser_impl.h

Issue 9203001: Implement input type=color UI (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fixed comment Created 8 years, 11 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: content/renderer/renderer_webcolorchooser_impl.h
diff --git a/content/renderer/renderer_webcolorchooser_impl.h b/content/renderer/renderer_webcolorchooser_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..49b025e33eb2e61811b4e8383062b565329d514c
--- /dev/null
+++ b/content/renderer/renderer_webcolorchooser_impl.h
@@ -0,0 +1,40 @@
+// Copyright (c) 2010 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 CONTENT_RENDERER_RENDERER_WEBCOLORCHOOSER_IMPL_H_
+#define CONTENT_RENDERER_RENDERER_WEBCOLORCHOOSER_IMPL_H_
+#pragma once
+
+#include "base/memory/scoped_ptr.h"
+#include "content/public/renderer/render_view_observer.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebColorChooser.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebColorChooserClient.h"
+
+class RenderViewImpl;
+
+class RendererWebColorChooserImpl : public WebKit::WebColorChooser,
+ public content::RenderViewObserver {
+ public:
+ explicit RendererWebColorChooserImpl(RenderViewImpl* sender,
+ WebKit::WebColorChooserClient*);
+ virtual ~RendererWebColorChooserImpl();
+
+ virtual void setSelectedColor(const WebKit::WebColor);
+ virtual void endChooser();
+
+ virtual WebKit::WebColorChooserClient* client();
+
+ private:
+ // RenderView::Observer implementation.
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+
+ void OnDidChooseColorResponse(const WebKit::WebColor color);
+ void OnDidEndColorChooser();
+
+ scoped_ptr< WebKit::WebColorChooserClient> client_;
+
+ DISALLOW_COPY_AND_ASSIGN(RendererWebColorChooserImpl);
+};
+
+#endif // CONTENT_RENDERER_RENDERER_WEBCOLORCHOOSER_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698