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

Side by Side Diff: Source/core/page/PagePopupController.cpp

Issue 52553008: Eliminate the CALENDAR_PICKER compile time flag as only android uses this flag and the web facing p… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Fix winbot by eliminating last checks for CALENDAR_PICKER 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 m_popupClient->closePopup(); 67 m_popupClient->closePopup();
68 } 68 }
69 69
70 String PagePopupController::localizeNumberString(const String& numberString) 70 String PagePopupController::localizeNumberString(const String& numberString)
71 { 71 {
72 if (m_popupClient) 72 if (m_popupClient)
73 return m_popupClient->locale().convertToLocalizedNumber(numberString); 73 return m_popupClient->locale().convertToLocalizedNumber(numberString);
74 return numberString; 74 return numberString;
75 } 75 }
76 76
77 #if ENABLE(CALENDAR_PICKER)
78 String PagePopupController::formatMonth(int year, int zeroBaseMonth) 77 String PagePopupController::formatMonth(int year, int zeroBaseMonth)
79 { 78 {
80 if (!m_popupClient) 79 if (!m_popupClient)
81 return emptyString(); 80 return emptyString();
82 DateComponents date; 81 DateComponents date;
83 date.setMonthsSinceEpoch((year - 1970) * 12.0 + zeroBaseMonth); 82 date.setMonthsSinceEpoch((year - 1970) * 12.0 + zeroBaseMonth);
84 return m_popupClient->locale().formatDateTime(date, Locale::FormatTypeMedium ); 83 return m_popupClient->locale().formatDateTime(date, Locale::FormatTypeMedium );
85 } 84 }
86 85
87 String PagePopupController::formatShortMonth(int year, int zeroBaseMonth) 86 String PagePopupController::formatShortMonth(int year, int zeroBaseMonth)
88 { 87 {
89 if (!m_popupClient) 88 if (!m_popupClient)
90 return emptyString(); 89 return emptyString();
91 DateComponents date; 90 DateComponents date;
92 date.setMonthsSinceEpoch((year - 1970) * 12.0 + zeroBaseMonth); 91 date.setMonthsSinceEpoch((year - 1970) * 12.0 + zeroBaseMonth);
93 return m_popupClient->locale().formatDateTime(date, Locale::FormatTypeShort) ; 92 return m_popupClient->locale().formatDateTime(date, Locale::FormatTypeShort) ;
94 } 93 }
95 #endif
96 94
97 void PagePopupController::clearPagePopupClient() 95 void PagePopupController::clearPagePopupClient()
98 { 96 {
99 m_popupClient = 0; 97 m_popupClient = 0;
100 } 98 }
101 99
102 void PagePopupController::histogramEnumeration(const String& name, int sample, i nt boundaryValue) 100 void PagePopupController::histogramEnumeration(const String& name, int sample, i nt boundaryValue)
103 { 101 {
104 WebKit::Platform::current()->histogramEnumeration(name.utf8().data(), sample , boundaryValue); 102 WebKit::Platform::current()->histogramEnumeration(name.utf8().data(), sample , boundaryValue);
105 } 103 }
106 104
107 } 105 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698