| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef DocumentParserTiming_h | 5 #ifndef DocumentParserTiming_h |
| 6 #define DocumentParserTiming_h | 6 #define DocumentParserTiming_h |
| 7 | 7 |
| 8 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
| 9 #include "platform/Supplementable.h" | 9 #include "platform/Supplementable.h" |
| 10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 return m_parserBlockedOnScriptLoadFromDocumentWriteDuration; | 83 return m_parserBlockedOnScriptLoadFromDocumentWriteDuration; |
| 84 } | 84 } |
| 85 | 85 |
| 86 // Returns the sum of all script execution durations reported via | 86 // Returns the sum of all script execution durations reported via |
| 87 // recordParseBlockedOnScriptExecutionDuration. | 87 // recordParseBlockedOnScriptExecutionDuration. |
| 88 double parserBlockedOnScriptExecutionDuration() const { | 88 double parserBlockedOnScriptExecutionDuration() const { |
| 89 return m_parserBlockedOnScriptExecutionDuration; | 89 return m_parserBlockedOnScriptExecutionDuration; |
| 90 } | 90 } |
| 91 | 91 |
| 92 // Returns the sum of all script execution durations due to | 92 // Returns the sum of all script execution durations due to |
| 93 // document.write reported via recordParseBlockedOnScriptExecutionDuration. No
te | 93 // document.write reported via recordParseBlockedOnScriptExecutionDuration. |
| 94 // that some uncommon cases are not currently covered by this method. See | 94 // Note that some uncommon cases are not currently covered by this method. See |
| 95 // crbug/600711 for details. | 95 // crbug/600711 for details. |
| 96 double parserBlockedOnScriptExecutionFromDocumentWriteDuration() const { | 96 double parserBlockedOnScriptExecutionFromDocumentWriteDuration() const { |
| 97 return m_parserBlockedOnScriptExecutionFromDocumentWriteDuration; | 97 return m_parserBlockedOnScriptExecutionFromDocumentWriteDuration; |
| 98 } | 98 } |
| 99 | 99 |
| 100 DECLARE_VIRTUAL_TRACE(); | 100 DECLARE_VIRTUAL_TRACE(); |
| 101 | 101 |
| 102 private: | 102 private: |
| 103 explicit DocumentParserTiming(Document&); | 103 explicit DocumentParserTiming(Document&); |
| 104 void notifyDocumentParserTimingChanged(); | 104 void notifyDocumentParserTimingChanged(); |
| 105 | 105 |
| 106 double m_parserStart = 0.0; | 106 double m_parserStart = 0.0; |
| 107 double m_parserStop = 0.0; | 107 double m_parserStop = 0.0; |
| 108 double m_parserBlockedOnScriptLoadDuration = 0.0; | 108 double m_parserBlockedOnScriptLoadDuration = 0.0; |
| 109 double m_parserBlockedOnScriptLoadFromDocumentWriteDuration = 0.0; | 109 double m_parserBlockedOnScriptLoadFromDocumentWriteDuration = 0.0; |
| 110 double m_parserBlockedOnScriptExecutionDuration = 0.0; | 110 double m_parserBlockedOnScriptExecutionDuration = 0.0; |
| 111 double m_parserBlockedOnScriptExecutionFromDocumentWriteDuration = 0.0; | 111 double m_parserBlockedOnScriptExecutionFromDocumentWriteDuration = 0.0; |
| 112 bool m_parserDetached = false; | 112 bool m_parserDetached = false; |
| 113 | 113 |
| 114 Member<Document> m_document; | 114 Member<Document> m_document; |
| 115 }; | 115 }; |
| 116 | 116 |
| 117 } // namespace blink | 117 } // namespace blink |
| 118 | 118 |
| 119 #endif | 119 #endif |
| OLD | NEW |