Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(592)

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp

Issue 2837763003: Reland "Move most of FrameLoader::CheckCompleted() to Document" (Closed)
Patch Set: Fix comment typos Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698