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

Unified Diff: third_party/WebKit/Source/core/loader/ProgressTracker.cpp

Issue 2557053002: Use LocalFrame::client() than getting the FrameLoader and then call client() on it. (Closed)
Patch Set: Rebase Created 3 years, 11 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
« no previous file with comments | « third_party/WebKit/Source/core/loader/ProgressTracker.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/ProgressTracker.cpp
diff --git a/third_party/WebKit/Source/core/loader/ProgressTracker.cpp b/third_party/WebKit/Source/core/loader/ProgressTracker.cpp
index 4618b7daaecfa4cc11c4021bbbe362c6d6b2b065..e94adab34dfb9874688b420f4f958557e1903680 100644
--- a/third_party/WebKit/Source/core/loader/ProgressTracker.cpp
+++ b/third_party/WebKit/Source/core/loader/ProgressTracker.cpp
@@ -99,9 +99,13 @@ void ProgressTracker::reset() {
m_finishedParsing = false;
}
+FrameLoaderClient* ProgressTracker::frameLoaderClient() const {
+ return m_frame->client();
+}
+
void ProgressTracker::progressStarted() {
if (!m_frame->isLoading())
- m_frame->loader().client()->didStartLoading(NavigationToDifferentDocument);
+ frameLoaderClient()->didStartLoading(NavigationToDifferentDocument);
reset();
m_progressValue = initialProgressValue;
m_frame->setIsLoading(true);
@@ -113,7 +117,7 @@ void ProgressTracker::progressCompleted() {
m_frame->setIsLoading(false);
sendFinalProgress();
reset();
- m_frame->loader().client()->didStopLoading();
+ frameLoaderClient()->didStopLoading();
InspectorInstrumentation::frameStoppedLoading(m_frame);
}
@@ -126,7 +130,7 @@ void ProgressTracker::sendFinalProgress() {
if (m_progressValue == 1)
return;
m_progressValue = 1;
- m_frame->loader().client()->progressEstimateChanged(m_progressValue);
+ frameLoaderClient()->progressEstimateChanged(m_progressValue);
}
void ProgressTracker::willStartLoading(unsigned long identifier,
@@ -220,7 +224,7 @@ void ProgressTracker::maybeSendProgress() {
m_progressValue - m_lastNotifiedProgressValue;
if (notificationProgressDelta >= progressNotificationInterval ||
notifiedProgressTimeDelta >= progressNotificationTimeInterval) {
- m_frame->loader().client()->progressEstimateChanged(m_progressValue);
+ frameLoaderClient()->progressEstimateChanged(m_progressValue);
m_lastNotifiedProgressValue = m_progressValue;
m_lastNotifiedProgressTime = now;
}
« no previous file with comments | « third_party/WebKit/Source/core/loader/ProgressTracker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698