From 0b003c55a9146345f87b3f4fca41b79aa20f71d0 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Fri, 18 May 2012 21:37:42 +0000 Subject: [PATCH] Pass target URL to OnBeforePopup (issue #596). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@633 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- libcef/browser/browser_host_impl.cc | 5 +---- libcef/browser/browser_host_impl.h | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/libcef/browser/browser_host_impl.cc b/libcef/browser/browser_host_impl.cc index c368311c8..0ceeda87c 100644 --- a/libcef/browser/browser_host_impl.cc +++ b/libcef/browser/browser_host_impl.cc @@ -800,7 +800,6 @@ bool CefBrowserHostImpl::ShouldCreateWebContents( // TODO(cef): Figure out how to populate these values. // See: http://crbug.com/110510 CefPopupFeatures features; - pending_url_ = CefString(); pending_window_info_ = CefWindowInfo(); #if defined(OS_WIN) @@ -825,7 +824,7 @@ bool CefBrowserHostImpl::ShouldCreateWebContents( // or cancel the window creation. if (handler.get() && handler->OnBeforePopup(this, features, pending_window_info_, - pending_url_, pending_client_, + target_url.spec(), pending_client_, pending_settings_)) { pending_client_ = NULL; return false; @@ -847,8 +846,6 @@ void CefBrowserHostImpl::WebContentsCreated( CefRefPtr browser = CefBrowserHostImpl::Create( pending_window_info_, pending_settings_, pending_client_, new_contents, opener); - if (browser.get() && !pending_url_.empty()) - browser->LoadURL(CefFrameHostImpl::kMainFrameId, pending_url_); pending_client_ = NULL; } diff --git a/libcef/browser/browser_host_impl.h b/libcef/browser/browser_host_impl.h index d65074874..fe69956b0 100644 --- a/libcef/browser/browser_host_impl.h +++ b/libcef/browser/browser_host_impl.h @@ -327,7 +327,6 @@ class CefBrowserHostImpl : public CefBrowserHost, CefWindowInfo pending_window_info_; CefBrowserSettings pending_settings_; CefRefPtr pending_client_; - CefString pending_url_; // Volatile state information. All access must be protected by the state lock. base::Lock state_lock_;