OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * Copyright (C) 2012 Intel Inc. All rights reserved. | 3 * Copyright (C) 2012 Intel Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 virtual PerformanceTiming* timing() const; | 69 virtual PerformanceTiming* timing() const; |
70 | 70 |
71 virtual void UpdateLongTaskInstrumentation() {} | 71 virtual void UpdateLongTaskInstrumentation() {} |
72 | 72 |
73 // Reduce the resolution to 5µs to prevent timing attacks. See: | 73 // Reduce the resolution to 5µs to prevent timing attacks. See: |
74 // http://www.w3.org/TR/hr-time-2/#privacy-security | 74 // http://www.w3.org/TR/hr-time-2/#privacy-security |
75 static double ClampTimeResolution(double time_seconds); | 75 static double ClampTimeResolution(double time_seconds); |
76 | 76 |
77 static DOMHighResTimeStamp MonotonicTimeToDOMHighResTimeStamp( | 77 static DOMHighResTimeStamp MonotonicTimeToDOMHighResTimeStamp( |
78 double time_origin, | 78 double time_origin, |
79 double monotonic_time); | 79 double monotonic_time, |
| 80 bool allow_negative_value); |
80 | 81 |
81 // Translate given platform monotonic time in seconds into a high resolution | 82 // Translate given platform monotonic time in seconds into a high resolution |
82 // DOMHighResTimeStamp in milliseconds. The result timestamp is relative to | 83 // DOMHighResTimeStamp in milliseconds. The result timestamp is relative to |
83 // document's time origin and has a time resolution that is safe for | 84 // document's time origin and has a time resolution that is safe for |
84 // exposing to web. | 85 // exposing to web. |
85 DOMHighResTimeStamp MonotonicTimeToDOMHighResTimeStamp(double) const; | 86 DOMHighResTimeStamp MonotonicTimeToDOMHighResTimeStamp(double) const; |
86 DOMHighResTimeStamp now() const; | 87 DOMHighResTimeStamp now() const; |
87 | 88 |
88 double TimeOrigin() const { return time_origin_; } | 89 double TimeOrigin() const { return time_origin_; } |
89 | 90 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 PerformanceEntryTypeMask observer_filter_options_; | 180 PerformanceEntryTypeMask observer_filter_options_; |
180 PerformanceObservers observers_; | 181 PerformanceObservers observers_; |
181 PerformanceObservers active_observers_; | 182 PerformanceObservers active_observers_; |
182 PerformanceObservers suspended_observers_; | 183 PerformanceObservers suspended_observers_; |
183 TaskRunnerTimer<PerformanceBase> deliver_observations_timer_; | 184 TaskRunnerTimer<PerformanceBase> deliver_observations_timer_; |
184 }; | 185 }; |
185 | 186 |
186 } // namespace blink | 187 } // namespace blink |
187 | 188 |
188 #endif // PerformanceBase_h | 189 #endif // PerformanceBase_h |
OLD | NEW |