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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 1008913002: Remove RenderViewHost parameter from WebContentsObserver::Did{Start|Stop}Loading. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 9b4875c1d9b14461c26486ef4fd76015160907e6..e4b6bafc002ae44bd2915ad20ce704707886f0da 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3392,8 +3392,7 @@ bool WebContentsImpl::HasAccessedInitialDocument() {
// Notifies the RenderWidgetHost instance about the fact that the page is
// loading, or done loading.
-void WebContentsImpl::SetIsLoading(RenderViewHost* render_view_host,
- bool is_loading,
+void WebContentsImpl::SetIsLoading(bool is_loading,
bool to_different_document,
LoadNotificationDetails* details) {
if (is_loading == is_loading_)
@@ -3421,13 +3420,11 @@ void WebContentsImpl::SetIsLoading(RenderViewHost* render_view_host,
if (is_loading) {
TRACE_EVENT_ASYNC_BEGIN1("browser,navigation", "WebContentsImpl Loading",
this, "URL", url);
- FOR_EACH_OBSERVER(WebContentsObserver, observers_,
- DidStartLoading(render_view_host));
+ FOR_EACH_OBSERVER(WebContentsObserver, observers_, DidStartLoading());
} else {
TRACE_EVENT_ASYNC_END1("browser,navigation", "WebContentsImpl Loading",
this, "URL", url);
- FOR_EACH_OBSERVER(WebContentsObserver, observers_,
- DidStopLoading(render_view_host));
+ FOR_EACH_OBSERVER(WebContentsObserver, observers_, DidStopLoading());
}
// TODO(avi): Remove. http://crbug.com/170921
@@ -3835,7 +3832,7 @@ void WebContentsImpl::RenderViewTerminated(RenderViewHost* rvh,
if (delegate_)
delegate_->HideValidationMessage(this);
- SetIsLoading(rvh, false, true, NULL);
+ SetIsLoading(false, true, nullptr);
NotifyDisconnected();
SetIsCrashed(status, error_code);
@@ -3943,8 +3940,7 @@ void WebContentsImpl::RequestMove(const gfx::Rect& new_bounds) {
void WebContentsImpl::DidStartLoading(RenderFrameHost* render_frame_host,
bool to_different_document) {
- SetIsLoading(render_frame_host->GetRenderViewHost(), true,
- to_different_document, NULL);
+ SetIsLoading(true, to_different_document, nullptr);
// Notify accessibility that the user is navigating away from the
// current document.
@@ -3980,8 +3976,7 @@ void WebContentsImpl::DidStopLoading(RenderFrameHost* render_frame_host) {
controller_.GetCurrentEntryIndex()));
}
- SetIsLoading(render_frame_host->GetRenderViewHost(), false, true,
- details.get());
+ SetIsLoading(false, true, details.get());
}
void WebContentsImpl::DidCancelLoading() {
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/browser/web_contents/web_contents_impl_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698