| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 const AtomicString& interfaceName() const override; | 68 const AtomicString& interfaceName() const override; |
| 69 | 69 |
| 70 virtual PerformanceTiming* timing() const; | 70 virtual PerformanceTiming* timing() const; |
| 71 | 71 |
| 72 virtual void updateLongTaskInstrumentation() {} | 72 virtual void updateLongTaskInstrumentation() {} |
| 73 | 73 |
| 74 // Reduce the resolution to 5µs to prevent timing attacks. See: | 74 // Reduce the resolution to 5µs to prevent timing attacks. See: |
| 75 // http://www.w3.org/TR/hr-time-2/#privacy-security | 75 // http://www.w3.org/TR/hr-time-2/#privacy-security |
| 76 static double clampTimeResolution(double timeSeconds); | 76 static double clampTimeResolution(double timeSeconds); |
| 77 | 77 |
| 78 // monotonicTime needs to be no smaller than timeOrigin. |
| 78 static DOMHighResTimeStamp monotonicTimeToDOMHighResTimeStamp( | 79 static DOMHighResTimeStamp monotonicTimeToDOMHighResTimeStamp( |
| 79 double timeOrigin, | 80 double timeOrigin, |
| 80 double monotonicTime); | 81 double monotonicTime); |
| 81 | 82 |
| 82 // Translate given platform monotonic time in seconds into a high resolution | 83 // Translate given platform monotonic time in seconds into a high resolution |
| 83 // DOMHighResTimeStamp in milliseconds. The result timestamp is relative to | 84 // DOMHighResTimeStamp in milliseconds. The result timestamp is relative to |
| 84 // document's time origin and has a time resolution that is safe for | 85 // document's time origin and has a time resolution that is safe for |
| 85 // exposing to web. | 86 // exposing to web. The monotonic time provided needs to be no smaller than |
| 87 // document's time origin. |
| 86 DOMHighResTimeStamp monotonicTimeToDOMHighResTimeStamp(double) const; | 88 DOMHighResTimeStamp monotonicTimeToDOMHighResTimeStamp(double) const; |
| 87 DOMHighResTimeStamp now() const; | 89 DOMHighResTimeStamp now() const; |
| 88 | 90 |
| 89 double timeOrigin() const { return m_timeOrigin; } | 91 double timeOrigin() const { return m_timeOrigin; } |
| 90 | 92 |
| 91 PerformanceEntryVector getEntries() const; | 93 PerformanceEntryVector getEntries() const; |
| 92 PerformanceEntryVector getEntriesByType(const String& entryType); | 94 PerformanceEntryVector getEntriesByType(const String& entryType); |
| 93 PerformanceEntryVector getEntriesByName(const String& name, | 95 PerformanceEntryVector getEntriesByName(const String& name, |
| 94 const String& entryType); | 96 const String& entryType); |
| 95 | 97 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 PerformanceEntryTypeMask m_observerFilterOptions; | 180 PerformanceEntryTypeMask m_observerFilterOptions; |
| 179 PerformanceObservers m_observers; | 181 PerformanceObservers m_observers; |
| 180 PerformanceObservers m_activeObservers; | 182 PerformanceObservers m_activeObservers; |
| 181 PerformanceObservers m_suspendedObservers; | 183 PerformanceObservers m_suspendedObservers; |
| 182 Timer<PerformanceBase> m_deliverObservationsTimer; | 184 Timer<PerformanceBase> m_deliverObservationsTimer; |
| 183 }; | 185 }; |
| 184 | 186 |
| 185 } // namespace blink | 187 } // namespace blink |
| 186 | 188 |
| 187 #endif // PerformanceBase_h | 189 #endif // PerformanceBase_h |
| OLD | NEW |