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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/DateTimeChooserAndroid.java

Issue 12191005: Move Android Date/Time parsing to the renderer (C++ and ICU) instead of the current parsing that ha… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased view_messages.h and fixed the link issue on the linux bot Created 7 years, 10 months 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/public/android/java/src/org/chromium/content/browser/DateTimeChooserAndroid.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/DateTimeChooserAndroid.java b/content/public/android/java/src/org/chromium/content/browser/DateTimeChooserAndroid.java
index 385b2fbacff8f1ca0b405ae1fa7c5388c8aad18d..7fc146beffe70ba503f95a8a9496698f9be93f92 100644
--- a/content/public/android/java/src/org/chromium/content/browser/DateTimeChooserAndroid.java
+++ b/content/public/android/java/src/org/chromium/content/browser/DateTimeChooserAndroid.java
@@ -25,8 +25,12 @@ class DateTimeChooserAndroid {
new InputDialogContainer.InputActionDelegate() {
@Override
- public void replaceDateTime(String text) {
- nativeReplaceDateTime(mNativeDateTimeChooserAndroid, text);
+ public void replaceDateTime(
+ int dialogType,
+ int year, int month, int day, int hour, int minute, int second) {
+ nativeReplaceDateTime(mNativeDateTimeChooserAndroid,
+ dialogType,
+ year, month, day, hour, minute, second);
}
@Override
@@ -36,18 +40,22 @@ class DateTimeChooserAndroid {
});
}
- private void showDialog(int dialogType, String text) {
- mInputDialogContainer.showDialog(text, dialogType);
+ private void showDialog(int dialogType, int year, int month, int monthDay,
+ int hour, int minute, int second) {
+ mInputDialogContainer.showDialog(dialogType, year, month, monthDay,
+ hour, minute, second);
}
@CalledByNative
private static DateTimeChooserAndroid createDateTimeChooser(
ContentViewCore contentViewCore,
- int nativeDateTimeChooserAndroid, String text, int dialogType) {
+ int nativeDateTimeChooserAndroid, int dialogType,
+ int year, int month, int day,
+ int hour, int minute, int second) {
DateTimeChooserAndroid chooser =
new DateTimeChooserAndroid(
contentViewCore.getContext(), nativeDateTimeChooserAndroid);
- chooser.showDialog(dialogType, text);
+ chooser.showDialog(dialogType, year, month, day, hour, minute, second);
return chooser;
}
@@ -59,6 +67,9 @@ class DateTimeChooserAndroid {
textInputTypeDateTimeLocal, textInputTypeMonth, textInputTypeTime);
}
- private native void nativeReplaceDateTime(int nativeDateTimeChooserAndroid, String text);
+ private native void nativeReplaceDateTime(int nativeDateTimeChooserAndroid,
+ int dialogType,
+ int year, int month, int day, int hour, int minute, int second);
+
private native void nativeCancelDialog(int nativeDateTimeChooserAndroid);
}

Powered by Google App Engine
This is Rietveld 408576698