| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 WEBKIT_PLUGINS_PPAPI_TIME_CONVERSION_H_ | 5 #ifndef PPAPI_SHARED_IMPL_TIME_CONVERSION_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_TIME_CONVERSION_H_ | 6 #define PPAPI_SHARED_IMPL_TIME_CONVERSION_H_ |
| 7 | 7 |
| 8 #include "base/time.h" | 8 #include "base/time.h" |
| 9 #include "ppapi/c/pp_time.h" | 9 #include "ppapi/c/pp_time.h" |
| 10 | 10 |
| 11 namespace webkit { | |
| 12 namespace ppapi { | 11 namespace ppapi { |
| 13 | 12 |
| 14 PP_Time TimeToPPTime(base::Time t); | 13 PP_Time TimeToPPTime(base::Time t); |
| 15 base::Time PPTimeToTime(PP_Time t); | 14 base::Time PPTimeToTime(PP_Time t); |
| 16 | 15 |
| 17 PP_TimeTicks TimeTicksToPPTimeTicks(base::TimeTicks t); | 16 PP_TimeTicks TimeTicksToPPTimeTicks(base::TimeTicks t); |
| 18 | 17 |
| 19 // Converts between WebKit event times and time ticks. WebKit event times are | 18 // Converts between WebKit event times and time ticks. WebKit event times are |
| 20 // currently expressed in terms of wall clock time. This function does the | 19 // currently expressed in terms of wall clock time. This function does the |
| 21 // proper mapping to time ticks, assuming the wall clock time doesn't change | 20 // proper mapping to time ticks, assuming the wall clock time doesn't change |
| 22 // (which isn't necessarily the case). | 21 // (which isn't necessarily the case). |
| 23 PP_TimeTicks EventTimeToPPTimeTicks(double event_time); | 22 PP_TimeTicks EventTimeToPPTimeTicks(double event_time); |
| 24 double PPTimeTicksToEventTime(PP_TimeTicks t); | 23 double PPTimeTicksToEventTime(PP_TimeTicks t); |
| 25 | 24 |
| 26 } // namespace ppapi | 25 } // namespace ppapi |
| 27 } // namespace webkit | |
| 28 | 26 |
| 29 #endif // WEBKIT_PLUGINS_PPAPI_TIME_CONVERSION_H_ | 27 #endif // PPAPI_SHARED_IMPL_TIME_CONVERSION_H_ |
| OLD | NEW |