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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
64 Render = 1 << 4, | 64 Render = 1 << 4, |
65 Resource = 1 << 5, | 65 Resource = 1 << 5, |
66 LongTask = 1 << 6, | 66 LongTask = 1 << 6, |
67 TaskAttribution = 1 << 7, | 67 TaskAttribution = 1 << 7, |
68 Paint = 1 << 8 | 68 Paint = 1 << 8 |
69 }; | 69 }; |
70 | 70 |
71 String name() const; | 71 String name() const; |
72 String entryType() const; | 72 String entryType() const; |
73 DOMHighResTimeStamp startTime() const; | 73 DOMHighResTimeStamp startTime() const; |
74 DOMHighResTimeStamp duration() const; | 74 // PerformanceNavigationTiming will override this due to |
75 // the nature of reporting it early, which means not having a | |
76 // finish time available at construction time. | |
panicker
2017/02/03 23:53:52
Add:
// Other classes must NOT override this.
sunjian
2017/02/10 18:32:46
Done.
| |
77 virtual DOMHighResTimeStamp duration() const; | |
75 | 78 |
76 ScriptValue toJSONForBinding(ScriptState*) const; | 79 ScriptValue toJSONForBinding(ScriptState*) const; |
77 | 80 |
78 PerformanceEntryType entryTypeEnum() const { return m_entryTypeEnum; } | 81 PerformanceEntryType entryTypeEnum() const { return m_entryTypeEnum; } |
79 | 82 |
80 bool isResource() const { return m_entryTypeEnum == Resource; } | 83 bool isResource() const { return m_entryTypeEnum == Resource; } |
81 bool isRender() const { return m_entryTypeEnum == Render; } | 84 bool isRender() const { return m_entryTypeEnum == Render; } |
82 bool isComposite() const { return m_entryTypeEnum == Composite; } | 85 bool isComposite() const { return m_entryTypeEnum == Composite; } |
83 bool isMark() const { return m_entryTypeEnum == Mark; } | 86 bool isMark() const { return m_entryTypeEnum == Mark; } |
84 bool isMeasure() const { return m_entryTypeEnum == Measure; } | 87 bool isMeasure() const { return m_entryTypeEnum == Measure; } |
(...skipping 18 matching lines...) Expand all Loading... | |
103 const String m_name; | 106 const String m_name; |
104 const String m_entryType; | 107 const String m_entryType; |
105 const double m_startTime; | 108 const double m_startTime; |
106 const double m_duration; | 109 const double m_duration; |
107 const PerformanceEntryType m_entryTypeEnum; | 110 const PerformanceEntryType m_entryTypeEnum; |
108 }; | 111 }; |
109 | 112 |
110 } // namespace blink | 113 } // namespace blink |
111 | 114 |
112 #endif // PerformanceEntry_h | 115 #endif // PerformanceEntry_h |
OLD | NEW |