Call OnBeforePluginLoad when building the plugin list (issue #1708)

This commit is contained in:
Marshall Greenblatt
2015-09-25 14:59:30 +03:00
parent a33720558e
commit 4149192d81
23 changed files with 421 additions and 161 deletions

View File

@@ -210,6 +210,18 @@ bool CefRequestContextCToCpp::ClearSchemeHandlerFactories() {
return _retval?true:false;
}
void CefRequestContextCToCpp::PurgePluginListCache(bool reload_pages) {
cef_request_context_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, purge_plugin_list_cache))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->purge_plugin_list_cache(_struct,
reload_pages);
}
// CONSTRUCTOR - Do not edit by hand.

View File

@@ -44,6 +44,7 @@ class CefRequestContextCToCpp
const CefString& domain_name,
CefRefPtr<CefSchemeHandlerFactory> factory) OVERRIDE;
bool ClearSchemeHandlerFactories() OVERRIDE;
void PurgePluginListCache(bool reload_pages) OVERRIDE;
};
#endif // USING_CEF_SHARED

View File

@@ -45,10 +45,6 @@ bool CefRequestContextHandlerCToCpp::OnBeforePluginLoad(
DCHECK(!mime_type.empty());
if (mime_type.empty())
return false;
// Verify param: top_origin_url; type: string_byref_const
DCHECK(!top_origin_url.empty());
if (top_origin_url.empty())
return false;
// Verify param: plugin_info; type: refptr_diff
DCHECK(plugin_info.get());
if (!plugin_info.get())
@@ -57,7 +53,7 @@ bool CefRequestContextHandlerCToCpp::OnBeforePluginLoad(
DCHECK(plugin_policy);
if (!plugin_policy)
return false;
// Unverified params: plugin_url
// Unverified params: plugin_url, top_origin_url
// Execute
int _retval = _struct->on_before_plugin_load(_struct,