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

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: Created 5 years, 3 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 f4e95cddf6821a06dfddb47f966c923a26c34bdc..63b26c85fe44b018e9a22d9cdb1ba683d313bcf8 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"
@@ -839,7 +838,7 @@ void FrameView::performLayout(bool inSubtreeLayout)
layoutFromRootObject(*layoutView());
}
- ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->updateAllImageResourcePriorities();
+ m_frame->document()->fetcher()->updateAllImageResourcePriorities();
lifecycle().advanceTo(DocumentLifecycle::AfterPerformLayout);
@@ -1527,9 +1526,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()

Powered by Google App Engine
This is Rietveld 408576698