| 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 26 matching lines...) Expand all Loading... |
| 37 #include <wtf/RefPtr.h> | 37 #include <wtf/RefPtr.h> |
| 38 #include <wtf/text/WTFString.h> | 38 #include <wtf/text/WTFString.h> |
| 39 | 39 |
| 40 namespace WebCore { | 40 namespace WebCore { |
| 41 | 41 |
| 42 class Document; | 42 class Document; |
| 43 class KURL; | 43 class KURL; |
| 44 class ResourceLoadTiming; | 44 class ResourceLoadTiming; |
| 45 class ResourceRequest; | 45 class ResourceRequest; |
| 46 class ResourceResponse; | 46 class ResourceResponse; |
| 47 class ResourceTimingInfo; |
| 47 | 48 |
| 48 class PerformanceResourceTiming : public PerformanceEntry { | 49 class PerformanceResourceTiming : public PerformanceEntry { |
| 49 public: | 50 public: |
| 50 static PassRefPtr<PerformanceResourceTiming> create(const AtomicString& init
iatorType, const ResourceRequest& request, const ResourceResponse& response, dou
ble initiationTime, double finishTime, Document* requestingDocument) | 51 static PassRefPtr<PerformanceResourceTiming> create(const ResourceTimingInfo
& info, Document* requestingDocument, double startTime, double lastRedirectEndTi
me, bool allowTimingFetch, bool allowTimingRedirect) |
| 51 { | 52 { |
| 52 return adoptRef(new PerformanceResourceTiming(initiatorType, request, re
sponse, initiationTime, finishTime, requestingDocument)); | 53 return adoptRef(new PerformanceResourceTiming(info, requestingDocument,
startTime, lastRedirectEndTime, allowTimingFetch, allowTimingRedirect)); |
| 54 } |
| 55 |
| 56 static PassRefPtr<PerformanceResourceTiming> create(const ResourceTimingInfo
& info, Document* requestingDocument, double startTime, bool allowTimingFetch) |
| 57 { |
| 58 return adoptRef(new PerformanceResourceTiming(info, requestingDocument,
startTime, 0.0, allowTimingFetch, false)); |
| 53 } | 59 } |
| 54 | 60 |
| 55 AtomicString initiatorType() const; | 61 AtomicString initiatorType() const; |
| 56 | 62 |
| 57 double redirectStart() const; | 63 double redirectStart() const; |
| 58 double redirectEnd() const; | 64 double redirectEnd() const; |
| 59 double fetchStart() const; | 65 double fetchStart() const; |
| 60 double domainLookupStart() const; | 66 double domainLookupStart() const; |
| 61 double domainLookupEnd() const; | 67 double domainLookupEnd() const; |
| 62 double connectStart() const; | 68 double connectStart() const; |
| 63 double connectEnd() const; | 69 double connectEnd() const; |
| 64 double secureConnectionStart() const; | 70 double secureConnectionStart() const; |
| 65 double requestStart() const; | 71 double requestStart() const; |
| 66 double responseStart() const; | 72 double responseStart() const; |
| 67 double responseEnd() const; | 73 double responseEnd() const; |
| 68 | 74 |
| 69 virtual bool isResource() { return true; } | 75 virtual bool isResource() { return true; } |
| 70 | 76 |
| 71 private: | 77 private: |
| 72 PerformanceResourceTiming(const AtomicString& initatorType, const ResourceRe
quest&, const ResourceResponse&, double initiationTime, double finishTime, Docum
ent*); | 78 PerformanceResourceTiming(const ResourceTimingInfo&, Document* requestingDoc
ument, double startTime, double lastRedirectEndTime, bool allowTimingFetch, bool
allowTimingRedirect); |
| 73 ~PerformanceResourceTiming(); | 79 ~PerformanceResourceTiming(); |
| 74 | 80 |
| 75 AtomicString m_initiatorType; | 81 AtomicString m_initiatorType; |
| 76 RefPtr<ResourceLoadTiming> m_timing; | 82 RefPtr<ResourceLoadTiming> m_timing; |
| 83 double m_lastRedirectEndTime; |
| 77 double m_finishTime; | 84 double m_finishTime; |
| 78 bool m_didReuseConnection; | 85 bool m_didReuseConnection; |
| 79 bool m_shouldReportDetails; | 86 bool m_allowTimingFetch; |
| 87 bool m_allowTimingRedirect; |
| 80 RefPtr<Document> m_requestingDocument; | 88 RefPtr<Document> m_requestingDocument; |
| 81 }; | 89 }; |
| 82 | 90 |
| 83 } | 91 } |
| 84 | 92 |
| 85 #endif // !defined(PerformanceResourceTiming_h) | 93 #endif // !defined(PerformanceResourceTiming_h) |
| OLD | NEW |