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

Side by Side Diff: content/renderer/renderer_webcolorchooser_impl.h

Issue 23026006: Add support for color input datalist on Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_RENDERER_WEBCOLORCHOOSER_IMPL_H_ 5 #ifndef CONTENT_RENDERER_RENDERER_WEBCOLORCHOOSER_IMPL_H_
6 #define CONTENT_RENDERER_RENDERER_WEBCOLORCHOOSER_IMPL_H_ 6 #define CONTENT_RENDERER_RENDERER_WEBCOLORCHOOSER_IMPL_H_
7 7
8 #include <vector>
jam 2013/11/07 18:51:57 nit: blank line after this per style guide
keishi 2013/11/13 10:48:12 Done.
8 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "content/public/common/color_suggestion.h"
9 #include "content/public/renderer/render_view_observer.h" 11 #include "content/public/renderer/render_view_observer.h"
10 #include "third_party/WebKit/public/web/WebColorChooser.h" 12 #include "third_party/WebKit/public/web/WebColorChooser.h"
11 #include "third_party/WebKit/public/web/WebColorChooserClient.h" 13 #include "third_party/WebKit/public/web/WebColorChooserClient.h"
12 #include "third_party/skia/include/core/SkColor.h" 14 #include "third_party/skia/include/core/SkColor.h"
13 15
14 namespace blink { 16 namespace blink {
15 class WebFrame; 17 class WebFrame;
16 } 18 }
17 19
18 namespace content { 20 namespace content {
19 class RenderViewImpl; 21 class RenderViewImpl;
20 22
21 class RendererWebColorChooserImpl : public blink::WebColorChooser, 23 class RendererWebColorChooserImpl : public blink::WebColorChooser,
22 public RenderViewObserver { 24 public RenderViewObserver {
23 public: 25 public:
24 explicit RendererWebColorChooserImpl(RenderViewImpl* sender, 26 explicit RendererWebColorChooserImpl(RenderViewImpl* sender,
25 blink::WebColorChooserClient*); 27 blink::WebColorChooserClient*);
26 virtual ~RendererWebColorChooserImpl(); 28 virtual ~RendererWebColorChooserImpl();
27 29
28 virtual void setSelectedColor(const blink::WebColor); 30 virtual void setSelectedColor(const blink::WebColor);
29 virtual void endChooser(); 31 virtual void endChooser();
30 32
31 void Open(SkColor initial_color); 33 void Open(SkColor initial_color,
34 const std::vector<content::ColorSuggestion>& suggestions);
32 35
33 blink::WebColorChooserClient* client() { return client_; } 36 blink::WebColorChooserClient* client() { return client_; }
34 37
35 private: 38 private:
36 // RenderViewObserver implementation. 39 // RenderViewObserver implementation.
37 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 40 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
38 41
39 void OnDidChooseColorResponse(int color_chooser_id, SkColor color); 42 void OnDidChooseColorResponse(int color_chooser_id, SkColor color);
40 void OnDidEndColorChooser(int color_chooser_id); 43 void OnDidEndColorChooser(int color_chooser_id);
41 44
42 int identifier_; 45 int identifier_;
43 blink::WebColorChooserClient* client_; 46 blink::WebColorChooserClient* client_;
44 47
45 DISALLOW_COPY_AND_ASSIGN(RendererWebColorChooserImpl); 48 DISALLOW_COPY_AND_ASSIGN(RendererWebColorChooserImpl);
46 }; 49 };
47 50
48 } // namespace content 51 } // namespace content
49 52
50 #endif // CONTENT_RENDERER_RENDERER_WEBCOLORCHOOSER_IMPL_H_ 53 #endif // CONTENT_RENDERER_RENDERER_WEBCOLORCHOOSER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698