| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Intel Inc. All rights reserved. | 2 * Copyright (C) 2012 Intel 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef PerformanceMeasure_h | 26 #ifndef PerformanceMeasure_h |
| 27 #define PerformanceMeasure_h | 27 #define PerformanceMeasure_h |
| 28 | 28 |
| 29 #include "core/timing/PerformanceEntry.h" | 29 #include "core/timing/PerformanceEntry.h" |
| 30 #include "platform/heap/Handle.h" | 30 #include "platform/heap/Handle.h" |
| 31 #include "wtf/PassRefPtr.h" | 31 #include "platform/wtf/PassRefPtr.h" |
| 32 #include "wtf/text/WTFString.h" | 32 #include "platform/wtf/text/WTFString.h" |
| 33 | 33 |
| 34 namespace blink { | 34 namespace blink { |
| 35 | 35 |
| 36 class PerformanceMeasure final : public PerformanceEntry { | 36 class PerformanceMeasure final : public PerformanceEntry { |
| 37 DEFINE_WRAPPERTYPEINFO(); | 37 DEFINE_WRAPPERTYPEINFO(); |
| 38 | 38 |
| 39 public: | 39 public: |
| 40 static PerformanceMeasure* Create(const String& name, | 40 static PerformanceMeasure* Create(const String& name, |
| 41 double start_time, | 41 double start_time, |
| 42 double end_time) { | 42 double end_time) { |
| 43 return new PerformanceMeasure(name, start_time, end_time); | 43 return new PerformanceMeasure(name, start_time, end_time); |
| 44 } | 44 } |
| 45 | 45 |
| 46 DEFINE_INLINE_VIRTUAL_TRACE() { PerformanceEntry::Trace(visitor); } | 46 DEFINE_INLINE_VIRTUAL_TRACE() { PerformanceEntry::Trace(visitor); } |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 PerformanceMeasure(const String& name, double start_time, double end_time) | 49 PerformanceMeasure(const String& name, double start_time, double end_time) |
| 50 : PerformanceEntry(name, "measure", start_time, end_time) {} | 50 : PerformanceEntry(name, "measure", start_time, end_time) {} |
| 51 ~PerformanceMeasure() override {} | 51 ~PerformanceMeasure() override {} |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 } // namespace blink | 54 } // namespace blink |
| 55 | 55 |
| 56 #endif // PerformanceMeasure_h | 56 #endif // PerformanceMeasure_h |
| OLD | NEW |