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

Unified Diff: content/browser/android/date_time_chooser_android.h

Issue 23623019: Support datalist for date/time input types on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed 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/browser/android/date_time_chooser_android.h
diff --git a/content/browser/android/date_time_chooser_android.h b/content/browser/android/date_time_chooser_android.h
index a5578e01b86425963cb39cf5c801c7f11551ccd3..c02ecf56fe2d45fd6211916b5eb085ad22acbed0 100644
--- a/content/browser/android/date_time_chooser_android.h
+++ b/content/browser/android/date_time_chooser_android.h
@@ -6,14 +6,17 @@
#define CONTENT_BROWSER_ANDROID_DATE_TIME_CHOOSER_ANDROID_H_
#include <string>
+#include <vector>
#include "base/android/jni_helper.h"
#include "base/memory/scoped_ptr.h"
+#include "ui/base/ime/text_input_type.h"
namespace content {
class ContentViewCore;
class RenderViewHost;
+struct DateTimeSuggestion;
// Android implementation for DateTimeChooser dialogs.
class DateTimeChooserAndroid {
@@ -22,33 +25,19 @@ class DateTimeChooserAndroid {
~DateTimeChooserAndroid();
// DateTimeChooser implementation:
+ // Shows the dialog. |dialog_value| is the date/time value converted to a
+ // number as defined in HTML. (See blink::InputType::parseToNumber())
void ShowDialog(ContentViewCore* content,
RenderViewHost* host,
- int type,
- int year,
- int month,
- int day,
- int hour,
- int minute,
- int second,
- int milli,
- int week,
+ ui::TextInputType dialog_type,
+ double dialog_value,
double min,
double max,
- double step);
-
- // Replaces the current value with the one passed the different fields
- void ReplaceDateTime(JNIEnv* env,
- jobject,
- jint dialog_type,
- jint year,
- jint month,
- jint day,
- jint hour,
- jint minute,
- jint second,
- jint milli,
- jint week);
+ double step,
+ const std::vector<DateTimeSuggestion>& suggestions);
+
+ // Replaces the current value
+ void ReplaceDateTime(JNIEnv* env, jobject, jdouble value);
// Closes the dialog without propagating any changes.
void CancelDialog(JNIEnv* env, jobject);
« no previous file with comments | « no previous file | content/browser/android/date_time_chooser_android.cc » ('j') | content/common/date_time_suggestion.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698