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

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

Issue 1094153002: Move ClosePage() from RenderViewHost to WebContents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 ca9d608125b98c3a6c70134462624547e992ed24..5386e17c39745a5f76bf71e673a1ae45b67010c6 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -681,6 +681,10 @@ int WebContentsImpl::GetFullscreenWidgetRoutingID() const {
return fullscreen_widget_routing_id_;
}
+void WebContentsImpl::ClosePage() {
+ static_cast<RenderViewHostImpl*>(GetRenderViewHost())->ClosePage();
Charlie Reis 2015/04/21 17:28:08 GetRenderViewHostImpl() would take care of the cas
nasko 2015/04/29 17:09:27 Thank you!
+}
+
RenderWidgetHostView* WebContentsImpl::GetRenderWidgetHostView() const {
return GetRenderManager()->GetRenderWidgetHostView();
}
@@ -4010,7 +4014,7 @@ void WebContentsImpl::RouteCloseEvent(RenderViewHost* rvh) {
// It is possible to receive it from one that has just been swapped in,
// in which case we might as well deliver the message anyway.
if (rvh->GetSiteInstance()->IsRelatedSiteInstance(GetSiteInstance()))
- GetRenderViewHost()->ClosePage();
+ ClosePage();
}
bool WebContentsImpl::ShouldRouteMessageEvent(

Powered by Google App Engine
This is Rietveld 408576698