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

Unified Diff: Source/web/FrameLoaderClientImpl.cpp

Issue 215533004: Revert of Make start/stop loading notifications per-frame (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | « Source/web/FrameLoaderClientImpl.h ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/FrameLoaderClientImpl.cpp
diff --git a/Source/web/FrameLoaderClientImpl.cpp b/Source/web/FrameLoaderClientImpl.cpp
index 37f910b19e40625915a0146f43f15865ec32e290..c8cb57f3fdceacbd6aa7637ef22b3a88ed6ea581 100644
--- a/Source/web/FrameLoaderClientImpl.cpp
+++ b/Source/web/FrameLoaderClientImpl.cpp
@@ -64,6 +64,7 @@
#include "core/loader/FrameLoadRequest.h"
#include "core/loader/FrameLoader.h"
#include "core/loader/HistoryItem.h"
+#include "core/loader/ProgressTracker.h"
#include "core/page/Chrome.h"
#include "core/page/EventHandler.h"
#include "core/frame/FrameView.h"
@@ -492,22 +493,28 @@
m_webFrame->client()->willSubmitForm(m_webFrame, WebFormElement(form));
}
-void FrameLoaderClientImpl::didStartLoading(LoadStartType loadStartType)
-{
- if (m_webFrame->client())
- m_webFrame->client()->didStartLoading(loadStartType == NavigationToDifferentDocument);
-}
-
-void FrameLoaderClientImpl::progressEstimateChanged(double progressEstimate)
-{
- if (m_webFrame->client())
- m_webFrame->client()->didChangeLoadProgress(progressEstimate);
-}
-
-void FrameLoaderClientImpl::didStopLoading()
-{
- if (m_webFrame->client())
- m_webFrame->client()->didStopLoading();
+void FrameLoaderClientImpl::postProgressStartedNotification(LoadStartType loadStartType)
+{
+ WebViewImpl* webview = m_webFrame->viewImpl();
+ if (webview && webview->client())
+ webview->client()->didStartLoading(loadStartType == NavigationToDifferentDocument);
+}
+
+void FrameLoaderClientImpl::postProgressEstimateChangedNotification()
+{
+ WebViewImpl* webview = m_webFrame->viewImpl();
+ if (webview && webview->client()) {
+ webview->client()->didChangeLoadProgress(
+ m_webFrame, m_webFrame->frame()->page()->progress().estimatedProgress());
+ }
+}
+
+void FrameLoaderClientImpl::postProgressFinishedNotification()
+{
+ // FIXME: why might the webview be null? http://b/1234461
+ WebViewImpl* webview = m_webFrame->viewImpl();
+ if (webview && webview->client())
+ webview->client()->didStopLoading();
}
void FrameLoaderClientImpl::loadURLExternally(const ResourceRequest& request, NavigationPolicy policy, const String& suggestedName)
« no previous file with comments | « Source/web/FrameLoaderClientImpl.h ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698