| 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 6fcb922d3e4c98a0d03e10065ef7d290fafa0c4c..720d3aa3b99688ed9ddd5e7c2a1fcc8079001a8c 100644
|
| --- a/content/browser/web_contents/web_contents_impl.cc
|
| +++ b/content/browser/web_contents/web_contents_impl.cc
|
| @@ -2575,6 +2575,24 @@ WebContents* WebContentsImpl::OpenURL(const OpenURLParams& params) {
|
| return NULL;
|
|
|
| WebContents* new_contents = delegate_->OpenURLFromTab(this, params);
|
| +
|
| + RenderFrameHost* render_frame_host =
|
| + RenderFrameHost::FromID(params.render_process_id, params.render_frame_id);
|
| +
|
| + if (render_frame_host && params.source_site_instance) {
|
| + CHECK(render_frame_host->GetSiteInstance() ==
|
| + params.source_site_instance.get());
|
| + }
|
| +
|
| + if (new_contents && render_frame_host && new_contents != this) {
|
| + for (auto& observer : observers_) {
|
| + observer.DidOpenRequestedURL(new_contents, render_frame_host, params.url,
|
| + params.referrer, params.disposition,
|
| + params.transition,
|
| + params.started_from_context_menu);
|
| + }
|
| + }
|
| +
|
| return new_contents;
|
| }
|
|
|
| @@ -3368,25 +3386,6 @@ void WebContentsImpl::DidStartNavigationToPendingEntry(const GURL& url,
|
| observer.DidStartNavigationToPendingEntry(url, reload_type);
|
| }
|
|
|
| -void WebContentsImpl::RequestOpenURL(RenderFrameHostImpl* render_frame_host,
|
| - const OpenURLParams& params) {
|
| - // OpenURL can blow away the source RFH. Use the process/frame routing ID as a
|
| - // weak pointer of sorts.
|
| - const int32_t process_id = render_frame_host->GetProcess()->GetID();
|
| - const int32_t frame_id = render_frame_host->GetRoutingID();
|
| -
|
| - WebContents* new_contents = OpenURL(params);
|
| -
|
| - if (new_contents && RenderFrameHost::FromID(process_id, frame_id)) {
|
| - // Notify observers.
|
| - for (auto& observer : observers_) {
|
| - observer.DidOpenRequestedURL(new_contents, render_frame_host, params.url,
|
| - params.referrer, params.disposition,
|
| - params.transition);
|
| - }
|
| - }
|
| -}
|
| -
|
| bool WebContentsImpl::ShouldTransferNavigation(bool is_main_frame_navigation) {
|
| if (!delegate_)
|
| return true;
|
|
|