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 18 matching lines...) Expand all Loading... |
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 #include "config.h" | 32 #include "config.h" |
33 #include "core/page/PerformanceResourceTiming.h" | 33 #include "core/page/PerformanceResourceTiming.h" |
34 | 34 |
35 #include <wtf/Vector.h> | 35 #include <wtf/Vector.h> |
36 #include "core/dom/Document.h" | 36 #include "core/dom/Document.h" |
37 #include "core/loader/DocumentLoadTiming.h" | 37 #include "core/loader/DocumentLoadTiming.h" |
38 #include "core/loader/DocumentLoader.h" | 38 #include "core/loader/DocumentLoader.h" |
39 #include "core/platform/KURL.h" | |
40 #include "core/platform/network/ResourceRequest.h" | 39 #include "core/platform/network/ResourceRequest.h" |
41 #include "core/platform/network/ResourceResponse.h" | 40 #include "core/platform/network/ResourceResponse.h" |
42 #include "weborigin/SecurityOrigin.h" | 41 #include "weborigin/SecurityOrigin.h" |
43 | 42 |
44 namespace WebCore { | 43 namespace WebCore { |
45 | 44 |
46 static double monotonicTimeToDocumentMilliseconds(Document* document, double sec
onds) | 45 static double monotonicTimeToDocumentMilliseconds(Document* document, double sec
onds) |
47 { | 46 { |
48 ASSERT(seconds >= 0.0); | 47 ASSERT(seconds >= 0.0); |
49 return document->loader()->timing()->monotonicTimeToZeroBasedDocumentTime(se
conds) * 1000.0; | 48 return document->loader()->timing()->monotonicTimeToZeroBasedDocumentTime(se
conds) * 1000.0; |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 | 202 |
204 double PerformanceResourceTiming::responseEnd() const | 203 double PerformanceResourceTiming::responseEnd() const |
205 { | 204 { |
206 if (!m_finishTime) | 205 if (!m_finishTime) |
207 return responseStart(); | 206 return responseStart(); |
208 | 207 |
209 return monotonicTimeToDocumentMilliseconds(m_requestingDocument.get(), m_fin
ishTime); | 208 return monotonicTimeToDocumentMilliseconds(m_requestingDocument.get(), m_fin
ishTime); |
210 } | 209 } |
211 | 210 |
212 } // namespace WebCore | 211 } // namespace WebCore |
OLD | NEW |