mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add support for loading extensions (issue #1947)
- Add CefRequestContext::LoadExtension, CefExtension, CefExtensionHandler and related methods/interfaces. - Add chrome://extensions-support that lists supported Chrome APIs. - Add CefBrowserHost::SetAutoResizeEnabled and CefDisplayHandler::OnAutoResize to support browser resize based on preferred web contents size. - views: Add support for custom CefMenuButton popups. - cefclient: Run with `--load-extension=set_page_color` command-line flag for an extension loading example. Add `--use-views` on Windows and Linux for an even better example.
This commit is contained in:
@@ -9,12 +9,13 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=1c14ea52e06cca6ef0ad5e82797b9b1cda7141b4$
|
||||
// $hash=e2d8f32f84e5995d892da25cf13e09c194d5b6a5$
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/browser_host_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/browser_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/drag_data_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/extension_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/navigation_entry_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/request_context_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/client_ctocpp.h"
|
||||
@@ -1010,6 +1011,66 @@ browser_host_set_accessibility_state(struct _cef_browser_host_t* self,
|
||||
CefBrowserHostCppToC::Get(self)->SetAccessibilityState(accessibility_state);
|
||||
}
|
||||
|
||||
void CEF_CALLBACK
|
||||
browser_host_set_auto_resize_enabled(struct _cef_browser_host_t* self,
|
||||
int enabled,
|
||||
const cef_size_t* min_size,
|
||||
const cef_size_t* max_size) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: min_size; type: simple_byref_const
|
||||
DCHECK(min_size);
|
||||
if (!min_size)
|
||||
return;
|
||||
// Verify param: max_size; type: simple_byref_const
|
||||
DCHECK(max_size);
|
||||
if (!max_size)
|
||||
return;
|
||||
|
||||
// Translate param: min_size; type: simple_byref_const
|
||||
CefSize min_sizeVal = min_size ? *min_size : CefSize();
|
||||
// Translate param: max_size; type: simple_byref_const
|
||||
CefSize max_sizeVal = max_size ? *max_size : CefSize();
|
||||
|
||||
// Execute
|
||||
CefBrowserHostCppToC::Get(self)->SetAutoResizeEnabled(
|
||||
enabled ? true : false, min_sizeVal, max_sizeVal);
|
||||
}
|
||||
|
||||
struct _cef_extension_t* CEF_CALLBACK
|
||||
browser_host_get_extension(struct _cef_browser_host_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefExtension> _retval =
|
||||
CefBrowserHostCppToC::Get(self)->GetExtension();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefExtensionCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK
|
||||
browser_host_is_background_host(struct _cef_browser_host_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefBrowserHostCppToC::Get(self)->IsBackgroundHost();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
@@ -1077,6 +1138,9 @@ CefBrowserHostCppToC::CefBrowserHostCppToC() {
|
||||
GetStruct()->get_visible_navigation_entry =
|
||||
browser_host_get_visible_navigation_entry;
|
||||
GetStruct()->set_accessibility_state = browser_host_set_accessibility_state;
|
||||
GetStruct()->set_auto_resize_enabled = browser_host_set_auto_resize_enabled;
|
||||
GetStruct()->get_extension = browser_host_get_extension;
|
||||
GetStruct()->is_background_host = browser_host_is_background_host;
|
||||
}
|
||||
|
||||
template <>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=ae4395cea3553abdea6394d37325c40454505477$
|
||||
// $hash=b52f437f558356645aaf45ee20cf4f3983e03891$
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/display_handler_cpptoc.h"
|
||||
@@ -184,6 +184,35 @@ display_handler_on_console_message(struct _cef_display_handler_t* self,
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK
|
||||
display_handler_on_auto_resize(struct _cef_display_handler_t* self,
|
||||
cef_browser_t* browser,
|
||||
const cef_size_t* new_size) {
|
||||
// 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: new_size; type: simple_byref_const
|
||||
DCHECK(new_size);
|
||||
if (!new_size)
|
||||
return 0;
|
||||
|
||||
// Translate param: new_size; type: simple_byref_const
|
||||
CefSize new_sizeVal = new_size ? *new_size : CefSize();
|
||||
|
||||
// Execute
|
||||
bool _retval = CefDisplayHandlerCppToC::Get(self)->OnAutoResize(
|
||||
CefBrowserCToCpp::Wrap(browser), new_sizeVal);
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
@@ -197,6 +226,7 @@ CefDisplayHandlerCppToC::CefDisplayHandlerCppToC() {
|
||||
GetStruct()->on_tooltip = display_handler_on_tooltip;
|
||||
GetStruct()->on_status_message = display_handler_on_status_message;
|
||||
GetStruct()->on_console_message = display_handler_on_console_message;
|
||||
GetStruct()->on_auto_resize = display_handler_on_auto_resize;
|
||||
}
|
||||
|
||||
template <>
|
||||
|
181
libcef_dll/cpptoc/extension_cpptoc.cc
Normal file
181
libcef_dll/cpptoc/extension_cpptoc.cc
Normal file
@@ -0,0 +1,181 @@
|
||||
// Copyright (c) 2017 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.
|
||||
//
|
||||
// $hash=59b3e055a5cdd19a3af4b3e313f2d7095bd578e5$
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/extension_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/dictionary_value_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/request_context_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/extension_handler_ctocpp.h"
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
cef_string_userfree_t CEF_CALLBACK
|
||||
extension_get_identifier(struct _cef_extension_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefString _retval = CefExtensionCppToC::Get(self)->GetIdentifier();
|
||||
|
||||
// Return type: string
|
||||
return _retval.DetachToUserFree();
|
||||
}
|
||||
|
||||
cef_string_userfree_t CEF_CALLBACK
|
||||
extension_get_path(struct _cef_extension_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefString _retval = CefExtensionCppToC::Get(self)->GetPath();
|
||||
|
||||
// Return type: string
|
||||
return _retval.DetachToUserFree();
|
||||
}
|
||||
|
||||
struct _cef_dictionary_value_t* CEF_CALLBACK
|
||||
extension_get_manifest(struct _cef_extension_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefDictionaryValue> _retval =
|
||||
CefExtensionCppToC::Get(self)->GetManifest();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefDictionaryValueCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK extension_is_same(struct _cef_extension_t* self,
|
||||
struct _cef_extension_t* that) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: that; type: refptr_same
|
||||
DCHECK(that);
|
||||
if (!that)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval =
|
||||
CefExtensionCppToC::Get(self)->IsSame(CefExtensionCppToC::Unwrap(that));
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
struct _cef_extension_handler_t* CEF_CALLBACK
|
||||
extension_get_handler(struct _cef_extension_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefExtensionHandler> _retval =
|
||||
CefExtensionCppToC::Get(self)->GetHandler();
|
||||
|
||||
// Return type: refptr_diff
|
||||
return CefExtensionHandlerCToCpp::Unwrap(_retval);
|
||||
}
|
||||
|
||||
struct _cef_request_context_t* CEF_CALLBACK
|
||||
extension_get_loader_context(struct _cef_extension_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefRequestContext> _retval =
|
||||
CefExtensionCppToC::Get(self)->GetLoaderContext();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefRequestContextCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK extension_is_loaded(struct _cef_extension_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefExtensionCppToC::Get(self)->IsLoaded();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK extension_unload(struct _cef_extension_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefExtensionCppToC::Get(self)->Unload();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefExtensionCppToC::CefExtensionCppToC() {
|
||||
GetStruct()->get_identifier = extension_get_identifier;
|
||||
GetStruct()->get_path = extension_get_path;
|
||||
GetStruct()->get_manifest = extension_get_manifest;
|
||||
GetStruct()->is_same = extension_is_same;
|
||||
GetStruct()->get_handler = extension_get_handler;
|
||||
GetStruct()->get_loader_context = extension_get_loader_context;
|
||||
GetStruct()->is_loaded = extension_is_loaded;
|
||||
GetStruct()->unload = extension_unload;
|
||||
}
|
||||
|
||||
template <>
|
||||
CefRefPtr<CefExtension>
|
||||
CefCppToCRefCounted<CefExtensionCppToC, CefExtension, cef_extension_t>::
|
||||
UnwrapDerived(CefWrapperType type, cef_extension_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if DCHECK_IS_ON()
|
||||
template <>
|
||||
base::AtomicRefCount
|
||||
CefCppToCRefCounted<CefExtensionCppToC, CefExtension, cef_extension_t>::
|
||||
DebugObjCt ATOMIC_DECLARATION;
|
||||
#endif
|
||||
|
||||
template <>
|
||||
CefWrapperType CefCppToCRefCounted<CefExtensionCppToC,
|
||||
CefExtension,
|
||||
cef_extension_t>::kWrapperType =
|
||||
WT_EXTENSION;
|
40
libcef_dll/cpptoc/extension_cpptoc.h
Normal file
40
libcef_dll/cpptoc/extension_cpptoc.h
Normal file
@@ -0,0 +1,40 @@
|
||||
// Copyright (c) 2017 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.
|
||||
//
|
||||
// $hash=a3c31e0a1f6ee88b5d5f908f95bc326a08baecf1$
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_EXTENSION_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_EXTENSION_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#if !defined(BUILDING_CEF_SHARED)
|
||||
#error This file can be included DLL-side only
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_extension_capi.h"
|
||||
#include "include/capi/cef_extension_handler_capi.h"
|
||||
#include "include/capi/cef_request_context_capi.h"
|
||||
#include "include/cef_extension.h"
|
||||
#include "include/cef_extension_handler.h"
|
||||
#include "include/cef_request_context.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc_ref_counted.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefExtensionCppToC : public CefCppToCRefCounted<CefExtensionCppToC,
|
||||
CefExtension,
|
||||
cef_extension_t> {
|
||||
public:
|
||||
CefExtensionCppToC();
|
||||
};
|
||||
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_EXTENSION_CPPTOC_H_
|
274
libcef_dll/cpptoc/extension_handler_cpptoc.cc
Normal file
274
libcef_dll/cpptoc/extension_handler_cpptoc.cc
Normal file
@@ -0,0 +1,274 @@
|
||||
// Copyright (c) 2017 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.
|
||||
//
|
||||
// $hash=a4c5733b13d0513946314faf2ac0745c86419df7$
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/extension_handler_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/client_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/browser_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/extension_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/get_extension_resource_callback_ctocpp.h"
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK extension_handler_on_extension_load_failed(
|
||||
struct _cef_extension_handler_t* self,
|
||||
cef_errorcode_t result) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefExtensionHandlerCppToC::Get(self)->OnExtensionLoadFailed(result);
|
||||
}
|
||||
|
||||
void CEF_CALLBACK
|
||||
extension_handler_on_extension_loaded(struct _cef_extension_handler_t* self,
|
||||
cef_extension_t* extension) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: extension; type: refptr_diff
|
||||
DCHECK(extension);
|
||||
if (!extension)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefExtensionHandlerCppToC::Get(self)->OnExtensionLoaded(
|
||||
CefExtensionCToCpp::Wrap(extension));
|
||||
}
|
||||
|
||||
void CEF_CALLBACK
|
||||
extension_handler_on_extension_unloaded(struct _cef_extension_handler_t* self,
|
||||
cef_extension_t* extension) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: extension; type: refptr_diff
|
||||
DCHECK(extension);
|
||||
if (!extension)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefExtensionHandlerCppToC::Get(self)->OnExtensionUnloaded(
|
||||
CefExtensionCToCpp::Wrap(extension));
|
||||
}
|
||||
|
||||
int CEF_CALLBACK extension_handler_on_before_background_browser(
|
||||
struct _cef_extension_handler_t* self,
|
||||
cef_extension_t* extension,
|
||||
const cef_string_t* url,
|
||||
cef_client_t** client,
|
||||
struct _cef_browser_settings_t* settings) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: extension; type: refptr_diff
|
||||
DCHECK(extension);
|
||||
if (!extension)
|
||||
return 0;
|
||||
// Verify param: url; type: string_byref_const
|
||||
DCHECK(url);
|
||||
if (!url)
|
||||
return 0;
|
||||
// Verify param: client; type: refptr_same_byref
|
||||
DCHECK(client);
|
||||
if (!client)
|
||||
return 0;
|
||||
// Verify param: settings; type: struct_byref
|
||||
DCHECK(settings);
|
||||
if (!settings)
|
||||
return 0;
|
||||
|
||||
// Translate param: client; type: refptr_same_byref
|
||||
CefRefPtr<CefClient> clientPtr;
|
||||
if (client && *client)
|
||||
clientPtr = CefClientCppToC::Unwrap(*client);
|
||||
CefClient* clientOrig = clientPtr.get();
|
||||
// Translate param: settings; type: struct_byref
|
||||
CefBrowserSettings settingsObj;
|
||||
if (settings)
|
||||
settingsObj.AttachTo(*settings);
|
||||
|
||||
// Execute
|
||||
bool _retval =
|
||||
CefExtensionHandlerCppToC::Get(self)->OnBeforeBackgroundBrowser(
|
||||
CefExtensionCToCpp::Wrap(extension), CefString(url), clientPtr,
|
||||
settingsObj);
|
||||
|
||||
// Restore param: client; type: refptr_same_byref
|
||||
if (client) {
|
||||
if (clientPtr.get()) {
|
||||
if (clientPtr.get() != clientOrig) {
|
||||
*client = CefClientCppToC::Wrap(clientPtr);
|
||||
}
|
||||
} else {
|
||||
*client = NULL;
|
||||
}
|
||||
}
|
||||
// Restore param: settings; type: struct_byref
|
||||
if (settings)
|
||||
settingsObj.DetachTo(*settings);
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_browser_t* CEF_CALLBACK
|
||||
extension_handler_get_active_browser(struct _cef_extension_handler_t* self,
|
||||
cef_extension_t* extension,
|
||||
cef_browser_t* browser,
|
||||
int include_incognito) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
// Verify param: extension; type: refptr_diff
|
||||
DCHECK(extension);
|
||||
if (!extension)
|
||||
return NULL;
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser);
|
||||
if (!browser)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefBrowser> _retval =
|
||||
CefExtensionHandlerCppToC::Get(self)->GetActiveBrowser(
|
||||
CefExtensionCToCpp::Wrap(extension), CefBrowserCToCpp::Wrap(browser),
|
||||
include_incognito ? true : false);
|
||||
|
||||
// Return type: refptr_diff
|
||||
return CefBrowserCToCpp::Unwrap(_retval);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK
|
||||
extension_handler_can_access_browser(struct _cef_extension_handler_t* self,
|
||||
cef_extension_t* extension,
|
||||
cef_browser_t* browser,
|
||||
int include_incognito,
|
||||
cef_browser_t* target_browser) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: extension; type: refptr_diff
|
||||
DCHECK(extension);
|
||||
if (!extension)
|
||||
return 0;
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser);
|
||||
if (!browser)
|
||||
return 0;
|
||||
// Verify param: target_browser; type: refptr_diff
|
||||
DCHECK(target_browser);
|
||||
if (!target_browser)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefExtensionHandlerCppToC::Get(self)->CanAccessBrowser(
|
||||
CefExtensionCToCpp::Wrap(extension), CefBrowserCToCpp::Wrap(browser),
|
||||
include_incognito ? true : false, CefBrowserCToCpp::Wrap(target_browser));
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK extension_handler_get_extension_resource(
|
||||
struct _cef_extension_handler_t* self,
|
||||
cef_extension_t* extension,
|
||||
cef_browser_t* browser,
|
||||
const cef_string_t* file,
|
||||
cef_get_extension_resource_callback_t* callback) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: extension; type: refptr_diff
|
||||
DCHECK(extension);
|
||||
if (!extension)
|
||||
return 0;
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser);
|
||||
if (!browser)
|
||||
return 0;
|
||||
// Verify param: file; type: string_byref_const
|
||||
DCHECK(file);
|
||||
if (!file)
|
||||
return 0;
|
||||
// Verify param: callback; type: refptr_diff
|
||||
DCHECK(callback);
|
||||
if (!callback)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefExtensionHandlerCppToC::Get(self)->GetExtensionResource(
|
||||
CefExtensionCToCpp::Wrap(extension), CefBrowserCToCpp::Wrap(browser),
|
||||
CefString(file), CefGetExtensionResourceCallbackCToCpp::Wrap(callback));
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefExtensionHandlerCppToC::CefExtensionHandlerCppToC() {
|
||||
GetStruct()->on_extension_load_failed =
|
||||
extension_handler_on_extension_load_failed;
|
||||
GetStruct()->on_extension_loaded = extension_handler_on_extension_loaded;
|
||||
GetStruct()->on_extension_unloaded = extension_handler_on_extension_unloaded;
|
||||
GetStruct()->on_before_background_browser =
|
||||
extension_handler_on_before_background_browser;
|
||||
GetStruct()->get_active_browser = extension_handler_get_active_browser;
|
||||
GetStruct()->can_access_browser = extension_handler_can_access_browser;
|
||||
GetStruct()->get_extension_resource =
|
||||
extension_handler_get_extension_resource;
|
||||
}
|
||||
|
||||
template <>
|
||||
CefRefPtr<CefExtensionHandler> CefCppToCRefCounted<
|
||||
CefExtensionHandlerCppToC,
|
||||
CefExtensionHandler,
|
||||
cef_extension_handler_t>::UnwrapDerived(CefWrapperType type,
|
||||
cef_extension_handler_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if DCHECK_IS_ON()
|
||||
template <>
|
||||
base::AtomicRefCount CefCppToCRefCounted<CefExtensionHandlerCppToC,
|
||||
CefExtensionHandler,
|
||||
cef_extension_handler_t>::DebugObjCt
|
||||
ATOMIC_DECLARATION;
|
||||
#endif
|
||||
|
||||
template <>
|
||||
CefWrapperType CefCppToCRefCounted<CefExtensionHandlerCppToC,
|
||||
CefExtensionHandler,
|
||||
cef_extension_handler_t>::kWrapperType =
|
||||
WT_EXTENSION_HANDLER;
|
39
libcef_dll/cpptoc/extension_handler_cpptoc.h
Normal file
39
libcef_dll/cpptoc/extension_handler_cpptoc.h
Normal file
@@ -0,0 +1,39 @@
|
||||
// Copyright (c) 2017 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.
|
||||
//
|
||||
// $hash=a366d32d99f319bec553d0f3cee2c98fd6ab4501$
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_EXTENSION_HANDLER_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_EXTENSION_HANDLER_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#if !defined(WRAPPING_CEF_SHARED)
|
||||
#error This file can be included wrapper-side only
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_client_capi.h"
|
||||
#include "include/capi/cef_extension_handler_capi.h"
|
||||
#include "include/cef_client.h"
|
||||
#include "include/cef_extension_handler.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc_ref_counted.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefExtensionHandlerCppToC
|
||||
: public CefCppToCRefCounted<CefExtensionHandlerCppToC,
|
||||
CefExtensionHandler,
|
||||
cef_extension_handler_t> {
|
||||
public:
|
||||
CefExtensionHandlerCppToC();
|
||||
};
|
||||
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_EXTENSION_HANDLER_CPPTOC_H_
|
82
libcef_dll/cpptoc/get_extension_resource_callback_cpptoc.cc
Normal file
82
libcef_dll/cpptoc/get_extension_resource_callback_cpptoc.cc
Normal file
@@ -0,0 +1,82 @@
|
||||
// Copyright (c) 2017 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.
|
||||
//
|
||||
// $hash=a14686b53e028382d8dc537009d7a18263f753d6$
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/get_extension_resource_callback_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/stream_reader_cpptoc.h"
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK get_extension_resource_callback_cont(
|
||||
struct _cef_get_extension_resource_callback_t* self,
|
||||
struct _cef_stream_reader_t* stream) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Unverified params: stream
|
||||
|
||||
// Execute
|
||||
CefGetExtensionResourceCallbackCppToC::Get(self)->Continue(
|
||||
CefStreamReaderCppToC::Unwrap(stream));
|
||||
}
|
||||
|
||||
void CEF_CALLBACK get_extension_resource_callback_cancel(
|
||||
struct _cef_get_extension_resource_callback_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefGetExtensionResourceCallbackCppToC::Get(self)->Cancel();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefGetExtensionResourceCallbackCppToC::CefGetExtensionResourceCallbackCppToC() {
|
||||
GetStruct()->cont = get_extension_resource_callback_cont;
|
||||
GetStruct()->cancel = get_extension_resource_callback_cancel;
|
||||
}
|
||||
|
||||
template <>
|
||||
CefRefPtr<CefGetExtensionResourceCallback>
|
||||
CefCppToCRefCounted<CefGetExtensionResourceCallbackCppToC,
|
||||
CefGetExtensionResourceCallback,
|
||||
cef_get_extension_resource_callback_t>::
|
||||
UnwrapDerived(CefWrapperType type,
|
||||
cef_get_extension_resource_callback_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if DCHECK_IS_ON()
|
||||
template <>
|
||||
base::AtomicRefCount CefCppToCRefCounted<
|
||||
CefGetExtensionResourceCallbackCppToC,
|
||||
CefGetExtensionResourceCallback,
|
||||
cef_get_extension_resource_callback_t>::DebugObjCt ATOMIC_DECLARATION;
|
||||
#endif
|
||||
|
||||
template <>
|
||||
CefWrapperType
|
||||
CefCppToCRefCounted<CefGetExtensionResourceCallbackCppToC,
|
||||
CefGetExtensionResourceCallback,
|
||||
cef_get_extension_resource_callback_t>::kWrapperType =
|
||||
WT_GET_EXTENSION_RESOURCE_CALLBACK;
|
39
libcef_dll/cpptoc/get_extension_resource_callback_cpptoc.h
Normal file
39
libcef_dll/cpptoc/get_extension_resource_callback_cpptoc.h
Normal file
@@ -0,0 +1,39 @@
|
||||
// Copyright (c) 2017 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.
|
||||
//
|
||||
// $hash=f8084e34f58eafa157202cfa06d946b09b18e289$
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_GET_EXTENSION_RESOURCE_CALLBACK_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_GET_EXTENSION_RESOURCE_CALLBACK_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#if !defined(BUILDING_CEF_SHARED)
|
||||
#error This file can be included DLL-side only
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_client_capi.h"
|
||||
#include "include/capi/cef_extension_handler_capi.h"
|
||||
#include "include/cef_client.h"
|
||||
#include "include/cef_extension_handler.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc_ref_counted.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefGetExtensionResourceCallbackCppToC
|
||||
: public CefCppToCRefCounted<CefGetExtensionResourceCallbackCppToC,
|
||||
CefGetExtensionResourceCallback,
|
||||
cef_get_extension_resource_callback_t> {
|
||||
public:
|
||||
CefGetExtensionResourceCallbackCppToC();
|
||||
};
|
||||
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_GET_EXTENSION_RESOURCE_CALLBACK_CPPTOC_H_
|
@@ -9,14 +9,16 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=12152d9a0c2f7acf5c7ac9d0eb2facc83c00d688$
|
||||
// $hash=a36935b62972aa8bf8d9132a86a3c5f1c37f1d57$
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/request_context_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/cookie_manager_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/dictionary_value_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/extension_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/value_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/completion_callback_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/extension_handler_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/request_context_handler_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/resolve_callback_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/scheme_handler_factory_ctocpp.h"
|
||||
@@ -444,6 +446,120 @@ request_context_resolve_host_cached(struct _cef_request_context_t* self,
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK
|
||||
request_context_load_extension(struct _cef_request_context_t* self,
|
||||
const cef_string_t* root_directory,
|
||||
struct _cef_dictionary_value_t* manifest,
|
||||
cef_extension_handler_t* handler) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: root_directory; type: string_byref_const
|
||||
DCHECK(root_directory);
|
||||
if (!root_directory)
|
||||
return;
|
||||
// Unverified params: manifest, handler
|
||||
|
||||
// Execute
|
||||
CefRequestContextCppToC::Get(self)->LoadExtension(
|
||||
CefString(root_directory), CefDictionaryValueCppToC::Unwrap(manifest),
|
||||
CefExtensionHandlerCToCpp::Wrap(handler));
|
||||
}
|
||||
|
||||
int CEF_CALLBACK
|
||||
request_context_did_load_extension(struct _cef_request_context_t* self,
|
||||
const cef_string_t* extension_id) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: extension_id; type: string_byref_const
|
||||
DCHECK(extension_id);
|
||||
if (!extension_id)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefRequestContextCppToC::Get(self)->DidLoadExtension(
|
||||
CefString(extension_id));
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK
|
||||
request_context_has_extension(struct _cef_request_context_t* self,
|
||||
const cef_string_t* extension_id) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: extension_id; type: string_byref_const
|
||||
DCHECK(extension_id);
|
||||
if (!extension_id)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval =
|
||||
CefRequestContextCppToC::Get(self)->HasExtension(CefString(extension_id));
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK
|
||||
request_context_get_extensions(struct _cef_request_context_t* self,
|
||||
cef_string_list_t extension_ids) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: extension_ids; type: string_vec_byref
|
||||
DCHECK(extension_ids);
|
||||
if (!extension_ids)
|
||||
return 0;
|
||||
|
||||
// Translate param: extension_ids; type: string_vec_byref
|
||||
std::vector<CefString> extension_idsList;
|
||||
transfer_string_list_contents(extension_ids, extension_idsList);
|
||||
|
||||
// Execute
|
||||
bool _retval =
|
||||
CefRequestContextCppToC::Get(self)->GetExtensions(extension_idsList);
|
||||
|
||||
// Restore param: extension_ids; type: string_vec_byref
|
||||
cef_string_list_clear(extension_ids);
|
||||
transfer_string_list_contents(extension_idsList, extension_ids);
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_extension_t* CEF_CALLBACK
|
||||
request_context_get_extension(struct _cef_request_context_t* self,
|
||||
const cef_string_t* extension_id) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
// Verify param: extension_id; type: string_byref_const
|
||||
DCHECK(extension_id);
|
||||
if (!extension_id)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefExtension> _retval =
|
||||
CefRequestContextCppToC::Get(self)->GetExtension(CefString(extension_id));
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefExtensionCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
@@ -472,6 +588,11 @@ CefRequestContextCppToC::CefRequestContextCppToC() {
|
||||
GetStruct()->close_all_connections = request_context_close_all_connections;
|
||||
GetStruct()->resolve_host = request_context_resolve_host;
|
||||
GetStruct()->resolve_host_cached = request_context_resolve_host_cached;
|
||||
GetStruct()->load_extension = request_context_load_extension;
|
||||
GetStruct()->did_load_extension = request_context_did_load_extension;
|
||||
GetStruct()->has_extension = request_context_has_extension;
|
||||
GetStruct()->get_extensions = request_context_get_extensions;
|
||||
GetStruct()->get_extension = request_context_get_extension;
|
||||
}
|
||||
|
||||
template <>
|
||||
|
@@ -9,17 +9,36 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=9f8701b130114d4d36b9df1045dc65b899f7141c$
|
||||
// $hash=fef1959b9f8b96573de134769406f9eed4eeefc5$
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/request_context_handler_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/cookie_manager_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/request_context_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/web_plugin_info_ctocpp.h"
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK request_context_handler_on_request_context_initialized(
|
||||
struct _cef_request_context_handler_t* self,
|
||||
cef_request_context_t* request_context) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: request_context; type: refptr_diff
|
||||
DCHECK(request_context);
|
||||
if (!request_context)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefRequestContextHandlerCppToC::Get(self)->OnRequestContextInitialized(
|
||||
CefRequestContextCToCpp::Wrap(request_context));
|
||||
}
|
||||
|
||||
cef_cookie_manager_t* CEF_CALLBACK request_context_handler_get_cookie_manager(
|
||||
struct _cef_request_context_handler_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
@@ -78,6 +97,8 @@ int CEF_CALLBACK request_context_handler_on_before_plugin_load(
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefRequestContextHandlerCppToC::CefRequestContextHandlerCppToC() {
|
||||
GetStruct()->on_request_context_initialized =
|
||||
request_context_handler_on_request_context_initialized;
|
||||
GetStruct()->get_cookie_manager = request_context_handler_get_cookie_manager;
|
||||
GetStruct()->on_before_plugin_load =
|
||||
request_context_handler_on_before_plugin_load;
|
||||
|
@@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=2ccdc811cf83c44925c3600c0dda1e98b869690f$
|
||||
// $hash=265d7e41e1c27a09d82000c236e264bad092eabd$
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_REQUEST_CONTEXT_HANDLER_CPPTOC_H_
|
||||
@@ -20,7 +20,9 @@
|
||||
#error This file can be included wrapper-side only
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_request_context_capi.h"
|
||||
#include "include/capi/cef_request_context_handler_capi.h"
|
||||
#include "include/cef_request_context.h"
|
||||
#include "include/cef_request_context_handler.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc_ref_counted.h"
|
||||
|
||||
|
@@ -9,12 +9,13 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=782642e65456b32ab0fab59db2b9442783b7f574$
|
||||
// $hash=ce23c8ba14803b0a15b9b2899632f2c03d6b3a97$
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/views/button_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/views/menu_button_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/views/menu_button_pressed_lock_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/views/view_ctocpp.h"
|
||||
|
||||
namespace {
|
||||
@@ -24,7 +25,8 @@ namespace {
|
||||
void CEF_CALLBACK menu_button_delegate_on_menu_button_pressed(
|
||||
struct _cef_menu_button_delegate_t* self,
|
||||
cef_menu_button_t* menu_button,
|
||||
const cef_point_t* screen_point) {
|
||||
const cef_point_t* screen_point,
|
||||
cef_menu_button_pressed_lock_t* button_pressed_lock) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
@@ -38,13 +40,18 @@ void CEF_CALLBACK menu_button_delegate_on_menu_button_pressed(
|
||||
DCHECK(screen_point);
|
||||
if (!screen_point)
|
||||
return;
|
||||
// Verify param: button_pressed_lock; type: refptr_diff
|
||||
DCHECK(button_pressed_lock);
|
||||
if (!button_pressed_lock)
|
||||
return;
|
||||
|
||||
// Translate param: screen_point; type: simple_byref_const
|
||||
CefPoint screen_pointVal = screen_point ? *screen_point : CefPoint();
|
||||
|
||||
// Execute
|
||||
CefMenuButtonDelegateCppToC::Get(self)->OnMenuButtonPressed(
|
||||
CefMenuButtonCToCpp::Wrap(menu_button), screen_pointVal);
|
||||
CefMenuButtonCToCpp::Wrap(menu_button), screen_pointVal,
|
||||
CefMenuButtonPressedLockCToCpp::Wrap(button_pressed_lock));
|
||||
}
|
||||
|
||||
void CEF_CALLBACK
|
||||
|
44
libcef_dll/cpptoc/views/menu_button_pressed_lock_cpptoc.cc
Normal file
44
libcef_dll/cpptoc/views/menu_button_pressed_lock_cpptoc.cc
Normal file
@@ -0,0 +1,44 @@
|
||||
// Copyright (c) 2017 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.
|
||||
//
|
||||
// $hash=dffd7542aef11aa1adb55bd8c5dd6c29081f5caf$
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/views/menu_button_pressed_lock_cpptoc.h"
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefMenuButtonPressedLockCppToC::CefMenuButtonPressedLockCppToC() {}
|
||||
|
||||
template <>
|
||||
CefRefPtr<CefMenuButtonPressedLock>
|
||||
CefCppToCRefCounted<CefMenuButtonPressedLockCppToC,
|
||||
CefMenuButtonPressedLock,
|
||||
cef_menu_button_pressed_lock_t>::
|
||||
UnwrapDerived(CefWrapperType type, cef_menu_button_pressed_lock_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if DCHECK_IS_ON()
|
||||
template <>
|
||||
base::AtomicRefCount CefCppToCRefCounted<
|
||||
CefMenuButtonPressedLockCppToC,
|
||||
CefMenuButtonPressedLock,
|
||||
cef_menu_button_pressed_lock_t>::DebugObjCt ATOMIC_DECLARATION;
|
||||
#endif
|
||||
|
||||
template <>
|
||||
CefWrapperType
|
||||
CefCppToCRefCounted<CefMenuButtonPressedLockCppToC,
|
||||
CefMenuButtonPressedLock,
|
||||
cef_menu_button_pressed_lock_t>::kWrapperType =
|
||||
WT_MENU_BUTTON_PRESSED_LOCK;
|
39
libcef_dll/cpptoc/views/menu_button_pressed_lock_cpptoc.h
Normal file
39
libcef_dll/cpptoc/views/menu_button_pressed_lock_cpptoc.h
Normal file
@@ -0,0 +1,39 @@
|
||||
// Copyright (c) 2017 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.
|
||||
//
|
||||
// $hash=5b9354b2db247aaa4a3a6623ebdcb97aef98d0b7$
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_MENU_BUTTON_PRESSED_LOCK_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_VIEWS_MENU_BUTTON_PRESSED_LOCK_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#if !defined(BUILDING_CEF_SHARED)
|
||||
#error This file can be included DLL-side only
|
||||
#endif
|
||||
|
||||
#include "include/capi/views/cef_menu_button_capi.h"
|
||||
#include "include/capi/views/cef_menu_button_delegate_capi.h"
|
||||
#include "include/views/cef_menu_button.h"
|
||||
#include "include/views/cef_menu_button_delegate.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc_ref_counted.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefMenuButtonPressedLockCppToC
|
||||
: public CefCppToCRefCounted<CefMenuButtonPressedLockCppToC,
|
||||
CefMenuButtonPressedLock,
|
||||
cef_menu_button_pressed_lock_t> {
|
||||
public:
|
||||
CefMenuButtonPressedLockCppToC();
|
||||
};
|
||||
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_VIEWS_MENU_BUTTON_PRESSED_LOCK_CPPTOC_H_
|
@@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=9cf5d66da05ef9e423995bc8f527ef1315812134$
|
||||
// $hash=80a92fb23bc01d46903ea4e2076950a4ffe07b18$
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/views/window_delegate_cpptoc.h"
|
||||
@@ -56,6 +56,51 @@ window_delegate_on_window_destroyed(struct _cef_window_delegate_t* self,
|
||||
CefWindowCToCpp::Wrap(window));
|
||||
}
|
||||
|
||||
cef_window_t* CEF_CALLBACK
|
||||
window_delegate_get_parent_window(struct _cef_window_delegate_t* self,
|
||||
cef_window_t* window,
|
||||
int* is_menu,
|
||||
int* can_activate_menu) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
// Verify param: window; type: refptr_diff
|
||||
DCHECK(window);
|
||||
if (!window)
|
||||
return NULL;
|
||||
// Verify param: is_menu; type: bool_byaddr
|
||||
DCHECK(is_menu);
|
||||
if (!is_menu)
|
||||
return NULL;
|
||||
// Verify param: can_activate_menu; type: bool_byaddr
|
||||
DCHECK(can_activate_menu);
|
||||
if (!can_activate_menu)
|
||||
return NULL;
|
||||
|
||||
// Translate param: is_menu; type: bool_byaddr
|
||||
bool is_menuBool = (is_menu && *is_menu) ? true : false;
|
||||
// Translate param: can_activate_menu; type: bool_byaddr
|
||||
bool can_activate_menuBool =
|
||||
(can_activate_menu && *can_activate_menu) ? true : false;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefWindow> _retval =
|
||||
CefWindowDelegateCppToC::Get(self)->GetParentWindow(
|
||||
CefWindowCToCpp::Wrap(window), &is_menuBool, &can_activate_menuBool);
|
||||
|
||||
// Restore param: is_menu; type: bool_byaddr
|
||||
if (is_menu)
|
||||
*is_menu = is_menuBool ? true : false;
|
||||
// Restore param: can_activate_menu; type: bool_byaddr
|
||||
if (can_activate_menu)
|
||||
*can_activate_menu = can_activate_menuBool ? true : false;
|
||||
|
||||
// Return type: refptr_diff
|
||||
return CefWindowCToCpp::Unwrap(_retval);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK
|
||||
window_delegate_is_frameless(struct _cef_window_delegate_t* self,
|
||||
cef_window_t* window) {
|
||||
@@ -392,6 +437,7 @@ void CEF_CALLBACK window_delegate_on_blur(struct _cef_view_delegate_t* self,
|
||||
CefWindowDelegateCppToC::CefWindowDelegateCppToC() {
|
||||
GetStruct()->on_window_created = window_delegate_on_window_created;
|
||||
GetStruct()->on_window_destroyed = window_delegate_on_window_destroyed;
|
||||
GetStruct()->get_parent_window = window_delegate_get_parent_window;
|
||||
GetStruct()->is_frameless = window_delegate_is_frameless;
|
||||
GetStruct()->can_resize = window_delegate_can_resize;
|
||||
GetStruct()->can_maximize = window_delegate_can_maximize;
|
||||
|
@@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=aff3b781529dd68e4a26208c7ab116e8ecd8cca5$
|
||||
// $hash=068f8e238672b955b7f648002c80e364e24a936a$
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/browser_host_ctocpp.h"
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/browser_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/drag_data_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/extension_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/navigation_entry_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/request_context_ctocpp.h"
|
||||
#include "libcef_dll/transfer_util.h"
|
||||
@@ -820,6 +821,47 @@ void CefBrowserHostCToCpp::SetAccessibilityState(
|
||||
_struct->set_accessibility_state(_struct, accessibility_state);
|
||||
}
|
||||
|
||||
void CefBrowserHostCToCpp::SetAutoResizeEnabled(bool enabled,
|
||||
const CefSize& min_size,
|
||||
const CefSize& max_size) {
|
||||
cef_browser_host_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, set_auto_resize_enabled))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
_struct->set_auto_resize_enabled(_struct, enabled, &min_size, &max_size);
|
||||
}
|
||||
|
||||
CefRefPtr<CefExtension> CefBrowserHostCToCpp::GetExtension() {
|
||||
cef_browser_host_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_extension))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_extension_t* _retval = _struct->get_extension(_struct);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefExtensionCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
bool CefBrowserHostCToCpp::IsBackgroundHost() {
|
||||
cef_browser_host_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, is_background_host))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->is_background_host(_struct);
|
||||
|
||||
// Return type: bool
|
||||
return _retval ? true : false;
|
||||
}
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefBrowserHostCToCpp::CefBrowserHostCToCpp() {}
|
||||
|
@@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=589466ca4bd3e901d903764a71a4e8b1ee10003f$
|
||||
// $hash=2e9c65525e5d95bd4293d0529b0ff302cf96ed12$
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_BROWSER_HOST_CTOCPP_H_
|
||||
@@ -120,6 +120,11 @@ class CefBrowserHostCToCpp : public CefCToCppRefCounted<CefBrowserHostCToCpp,
|
||||
void DragSourceSystemDragEnded() OVERRIDE;
|
||||
CefRefPtr<CefNavigationEntry> GetVisibleNavigationEntry() OVERRIDE;
|
||||
void SetAccessibilityState(cef_state_t accessibility_state) OVERRIDE;
|
||||
void SetAutoResizeEnabled(bool enabled,
|
||||
const CefSize& min_size,
|
||||
const CefSize& max_size) OVERRIDE;
|
||||
CefRefPtr<CefExtension> GetExtension() OVERRIDE;
|
||||
bool IsBackgroundHost() OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_BROWSER_HOST_CTOCPP_H_
|
||||
|
@@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=3326b8685ef95a87e31c06ed4b2b7c1072e8dda2$
|
||||
// $hash=1948d2651fc5f7fd6aab7878da869b5d231b9cde$
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/display_handler_ctocpp.h"
|
||||
@@ -180,6 +180,27 @@ bool CefDisplayHandlerCToCpp::OnConsoleMessage(CefRefPtr<CefBrowser> browser,
|
||||
return _retval ? true : false;
|
||||
}
|
||||
|
||||
bool CefDisplayHandlerCToCpp::OnAutoResize(CefRefPtr<CefBrowser> browser,
|
||||
const CefSize& new_size) {
|
||||
cef_display_handler_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, on_auto_resize))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->on_auto_resize(
|
||||
_struct, CefBrowserCppToC::Wrap(browser), &new_size);
|
||||
|
||||
// Return type: bool
|
||||
return _retval ? true : false;
|
||||
}
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefDisplayHandlerCToCpp::CefDisplayHandlerCToCpp() {}
|
||||
|
@@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=309e3816e3daba60c7809230fdecb59d01e41847$
|
||||
// $hash=6d8ab7f2086373de52eb178cc640d2d553d43c58$
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_DISPLAY_HANDLER_CTOCPP_H_
|
||||
@@ -51,6 +51,8 @@ class CefDisplayHandlerCToCpp
|
||||
const CefString& message,
|
||||
const CefString& source,
|
||||
int line) override;
|
||||
bool OnAutoResize(CefRefPtr<CefBrowser> browser,
|
||||
const CefSize& new_size) override;
|
||||
};
|
||||
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_DISPLAY_HANDLER_CTOCPP_H_
|
||||
|
163
libcef_dll/ctocpp/extension_ctocpp.cc
Normal file
163
libcef_dll/ctocpp/extension_ctocpp.cc
Normal file
@@ -0,0 +1,163 @@
|
||||
// Copyright (c) 2017 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.
|
||||
//
|
||||
// $hash=03f1fdb03fe9164e965e62d3e703d1b5a548ffdd$
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/extension_ctocpp.h"
|
||||
#include "libcef_dll/cpptoc/extension_handler_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/dictionary_value_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/request_context_ctocpp.h"
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
CefString CefExtensionCToCpp::GetIdentifier() {
|
||||
cef_extension_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_identifier))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = _struct->get_identifier(_struct);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
CefString CefExtensionCToCpp::GetPath() {
|
||||
cef_extension_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_path))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = _struct->get_path(_struct);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
CefRefPtr<CefDictionaryValue> CefExtensionCToCpp::GetManifest() {
|
||||
cef_extension_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_manifest))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_dictionary_value_t* _retval = _struct->get_manifest(_struct);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefDictionaryValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
bool CefExtensionCToCpp::IsSame(CefRefPtr<CefExtension> that) {
|
||||
cef_extension_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, is_same))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: that; type: refptr_same
|
||||
DCHECK(that.get());
|
||||
if (!that.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->is_same(_struct, CefExtensionCToCpp::Unwrap(that));
|
||||
|
||||
// Return type: bool
|
||||
return _retval ? true : false;
|
||||
}
|
||||
|
||||
CefRefPtr<CefExtensionHandler> CefExtensionCToCpp::GetHandler() {
|
||||
cef_extension_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_handler))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_extension_handler_t* _retval = _struct->get_handler(_struct);
|
||||
|
||||
// Return type: refptr_diff
|
||||
return CefExtensionHandlerCppToC::Unwrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefRequestContext> CefExtensionCToCpp::GetLoaderContext() {
|
||||
cef_extension_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_loader_context))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_request_context_t* _retval = _struct->get_loader_context(_struct);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefRequestContextCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
bool CefExtensionCToCpp::IsLoaded() {
|
||||
cef_extension_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, is_loaded))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->is_loaded(_struct);
|
||||
|
||||
// Return type: bool
|
||||
return _retval ? true : false;
|
||||
}
|
||||
|
||||
void CefExtensionCToCpp::Unload() {
|
||||
cef_extension_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, unload))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
_struct->unload(_struct);
|
||||
}
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefExtensionCToCpp::CefExtensionCToCpp() {}
|
||||
|
||||
template <>
|
||||
cef_extension_t*
|
||||
CefCToCppRefCounted<CefExtensionCToCpp, CefExtension, cef_extension_t>::
|
||||
UnwrapDerived(CefWrapperType type, CefExtension* c) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if DCHECK_IS_ON()
|
||||
template <>
|
||||
base::AtomicRefCount
|
||||
CefCToCppRefCounted<CefExtensionCToCpp, CefExtension, cef_extension_t>::
|
||||
DebugObjCt ATOMIC_DECLARATION;
|
||||
#endif
|
||||
|
||||
template <>
|
||||
CefWrapperType CefCToCppRefCounted<CefExtensionCToCpp,
|
||||
CefExtension,
|
||||
cef_extension_t>::kWrapperType =
|
||||
WT_EXTENSION;
|
50
libcef_dll/ctocpp/extension_ctocpp.h
Normal file
50
libcef_dll/ctocpp/extension_ctocpp.h
Normal file
@@ -0,0 +1,50 @@
|
||||
// Copyright (c) 2017 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.
|
||||
//
|
||||
// $hash=b130e6a0c2cc23cb6eaa06b46a6bdb2bebf550b4$
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_EXTENSION_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_EXTENSION_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#if !defined(WRAPPING_CEF_SHARED)
|
||||
#error This file can be included wrapper-side only
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_extension_capi.h"
|
||||
#include "include/capi/cef_extension_handler_capi.h"
|
||||
#include "include/capi/cef_request_context_capi.h"
|
||||
#include "include/cef_extension.h"
|
||||
#include "include/cef_extension_handler.h"
|
||||
#include "include/cef_request_context.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefExtensionCToCpp : public CefCToCppRefCounted<CefExtensionCToCpp,
|
||||
CefExtension,
|
||||
cef_extension_t> {
|
||||
public:
|
||||
CefExtensionCToCpp();
|
||||
|
||||
// CefExtension methods.
|
||||
CefString GetIdentifier() OVERRIDE;
|
||||
CefString GetPath() OVERRIDE;
|
||||
CefRefPtr<CefDictionaryValue> GetManifest() OVERRIDE;
|
||||
bool IsSame(CefRefPtr<CefExtension> that) OVERRIDE;
|
||||
CefRefPtr<CefExtensionHandler> GetHandler() OVERRIDE;
|
||||
CefRefPtr<CefRequestContext> GetLoaderContext() OVERRIDE;
|
||||
bool IsLoaded() OVERRIDE;
|
||||
void Unload() OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_EXTENSION_CTOCPP_H_
|
238
libcef_dll/ctocpp/extension_handler_ctocpp.cc
Normal file
238
libcef_dll/ctocpp/extension_handler_ctocpp.cc
Normal file
@@ -0,0 +1,238 @@
|
||||
// Copyright (c) 2017 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.
|
||||
//
|
||||
// $hash=b8f2ada19624a72741d86b5d6ff5214a4b711dd6$
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/extension_handler_ctocpp.h"
|
||||
#include "libcef_dll/cpptoc/browser_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/extension_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/get_extension_resource_callback_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/client_ctocpp.h"
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
void CefExtensionHandlerCToCpp::OnExtensionLoadFailed(cef_errorcode_t result) {
|
||||
cef_extension_handler_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, on_extension_load_failed))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
_struct->on_extension_load_failed(_struct, result);
|
||||
}
|
||||
|
||||
void CefExtensionHandlerCToCpp::OnExtensionLoaded(
|
||||
CefRefPtr<CefExtension> extension) {
|
||||
cef_extension_handler_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, on_extension_loaded))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: extension; type: refptr_diff
|
||||
DCHECK(extension.get());
|
||||
if (!extension.get())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
_struct->on_extension_loaded(_struct, CefExtensionCppToC::Wrap(extension));
|
||||
}
|
||||
|
||||
void CefExtensionHandlerCToCpp::OnExtensionUnloaded(
|
||||
CefRefPtr<CefExtension> extension) {
|
||||
cef_extension_handler_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, on_extension_unloaded))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: extension; type: refptr_diff
|
||||
DCHECK(extension.get());
|
||||
if (!extension.get())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
_struct->on_extension_unloaded(_struct, CefExtensionCppToC::Wrap(extension));
|
||||
}
|
||||
|
||||
bool CefExtensionHandlerCToCpp::OnBeforeBackgroundBrowser(
|
||||
CefRefPtr<CefExtension> extension,
|
||||
const CefString& url,
|
||||
CefRefPtr<CefClient>& client,
|
||||
CefBrowserSettings& settings) {
|
||||
cef_extension_handler_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, on_before_background_browser))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: extension; type: refptr_diff
|
||||
DCHECK(extension.get());
|
||||
if (!extension.get())
|
||||
return false;
|
||||
// Verify param: url; type: string_byref_const
|
||||
DCHECK(!url.empty());
|
||||
if (url.empty())
|
||||
return false;
|
||||
|
||||
// Translate param: client; type: refptr_same_byref
|
||||
cef_client_t* clientStruct = NULL;
|
||||
if (client.get())
|
||||
clientStruct = CefClientCToCpp::Unwrap(client);
|
||||
cef_client_t* clientOrig = clientStruct;
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->on_before_background_browser(
|
||||
_struct, CefExtensionCppToC::Wrap(extension), url.GetStruct(),
|
||||
&clientStruct, &settings);
|
||||
|
||||
// Restore param:client; type: refptr_same_byref
|
||||
if (clientStruct) {
|
||||
if (clientStruct != clientOrig) {
|
||||
client = CefClientCToCpp::Wrap(clientStruct);
|
||||
}
|
||||
} else {
|
||||
client = NULL;
|
||||
}
|
||||
|
||||
// Return type: bool
|
||||
return _retval ? true : false;
|
||||
}
|
||||
|
||||
CefRefPtr<CefBrowser> CefExtensionHandlerCToCpp::GetActiveBrowser(
|
||||
CefRefPtr<CefExtension> extension,
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
bool include_incognito) {
|
||||
cef_extension_handler_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_active_browser))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: extension; type: refptr_diff
|
||||
DCHECK(extension.get());
|
||||
if (!extension.get())
|
||||
return NULL;
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
cef_browser_t* _retval = _struct->get_active_browser(
|
||||
_struct, CefExtensionCppToC::Wrap(extension),
|
||||
CefBrowserCppToC::Wrap(browser), include_incognito);
|
||||
|
||||
// Return type: refptr_diff
|
||||
return CefBrowserCppToC::Unwrap(_retval);
|
||||
}
|
||||
|
||||
bool CefExtensionHandlerCToCpp::CanAccessBrowser(
|
||||
CefRefPtr<CefExtension> extension,
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
bool include_incognito,
|
||||
CefRefPtr<CefBrowser> target_browser) {
|
||||
cef_extension_handler_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, can_access_browser))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: extension; type: refptr_diff
|
||||
DCHECK(extension.get());
|
||||
if (!extension.get())
|
||||
return false;
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return false;
|
||||
// Verify param: target_browser; type: refptr_diff
|
||||
DCHECK(target_browser.get());
|
||||
if (!target_browser.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->can_access_browser(
|
||||
_struct, CefExtensionCppToC::Wrap(extension),
|
||||
CefBrowserCppToC::Wrap(browser), include_incognito,
|
||||
CefBrowserCppToC::Wrap(target_browser));
|
||||
|
||||
// Return type: bool
|
||||
return _retval ? true : false;
|
||||
}
|
||||
|
||||
bool CefExtensionHandlerCToCpp::GetExtensionResource(
|
||||
CefRefPtr<CefExtension> extension,
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
const CefString& file,
|
||||
CefRefPtr<CefGetExtensionResourceCallback> callback) {
|
||||
cef_extension_handler_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_extension_resource))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: extension; type: refptr_diff
|
||||
DCHECK(extension.get());
|
||||
if (!extension.get())
|
||||
return false;
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return false;
|
||||
// Verify param: file; type: string_byref_const
|
||||
DCHECK(!file.empty());
|
||||
if (file.empty())
|
||||
return false;
|
||||
// Verify param: callback; type: refptr_diff
|
||||
DCHECK(callback.get());
|
||||
if (!callback.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->get_extension_resource(
|
||||
_struct, CefExtensionCppToC::Wrap(extension),
|
||||
CefBrowserCppToC::Wrap(browser), file.GetStruct(),
|
||||
CefGetExtensionResourceCallbackCppToC::Wrap(callback));
|
||||
|
||||
// Return type: bool
|
||||
return _retval ? true : false;
|
||||
}
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefExtensionHandlerCToCpp::CefExtensionHandlerCToCpp() {}
|
||||
|
||||
template <>
|
||||
cef_extension_handler_t* CefCToCppRefCounted<
|
||||
CefExtensionHandlerCToCpp,
|
||||
CefExtensionHandler,
|
||||
cef_extension_handler_t>::UnwrapDerived(CefWrapperType type,
|
||||
CefExtensionHandler* c) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if DCHECK_IS_ON()
|
||||
template <>
|
||||
base::AtomicRefCount CefCToCppRefCounted<CefExtensionHandlerCToCpp,
|
||||
CefExtensionHandler,
|
||||
cef_extension_handler_t>::DebugObjCt
|
||||
ATOMIC_DECLARATION;
|
||||
#endif
|
||||
|
||||
template <>
|
||||
CefWrapperType CefCToCppRefCounted<CefExtensionHandlerCToCpp,
|
||||
CefExtensionHandler,
|
||||
cef_extension_handler_t>::kWrapperType =
|
||||
WT_EXTENSION_HANDLER;
|
60
libcef_dll/ctocpp/extension_handler_ctocpp.h
Normal file
60
libcef_dll/ctocpp/extension_handler_ctocpp.h
Normal file
@@ -0,0 +1,60 @@
|
||||
// Copyright (c) 2017 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.
|
||||
//
|
||||
// $hash=369179037f2f6abc4d30e25099b52acf2f71e1e2$
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_EXTENSION_HANDLER_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_EXTENSION_HANDLER_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#if !defined(BUILDING_CEF_SHARED)
|
||||
#error This file can be included DLL-side only
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_client_capi.h"
|
||||
#include "include/capi/cef_extension_handler_capi.h"
|
||||
#include "include/cef_client.h"
|
||||
#include "include/cef_extension_handler.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefExtensionHandlerCToCpp
|
||||
: public CefCToCppRefCounted<CefExtensionHandlerCToCpp,
|
||||
CefExtensionHandler,
|
||||
cef_extension_handler_t> {
|
||||
public:
|
||||
CefExtensionHandlerCToCpp();
|
||||
|
||||
// CefExtensionHandler methods.
|
||||
void OnExtensionLoadFailed(cef_errorcode_t result) override;
|
||||
void OnExtensionLoaded(CefRefPtr<CefExtension> extension) override;
|
||||
void OnExtensionUnloaded(CefRefPtr<CefExtension> extension) override;
|
||||
bool OnBeforeBackgroundBrowser(CefRefPtr<CefExtension> extension,
|
||||
const CefString& url,
|
||||
CefRefPtr<CefClient>& client,
|
||||
CefBrowserSettings& settings) override;
|
||||
CefRefPtr<CefBrowser> GetActiveBrowser(CefRefPtr<CefExtension> extension,
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
bool include_incognito) override;
|
||||
bool CanAccessBrowser(CefRefPtr<CefExtension> extension,
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
bool include_incognito,
|
||||
CefRefPtr<CefBrowser> target_browser) override;
|
||||
bool GetExtensionResource(
|
||||
CefRefPtr<CefExtension> extension,
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
const CefString& file,
|
||||
CefRefPtr<CefGetExtensionResourceCallback> callback) override;
|
||||
};
|
||||
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_EXTENSION_HANDLER_CTOCPP_H_
|
73
libcef_dll/ctocpp/get_extension_resource_callback_ctocpp.cc
Normal file
73
libcef_dll/ctocpp/get_extension_resource_callback_ctocpp.cc
Normal file
@@ -0,0 +1,73 @@
|
||||
// Copyright (c) 2017 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.
|
||||
//
|
||||
// $hash=9ce6ac777c6afb7f0c015c3ad5c1e73c176af0d0$
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/get_extension_resource_callback_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/stream_reader_ctocpp.h"
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
void CefGetExtensionResourceCallbackCToCpp::Continue(
|
||||
CefRefPtr<CefStreamReader> stream) {
|
||||
cef_get_extension_resource_callback_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, cont))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Unverified params: stream
|
||||
|
||||
// Execute
|
||||
_struct->cont(_struct, CefStreamReaderCToCpp::Unwrap(stream));
|
||||
}
|
||||
|
||||
void CefGetExtensionResourceCallbackCToCpp::Cancel() {
|
||||
cef_get_extension_resource_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.
|
||||
|
||||
CefGetExtensionResourceCallbackCToCpp::CefGetExtensionResourceCallbackCToCpp() {
|
||||
}
|
||||
|
||||
template <>
|
||||
cef_get_extension_resource_callback_t*
|
||||
CefCToCppRefCounted<CefGetExtensionResourceCallbackCToCpp,
|
||||
CefGetExtensionResourceCallback,
|
||||
cef_get_extension_resource_callback_t>::
|
||||
UnwrapDerived(CefWrapperType type, CefGetExtensionResourceCallback* c) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if DCHECK_IS_ON()
|
||||
template <>
|
||||
base::AtomicRefCount CefCToCppRefCounted<
|
||||
CefGetExtensionResourceCallbackCToCpp,
|
||||
CefGetExtensionResourceCallback,
|
||||
cef_get_extension_resource_callback_t>::DebugObjCt ATOMIC_DECLARATION;
|
||||
#endif
|
||||
|
||||
template <>
|
||||
CefWrapperType
|
||||
CefCToCppRefCounted<CefGetExtensionResourceCallbackCToCpp,
|
||||
CefGetExtensionResourceCallback,
|
||||
cef_get_extension_resource_callback_t>::kWrapperType =
|
||||
WT_GET_EXTENSION_RESOURCE_CALLBACK;
|
43
libcef_dll/ctocpp/get_extension_resource_callback_ctocpp.h
Normal file
43
libcef_dll/ctocpp/get_extension_resource_callback_ctocpp.h
Normal file
@@ -0,0 +1,43 @@
|
||||
// Copyright (c) 2017 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.
|
||||
//
|
||||
// $hash=a30c4e51250f312d20fff853063eb78fb23fc3c2$
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_GET_EXTENSION_RESOURCE_CALLBACK_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_GET_EXTENSION_RESOURCE_CALLBACK_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#if !defined(WRAPPING_CEF_SHARED)
|
||||
#error This file can be included wrapper-side only
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_client_capi.h"
|
||||
#include "include/capi/cef_extension_handler_capi.h"
|
||||
#include "include/cef_client.h"
|
||||
#include "include/cef_extension_handler.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefGetExtensionResourceCallbackCToCpp
|
||||
: public CefCToCppRefCounted<CefGetExtensionResourceCallbackCToCpp,
|
||||
CefGetExtensionResourceCallback,
|
||||
cef_get_extension_resource_callback_t> {
|
||||
public:
|
||||
CefGetExtensionResourceCallbackCToCpp();
|
||||
|
||||
// CefGetExtensionResourceCallback methods.
|
||||
void Continue(CefRefPtr<CefStreamReader> stream) OVERRIDE;
|
||||
void Cancel() OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_GET_EXTENSION_RESOURCE_CALLBACK_CTOCPP_H_
|
@@ -9,16 +9,18 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=eb7605c00ee71d056306cd6b9d0e7eb55112927a$
|
||||
// $hash=7199bc96d7ab4c07229d7d8cb078a9b64621042c$
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/request_context_ctocpp.h"
|
||||
#include "libcef_dll/cpptoc/completion_callback_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/extension_handler_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/request_context_handler_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/resolve_callback_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/cookie_manager_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/dictionary_value_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/extension_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/value_ctocpp.h"
|
||||
#include "libcef_dll/transfer_util.h"
|
||||
|
||||
@@ -410,6 +412,115 @@ cef_errorcode_t CefRequestContextCToCpp::ResolveHostCached(
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CefRequestContextCToCpp::LoadExtension(
|
||||
const CefString& root_directory,
|
||||
CefRefPtr<CefDictionaryValue> manifest,
|
||||
CefRefPtr<CefExtensionHandler> handler) {
|
||||
cef_request_context_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, load_extension))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: root_directory; type: string_byref_const
|
||||
DCHECK(!root_directory.empty());
|
||||
if (root_directory.empty())
|
||||
return;
|
||||
// Unverified params: manifest, handler
|
||||
|
||||
// Execute
|
||||
_struct->load_extension(_struct, root_directory.GetStruct(),
|
||||
CefDictionaryValueCToCpp::Unwrap(manifest),
|
||||
CefExtensionHandlerCppToC::Wrap(handler));
|
||||
}
|
||||
|
||||
bool CefRequestContextCToCpp::DidLoadExtension(const CefString& extension_id) {
|
||||
cef_request_context_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, did_load_extension))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: extension_id; type: string_byref_const
|
||||
DCHECK(!extension_id.empty());
|
||||
if (extension_id.empty())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->did_load_extension(_struct, extension_id.GetStruct());
|
||||
|
||||
// Return type: bool
|
||||
return _retval ? true : false;
|
||||
}
|
||||
|
||||
bool CefRequestContextCToCpp::HasExtension(const CefString& extension_id) {
|
||||
cef_request_context_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, has_extension))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: extension_id; type: string_byref_const
|
||||
DCHECK(!extension_id.empty());
|
||||
if (extension_id.empty())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->has_extension(_struct, extension_id.GetStruct());
|
||||
|
||||
// Return type: bool
|
||||
return _retval ? true : false;
|
||||
}
|
||||
|
||||
bool CefRequestContextCToCpp::GetExtensions(
|
||||
std::vector<CefString>& extension_ids) {
|
||||
cef_request_context_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_extensions))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Translate param: extension_ids; type: string_vec_byref
|
||||
cef_string_list_t extension_idsList = cef_string_list_alloc();
|
||||
DCHECK(extension_idsList);
|
||||
if (extension_idsList)
|
||||
transfer_string_list_contents(extension_ids, extension_idsList);
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->get_extensions(_struct, extension_idsList);
|
||||
|
||||
// Restore param:extension_ids; type: string_vec_byref
|
||||
if (extension_idsList) {
|
||||
extension_ids.clear();
|
||||
transfer_string_list_contents(extension_idsList, extension_ids);
|
||||
cef_string_list_free(extension_idsList);
|
||||
}
|
||||
|
||||
// Return type: bool
|
||||
return _retval ? true : false;
|
||||
}
|
||||
|
||||
CefRefPtr<CefExtension> CefRequestContextCToCpp::GetExtension(
|
||||
const CefString& extension_id) {
|
||||
cef_request_context_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_extension))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: extension_id; type: string_byref_const
|
||||
DCHECK(!extension_id.empty());
|
||||
if (extension_id.empty())
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
cef_extension_t* _retval =
|
||||
_struct->get_extension(_struct, extension_id.GetStruct());
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefExtensionCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefRequestContextCToCpp::CefRequestContextCToCpp() {}
|
||||
|
@@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=007659e858fb2ce87b3974d8d304d850434bac8b$
|
||||
// $hash=4e86aeaf1eea5a2357e094952219ec6dd8f956bb$
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_CONTEXT_CTOCPP_H_
|
||||
@@ -66,6 +66,13 @@ class CefRequestContextCToCpp
|
||||
cef_errorcode_t ResolveHostCached(
|
||||
const CefString& origin,
|
||||
std::vector<CefString>& resolved_ips) OVERRIDE;
|
||||
void LoadExtension(const CefString& root_directory,
|
||||
CefRefPtr<CefDictionaryValue> manifest,
|
||||
CefRefPtr<CefExtensionHandler> handler) OVERRIDE;
|
||||
bool DidLoadExtension(const CefString& extension_id) OVERRIDE;
|
||||
bool HasExtension(const CefString& extension_id) OVERRIDE;
|
||||
bool GetExtensions(std::vector<CefString>& extension_ids) OVERRIDE;
|
||||
CefRefPtr<CefExtension> GetExtension(const CefString& extension_id) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_REQUEST_CONTEXT_CTOCPP_H_
|
||||
|
@@ -9,15 +9,34 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=06dd198c1341ffa14ae98b3937df025322ed5510$
|
||||
// $hash=aeb8be6019f69c4271ae0e35c4a6759dc46cc33d$
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/request_context_handler_ctocpp.h"
|
||||
#include "libcef_dll/cpptoc/cookie_manager_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/request_context_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/web_plugin_info_cpptoc.h"
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
void CefRequestContextHandlerCToCpp::OnRequestContextInitialized(
|
||||
CefRefPtr<CefRequestContext> request_context) {
|
||||
cef_request_context_handler_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, on_request_context_initialized))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: request_context; type: refptr_diff
|
||||
DCHECK(request_context.get());
|
||||
if (!request_context.get())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
_struct->on_request_context_initialized(
|
||||
_struct, CefRequestContextCppToC::Wrap(request_context));
|
||||
}
|
||||
|
||||
CefRefPtr<CefCookieManager> CefRequestContextHandlerCToCpp::GetCookieManager() {
|
||||
cef_request_context_handler_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_cookie_manager))
|
||||
|
@@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=f51e1ceef8535c2d81dd7a9918da5e3b9861376f$
|
||||
// $hash=e2ff660c7baffdce4c00f6ae132a770e13bd9358$
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_CONTEXT_HANDLER_CTOCPP_H_
|
||||
@@ -20,7 +20,9 @@
|
||||
#error This file can be included DLL-side only
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_request_context_capi.h"
|
||||
#include "include/capi/cef_request_context_handler_capi.h"
|
||||
#include "include/cef_request_context.h"
|
||||
#include "include/cef_request_context_handler.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
|
||||
|
||||
@@ -34,6 +36,8 @@ class CefRequestContextHandlerCToCpp
|
||||
CefRequestContextHandlerCToCpp();
|
||||
|
||||
// CefRequestContextHandler methods.
|
||||
void OnRequestContextInitialized(
|
||||
CefRefPtr<CefRequestContext> request_context) override;
|
||||
CefRefPtr<CefCookieManager> GetCookieManager() override;
|
||||
bool OnBeforePluginLoad(const CefString& mime_type,
|
||||
const CefString& plugin_url,
|
||||
|
@@ -9,19 +9,21 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=c1af150d3b847d4fda504d0f9c668d90fa348308$
|
||||
// $hash=81cf9c1f1aff3557bd27f8751d2df517f2f73249$
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/views/menu_button_delegate_ctocpp.h"
|
||||
#include "libcef_dll/cpptoc/views/button_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/menu_button_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/menu_button_pressed_lock_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/view_cpptoc.h"
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
void CefMenuButtonDelegateCToCpp::OnMenuButtonPressed(
|
||||
CefRefPtr<CefMenuButton> menu_button,
|
||||
const CefPoint& screen_point) {
|
||||
const CefPoint& screen_point,
|
||||
CefRefPtr<CefMenuButtonPressedLock> button_pressed_lock) {
|
||||
cef_menu_button_delegate_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, on_menu_button_pressed))
|
||||
return;
|
||||
@@ -32,10 +34,15 @@ void CefMenuButtonDelegateCToCpp::OnMenuButtonPressed(
|
||||
DCHECK(menu_button.get());
|
||||
if (!menu_button.get())
|
||||
return;
|
||||
// Verify param: button_pressed_lock; type: refptr_diff
|
||||
DCHECK(button_pressed_lock.get());
|
||||
if (!button_pressed_lock.get())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
_struct->on_menu_button_pressed(
|
||||
_struct, CefMenuButtonCppToC::Wrap(menu_button), &screen_point);
|
||||
_struct, CefMenuButtonCppToC::Wrap(menu_button), &screen_point,
|
||||
CefMenuButtonPressedLockCppToC::Wrap(button_pressed_lock));
|
||||
}
|
||||
|
||||
void CefMenuButtonDelegateCToCpp::OnButtonPressed(CefRefPtr<CefButton> button) {
|
||||
|
@@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=71ef57288d2a5fc3a22b1f22385ac43303f37256$
|
||||
// $hash=f9fc3392a980679bb9c2786f0f61ce1a12219c24$
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_MENU_BUTTON_DELEGATE_CTOCPP_H_
|
||||
@@ -36,8 +36,10 @@ class CefMenuButtonDelegateCToCpp
|
||||
CefMenuButtonDelegateCToCpp();
|
||||
|
||||
// CefMenuButtonDelegate methods.
|
||||
void OnMenuButtonPressed(CefRefPtr<CefMenuButton> menu_button,
|
||||
const CefPoint& screen_point) override;
|
||||
void OnMenuButtonPressed(
|
||||
CefRefPtr<CefMenuButton> menu_button,
|
||||
const CefPoint& screen_point,
|
||||
CefRefPtr<CefMenuButtonPressedLock> button_pressed_lock) override;
|
||||
|
||||
// CefButtonDelegate methods.
|
||||
void OnButtonPressed(CefRefPtr<CefButton> button) override;
|
||||
|
45
libcef_dll/ctocpp/views/menu_button_pressed_lock_ctocpp.cc
Normal file
45
libcef_dll/ctocpp/views/menu_button_pressed_lock_ctocpp.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
// Copyright (c) 2017 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.
|
||||
//
|
||||
// $hash=c43f3b09cdeca57178d011390a0b1aef581ead6a$
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/views/menu_button_pressed_lock_ctocpp.h"
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefMenuButtonPressedLockCToCpp::CefMenuButtonPressedLockCToCpp() {}
|
||||
|
||||
template <>
|
||||
cef_menu_button_pressed_lock_t* CefCToCppRefCounted<
|
||||
CefMenuButtonPressedLockCToCpp,
|
||||
CefMenuButtonPressedLock,
|
||||
cef_menu_button_pressed_lock_t>::UnwrapDerived(CefWrapperType type,
|
||||
CefMenuButtonPressedLock*
|
||||
c) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if DCHECK_IS_ON()
|
||||
template <>
|
||||
base::AtomicRefCount CefCToCppRefCounted<
|
||||
CefMenuButtonPressedLockCToCpp,
|
||||
CefMenuButtonPressedLock,
|
||||
cef_menu_button_pressed_lock_t>::DebugObjCt ATOMIC_DECLARATION;
|
||||
#endif
|
||||
|
||||
template <>
|
||||
CefWrapperType
|
||||
CefCToCppRefCounted<CefMenuButtonPressedLockCToCpp,
|
||||
CefMenuButtonPressedLock,
|
||||
cef_menu_button_pressed_lock_t>::kWrapperType =
|
||||
WT_MENU_BUTTON_PRESSED_LOCK;
|
41
libcef_dll/ctocpp/views/menu_button_pressed_lock_ctocpp.h
Normal file
41
libcef_dll/ctocpp/views/menu_button_pressed_lock_ctocpp.h
Normal file
@@ -0,0 +1,41 @@
|
||||
// Copyright (c) 2017 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.
|
||||
//
|
||||
// $hash=2a275bd4a57c74df08bef4a5a0d8e3f8d2b22305$
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_MENU_BUTTON_PRESSED_LOCK_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_VIEWS_MENU_BUTTON_PRESSED_LOCK_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#if !defined(WRAPPING_CEF_SHARED)
|
||||
#error This file can be included wrapper-side only
|
||||
#endif
|
||||
|
||||
#include "include/capi/views/cef_menu_button_capi.h"
|
||||
#include "include/capi/views/cef_menu_button_delegate_capi.h"
|
||||
#include "include/views/cef_menu_button.h"
|
||||
#include "include/views/cef_menu_button_delegate.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefMenuButtonPressedLockCToCpp
|
||||
: public CefCToCppRefCounted<CefMenuButtonPressedLockCToCpp,
|
||||
CefMenuButtonPressedLock,
|
||||
cef_menu_button_pressed_lock_t> {
|
||||
public:
|
||||
CefMenuButtonPressedLockCToCpp();
|
||||
|
||||
// CefMenuButtonPressedLock methods.
|
||||
};
|
||||
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_VIEWS_MENU_BUTTON_PRESSED_LOCK_CTOCPP_H_
|
@@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=c2256192e44464a7c89f2e43619a92049d1c080c$
|
||||
// $hash=8c1a14a8634516a37f562c6b295c30fe3f30c179$
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/views/window_delegate_ctocpp.h"
|
||||
@@ -50,6 +50,50 @@ void CefWindowDelegateCToCpp::OnWindowDestroyed(CefRefPtr<CefWindow> window) {
|
||||
_struct->on_window_destroyed(_struct, CefWindowCppToC::Wrap(window));
|
||||
}
|
||||
|
||||
CefRefPtr<CefWindow> CefWindowDelegateCToCpp::GetParentWindow(
|
||||
CefRefPtr<CefWindow> window,
|
||||
bool* is_menu,
|
||||
bool* can_activate_menu) {
|
||||
cef_window_delegate_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_parent_window))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: window; type: refptr_diff
|
||||
DCHECK(window.get());
|
||||
if (!window.get())
|
||||
return NULL;
|
||||
// Verify param: is_menu; type: bool_byaddr
|
||||
DCHECK(is_menu);
|
||||
if (!is_menu)
|
||||
return NULL;
|
||||
// Verify param: can_activate_menu; type: bool_byaddr
|
||||
DCHECK(can_activate_menu);
|
||||
if (!can_activate_menu)
|
||||
return NULL;
|
||||
|
||||
// Translate param: is_menu; type: bool_byaddr
|
||||
int is_menuInt = is_menu ? *is_menu : 0;
|
||||
// Translate param: can_activate_menu; type: bool_byaddr
|
||||
int can_activate_menuInt = can_activate_menu ? *can_activate_menu : 0;
|
||||
|
||||
// Execute
|
||||
cef_window_t* _retval =
|
||||
_struct->get_parent_window(_struct, CefWindowCppToC::Wrap(window),
|
||||
&is_menuInt, &can_activate_menuInt);
|
||||
|
||||
// Restore param:is_menu; type: bool_byaddr
|
||||
if (is_menu)
|
||||
*is_menu = is_menuInt ? true : false;
|
||||
// Restore param:can_activate_menu; type: bool_byaddr
|
||||
if (can_activate_menu)
|
||||
*can_activate_menu = can_activate_menuInt ? true : false;
|
||||
|
||||
// Return type: refptr_diff
|
||||
return CefWindowCppToC::Unwrap(_retval);
|
||||
}
|
||||
|
||||
bool CefWindowDelegateCToCpp::IsFrameless(CefRefPtr<CefWindow> window) {
|
||||
cef_window_delegate_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, is_frameless))
|
||||
|
@@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=d6154885643d45eb81ecbd3a017776983a841651$
|
||||
// $hash=9eb43c9bb618484946e6915808822b1af7ad2258$
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_WINDOW_DELEGATE_CTOCPP_H_
|
||||
@@ -38,6 +38,9 @@ class CefWindowDelegateCToCpp
|
||||
// CefWindowDelegate methods.
|
||||
void OnWindowCreated(CefRefPtr<CefWindow> window) override;
|
||||
void OnWindowDestroyed(CefRefPtr<CefWindow> window) override;
|
||||
CefRefPtr<CefWindow> GetParentWindow(CefRefPtr<CefWindow> window,
|
||||
bool* is_menu,
|
||||
bool* can_activate_menu) override;
|
||||
bool IsFrameless(CefRefPtr<CefWindow> window) override;
|
||||
bool CanResize(CefRefPtr<CefWindow> window) override;
|
||||
bool CanMaximize(CefRefPtr<CefWindow> window) override;
|
||||
|
@@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=45f1ced8a482b44d73c8538fbbdbc27e73003d6f$
|
||||
// $hash=2df1182745ef1d14ed20428c53ed7638742c13f9$
|
||||
//
|
||||
|
||||
#include "include/capi/cef_app_capi.h"
|
||||
@@ -56,9 +56,11 @@
|
||||
#include "libcef_dll/cpptoc/download_item_callback_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/download_item_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/drag_data_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/extension_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/file_dialog_callback_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/frame_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/geolocation_callback_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/get_extension_resource_callback_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/image_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/jsdialog_callback_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/list_value_cpptoc.h"
|
||||
@@ -100,6 +102,7 @@
|
||||
#include "libcef_dll/cpptoc/views/label_button_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/layout_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/menu_button_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/menu_button_pressed_lock_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/panel_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/scroll_view_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/textfield_cpptoc.h"
|
||||
@@ -125,6 +128,7 @@
|
||||
#include "libcef_dll/ctocpp/download_image_callback_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/drag_handler_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/end_tracing_callback_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/extension_handler_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/find_handler_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/focus_handler_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/geolocation_handler_ctocpp.h"
|
||||
@@ -277,6 +281,8 @@ CEF_EXPORT void cef_shutdown() {
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefDragDataCppToC::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefDragHandlerCToCpp::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefEndTracingCallbackCToCpp::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefExtensionCppToC::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefExtensionHandlerCToCpp::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefFileDialogCallbackCppToC::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefFillLayoutCppToC::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefFindHandlerCToCpp::DebugObjCt));
|
||||
@@ -284,6 +290,8 @@ CEF_EXPORT void cef_shutdown() {
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefFrameCppToC::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefGeolocationCallbackCppToC::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefGeolocationHandlerCToCpp::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(
|
||||
&CefGetExtensionResourceCallbackCppToC::DebugObjCt));
|
||||
DCHECK(
|
||||
base::AtomicRefCountIsZero(&CefGetGeolocationCallbackCToCpp::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefImageCppToC::DebugObjCt));
|
||||
@@ -297,6 +305,8 @@ CEF_EXPORT void cef_shutdown() {
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefLoadHandlerCToCpp::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefMenuButtonCppToC::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefMenuButtonDelegateCToCpp::DebugObjCt));
|
||||
DCHECK(
|
||||
base::AtomicRefCountIsZero(&CefMenuButtonPressedLockCppToC::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefMenuModelCppToC::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefMenuModelDelegateCToCpp::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefNavigationEntryCppToC::DebugObjCt));
|
||||
|
@@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=5adfe7f61a476b5b7dac0365f481efc213b3c579$
|
||||
// $hash=82e24ebf13dbb1b7430a4710fd3d296b98311d1d$
|
||||
//
|
||||
|
||||
#include "include/capi/cef_app_capi.h"
|
||||
@@ -57,6 +57,7 @@
|
||||
#include "libcef_dll/cpptoc/download_image_callback_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/drag_handler_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/end_tracing_callback_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/extension_handler_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/find_handler_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/focus_handler_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/geolocation_handler_cpptoc.h"
|
||||
@@ -115,9 +116,11 @@
|
||||
#include "libcef_dll/ctocpp/download_item_callback_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/download_item_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/drag_data_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/extension_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/file_dialog_callback_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/frame_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/geolocation_callback_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/get_extension_resource_callback_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/image_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/jsdialog_callback_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/list_value_ctocpp.h"
|
||||
@@ -159,6 +162,7 @@
|
||||
#include "libcef_dll/ctocpp/views/label_button_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/views/layout_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/views/menu_button_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/views/menu_button_pressed_lock_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/views/panel_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/views/scroll_view_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/views/textfield_ctocpp.h"
|
||||
@@ -268,6 +272,8 @@ CEF_GLOBAL void CefShutdown() {
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefDragDataCToCpp::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefDragHandlerCppToC::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefEndTracingCallbackCppToC::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefExtensionCToCpp::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefExtensionHandlerCppToC::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefFileDialogCallbackCToCpp::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefFillLayoutCToCpp::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefFindHandlerCppToC::DebugObjCt));
|
||||
@@ -275,6 +281,8 @@ CEF_GLOBAL void CefShutdown() {
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefFrameCToCpp::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefGeolocationCallbackCToCpp::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefGeolocationHandlerCppToC::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(
|
||||
&CefGetExtensionResourceCallbackCToCpp::DebugObjCt));
|
||||
DCHECK(
|
||||
base::AtomicRefCountIsZero(&CefGetGeolocationCallbackCppToC::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefImageCToCpp::DebugObjCt));
|
||||
@@ -288,6 +296,8 @@ CEF_GLOBAL void CefShutdown() {
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefLoadHandlerCppToC::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefMenuButtonCToCpp::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefMenuButtonDelegateCppToC::DebugObjCt));
|
||||
DCHECK(
|
||||
base::AtomicRefCountIsZero(&CefMenuButtonPressedLockCToCpp::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefMenuModelCToCpp::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefMenuModelDelegateCppToC::DebugObjCt));
|
||||
DCHECK(base::AtomicRefCountIsZero(&CefNavigationEntryCToCpp::DebugObjCt));
|
||||
|
@@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=6e2b488ccd8d106f6bf4a53209bb8d79848c7fb5$
|
||||
// $hash=0e103b8e82d15405eb5fdb2efc48992dae1e9656$
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_WRAPPER_TYPES_H_
|
||||
@@ -55,6 +55,8 @@ enum CefWrapperType {
|
||||
WT_DRAG_DATA,
|
||||
WT_DRAG_HANDLER,
|
||||
WT_END_TRACING_CALLBACK,
|
||||
WT_EXTENSION,
|
||||
WT_EXTENSION_HANDLER,
|
||||
WT_FILE_DIALOG_CALLBACK,
|
||||
WT_FILL_LAYOUT,
|
||||
WT_FIND_HANDLER,
|
||||
@@ -62,6 +64,7 @@ enum CefWrapperType {
|
||||
WT_FRAME,
|
||||
WT_GEOLOCATION_CALLBACK,
|
||||
WT_GEOLOCATION_HANDLER,
|
||||
WT_GET_EXTENSION_RESOURCE_CALLBACK,
|
||||
WT_GET_GEOLOCATION_CALLBACK,
|
||||
WT_IMAGE,
|
||||
WT_JSDIALOG_CALLBACK,
|
||||
@@ -74,6 +77,7 @@ enum CefWrapperType {
|
||||
WT_LOAD_HANDLER,
|
||||
WT_MENU_BUTTON,
|
||||
WT_MENU_BUTTON_DELEGATE,
|
||||
WT_MENU_BUTTON_PRESSED_LOCK,
|
||||
WT_MENU_MODEL,
|
||||
WT_MENU_MODEL_DELEGATE,
|
||||
WT_NAVIGATION_ENTRY,
|
||||
|
Reference in New Issue
Block a user