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

Side by Side Diff: Source/platform/DateTimeChooser.h

Issue 23623017: Prepare for date/time input datalist support (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 20 matching lines...) Expand all
31 #ifndef DateTimeChooser_h 31 #ifndef DateTimeChooser_h
32 #define DateTimeChooser_h 32 #define DateTimeChooser_h
33 33
34 #include "platform/PlatformExport.h" 34 #include "platform/PlatformExport.h"
35 #include "platform/geometry/IntRect.h" 35 #include "platform/geometry/IntRect.h"
36 #include "wtf/RefCounted.h" 36 #include "wtf/RefCounted.h"
37 #include "wtf/text/WTFString.h" 37 #include "wtf/text/WTFString.h"
38 38
39 namespace WebCore { 39 namespace WebCore {
40 40
41 struct DateTimeSuggestion {
42 double value;
43 String localizedValue;
44 String label;
45 };
46
41 struct DateTimeChooserParameters { 47 struct DateTimeChooserParameters {
42 AtomicString type; 48 AtomicString type;
43 IntRect anchorRectInRootView; 49 IntRect anchorRectInRootView;
44 // Locale name for which the chooser should be localized. This 50 // Locale name for which the chooser should be localized. This
45 // might be an invalid name because it comes from HTML lang 51 // might be an invalid name because it comes from HTML lang
46 // attributes. 52 // attributes.
47 AtomicString locale; 53 AtomicString locale;
48 String currentValue; 54 double currentValue;
49 Vector<String> suggestionValues; 55 Vector<DateTimeSuggestion> suggestions;
50 Vector<String> localizedSuggestionValues;
51 Vector<String> suggestionLabels;
52 double minimum; 56 double minimum;
53 double maximum; 57 double maximum;
54 double step; 58 double step;
55 double stepBase; 59 double stepBase;
56 bool required; 60 bool required;
57 bool isAnchorElementRTL; 61 bool isAnchorElementRTL;
58 }; 62 };
59 63
60 // For pickers like color pickers and date pickers. 64 // For pickers like color pickers and date pickers.
61 class PLATFORM_EXPORT DateTimeChooser : public RefCounted<DateTimeChooser> { 65 class PLATFORM_EXPORT DateTimeChooser : public RefCounted<DateTimeChooser> {
62 public: 66 public:
63 virtual ~DateTimeChooser(); 67 virtual ~DateTimeChooser();
64 68
65 virtual void endChooser() = 0; 69 virtual void endChooser() = 0;
66 }; 70 };
67 71
68 } // namespace WebCore 72 } // namespace WebCore
69 #endif // DateTimeChooser_h 73 #endif // DateTimeChooser_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698