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

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 97813f709b6f6b068fad1a98409333dac8df6fbb..8f68bca3656bcf3121ba96e15277fea6c2b3208c 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3388,8 +3388,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_)
@@ -3417,13 +3416,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
@@ -3831,7 +3828,7 @@ void WebContentsImpl::RenderViewTerminated(RenderViewHost* rvh,
if (delegate_)
delegate_->HideValidationMessage(this);
- SetIsLoading(rvh, false, true, NULL);
+ SetIsLoading(false, true, NULL);
nasko 2015/03/14 00:01:04 nit: nullptr
Fabrice (no longer in Chrome) 2015/03/16 11:01:46 Done.
NotifyDisconnected();
SetIsCrashed(status, error_code);
@@ -3939,8 +3936,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, NULL);
nasko 2015/03/14 00:01:04 nit: nullptr
Fabrice (no longer in Chrome) 2015/03/16 11:01:46 Done.
// Notify accessibility that the user is navigating away from the
// current document.
@@ -3976,8 +3972,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() {

Powered by Google App Engine
This is Rietveld 408576698