| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 16 matching lines...) Expand all Loading... |
| 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 30 */ | 30 */ |
| 31 | 31 |
| 32 #ifndef PerformanceEntry_h | 32 #ifndef PerformanceEntry_h |
| 33 #define PerformanceEntry_h | 33 #define PerformanceEntry_h |
| 34 | 34 |
| 35 #include "bindings/core/v8/ScriptWrappable.h" | 35 #include "bindings/core/v8/ScriptWrappable.h" |
| 36 #include "core/CoreExport.h" | 36 #include "core/CoreExport.h" |
| 37 #include "core/dom/DOMHighResTimeStamp.h" |
| 37 #include "platform/heap/Handle.h" | 38 #include "platform/heap/Handle.h" |
| 38 #include "wtf/text/WTFString.h" | 39 #include "wtf/text/WTFString.h" |
| 39 | 40 |
| 40 namespace blink { | 41 namespace blink { |
| 41 | 42 |
| 42 class ScriptState; | 43 class ScriptState; |
| 43 class ScriptValue; | 44 class ScriptValue; |
| 44 class V8ObjectBuilder; | 45 class V8ObjectBuilder; |
| 45 | 46 |
| 46 using PerformanceEntryType = unsigned char; | 47 using PerformanceEntryType = unsigned char; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 61 Mark = 1 << 2, | 62 Mark = 1 << 2, |
| 62 Measure = 1 << 3, | 63 Measure = 1 << 3, |
| 63 Render = 1 << 4, | 64 Render = 1 << 4, |
| 64 Resource = 1 << 5, | 65 Resource = 1 << 5, |
| 65 LongTask = 1 << 6, | 66 LongTask = 1 << 6, |
| 66 TaskAttribution = 1 << 7, | 67 TaskAttribution = 1 << 7, |
| 67 }; | 68 }; |
| 68 | 69 |
| 69 String name() const; | 70 String name() const; |
| 70 String entryType() const; | 71 String entryType() const; |
| 71 double startTime() const; | 72 DOMHighResTimeStamp startTime() const; |
| 72 double duration() const; | 73 DOMHighResTimeStamp duration() const; |
| 73 | 74 |
| 74 ScriptValue toJSONForBinding(ScriptState*) const; | 75 ScriptValue toJSONForBinding(ScriptState*) const; |
| 75 | 76 |
| 76 PerformanceEntryType entryTypeEnum() const { return m_entryTypeEnum; } | 77 PerformanceEntryType entryTypeEnum() const { return m_entryTypeEnum; } |
| 77 | 78 |
| 78 bool isResource() const { return m_entryTypeEnum == Resource; } | 79 bool isResource() const { return m_entryTypeEnum == Resource; } |
| 79 bool isRender() const { return m_entryTypeEnum == Render; } | 80 bool isRender() const { return m_entryTypeEnum == Render; } |
| 80 bool isComposite() const { return m_entryTypeEnum == Composite; } | 81 bool isComposite() const { return m_entryTypeEnum == Composite; } |
| 81 bool isMark() const { return m_entryTypeEnum == Mark; } | 82 bool isMark() const { return m_entryTypeEnum == Mark; } |
| 82 bool isMeasure() const { return m_entryTypeEnum == Measure; } | 83 bool isMeasure() const { return m_entryTypeEnum == Measure; } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 101 const String m_name; | 102 const String m_name; |
| 102 const String m_entryType; | 103 const String m_entryType; |
| 103 const double m_startTime; | 104 const double m_startTime; |
| 104 const double m_duration; | 105 const double m_duration; |
| 105 const PerformanceEntryType m_entryTypeEnum; | 106 const PerformanceEntryType m_entryTypeEnum; |
| 106 }; | 107 }; |
| 107 | 108 |
| 108 } // namespace blink | 109 } // namespace blink |
| 109 | 110 |
| 110 #endif // PerformanceEntry_h | 111 #endif // PerformanceEntry_h |
| OLD | NEW |