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

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

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 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 #include "content/renderer/renderer_webcolorchooser_impl.h" 5 #include "content/renderer/renderer_webcolorchooser_impl.h"
6 6
7 #include "content/common/view_messages.h" 7 #include "content/common/view_messages.h"
8 #include "content/renderer/render_view_impl.h" 8 #include "content/renderer/render_view_impl.h"
9 9
10 namespace content { 10 namespace content {
(...skipping 29 matching lines...) Expand all
40 40
41 void RendererWebColorChooserImpl::setSelectedColor(blink::WebColor color) { 41 void RendererWebColorChooserImpl::setSelectedColor(blink::WebColor color) {
42 Send(new ViewHostMsg_SetSelectedColorInColorChooser(routing_id(), identifier_, 42 Send(new ViewHostMsg_SetSelectedColorInColorChooser(routing_id(), identifier_,
43 static_cast<SkColor>(color))); 43 static_cast<SkColor>(color)));
44 } 44 }
45 45
46 void RendererWebColorChooserImpl::endChooser() { 46 void RendererWebColorChooserImpl::endChooser() {
47 Send(new ViewHostMsg_EndColorChooser(routing_id(), identifier_)); 47 Send(new ViewHostMsg_EndColorChooser(routing_id(), identifier_));
48 } 48 }
49 49
50 void RendererWebColorChooserImpl::Open(SkColor initial_color) { 50 void RendererWebColorChooserImpl::Open(
51 Send(new ViewHostMsg_OpenColorChooser(routing_id(), identifier_, 51 SkColor initial_color,
52 initial_color)); 52 const std::vector<content::ColorSuggestion>& suggestions) {
53 Send(new ViewHostMsg_OpenColorChooser(routing_id(),
54 identifier_,
55 initial_color,
56 suggestions));
53 } 57 }
54 58
55 void RendererWebColorChooserImpl::OnDidChooseColorResponse(int color_chooser_id, 59 void RendererWebColorChooserImpl::OnDidChooseColorResponse(int color_chooser_id,
56 SkColor color) { 60 SkColor color) {
57 DCHECK(identifier_ == color_chooser_id); 61 DCHECK(identifier_ == color_chooser_id);
58 62
59 client_->didChooseColor(static_cast<blink::WebColor>(color)); 63 client_->didChooseColor(static_cast<blink::WebColor>(color));
60 } 64 }
61 65
62 void RendererWebColorChooserImpl::OnDidEndColorChooser(int color_chooser_id) { 66 void RendererWebColorChooserImpl::OnDidEndColorChooser(int color_chooser_id) {
63 if (identifier_ != color_chooser_id) 67 if (identifier_ != color_chooser_id)
64 return; 68 return;
65 client_->didEndChooser(); 69 client_->didEndChooser();
66 } 70 }
67 71
68 } // namespace content 72 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/renderer_webcolorchooser_impl.h ('k') | ui/android/java/res/drawable/color_button_background.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698