From c0fceff6214f05360be23a5fc2ee578e9d7707aa Mon Sep 17 00:00:00 2001 From: nasko Date: Thu, 30 Apr 2015 08:53:52 -0700 Subject: Move ClosePage() from RenderViewHost to WebContents. ClosePage is a page-level concept and because of the deprecation of RenderViewHost, it has to move. WebContents is the object representing page, so I'm moving this public API to it. BUG=304341, 478281 Review URL: https://codereview.chromium.org/1094153002 Cr-Commit-Position: refs/heads/master@{#327719} --- chromecast/browser/android/cast_window_android.cc | 2 +- chromecast/browser/service/cast_service_simple.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'chromecast') diff --git a/chromecast/browser/android/cast_window_android.cc b/chromecast/browser/android/cast_window_android.cc index 1fe64a8..7c2e354 100644 --- a/chromecast/browser/android/cast_window_android.cc +++ b/chromecast/browser/android/cast_window_android.cc @@ -86,7 +86,7 @@ void CastWindowAndroid::Close() { // Close page first, which fires the window.unload event. The WebContents // itself will be destroyed after browser-process has received renderer // notification that the page is closed. - web_contents_->GetRenderViewHost()->ClosePage(); + web_contents_->ClosePage(); } void CastWindowAndroid::Destroy() { diff --git a/chromecast/browser/service/cast_service_simple.cc b/chromecast/browser/service/cast_service_simple.cc index d5c1389..2a40b3e 100644 --- a/chromecast/browser/service/cast_service_simple.cc +++ b/chromecast/browser/service/cast_service_simple.cc @@ -75,7 +75,7 @@ void CastServiceSimple::StartInternal() { } void CastServiceSimple::StopInternal() { - web_contents_->GetRenderViewHost()->ClosePage(); + web_contents_->ClosePage(); web_contents_.reset(); window_.reset(); } -- cgit v1.1