Commit 6604af54 authored by Marshall Greenblatt's avatar Marshall Greenblatt

Fix popup window behavioral errors introduced by revision 1085 changes (issue #816).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1093 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
parent 88025e32
......@@ -59,38 +59,21 @@ typedef struct _cef_life_span_handler_t {
///
// Called on the IO thread before a new popup window is created. The |browser|
// and |frame| parameters represent the source of the popup request. The
// |target_url| and |target_frame_name| values may be NULL if none was
// specified with the request. Return true (1) to allow creation of the popup
// window or false (0) to cancel creation. If true (1) is returned,
// |no_javascript_access| will indicate whether the window that is created
// should be scriptable/in the same process as the source browser. Do not
// perform blocking work in this callback as it will block the associated
// render process. To completely disable popup windows for a browser set
// cef_browser_tSettings.javascript_open_windows to STATE_DISABLED.
///
int (CEF_CALLBACK *can_create_popup)(struct _cef_life_span_handler_t* self,
// |target_url| and |target_frame_name| values may be NULL if none were
// specified with the request. The |popupFeatures| structure contains
// information about the requested popup window. To allow creation of the
// popup window optionally modify |windowInfo|, |client|, |settings| and
// |no_javascript_access| and return false (0). To cancel creation of the
// popup window return true (1). The |client| and |settings| values will
// default to the source browser's values. The |no_javascript_access| value
// indicates whether the new browser window should be scriptable and in the
// same process as the source browser.
int (CEF_CALLBACK *on_before_popup)(struct _cef_life_span_handler_t* self,
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
const cef_string_t* target_url, const cef_string_t* target_frame_name,
int* no_javascript_access);
///
// Called before the cef_browser_host_t object associated with a new popup
// window is created. This function will only be called in can_create_popup()
// returns true (1). The |browser| parameter represents the source of the
// popup request. The |popupFeatures| parameter will contain information about
// the style of popup window requested. The framework will create the new
// popup window based on the parameters in |windowInfo|. By default, a newly
// created popup window will have the same client and settings as the parent
// window. To change the client for the new window modify the object that
// |client| points to. To change the settings for the new window modify the
// |settings| structure.
///
void (CEF_CALLBACK *on_before_popup)(struct _cef_life_span_handler_t* self,
struct _cef_browser_t* browser,
const struct _cef_popup_features_t* popupFeatures,
struct _cef_window_info_t* windowInfo, const cef_string_t* target_url,
const cef_string_t* target_frame_name, struct _cef_client_t** client,
struct _cef_browser_settings_t* settings);
struct _cef_window_info_t* windowInfo, struct _cef_client_t** client,
struct _cef_browser_settings_t* settings, int* no_javascript_access);
///
// Called after a new window is created.
......
......@@ -54,44 +54,27 @@ class CefLifeSpanHandler : public virtual CefBase {
///
// Called on the IO thread before a new popup window is created. The |browser|
// and |frame| parameters represent the source of the popup request. The
// |target_url| and |target_frame_name| values may be empty if none was
// specified with the request. Return true to allow creation of the popup
// window or false to cancel creation. If true is returned,
// |no_javascript_access| will indicate whether the window that is created
// should be scriptable/in the same process as the source browser. Do not
// perform blocking work in this callback as it will block the associated
// render process. To completely disable popup windows for a browser set
// CefBrowserSettings.javascript_open_windows to STATE_DISABLED.
///
/*--cef(optional_param=target_url,optional_param=target_frame_name)--*/
virtual bool CanCreatePopup(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
const CefString& target_url,
const CefString& target_frame_name,
bool* no_javascript_access) {
return true;
}
///
// Called before the CefBrowserHost object associated with a new popup window
// is created. This method will only be called in CanCreatePopup() returns
// true. The |browser| parameter represents the source of the popup request.
// The |popupFeatures| parameter will contain information about the style of
// popup window requested. The framework will create the new popup window
// based on the parameters in |windowInfo|. By default, a newly created popup
// window will have the same client and settings as the parent window. To
// change the client for the new window modify the object that |client| points
// to. To change the settings for the new window modify the |settings|
// structure.
///
// |target_url| and |target_frame_name| values may be empty if none were
// specified with the request. The |popupFeatures| structure contains
// information about the requested popup window. To allow creation of the
// popup window optionally modify |windowInfo|, |client|, |settings| and
// |no_javascript_access| and return false. To cancel creation of the popup
// window return true. The |client| and |settings| values will default to the
// source browser's values. The |no_javascript_access| value indicates whether
// the new browser window should be scriptable and in the same process as the
// source browser.
/*--cef(optional_param=target_url,optional_param=target_frame_name)--*/
virtual void OnBeforePopup(CefRefPtr<CefBrowser> browser,
const CefPopupFeatures& popupFeatures,
CefWindowInfo& windowInfo,
virtual bool OnBeforePopup(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
const CefString& target_url,
const CefString& target_frame_name,
const CefPopupFeatures& popupFeatures,
CefWindowInfo& windowInfo,
CefRefPtr<CefClient>& client,
CefBrowserSettings& settings) {}
CefBrowserSettings& settings,
bool* no_javascript_access) {
return false;
}
///
// Called after a new window is created.
......
......@@ -1071,7 +1071,7 @@ void CefBrowserHostImpl::Navigate(const CefNavigateParams& params) {
CefMsg_LoadRequest_Params request;
request.url = params.url;
if (!request.url.is_valid()) {
DLOG(ERROR) << "Invalid URL passed to CefBrowserHostImpl::Navigate: " <<
LOG(ERROR) << "Invalid URL passed to CefBrowserHostImpl::Navigate: " <<
params.url;
return;
}
......@@ -1130,7 +1130,7 @@ void CefBrowserHostImpl::LoadURL(int64 frame_id, const std::string& url) {
}
if (!gurl.is_valid()) {
DLOG(ERROR) <<
LOG(ERROR) <<
"Invalid URL passed to CefBrowserHostImpl::LoadURL: " << url;
return;
}
......@@ -1491,56 +1491,13 @@ bool CefBrowserHostImpl::ShouldCreateWebContents(
WindowContainerType window_container_type,
const string16& frame_name,
const GURL& target_url) {
// Start with the current browser window's client and settings.
pending_client_ = client_;
pending_settings_ = settings_;
// TODO(cef): Figure out how to populate these values.
// See: http://crbug.com/110510
CefPopupFeatures features;
pending_window_info_ = CefWindowInfo();
#if defined(OS_WIN)
pending_window_info_.SetAsPopup(NULL, CefString());
#endif
#if (defined(OS_WIN) || defined(OS_MACOSX))
// Default to the size from the popup features.
if (features.xSet)
pending_window_info_.x = features.x;
if (features.ySet)
pending_window_info_.y = features.y;
if (features.widthSet)
pending_window_info_.width = features.width;
if (features.heightSet)
pending_window_info_.height = features.height;
#endif
if (client_.get()) {
CefRefPtr<CefLifeSpanHandler> handler = client_->GetLifeSpanHandler();
// Give the handler an opportunity to modify window attributes, handler,
// or cancel the window creation.
if (handler.get()) {
handler->OnBeforePopup(this, features, pending_window_info_,
target_url.spec(), frame_name,
pending_client_, pending_settings_);
}
}
if (IsWindowRenderingDisabled(pending_window_info_)) {
if (!pending_client_->GetRenderHandler().get()) {
NOTREACHED() << "CefRenderHandler implementation is required";
return false;
}
if (pending_settings_.accelerated_compositing != STATE_DISABLED) {
// Accelerated compositing is not supported when window rendering is
// disabled.
pending_settings_.accelerated_compositing = STATE_DISABLED;
}
}
CefContentBrowserClient::Get()->GetOrCreateBrowserInfo(
web_contents->GetRenderProcessHost()->GetID(), route_id);
base::AutoLock lock_scope(pending_popup_info_lock_);
DCHECK(pending_popup_info_.get());
_Context->browser_context()->set_use_osr_next_contents_view(
IsWindowRenderingDisabled(pending_window_info_));
IsWindowRenderingDisabled(pending_popup_info_->window_info));
return true;
}
......@@ -1550,28 +1507,29 @@ void CefBrowserHostImpl::WebContentsCreated(
int64 source_frame_id,
const GURL& target_url,
content::WebContents* new_contents) {
scoped_ptr<PendingPopupInfo> pending_popup_info;
{
base::AutoLock lock_scope(pending_popup_info_lock_);
pending_popup_info.reset(pending_popup_info_.release());
}
DCHECK(pending_popup_info.get());
CefWindowHandle opener = NULL;
scoped_refptr<CefBrowserInfo> info;
if (source_contents) {
opener = GetBrowserForContents(source_contents)->GetWindowHandle();
scoped_refptr<CefBrowserInfo> info =
CefContentBrowserClient::Get()->GetBrowserInfo(
new_contents->GetRenderProcessHost()->GetID(),
new_contents->GetRoutingID());
// Popup windows may not have info yet.
info = CefContentBrowserClient::Get()->GetOrCreateBrowserInfo(
new_contents->GetRenderProcessHost()->GetID(),
new_contents->GetRoutingID());
if (source_contents) {
DCHECK(info->is_popup());
opener = GetBrowserForContents(source_contents)->GetWindowHandle();
} else {
info = CefContentBrowserClient::Get()->GetBrowserInfo(
new_contents->GetRenderProcessHost()->GetID(),
new_contents->GetRoutingID());
DCHECK(!info->is_popup());
}
CefRefPtr<CefBrowserHostImpl> browser = CefBrowserHostImpl::Create(
pending_window_info_, pending_settings_, pending_client_, new_contents,
info, opener);
pending_client_ = NULL;
pending_popup_info->window_info, pending_popup_info->settings,
pending_popup_info->client, new_contents, info, opener);
}
void CefBrowserHostImpl::DidNavigateMainFramePostCommit(
......@@ -1599,6 +1557,15 @@ void CefBrowserHostImpl::RunFileChooser(
tab));
}
bool CefBrowserHostImpl::SetPendingPopupInfo(
scoped_ptr<PendingPopupInfo> info) {
base::AutoLock lock_scope(pending_popup_info_lock_);
if (pending_popup_info_.get())
return false;
pending_popup_info_.reset(info.release());
return true;
}
void CefBrowserHostImpl::UpdatePreferredSize(content::WebContents* source,
const gfx::Size& pref_size) {
PlatformSizeTo(pref_size.width(), pref_size.height());
......
......@@ -243,6 +243,15 @@ class CefBrowserHostImpl : public CefBrowserHost,
void RunFileChooser(const content::FileChooserParams& params,
const RunFileChooserCallback& callback);
// Used when creating a new popup window.
struct PendingPopupInfo {
CefWindowInfo window_info;
CefBrowserSettings settings;
CefRefPtr<CefClient> client;
};
// Returns false if a popup is already pending.
bool SetPendingPopupInfo(scoped_ptr<PendingPopupInfo> info);
private:
// content::WebContentsDelegate methods.
virtual content::WebContents* OpenURLFromTab(
......@@ -442,10 +451,10 @@ class CefBrowserHostImpl : public CefBrowserHost,
scoped_refptr<CefBrowserInfo> browser_info_;
CefWindowHandle opener_;
// Used when creating a new popup window.
CefWindowInfo pending_window_info_;
CefBrowserSettings pending_settings_;
CefRefPtr<CefClient> pending_client_;
// Pending popup information. Access must be protected by
// |pending_popup_info_lock_|.
base::Lock pending_popup_info_lock_;
scoped_ptr<PendingPopupInfo> pending_popup_info_;
// Volatile state information. All access must be protected by the state lock.
base::Lock state_lock_;
......
......@@ -85,7 +85,7 @@ void CefBrowserMainParts::PreMainMessageLoopRun() {
if (base::StringToInt(port_str, &port) && port > 0 && port < 65535) {
devtools_delegate_ = new CefDevToolsDelegate(port);
} else {
DLOG(WARNING) << "Invalid http debugger port number " << port;
LOG(WARNING) << "Invalid http debugger port number " << port;
}
}
}
......
......@@ -47,7 +47,7 @@ bool CefBrowserMessageFilter::OnMessageReceived(const IPC::Message& message) {
OnGetNewRenderThreadInfo)
IPC_MESSAGE_HANDLER(CefProcessHostMsg_GetNewBrowserInfo,
OnGetNewBrowserInfo)
IPC_MESSAGE_HANDLER(ViewHostMsg_CreateWindow, OnCreateWindow)
IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_CreateWindow, OnCreateWindow)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
......@@ -86,13 +86,15 @@ void CefBrowserMessageFilter::OnGetNewBrowserInfo(
void CefBrowserMessageFilter::OnCreateWindow(
const ViewHostMsg_CreateWindow_Params& params,
int* route_id,
int* surface_id,
int64* cloned_session_storage_namespace_id) {
IPC::Message* reply_msg) {
CefContentBrowserClient::LastCreateWindowParams lcwp;
lcwp.opener_id = params.opener_id;
lcwp.opener_process_id = host_->GetID();
lcwp.opener_view_id = params.opener_id;
lcwp.opener_frame_id = params.opener_frame_id;
lcwp.target_url = params.target_url;
lcwp.target_frame_name = params.frame_name;
CefContentBrowserClient::Get()->set_last_create_window_params(lcwp);
// Reply message is not used.
delete reply_msg;
}
......@@ -37,9 +37,7 @@ class CefBrowserMessageFilter : public IPC::ChannelProxy::MessageFilter {
void OnGetNewBrowserInfo(int routing_id,
CefProcessHostMsg_GetNewBrowserInfo_Params* params);
void OnCreateWindow(const ViewHostMsg_CreateWindow_Params& params,
int* route_id,
int* surface_id,
int64* cloned_session_storage_namespace_id);
IPC::Message* reply_msg);
content::RenderProcessHost* host_;
IPC::Channel* channel_;
......
......@@ -210,7 +210,7 @@ class Delegate : public InternalHandlerDelegate {
}
if (!handled && domain != CHROME_VERSION) {
DLOG(INFO) << "Reguest for unknown chrome resource: " <<
LOG(INFO) << "Reguest for unknown chrome resource: " <<
url.spec().c_str();
action->redirect_url =
GURL(std::string(kChromeURL) + kChromeVersionDomain);
......
......@@ -253,7 +253,7 @@ CefContentBrowserClient::CefContentBrowserClient()
content::PluginServiceImpl::GetInstance()->SetFilter(
plugin_service_filter_.get());
last_create_window_params_.opener_id = MSG_ROUTING_NONE;
last_create_window_params_.opener_process_id = MSG_ROUTING_NONE;
}
CefContentBrowserClient::~CefContentBrowserClient() {
......@@ -354,8 +354,8 @@ scoped_refptr<CefBrowserInfo> CefContentBrowserClient::GetBrowserInfo(
return browser_info;
}
DLOG(WARNING) << "No browser info matching process id " <<
render_process_id << " and view id " << render_view_id;
LOG(WARNING) << "No browser info matching process id " <<
render_process_id << " and view id " << render_view_id;
return scoped_refptr<CefBrowserInfo>();
}
......@@ -467,35 +467,92 @@ bool CefContentBrowserClient::CanCreateWindow(
CEF_REQUIRE_IOT();
*no_javascript_access = false;
DCHECK_NE(last_create_window_params_.opener_id, MSG_ROUTING_NONE);
if (last_create_window_params_.opener_id == MSG_ROUTING_NONE)
DCHECK_NE(last_create_window_params_.opener_process_id, MSG_ROUTING_NONE);
if (last_create_window_params_.opener_process_id == MSG_ROUTING_NONE)
return false;
CefRefPtr<CefBrowserHostImpl> browser =
CefBrowserHostImpl::GetBrowserByRoutingID(
render_process_id,
last_create_window_params_.opener_id);
last_create_window_params_.opener_process_id,
last_create_window_params_.opener_view_id);
DCHECK(browser.get());
if (!browser.get())
if (!browser.get()) {
LOG(WARNING) << "CanCreateWindow called before browser was created";
return false;
}
CefRefPtr<CefClient> client = browser->GetClient();
bool allow = true;
CefRefPtr<CefClient> client = browser->GetClient();
scoped_ptr<CefBrowserHostImpl::PendingPopupInfo> pending_info;
pending_info.reset(new CefBrowserHostImpl::PendingPopupInfo);
#if defined(OS_WIN)
pending_info->window_info.SetAsPopup(NULL, CefString());
#endif
// Start with the current browser's settings.
pending_info->client = client;
pending_info->settings = browser->settings();
if (client.get()) {
CefRefPtr<CefLifeSpanHandler> handler = client->GetLifeSpanHandler();
if (handler.get()) {
CefRefPtr<CefFrame> frame =
browser->GetFrame(last_create_window_params_.opener_frame_id);
allow = handler->CanCreatePopup(browser.get(),
// TODO(cef): Figure out how to populate CefPopupFeatures.
// See: http://crbug.com/110510
CefPopupFeatures features;
#if (defined(OS_WIN) || defined(OS_MACOSX))
// Default to the size from the popup features.
if (features.xSet)
pending_info->window_info.x = features.x;
if (features.ySet)
pending_info->window_info.y = features.y;
if (features.widthSet)
pending_info->window_info.width = features.width;
if (features.heightSet)
pending_info->window_info.height = features.height;
#endif
allow = !handler->OnBeforePopup(browser.get(),
frame,
last_create_window_params_.target_url.spec(),
last_create_window_params_.target_frame_name,
features,
pending_info->window_info,
pending_info->client,
pending_info->settings,
no_javascript_access);
if (allow) {
if (CefBrowserHostImpl::IsWindowRenderingDisabled(
pending_info->window_info)) {
if (!pending_info->client->GetRenderHandler().get()) {
NOTREACHED() << "CefRenderHandler implementation is required";
allow = false;
}
if (pending_info->settings.accelerated_compositing != STATE_DISABLED) {
// Accelerated compositing is not supported when window rendering is
// disabled.
pending_info->settings.accelerated_compositing = STATE_DISABLED;
}
}
}
}
}
if (allow) {
CefRefPtr<CefClient> pending_client = pending_info->client;
allow = browser->SetPendingPopupInfo(pending_info.Pass());
if (!allow) {
LOG(WARNING) << "Creation of popup window denied because one is already "
"pending.";
}
}
last_create_window_params_.opener_id = MSG_ROUTING_NONE;
last_create_window_params_.opener_process_id = MSG_ROUTING_NONE;
return allow;
}
......
......@@ -44,9 +44,9 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
// these methods.
// During popup window creation there is a race between the call to
// CefBrowserMessageFilter::OnGetNewBrowserInfo on the IO thread and the call
// to CefBrowserHostImpl::WebContentsCreated on the UI thread. To resolve this
// race CefBrowserInfo may be created when requested for the first time and
// before the associated CefBrowserHostImpl is created.
// to CefBrowserHostImpl::ShouldCreateWebContents on the UI thread. To resolve
// this race CefBrowserInfo may be created when requested for the first time
// and before the associated CefBrowserHostImpl is created.
scoped_refptr<CefBrowserInfo> CreateBrowserInfo();
scoped_refptr<CefBrowserInfo> GetOrCreateBrowserInfo(int render_process_id,
int render_view_id);
......@@ -93,7 +93,8 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
// Store additional state from the ViewHostMsg_CreateWindow message that will
// be used when CanCreateWindow() is called.
struct LastCreateWindowParams {
int opener_id;
int opener_process_id;
int opener_view_id;
int64 opener_frame_id;
GURL target_url;
string16 target_frame_name;
......
......@@ -281,9 +281,9 @@ CefRefPtr<CefBrowserHostImpl> CefContext::GetBrowserByRoutingID(
if (info.get()) {
CefRefPtr<CefBrowserHostImpl> browser = info->browser();
if (!browser.get()) {
DLOG(WARNING) << "Found browser id " << info->browser_id() <<
" but no browser object matching process id " <<
render_process_id << " and view id " << render_view_id;
LOG(WARNING) << "Found browser id " << info->browser_id() <<
" but no browser object matching process id " <<
render_process_id << " and view id " << render_view_id;
}
return browser;
}
......
......@@ -32,7 +32,7 @@ CefRefPtr<CefTaskRunner> CefTaskRunner::GetForThread(CefThreadId threadId) {
if (task_runner.get())
return new CefTaskRunnerImpl(task_runner);
DLOG(WARNING) << "Invalid thread id " << threadId;
LOG(WARNING) << "Invalid thread id " << threadId;
return NULL;
}
......
......@@ -109,7 +109,7 @@ class CefWebWorkerTaskRunner : public base::SequencedTaskRunner,
const base::Closure& task,
base::TimeDelta delay) OVERRIDE {
if (delay != base::TimeDelta())
DLOG(WARNING) << "Delayed tasks are not supported on WebWorker threads";
LOG(WARNING) << "Delayed tasks are not supported on WebWorker threads";
runner_->PostTask(worker_id_, task);
return true;
}
......
......@@ -18,10 +18,13 @@
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK life_span_handler_can_create_popup(
int CEF_CALLBACK life_span_handler_on_before_popup(
struct _cef_life_span_handler_t* self, cef_browser_t* browser,
cef_frame_t* frame, const cef_string_t* target_url,
const cef_string_t* target_frame_name, int* no_javascript_access) {
const cef_string_t* target_frame_name,
const struct _cef_popup_features_t* popupFeatures,
cef_window_info_t* windowInfo, cef_client_t** client,
struct _cef_browser_settings_t* settings, int* no_javascript_access) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
......@@ -35,63 +38,26 @@ int CEF_CALLBACK life_span_handler_can_create_popup(
DCHECK(frame);
if (!frame)
return 0;
// Verify param: no_javascript_access; type: bool_byaddr
DCHECK(no_javascript_access);
if (!no_javascript_access)
return 0;
// Unverified params: target_url, target_frame_name
// Translate param: no_javascript_access; type: bool_byaddr
bool no_javascript_accessBool = (
no_javascript_access && *no_javascript_access)?true:false;
// Execute
bool _retval = CefLifeSpanHandlerCppToC::Get(self)->CanCreatePopup(
CefBrowserCToCpp::Wrap(browser),
CefFrameCToCpp::Wrap(frame),
CefString(target_url),
CefString(target_frame_name),
&no_javascript_accessBool);
// Restore param: no_javascript_access; type: bool_byaddr
if (no_javascript_access)
*no_javascript_access = no_javascript_accessBool?true:false;
// Return type: bool
return _retval;
}
void CEF_CALLBACK life_span_handler_on_before_popup(
struct _cef_life_span_handler_t* self, cef_browser_t* browser,
const struct _cef_popup_features_t* popupFeatures,
cef_window_info_t* windowInfo, const cef_string_t* target_url,
const cef_string_t* target_frame_name, cef_client_t** client,
struct _cef_browser_settings_t* settings) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return;
// Verify param: popupFeatures; type: struct_byref_const
DCHECK(popupFeatures);
if (!popupFeatures)
return;
return 0;
// Verify param: windowInfo; type: struct_byref
DCHECK(windowInfo);
if (!windowInfo)
return;
return 0;
// Verify param: client; type: refptr_same_byref
DCHECK(client);
if (!client)
return;
return 0;
// Verify param: settings; type: struct_byref
DCHECK(settings);
if (!settings)
return;
return 0;
// Verify param: no_javascript_access; type: bool_byaddr
DCHECK(no_javascript_access);
if (!no_javascript_access)
return 0;
// Unverified params: target_url, target_frame_name
// Translate param: popupFeatures; type: struct_byref_const
......@@ -111,16 +77,21 @@ void CEF_CALLBACK life_span_handler_on_before_popup(
CefBrowserSettings settingsObj;
if (settings)
settingsObj.AttachTo(*settings);
// Translate param: no_javascript_access; type: bool_byaddr
bool no_javascript_accessBool = (
no_javascript_access && *no_javascript_access)?true:false;
// Execute
CefLifeSpanHandlerCppToC::Get(self)->OnBeforePopup(
bool _retval = CefLifeSpanHandlerCppToC::Get(self)->OnBeforePopup(
CefBrowserCToCpp::Wrap(browser),
popupFeaturesObj,
windowInfoObj,
CefFrameCToCpp::Wrap(frame),
CefString(target_url),
CefString(target_frame_name),
popupFeaturesObj,
windowInfoObj,
clientPtr,
settingsObj);
settingsObj,
&no_javascript_accessBool);
// Restore param: windowInfo; type: struct_byref