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:
@@ -16,6 +16,7 @@
|
||||
#include "libcef_dll/cpptoc/frame_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/quota_callback_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/request_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/web_plugin_info_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/request_handler_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/resource_handler_ctocpp.h"
|
||||
|
||||
@@ -244,6 +245,35 @@ void CefRequestHandlerCToCpp::OnProtocolExecution(CefRefPtr<CefBrowser> browser,
|
||||
allow_os_execution = allow_os_executionInt?true:false;
|
||||
}
|
||||
|
||||
bool CefRequestHandlerCToCpp::OnBeforePluginLoad(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& url, const CefString& policy_url,
|
||||
CefRefPtr<CefWebPluginInfo> info) {
|
||||
if (CEF_MEMBER_MISSING(struct_, on_before_plugin_load))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return false;
|
||||
// Verify param: info; type: refptr_diff
|
||||
DCHECK(info.get());
|
||||
if (!info.get())
|
||||
return false;
|
||||
// Unverified params: url, policy_url
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->on_before_plugin_load(struct_,
|
||||
CefBrowserCppToC::Wrap(browser),
|
||||
url.GetStruct(),
|
||||
policy_url.GetStruct(),
|
||||
CefWebPluginInfoCppToC::Wrap(info));
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefRequestHandlerCToCpp, CefRequestHandler,
|
||||
|
Reference in New Issue
Block a user