Chromium Code Reviews| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 51 #include "core/loader/DocumentLoader.h" | 51 #include "core/loader/DocumentLoader.h" |
| 52 #include "core/loader/FrameLoader.h" | 52 #include "core/loader/FrameLoader.h" |
| 53 #include "core/loader/FrameLoaderClient.h" | 53 #include "core/loader/FrameLoaderClient.h" |
| 54 #include "core/loader/MixedContentChecker.h" | 54 #include "core/loader/MixedContentChecker.h" |
| 55 #include "core/loader/NetworkHintsInterface.h" | 55 #include "core/loader/NetworkHintsInterface.h" |
| 56 #include "core/loader/PingLoader.h" | 56 #include "core/loader/PingLoader.h" |
| 57 #include "core/loader/ProgressTracker.h" | 57 #include "core/loader/ProgressTracker.h" |
| 58 #include "core/loader/appcache/ApplicationCacheHost.h" | 58 #include "core/loader/appcache/ApplicationCacheHost.h" |
| 59 #include "core/page/NetworkStateNotifier.h" | 59 #include "core/page/NetworkStateNotifier.h" |
| 60 #include "core/page/Page.h" | 60 #include "core/page/Page.h" |
| 61 #include "core/paint/FirstMeaningfulPaintDetector.h" | |
| 61 #include "core/svg/graphics/SVGImageChromeClient.h" | 62 #include "core/svg/graphics/SVGImageChromeClient.h" |
| 62 #include "core/timing/DOMWindowPerformance.h" | 63 #include "core/timing/DOMWindowPerformance.h" |
| 63 #include "core/timing/Performance.h" | 64 #include "core/timing/Performance.h" |
| 64 #include "platform/Logging.h" | 65 #include "platform/Logging.h" |
| 65 #include "platform/TracedValue.h" | 66 #include "platform/TracedValue.h" |
| 66 #include "platform/mhtml/MHTMLArchive.h" | 67 #include "platform/mhtml/MHTMLArchive.h" |
| 67 #include "platform/network/ResourceLoadPriority.h" | 68 #include "platform/network/ResourceLoadPriority.h" |
| 68 #include "platform/network/ResourceTimingInfo.h" | 69 #include "platform/network/ResourceTimingInfo.h" |
| 69 #include "platform/weborigin/SchemeRegistry.h" | 70 #include "platform/weborigin/SchemeRegistry.h" |
| 70 #include "platform/weborigin/SecurityPolicy.h" | 71 #include "platform/weborigin/SecurityPolicy.h" |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 407 if (type == Resource::MainResource) | 408 if (type == Resource::MainResource) |
| 408 m_documentLoader->applicationCacheHost()->willStartLoadingMainResource(r equest); | 409 m_documentLoader->applicationCacheHost()->willStartLoadingMainResource(r equest); |
| 409 else | 410 else |
| 410 m_documentLoader->applicationCacheHost()->willStartLoadingResource(reque st); | 411 m_documentLoader->applicationCacheHost()->willStartLoadingResource(reque st); |
| 411 } | 412 } |
| 412 | 413 |
| 413 void FrameFetchContext::didLoadResource(Resource* resource) | 414 void FrameFetchContext::didLoadResource(Resource* resource) |
| 414 { | 415 { |
| 415 if (resource->isLoadEventBlockingResourceType()) | 416 if (resource->isLoadEventBlockingResourceType()) |
| 416 frame()->loader().checkCompleted(); | 417 frame()->loader().checkCompleted(); |
| 418 if (m_document) | |
| 419 FirstMeaningfulPaintDetector::from(*m_document).checkNetworkStable(); | |
|
kouhei (in TOK)
2016/07/28 03:45:04
I think we can add a hook in FrameLoader::checkCom
Kunihiko Sakamoto
2016/08/01 08:52:07
I wanted to take into account all loading activiti
| |
| 417 } | 420 } |
| 418 | 421 |
| 419 void FrameFetchContext::addResourceTiming(const ResourceTimingInfo& info) | 422 void FrameFetchContext::addResourceTiming(const ResourceTimingInfo& info) |
| 420 { | 423 { |
| 421 Document* initiatorDocument = m_document && info.isMainResource() ? m_docume nt->parentDocument() : m_document.get(); | 424 Document* initiatorDocument = m_document && info.isMainResource() ? m_docume nt->parentDocument() : m_document.get(); |
| 422 if (!initiatorDocument || !initiatorDocument->domWindow()) | 425 if (!initiatorDocument || !initiatorDocument->domWindow()) |
| 423 return; | 426 return; |
| 424 DOMWindowPerformance::performance(*initiatorDocument->domWindow())->addResou rceTiming(info); | 427 DOMWindowPerformance::performance(*initiatorDocument->domWindow())->addResou rceTiming(info); |
| 425 } | 428 } |
| 426 | 429 |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 812 } | 815 } |
| 813 | 816 |
| 814 DEFINE_TRACE(FrameFetchContext) | 817 DEFINE_TRACE(FrameFetchContext) |
| 815 { | 818 { |
| 816 visitor->trace(m_document); | 819 visitor->trace(m_document); |
| 817 visitor->trace(m_documentLoader); | 820 visitor->trace(m_documentLoader); |
| 818 FetchContext::trace(visitor); | 821 FetchContext::trace(visitor); |
| 819 } | 822 } |
| 820 | 823 |
| 821 } // namespace blink | 824 } // namespace blink |
| OLD | NEW |