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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 1378743002: Refactor the API for setting dynamic resource load priorities (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Better names / cleanup Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index abb627ea2e9225dea5c999b9a37b733cd1791744..462fb0fe40e3524e8efe731a96ca08c878cfb704 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -39,7 +39,6 @@
#include "core/editing/RenderedPosition.h"
#include "core/editing/markers/DocumentMarkerController.h"
#include "core/fetch/ResourceFetcher.h"
-#include "core/fetch/ResourceLoadPriorityOptimizer.h"
#include "core/frame/FrameHost.h"
#include "core/frame/LocalFrame.h"
#include "core/frame/Settings.h"
@@ -838,7 +837,7 @@ void FrameView::performLayout(bool inSubtreeLayout)
layoutFromRootObject(*layoutView());
}
- ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->updateAllImageResourcePriorities();
+ m_frame->document()->fetcher()->updateAllImageResourcePriorities();
lifecycle().advanceTo(DocumentLifecycle::AfterPerformLayout);
@@ -1526,9 +1525,8 @@ void FrameView::scrollPositionChanged()
void FrameView::didScrollTimerFired(Timer<FrameView>*)
{
- if (m_frame->document() && m_frame->document()->layoutView()) {
- ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->updateAllImageResourcePriorities();
- }
+ if (m_frame->document() && m_frame->document()->layoutView())
+ m_frame->document()->fetcher()->updateAllImageResourcePriorities();
}
void FrameView::updateLayersAndCompositingAfterScrollIfNeeded()
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ResourceLoaderSet.h ('k') | third_party/WebKit/Source/core/layout/LayoutBlock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698