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

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

Issue 11783088: Split Date/Time picker values from IME processing since date/time related form values have been com… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 11 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/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
new file mode 100644
index 0000000000000000000000000000000000000000..787b0caf7ab8f37763acda87138f227f174e50ef
--- /dev/null
+++ b/content/browser/android/date_time_chooser_android.h
@@ -0,0 +1,56 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_ANDROID_DATE_TIME_CHOOSER_ANDROID_H_
+#define CONTENT_BROWSER_ANDROID_DATE_TIME_CHOOSER_ANDROID_H_
+
+#include <string>
+
+#include "base/android/jni_helper.h"
+#include "base/memory/scoped_ptr.h"
+
+namespace content {
+
+class ContentViewCore;
+class RenderViewHost;
+
+// Android implementation for DateTimeChooser dialogs.
+class DateTimeChooserAndroid {
+ public:
+ DateTimeChooserAndroid();
+ ~DateTimeChooserAndroid();
+
+ // DateTimeChooser implementation:
+ void ShowDialog(ContentViewCore* content,
+ RenderViewHost* sender,
+ int type, const std::string& value);
+
+ // Replaces the current value with the one passed in text.
+ void ReplaceDateTime(JNIEnv* env, jobject, jstring text);
+
+ // Closes the dialog without propagating any changes.
+ void CancelDialog(JNIEnv* env, jobject);
+
+ // Propagates the different types of accepted date/time values to the
+ // java side.
+ static void InitializeDateInputTypes(
+ int text_input_type_date, int text_input_type_date_time,
+ int text_input_type_date_time_local, int text_input_type_month,
+ int text_input_type_time);
+
+ private:
+ class DateTimeIPCSender;
+
+ scoped_ptr<DateTimeIPCSender> communicator_;
+ base::android::ScopedJavaGlobalRef<jobject> j_date_time_chooser_;
+
+ DISALLOW_COPY_AND_ASSIGN(DateTimeChooserAndroid);
+};
+
+// Native JNI methods
+bool RegisterDateTimeChooserAndroid(JNIEnv* env);
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_ANDROID_DATE_TIME_CHOOSER_ANDROID_H_
« no previous file with comments | « content/browser/android/browser_jni_registrar.cc ('k') | content/browser/android/date_time_chooser_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698