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

@ -226,6 +226,19 @@ int CEF_CALLBACK request_context_clear_scheme_handler_factories(
return _retval;
}
void CEF_CALLBACK request_context_purge_plugin_list_cache(
struct _cef_request_context_t* self, int reload_pages) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefRequestContextCppToC::Get(self)->PurgePluginListCache(
reload_pages?true:false);
}
} // namespace
@ -243,6 +256,8 @@ CefRequestContextCppToC::CefRequestContextCppToC() {
request_context_register_scheme_handler_factory;
GetStruct()->clear_scheme_handler_factories =
request_context_clear_scheme_handler_factories;
GetStruct()->purge_plugin_list_cache =
request_context_purge_plugin_list_cache;
}
template<> CefRefPtr<CefRequestContext> CefCppToC<CefRequestContextCppToC,

View File

@ -49,10 +49,6 @@ int CEF_CALLBACK request_context_handler_on_before_plugin_load(
DCHECK(mime_type);
if (!mime_type)
return 0;
// Verify param: top_origin_url; type: string_byref_const
DCHECK(top_origin_url);
if (!top_origin_url)
return 0;
// Verify param: plugin_info; type: refptr_diff
DCHECK(plugin_info);
if (!plugin_info)
@ -61,7 +57,7 @@ int CEF_CALLBACK request_context_handler_on_before_plugin_load(
DCHECK(plugin_policy);
if (!plugin_policy)
return 0;
// Unverified params: plugin_url
// Unverified params: plugin_url, top_origin_url
// Execute
bool _retval = CefRequestContextHandlerCppToC::Get(self)->OnBeforePluginLoad(