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 28 matching lines...) Expand all Loading... |
39 | 39 |
40 namespace WebCore { | 40 namespace WebCore { |
41 | 41 |
42 class DateComponents; | 42 class DateComponents; |
43 struct DateFormatToken; | 43 struct DateFormatToken; |
44 | 44 |
45 class PLATFORM_EXPORT LocaleWin : public Locale { | 45 class PLATFORM_EXPORT LocaleWin : public Locale { |
46 public: | 46 public: |
47 static PassOwnPtr<LocaleWin> create(LCID, bool defaultsForLocale); | 47 static PassOwnPtr<LocaleWin> create(LCID, bool defaultsForLocale); |
48 ~LocaleWin(); | 48 ~LocaleWin(); |
49 #if ENABLE(CALENDAR_PICKER) | |
50 virtual const Vector<String>& weekDayShortLabels() OVERRIDE; | 49 virtual const Vector<String>& weekDayShortLabels() OVERRIDE; |
51 virtual unsigned firstDayOfWeek() OVERRIDE; | 50 virtual unsigned firstDayOfWeek() OVERRIDE; |
52 virtual bool isRTL() OVERRIDE; | 51 virtual bool isRTL() OVERRIDE; |
53 #endif | |
54 virtual String dateFormat() OVERRIDE; | 52 virtual String dateFormat() OVERRIDE; |
55 virtual String monthFormat() OVERRIDE; | 53 virtual String monthFormat() OVERRIDE; |
56 virtual String shortMonthFormat() OVERRIDE; | 54 virtual String shortMonthFormat() OVERRIDE; |
57 virtual String timeFormat() OVERRIDE; | 55 virtual String timeFormat() OVERRIDE; |
58 virtual String shortTimeFormat() OVERRIDE; | 56 virtual String shortTimeFormat() OVERRIDE; |
59 virtual String dateTimeFormatWithSeconds() OVERRIDE; | 57 virtual String dateTimeFormatWithSeconds() OVERRIDE; |
60 virtual String dateTimeFormatWithoutSeconds() OVERRIDE; | 58 virtual String dateTimeFormatWithoutSeconds() OVERRIDE; |
61 virtual const Vector<String>& monthLabels() OVERRIDE; | 59 virtual const Vector<String>& monthLabels() OVERRIDE; |
62 virtual const Vector<String>& shortMonthLabels() OVERRIDE; | 60 virtual const Vector<String>& shortMonthLabels() OVERRIDE; |
63 virtual const Vector<String>& standAloneMonthLabels() OVERRIDE; | 61 virtual const Vector<String>& standAloneMonthLabels() OVERRIDE; |
64 virtual const Vector<String>& shortStandAloneMonthLabels() OVERRIDE; | 62 virtual const Vector<String>& shortStandAloneMonthLabels() OVERRIDE; |
65 virtual const Vector<String>& timeAMPMLabels() OVERRIDE; | 63 virtual const Vector<String>& timeAMPMLabels() OVERRIDE; |
66 | 64 |
67 static String dateFormat(const String&); | 65 static String dateFormat(const String&); |
68 | 66 |
69 private: | 67 private: |
70 explicit LocaleWin(LCID, bool defaultsForLocale); | 68 explicit LocaleWin(LCID, bool defaultsForLocale); |
71 String getLocaleInfoString(LCTYPE); | 69 String getLocaleInfoString(LCTYPE); |
72 void getLocaleInfo(LCTYPE, DWORD&); | 70 void getLocaleInfo(LCTYPE, DWORD&); |
73 void ensureShortMonthLabels(); | 71 void ensureShortMonthLabels(); |
74 void ensureMonthLabels(); | 72 void ensureMonthLabels(); |
75 #if ENABLE(CALENDAR_PICKER) | |
76 void ensureWeekDayShortLabels(); | 73 void ensureWeekDayShortLabels(); |
77 #endif | |
78 // Locale function: | 74 // Locale function: |
79 virtual void initializeLocaleData() OVERRIDE; | 75 virtual void initializeLocaleData() OVERRIDE; |
80 | 76 |
81 LCID m_lcid; | 77 LCID m_lcid; |
82 Vector<String> m_shortMonthLabels; | 78 Vector<String> m_shortMonthLabels; |
83 Vector<String> m_monthLabels; | 79 Vector<String> m_monthLabels; |
84 String m_dateFormat; | 80 String m_dateFormat; |
85 String m_monthFormat; | 81 String m_monthFormat; |
86 String m_shortMonthFormat; | 82 String m_shortMonthFormat; |
87 String m_timeFormatWithSeconds; | 83 String m_timeFormatWithSeconds; |
88 String m_timeFormatWithoutSeconds; | 84 String m_timeFormatWithoutSeconds; |
89 String m_dateTimeFormatWithSeconds; | 85 String m_dateTimeFormatWithSeconds; |
90 String m_dateTimeFormatWithoutSeconds; | 86 String m_dateTimeFormatWithoutSeconds; |
91 Vector<String> m_timeAMPMLabels; | 87 Vector<String> m_timeAMPMLabels; |
92 #if ENABLE(CALENDAR_PICKER) | |
93 Vector<String> m_weekDayShortLabels; | 88 Vector<String> m_weekDayShortLabels; |
94 unsigned m_firstDayOfWeek; | 89 unsigned m_firstDayOfWeek; |
95 #endif | |
96 bool m_didInitializeNumberData; | 90 bool m_didInitializeNumberData; |
97 bool m_defaultsForLocale; | 91 bool m_defaultsForLocale; |
98 }; | 92 }; |
99 | 93 |
100 } // namespace WebCore | 94 } // namespace WebCore |
101 #endif | 95 #endif |
OLD | NEW |