| OLD | NEW |
| 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 Loading... |
| 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 // FIXME: Remove. Deprecated in favor of doubleValue. | 54 // FIXME: Remove. Deprecated in favor of doubleValue. |
| 49 String currentValue; | 55 String currentValue; |
| 50 double doubleValue; | 56 double doubleValue; |
| 51 Vector<String> suggestionValues; | 57 Vector<DateTimeSuggestion> suggestions; |
| 52 Vector<String> localizedSuggestionValues; | |
| 53 Vector<String> suggestionLabels; | |
| 54 double minimum; | 58 double minimum; |
| 55 double maximum; | 59 double maximum; |
| 56 double step; | 60 double step; |
| 57 double stepBase; | 61 double stepBase; |
| 58 bool required; | 62 bool required; |
| 59 bool isAnchorElementRTL; | 63 bool isAnchorElementRTL; |
| 60 }; | 64 }; |
| 61 | 65 |
| 62 // For pickers like color pickers and date pickers. | 66 // For pickers like color pickers and date pickers. |
| 63 class PLATFORM_EXPORT DateTimeChooser : public RefCounted<DateTimeChooser> { | 67 class PLATFORM_EXPORT DateTimeChooser : public RefCounted<DateTimeChooser> { |
| 64 public: | 68 public: |
| 65 virtual ~DateTimeChooser(); | 69 virtual ~DateTimeChooser(); |
| 66 | 70 |
| 67 virtual void endChooser() = 0; | 71 virtual void endChooser() = 0; |
| 68 }; | 72 }; |
| 69 | 73 |
| 70 } // namespace WebCore | 74 } // namespace WebCore |
| 71 #endif // DateTimeChooser_h | 75 #endif // DateTimeChooser_h |
| OLD | NEW |