| 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. |
| 77 // Other classes must NOT override this. |
| 78 virtual DOMHighResTimeStamp duration() const; |
| 75 | 79 |
| 76 ScriptValue toJSONForBinding(ScriptState*) const; | 80 ScriptValue toJSONForBinding(ScriptState*) const; |
| 77 | 81 |
| 78 PerformanceEntryType entryTypeEnum() const { return m_entryTypeEnum; } | 82 PerformanceEntryType entryTypeEnum() const { return m_entryTypeEnum; } |
| 79 | 83 |
| 80 bool isResource() const { return m_entryTypeEnum == Resource; } | 84 bool isResource() const { return m_entryTypeEnum == Resource; } |
| 81 bool isRender() const { return m_entryTypeEnum == Render; } | 85 bool isRender() const { return m_entryTypeEnum == Render; } |
| 82 bool isComposite() const { return m_entryTypeEnum == Composite; } | 86 bool isComposite() const { return m_entryTypeEnum == Composite; } |
| 83 bool isMark() const { return m_entryTypeEnum == Mark; } | 87 bool isMark() const { return m_entryTypeEnum == Mark; } |
| 84 bool isMeasure() const { return m_entryTypeEnum == Measure; } | 88 bool isMeasure() const { return m_entryTypeEnum == Measure; } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 103 const String m_name; | 107 const String m_name; |
| 104 const String m_entryType; | 108 const String m_entryType; |
| 105 const double m_startTime; | 109 const double m_startTime; |
| 106 const double m_duration; | 110 const double m_duration; |
| 107 const PerformanceEntryType m_entryTypeEnum; | 111 const PerformanceEntryType m_entryTypeEnum; |
| 108 }; | 112 }; |
| 109 | 113 |
| 110 } // namespace blink | 114 } // namespace blink |
| 111 | 115 |
| 112 #endif // PerformanceEntry_h | 116 #endif // PerformanceEntry_h |
| OLD | NEW |