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

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

Issue 2039363003: FirstMeaningfulPaint UMA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 4 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 if (type == Resource::MainResource) 416 if (type == Resource::MainResource)
416 m_documentLoader->applicationCacheHost()->willStartLoadingMainResource(r equest); 417 m_documentLoader->applicationCacheHost()->willStartLoadingMainResource(r equest);
417 else 418 else
418 m_documentLoader->applicationCacheHost()->willStartLoadingResource(reque st); 419 m_documentLoader->applicationCacheHost()->willStartLoadingResource(reque st);
419 } 420 }
420 421
421 void FrameFetchContext::didLoadResource(Resource* resource) 422 void FrameFetchContext::didLoadResource(Resource* resource)
422 { 423 {
423 if (resource->isLoadEventBlockingResourceType()) 424 if (resource->isLoadEventBlockingResourceType())
424 frame()->loader().checkCompleted(); 425 frame()->loader().checkCompleted();
426 if (m_document)
427 FirstMeaningfulPaintDetector::from(*m_document).checkNetworkStable();
425 } 428 }
426 429
427 void FrameFetchContext::addResourceTiming(const ResourceTimingInfo& info) 430 void FrameFetchContext::addResourceTiming(const ResourceTimingInfo& info)
428 { 431 {
429 Document* initiatorDocument = m_document && info.isMainResource() ? m_docume nt->parentDocument() : m_document.get(); 432 Document* initiatorDocument = m_document && info.isMainResource() ? m_docume nt->parentDocument() : m_document.get();
430 if (!initiatorDocument || !initiatorDocument->domWindow()) 433 if (!initiatorDocument || !initiatorDocument->domWindow())
431 return; 434 return;
432 DOMWindowPerformance::performance(*initiatorDocument->domWindow())->addResou rceTiming(info); 435 DOMWindowPerformance::performance(*initiatorDocument->domWindow())->addResou rceTiming(info);
433 } 436 }
434 437
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 } 823 }
821 824
822 DEFINE_TRACE(FrameFetchContext) 825 DEFINE_TRACE(FrameFetchContext)
823 { 826 {
824 visitor->trace(m_document); 827 visitor->trace(m_document);
825 visitor->trace(m_documentLoader); 828 visitor->trace(m_documentLoader);
826 FetchContext::trace(visitor); 829 FetchContext::trace(visitor);
827 } 830 }
828 831
829 } // namespace blink 832 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698