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:
@@ -14,6 +14,7 @@
|
||||
#include "libcef_dll/cpptoc/context_menu_params_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/frame_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/menu_model_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/run_context_menu_callback_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/context_menu_handler_ctocpp.h"
|
||||
|
||||
|
||||
@@ -53,6 +54,49 @@ void CefContextMenuHandlerCToCpp::OnBeforeContextMenu(
|
||||
CefMenuModelCppToC::Wrap(model));
|
||||
}
|
||||
|
||||
bool CefContextMenuHandlerCToCpp::RunContextMenu(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame, CefRefPtr<CefContextMenuParams> params,
|
||||
CefRefPtr<CefMenuModel> model,
|
||||
CefRefPtr<CefRunContextMenuCallback> callback) {
|
||||
cef_context_menu_handler_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, run_context_menu))
|
||||
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: frame; type: refptr_diff
|
||||
DCHECK(frame.get());
|
||||
if (!frame.get())
|
||||
return false;
|
||||
// Verify param: params; type: refptr_diff
|
||||
DCHECK(params.get());
|
||||
if (!params.get())
|
||||
return false;
|
||||
// Verify param: model; type: refptr_diff
|
||||
DCHECK(model.get());
|
||||
if (!model.get())
|
||||
return false;
|
||||
// Verify param: callback; type: refptr_diff
|
||||
DCHECK(callback.get());
|
||||
if (!callback.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->run_context_menu(_struct,
|
||||
CefBrowserCppToC::Wrap(browser),
|
||||
CefFrameCppToC::Wrap(frame),
|
||||
CefContextMenuParamsCppToC::Wrap(params),
|
||||
CefMenuModelCppToC::Wrap(model),
|
||||
CefRunContextMenuCallbackCppToC::Wrap(callback));
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefContextMenuHandlerCToCpp::OnContextMenuCommand(
|
||||
CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefContextMenuParams> params, int command_id,
|
||||
|
@@ -34,6 +34,9 @@ class CefContextMenuHandlerCToCpp
|
||||
void OnBeforeContextMenu(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame, CefRefPtr<CefContextMenuParams> params,
|
||||
CefRefPtr<CefMenuModel> model) override;
|
||||
bool RunContextMenu(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefContextMenuParams> params, CefRefPtr<CefMenuModel> model,
|
||||
CefRefPtr<CefRunContextMenuCallback> callback) override;
|
||||
bool OnContextMenuCommand(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame, CefRefPtr<CefContextMenuParams> params,
|
||||
int command_id, EventFlags event_flags) override;
|
||||
|
@@ -303,6 +303,34 @@ CefContextMenuParams::EditStateFlags CefContextMenuParamsCToCpp::GetEditStateFla
|
||||
return _retval;
|
||||
}
|
||||
|
||||
bool CefContextMenuParamsCToCpp::IsCustomMenu() {
|
||||
cef_context_menu_params_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, is_custom_menu))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->is_custom_menu(_struct);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefContextMenuParamsCToCpp::IsPepperMenu() {
|
||||
cef_context_menu_params_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, is_pepper_menu))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->is_pepper_menu(_struct);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
|
@@ -50,6 +50,8 @@ class CefContextMenuParamsCToCpp
|
||||
bool IsEditable() OVERRIDE;
|
||||
bool IsSpellCheckEnabled() OVERRIDE;
|
||||
EditStateFlags GetEditStateFlags() OVERRIDE;
|
||||
bool IsCustomMenu() OVERRIDE;
|
||||
bool IsPepperMenu() OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
|
@@ -11,6 +11,7 @@
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/cookie_manager_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/web_plugin_info_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/request_context_handler_ctocpp.h"
|
||||
|
||||
|
||||
@@ -30,6 +31,46 @@ CefRefPtr<CefCookieManager> CefRequestContextHandlerCToCpp::GetCookieManager() {
|
||||
return CefCookieManagerCppToC::Unwrap(_retval);
|
||||
}
|
||||
|
||||
bool CefRequestContextHandlerCToCpp::OnBeforePluginLoad(
|
||||
const CefString& mime_type, const CefString& plugin_url,
|
||||
const CefString& top_origin_url, CefRefPtr<CefWebPluginInfo> plugin_info,
|
||||
PluginPolicy* plugin_policy) {
|
||||
cef_request_context_handler_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, on_before_plugin_load))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: mime_type; type: string_byref_const
|
||||
DCHECK(!mime_type.empty());
|
||||
if (mime_type.empty())
|
||||
return false;
|
||||
// Verify param: top_origin_url; type: string_byref_const
|
||||
DCHECK(!top_origin_url.empty());
|
||||
if (top_origin_url.empty())
|
||||
return false;
|
||||
// Verify param: plugin_info; type: refptr_diff
|
||||
DCHECK(plugin_info.get());
|
||||
if (!plugin_info.get())
|
||||
return false;
|
||||
// Verify param: plugin_policy; type: simple_byaddr
|
||||
DCHECK(plugin_policy);
|
||||
if (!plugin_policy)
|
||||
return false;
|
||||
// Unverified params: plugin_url
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->on_before_plugin_load(_struct,
|
||||
mime_type.GetStruct(),
|
||||
plugin_url.GetStruct(),
|
||||
top_origin_url.GetStruct(),
|
||||
CefWebPluginInfoCppToC::Wrap(plugin_info),
|
||||
plugin_policy);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
|
@@ -32,6 +32,10 @@ class CefRequestContextHandlerCToCpp
|
||||
|
||||
// CefRequestContextHandler methods.
|
||||
CefRefPtr<CefCookieManager> GetCookieManager() override;
|
||||
bool OnBeforePluginLoad(const CefString& mime_type,
|
||||
const CefString& plugin_url, const CefString& top_origin_url,
|
||||
CefRefPtr<CefWebPluginInfo> plugin_info,
|
||||
PluginPolicy* plugin_policy) override;
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
|
@@ -17,7 +17,6 @@
|
||||
#include "libcef_dll/cpptoc/request_callback_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/response_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/sslinfo_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"
|
||||
|
||||
@@ -375,36 +374,6 @@ bool CefRequestHandlerCToCpp::OnCertificateError(CefRefPtr<CefBrowser> browser,
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefRequestHandlerCToCpp::OnBeforePluginLoad(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& url, const CefString& policy_url,
|
||||
CefRefPtr<CefWebPluginInfo> info) {
|
||||
cef_request_handler_t* _struct = GetStruct();
|
||||
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;
|
||||
}
|
||||
|
||||
void CefRequestHandlerCToCpp::OnPluginCrashed(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& plugin_path) {
|
||||
cef_request_handler_t* _struct = GetStruct();
|
||||
|
@@ -61,8 +61,6 @@ class CefRequestHandlerCToCpp
|
||||
cef_errorcode_t cert_error, const CefString& request_url,
|
||||
CefRefPtr<CefSSLInfo> ssl_info,
|
||||
CefRefPtr<CefRequestCallback> callback) override;
|
||||
bool OnBeforePluginLoad(CefRefPtr<CefBrowser> browser, const CefString& url,
|
||||
const CefString& policy_url, CefRefPtr<CefWebPluginInfo> info) override;
|
||||
void OnPluginCrashed(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& plugin_path) override;
|
||||
void OnRenderViewReady(CefRefPtr<CefBrowser> browser) override;
|
||||
|
104
libcef_dll/ctocpp/resource_bundle_ctocpp.cc
Normal file
104
libcef_dll/ctocpp/resource_bundle_ctocpp.cc
Normal file
@@ -0,0 +1,104 @@
|
||||
// Copyright (c) 2015 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.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/resource_bundle_ctocpp.h"
|
||||
|
||||
|
||||
// STATIC METHODS - Body may be edited by hand.
|
||||
|
||||
CefRefPtr<CefResourceBundle> CefResourceBundle::GetGlobal() {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_resource_bundle_t* _retval = cef_resource_bundle_get_global();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefResourceBundleCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
CefString CefResourceBundleCToCpp::GetLocalizedString(int string_id) {
|
||||
cef_resource_bundle_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_localized_string))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = _struct->get_localized_string(_struct,
|
||||
string_id);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
bool CefResourceBundleCToCpp::GetDataResource(int resource_id, void*& data,
|
||||
size_t& data_size) {
|
||||
cef_resource_bundle_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_data_resource))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->get_data_resource(_struct,
|
||||
resource_id,
|
||||
&data,
|
||||
&data_size);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefResourceBundleCToCpp::GetDataResourceForScale(int resource_id,
|
||||
ScaleFactor scale_factor, void*& data, size_t& data_size) {
|
||||
cef_resource_bundle_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_data_resource_for_scale))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->get_data_resource_for_scale(_struct,
|
||||
resource_id,
|
||||
scale_factor,
|
||||
&data,
|
||||
&data_size);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefResourceBundleCToCpp::CefResourceBundleCToCpp() {
|
||||
}
|
||||
|
||||
template<> cef_resource_bundle_t* CefCToCpp<CefResourceBundleCToCpp,
|
||||
CefResourceBundle, cef_resource_bundle_t>::UnwrapDerived(
|
||||
CefWrapperType type, CefResourceBundle* c) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> base::AtomicRefCount CefCToCpp<CefResourceBundleCToCpp,
|
||||
CefResourceBundle, cef_resource_bundle_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCToCpp<CefResourceBundleCToCpp, CefResourceBundle,
|
||||
cef_resource_bundle_t>::kWrapperType = WT_RESOURCE_BUNDLE;
|
42
libcef_dll/ctocpp/resource_bundle_ctocpp.h
Normal file
42
libcef_dll/ctocpp/resource_bundle_ctocpp.h
Normal file
@@ -0,0 +1,42 @@
|
||||
// Copyright (c) 2015 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.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_RESOURCE_BUNDLE_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_RESOURCE_BUNDLE_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/cef_resource_bundle.h"
|
||||
#include "include/capi/cef_resource_bundle_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefResourceBundleCToCpp
|
||||
: public CefCToCpp<CefResourceBundleCToCpp, CefResourceBundle,
|
||||
cef_resource_bundle_t> {
|
||||
public:
|
||||
CefResourceBundleCToCpp();
|
||||
|
||||
// CefResourceBundle methods.
|
||||
CefString GetLocalizedString(int string_id) OVERRIDE;
|
||||
bool GetDataResource(int resource_id, void*& data,
|
||||
size_t& data_size) OVERRIDE;
|
||||
bool GetDataResourceForScale(int resource_id, ScaleFactor scale_factor,
|
||||
void*& data, size_t& data_size) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_RESOURCE_BUNDLE_CTOCPP_H_
|
@@ -15,7 +15,7 @@
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
bool CefResourceBundleHandlerCToCpp::GetLocalizedString(int message_id,
|
||||
bool CefResourceBundleHandlerCToCpp::GetLocalizedString(int string_id,
|
||||
CefString& string) {
|
||||
cef_resource_bundle_handler_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_localized_string))
|
||||
@@ -25,7 +25,7 @@ bool CefResourceBundleHandlerCToCpp::GetLocalizedString(int message_id,
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->get_localized_string(_struct,
|
||||
message_id,
|
||||
string_id,
|
||||
string.GetWritableStruct());
|
||||
|
||||
// Return type: bool
|
||||
@@ -50,6 +50,25 @@ bool CefResourceBundleHandlerCToCpp::GetDataResource(int resource_id,
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefResourceBundleHandlerCToCpp::GetDataResourceForScale(int resource_id,
|
||||
ScaleFactor scale_factor, void*& data, size_t& data_size) {
|
||||
cef_resource_bundle_handler_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_data_resource_for_scale))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->get_data_resource_for_scale(_struct,
|
||||
resource_id,
|
||||
scale_factor,
|
||||
&data,
|
||||
&data_size);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
|
@@ -31,9 +31,11 @@ class CefResourceBundleHandlerCToCpp
|
||||
CefResourceBundleHandlerCToCpp();
|
||||
|
||||
// CefResourceBundleHandler methods.
|
||||
bool GetLocalizedString(int message_id, CefString& string) override;
|
||||
bool GetLocalizedString(int string_id, CefString& string) override;
|
||||
bool GetDataResource(int resource_id, void*& data,
|
||||
size_t& data_size) override;
|
||||
bool GetDataResourceForScale(int resource_id, ScaleFactor scale_factor,
|
||||
void*& data, size_t& data_size) override;
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
|
64
libcef_dll/ctocpp/run_context_menu_callback_ctocpp.cc
Normal file
64
libcef_dll/ctocpp/run_context_menu_callback_ctocpp.cc
Normal file
@@ -0,0 +1,64 @@
|
||||
// Copyright (c) 2015 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.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/run_context_menu_callback_ctocpp.h"
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
void CefRunContextMenuCallbackCToCpp::Continue(int command_id,
|
||||
EventFlags event_flags) {
|
||||
cef_run_context_menu_callback_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, cont))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
_struct->cont(_struct,
|
||||
command_id,
|
||||
event_flags);
|
||||
}
|
||||
|
||||
void CefRunContextMenuCallbackCToCpp::Cancel() {
|
||||
cef_run_context_menu_callback_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, cancel))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
_struct->cancel(_struct);
|
||||
}
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefRunContextMenuCallbackCToCpp::CefRunContextMenuCallbackCToCpp() {
|
||||
}
|
||||
|
||||
template<> cef_run_context_menu_callback_t* CefCToCpp<CefRunContextMenuCallbackCToCpp,
|
||||
CefRunContextMenuCallback, cef_run_context_menu_callback_t>::UnwrapDerived(
|
||||
CefWrapperType type, CefRunContextMenuCallback* c) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> base::AtomicRefCount CefCToCpp<CefRunContextMenuCallbackCToCpp,
|
||||
CefRunContextMenuCallback, cef_run_context_menu_callback_t>::DebugObjCt =
|
||||
0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCToCpp<CefRunContextMenuCallbackCToCpp,
|
||||
CefRunContextMenuCallback, cef_run_context_menu_callback_t>::kWrapperType =
|
||||
WT_RUN_CONTEXT_MENU_CALLBACK;
|
39
libcef_dll/ctocpp/run_context_menu_callback_ctocpp.h
Normal file
39
libcef_dll/ctocpp/run_context_menu_callback_ctocpp.h
Normal file
@@ -0,0 +1,39 @@
|
||||
// Copyright (c) 2015 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.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_RUN_CONTEXT_MENU_CALLBACK_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_RUN_CONTEXT_MENU_CALLBACK_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/cef_context_menu_handler.h"
|
||||
#include "include/capi/cef_context_menu_handler_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefRunContextMenuCallbackCToCpp
|
||||
: public CefCToCpp<CefRunContextMenuCallbackCToCpp,
|
||||
CefRunContextMenuCallback, cef_run_context_menu_callback_t> {
|
||||
public:
|
||||
CefRunContextMenuCallbackCToCpp();
|
||||
|
||||
// CefRunContextMenuCallback methods.
|
||||
void Continue(int command_id, EventFlags event_flags) OVERRIDE;
|
||||
void Cancel() OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_RUN_CONTEXT_MENU_CALLBACK_CTOCPP_H_
|
@@ -20,6 +20,8 @@
|
||||
|
||||
#include "include/cef_web_plugin.h"
|
||||
#include "include/capi/cef_web_plugin_capi.h"
|
||||
#include "include/cef_browser.h"
|
||||
#include "include/capi/cef_browser_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
|
@@ -20,6 +20,8 @@
|
||||
|
||||
#include "include/cef_web_plugin.h"
|
||||
#include "include/capi/cef_web_plugin_capi.h"
|
||||
#include "include/cef_browser.h"
|
||||
#include "include/capi/cef_browser_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
|
@@ -20,6 +20,8 @@
|
||||
|
||||
#include "include/cef_web_plugin.h"
|
||||
#include "include/capi/cef_web_plugin_capi.h"
|
||||
#include "include/cef_browser.h"
|
||||
#include "include/capi/cef_browser_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
|
Reference in New Issue
Block a user