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

Side by Side 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 issues 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_RENDERER_RENDERER_WEBCOLORCHOOSER_IMPL_H_
6 #define CONTENT_RENDERER_RENDERER_WEBCOLORCHOOSER_IMPL_H_
7 #pragma once
8
9 #include "base/memory/scoped_ptr.h"
10 #include "content/public/renderer/render_view_observer.h"
11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebColorChooser.h"
12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebColorChooserClient .h"
13 #include "third_party/skia/include/core/SkColor.h"
14
15 namespace WebKit {
16 class WebFrame;
17 }
18
19 class RenderViewImpl;
20
21 class RendererWebColorChooserImpl : public WebKit::WebColorChooser,
22 public content::RenderViewObserver {
23 public:
24 explicit RendererWebColorChooserImpl(RenderViewImpl* sender,
25 WebKit::WebColorChooserClient*);
26 virtual ~RendererWebColorChooserImpl();
27
28 virtual void setSelectedColor(const WebKit::WebColor);
29 virtual void endChooser();
30
31 void Open(SkColor initial_color);
32
33 virtual WebKit::WebColorChooserClient* client();
jam 2012/02/22 02:55:20 why is this virtual? also, per C++ style guide on
keishi 2012/02/24 14:38:54 Removed virtual. Turned it into inline getter.
34
35 private:
36 // RenderViewObserver implementation.
37 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
38 virtual void FrameWillClose(WebKit::WebFrame* frame) OVERRIDE;
39
40 void OnDidChooseColorResponse(int color_chooser_id,
41 const SkColor& color);
42 void OnDidEndColorChooser(int color_chooser_id);
43
44 int identifier_;
45 scoped_ptr<WebKit::WebColorChooserClient> client_;
46
47 DISALLOW_COPY_AND_ASSIGN(RendererWebColorChooserImpl);
48 };
49
50 #endif // CONTENT_RENDERER_RENDERER_WEBCOLORCHOOSER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698