mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add plugin placeholder and policy support (issue #1708)
- Default plugin loading policy can be specified using the new `--plugin-policy=[allow|block|detect]` command-line flag. - Move CefRequestHandler::OnBeforePluginLoad to CefRequestContextHandler and add a new policy argument that supports different actions (allow, block, detect, disable) on a per-plugin-instance basis. - Add CefContextMenuHandler::RunContextMenu for providing a custom context menu implementation. - Add CefResourceBundleHandler::GetDataResourceForScale for returning scaled resources (issue #1272). - Add CefResourceBundle for retrieving resources from the resource bundle (*.pak) files loaded by CEF during startup or via the CefResourceBundleHandler. - Linux: Fix Debug build IO access warning with CefGetMimeType. - cef_unittests: Move the refcounting implementation from TestHandler to subclasses in order to support interface inheritance from subclasses.
This commit is contained in:
@ -19,7 +19,6 @@
|
||||
#include "libcef_dll/ctocpp/request_callback_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/response_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/sslinfo_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/web_plugin_info_ctocpp.h"
|
||||
|
||||
|
||||
namespace {
|
||||
@ -389,36 +388,6 @@ int CEF_CALLBACK request_handler_on_certificate_error(
|
||||
return _retval;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK request_handler_on_plugin_crashed(
|
||||
struct _cef_request_handler_t* self, cef_browser_t* browser,
|
||||
const cef_string_t* plugin_path) {
|
||||
@ -495,7 +464,6 @@ CefRequestHandlerCppToC::CefRequestHandlerCppToC() {
|
||||
GetStruct()->on_quota_request = request_handler_on_quota_request;
|
||||
GetStruct()->on_protocol_execution = request_handler_on_protocol_execution;
|
||||
GetStruct()->on_certificate_error = request_handler_on_certificate_error;
|
||||
GetStruct()->on_before_plugin_load = request_handler_on_before_plugin_load;
|
||||
GetStruct()->on_plugin_crashed = request_handler_on_plugin_crashed;
|
||||
GetStruct()->on_render_view_ready = request_handler_on_render_view_ready;
|
||||
GetStruct()->on_render_process_terminated =
|
||||
|
Reference in New Issue
Block a user