mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add new CefRequestHandler::OnBeforePluginLoad callback and functions for controlling plugin loading and life span (issue #645).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@822 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -18,6 +18,7 @@
|
||||
#include "libcef_dll/ctocpp/frame_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/quota_callback_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/request_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/web_plugin_info_ctocpp.h"
|
||||
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
@ -264,6 +265,36 @@ void CEF_CALLBACK request_handler_on_protocol_execution(
|
||||
*allow_os_execution = allow_os_executionBool?true:false;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK request_handler_on_before_plugin_load(
|
||||
struct _cef_request_handler_t* self, cef_browser_t* browser,
|
||||
const cef_string_t* url, const cef_string_t* policy_url,
|
||||
struct _cef_web_plugin_info_t* info) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser);
|
||||
if (!browser)
|
||||
return 0;
|
||||
// Verify param: info; type: refptr_diff
|
||||
DCHECK(info);
|
||||
if (!info)
|
||||
return 0;
|
||||
// Unverified params: url, policy_url
|
||||
|
||||
// Execute
|
||||
bool _retval = CefRequestHandlerCppToC::Get(self)->OnBeforePluginLoad(
|
||||
CefBrowserCToCpp::Wrap(browser),
|
||||
CefString(url),
|
||||
CefString(policy_url),
|
||||
CefWebPluginInfoCToCpp::Wrap(info));
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
@ -278,6 +309,7 @@ CefRequestHandlerCppToC::CefRequestHandlerCppToC(CefRequestHandler* cls)
|
||||
struct_.struct_.on_quota_request = request_handler_on_quota_request;
|
||||
struct_.struct_.get_cookie_manager = request_handler_get_cookie_manager;
|
||||
struct_.struct_.on_protocol_execution = request_handler_on_protocol_execution;
|
||||
struct_.struct_.on_before_plugin_load = request_handler_on_before_plugin_load;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
|
Reference in New Issue
Block a user