OLD | NEW |
1 /* | 1 /* |
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) | 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) |
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) | 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) |
5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. |
6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ | 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ |
7 | 7 |
8 This library is free software; you can redistribute it and/or | 8 This library is free software; you can redistribute it and/or |
9 modify it under the terms of the GNU Library General Public | 9 modify it under the terms of the GNU Library General Public |
10 License as published by the Free Software Foundation; either | 10 License as published by the Free Software Foundation; either |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 #include "core/html/HTMLFrameOwnerElement.h" | 45 #include "core/html/HTMLFrameOwnerElement.h" |
46 #include "core/html/imports/HTMLImportsController.h" | 46 #include "core/html/imports/HTMLImportsController.h" |
47 #include "core/inspector/InspectorInstrumentation.h" | 47 #include "core/inspector/InspectorInstrumentation.h" |
48 #include "core/loader/DocumentLoader.h" | 48 #include "core/loader/DocumentLoader.h" |
49 #include "core/loader/FrameLoader.h" | 49 #include "core/loader/FrameLoader.h" |
50 #include "core/loader/FrameLoaderClient.h" | 50 #include "core/loader/FrameLoaderClient.h" |
51 #include "core/loader/PingLoader.h" | 51 #include "core/loader/PingLoader.h" |
52 #include "core/loader/SubstituteData.h" | 52 #include "core/loader/SubstituteData.h" |
53 #include "core/loader/UniqueIdentifier.h" | 53 #include "core/loader/UniqueIdentifier.h" |
54 #include "core/loader/appcache/ApplicationCacheHost.h" | 54 #include "core/loader/appcache/ApplicationCacheHost.h" |
55 #include "core/frame/DOMWindow.h" | 55 #include "core/frame/LocalDOMWindow.h" |
56 #include "core/frame/LocalFrame.h" | 56 #include "core/frame/LocalFrame.h" |
57 #include "core/frame/csp/ContentSecurityPolicy.h" | 57 #include "core/frame/csp/ContentSecurityPolicy.h" |
58 #include "core/timing/Performance.h" | 58 #include "core/timing/Performance.h" |
59 #include "core/timing/ResourceTimingInfo.h" | 59 #include "core/timing/ResourceTimingInfo.h" |
60 #include "core/frame/Settings.h" | 60 #include "core/frame/Settings.h" |
61 #include "core/svg/graphics/SVGImageChromeClient.h" | 61 #include "core/svg/graphics/SVGImageChromeClient.h" |
62 #include "platform/Logging.h" | 62 #include "platform/Logging.h" |
63 #include "platform/RuntimeEnabledFeatures.h" | 63 #include "platform/RuntimeEnabledFeatures.h" |
64 #include "platform/TraceEvent.h" | 64 #include "platform/TraceEvent.h" |
65 #include "platform/weborigin/SecurityOrigin.h" | 65 #include "platform/weborigin/SecurityOrigin.h" |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 info->setLoadFinishTime(resource->loadFinishTime()); | 175 info->setLoadFinishTime(resource->loadFinishTime()); |
176 } | 176 } |
177 } | 177 } |
178 | 178 |
179 static void reportResourceTiming(ResourceTimingInfo* info, Document* initiatorDo
cument, bool isMainResource) | 179 static void reportResourceTiming(ResourceTimingInfo* info, Document* initiatorDo
cument, bool isMainResource) |
180 { | 180 { |
181 if (initiatorDocument && isMainResource) | 181 if (initiatorDocument && isMainResource) |
182 initiatorDocument = initiatorDocument->parentDocument(); | 182 initiatorDocument = initiatorDocument->parentDocument(); |
183 if (!initiatorDocument || !initiatorDocument->loader()) | 183 if (!initiatorDocument || !initiatorDocument->loader()) |
184 return; | 184 return; |
185 if (DOMWindow* initiatorWindow = initiatorDocument->domWindow()) | 185 if (LocalDOMWindow* initiatorWindow = initiatorDocument->domWindow()) |
186 initiatorWindow->performance().addResourceTiming(*info, initiatorDocumen
t); | 186 initiatorWindow->performance().addResourceTiming(*info, initiatorDocumen
t); |
187 } | 187 } |
188 | 188 |
189 static ResourceRequest::TargetType requestTargetType(const ResourceFetcher* fetc
her, const ResourceRequest& request, Resource::Type type) | 189 static ResourceRequest::TargetType requestTargetType(const ResourceFetcher* fetc
her, const ResourceRequest& request, Resource::Type type) |
190 { | 190 { |
191 switch (type) { | 191 switch (type) { |
192 case Resource::MainResource: | 192 case Resource::MainResource: |
193 if (fetcher->frame()->tree().parent()) | 193 if (fetcher->frame()->tree().parent()) |
194 return ResourceRequest::TargetIsSubframe; | 194 return ResourceRequest::TargetIsSubframe; |
195 return ResourceRequest::TargetIsMainFrame; | 195 return ResourceRequest::TargetIsMainFrame; |
(...skipping 1284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1480 } | 1480 } |
1481 } | 1481 } |
1482 | 1482 |
1483 void ResourceFetcher::trace(Visitor* visitor) | 1483 void ResourceFetcher::trace(Visitor* visitor) |
1484 { | 1484 { |
1485 visitor->trace(m_document); | 1485 visitor->trace(m_document); |
1486 ResourceLoaderHost::trace(visitor); | 1486 ResourceLoaderHost::trace(visitor); |
1487 } | 1487 } |
1488 | 1488 |
1489 } | 1489 } |
OLD | NEW |