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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
53 #include "core/html/imports/HTMLImportsController.h" | 53 #include "core/html/imports/HTMLImportsController.h" |
54 #include "core/inspector/ConsoleMessage.h" | 54 #include "core/inspector/ConsoleMessage.h" |
55 #include "core/inspector/InspectorInstrumentation.h" | 55 #include "core/inspector/InspectorInstrumentation.h" |
56 #include "core/loader/DocumentLoader.h" | 56 #include "core/loader/DocumentLoader.h" |
57 #include "core/loader/FrameLoader.h" | 57 #include "core/loader/FrameLoader.h" |
58 #include "core/loader/FrameLoaderClient.h" | 58 #include "core/loader/FrameLoaderClient.h" |
59 #include "core/loader/PingLoader.h" | 59 #include "core/loader/PingLoader.h" |
60 #include "core/loader/SubstituteData.h" | 60 #include "core/loader/SubstituteData.h" |
61 #include "core/loader/UniqueIdentifier.h" | 61 #include "core/loader/UniqueIdentifier.h" |
62 #include "core/loader/appcache/ApplicationCacheHost.h" | 62 #include "core/loader/appcache/ApplicationCacheHost.h" |
63 #include "core/timing/DOMWindowPerformance.h" | |
63 #include "core/timing/Performance.h" | 64 #include "core/timing/Performance.h" |
64 #include "core/timing/ResourceTimingInfo.h" | 65 #include "core/timing/ResourceTimingInfo.h" |
65 #include "core/svg/graphics/SVGImageChromeClient.h" | 66 #include "core/svg/graphics/SVGImageChromeClient.h" |
66 #include "platform/Logging.h" | 67 #include "platform/Logging.h" |
67 #include "platform/RuntimeEnabledFeatures.h" | 68 #include "platform/RuntimeEnabledFeatures.h" |
68 #include "platform/TraceEvent.h" | 69 #include "platform/TraceEvent.h" |
69 #include "platform/weborigin/KnownPorts.h" | 70 #include "platform/weborigin/KnownPorts.h" |
70 #include "platform/weborigin/SchemeRegistry.h" | 71 #include "platform/weborigin/SchemeRegistry.h" |
71 #include "platform/weborigin/SecurityOrigin.h" | 72 #include "platform/weborigin/SecurityOrigin.h" |
72 #include "platform/weborigin/SecurityPolicy.h" | 73 #include "platform/weborigin/SecurityPolicy.h" |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
191 info->setLoadFinishTime(resource->loadFinishTime()); | 192 info->setLoadFinishTime(resource->loadFinishTime()); |
192 } | 193 } |
193 } | 194 } |
194 | 195 |
195 static void reportResourceTiming(ResourceTimingInfo* info, Document* initiatorDo cument, bool isMainResource) | 196 static void reportResourceTiming(ResourceTimingInfo* info, Document* initiatorDo cument, bool isMainResource) |
196 { | 197 { |
197 if (initiatorDocument && isMainResource) | 198 if (initiatorDocument && isMainResource) |
198 initiatorDocument = initiatorDocument->parentDocument(); | 199 initiatorDocument = initiatorDocument->parentDocument(); |
199 if (!initiatorDocument || !initiatorDocument->loader()) | 200 if (!initiatorDocument || !initiatorDocument->loader()) |
200 return; | 201 return; |
201 if (LocalDOMWindow* initiatorWindow = initiatorDocument->domWindow()) | 202 if (LocalDOMWindow* initiatorWindow = initiatorDocument->domWindow()) { |
202 initiatorWindow->performance()->addResourceTiming(*info, initiatorDocume nt); | 203 DOMWindowPerformance::performance(*initiatorWindow)->addResourceTiming(* info, initiatorDocument); |
204 } | |
Mike West
2015/02/12 18:52:44
Nit: You don't need {} for single-line clauses.
| |
203 } | 205 } |
204 | 206 |
205 static WebURLRequest::RequestContext requestContextFromType(const ResourceFetche r* fetcher, Resource::Type type) | 207 static WebURLRequest::RequestContext requestContextFromType(const ResourceFetche r* fetcher, Resource::Type type) |
206 { | 208 { |
207 switch (type) { | 209 switch (type) { |
208 case Resource::MainResource: | 210 case Resource::MainResource: |
209 if (fetcher->frame()->tree().parent()) | 211 if (fetcher->frame()->tree().parent()) |
210 return WebURLRequest::RequestContextIframe; | 212 return WebURLRequest::RequestContextIframe; |
211 // FIXME: Change this to a context frame type (once we introduce them): http://fetch.spec.whatwg.org/#concept-request-context-frame-type | 213 // FIXME: Change this to a context frame type (once we introduce them): http://fetch.spec.whatwg.org/#concept-request-context-frame-type |
212 return WebURLRequest::RequestContextHyperlink; | 214 return WebURLRequest::RequestContextHyperlink; |
(...skipping 1401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1614 ResourceLoaderHost::trace(visitor); | 1616 ResourceLoaderHost::trace(visitor); |
1615 } | 1617 } |
1616 | 1618 |
1617 ResourceFetcher* ResourceFetcher::toResourceFetcher(ResourceLoaderHost* host) | 1619 ResourceFetcher* ResourceFetcher::toResourceFetcher(ResourceLoaderHost* host) |
1618 { | 1620 { |
1619 ASSERT(host->objectType() == ResourceLoaderHost::ResourceFetcherType); | 1621 ASSERT(host->objectType() == ResourceLoaderHost::ResourceFetcherType); |
1620 return static_cast<ResourceFetcher*>(host); | 1622 return static_cast<ResourceFetcher*>(host); |
1621 } | 1623 } |
1622 | 1624 |
1623 } | 1625 } |
OLD | NEW |