| 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 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 | 620 |
| 621 if (activity_logger) { | 621 if (activity_logger) { |
| 622 Vector<String> argv; | 622 Vector<String> argv; |
| 623 argv.push_back(Resource::ResourceTypeToString(type, fetch_initiator_name)); | 623 argv.push_back(Resource::ResourceTypeToString(type, fetch_initiator_name)); |
| 624 argv.push_back(request.Url()); | 624 argv.push_back(request.Url()); |
| 625 activity_logger->LogEvent("blinkRequestResource", argv.size(), argv.Data()); | 625 activity_logger->LogEvent("blinkRequestResource", argv.size(), argv.Data()); |
| 626 } | 626 } |
| 627 } | 627 } |
| 628 | 628 |
| 629 void FrameFetchContext::DidLoadResource(Resource* resource) { | 629 void FrameFetchContext::DidLoadResource(Resource* resource) { |
| 630 if (!document_) |
| 631 return; |
| 630 if (resource->IsLoadEventBlockingResourceType()) | 632 if (resource->IsLoadEventBlockingResourceType()) |
| 631 GetFrame()->Loader().CheckCompleted(); | 633 document_->CheckCompleted(); |
| 632 if (document_) | 634 FirstMeaningfulPaintDetector::From(*document_).CheckNetworkStable(); |
| 633 FirstMeaningfulPaintDetector::From(*document_).CheckNetworkStable(); | |
| 634 } | 635 } |
| 635 | 636 |
| 636 void FrameFetchContext::AddResourceTiming(const ResourceTimingInfo& info) { | 637 void FrameFetchContext::AddResourceTiming(const ResourceTimingInfo& info) { |
| 637 Document* initiator_document = document_ && info.IsMainResource() | 638 Document* initiator_document = document_ && info.IsMainResource() |
| 638 ? document_->ParentDocument() | 639 ? document_->ParentDocument() |
| 639 : document_.Get(); | 640 : document_.Get(); |
| 640 if (!initiator_document || !initiator_document->domWindow()) | 641 if (!initiator_document || !initiator_document->domWindow()) |
| 641 return; | 642 return; |
| 642 DOMWindowPerformance::performance(*initiator_document->domWindow()) | 643 DOMWindowPerformance::performance(*initiator_document->domWindow()) |
| 643 ->AddResourceTiming(info); | 644 ->AddResourceTiming(info); |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1072 return GetFrame()->FrameScheduler()->LoadingTaskRunner(); | 1073 return GetFrame()->FrameScheduler()->LoadingTaskRunner(); |
| 1073 } | 1074 } |
| 1074 | 1075 |
| 1075 DEFINE_TRACE(FrameFetchContext) { | 1076 DEFINE_TRACE(FrameFetchContext) { |
| 1076 visitor->Trace(document_); | 1077 visitor->Trace(document_); |
| 1077 visitor->Trace(document_loader_); | 1078 visitor->Trace(document_loader_); |
| 1078 FetchContext::Trace(visitor); | 1079 FetchContext::Trace(visitor); |
| 1079 } | 1080 } |
| 1080 | 1081 |
| 1081 } // namespace blink | 1082 } // namespace blink |
| OLD | NEW |