| 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 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 | 606 |
| 607 if (activity_logger) { | 607 if (activity_logger) { |
| 608 Vector<String> argv; | 608 Vector<String> argv; |
| 609 argv.push_back(Resource::ResourceTypeToString(type, fetch_initiator_name)); | 609 argv.push_back(Resource::ResourceTypeToString(type, fetch_initiator_name)); |
| 610 argv.push_back(request.Url()); | 610 argv.push_back(request.Url()); |
| 611 activity_logger->LogEvent("blinkRequestResource", argv.size(), argv.data()); | 611 activity_logger->LogEvent("blinkRequestResource", argv.size(), argv.data()); |
| 612 } | 612 } |
| 613 } | 613 } |
| 614 | 614 |
| 615 void FrameFetchContext::DidLoadResource(Resource* resource) { | 615 void FrameFetchContext::DidLoadResource(Resource* resource) { |
| 616 if (!GetDocument()) |
| 617 return; |
| 618 FirstMeaningfulPaintDetector::From(*GetDocument()).CheckNetworkStable(); |
| 616 if (resource->IsLoadEventBlockingResourceType()) | 619 if (resource->IsLoadEventBlockingResourceType()) |
| 617 GetFrame()->Loader().CheckCompleted(); | 620 GetDocument()->CheckCompleted(); |
| 618 if (GetDocument()) | |
| 619 FirstMeaningfulPaintDetector::From(*GetDocument()).CheckNetworkStable(); | |
| 620 } | 621 } |
| 621 | 622 |
| 622 void FrameFetchContext::AddResourceTiming(const ResourceTimingInfo& info) { | 623 void FrameFetchContext::AddResourceTiming(const ResourceTimingInfo& info) { |
| 623 Document* initiator_document = GetDocument() && info.IsMainResource() | 624 Document* initiator_document = GetDocument() && info.IsMainResource() |
| 624 ? GetDocument()->ParentDocument() | 625 ? GetDocument()->ParentDocument() |
| 625 : GetDocument(); | 626 : GetDocument(); |
| 626 if (!initiator_document || !initiator_document->domWindow()) | 627 if (!initiator_document || !initiator_document->domWindow()) |
| 627 return; | 628 return; |
| 628 DOMWindowPerformance::performance(*initiator_document->domWindow()) | 629 DOMWindowPerformance::performance(*initiator_document->domWindow()) |
| 629 ->AddResourceTiming(info); | 630 ->AddResourceTiming(info); |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 902 return MixedContentChecker::ShouldBlockFetch(GetFrame(), resource_request, | 903 return MixedContentChecker::ShouldBlockFetch(GetFrame(), resource_request, |
| 903 url, reporting_policy); | 904 url, reporting_policy); |
| 904 } | 905 } |
| 905 | 906 |
| 906 DEFINE_TRACE(FrameFetchContext) { | 907 DEFINE_TRACE(FrameFetchContext) { |
| 907 visitor->Trace(document_loader_); | 908 visitor->Trace(document_loader_); |
| 908 BaseFetchContext::Trace(visitor); | 909 BaseFetchContext::Trace(visitor); |
| 909 } | 910 } |
| 910 | 911 |
| 911 } // namespace blink | 912 } // namespace blink |
| OLD | NEW |