OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 #include "core/frame/UseCounter.h" | 47 #include "core/frame/UseCounter.h" |
48 #include "core/html/HTMLFrameOwnerElement.h" | 48 #include "core/html/HTMLFrameOwnerElement.h" |
49 #include "core/html/imports/HTMLImportsController.h" | 49 #include "core/html/imports/HTMLImportsController.h" |
50 #include "core/inspector/ConsoleMessage.h" | 50 #include "core/inspector/ConsoleMessage.h" |
51 #include "core/inspector/IdentifiersFactory.h" | 51 #include "core/inspector/IdentifiersFactory.h" |
52 #include "core/inspector/InspectorTraceEvents.h" | 52 #include "core/inspector/InspectorTraceEvents.h" |
53 #include "core/loader/DocumentLoader.h" | 53 #include "core/loader/DocumentLoader.h" |
54 #include "core/loader/FrameLoader.h" | 54 #include "core/loader/FrameLoader.h" |
55 #include "core/loader/MixedContentChecker.h" | 55 #include "core/loader/MixedContentChecker.h" |
56 #include "core/loader/NetworkHintsInterface.h" | 56 #include "core/loader/NetworkHintsInterface.h" |
| 57 #include "core/loader/NetworkQuietDetector.h" |
57 #include "core/loader/PingLoader.h" | 58 #include "core/loader/PingLoader.h" |
58 #include "core/loader/ProgressTracker.h" | 59 #include "core/loader/ProgressTracker.h" |
59 #include "core/loader/SubresourceFilter.h" | 60 #include "core/loader/SubresourceFilter.h" |
60 #include "core/loader/appcache/ApplicationCacheHost.h" | 61 #include "core/loader/appcache/ApplicationCacheHost.h" |
61 #include "core/loader/private/FrameClientHintsPreferencesContext.h" | 62 #include "core/loader/private/FrameClientHintsPreferencesContext.h" |
62 #include "core/page/Page.h" | 63 #include "core/page/Page.h" |
63 #include "core/paint/FirstMeaningfulPaintDetector.h" | 64 #include "core/paint/FirstMeaningfulPaintDetector.h" |
64 #include "core/probe/CoreProbes.h" | 65 #include "core/probe/CoreProbes.h" |
65 #include "core/svg/graphics/SVGImageChromeClient.h" | 66 #include "core/svg/graphics/SVGImageChromeClient.h" |
66 #include "core/timing/DOMWindowPerformance.h" | 67 #include "core/timing/DOMWindowPerformance.h" |
67 #include "core/timing/Performance.h" | 68 #include "core/timing/Performance.h" |
68 #include "core/timing/PerformanceBase.h" | 69 #include "core/timing/PerformanceBase.h" |
69 #include "platform/WebFrameScheduler.h" | 70 #include "platform/WebFrameScheduler.h" |
70 #include "platform/exported/WrappedResourceRequest.h" | 71 #include "platform/exported/WrappedResourceRequest.h" |
| 72 #include "platform/instrumentation/resource_coordinator/FrameResourceCoordinator
.h" |
71 #include "platform/instrumentation/tracing/TracedValue.h" | 73 #include "platform/instrumentation/tracing/TracedValue.h" |
72 #include "platform/loader/fetch/ClientHintsPreferences.h" | 74 #include "platform/loader/fetch/ClientHintsPreferences.h" |
73 #include "platform/loader/fetch/FetchInitiatorTypeNames.h" | 75 #include "platform/loader/fetch/FetchInitiatorTypeNames.h" |
74 #include "platform/loader/fetch/Resource.h" | 76 #include "platform/loader/fetch/Resource.h" |
75 #include "platform/loader/fetch/ResourceLoadPriority.h" | 77 #include "platform/loader/fetch/ResourceLoadPriority.h" |
76 #include "platform/loader/fetch/ResourceLoadingLog.h" | 78 #include "platform/loader/fetch/ResourceLoadingLog.h" |
77 #include "platform/loader/fetch/ResourceTimingInfo.h" | 79 #include "platform/loader/fetch/ResourceTimingInfo.h" |
78 #include "platform/loader/fetch/UniqueIdentifier.h" | 80 #include "platform/loader/fetch/UniqueIdentifier.h" |
79 #include "platform/mhtml/MHTMLArchive.h" | 81 #include "platform/mhtml/MHTMLArchive.h" |
80 #include "platform/scheduler/child/web_scheduler.h" | 82 #include "platform/scheduler/child/web_scheduler.h" |
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 argv.push_back(Resource::ResourceTypeToString(type, fetch_initiator_name)); | 591 argv.push_back(Resource::ResourceTypeToString(type, fetch_initiator_name)); |
590 argv.push_back(request.Url()); | 592 argv.push_back(request.Url()); |
591 activity_logger->LogEvent("blinkRequestResource", argv.size(), argv.data()); | 593 activity_logger->LogEvent("blinkRequestResource", argv.size(), argv.data()); |
592 } | 594 } |
593 } | 595 } |
594 | 596 |
595 void FrameFetchContext::DidLoadResource(Resource* resource) { | 597 void FrameFetchContext::DidLoadResource(Resource* resource) { |
596 if (!document_) | 598 if (!document_) |
597 return; | 599 return; |
598 FirstMeaningfulPaintDetector::From(*document_).CheckNetworkStable(); | 600 FirstMeaningfulPaintDetector::From(*document_).CheckNetworkStable(); |
| 601 if (FrameResourceCoordinator::IsEnabled()) { |
| 602 NetworkQuietDetector::From(*document_).CheckNetworkStable(); |
| 603 } |
599 if (resource->IsLoadEventBlockingResourceType()) | 604 if (resource->IsLoadEventBlockingResourceType()) |
600 document_->CheckCompleted(); | 605 document_->CheckCompleted(); |
601 } | 606 } |
602 | 607 |
603 void FrameFetchContext::AddResourceTiming(const ResourceTimingInfo& info) { | 608 void FrameFetchContext::AddResourceTiming(const ResourceTimingInfo& info) { |
604 Document* initiator_document = document_ && info.IsMainResource() | 609 Document* initiator_document = document_ && info.IsMainResource() |
605 ? document_->ParentDocument() | 610 ? document_->ParentDocument() |
606 : document_.Get(); | 611 : document_.Get(); |
607 if (!initiator_document || !initiator_document->domWindow()) | 612 if (!initiator_document || !initiator_document->domWindow()) |
608 return; | 613 return; |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1107 } | 1112 } |
1108 | 1113 |
1109 DEFINE_TRACE(FrameFetchContext) { | 1114 DEFINE_TRACE(FrameFetchContext) { |
1110 visitor->Trace(document_loader_); | 1115 visitor->Trace(document_loader_); |
1111 visitor->Trace(document_); | 1116 visitor->Trace(document_); |
1112 visitor->Trace(frozen_state_); | 1117 visitor->Trace(frozen_state_); |
1113 BaseFetchContext::Trace(visitor); | 1118 BaseFetchContext::Trace(visitor); |
1114 } | 1119 } |
1115 | 1120 |
1116 } // namespace blink | 1121 } // namespace blink |
OLD | NEW |