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

Unified Diff: content/renderer/render_view_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, 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | content/renderer/renderer_webcolorchooser_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index b21d9e047b9a4e914326cd43acb012f2db1e9439..dc9dee77bb3c4d8f452fb38dea2f418de5578ce7 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -156,6 +156,7 @@
#include "third_party/WebKit/public/platform/WebVector.h"
#include "third_party/WebKit/public/web/WebAXObject.h"
#include "third_party/WebKit/public/web/WebColorName.h"
+#include "third_party/WebKit/public/web/WebColorSuggestion.h"
#include "third_party/WebKit/public/web/WebDOMEvent.h"
#include "third_party/WebKit/public/web/WebDOMMessageEvent.h"
#include "third_party/WebKit/public/web/WebDataSource.h"
@@ -2660,10 +2661,15 @@ bool RenderViewImpl::handleCurrentKeyboardEvent() {
blink::WebColorChooser* RenderViewImpl::createColorChooser(
blink::WebColorChooserClient* client,
- const blink::WebColor& initial_color) {
+ const blink::WebColor& initial_color,
+ const blink::WebVector<blink::WebColorSuggestion>& suggestions) {
RendererWebColorChooserImpl* color_chooser =
new RendererWebColorChooserImpl(this, client);
- color_chooser->Open(static_cast<SkColor>(initial_color));
+ std::vector<content::ColorSuggestion> color_suggestions;
+ for (size_t i = 0; i < suggestions.size(); i++) {
+ color_suggestions.push_back(content::ColorSuggestion(suggestions[i]));
+ }
+ color_chooser->Open(static_cast<SkColor>(initial_color), color_suggestions);
return color_chooser;
}
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | content/renderer/renderer_webcolorchooser_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698