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

Side by Side Diff: content/browser/android/date_time_chooser_android.h

Issue 64913002: Transfer date/time value to chooser as double (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@datetime3
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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_ANDROID_DATE_TIME_CHOOSER_ANDROID_H_ 5 #ifndef CONTENT_BROWSER_ANDROID_DATE_TIME_CHOOSER_ANDROID_H_
6 #define CONTENT_BROWSER_ANDROID_DATE_TIME_CHOOSER_ANDROID_H_ 6 #define CONTENT_BROWSER_ANDROID_DATE_TIME_CHOOSER_ANDROID_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/android/jni_helper.h" 10 #include "base/android/jni_helper.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 12
13 namespace content { 13 namespace content {
14 14
15 class ContentViewCore; 15 class ContentViewCore;
16 class RenderViewHost; 16 class RenderViewHost;
17 17
18 // Android implementation for DateTimeChooser dialogs. 18 // Android implementation for DateTimeChooser dialogs.
19 class DateTimeChooserAndroid { 19 class DateTimeChooserAndroid {
20 public: 20 public:
21 DateTimeChooserAndroid(); 21 DateTimeChooserAndroid();
22 ~DateTimeChooserAndroid(); 22 ~DateTimeChooserAndroid();
23 23
24 // DateTimeChooser implementation: 24 // DateTimeChooser implementation:
25 void ShowDialog(ContentViewCore* content, 25 void ShowDialog(ContentViewCore* content,
26 RenderViewHost* host, 26 RenderViewHost* host,
27 int type, 27 int dialog_type,
28 int year, 28 double current_value,
29 int month,
30 int day,
31 int hour,
32 int minute,
33 int second,
34 int milli,
35 int week,
36 double min, 29 double min,
37 double max, 30 double max,
38 double step); 31 double step);
39 32
40 // Replaces the current value with the one passed the different fields 33 // Replaces the current value with the one passed the different fields
Miguel Garcia 2013/11/11 13:40:05 nit: change comment
keishi 2013/11/19 12:51:21 Done.
41 void ReplaceDateTime(JNIEnv* env, 34 void ReplaceDateTime(JNIEnv* env,
Miguel Garcia 2013/11/11 13:40:05 nit: give names to the different values so they ma
keishi 2013/11/19 12:51:21 Done.
42 jobject, 35 jobject,
43 jint dialog_type, 36 jdouble);
Miguel Garcia 2013/11/11 13:40:05 don't you need dialog_type?
keishi 2013/11/19 12:51:21 The dialog_type would be useful when the replaceDa
44 jint year,
45 jint month,
46 jint day,
47 jint hour,
48 jint minute,
49 jint second,
50 jint milli,
51 jint week);
52 37
53 // Closes the dialog without propagating any changes. 38 // Closes the dialog without propagating any changes.
54 void CancelDialog(JNIEnv* env, jobject); 39 void CancelDialog(JNIEnv* env, jobject);
55 40
56 // Propagates the different types of accepted date/time values to the 41 // Propagates the different types of accepted date/time values to the
57 // java side. 42 // java side.
58 static void InitializeDateInputTypes( 43 static void InitializeDateInputTypes(
59 int text_input_type_date, int text_input_type_date_time, 44 int text_input_type_date, int text_input_type_date_time,
60 int text_input_type_date_time_local, int text_input_type_month, 45 int text_input_type_date_time_local, int text_input_type_month,
61 int text_input_type_time, int text_input_type_week); 46 int text_input_type_time, int text_input_type_week);
62 47
63 private: 48 private:
64 RenderViewHost* host_; 49 RenderViewHost* host_;
65 50
66 base::android::ScopedJavaGlobalRef<jobject> j_date_time_chooser_; 51 base::android::ScopedJavaGlobalRef<jobject> j_date_time_chooser_;
67 52
68 DISALLOW_COPY_AND_ASSIGN(DateTimeChooserAndroid); 53 DISALLOW_COPY_AND_ASSIGN(DateTimeChooserAndroid);
69 }; 54 };
70 55
71 // Native JNI methods 56 // Native JNI methods
72 bool RegisterDateTimeChooserAndroid(JNIEnv* env); 57 bool RegisterDateTimeChooserAndroid(JNIEnv* env);
73 58
74 } // namespace content 59 } // namespace content
75 60
76 #endif // CONTENT_BROWSER_ANDROID_DATE_TIME_CHOOSER_ANDROID_H_ 61 #endif // CONTENT_BROWSER_ANDROID_DATE_TIME_CHOOSER_ANDROID_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/android/date_time_chooser_android.cc » ('j') | content/common/view_messages.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698