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" |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 argv.push_back(Resource::ResourceTypeToString(type, fetch_initiator_name)); | 495 argv.push_back(Resource::ResourceTypeToString(type, fetch_initiator_name)); |
495 argv.push_back(request.Url()); | 496 argv.push_back(request.Url()); |
496 activity_logger->LogEvent("blinkRequestResource", argv.size(), argv.data()); | 497 activity_logger->LogEvent("blinkRequestResource", argv.size(), argv.data()); |
497 } | 498 } |
498 } | 499 } |
499 | 500 |
500 void FrameFetchContext::DidLoadResource(Resource* resource) { | 501 void FrameFetchContext::DidLoadResource(Resource* resource) { |
501 if (!GetDocument()) | 502 if (!GetDocument()) |
502 return; | 503 return; |
503 FirstMeaningfulPaintDetector::From(*GetDocument()).CheckNetworkStable(); | 504 FirstMeaningfulPaintDetector::From(*GetDocument()).CheckNetworkStable(); |
| 505 NetworkQuietDetector::From(*GetDocument()).CheckNetworkStable(); |
504 if (resource->IsLoadEventBlockingResourceType()) | 506 if (resource->IsLoadEventBlockingResourceType()) |
505 GetDocument()->CheckCompleted(); | 507 GetDocument()->CheckCompleted(); |
506 } | 508 } |
507 | 509 |
508 void FrameFetchContext::AddResourceTiming(const ResourceTimingInfo& info) { | 510 void FrameFetchContext::AddResourceTiming(const ResourceTimingInfo& info) { |
509 Document* initiator_document = GetDocument() && info.IsMainResource() | 511 Document* initiator_document = GetDocument() && info.IsMainResource() |
510 ? GetDocument()->ParentDocument() | 512 ? GetDocument()->ParentDocument() |
511 : GetDocument(); | 513 : GetDocument(); |
512 if (!initiator_document || !initiator_document->domWindow()) | 514 if (!initiator_document || !initiator_document->domWindow()) |
513 return; | 515 return; |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
852 document_ = nullptr; | 854 document_ = nullptr; |
853 } | 855 } |
854 | 856 |
855 DEFINE_TRACE(FrameFetchContext) { | 857 DEFINE_TRACE(FrameFetchContext) { |
856 visitor->Trace(document_loader_); | 858 visitor->Trace(document_loader_); |
857 visitor->Trace(document_); | 859 visitor->Trace(document_); |
858 BaseFetchContext::Trace(visitor); | 860 BaseFetchContext::Trace(visitor); |
859 } | 861 } |
860 | 862 |
861 } // namespace blink | 863 } // namespace blink |
OLD | NEW |