mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add the ability to restrict V8 extension loading by frame using a new CefPermissionHandler::OnBeforeScriptExtensionLoad() callback (issue #471).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@457 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
@ -20,6 +20,7 @@
|
||||
#include "libcef_dll/cpptoc/life_span_handler_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/load_handler_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/menu_handler_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/permission_handler_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/print_handler_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/render_handler_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/request_handler_cpptoc.h"
|
||||
@ -147,6 +148,23 @@ struct _cef_menu_handler_t* CEF_CALLBACK client_get_menu_handler(
|
||||
return CefMenuHandlerCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
struct _cef_permission_handler_t* CEF_CALLBACK client_get_permission_handler(
|
||||
struct _cef_client_t* self)
|
||||
{
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefPermissionHandler> _retval = CefClientCppToC::Get(
|
||||
self)->GetPermissionHandler();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefPermissionHandlerCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
struct _cef_print_handler_t* CEF_CALLBACK client_get_print_handler(
|
||||
struct _cef_client_t* self)
|
||||
{
|
||||
@ -262,6 +280,7 @@ CefClientCppToC::CefClientCppToC(CefClient* cls)
|
||||
struct_.struct_.get_focus_handler = client_get_focus_handler;
|
||||
struct_.struct_.get_keyboard_handler = client_get_keyboard_handler;
|
||||
struct_.struct_.get_menu_handler = client_get_menu_handler;
|
||||
struct_.struct_.get_permission_handler = client_get_permission_handler;
|
||||
struct_.struct_.get_print_handler = client_get_print_handler;
|
||||
struct_.struct_.get_find_handler = client_get_find_handler;
|
||||
struct_.struct_.get_jsdialog_handler = client_get_jsdialog_handler;
|
||||
|
Reference in New Issue
Block a user