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

Unified Diff: content/renderer/renderer_date_time_picker.cc

Issue 23623019: Support datalist for date/time input types on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/renderer_date_time_picker.cc
diff --git a/content/renderer/renderer_date_time_picker.cc b/content/renderer/renderer_date_time_picker.cc
index 8c3a8f2bf82b71e49254ee962dd4c91558728b5b..592e2491451e20687c44524d34d1436582540fe0 100644
--- a/content/renderer/renderer_date_time_picker.cc
+++ b/content/renderer/renderer_date_time_picker.cc
@@ -6,6 +6,7 @@
#include "base/strings/string_util.h"
#include "content/common/view_messages.h"
+#include "content/renderer/date_time_suggestion_builder.h"
#include "content/renderer/render_view_impl.h"
#include "third_party/WebKit/public/web/WebDateTimeChooserCompletion.h"
#include "third_party/WebKit/public/web/WebDateTimeChooserParams.h"
@@ -61,6 +62,10 @@ bool RendererDateTimePicker::Open() {
message.minimum = chooser_params_.minimum;
message.maximum = chooser_params_.maximum;
message.step = chooser_params_.step;
+ for (size_t i = 0; i < chooser_params_.suggestions.size(); i++) {
+ message.suggestions.push_back(
+ DateTimeSuggestionBuilder::Build(chooser_params_.suggestions[i]));
+ }
Send(new ViewHostMsg_OpenDateTimeDialog(routing_id(), message));
return true;
}
« no previous file with comments | « content/renderer/date_time_suggestion_builder.cc ('k') | ui/android/java/res/layout/date_time_suggestion.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698