Add is_main_frame argument to CefRequestContextHandler::OnBeforePluginLoad (issue #2015)

This commit is contained in:
Marshall Greenblatt
2017-01-18 18:37:56 -05:00
parent b7b145fa4f
commit 41a02dbe08
20 changed files with 750 additions and 169 deletions

View File

@@ -507,8 +507,8 @@ bool CefContentRendererClient::OverrideCreatePlugin(
GURL url(params.url);
CefViewHostMsg_GetPluginInfo_Output output;
render_frame->Send(new CefViewHostMsg_GetPluginInfo(
render_frame->GetRoutingID(), url, frame->top()->getSecurityOrigin(),
orig_mime_type, &output));
render_frame->GetRoutingID(), url, render_frame->IsMainFrame(),
frame->top()->getSecurityOrigin(), orig_mime_type, &output));
*plugin = CreatePlugin(render_frame, frame, params, output);
return true;

View File

@@ -182,6 +182,7 @@ void CefPluginPlaceholder::PluginListChanged() {
std::string mime_type(GetPluginParams().mimeType.utf8());
render_frame()->Send(new CefViewHostMsg_GetPluginInfo(
routing_id(), GURL(GetPluginParams().url),
GetFrame()->parent() == nullptr,
GetFrame()->top()->getSecurityOrigin(), mime_type, &output));
if (output.status == status_)
return;