mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Improve inheritance support in the CEF API (issue #1623).
- Support single parent inheritance in CEF API classes. - Support non-virtual inheritance in CEF API classes. - Support translation of CEF API sub-directories. - Add test sub-directories for testing-only functionality that will be available to unit tests but not exposed via the binary distribution. - Add unit tests for the translator tool. - Fix parsing of template parameter types that include commas.
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
#include "libcef_dll/ctocpp/scheme_registrar_ctocpp.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK app_on_before_command_line_processing(struct _cef_app_t* self,
|
||||
@@ -105,17 +107,24 @@ struct _cef_render_process_handler_t* CEF_CALLBACK app_get_render_process_handle
|
||||
return CefRenderProcessHandlerCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefAppCppToC::CefAppCppToC(CefApp* cls)
|
||||
: CefCppToC<CefAppCppToC, CefApp, cef_app_t>(cls) {
|
||||
struct_.struct_.on_before_command_line_processing =
|
||||
CefAppCppToC::CefAppCppToC() {
|
||||
GetStruct()->on_before_command_line_processing =
|
||||
app_on_before_command_line_processing;
|
||||
struct_.struct_.on_register_custom_schemes = app_on_register_custom_schemes;
|
||||
struct_.struct_.get_resource_bundle_handler = app_get_resource_bundle_handler;
|
||||
struct_.struct_.get_browser_process_handler = app_get_browser_process_handler;
|
||||
struct_.struct_.get_render_process_handler = app_get_render_process_handler;
|
||||
GetStruct()->on_register_custom_schemes = app_on_register_custom_schemes;
|
||||
GetStruct()->get_resource_bundle_handler = app_get_resource_bundle_handler;
|
||||
GetStruct()->get_browser_process_handler = app_get_browser_process_handler;
|
||||
GetStruct()->get_render_process_handler = app_get_render_process_handler;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefApp> CefCppToC<CefAppCppToC, CefApp,
|
||||
cef_app_t>::UnwrapDerived(CefWrapperType type, cef_app_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -123,3 +132,5 @@ template<> base::AtomicRefCount CefCppToC<CefAppCppToC, CefApp,
|
||||
cef_app_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefAppCppToC, CefApp,
|
||||
cef_app_t>::kWrapperType = WT_APP;
|
||||
|
@@ -27,9 +27,8 @@
|
||||
class CefAppCppToC
|
||||
: public CefCppToC<CefAppCppToC, CefApp, cef_app_t> {
|
||||
public:
|
||||
explicit CefAppCppToC(CefApp* cls);
|
||||
CefAppCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_APP_CPPTOC_H_
|
||||
|
||||
|
@@ -13,6 +13,8 @@
|
||||
#include "libcef_dll/cpptoc/auth_callback_cpptoc.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK auth_callback_cont(struct _cef_auth_callback_t* self,
|
||||
@@ -48,14 +50,21 @@ void CEF_CALLBACK auth_callback_cancel(struct _cef_auth_callback_t* self) {
|
||||
CefAuthCallbackCppToC::Get(self)->Cancel();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefAuthCallbackCppToC::CefAuthCallbackCppToC(CefAuthCallback* cls)
|
||||
: CefCppToC<CefAuthCallbackCppToC, CefAuthCallback, cef_auth_callback_t>(
|
||||
cls) {
|
||||
struct_.struct_.cont = auth_callback_cont;
|
||||
struct_.struct_.cancel = auth_callback_cancel;
|
||||
CefAuthCallbackCppToC::CefAuthCallbackCppToC() {
|
||||
GetStruct()->cont = auth_callback_cont;
|
||||
GetStruct()->cancel = auth_callback_cancel;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefAuthCallback> CefCppToC<CefAuthCallbackCppToC,
|
||||
CefAuthCallback, cef_auth_callback_t>::UnwrapDerived(CefWrapperType type,
|
||||
cef_auth_callback_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -63,3 +72,5 @@ template<> base::AtomicRefCount CefCppToC<CefAuthCallbackCppToC,
|
||||
CefAuthCallback, cef_auth_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefAuthCallbackCppToC, CefAuthCallback,
|
||||
cef_auth_callback_t>::kWrapperType = WT_AUTH_CALLBACK;
|
||||
|
@@ -28,9 +28,8 @@ class CefAuthCallbackCppToC
|
||||
: public CefCppToC<CefAuthCallbackCppToC, CefAuthCallback,
|
||||
cef_auth_callback_t> {
|
||||
public:
|
||||
explicit CefAuthCallbackCppToC(CefAuthCallback* cls);
|
||||
CefAuthCallbackCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_AUTH_CALLBACK_CPPTOC_H_
|
||||
|
||||
|
22
libcef_dll/cpptoc/base_cpptoc.cc
Normal file
22
libcef_dll/cpptoc/base_cpptoc.cc
Normal file
@@ -0,0 +1,22 @@
|
||||
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
|
||||
#include "libcef_dll/cpptoc/base_cpptoc.h"
|
||||
|
||||
CefBaseCppToC::CefBaseCppToC() {
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefBase> CefCppToC<CefBaseCppToC, CefBase, cef_base_t>::
|
||||
UnwrapDerived(CefWrapperType type, cef_base_t* s) {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> base::AtomicRefCount CefCppToC<CefBaseCppToC, CefBase,
|
||||
cef_base_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefBaseCppToC, CefBase,cef_base_t>::
|
||||
kWrapperType = WT_BASE;
|
@@ -6,143 +6,20 @@
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_BASE_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/base/cef_logging.h"
|
||||
#include "include/base/cef_macros.h"
|
||||
#include "include/cef_base.h"
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc.h"
|
||||
|
||||
// CefCppToC implementation for CefBase.
|
||||
class CefBaseCppToC : public CefBase {
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
class CefBaseCppToC
|
||||
: public CefCppToC<CefBaseCppToC, CefBase, cef_base_t> {
|
||||
public:
|
||||
// Use this method to retrieve the underlying class instance from our
|
||||
// own structure when the structure is passed as the required first
|
||||
// parameter of a C API function call. No explicit reference counting
|
||||
// is done in this case.
|
||||
static CefRefPtr<CefBase> Get(cef_base_t* s) {
|
||||
DCHECK(s);
|
||||
|
||||
// Cast our structure to the wrapper structure type.
|
||||
CefBaseCppToC::Struct* wrapperStruct =
|
||||
reinterpret_cast<CefBaseCppToC::Struct*>(s);
|
||||
// Return the underlying object instance.
|
||||
return wrapperStruct->class_->GetClass();
|
||||
}
|
||||
|
||||
// Use this method to create a wrapper structure for passing our class
|
||||
// instance to the other side.
|
||||
static cef_base_t* Wrap(CefRefPtr<CefBase> c) {
|
||||
if (!c.get())
|
||||
return NULL;
|
||||
|
||||
// Wrap our object with the CefCppToC class.
|
||||
CefBaseCppToC* wrapper = new CefBaseCppToC(c);
|
||||
// Add a reference to our wrapper object that will be released once our
|
||||
// structure arrives on the other side.
|
||||
wrapper->AddRef();
|
||||
// Return the structure pointer that can now be passed to the other side.
|
||||
return wrapper->GetStruct();
|
||||
}
|
||||
|
||||
// Use this method to retrieve the underlying class instance when receiving
|
||||
// our wrapper structure back from the other side.
|
||||
static CefRefPtr<CefBase> Unwrap(cef_base_t* s) {
|
||||
if (!s)
|
||||
return NULL;
|
||||
|
||||
// Cast our structure to the wrapper structure type.
|
||||
CefBaseCppToC::Struct* wrapperStruct =
|
||||
reinterpret_cast<CefBaseCppToC::Struct*>(s);
|
||||
// Add the underlying object instance to a smart pointer.
|
||||
CefRefPtr<CefBase> objectPtr(wrapperStruct->class_->GetClass());
|
||||
// Release the reference to our wrapper object that was added before the
|
||||
// structure was passed back to us.
|
||||
wrapperStruct->class_->Release();
|
||||
// Return the underlying object instance.
|
||||
return objectPtr;
|
||||
}
|
||||
|
||||
// Structure representation with pointer to the C++ class.
|
||||
struct Struct {
|
||||
cef_base_t struct_;
|
||||
CefBaseCppToC* class_;
|
||||
};
|
||||
|
||||
explicit CefBaseCppToC(CefBase* cls)
|
||||
: class_(cls) {
|
||||
DCHECK(cls);
|
||||
|
||||
struct_.class_ = this;
|
||||
|
||||
// zero the underlying structure and set base members
|
||||
memset(&struct_.struct_, 0, sizeof(cef_base_t));
|
||||
struct_.struct_.size = sizeof(cef_base_t);
|
||||
struct_.struct_.add_ref = struct_add_ref;
|
||||
struct_.struct_.release = struct_release;
|
||||
struct_.struct_.has_one_ref = struct_has_one_ref;
|
||||
}
|
||||
virtual ~CefBaseCppToC() {}
|
||||
|
||||
CefBase* GetClass() { return class_; }
|
||||
|
||||
// If returning the structure across the DLL boundary you should call
|
||||
// AddRef() on this CefCppToC object. On the other side of the DLL boundary,
|
||||
// call UnderlyingRelease() on the wrapping CefCToCpp object.
|
||||
cef_base_t* GetStruct() { return &struct_.struct_; }
|
||||
|
||||
// CefBase methods increment/decrement reference counts on both this object
|
||||
// and the underlying wrapper class.
|
||||
void AddRef() const {
|
||||
UnderlyingAddRef();
|
||||
ref_count_.AddRef();
|
||||
}
|
||||
bool Release() const {
|
||||
UnderlyingRelease();
|
||||
if (ref_count_.Release()) {
|
||||
delete this;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool HasOneRef() const { return ref_count_.HasOneRef(); }
|
||||
|
||||
// Increment/decrement reference counts on only the underlying class.
|
||||
void UnderlyingAddRef() const { class_->AddRef(); }
|
||||
bool UnderlyingRelease() const { return class_->Release(); }
|
||||
bool UnderlyingHasOneRef() const { return class_->HasOneRef(); }
|
||||
|
||||
private:
|
||||
static void CEF_CALLBACK struct_add_ref(struct _cef_base_t* base) {
|
||||
DCHECK(base);
|
||||
if (!base)
|
||||
return;
|
||||
|
||||
Struct* impl = reinterpret_cast<Struct*>(base);
|
||||
impl->class_->AddRef();
|
||||
}
|
||||
|
||||
static int CEF_CALLBACK struct_release(struct _cef_base_t* base) {
|
||||
DCHECK(base);
|
||||
if (!base)
|
||||
return 0;
|
||||
|
||||
Struct* impl = reinterpret_cast<Struct*>(base);
|
||||
return impl->class_->Release();
|
||||
}
|
||||
|
||||
static int CEF_CALLBACK struct_has_one_ref(struct _cef_base_t* base) {
|
||||
DCHECK(base);
|
||||
if (!base)
|
||||
return 0;
|
||||
|
||||
Struct* impl = reinterpret_cast<Struct*>(base);
|
||||
return impl->class_->HasOneRef();
|
||||
}
|
||||
|
||||
CefRefCount ref_count_;
|
||||
Struct struct_;
|
||||
CefBase* class_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefBaseCppToC);
|
||||
CefBaseCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_BASE_CPPTOC_H_
|
||||
|
@@ -13,6 +13,8 @@
|
||||
#include "libcef_dll/cpptoc/before_download_callback_cpptoc.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK before_download_callback_cont(
|
||||
@@ -31,14 +33,20 @@ void CEF_CALLBACK before_download_callback_cont(
|
||||
show_dialog?true:false);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefBeforeDownloadCallbackCppToC::CefBeforeDownloadCallbackCppToC(
|
||||
CefBeforeDownloadCallback* cls)
|
||||
: CefCppToC<CefBeforeDownloadCallbackCppToC, CefBeforeDownloadCallback,
|
||||
cef_before_download_callback_t>(cls) {
|
||||
struct_.struct_.cont = before_download_callback_cont;
|
||||
CefBeforeDownloadCallbackCppToC::CefBeforeDownloadCallbackCppToC() {
|
||||
GetStruct()->cont = before_download_callback_cont;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefBeforeDownloadCallback> CefCppToC<CefBeforeDownloadCallbackCppToC,
|
||||
CefBeforeDownloadCallback, cef_before_download_callback_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_before_download_callback_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -47,3 +55,6 @@ template<> base::AtomicRefCount CefCppToC<CefBeforeDownloadCallbackCppToC,
|
||||
0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefBeforeDownloadCallbackCppToC,
|
||||
CefBeforeDownloadCallback, cef_before_download_callback_t>::kWrapperType =
|
||||
WT_BEFORE_DOWNLOAD_CALLBACK;
|
||||
|
@@ -28,9 +28,8 @@ class CefBeforeDownloadCallbackCppToC
|
||||
: public CefCppToC<CefBeforeDownloadCallbackCppToC,
|
||||
CefBeforeDownloadCallback, cef_before_download_callback_t> {
|
||||
public:
|
||||
explicit CefBeforeDownloadCallbackCppToC(CefBeforeDownloadCallback* cls);
|
||||
CefBeforeDownloadCallbackCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_BEFORE_DOWNLOAD_CALLBACK_CPPTOC_H_
|
||||
|
||||
|
@@ -34,6 +34,8 @@ CEF_EXPORT cef_binary_value_t* cef_binary_value_create(const void* data,
|
||||
}
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
int CEF_CALLBACK binary_value_is_valid(struct _cef_binary_value_t* self) {
|
||||
@@ -155,18 +157,26 @@ size_t CEF_CALLBACK binary_value_get_data(struct _cef_binary_value_t* self,
|
||||
return _retval;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefBinaryValueCppToC::CefBinaryValueCppToC(CefBinaryValue* cls)
|
||||
: CefCppToC<CefBinaryValueCppToC, CefBinaryValue, cef_binary_value_t>(cls) {
|
||||
struct_.struct_.is_valid = binary_value_is_valid;
|
||||
struct_.struct_.is_owned = binary_value_is_owned;
|
||||
struct_.struct_.is_same = binary_value_is_same;
|
||||
struct_.struct_.is_equal = binary_value_is_equal;
|
||||
struct_.struct_.copy = binary_value_copy;
|
||||
struct_.struct_.get_size = binary_value_get_size;
|
||||
struct_.struct_.get_data = binary_value_get_data;
|
||||
CefBinaryValueCppToC::CefBinaryValueCppToC() {
|
||||
GetStruct()->is_valid = binary_value_is_valid;
|
||||
GetStruct()->is_owned = binary_value_is_owned;
|
||||
GetStruct()->is_same = binary_value_is_same;
|
||||
GetStruct()->is_equal = binary_value_is_equal;
|
||||
GetStruct()->copy = binary_value_copy;
|
||||
GetStruct()->get_size = binary_value_get_size;
|
||||
GetStruct()->get_data = binary_value_get_data;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefBinaryValue> CefCppToC<CefBinaryValueCppToC,
|
||||
CefBinaryValue, cef_binary_value_t>::UnwrapDerived(CefWrapperType type,
|
||||
cef_binary_value_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -174,3 +184,5 @@ template<> base::AtomicRefCount CefCppToC<CefBinaryValueCppToC, CefBinaryValue,
|
||||
cef_binary_value_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefBinaryValueCppToC, CefBinaryValue,
|
||||
cef_binary_value_t>::kWrapperType = WT_BINARY_VALUE;
|
||||
|
@@ -28,9 +28,8 @@ class CefBinaryValueCppToC
|
||||
: public CefCppToC<CefBinaryValueCppToC, CefBinaryValue,
|
||||
cef_binary_value_t> {
|
||||
public:
|
||||
explicit CefBinaryValueCppToC(CefBinaryValue* cls);
|
||||
CefBinaryValueCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_BINARY_VALUE_CPPTOC_H_
|
||||
|
||||
|
@@ -18,6 +18,8 @@
|
||||
#include "libcef_dll/transfer_util.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
struct _cef_browser_host_t* CEF_CALLBACK browser_get_host(
|
||||
@@ -352,32 +354,39 @@ int CEF_CALLBACK browser_send_process_message(struct _cef_browser_t* self,
|
||||
return _retval;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefBrowserCppToC::CefBrowserCppToC(CefBrowser* cls)
|
||||
: CefCppToC<CefBrowserCppToC, CefBrowser, cef_browser_t>(cls) {
|
||||
struct_.struct_.get_host = browser_get_host;
|
||||
struct_.struct_.can_go_back = browser_can_go_back;
|
||||
struct_.struct_.go_back = browser_go_back;
|
||||
struct_.struct_.can_go_forward = browser_can_go_forward;
|
||||
struct_.struct_.go_forward = browser_go_forward;
|
||||
struct_.struct_.is_loading = browser_is_loading;
|
||||
struct_.struct_.reload = browser_reload;
|
||||
struct_.struct_.reload_ignore_cache = browser_reload_ignore_cache;
|
||||
struct_.struct_.stop_load = browser_stop_load;
|
||||
struct_.struct_.get_identifier = browser_get_identifier;
|
||||
struct_.struct_.is_same = browser_is_same;
|
||||
struct_.struct_.is_popup = browser_is_popup;
|
||||
struct_.struct_.has_document = browser_has_document;
|
||||
struct_.struct_.get_main_frame = browser_get_main_frame;
|
||||
struct_.struct_.get_focused_frame = browser_get_focused_frame;
|
||||
struct_.struct_.get_frame_byident = browser_get_frame_byident;
|
||||
struct_.struct_.get_frame = browser_get_frame;
|
||||
struct_.struct_.get_frame_count = browser_get_frame_count;
|
||||
struct_.struct_.get_frame_identifiers = browser_get_frame_identifiers;
|
||||
struct_.struct_.get_frame_names = browser_get_frame_names;
|
||||
struct_.struct_.send_process_message = browser_send_process_message;
|
||||
CefBrowserCppToC::CefBrowserCppToC() {
|
||||
GetStruct()->get_host = browser_get_host;
|
||||
GetStruct()->can_go_back = browser_can_go_back;
|
||||
GetStruct()->go_back = browser_go_back;
|
||||
GetStruct()->can_go_forward = browser_can_go_forward;
|
||||
GetStruct()->go_forward = browser_go_forward;
|
||||
GetStruct()->is_loading = browser_is_loading;
|
||||
GetStruct()->reload = browser_reload;
|
||||
GetStruct()->reload_ignore_cache = browser_reload_ignore_cache;
|
||||
GetStruct()->stop_load = browser_stop_load;
|
||||
GetStruct()->get_identifier = browser_get_identifier;
|
||||
GetStruct()->is_same = browser_is_same;
|
||||
GetStruct()->is_popup = browser_is_popup;
|
||||
GetStruct()->has_document = browser_has_document;
|
||||
GetStruct()->get_main_frame = browser_get_main_frame;
|
||||
GetStruct()->get_focused_frame = browser_get_focused_frame;
|
||||
GetStruct()->get_frame_byident = browser_get_frame_byident;
|
||||
GetStruct()->get_frame = browser_get_frame;
|
||||
GetStruct()->get_frame_count = browser_get_frame_count;
|
||||
GetStruct()->get_frame_identifiers = browser_get_frame_identifiers;
|
||||
GetStruct()->get_frame_names = browser_get_frame_names;
|
||||
GetStruct()->send_process_message = browser_send_process_message;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefBrowser> CefCppToC<CefBrowserCppToC, CefBrowser,
|
||||
cef_browser_t>::UnwrapDerived(CefWrapperType type, cef_browser_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -385,3 +394,5 @@ template<> base::AtomicRefCount CefCppToC<CefBrowserCppToC, CefBrowser,
|
||||
cef_browser_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefBrowserCppToC, CefBrowser,
|
||||
cef_browser_t>::kWrapperType = WT_BROWSER;
|
||||
|
@@ -29,9 +29,8 @@
|
||||
class CefBrowserCppToC
|
||||
: public CefCppToC<CefBrowserCppToC, CefBrowser, cef_browser_t> {
|
||||
public:
|
||||
explicit CefBrowserCppToC(CefBrowser* cls);
|
||||
CefBrowserCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_BROWSER_CPPTOC_H_
|
||||
|
||||
|
@@ -97,6 +97,8 @@ CEF_EXPORT cef_browser_t* cef_browser_host_create_browser_sync(
|
||||
}
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
cef_browser_t* CEF_CALLBACK browser_host_get_browser(
|
||||
@@ -832,69 +834,76 @@ void CEF_CALLBACK browser_host_drag_source_system_drag_ended(
|
||||
CefBrowserHostCppToC::Get(self)->DragSourceSystemDragEnded();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefBrowserHostCppToC::CefBrowserHostCppToC(CefBrowserHost* cls)
|
||||
: CefCppToC<CefBrowserHostCppToC, CefBrowserHost, cef_browser_host_t>(cls) {
|
||||
struct_.struct_.get_browser = browser_host_get_browser;
|
||||
struct_.struct_.close_browser = browser_host_close_browser;
|
||||
struct_.struct_.set_focus = browser_host_set_focus;
|
||||
struct_.struct_.set_window_visibility = browser_host_set_window_visibility;
|
||||
struct_.struct_.get_window_handle = browser_host_get_window_handle;
|
||||
struct_.struct_.get_opener_window_handle =
|
||||
browser_host_get_opener_window_handle;
|
||||
struct_.struct_.get_client = browser_host_get_client;
|
||||
struct_.struct_.get_request_context = browser_host_get_request_context;
|
||||
struct_.struct_.get_zoom_level = browser_host_get_zoom_level;
|
||||
struct_.struct_.set_zoom_level = browser_host_set_zoom_level;
|
||||
struct_.struct_.run_file_dialog = browser_host_run_file_dialog;
|
||||
struct_.struct_.start_download = browser_host_start_download;
|
||||
struct_.struct_.print = browser_host_print;
|
||||
struct_.struct_.find = browser_host_find;
|
||||
struct_.struct_.stop_finding = browser_host_stop_finding;
|
||||
struct_.struct_.show_dev_tools = browser_host_show_dev_tools;
|
||||
struct_.struct_.close_dev_tools = browser_host_close_dev_tools;
|
||||
struct_.struct_.get_navigation_entries = browser_host_get_navigation_entries;
|
||||
struct_.struct_.set_mouse_cursor_change_disabled =
|
||||
CefBrowserHostCppToC::CefBrowserHostCppToC() {
|
||||
GetStruct()->get_browser = browser_host_get_browser;
|
||||
GetStruct()->close_browser = browser_host_close_browser;
|
||||
GetStruct()->set_focus = browser_host_set_focus;
|
||||
GetStruct()->set_window_visibility = browser_host_set_window_visibility;
|
||||
GetStruct()->get_window_handle = browser_host_get_window_handle;
|
||||
GetStruct()->get_opener_window_handle = browser_host_get_opener_window_handle;
|
||||
GetStruct()->get_client = browser_host_get_client;
|
||||
GetStruct()->get_request_context = browser_host_get_request_context;
|
||||
GetStruct()->get_zoom_level = browser_host_get_zoom_level;
|
||||
GetStruct()->set_zoom_level = browser_host_set_zoom_level;
|
||||
GetStruct()->run_file_dialog = browser_host_run_file_dialog;
|
||||
GetStruct()->start_download = browser_host_start_download;
|
||||
GetStruct()->print = browser_host_print;
|
||||
GetStruct()->find = browser_host_find;
|
||||
GetStruct()->stop_finding = browser_host_stop_finding;
|
||||
GetStruct()->show_dev_tools = browser_host_show_dev_tools;
|
||||
GetStruct()->close_dev_tools = browser_host_close_dev_tools;
|
||||
GetStruct()->get_navigation_entries = browser_host_get_navigation_entries;
|
||||
GetStruct()->set_mouse_cursor_change_disabled =
|
||||
browser_host_set_mouse_cursor_change_disabled;
|
||||
struct_.struct_.is_mouse_cursor_change_disabled =
|
||||
GetStruct()->is_mouse_cursor_change_disabled =
|
||||
browser_host_is_mouse_cursor_change_disabled;
|
||||
struct_.struct_.replace_misspelling = browser_host_replace_misspelling;
|
||||
struct_.struct_.add_word_to_dictionary = browser_host_add_word_to_dictionary;
|
||||
struct_.struct_.is_window_rendering_disabled =
|
||||
GetStruct()->replace_misspelling = browser_host_replace_misspelling;
|
||||
GetStruct()->add_word_to_dictionary = browser_host_add_word_to_dictionary;
|
||||
GetStruct()->is_window_rendering_disabled =
|
||||
browser_host_is_window_rendering_disabled;
|
||||
struct_.struct_.was_resized = browser_host_was_resized;
|
||||
struct_.struct_.was_hidden = browser_host_was_hidden;
|
||||
struct_.struct_.notify_screen_info_changed =
|
||||
GetStruct()->was_resized = browser_host_was_resized;
|
||||
GetStruct()->was_hidden = browser_host_was_hidden;
|
||||
GetStruct()->notify_screen_info_changed =
|
||||
browser_host_notify_screen_info_changed;
|
||||
struct_.struct_.invalidate = browser_host_invalidate;
|
||||
struct_.struct_.send_key_event = browser_host_send_key_event;
|
||||
struct_.struct_.send_mouse_click_event = browser_host_send_mouse_click_event;
|
||||
struct_.struct_.send_mouse_move_event = browser_host_send_mouse_move_event;
|
||||
struct_.struct_.send_mouse_wheel_event = browser_host_send_mouse_wheel_event;
|
||||
struct_.struct_.send_focus_event = browser_host_send_focus_event;
|
||||
struct_.struct_.send_capture_lost_event =
|
||||
browser_host_send_capture_lost_event;
|
||||
struct_.struct_.notify_move_or_resize_started =
|
||||
GetStruct()->invalidate = browser_host_invalidate;
|
||||
GetStruct()->send_key_event = browser_host_send_key_event;
|
||||
GetStruct()->send_mouse_click_event = browser_host_send_mouse_click_event;
|
||||
GetStruct()->send_mouse_move_event = browser_host_send_mouse_move_event;
|
||||
GetStruct()->send_mouse_wheel_event = browser_host_send_mouse_wheel_event;
|
||||
GetStruct()->send_focus_event = browser_host_send_focus_event;
|
||||
GetStruct()->send_capture_lost_event = browser_host_send_capture_lost_event;
|
||||
GetStruct()->notify_move_or_resize_started =
|
||||
browser_host_notify_move_or_resize_started;
|
||||
struct_.struct_.get_nstext_input_context =
|
||||
browser_host_get_nstext_input_context;
|
||||
struct_.struct_.handle_key_event_before_text_input_client =
|
||||
GetStruct()->get_nstext_input_context = browser_host_get_nstext_input_context;
|
||||
GetStruct()->handle_key_event_before_text_input_client =
|
||||
browser_host_handle_key_event_before_text_input_client;
|
||||
struct_.struct_.handle_key_event_after_text_input_client =
|
||||
GetStruct()->handle_key_event_after_text_input_client =
|
||||
browser_host_handle_key_event_after_text_input_client;
|
||||
struct_.struct_.drag_target_drag_enter = browser_host_drag_target_drag_enter;
|
||||
struct_.struct_.drag_target_drag_over = browser_host_drag_target_drag_over;
|
||||
struct_.struct_.drag_target_drag_leave = browser_host_drag_target_drag_leave;
|
||||
struct_.struct_.drag_target_drop = browser_host_drag_target_drop;
|
||||
struct_.struct_.drag_source_ended_at = browser_host_drag_source_ended_at;
|
||||
struct_.struct_.drag_source_system_drag_ended =
|
||||
GetStruct()->drag_target_drag_enter = browser_host_drag_target_drag_enter;
|
||||
GetStruct()->drag_target_drag_over = browser_host_drag_target_drag_over;
|
||||
GetStruct()->drag_target_drag_leave = browser_host_drag_target_drag_leave;
|
||||
GetStruct()->drag_target_drop = browser_host_drag_target_drop;
|
||||
GetStruct()->drag_source_ended_at = browser_host_drag_source_ended_at;
|
||||
GetStruct()->drag_source_system_drag_ended =
|
||||
browser_host_drag_source_system_drag_ended;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefBrowserHost> CefCppToC<CefBrowserHostCppToC,
|
||||
CefBrowserHost, cef_browser_host_t>::UnwrapDerived(CefWrapperType type,
|
||||
cef_browser_host_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> base::AtomicRefCount CefCppToC<CefBrowserHostCppToC, CefBrowserHost,
|
||||
cef_browser_host_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefBrowserHostCppToC, CefBrowserHost,
|
||||
cef_browser_host_t>::kWrapperType = WT_BROWSER_HOST;
|
||||
|
@@ -30,9 +30,8 @@ class CefBrowserHostCppToC
|
||||
: public CefCppToC<CefBrowserHostCppToC, CefBrowserHost,
|
||||
cef_browser_host_t> {
|
||||
public:
|
||||
explicit CefBrowserHostCppToC(CefBrowserHost* cls);
|
||||
CefBrowserHostCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_BROWSER_HOST_CPPTOC_H_
|
||||
|
||||
|
@@ -16,6 +16,8 @@
|
||||
#include "libcef_dll/ctocpp/list_value_ctocpp.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK browser_process_handler_on_context_initialized(
|
||||
@@ -82,20 +84,26 @@ struct _cef_print_handler_t* CEF_CALLBACK browser_process_handler_get_print_hand
|
||||
return CefPrintHandlerCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefBrowserProcessHandlerCppToC::CefBrowserProcessHandlerCppToC(
|
||||
CefBrowserProcessHandler* cls)
|
||||
: CefCppToC<CefBrowserProcessHandlerCppToC, CefBrowserProcessHandler,
|
||||
cef_browser_process_handler_t>(cls) {
|
||||
struct_.struct_.on_context_initialized =
|
||||
CefBrowserProcessHandlerCppToC::CefBrowserProcessHandlerCppToC() {
|
||||
GetStruct()->on_context_initialized =
|
||||
browser_process_handler_on_context_initialized;
|
||||
struct_.struct_.on_before_child_process_launch =
|
||||
GetStruct()->on_before_child_process_launch =
|
||||
browser_process_handler_on_before_child_process_launch;
|
||||
struct_.struct_.on_render_process_thread_created =
|
||||
GetStruct()->on_render_process_thread_created =
|
||||
browser_process_handler_on_render_process_thread_created;
|
||||
struct_.struct_.get_print_handler = browser_process_handler_get_print_handler;
|
||||
GetStruct()->get_print_handler = browser_process_handler_get_print_handler;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefBrowserProcessHandler> CefCppToC<CefBrowserProcessHandlerCppToC,
|
||||
CefBrowserProcessHandler, cef_browser_process_handler_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_browser_process_handler_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -103,3 +111,6 @@ template<> base::AtomicRefCount CefCppToC<CefBrowserProcessHandlerCppToC,
|
||||
CefBrowserProcessHandler, cef_browser_process_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefBrowserProcessHandlerCppToC,
|
||||
CefBrowserProcessHandler, cef_browser_process_handler_t>::kWrapperType =
|
||||
WT_BROWSER_PROCESS_HANDLER;
|
||||
|
@@ -28,9 +28,8 @@ class CefBrowserProcessHandlerCppToC
|
||||
: public CefCppToC<CefBrowserProcessHandlerCppToC, CefBrowserProcessHandler,
|
||||
cef_browser_process_handler_t> {
|
||||
public:
|
||||
explicit CefBrowserProcessHandlerCppToC(CefBrowserProcessHandler* cls);
|
||||
CefBrowserProcessHandlerCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_BROWSER_PROCESS_HANDLER_CPPTOC_H_
|
||||
|
||||
|
@@ -13,6 +13,8 @@
|
||||
#include "libcef_dll/cpptoc/callback_cpptoc.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK callback_cont(struct _cef_callback_t* self) {
|
||||
@@ -37,13 +39,20 @@ void CEF_CALLBACK callback_cancel(struct _cef_callback_t* self) {
|
||||
CefCallbackCppToC::Get(self)->Cancel();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefCallbackCppToC::CefCallbackCppToC(CefCallback* cls)
|
||||
: CefCppToC<CefCallbackCppToC, CefCallback, cef_callback_t>(cls) {
|
||||
struct_.struct_.cont = callback_cont;
|
||||
struct_.struct_.cancel = callback_cancel;
|
||||
CefCallbackCppToC::CefCallbackCppToC() {
|
||||
GetStruct()->cont = callback_cont;
|
||||
GetStruct()->cancel = callback_cancel;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefCallback> CefCppToC<CefCallbackCppToC, CefCallback,
|
||||
cef_callback_t>::UnwrapDerived(CefWrapperType type, cef_callback_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -51,3 +60,5 @@ template<> base::AtomicRefCount CefCppToC<CefCallbackCppToC, CefCallback,
|
||||
cef_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefCallbackCppToC, CefCallback,
|
||||
cef_callback_t>::kWrapperType = WT_CALLBACK;
|
||||
|
@@ -27,9 +27,8 @@
|
||||
class CefCallbackCppToC
|
||||
: public CefCppToC<CefCallbackCppToC, CefCallback, cef_callback_t> {
|
||||
public:
|
||||
explicit CefCallbackCppToC(CefCallback* cls);
|
||||
CefCallbackCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_CALLBACK_CPPTOC_H_
|
||||
|
||||
|
@@ -29,6 +29,8 @@
|
||||
#include "libcef_dll/ctocpp/process_message_ctocpp.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
struct _cef_context_menu_handler_t* CEF_CALLBACK client_get_context_menu_handler(
|
||||
@@ -282,27 +284,33 @@ int CEF_CALLBACK client_on_process_message_received(struct _cef_client_t* self,
|
||||
return _retval;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefClientCppToC::CefClientCppToC(CefClient* cls)
|
||||
: CefCppToC<CefClientCppToC, CefClient, cef_client_t>(cls) {
|
||||
struct_.struct_.get_context_menu_handler = client_get_context_menu_handler;
|
||||
struct_.struct_.get_dialog_handler = client_get_dialog_handler;
|
||||
struct_.struct_.get_display_handler = client_get_display_handler;
|
||||
struct_.struct_.get_download_handler = client_get_download_handler;
|
||||
struct_.struct_.get_drag_handler = client_get_drag_handler;
|
||||
struct_.struct_.get_find_handler = client_get_find_handler;
|
||||
struct_.struct_.get_focus_handler = client_get_focus_handler;
|
||||
struct_.struct_.get_geolocation_handler = client_get_geolocation_handler;
|
||||
struct_.struct_.get_jsdialog_handler = client_get_jsdialog_handler;
|
||||
struct_.struct_.get_keyboard_handler = client_get_keyboard_handler;
|
||||
struct_.struct_.get_life_span_handler = client_get_life_span_handler;
|
||||
struct_.struct_.get_load_handler = client_get_load_handler;
|
||||
struct_.struct_.get_render_handler = client_get_render_handler;
|
||||
struct_.struct_.get_request_handler = client_get_request_handler;
|
||||
struct_.struct_.on_process_message_received =
|
||||
client_on_process_message_received;
|
||||
CefClientCppToC::CefClientCppToC() {
|
||||
GetStruct()->get_context_menu_handler = client_get_context_menu_handler;
|
||||
GetStruct()->get_dialog_handler = client_get_dialog_handler;
|
||||
GetStruct()->get_display_handler = client_get_display_handler;
|
||||
GetStruct()->get_download_handler = client_get_download_handler;
|
||||
GetStruct()->get_drag_handler = client_get_drag_handler;
|
||||
GetStruct()->get_find_handler = client_get_find_handler;
|
||||
GetStruct()->get_focus_handler = client_get_focus_handler;
|
||||
GetStruct()->get_geolocation_handler = client_get_geolocation_handler;
|
||||
GetStruct()->get_jsdialog_handler = client_get_jsdialog_handler;
|
||||
GetStruct()->get_keyboard_handler = client_get_keyboard_handler;
|
||||
GetStruct()->get_life_span_handler = client_get_life_span_handler;
|
||||
GetStruct()->get_load_handler = client_get_load_handler;
|
||||
GetStruct()->get_render_handler = client_get_render_handler;
|
||||
GetStruct()->get_request_handler = client_get_request_handler;
|
||||
GetStruct()->on_process_message_received = client_on_process_message_received;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefClient> CefCppToC<CefClientCppToC, CefClient,
|
||||
cef_client_t>::UnwrapDerived(CefWrapperType type, cef_client_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -310,3 +318,5 @@ template<> base::AtomicRefCount CefCppToC<CefClientCppToC, CefClient,
|
||||
cef_client_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefClientCppToC, CefClient,
|
||||
cef_client_t>::kWrapperType = WT_CLIENT;
|
||||
|
@@ -27,9 +27,8 @@
|
||||
class CefClientCppToC
|
||||
: public CefCppToC<CefClientCppToC, CefClient, cef_client_t> {
|
||||
public:
|
||||
explicit CefClientCppToC(CefClient* cls);
|
||||
CefClientCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_CLIENT_CPPTOC_H_
|
||||
|
||||
|
@@ -37,6 +37,8 @@ CEF_EXPORT cef_command_line_t* cef_command_line_get_global() {
|
||||
}
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
int CEF_CALLBACK command_line_is_valid(struct _cef_command_line_t* self) {
|
||||
@@ -392,33 +394,39 @@ void CEF_CALLBACK command_line_prepend_wrapper(struct _cef_command_line_t* self,
|
||||
CefString(wrapper));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefCommandLineCppToC::CefCommandLineCppToC(CefCommandLine* cls)
|
||||
: CefCppToC<CefCommandLineCppToC, CefCommandLine, cef_command_line_t>(cls) {
|
||||
struct_.struct_.is_valid = command_line_is_valid;
|
||||
struct_.struct_.is_read_only = command_line_is_read_only;
|
||||
struct_.struct_.copy = command_line_copy;
|
||||
struct_.struct_.init_from_argv = command_line_init_from_argv;
|
||||
struct_.struct_.init_from_string = command_line_init_from_string;
|
||||
struct_.struct_.reset = command_line_reset;
|
||||
struct_.struct_.get_argv = command_line_get_argv;
|
||||
struct_.struct_.get_command_line_string =
|
||||
command_line_get_command_line_string;
|
||||
struct_.struct_.get_program = command_line_get_program;
|
||||
struct_.struct_.set_program = command_line_set_program;
|
||||
struct_.struct_.has_switches = command_line_has_switches;
|
||||
struct_.struct_.has_switch = command_line_has_switch;
|
||||
struct_.struct_.get_switch_value = command_line_get_switch_value;
|
||||
struct_.struct_.get_switches = command_line_get_switches;
|
||||
struct_.struct_.append_switch = command_line_append_switch;
|
||||
struct_.struct_.append_switch_with_value =
|
||||
command_line_append_switch_with_value;
|
||||
struct_.struct_.has_arguments = command_line_has_arguments;
|
||||
struct_.struct_.get_arguments = command_line_get_arguments;
|
||||
struct_.struct_.append_argument = command_line_append_argument;
|
||||
struct_.struct_.prepend_wrapper = command_line_prepend_wrapper;
|
||||
CefCommandLineCppToC::CefCommandLineCppToC() {
|
||||
GetStruct()->is_valid = command_line_is_valid;
|
||||
GetStruct()->is_read_only = command_line_is_read_only;
|
||||
GetStruct()->copy = command_line_copy;
|
||||
GetStruct()->init_from_argv = command_line_init_from_argv;
|
||||
GetStruct()->init_from_string = command_line_init_from_string;
|
||||
GetStruct()->reset = command_line_reset;
|
||||
GetStruct()->get_argv = command_line_get_argv;
|
||||
GetStruct()->get_command_line_string = command_line_get_command_line_string;
|
||||
GetStruct()->get_program = command_line_get_program;
|
||||
GetStruct()->set_program = command_line_set_program;
|
||||
GetStruct()->has_switches = command_line_has_switches;
|
||||
GetStruct()->has_switch = command_line_has_switch;
|
||||
GetStruct()->get_switch_value = command_line_get_switch_value;
|
||||
GetStruct()->get_switches = command_line_get_switches;
|
||||
GetStruct()->append_switch = command_line_append_switch;
|
||||
GetStruct()->append_switch_with_value = command_line_append_switch_with_value;
|
||||
GetStruct()->has_arguments = command_line_has_arguments;
|
||||
GetStruct()->get_arguments = command_line_get_arguments;
|
||||
GetStruct()->append_argument = command_line_append_argument;
|
||||
GetStruct()->prepend_wrapper = command_line_prepend_wrapper;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefCommandLine> CefCppToC<CefCommandLineCppToC,
|
||||
CefCommandLine, cef_command_line_t>::UnwrapDerived(CefWrapperType type,
|
||||
cef_command_line_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -426,3 +434,5 @@ template<> base::AtomicRefCount CefCppToC<CefCommandLineCppToC, CefCommandLine,
|
||||
cef_command_line_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefCommandLineCppToC, CefCommandLine,
|
||||
cef_command_line_t>::kWrapperType = WT_COMMAND_LINE;
|
||||
|
@@ -28,9 +28,8 @@ class CefCommandLineCppToC
|
||||
: public CefCppToC<CefCommandLineCppToC, CefCommandLine,
|
||||
cef_command_line_t> {
|
||||
public:
|
||||
explicit CefCommandLineCppToC(CefCommandLine* cls);
|
||||
CefCommandLineCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_COMMAND_LINE_CPPTOC_H_
|
||||
|
||||
|
@@ -13,6 +13,8 @@
|
||||
#include "libcef_dll/cpptoc/completion_callback_cpptoc.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK completion_callback_on_complete(
|
||||
@@ -27,14 +29,20 @@ void CEF_CALLBACK completion_callback_on_complete(
|
||||
CefCompletionCallbackCppToC::Get(self)->OnComplete();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefCompletionCallbackCppToC::CefCompletionCallbackCppToC(
|
||||
CefCompletionCallback* cls)
|
||||
: CefCppToC<CefCompletionCallbackCppToC, CefCompletionCallback,
|
||||
cef_completion_callback_t>(cls) {
|
||||
struct_.struct_.on_complete = completion_callback_on_complete;
|
||||
CefCompletionCallbackCppToC::CefCompletionCallbackCppToC() {
|
||||
GetStruct()->on_complete = completion_callback_on_complete;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefCompletionCallback> CefCppToC<CefCompletionCallbackCppToC,
|
||||
CefCompletionCallback, cef_completion_callback_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_completion_callback_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -42,3 +50,6 @@ template<> base::AtomicRefCount CefCppToC<CefCompletionCallbackCppToC,
|
||||
CefCompletionCallback, cef_completion_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefCompletionCallbackCppToC,
|
||||
CefCompletionCallback, cef_completion_callback_t>::kWrapperType =
|
||||
WT_COMPLETION_CALLBACK;
|
||||
|
@@ -28,9 +28,8 @@ class CefCompletionCallbackCppToC
|
||||
: public CefCppToC<CefCompletionCallbackCppToC, CefCompletionCallback,
|
||||
cef_completion_callback_t> {
|
||||
public:
|
||||
explicit CefCompletionCallbackCppToC(CefCompletionCallback* cls);
|
||||
CefCompletionCallbackCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_COMPLETION_CALLBACK_CPPTOC_H_
|
||||
|
||||
|
@@ -17,6 +17,8 @@
|
||||
#include "libcef_dll/ctocpp/menu_model_ctocpp.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK context_menu_handler_on_before_context_menu(
|
||||
@@ -110,23 +112,32 @@ void CEF_CALLBACK context_menu_handler_on_context_menu_dismissed(
|
||||
CefFrameCToCpp::Wrap(frame));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefContextMenuHandlerCppToC::CefContextMenuHandlerCppToC(
|
||||
CefContextMenuHandler* cls)
|
||||
: CefCppToC<CefContextMenuHandlerCppToC, CefContextMenuHandler,
|
||||
cef_context_menu_handler_t>(cls) {
|
||||
struct_.struct_.on_before_context_menu =
|
||||
CefContextMenuHandlerCppToC::CefContextMenuHandlerCppToC() {
|
||||
GetStruct()->on_before_context_menu =
|
||||
context_menu_handler_on_before_context_menu;
|
||||
struct_.struct_.on_context_menu_command =
|
||||
GetStruct()->on_context_menu_command =
|
||||
context_menu_handler_on_context_menu_command;
|
||||
struct_.struct_.on_context_menu_dismissed =
|
||||
GetStruct()->on_context_menu_dismissed =
|
||||
context_menu_handler_on_context_menu_dismissed;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefContextMenuHandler> CefCppToC<CefContextMenuHandlerCppToC,
|
||||
CefContextMenuHandler, cef_context_menu_handler_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_context_menu_handler_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> base::AtomicRefCount CefCppToC<CefContextMenuHandlerCppToC,
|
||||
CefContextMenuHandler, cef_context_menu_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefContextMenuHandlerCppToC,
|
||||
CefContextMenuHandler, cef_context_menu_handler_t>::kWrapperType =
|
||||
WT_CONTEXT_MENU_HANDLER;
|
||||
|
@@ -28,9 +28,8 @@ class CefContextMenuHandlerCppToC
|
||||
: public CefCppToC<CefContextMenuHandlerCppToC, CefContextMenuHandler,
|
||||
cef_context_menu_handler_t> {
|
||||
public:
|
||||
explicit CefContextMenuHandlerCppToC(CefContextMenuHandler* cls);
|
||||
CefContextMenuHandlerCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_CONTEXT_MENU_HANDLER_CPPTOC_H_
|
||||
|
||||
|
@@ -14,6 +14,8 @@
|
||||
#include "libcef_dll/transfer_util.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
int CEF_CALLBACK context_menu_params_get_xcoord(
|
||||
@@ -306,36 +308,41 @@ cef_context_menu_edit_state_flags_t CEF_CALLBACK context_menu_params_get_edit_st
|
||||
return _retval;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefContextMenuParamsCppToC::CefContextMenuParamsCppToC(
|
||||
CefContextMenuParams* cls)
|
||||
: CefCppToC<CefContextMenuParamsCppToC, CefContextMenuParams,
|
||||
cef_context_menu_params_t>(cls) {
|
||||
struct_.struct_.get_xcoord = context_menu_params_get_xcoord;
|
||||
struct_.struct_.get_ycoord = context_menu_params_get_ycoord;
|
||||
struct_.struct_.get_type_flags = context_menu_params_get_type_flags;
|
||||
struct_.struct_.get_link_url = context_menu_params_get_link_url;
|
||||
struct_.struct_.get_unfiltered_link_url =
|
||||
CefContextMenuParamsCppToC::CefContextMenuParamsCppToC() {
|
||||
GetStruct()->get_xcoord = context_menu_params_get_xcoord;
|
||||
GetStruct()->get_ycoord = context_menu_params_get_ycoord;
|
||||
GetStruct()->get_type_flags = context_menu_params_get_type_flags;
|
||||
GetStruct()->get_link_url = context_menu_params_get_link_url;
|
||||
GetStruct()->get_unfiltered_link_url =
|
||||
context_menu_params_get_unfiltered_link_url;
|
||||
struct_.struct_.get_source_url = context_menu_params_get_source_url;
|
||||
struct_.struct_.has_image_contents = context_menu_params_has_image_contents;
|
||||
struct_.struct_.get_page_url = context_menu_params_get_page_url;
|
||||
struct_.struct_.get_frame_url = context_menu_params_get_frame_url;
|
||||
struct_.struct_.get_frame_charset = context_menu_params_get_frame_charset;
|
||||
struct_.struct_.get_media_type = context_menu_params_get_media_type;
|
||||
struct_.struct_.get_media_state_flags =
|
||||
GetStruct()->get_source_url = context_menu_params_get_source_url;
|
||||
GetStruct()->has_image_contents = context_menu_params_has_image_contents;
|
||||
GetStruct()->get_page_url = context_menu_params_get_page_url;
|
||||
GetStruct()->get_frame_url = context_menu_params_get_frame_url;
|
||||
GetStruct()->get_frame_charset = context_menu_params_get_frame_charset;
|
||||
GetStruct()->get_media_type = context_menu_params_get_media_type;
|
||||
GetStruct()->get_media_state_flags =
|
||||
context_menu_params_get_media_state_flags;
|
||||
struct_.struct_.get_selection_text = context_menu_params_get_selection_text;
|
||||
struct_.struct_.get_misspelled_word = context_menu_params_get_misspelled_word;
|
||||
struct_.struct_.get_dictionary_suggestions =
|
||||
GetStruct()->get_selection_text = context_menu_params_get_selection_text;
|
||||
GetStruct()->get_misspelled_word = context_menu_params_get_misspelled_word;
|
||||
GetStruct()->get_dictionary_suggestions =
|
||||
context_menu_params_get_dictionary_suggestions;
|
||||
struct_.struct_.is_editable = context_menu_params_is_editable;
|
||||
struct_.struct_.is_spell_check_enabled =
|
||||
GetStruct()->is_editable = context_menu_params_is_editable;
|
||||
GetStruct()->is_spell_check_enabled =
|
||||
context_menu_params_is_spell_check_enabled;
|
||||
struct_.struct_.get_edit_state_flags =
|
||||
context_menu_params_get_edit_state_flags;
|
||||
GetStruct()->get_edit_state_flags = context_menu_params_get_edit_state_flags;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefContextMenuParams> CefCppToC<CefContextMenuParamsCppToC,
|
||||
CefContextMenuParams, cef_context_menu_params_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_context_menu_params_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -343,3 +350,6 @@ template<> base::AtomicRefCount CefCppToC<CefContextMenuParamsCppToC,
|
||||
CefContextMenuParams, cef_context_menu_params_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefContextMenuParamsCppToC,
|
||||
CefContextMenuParams, cef_context_menu_params_t>::kWrapperType =
|
||||
WT_CONTEXT_MENU_PARAMS;
|
||||
|
@@ -28,9 +28,8 @@ class CefContextMenuParamsCppToC
|
||||
: public CefCppToC<CefContextMenuParamsCppToC, CefContextMenuParams,
|
||||
cef_context_menu_params_t> {
|
||||
public:
|
||||
explicit CefContextMenuParamsCppToC(CefContextMenuParams* cls);
|
||||
CefContextMenuParamsCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_CONTEXT_MENU_PARAMS_CPPTOC_H_
|
||||
|
||||
|
@@ -52,6 +52,8 @@ CEF_EXPORT cef_cookie_manager_t* cef_cookie_manager_create_manager(
|
||||
}
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK cookie_manager_set_supported_schemes(
|
||||
@@ -217,19 +219,26 @@ int CEF_CALLBACK cookie_manager_flush_store(struct _cef_cookie_manager_t* self,
|
||||
return _retval;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefCookieManagerCppToC::CefCookieManagerCppToC(CefCookieManager* cls)
|
||||
: CefCppToC<CefCookieManagerCppToC, CefCookieManager, cef_cookie_manager_t>(
|
||||
cls) {
|
||||
struct_.struct_.set_supported_schemes = cookie_manager_set_supported_schemes;
|
||||
struct_.struct_.visit_all_cookies = cookie_manager_visit_all_cookies;
|
||||
struct_.struct_.visit_url_cookies = cookie_manager_visit_url_cookies;
|
||||
struct_.struct_.set_cookie = cookie_manager_set_cookie;
|
||||
struct_.struct_.delete_cookies = cookie_manager_delete_cookies;
|
||||
struct_.struct_.set_storage_path = cookie_manager_set_storage_path;
|
||||
struct_.struct_.flush_store = cookie_manager_flush_store;
|
||||
CefCookieManagerCppToC::CefCookieManagerCppToC() {
|
||||
GetStruct()->set_supported_schemes = cookie_manager_set_supported_schemes;
|
||||
GetStruct()->visit_all_cookies = cookie_manager_visit_all_cookies;
|
||||
GetStruct()->visit_url_cookies = cookie_manager_visit_url_cookies;
|
||||
GetStruct()->set_cookie = cookie_manager_set_cookie;
|
||||
GetStruct()->delete_cookies = cookie_manager_delete_cookies;
|
||||
GetStruct()->set_storage_path = cookie_manager_set_storage_path;
|
||||
GetStruct()->flush_store = cookie_manager_flush_store;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefCookieManager> CefCppToC<CefCookieManagerCppToC,
|
||||
CefCookieManager, cef_cookie_manager_t>::UnwrapDerived(CefWrapperType type,
|
||||
cef_cookie_manager_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -237,3 +246,5 @@ template<> base::AtomicRefCount CefCppToC<CefCookieManagerCppToC,
|
||||
CefCookieManager, cef_cookie_manager_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefCookieManagerCppToC, CefCookieManager,
|
||||
cef_cookie_manager_t>::kWrapperType = WT_COOKIE_MANAGER;
|
||||
|
@@ -28,9 +28,8 @@ class CefCookieManagerCppToC
|
||||
: public CefCppToC<CefCookieManagerCppToC, CefCookieManager,
|
||||
cef_cookie_manager_t> {
|
||||
public:
|
||||
explicit CefCookieManagerCppToC(CefCookieManager* cls);
|
||||
CefCookieManagerCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_COOKIE_MANAGER_CPPTOC_H_
|
||||
|
||||
|
@@ -13,6 +13,8 @@
|
||||
#include "libcef_dll/cpptoc/cookie_visitor_cpptoc.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
int CEF_CALLBACK cookie_visitor_visit(struct _cef_cookie_visitor_t* self,
|
||||
@@ -54,13 +56,20 @@ int CEF_CALLBACK cookie_visitor_visit(struct _cef_cookie_visitor_t* self,
|
||||
return _retval;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefCookieVisitorCppToC::CefCookieVisitorCppToC(CefCookieVisitor* cls)
|
||||
: CefCppToC<CefCookieVisitorCppToC, CefCookieVisitor, cef_cookie_visitor_t>(
|
||||
cls) {
|
||||
struct_.struct_.visit = cookie_visitor_visit;
|
||||
CefCookieVisitorCppToC::CefCookieVisitorCppToC() {
|
||||
GetStruct()->visit = cookie_visitor_visit;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefCookieVisitor> CefCppToC<CefCookieVisitorCppToC,
|
||||
CefCookieVisitor, cef_cookie_visitor_t>::UnwrapDerived(CefWrapperType type,
|
||||
cef_cookie_visitor_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -68,3 +77,5 @@ template<> base::AtomicRefCount CefCppToC<CefCookieVisitorCppToC,
|
||||
CefCookieVisitor, cef_cookie_visitor_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefCookieVisitorCppToC, CefCookieVisitor,
|
||||
cef_cookie_visitor_t>::kWrapperType = WT_COOKIE_VISITOR;
|
||||
|
@@ -28,9 +28,8 @@ class CefCookieVisitorCppToC
|
||||
: public CefCppToC<CefCookieVisitorCppToC, CefCookieVisitor,
|
||||
cef_cookie_visitor_t> {
|
||||
public:
|
||||
explicit CefCookieVisitorCppToC(CefCookieVisitor* cls);
|
||||
CefCookieVisitorCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_COOKIE_VISITOR_CPPTOC_H_
|
||||
|
||||
|
@@ -10,7 +10,7 @@
|
||||
#include "include/base/cef_macros.h"
|
||||
#include "include/cef_base.h"
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
#include "libcef_dll/wrapper_types.h"
|
||||
|
||||
// Wrap a C++ class with a C structure. This is used when the class
|
||||
// implementation exists on this side of the DLL boundary but will have methods
|
||||
@@ -18,33 +18,15 @@
|
||||
template <class ClassName, class BaseName, class StructName>
|
||||
class CefCppToC : public CefBase {
|
||||
public:
|
||||
// Structure representation with pointer to the C++ class.
|
||||
struct Struct {
|
||||
StructName struct_;
|
||||
CefCppToC<ClassName, BaseName, StructName>* class_;
|
||||
};
|
||||
|
||||
// Use this method to retrieve the underlying class instance from our
|
||||
// own structure when the structure is passed as the required first
|
||||
// parameter of a C API function call. No explicit reference counting
|
||||
// is done in this case.
|
||||
static CefRefPtr<BaseName> Get(StructName* s) {
|
||||
DCHECK(s);
|
||||
|
||||
// Cast our structure to the wrapper structure type.
|
||||
Struct* wrapperStruct = reinterpret_cast<Struct*>(s);
|
||||
// Return the underlying object instance.
|
||||
return wrapperStruct->class_->GetClass();
|
||||
}
|
||||
|
||||
// Use this method to create a wrapper structure for passing our class
|
||||
// instance to the other side.
|
||||
// Create a new wrapper instance and associated structure reference for
|
||||
// passing an object instance the other side.
|
||||
static StructName* Wrap(CefRefPtr<BaseName> c) {
|
||||
if (!c.get())
|
||||
return NULL;
|
||||
|
||||
// Wrap our object with the CefCppToC class.
|
||||
ClassName* wrapper = new ClassName(c.get());
|
||||
ClassName* wrapper = new ClassName();
|
||||
wrapper->wrapper_struct_.object_ = c.get();
|
||||
// Add a reference to our wrapper object that will be released once our
|
||||
// structure arrives on the other side.
|
||||
wrapper->AddRef();
|
||||
@@ -52,52 +34,44 @@ class CefCppToC : public CefBase {
|
||||
return wrapper->GetStruct();
|
||||
}
|
||||
|
||||
// Use this method to retrieve the underlying class instance when receiving
|
||||
// our wrapper structure back from the other side.
|
||||
// Retrieve the underlying object instance for a structure reference passed
|
||||
// back from the other side.
|
||||
static CefRefPtr<BaseName> Unwrap(StructName* s) {
|
||||
if (!s)
|
||||
return NULL;
|
||||
|
||||
// Cast our structure to the wrapper structure type.
|
||||
Struct* wrapperStruct = reinterpret_cast<Struct*>(s);
|
||||
WrapperStruct* wrapperStruct = GetWrapperStruct(s);
|
||||
|
||||
// If the type does not match this object then we need to unwrap as the
|
||||
// derived type.
|
||||
if (wrapperStruct->type_ != kWrapperType)
|
||||
return UnwrapDerived(wrapperStruct->type_, s);
|
||||
|
||||
// Add the underlying object instance to a smart pointer.
|
||||
CefRefPtr<BaseName> objectPtr(wrapperStruct->class_->GetClass());
|
||||
CefRefPtr<BaseName> objectPtr(wrapperStruct->object_);
|
||||
// Release the reference to our wrapper object that was added before the
|
||||
// structure was passed back to us.
|
||||
wrapperStruct->class_->Release();
|
||||
wrapperStruct->wrapper_->Release();
|
||||
// Return the underlying object instance.
|
||||
return objectPtr;
|
||||
}
|
||||
|
||||
explicit CefCppToC(BaseName* cls)
|
||||
: class_(cls) {
|
||||
DCHECK(cls);
|
||||
|
||||
struct_.class_ = this;
|
||||
|
||||
// zero the underlying structure and set base members
|
||||
memset(&struct_.struct_, 0, sizeof(StructName));
|
||||
struct_.struct_.base.size = sizeof(StructName);
|
||||
struct_.struct_.base.add_ref = struct_add_ref;
|
||||
struct_.struct_.base.release = struct_release;
|
||||
struct_.struct_.base.has_one_ref = struct_has_one_ref;
|
||||
|
||||
#ifndef NDEBUG
|
||||
base::AtomicRefCountInc(&DebugObjCt);
|
||||
#endif
|
||||
// Retrieve the underlying object instance from our own structure reference
|
||||
// when the reference is passed as the required first parameter of a C API
|
||||
// function call. No explicit reference counting is done in this case.
|
||||
static CefRefPtr<BaseName> Get(StructName* s) {
|
||||
DCHECK(s);
|
||||
WrapperStruct* wrapperStruct = GetWrapperStruct(s);
|
||||
// Verify that the wrapper offset was calculated correctly.
|
||||
DCHECK_EQ(kWrapperType, wrapperStruct->type_);
|
||||
return wrapperStruct->object_;
|
||||
}
|
||||
virtual ~CefCppToC() {
|
||||
#ifndef NDEBUG
|
||||
base::AtomicRefCountDec(&DebugObjCt);
|
||||
#endif
|
||||
}
|
||||
|
||||
BaseName* GetClass() { return class_; }
|
||||
|
||||
// If returning the structure across the DLL boundary you should call
|
||||
// AddRef() on this CefCppToC object. On the other side of the DLL boundary,
|
||||
// call UnderlyingRelease() on the wrapping CefCToCpp object.
|
||||
StructName* GetStruct() { return &struct_.struct_; }
|
||||
StructName* GetStruct() { return &wrapper_struct_.struct_; }
|
||||
|
||||
// CefBase methods increment/decrement reference counts on both this object
|
||||
// and the underlying wrapper class.
|
||||
@@ -113,12 +87,7 @@ class CefCppToC : public CefBase {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool HasOneRef() const { return ref_count_.HasOneRef(); }
|
||||
|
||||
// Increment/decrement reference counts on only the underlying class.
|
||||
void UnderlyingAddRef() const { class_->AddRef(); }
|
||||
bool UnderlyingRelease() const { return class_->Release(); }
|
||||
bool UnderlyingHasOneRef() const { return class_->HasOneRef(); }
|
||||
bool HasOneRef() const { return UnderlyingHasOneRef(); }
|
||||
|
||||
#ifndef NDEBUG
|
||||
// Simple tracking of allocated objects.
|
||||
@@ -126,39 +95,105 @@ class CefCppToC : public CefBase {
|
||||
#endif
|
||||
|
||||
protected:
|
||||
Struct struct_;
|
||||
BaseName* class_;
|
||||
CefCppToC() {
|
||||
wrapper_struct_.type_ = kWrapperType;
|
||||
wrapper_struct_.wrapper_ = this;
|
||||
memset(GetStruct(), 0, sizeof(StructName));
|
||||
|
||||
cef_base_t* base = reinterpret_cast<cef_base_t*>(GetStruct());
|
||||
base->size = sizeof(StructName);
|
||||
base->add_ref = struct_add_ref;
|
||||
base->release = struct_release;
|
||||
base->has_one_ref = struct_has_one_ref;
|
||||
|
||||
#ifndef NDEBUG
|
||||
base::AtomicRefCountInc(&DebugObjCt);
|
||||
#endif
|
||||
}
|
||||
|
||||
virtual ~CefCppToC() {
|
||||
#ifndef NDEBUG
|
||||
base::AtomicRefCountDec(&DebugObjCt);
|
||||
#endif
|
||||
}
|
||||
|
||||
private:
|
||||
static void CEF_CALLBACK struct_add_ref(struct _cef_base_t* base) {
|
||||
// Used to associate this wrapper object, the underlying object instance and
|
||||
// the structure that will be passed to the other side.
|
||||
struct WrapperStruct {
|
||||
CefWrapperType type_;
|
||||
BaseName* object_;
|
||||
CefCppToC<ClassName, BaseName, StructName>* wrapper_;
|
||||
StructName struct_;
|
||||
};
|
||||
|
||||
static WrapperStruct* GetWrapperStruct(StructName* s) {
|
||||
// Offset using the WrapperStruct size instead of individual member sizes
|
||||
// to avoid problems due to platform/compiler differences in structure
|
||||
// padding.
|
||||
return reinterpret_cast<WrapperStruct*>(
|
||||
reinterpret_cast<char*>(s) -
|
||||
(sizeof(WrapperStruct) - sizeof(StructName)));
|
||||
}
|
||||
|
||||
// Unwrap as the derived type.
|
||||
static CefRefPtr<BaseName> UnwrapDerived(CefWrapperType type, StructName* s);
|
||||
|
||||
// Increment/decrement reference counts on only the underlying class.
|
||||
void UnderlyingAddRef() const {
|
||||
wrapper_struct_.object_->AddRef();
|
||||
}
|
||||
bool UnderlyingRelease() const {
|
||||
return wrapper_struct_.object_->Release();
|
||||
}
|
||||
bool UnderlyingHasOneRef() const {
|
||||
return wrapper_struct_.object_->HasOneRef();
|
||||
}
|
||||
|
||||
static void CEF_CALLBACK struct_add_ref(cef_base_t* base) {
|
||||
DCHECK(base);
|
||||
if (!base)
|
||||
return;
|
||||
|
||||
Struct* impl = reinterpret_cast<Struct*>(base);
|
||||
impl->class_->AddRef();
|
||||
WrapperStruct* wrapperStruct =
|
||||
GetWrapperStruct(reinterpret_cast<StructName*>(base));
|
||||
// Verify that the wrapper offset was calculated correctly.
|
||||
DCHECK_EQ(kWrapperType, wrapperStruct->type_);
|
||||
|
||||
wrapperStruct->wrapper_->AddRef();
|
||||
}
|
||||
|
||||
static int CEF_CALLBACK struct_release(struct _cef_base_t* base) {
|
||||
static int CEF_CALLBACK struct_release(cef_base_t* base) {
|
||||
DCHECK(base);
|
||||
if (!base)
|
||||
return 0;
|
||||
|
||||
Struct* impl = reinterpret_cast<Struct*>(base);
|
||||
return impl->class_->Release();
|
||||
WrapperStruct* wrapperStruct =
|
||||
GetWrapperStruct(reinterpret_cast<StructName*>(base));
|
||||
// Verify that the wrapper offset was calculated correctly.
|
||||
DCHECK_EQ(kWrapperType, wrapperStruct->type_);
|
||||
|
||||
return wrapperStruct->wrapper_->Release();
|
||||
}
|
||||
|
||||
static int CEF_CALLBACK struct_has_one_ref(struct _cef_base_t* base) {
|
||||
static int CEF_CALLBACK struct_has_one_ref(cef_base_t* base) {
|
||||
DCHECK(base);
|
||||
if (!base)
|
||||
return 0;
|
||||
|
||||
Struct* impl = reinterpret_cast<Struct*>(base);
|
||||
return impl->class_->HasOneRef();
|
||||
WrapperStruct* wrapperStruct =
|
||||
GetWrapperStruct(reinterpret_cast<StructName*>(base));
|
||||
// Verify that the wrapper offset was calculated correctly.
|
||||
DCHECK_EQ(kWrapperType, wrapperStruct->type_);
|
||||
|
||||
return wrapperStruct->wrapper_->HasOneRef();
|
||||
}
|
||||
|
||||
WrapperStruct wrapper_struct_;
|
||||
CefRefCount ref_count_;
|
||||
|
||||
static CefWrapperType kWrapperType;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefCppToC);
|
||||
};
|
||||
|
||||
|
@@ -13,6 +13,8 @@
|
||||
#include "libcef_dll/cpptoc/delete_cookies_callback_cpptoc.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK delete_cookies_callback_on_complete(
|
||||
@@ -28,14 +30,20 @@ void CEF_CALLBACK delete_cookies_callback_on_complete(
|
||||
num_deleted);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefDeleteCookiesCallbackCppToC::CefDeleteCookiesCallbackCppToC(
|
||||
CefDeleteCookiesCallback* cls)
|
||||
: CefCppToC<CefDeleteCookiesCallbackCppToC, CefDeleteCookiesCallback,
|
||||
cef_delete_cookies_callback_t>(cls) {
|
||||
struct_.struct_.on_complete = delete_cookies_callback_on_complete;
|
||||
CefDeleteCookiesCallbackCppToC::CefDeleteCookiesCallbackCppToC() {
|
||||
GetStruct()->on_complete = delete_cookies_callback_on_complete;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefDeleteCookiesCallback> CefCppToC<CefDeleteCookiesCallbackCppToC,
|
||||
CefDeleteCookiesCallback, cef_delete_cookies_callback_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_delete_cookies_callback_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -43,3 +51,6 @@ template<> base::AtomicRefCount CefCppToC<CefDeleteCookiesCallbackCppToC,
|
||||
CefDeleteCookiesCallback, cef_delete_cookies_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefDeleteCookiesCallbackCppToC,
|
||||
CefDeleteCookiesCallback, cef_delete_cookies_callback_t>::kWrapperType =
|
||||
WT_DELETE_COOKIES_CALLBACK;
|
||||
|
@@ -28,9 +28,8 @@ class CefDeleteCookiesCallbackCppToC
|
||||
: public CefCppToC<CefDeleteCookiesCallbackCppToC, CefDeleteCookiesCallback,
|
||||
cef_delete_cookies_callback_t> {
|
||||
public:
|
||||
explicit CefDeleteCookiesCallbackCppToC(CefDeleteCookiesCallback* cls);
|
||||
CefDeleteCookiesCallbackCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_DELETE_COOKIES_CALLBACK_CPPTOC_H_
|
||||
|
||||
|
@@ -16,6 +16,8 @@
|
||||
#include "libcef_dll/transfer_util.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
int CEF_CALLBACK dialog_handler_on_file_dialog(
|
||||
@@ -60,13 +62,20 @@ int CEF_CALLBACK dialog_handler_on_file_dialog(
|
||||
return _retval;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefDialogHandlerCppToC::CefDialogHandlerCppToC(CefDialogHandler* cls)
|
||||
: CefCppToC<CefDialogHandlerCppToC, CefDialogHandler, cef_dialog_handler_t>(
|
||||
cls) {
|
||||
struct_.struct_.on_file_dialog = dialog_handler_on_file_dialog;
|
||||
CefDialogHandlerCppToC::CefDialogHandlerCppToC() {
|
||||
GetStruct()->on_file_dialog = dialog_handler_on_file_dialog;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefDialogHandler> CefCppToC<CefDialogHandlerCppToC,
|
||||
CefDialogHandler, cef_dialog_handler_t>::UnwrapDerived(CefWrapperType type,
|
||||
cef_dialog_handler_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -74,3 +83,5 @@ template<> base::AtomicRefCount CefCppToC<CefDialogHandlerCppToC,
|
||||
CefDialogHandler, cef_dialog_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefDialogHandlerCppToC, CefDialogHandler,
|
||||
cef_dialog_handler_t>::kWrapperType = WT_DIALOG_HANDLER;
|
||||
|
@@ -28,9 +28,8 @@ class CefDialogHandlerCppToC
|
||||
: public CefCppToC<CefDialogHandlerCppToC, CefDialogHandler,
|
||||
cef_dialog_handler_t> {
|
||||
public:
|
||||
explicit CefDialogHandlerCppToC(CefDialogHandler* cls);
|
||||
CefDialogHandlerCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_DIALOG_HANDLER_CPPTOC_H_
|
||||
|
||||
|
@@ -30,6 +30,8 @@ CEF_EXPORT cef_dictionary_value_t* cef_dictionary_value_create() {
|
||||
}
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
int CEF_CALLBACK dictionary_value_is_valid(
|
||||
@@ -624,41 +626,48 @@ int CEF_CALLBACK dictionary_value_set_list(struct _cef_dictionary_value_t* self,
|
||||
return _retval;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefDictionaryValueCppToC::CefDictionaryValueCppToC(CefDictionaryValue* cls)
|
||||
: CefCppToC<CefDictionaryValueCppToC, CefDictionaryValue,
|
||||
cef_dictionary_value_t>(cls) {
|
||||
struct_.struct_.is_valid = dictionary_value_is_valid;
|
||||
struct_.struct_.is_owned = dictionary_value_is_owned;
|
||||
struct_.struct_.is_read_only = dictionary_value_is_read_only;
|
||||
struct_.struct_.is_same = dictionary_value_is_same;
|
||||
struct_.struct_.is_equal = dictionary_value_is_equal;
|
||||
struct_.struct_.copy = dictionary_value_copy;
|
||||
struct_.struct_.get_size = dictionary_value_get_size;
|
||||
struct_.struct_.clear = dictionary_value_clear;
|
||||
struct_.struct_.has_key = dictionary_value_has_key;
|
||||
struct_.struct_.get_keys = dictionary_value_get_keys;
|
||||
struct_.struct_.remove = dictionary_value_remove;
|
||||
struct_.struct_.get_type = dictionary_value_get_type;
|
||||
struct_.struct_.get_value = dictionary_value_get_value;
|
||||
struct_.struct_.get_bool = dictionary_value_get_bool;
|
||||
struct_.struct_.get_int = dictionary_value_get_int;
|
||||
struct_.struct_.get_double = dictionary_value_get_double;
|
||||
struct_.struct_.get_string = dictionary_value_get_string;
|
||||
struct_.struct_.get_binary = dictionary_value_get_binary;
|
||||
struct_.struct_.get_dictionary = dictionary_value_get_dictionary;
|
||||
struct_.struct_.get_list = dictionary_value_get_list;
|
||||
struct_.struct_.set_value = dictionary_value_set_value;
|
||||
struct_.struct_.set_null = dictionary_value_set_null;
|
||||
struct_.struct_.set_bool = dictionary_value_set_bool;
|
||||
struct_.struct_.set_int = dictionary_value_set_int;
|
||||
struct_.struct_.set_double = dictionary_value_set_double;
|
||||
struct_.struct_.set_string = dictionary_value_set_string;
|
||||
struct_.struct_.set_binary = dictionary_value_set_binary;
|
||||
struct_.struct_.set_dictionary = dictionary_value_set_dictionary;
|
||||
struct_.struct_.set_list = dictionary_value_set_list;
|
||||
CefDictionaryValueCppToC::CefDictionaryValueCppToC() {
|
||||
GetStruct()->is_valid = dictionary_value_is_valid;
|
||||
GetStruct()->is_owned = dictionary_value_is_owned;
|
||||
GetStruct()->is_read_only = dictionary_value_is_read_only;
|
||||
GetStruct()->is_same = dictionary_value_is_same;
|
||||
GetStruct()->is_equal = dictionary_value_is_equal;
|
||||
GetStruct()->copy = dictionary_value_copy;
|
||||
GetStruct()->get_size = dictionary_value_get_size;
|
||||
GetStruct()->clear = dictionary_value_clear;
|
||||
GetStruct()->has_key = dictionary_value_has_key;
|
||||
GetStruct()->get_keys = dictionary_value_get_keys;
|
||||
GetStruct()->remove = dictionary_value_remove;
|
||||
GetStruct()->get_type = dictionary_value_get_type;
|
||||
GetStruct()->get_value = dictionary_value_get_value;
|
||||
GetStruct()->get_bool = dictionary_value_get_bool;
|
||||
GetStruct()->get_int = dictionary_value_get_int;
|
||||
GetStruct()->get_double = dictionary_value_get_double;
|
||||
GetStruct()->get_string = dictionary_value_get_string;
|
||||
GetStruct()->get_binary = dictionary_value_get_binary;
|
||||
GetStruct()->get_dictionary = dictionary_value_get_dictionary;
|
||||
GetStruct()->get_list = dictionary_value_get_list;
|
||||
GetStruct()->set_value = dictionary_value_set_value;
|
||||
GetStruct()->set_null = dictionary_value_set_null;
|
||||
GetStruct()->set_bool = dictionary_value_set_bool;
|
||||
GetStruct()->set_int = dictionary_value_set_int;
|
||||
GetStruct()->set_double = dictionary_value_set_double;
|
||||
GetStruct()->set_string = dictionary_value_set_string;
|
||||
GetStruct()->set_binary = dictionary_value_set_binary;
|
||||
GetStruct()->set_dictionary = dictionary_value_set_dictionary;
|
||||
GetStruct()->set_list = dictionary_value_set_list;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefDictionaryValue> CefCppToC<CefDictionaryValueCppToC,
|
||||
CefDictionaryValue, cef_dictionary_value_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_dictionary_value_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -666,3 +675,6 @@ template<> base::AtomicRefCount CefCppToC<CefDictionaryValueCppToC,
|
||||
CefDictionaryValue, cef_dictionary_value_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefDictionaryValueCppToC,
|
||||
CefDictionaryValue, cef_dictionary_value_t>::kWrapperType =
|
||||
WT_DICTIONARY_VALUE;
|
||||
|
@@ -28,9 +28,8 @@ class CefDictionaryValueCppToC
|
||||
: public CefCppToC<CefDictionaryValueCppToC, CefDictionaryValue,
|
||||
cef_dictionary_value_t> {
|
||||
public:
|
||||
explicit CefDictionaryValueCppToC(CefDictionaryValue* cls);
|
||||
CefDictionaryValueCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_DICTIONARY_VALUE_CPPTOC_H_
|
||||
|
||||
|
@@ -16,6 +16,8 @@
|
||||
#include "libcef_dll/transfer_util.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK display_handler_on_address_change(
|
||||
@@ -160,18 +162,25 @@ int CEF_CALLBACK display_handler_on_console_message(
|
||||
return _retval;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefDisplayHandlerCppToC::CefDisplayHandlerCppToC(CefDisplayHandler* cls)
|
||||
: CefCppToC<CefDisplayHandlerCppToC, CefDisplayHandler,
|
||||
cef_display_handler_t>(cls) {
|
||||
struct_.struct_.on_address_change = display_handler_on_address_change;
|
||||
struct_.struct_.on_title_change = display_handler_on_title_change;
|
||||
struct_.struct_.on_favicon_urlchange = display_handler_on_favicon_urlchange;
|
||||
struct_.struct_.on_tooltip = display_handler_on_tooltip;
|
||||
struct_.struct_.on_status_message = display_handler_on_status_message;
|
||||
struct_.struct_.on_console_message = display_handler_on_console_message;
|
||||
CefDisplayHandlerCppToC::CefDisplayHandlerCppToC() {
|
||||
GetStruct()->on_address_change = display_handler_on_address_change;
|
||||
GetStruct()->on_title_change = display_handler_on_title_change;
|
||||
GetStruct()->on_favicon_urlchange = display_handler_on_favicon_urlchange;
|
||||
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;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefDisplayHandler> CefCppToC<CefDisplayHandlerCppToC,
|
||||
CefDisplayHandler, cef_display_handler_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_display_handler_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -179,3 +188,5 @@ template<> base::AtomicRefCount CefCppToC<CefDisplayHandlerCppToC,
|
||||
CefDisplayHandler, cef_display_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefDisplayHandlerCppToC, CefDisplayHandler,
|
||||
cef_display_handler_t>::kWrapperType = WT_DISPLAY_HANDLER;
|
||||
|
@@ -28,9 +28,8 @@ class CefDisplayHandlerCppToC
|
||||
: public CefCppToC<CefDisplayHandlerCppToC, CefDisplayHandler,
|
||||
cef_display_handler_t> {
|
||||
public:
|
||||
explicit CefDisplayHandlerCppToC(CefDisplayHandler* cls);
|
||||
CefDisplayHandlerCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_DISPLAY_HANDLER_CPPTOC_H_
|
||||
|
||||
|
@@ -14,6 +14,8 @@
|
||||
#include "libcef_dll/cpptoc/domnode_cpptoc.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
cef_dom_document_type_t CEF_CALLBACK domdocument_get_type(
|
||||
@@ -238,27 +240,34 @@ cef_string_userfree_t CEF_CALLBACK domdocument_get_complete_url(
|
||||
return _retval.DetachToUserFree();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefDOMDocumentCppToC::CefDOMDocumentCppToC(CefDOMDocument* cls)
|
||||
: CefCppToC<CefDOMDocumentCppToC, CefDOMDocument, cef_domdocument_t>(cls) {
|
||||
struct_.struct_.get_type = domdocument_get_type;
|
||||
struct_.struct_.get_document = domdocument_get_document;
|
||||
struct_.struct_.get_body = domdocument_get_body;
|
||||
struct_.struct_.get_head = domdocument_get_head;
|
||||
struct_.struct_.get_title = domdocument_get_title;
|
||||
struct_.struct_.get_element_by_id = domdocument_get_element_by_id;
|
||||
struct_.struct_.get_focused_node = domdocument_get_focused_node;
|
||||
struct_.struct_.has_selection = domdocument_has_selection;
|
||||
struct_.struct_.get_selection_start_offset =
|
||||
CefDOMDocumentCppToC::CefDOMDocumentCppToC() {
|
||||
GetStruct()->get_type = domdocument_get_type;
|
||||
GetStruct()->get_document = domdocument_get_document;
|
||||
GetStruct()->get_body = domdocument_get_body;
|
||||
GetStruct()->get_head = domdocument_get_head;
|
||||
GetStruct()->get_title = domdocument_get_title;
|
||||
GetStruct()->get_element_by_id = domdocument_get_element_by_id;
|
||||
GetStruct()->get_focused_node = domdocument_get_focused_node;
|
||||
GetStruct()->has_selection = domdocument_has_selection;
|
||||
GetStruct()->get_selection_start_offset =
|
||||
domdocument_get_selection_start_offset;
|
||||
struct_.struct_.get_selection_end_offset =
|
||||
domdocument_get_selection_end_offset;
|
||||
struct_.struct_.get_selection_as_markup = domdocument_get_selection_as_markup;
|
||||
struct_.struct_.get_selection_as_text = domdocument_get_selection_as_text;
|
||||
struct_.struct_.get_base_url = domdocument_get_base_url;
|
||||
struct_.struct_.get_complete_url = domdocument_get_complete_url;
|
||||
GetStruct()->get_selection_end_offset = domdocument_get_selection_end_offset;
|
||||
GetStruct()->get_selection_as_markup = domdocument_get_selection_as_markup;
|
||||
GetStruct()->get_selection_as_text = domdocument_get_selection_as_text;
|
||||
GetStruct()->get_base_url = domdocument_get_base_url;
|
||||
GetStruct()->get_complete_url = domdocument_get_complete_url;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefDOMDocument> CefCppToC<CefDOMDocumentCppToC,
|
||||
CefDOMDocument, cef_domdocument_t>::UnwrapDerived(CefWrapperType type,
|
||||
cef_domdocument_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -266,3 +275,5 @@ template<> base::AtomicRefCount CefCppToC<CefDOMDocumentCppToC, CefDOMDocument,
|
||||
cef_domdocument_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefDOMDocumentCppToC, CefDOMDocument,
|
||||
cef_domdocument_t>::kWrapperType = WT_DOMDOCUMENT;
|
||||
|
@@ -28,9 +28,8 @@ class CefDOMDocumentCppToC
|
||||
: public CefCppToC<CefDOMDocumentCppToC, CefDOMDocument,
|
||||
cef_domdocument_t> {
|
||||
public:
|
||||
explicit CefDOMDocumentCppToC(CefDOMDocument* cls);
|
||||
CefDOMDocumentCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_DOMDOCUMENT_CPPTOC_H_
|
||||
|
||||
|
@@ -15,6 +15,8 @@
|
||||
#include "libcef_dll/transfer_util.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
cef_dom_node_type_t CEF_CALLBACK domnode_get_type(struct _cef_domnode_t* self) {
|
||||
@@ -427,37 +429,44 @@ cef_string_userfree_t CEF_CALLBACK domnode_get_element_inner_text(
|
||||
return _retval.DetachToUserFree();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefDOMNodeCppToC::CefDOMNodeCppToC(CefDOMNode* cls)
|
||||
: CefCppToC<CefDOMNodeCppToC, CefDOMNode, cef_domnode_t>(cls) {
|
||||
struct_.struct_.get_type = domnode_get_type;
|
||||
struct_.struct_.is_text = domnode_is_text;
|
||||
struct_.struct_.is_element = domnode_is_element;
|
||||
struct_.struct_.is_editable = domnode_is_editable;
|
||||
struct_.struct_.is_form_control_element = domnode_is_form_control_element;
|
||||
struct_.struct_.get_form_control_element_type =
|
||||
CefDOMNodeCppToC::CefDOMNodeCppToC() {
|
||||
GetStruct()->get_type = domnode_get_type;
|
||||
GetStruct()->is_text = domnode_is_text;
|
||||
GetStruct()->is_element = domnode_is_element;
|
||||
GetStruct()->is_editable = domnode_is_editable;
|
||||
GetStruct()->is_form_control_element = domnode_is_form_control_element;
|
||||
GetStruct()->get_form_control_element_type =
|
||||
domnode_get_form_control_element_type;
|
||||
struct_.struct_.is_same = domnode_is_same;
|
||||
struct_.struct_.get_name = domnode_get_name;
|
||||
struct_.struct_.get_value = domnode_get_value;
|
||||
struct_.struct_.set_value = domnode_set_value;
|
||||
struct_.struct_.get_as_markup = domnode_get_as_markup;
|
||||
struct_.struct_.get_document = domnode_get_document;
|
||||
struct_.struct_.get_parent = domnode_get_parent;
|
||||
struct_.struct_.get_previous_sibling = domnode_get_previous_sibling;
|
||||
struct_.struct_.get_next_sibling = domnode_get_next_sibling;
|
||||
struct_.struct_.has_children = domnode_has_children;
|
||||
struct_.struct_.get_first_child = domnode_get_first_child;
|
||||
struct_.struct_.get_last_child = domnode_get_last_child;
|
||||
struct_.struct_.get_element_tag_name = domnode_get_element_tag_name;
|
||||
struct_.struct_.has_element_attributes = domnode_has_element_attributes;
|
||||
struct_.struct_.has_element_attribute = domnode_has_element_attribute;
|
||||
struct_.struct_.get_element_attribute = domnode_get_element_attribute;
|
||||
struct_.struct_.get_element_attributes = domnode_get_element_attributes;
|
||||
struct_.struct_.set_element_attribute = domnode_set_element_attribute;
|
||||
struct_.struct_.get_element_inner_text = domnode_get_element_inner_text;
|
||||
GetStruct()->is_same = domnode_is_same;
|
||||
GetStruct()->get_name = domnode_get_name;
|
||||
GetStruct()->get_value = domnode_get_value;
|
||||
GetStruct()->set_value = domnode_set_value;
|
||||
GetStruct()->get_as_markup = domnode_get_as_markup;
|
||||
GetStruct()->get_document = domnode_get_document;
|
||||
GetStruct()->get_parent = domnode_get_parent;
|
||||
GetStruct()->get_previous_sibling = domnode_get_previous_sibling;
|
||||
GetStruct()->get_next_sibling = domnode_get_next_sibling;
|
||||
GetStruct()->has_children = domnode_has_children;
|
||||
GetStruct()->get_first_child = domnode_get_first_child;
|
||||
GetStruct()->get_last_child = domnode_get_last_child;
|
||||
GetStruct()->get_element_tag_name = domnode_get_element_tag_name;
|
||||
GetStruct()->has_element_attributes = domnode_has_element_attributes;
|
||||
GetStruct()->has_element_attribute = domnode_has_element_attribute;
|
||||
GetStruct()->get_element_attribute = domnode_get_element_attribute;
|
||||
GetStruct()->get_element_attributes = domnode_get_element_attributes;
|
||||
GetStruct()->set_element_attribute = domnode_set_element_attribute;
|
||||
GetStruct()->get_element_inner_text = domnode_get_element_inner_text;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefDOMNode> CefCppToC<CefDOMNodeCppToC, CefDOMNode,
|
||||
cef_domnode_t>::UnwrapDerived(CefWrapperType type, cef_domnode_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -465,3 +474,5 @@ template<> base::AtomicRefCount CefCppToC<CefDOMNodeCppToC, CefDOMNode,
|
||||
cef_domnode_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefDOMNodeCppToC, CefDOMNode,
|
||||
cef_domnode_t>::kWrapperType = WT_DOMNODE;
|
||||
|
@@ -27,9 +27,8 @@
|
||||
class CefDOMNodeCppToC
|
||||
: public CefCppToC<CefDOMNodeCppToC, CefDOMNode, cef_domnode_t> {
|
||||
public:
|
||||
explicit CefDOMNodeCppToC(CefDOMNode* cls);
|
||||
CefDOMNodeCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_DOMNODE_CPPTOC_H_
|
||||
|
||||
|
@@ -14,6 +14,8 @@
|
||||
#include "libcef_dll/ctocpp/domdocument_ctocpp.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK domvisitor_visit(struct _cef_domvisitor_t* self,
|
||||
@@ -33,12 +35,20 @@ void CEF_CALLBACK domvisitor_visit(struct _cef_domvisitor_t* self,
|
||||
CefDOMDocumentCToCpp::Wrap(document));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefDOMVisitorCppToC::CefDOMVisitorCppToC(CefDOMVisitor* cls)
|
||||
: CefCppToC<CefDOMVisitorCppToC, CefDOMVisitor, cef_domvisitor_t>(cls) {
|
||||
struct_.struct_.visit = domvisitor_visit;
|
||||
CefDOMVisitorCppToC::CefDOMVisitorCppToC() {
|
||||
GetStruct()->visit = domvisitor_visit;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefDOMVisitor> CefCppToC<CefDOMVisitorCppToC,
|
||||
CefDOMVisitor, cef_domvisitor_t>::UnwrapDerived(CefWrapperType type,
|
||||
cef_domvisitor_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -46,3 +56,5 @@ template<> base::AtomicRefCount CefCppToC<CefDOMVisitorCppToC, CefDOMVisitor,
|
||||
cef_domvisitor_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefDOMVisitorCppToC, CefDOMVisitor,
|
||||
cef_domvisitor_t>::kWrapperType = WT_DOMVISITOR;
|
||||
|
@@ -27,9 +27,8 @@
|
||||
class CefDOMVisitorCppToC
|
||||
: public CefCppToC<CefDOMVisitorCppToC, CefDOMVisitor, cef_domvisitor_t> {
|
||||
public:
|
||||
explicit CefDOMVisitorCppToC(CefDOMVisitor* cls);
|
||||
CefDOMVisitorCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_DOMVISITOR_CPPTOC_H_
|
||||
|
||||
|
@@ -17,6 +17,8 @@
|
||||
#include "libcef_dll/ctocpp/download_item_callback_ctocpp.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK download_handler_on_before_download(
|
||||
@@ -83,14 +85,21 @@ void CEF_CALLBACK download_handler_on_download_updated(
|
||||
CefDownloadItemCallbackCToCpp::Wrap(callback));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefDownloadHandlerCppToC::CefDownloadHandlerCppToC(CefDownloadHandler* cls)
|
||||
: CefCppToC<CefDownloadHandlerCppToC, CefDownloadHandler,
|
||||
cef_download_handler_t>(cls) {
|
||||
struct_.struct_.on_before_download = download_handler_on_before_download;
|
||||
struct_.struct_.on_download_updated = download_handler_on_download_updated;
|
||||
CefDownloadHandlerCppToC::CefDownloadHandlerCppToC() {
|
||||
GetStruct()->on_before_download = download_handler_on_before_download;
|
||||
GetStruct()->on_download_updated = download_handler_on_download_updated;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefDownloadHandler> CefCppToC<CefDownloadHandlerCppToC,
|
||||
CefDownloadHandler, cef_download_handler_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_download_handler_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -98,3 +107,6 @@ template<> base::AtomicRefCount CefCppToC<CefDownloadHandlerCppToC,
|
||||
CefDownloadHandler, cef_download_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefDownloadHandlerCppToC,
|
||||
CefDownloadHandler, cef_download_handler_t>::kWrapperType =
|
||||
WT_DOWNLOAD_HANDLER;
|
||||
|
@@ -28,9 +28,8 @@ class CefDownloadHandlerCppToC
|
||||
: public CefCppToC<CefDownloadHandlerCppToC, CefDownloadHandler,
|
||||
cef_download_handler_t> {
|
||||
public:
|
||||
explicit CefDownloadHandlerCppToC(CefDownloadHandler* cls);
|
||||
CefDownloadHandlerCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_HANDLER_CPPTOC_H_
|
||||
|
||||
|
@@ -13,6 +13,8 @@
|
||||
#include "libcef_dll/cpptoc/download_item_callback_cpptoc.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK download_item_callback_cancel(
|
||||
@@ -51,16 +53,22 @@ void CEF_CALLBACK download_item_callback_resume(
|
||||
CefDownloadItemCallbackCppToC::Get(self)->Resume();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefDownloadItemCallbackCppToC::CefDownloadItemCallbackCppToC(
|
||||
CefDownloadItemCallback* cls)
|
||||
: CefCppToC<CefDownloadItemCallbackCppToC, CefDownloadItemCallback,
|
||||
cef_download_item_callback_t>(cls) {
|
||||
struct_.struct_.cancel = download_item_callback_cancel;
|
||||
struct_.struct_.pause = download_item_callback_pause;
|
||||
struct_.struct_.resume = download_item_callback_resume;
|
||||
CefDownloadItemCallbackCppToC::CefDownloadItemCallbackCppToC() {
|
||||
GetStruct()->cancel = download_item_callback_cancel;
|
||||
GetStruct()->pause = download_item_callback_pause;
|
||||
GetStruct()->resume = download_item_callback_resume;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefDownloadItemCallback> CefCppToC<CefDownloadItemCallbackCppToC,
|
||||
CefDownloadItemCallback, cef_download_item_callback_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_download_item_callback_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -68,3 +76,6 @@ template<> base::AtomicRefCount CefCppToC<CefDownloadItemCallbackCppToC,
|
||||
CefDownloadItemCallback, cef_download_item_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefDownloadItemCallbackCppToC,
|
||||
CefDownloadItemCallback, cef_download_item_callback_t>::kWrapperType =
|
||||
WT_DOWNLOAD_ITEM_CALLBACK;
|
||||
|
@@ -28,9 +28,8 @@ class CefDownloadItemCallbackCppToC
|
||||
: public CefCppToC<CefDownloadItemCallbackCppToC, CefDownloadItemCallback,
|
||||
cef_download_item_callback_t> {
|
||||
public:
|
||||
explicit CefDownloadItemCallbackCppToC(CefDownloadItemCallback* cls);
|
||||
CefDownloadItemCallbackCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_ITEM_CALLBACK_CPPTOC_H_
|
||||
|
||||
|
@@ -13,6 +13,8 @@
|
||||
#include "libcef_dll/cpptoc/download_item_cpptoc.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
int CEF_CALLBACK download_item_is_valid(struct _cef_download_item_t* self) {
|
||||
@@ -266,31 +268,36 @@ cef_string_userfree_t CEF_CALLBACK download_item_get_mime_type(
|
||||
return _retval.DetachToUserFree();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefDownloadItemCppToC::CefDownloadItemCppToC(CefDownloadItem* cls)
|
||||
: CefCppToC<CefDownloadItemCppToC, CefDownloadItem, cef_download_item_t>(
|
||||
cls) {
|
||||
struct_.struct_.is_valid = download_item_is_valid;
|
||||
struct_.struct_.is_in_progress = download_item_is_in_progress;
|
||||
struct_.struct_.is_complete = download_item_is_complete;
|
||||
struct_.struct_.is_canceled = download_item_is_canceled;
|
||||
struct_.struct_.get_current_speed = download_item_get_current_speed;
|
||||
struct_.struct_.get_percent_complete = download_item_get_percent_complete;
|
||||
struct_.struct_.get_total_bytes = download_item_get_total_bytes;
|
||||
struct_.struct_.get_received_bytes = download_item_get_received_bytes;
|
||||
struct_.struct_.get_start_time = download_item_get_start_time;
|
||||
struct_.struct_.get_end_time = download_item_get_end_time;
|
||||
struct_.struct_.get_full_path = download_item_get_full_path;
|
||||
struct_.struct_.get_id = download_item_get_id;
|
||||
struct_.struct_.get_url = download_item_get_url;
|
||||
struct_.struct_.get_original_url = download_item_get_original_url;
|
||||
struct_.struct_.get_suggested_file_name =
|
||||
download_item_get_suggested_file_name;
|
||||
struct_.struct_.get_content_disposition =
|
||||
download_item_get_content_disposition;
|
||||
struct_.struct_.get_mime_type = download_item_get_mime_type;
|
||||
CefDownloadItemCppToC::CefDownloadItemCppToC() {
|
||||
GetStruct()->is_valid = download_item_is_valid;
|
||||
GetStruct()->is_in_progress = download_item_is_in_progress;
|
||||
GetStruct()->is_complete = download_item_is_complete;
|
||||
GetStruct()->is_canceled = download_item_is_canceled;
|
||||
GetStruct()->get_current_speed = download_item_get_current_speed;
|
||||
GetStruct()->get_percent_complete = download_item_get_percent_complete;
|
||||
GetStruct()->get_total_bytes = download_item_get_total_bytes;
|
||||
GetStruct()->get_received_bytes = download_item_get_received_bytes;
|
||||
GetStruct()->get_start_time = download_item_get_start_time;
|
||||
GetStruct()->get_end_time = download_item_get_end_time;
|
||||
GetStruct()->get_full_path = download_item_get_full_path;
|
||||
GetStruct()->get_id = download_item_get_id;
|
||||
GetStruct()->get_url = download_item_get_url;
|
||||
GetStruct()->get_original_url = download_item_get_original_url;
|
||||
GetStruct()->get_suggested_file_name = download_item_get_suggested_file_name;
|
||||
GetStruct()->get_content_disposition = download_item_get_content_disposition;
|
||||
GetStruct()->get_mime_type = download_item_get_mime_type;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefDownloadItem> CefCppToC<CefDownloadItemCppToC,
|
||||
CefDownloadItem, cef_download_item_t>::UnwrapDerived(CefWrapperType type,
|
||||
cef_download_item_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -298,3 +305,5 @@ template<> base::AtomicRefCount CefCppToC<CefDownloadItemCppToC,
|
||||
CefDownloadItem, cef_download_item_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefDownloadItemCppToC, CefDownloadItem,
|
||||
cef_download_item_t>::kWrapperType = WT_DOWNLOAD_ITEM;
|
||||
|
@@ -28,9 +28,8 @@ class CefDownloadItemCppToC
|
||||
: public CefCppToC<CefDownloadItemCppToC, CefDownloadItem,
|
||||
cef_download_item_t> {
|
||||
public:
|
||||
explicit CefDownloadItemCppToC(CefDownloadItem* cls);
|
||||
CefDownloadItemCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_ITEM_CPPTOC_H_
|
||||
|
||||
|
@@ -28,6 +28,8 @@ CEF_EXPORT cef_drag_data_t* cef_drag_data_create() {
|
||||
}
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
struct _cef_drag_data_t* CEF_CALLBACK drag_data_clone(
|
||||
@@ -365,33 +367,40 @@ void CEF_CALLBACK drag_data_add_file(struct _cef_drag_data_t* self,
|
||||
CefString(display_name));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefDragDataCppToC::CefDragDataCppToC(CefDragData* cls)
|
||||
: CefCppToC<CefDragDataCppToC, CefDragData, cef_drag_data_t>(cls) {
|
||||
struct_.struct_.clone = drag_data_clone;
|
||||
struct_.struct_.is_read_only = drag_data_is_read_only;
|
||||
struct_.struct_.is_link = drag_data_is_link;
|
||||
struct_.struct_.is_fragment = drag_data_is_fragment;
|
||||
struct_.struct_.is_file = drag_data_is_file;
|
||||
struct_.struct_.get_link_url = drag_data_get_link_url;
|
||||
struct_.struct_.get_link_title = drag_data_get_link_title;
|
||||
struct_.struct_.get_link_metadata = drag_data_get_link_metadata;
|
||||
struct_.struct_.get_fragment_text = drag_data_get_fragment_text;
|
||||
struct_.struct_.get_fragment_html = drag_data_get_fragment_html;
|
||||
struct_.struct_.get_fragment_base_url = drag_data_get_fragment_base_url;
|
||||
struct_.struct_.get_file_name = drag_data_get_file_name;
|
||||
struct_.struct_.get_file_contents = drag_data_get_file_contents;
|
||||
struct_.struct_.get_file_names = drag_data_get_file_names;
|
||||
struct_.struct_.set_link_url = drag_data_set_link_url;
|
||||
struct_.struct_.set_link_title = drag_data_set_link_title;
|
||||
struct_.struct_.set_link_metadata = drag_data_set_link_metadata;
|
||||
struct_.struct_.set_fragment_text = drag_data_set_fragment_text;
|
||||
struct_.struct_.set_fragment_html = drag_data_set_fragment_html;
|
||||
struct_.struct_.set_fragment_base_url = drag_data_set_fragment_base_url;
|
||||
struct_.struct_.reset_file_contents = drag_data_reset_file_contents;
|
||||
struct_.struct_.add_file = drag_data_add_file;
|
||||
CefDragDataCppToC::CefDragDataCppToC() {
|
||||
GetStruct()->clone = drag_data_clone;
|
||||
GetStruct()->is_read_only = drag_data_is_read_only;
|
||||
GetStruct()->is_link = drag_data_is_link;
|
||||
GetStruct()->is_fragment = drag_data_is_fragment;
|
||||
GetStruct()->is_file = drag_data_is_file;
|
||||
GetStruct()->get_link_url = drag_data_get_link_url;
|
||||
GetStruct()->get_link_title = drag_data_get_link_title;
|
||||
GetStruct()->get_link_metadata = drag_data_get_link_metadata;
|
||||
GetStruct()->get_fragment_text = drag_data_get_fragment_text;
|
||||
GetStruct()->get_fragment_html = drag_data_get_fragment_html;
|
||||
GetStruct()->get_fragment_base_url = drag_data_get_fragment_base_url;
|
||||
GetStruct()->get_file_name = drag_data_get_file_name;
|
||||
GetStruct()->get_file_contents = drag_data_get_file_contents;
|
||||
GetStruct()->get_file_names = drag_data_get_file_names;
|
||||
GetStruct()->set_link_url = drag_data_set_link_url;
|
||||
GetStruct()->set_link_title = drag_data_set_link_title;
|
||||
GetStruct()->set_link_metadata = drag_data_set_link_metadata;
|
||||
GetStruct()->set_fragment_text = drag_data_set_fragment_text;
|
||||
GetStruct()->set_fragment_html = drag_data_set_fragment_html;
|
||||
GetStruct()->set_fragment_base_url = drag_data_set_fragment_base_url;
|
||||
GetStruct()->reset_file_contents = drag_data_reset_file_contents;
|
||||
GetStruct()->add_file = drag_data_add_file;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefDragData> CefCppToC<CefDragDataCppToC, CefDragData,
|
||||
cef_drag_data_t>::UnwrapDerived(CefWrapperType type, cef_drag_data_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -399,3 +408,5 @@ template<> base::AtomicRefCount CefCppToC<CefDragDataCppToC, CefDragData,
|
||||
cef_drag_data_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefDragDataCppToC, CefDragData,
|
||||
cef_drag_data_t>::kWrapperType = WT_DRAG_DATA;
|
||||
|
@@ -27,9 +27,8 @@
|
||||
class CefDragDataCppToC
|
||||
: public CefCppToC<CefDragDataCppToC, CefDragData, cef_drag_data_t> {
|
||||
public:
|
||||
explicit CefDragDataCppToC(CefDragData* cls);
|
||||
CefDragDataCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_DRAG_DATA_CPPTOC_H_
|
||||
|
||||
|
@@ -15,6 +15,8 @@
|
||||
#include "libcef_dll/ctocpp/drag_data_ctocpp.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
int CEF_CALLBACK drag_handler_on_drag_enter(struct _cef_drag_handler_t* self,
|
||||
@@ -44,12 +46,20 @@ int CEF_CALLBACK drag_handler_on_drag_enter(struct _cef_drag_handler_t* self,
|
||||
return _retval;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefDragHandlerCppToC::CefDragHandlerCppToC(CefDragHandler* cls)
|
||||
: CefCppToC<CefDragHandlerCppToC, CefDragHandler, cef_drag_handler_t>(cls) {
|
||||
struct_.struct_.on_drag_enter = drag_handler_on_drag_enter;
|
||||
CefDragHandlerCppToC::CefDragHandlerCppToC() {
|
||||
GetStruct()->on_drag_enter = drag_handler_on_drag_enter;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefDragHandler> CefCppToC<CefDragHandlerCppToC,
|
||||
CefDragHandler, cef_drag_handler_t>::UnwrapDerived(CefWrapperType type,
|
||||
cef_drag_handler_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -57,3 +67,5 @@ template<> base::AtomicRefCount CefCppToC<CefDragHandlerCppToC, CefDragHandler,
|
||||
cef_drag_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefDragHandlerCppToC, CefDragHandler,
|
||||
cef_drag_handler_t>::kWrapperType = WT_DRAG_HANDLER;
|
||||
|
@@ -28,9 +28,8 @@ class CefDragHandlerCppToC
|
||||
: public CefCppToC<CefDragHandlerCppToC, CefDragHandler,
|
||||
cef_drag_handler_t> {
|
||||
public:
|
||||
explicit CefDragHandlerCppToC(CefDragHandler* cls);
|
||||
CefDragHandlerCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_DRAG_HANDLER_CPPTOC_H_
|
||||
|
||||
|
@@ -13,6 +13,8 @@
|
||||
#include "libcef_dll/cpptoc/end_tracing_callback_cpptoc.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK end_tracing_callback_on_end_tracing_complete(
|
||||
@@ -33,19 +35,28 @@ void CEF_CALLBACK end_tracing_callback_on_end_tracing_complete(
|
||||
CefString(tracing_file));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefEndTracingCallbackCppToC::CefEndTracingCallbackCppToC(
|
||||
CefEndTracingCallback* cls)
|
||||
: CefCppToC<CefEndTracingCallbackCppToC, CefEndTracingCallback,
|
||||
cef_end_tracing_callback_t>(cls) {
|
||||
struct_.struct_.on_end_tracing_complete =
|
||||
CefEndTracingCallbackCppToC::CefEndTracingCallbackCppToC() {
|
||||
GetStruct()->on_end_tracing_complete =
|
||||
end_tracing_callback_on_end_tracing_complete;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefEndTracingCallback> CefCppToC<CefEndTracingCallbackCppToC,
|
||||
CefEndTracingCallback, cef_end_tracing_callback_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_end_tracing_callback_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> base::AtomicRefCount CefCppToC<CefEndTracingCallbackCppToC,
|
||||
CefEndTracingCallback, cef_end_tracing_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefEndTracingCallbackCppToC,
|
||||
CefEndTracingCallback, cef_end_tracing_callback_t>::kWrapperType =
|
||||
WT_END_TRACING_CALLBACK;
|
||||
|
@@ -28,9 +28,8 @@ class CefEndTracingCallbackCppToC
|
||||
: public CefCppToC<CefEndTracingCallbackCppToC, CefEndTracingCallback,
|
||||
cef_end_tracing_callback_t> {
|
||||
public:
|
||||
explicit CefEndTracingCallbackCppToC(CefEndTracingCallback* cls);
|
||||
CefEndTracingCallbackCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_END_TRACING_CALLBACK_CPPTOC_H_
|
||||
|
||||
|
@@ -14,6 +14,8 @@
|
||||
#include "libcef_dll/transfer_util.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK file_dialog_callback_cont(
|
||||
@@ -52,15 +54,21 @@ void CEF_CALLBACK file_dialog_callback_cancel(
|
||||
CefFileDialogCallbackCppToC::Get(self)->Cancel();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefFileDialogCallbackCppToC::CefFileDialogCallbackCppToC(
|
||||
CefFileDialogCallback* cls)
|
||||
: CefCppToC<CefFileDialogCallbackCppToC, CefFileDialogCallback,
|
||||
cef_file_dialog_callback_t>(cls) {
|
||||
struct_.struct_.cont = file_dialog_callback_cont;
|
||||
struct_.struct_.cancel = file_dialog_callback_cancel;
|
||||
CefFileDialogCallbackCppToC::CefFileDialogCallbackCppToC() {
|
||||
GetStruct()->cont = file_dialog_callback_cont;
|
||||
GetStruct()->cancel = file_dialog_callback_cancel;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefFileDialogCallback> CefCppToC<CefFileDialogCallbackCppToC,
|
||||
CefFileDialogCallback, cef_file_dialog_callback_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_file_dialog_callback_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -68,3 +76,6 @@ template<> base::AtomicRefCount CefCppToC<CefFileDialogCallbackCppToC,
|
||||
CefFileDialogCallback, cef_file_dialog_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefFileDialogCallbackCppToC,
|
||||
CefFileDialogCallback, cef_file_dialog_callback_t>::kWrapperType =
|
||||
WT_FILE_DIALOG_CALLBACK;
|
||||
|
@@ -28,9 +28,8 @@ class CefFileDialogCallbackCppToC
|
||||
: public CefCppToC<CefFileDialogCallbackCppToC, CefFileDialogCallback,
|
||||
cef_file_dialog_callback_t> {
|
||||
public:
|
||||
explicit CefFileDialogCallbackCppToC(CefFileDialogCallback* cls);
|
||||
CefFileDialogCallbackCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_FILE_DIALOG_CALLBACK_CPPTOC_H_
|
||||
|
||||
|
@@ -14,6 +14,8 @@
|
||||
#include "libcef_dll/ctocpp/browser_ctocpp.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK find_handler_on_find_result(struct _cef_find_handler_t* self,
|
||||
@@ -47,12 +49,20 @@ void CEF_CALLBACK find_handler_on_find_result(struct _cef_find_handler_t* self,
|
||||
finalUpdate?true:false);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefFindHandlerCppToC::CefFindHandlerCppToC(CefFindHandler* cls)
|
||||
: CefCppToC<CefFindHandlerCppToC, CefFindHandler, cef_find_handler_t>(cls) {
|
||||
struct_.struct_.on_find_result = find_handler_on_find_result;
|
||||
CefFindHandlerCppToC::CefFindHandlerCppToC() {
|
||||
GetStruct()->on_find_result = find_handler_on_find_result;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefFindHandler> CefCppToC<CefFindHandlerCppToC,
|
||||
CefFindHandler, cef_find_handler_t>::UnwrapDerived(CefWrapperType type,
|
||||
cef_find_handler_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -60,3 +70,5 @@ template<> base::AtomicRefCount CefCppToC<CefFindHandlerCppToC, CefFindHandler,
|
||||
cef_find_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefFindHandlerCppToC, CefFindHandler,
|
||||
cef_find_handler_t>::kWrapperType = WT_FIND_HANDLER;
|
||||
|
@@ -28,9 +28,8 @@ class CefFindHandlerCppToC
|
||||
: public CefCppToC<CefFindHandlerCppToC, CefFindHandler,
|
||||
cef_find_handler_t> {
|
||||
public:
|
||||
explicit CefFindHandlerCppToC(CefFindHandler* cls);
|
||||
CefFindHandlerCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_FIND_HANDLER_CPPTOC_H_
|
||||
|
||||
|
@@ -14,6 +14,8 @@
|
||||
#include "libcef_dll/ctocpp/browser_ctocpp.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK focus_handler_on_take_focus(struct _cef_focus_handler_t* self,
|
||||
@@ -72,15 +74,22 @@ void CEF_CALLBACK focus_handler_on_got_focus(struct _cef_focus_handler_t* self,
|
||||
CefBrowserCToCpp::Wrap(browser));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefFocusHandlerCppToC::CefFocusHandlerCppToC(CefFocusHandler* cls)
|
||||
: CefCppToC<CefFocusHandlerCppToC, CefFocusHandler, cef_focus_handler_t>(
|
||||
cls) {
|
||||
struct_.struct_.on_take_focus = focus_handler_on_take_focus;
|
||||
struct_.struct_.on_set_focus = focus_handler_on_set_focus;
|
||||
struct_.struct_.on_got_focus = focus_handler_on_got_focus;
|
||||
CefFocusHandlerCppToC::CefFocusHandlerCppToC() {
|
||||
GetStruct()->on_take_focus = focus_handler_on_take_focus;
|
||||
GetStruct()->on_set_focus = focus_handler_on_set_focus;
|
||||
GetStruct()->on_got_focus = focus_handler_on_got_focus;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefFocusHandler> CefCppToC<CefFocusHandlerCppToC,
|
||||
CefFocusHandler, cef_focus_handler_t>::UnwrapDerived(CefWrapperType type,
|
||||
cef_focus_handler_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -88,3 +97,5 @@ template<> base::AtomicRefCount CefCppToC<CefFocusHandlerCppToC,
|
||||
CefFocusHandler, cef_focus_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefFocusHandlerCppToC, CefFocusHandler,
|
||||
cef_focus_handler_t>::kWrapperType = WT_FOCUS_HANDLER;
|
||||
|
@@ -28,9 +28,8 @@ class CefFocusHandlerCppToC
|
||||
: public CefCppToC<CefFocusHandlerCppToC, CefFocusHandler,
|
||||
cef_focus_handler_t> {
|
||||
public:
|
||||
explicit CefFocusHandlerCppToC(CefFocusHandler* cls);
|
||||
CefFocusHandlerCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_FOCUS_HANDLER_CPPTOC_H_
|
||||
|
||||
|
@@ -18,6 +18,8 @@
|
||||
#include "libcef_dll/ctocpp/string_visitor_ctocpp.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
int CEF_CALLBACK frame_is_valid(struct _cef_frame_t* self) {
|
||||
@@ -363,35 +365,42 @@ void CEF_CALLBACK frame_visit_dom(struct _cef_frame_t* self,
|
||||
CefDOMVisitorCToCpp::Wrap(visitor));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefFrameCppToC::CefFrameCppToC(CefFrame* cls)
|
||||
: CefCppToC<CefFrameCppToC, CefFrame, cef_frame_t>(cls) {
|
||||
struct_.struct_.is_valid = frame_is_valid;
|
||||
struct_.struct_.undo = frame_undo;
|
||||
struct_.struct_.redo = frame_redo;
|
||||
struct_.struct_.cut = frame_cut;
|
||||
struct_.struct_.copy = frame_copy;
|
||||
struct_.struct_.paste = frame_paste;
|
||||
struct_.struct_.del = frame_del;
|
||||
struct_.struct_.select_all = frame_select_all;
|
||||
struct_.struct_.view_source = frame_view_source;
|
||||
struct_.struct_.get_source = frame_get_source;
|
||||
struct_.struct_.get_text = frame_get_text;
|
||||
struct_.struct_.load_request = frame_load_request;
|
||||
struct_.struct_.load_url = frame_load_url;
|
||||
struct_.struct_.load_string = frame_load_string;
|
||||
struct_.struct_.execute_java_script = frame_execute_java_script;
|
||||
struct_.struct_.is_main = frame_is_main;
|
||||
struct_.struct_.is_focused = frame_is_focused;
|
||||
struct_.struct_.get_name = frame_get_name;
|
||||
struct_.struct_.get_identifier = frame_get_identifier;
|
||||
struct_.struct_.get_parent = frame_get_parent;
|
||||
struct_.struct_.get_url = frame_get_url;
|
||||
struct_.struct_.get_browser = frame_get_browser;
|
||||
struct_.struct_.get_v8context = frame_get_v8context;
|
||||
struct_.struct_.visit_dom = frame_visit_dom;
|
||||
CefFrameCppToC::CefFrameCppToC() {
|
||||
GetStruct()->is_valid = frame_is_valid;
|
||||
GetStruct()->undo = frame_undo;
|
||||
GetStruct()->redo = frame_redo;
|
||||
GetStruct()->cut = frame_cut;
|
||||
GetStruct()->copy = frame_copy;
|
||||
GetStruct()->paste = frame_paste;
|
||||
GetStruct()->del = frame_del;
|
||||
GetStruct()->select_all = frame_select_all;
|
||||
GetStruct()->view_source = frame_view_source;
|
||||
GetStruct()->get_source = frame_get_source;
|
||||
GetStruct()->get_text = frame_get_text;
|
||||
GetStruct()->load_request = frame_load_request;
|
||||
GetStruct()->load_url = frame_load_url;
|
||||
GetStruct()->load_string = frame_load_string;
|
||||
GetStruct()->execute_java_script = frame_execute_java_script;
|
||||
GetStruct()->is_main = frame_is_main;
|
||||
GetStruct()->is_focused = frame_is_focused;
|
||||
GetStruct()->get_name = frame_get_name;
|
||||
GetStruct()->get_identifier = frame_get_identifier;
|
||||
GetStruct()->get_parent = frame_get_parent;
|
||||
GetStruct()->get_url = frame_get_url;
|
||||
GetStruct()->get_browser = frame_get_browser;
|
||||
GetStruct()->get_v8context = frame_get_v8context;
|
||||
GetStruct()->visit_dom = frame_visit_dom;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefFrame> CefCppToC<CefFrameCppToC, CefFrame,
|
||||
cef_frame_t>::UnwrapDerived(CefWrapperType type, cef_frame_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -399,3 +408,5 @@ template<> base::AtomicRefCount CefCppToC<CefFrameCppToC, CefFrame,
|
||||
cef_frame_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefFrameCppToC, CefFrame,
|
||||
cef_frame_t>::kWrapperType = WT_FRAME;
|
||||
|
@@ -31,9 +31,8 @@
|
||||
class CefFrameCppToC
|
||||
: public CefCppToC<CefFrameCppToC, CefFrame, cef_frame_t> {
|
||||
public:
|
||||
explicit CefFrameCppToC(CefFrame* cls);
|
||||
CefFrameCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_FRAME_CPPTOC_H_
|
||||
|
||||
|
@@ -13,6 +13,8 @@
|
||||
#include "libcef_dll/cpptoc/geolocation_callback_cpptoc.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK geolocation_callback_cont(
|
||||
@@ -28,14 +30,20 @@ void CEF_CALLBACK geolocation_callback_cont(
|
||||
allow?true:false);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefGeolocationCallbackCppToC::CefGeolocationCallbackCppToC(
|
||||
CefGeolocationCallback* cls)
|
||||
: CefCppToC<CefGeolocationCallbackCppToC, CefGeolocationCallback,
|
||||
cef_geolocation_callback_t>(cls) {
|
||||
struct_.struct_.cont = geolocation_callback_cont;
|
||||
CefGeolocationCallbackCppToC::CefGeolocationCallbackCppToC() {
|
||||
GetStruct()->cont = geolocation_callback_cont;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefGeolocationCallback> CefCppToC<CefGeolocationCallbackCppToC,
|
||||
CefGeolocationCallback, cef_geolocation_callback_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_geolocation_callback_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -43,3 +51,6 @@ template<> base::AtomicRefCount CefCppToC<CefGeolocationCallbackCppToC,
|
||||
CefGeolocationCallback, cef_geolocation_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefGeolocationCallbackCppToC,
|
||||
CefGeolocationCallback, cef_geolocation_callback_t>::kWrapperType =
|
||||
WT_GEOLOCATION_CALLBACK;
|
||||
|
@@ -28,9 +28,8 @@ class CefGeolocationCallbackCppToC
|
||||
: public CefCppToC<CefGeolocationCallbackCppToC, CefGeolocationCallback,
|
||||
cef_geolocation_callback_t> {
|
||||
public:
|
||||
explicit CefGeolocationCallbackCppToC(CefGeolocationCallback* cls);
|
||||
CefGeolocationCallbackCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_GEOLOCATION_CALLBACK_CPPTOC_H_
|
||||
|
||||
|
@@ -15,6 +15,8 @@
|
||||
#include "libcef_dll/ctocpp/geolocation_callback_ctocpp.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
int CEF_CALLBACK geolocation_handler_on_request_geolocation_permission(
|
||||
@@ -75,21 +77,30 @@ void CEF_CALLBACK geolocation_handler_on_cancel_geolocation_permission(
|
||||
request_id);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefGeolocationHandlerCppToC::CefGeolocationHandlerCppToC(
|
||||
CefGeolocationHandler* cls)
|
||||
: CefCppToC<CefGeolocationHandlerCppToC, CefGeolocationHandler,
|
||||
cef_geolocation_handler_t>(cls) {
|
||||
struct_.struct_.on_request_geolocation_permission =
|
||||
CefGeolocationHandlerCppToC::CefGeolocationHandlerCppToC() {
|
||||
GetStruct()->on_request_geolocation_permission =
|
||||
geolocation_handler_on_request_geolocation_permission;
|
||||
struct_.struct_.on_cancel_geolocation_permission =
|
||||
GetStruct()->on_cancel_geolocation_permission =
|
||||
geolocation_handler_on_cancel_geolocation_permission;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefGeolocationHandler> CefCppToC<CefGeolocationHandlerCppToC,
|
||||
CefGeolocationHandler, cef_geolocation_handler_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_geolocation_handler_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> base::AtomicRefCount CefCppToC<CefGeolocationHandlerCppToC,
|
||||
CefGeolocationHandler, cef_geolocation_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefGeolocationHandlerCppToC,
|
||||
CefGeolocationHandler, cef_geolocation_handler_t>::kWrapperType =
|
||||
WT_GEOLOCATION_HANDLER;
|
||||
|
@@ -28,9 +28,8 @@ class CefGeolocationHandlerCppToC
|
||||
: public CefCppToC<CefGeolocationHandlerCppToC, CefGeolocationHandler,
|
||||
cef_geolocation_handler_t> {
|
||||
public:
|
||||
explicit CefGeolocationHandlerCppToC(CefGeolocationHandler* cls);
|
||||
CefGeolocationHandlerCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_GEOLOCATION_HANDLER_CPPTOC_H_
|
||||
|
||||
|
@@ -13,6 +13,8 @@
|
||||
#include "libcef_dll/cpptoc/get_geolocation_callback_cpptoc.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK get_geolocation_callback_on_location_update(
|
||||
@@ -38,15 +40,20 @@ void CEF_CALLBACK get_geolocation_callback_on_location_update(
|
||||
positionObj);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefGetGeolocationCallbackCppToC::CefGetGeolocationCallbackCppToC(
|
||||
CefGetGeolocationCallback* cls)
|
||||
: CefCppToC<CefGetGeolocationCallbackCppToC, CefGetGeolocationCallback,
|
||||
cef_get_geolocation_callback_t>(cls) {
|
||||
struct_.struct_.on_location_update =
|
||||
get_geolocation_callback_on_location_update;
|
||||
CefGetGeolocationCallbackCppToC::CefGetGeolocationCallbackCppToC() {
|
||||
GetStruct()->on_location_update = get_geolocation_callback_on_location_update;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefGetGeolocationCallback> CefCppToC<CefGetGeolocationCallbackCppToC,
|
||||
CefGetGeolocationCallback, cef_get_geolocation_callback_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_get_geolocation_callback_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -55,3 +62,6 @@ template<> base::AtomicRefCount CefCppToC<CefGetGeolocationCallbackCppToC,
|
||||
0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefGetGeolocationCallbackCppToC,
|
||||
CefGetGeolocationCallback, cef_get_geolocation_callback_t>::kWrapperType =
|
||||
WT_GET_GEOLOCATION_CALLBACK;
|
||||
|
@@ -28,9 +28,8 @@ class CefGetGeolocationCallbackCppToC
|
||||
: public CefCppToC<CefGetGeolocationCallbackCppToC,
|
||||
CefGetGeolocationCallback, cef_get_geolocation_callback_t> {
|
||||
public:
|
||||
explicit CefGetGeolocationCallbackCppToC(CefGetGeolocationCallback* cls);
|
||||
CefGetGeolocationCallbackCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_GET_GEOLOCATION_CALLBACK_CPPTOC_H_
|
||||
|
||||
|
@@ -13,6 +13,8 @@
|
||||
#include "libcef_dll/cpptoc/jsdialog_callback_cpptoc.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK jsdialog_callback_cont(struct _cef_jsdialog_callback_t* self,
|
||||
@@ -30,13 +32,20 @@ void CEF_CALLBACK jsdialog_callback_cont(struct _cef_jsdialog_callback_t* self,
|
||||
CefString(user_input));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefJSDialogCallbackCppToC::CefJSDialogCallbackCppToC(CefJSDialogCallback* cls)
|
||||
: CefCppToC<CefJSDialogCallbackCppToC, CefJSDialogCallback,
|
||||
cef_jsdialog_callback_t>(cls) {
|
||||
struct_.struct_.cont = jsdialog_callback_cont;
|
||||
CefJSDialogCallbackCppToC::CefJSDialogCallbackCppToC() {
|
||||
GetStruct()->cont = jsdialog_callback_cont;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefJSDialogCallback> CefCppToC<CefJSDialogCallbackCppToC,
|
||||
CefJSDialogCallback, cef_jsdialog_callback_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_jsdialog_callback_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -44,3 +53,6 @@ template<> base::AtomicRefCount CefCppToC<CefJSDialogCallbackCppToC,
|
||||
CefJSDialogCallback, cef_jsdialog_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefJSDialogCallbackCppToC,
|
||||
CefJSDialogCallback, cef_jsdialog_callback_t>::kWrapperType =
|
||||
WT_JSDIALOG_CALLBACK;
|
||||
|
@@ -28,9 +28,8 @@ class CefJSDialogCallbackCppToC
|
||||
: public CefCppToC<CefJSDialogCallbackCppToC, CefJSDialogCallback,
|
||||
cef_jsdialog_callback_t> {
|
||||
public:
|
||||
explicit CefJSDialogCallbackCppToC(CefJSDialogCallback* cls);
|
||||
CefJSDialogCallbackCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_JSDIALOG_CALLBACK_CPPTOC_H_
|
||||
|
||||
|
@@ -15,6 +15,8 @@
|
||||
#include "libcef_dll/ctocpp/jsdialog_callback_ctocpp.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
int CEF_CALLBACK jsdialog_handler_on_jsdialog(
|
||||
@@ -130,18 +132,24 @@ void CEF_CALLBACK jsdialog_handler_on_dialog_closed(
|
||||
CefBrowserCToCpp::Wrap(browser));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefJSDialogHandlerCppToC::CefJSDialogHandlerCppToC(CefJSDialogHandler* cls)
|
||||
: CefCppToC<CefJSDialogHandlerCppToC, CefJSDialogHandler,
|
||||
cef_jsdialog_handler_t>(cls) {
|
||||
struct_.struct_.on_jsdialog = jsdialog_handler_on_jsdialog;
|
||||
struct_.struct_.on_before_unload_dialog =
|
||||
CefJSDialogHandlerCppToC::CefJSDialogHandlerCppToC() {
|
||||
GetStruct()->on_jsdialog = jsdialog_handler_on_jsdialog;
|
||||
GetStruct()->on_before_unload_dialog =
|
||||
jsdialog_handler_on_before_unload_dialog;
|
||||
struct_.struct_.on_reset_dialog_state =
|
||||
jsdialog_handler_on_reset_dialog_state;
|
||||
struct_.struct_.on_dialog_closed = jsdialog_handler_on_dialog_closed;
|
||||
GetStruct()->on_reset_dialog_state = jsdialog_handler_on_reset_dialog_state;
|
||||
GetStruct()->on_dialog_closed = jsdialog_handler_on_dialog_closed;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefJSDialogHandler> CefCppToC<CefJSDialogHandlerCppToC,
|
||||
CefJSDialogHandler, cef_jsdialog_handler_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_jsdialog_handler_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -149,3 +157,6 @@ template<> base::AtomicRefCount CefCppToC<CefJSDialogHandlerCppToC,
|
||||
CefJSDialogHandler, cef_jsdialog_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefJSDialogHandlerCppToC,
|
||||
CefJSDialogHandler, cef_jsdialog_handler_t>::kWrapperType =
|
||||
WT_JSDIALOG_HANDLER;
|
||||
|
@@ -28,9 +28,8 @@ class CefJSDialogHandlerCppToC
|
||||
: public CefCppToC<CefJSDialogHandlerCppToC, CefJSDialogHandler,
|
||||
cef_jsdialog_handler_t> {
|
||||
public:
|
||||
explicit CefJSDialogHandlerCppToC(CefJSDialogHandler* cls);
|
||||
CefJSDialogHandlerCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_JSDIALOG_HANDLER_CPPTOC_H_
|
||||
|
||||
|
@@ -14,6 +14,8 @@
|
||||
#include "libcef_dll/ctocpp/browser_ctocpp.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
int CEF_CALLBACK keyboard_handler_on_pre_key_event(
|
||||
@@ -93,14 +95,21 @@ int CEF_CALLBACK keyboard_handler_on_key_event(
|
||||
return _retval;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefKeyboardHandlerCppToC::CefKeyboardHandlerCppToC(CefKeyboardHandler* cls)
|
||||
: CefCppToC<CefKeyboardHandlerCppToC, CefKeyboardHandler,
|
||||
cef_keyboard_handler_t>(cls) {
|
||||
struct_.struct_.on_pre_key_event = keyboard_handler_on_pre_key_event;
|
||||
struct_.struct_.on_key_event = keyboard_handler_on_key_event;
|
||||
CefKeyboardHandlerCppToC::CefKeyboardHandlerCppToC() {
|
||||
GetStruct()->on_pre_key_event = keyboard_handler_on_pre_key_event;
|
||||
GetStruct()->on_key_event = keyboard_handler_on_key_event;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefKeyboardHandler> CefCppToC<CefKeyboardHandlerCppToC,
|
||||
CefKeyboardHandler, cef_keyboard_handler_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_keyboard_handler_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -108,3 +117,6 @@ template<> base::AtomicRefCount CefCppToC<CefKeyboardHandlerCppToC,
|
||||
CefKeyboardHandler, cef_keyboard_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefKeyboardHandlerCppToC,
|
||||
CefKeyboardHandler, cef_keyboard_handler_t>::kWrapperType =
|
||||
WT_KEYBOARD_HANDLER;
|
||||
|
@@ -28,9 +28,8 @@ class CefKeyboardHandlerCppToC
|
||||
: public CefCppToC<CefKeyboardHandlerCppToC, CefKeyboardHandler,
|
||||
cef_keyboard_handler_t> {
|
||||
public:
|
||||
explicit CefKeyboardHandlerCppToC(CefKeyboardHandler* cls);
|
||||
CefKeyboardHandlerCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_KEYBOARD_HANDLER_CPPTOC_H_
|
||||
|
||||
|
@@ -16,6 +16,8 @@
|
||||
#include "libcef_dll/ctocpp/frame_ctocpp.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
int CEF_CALLBACK life_span_handler_on_before_popup(
|
||||
@@ -194,17 +196,24 @@ void CEF_CALLBACK life_span_handler_on_before_close(
|
||||
CefBrowserCToCpp::Wrap(browser));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefLifeSpanHandlerCppToC::CefLifeSpanHandlerCppToC(CefLifeSpanHandler* cls)
|
||||
: CefCppToC<CefLifeSpanHandlerCppToC, CefLifeSpanHandler,
|
||||
cef_life_span_handler_t>(cls) {
|
||||
struct_.struct_.on_before_popup = life_span_handler_on_before_popup;
|
||||
struct_.struct_.on_after_created = life_span_handler_on_after_created;
|
||||
struct_.struct_.run_modal = life_span_handler_run_modal;
|
||||
struct_.struct_.do_close = life_span_handler_do_close;
|
||||
struct_.struct_.on_before_close = life_span_handler_on_before_close;
|
||||
CefLifeSpanHandlerCppToC::CefLifeSpanHandlerCppToC() {
|
||||
GetStruct()->on_before_popup = life_span_handler_on_before_popup;
|
||||
GetStruct()->on_after_created = life_span_handler_on_after_created;
|
||||
GetStruct()->run_modal = life_span_handler_run_modal;
|
||||
GetStruct()->do_close = life_span_handler_do_close;
|
||||
GetStruct()->on_before_close = life_span_handler_on_before_close;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefLifeSpanHandler> CefCppToC<CefLifeSpanHandlerCppToC,
|
||||
CefLifeSpanHandler, cef_life_span_handler_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_life_span_handler_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -212,3 +221,6 @@ template<> base::AtomicRefCount CefCppToC<CefLifeSpanHandlerCppToC,
|
||||
CefLifeSpanHandler, cef_life_span_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefLifeSpanHandlerCppToC,
|
||||
CefLifeSpanHandler, cef_life_span_handler_t>::kWrapperType =
|
||||
WT_LIFE_SPAN_HANDLER;
|
||||
|
@@ -30,9 +30,8 @@ class CefLifeSpanHandlerCppToC
|
||||
: public CefCppToC<CefLifeSpanHandlerCppToC, CefLifeSpanHandler,
|
||||
cef_life_span_handler_t> {
|
||||
public:
|
||||
explicit CefLifeSpanHandlerCppToC(CefLifeSpanHandler* cls);
|
||||
CefLifeSpanHandlerCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_LIFE_SPAN_HANDLER_CPPTOC_H_
|
||||
|
||||
|
@@ -29,6 +29,8 @@ CEF_EXPORT cef_list_value_t* cef_list_value_create() {
|
||||
}
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
int CEF_CALLBACK list_value_is_valid(struct _cef_list_value_t* self) {
|
||||
@@ -576,39 +578,47 @@ int CEF_CALLBACK list_value_set_list(struct _cef_list_value_t* self, int index,
|
||||
return _retval;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefListValueCppToC::CefListValueCppToC(CefListValue* cls)
|
||||
: CefCppToC<CefListValueCppToC, CefListValue, cef_list_value_t>(cls) {
|
||||
struct_.struct_.is_valid = list_value_is_valid;
|
||||
struct_.struct_.is_owned = list_value_is_owned;
|
||||
struct_.struct_.is_read_only = list_value_is_read_only;
|
||||
struct_.struct_.is_same = list_value_is_same;
|
||||
struct_.struct_.is_equal = list_value_is_equal;
|
||||
struct_.struct_.copy = list_value_copy;
|
||||
struct_.struct_.set_size = list_value_set_size;
|
||||
struct_.struct_.get_size = list_value_get_size;
|
||||
struct_.struct_.clear = list_value_clear;
|
||||
struct_.struct_.remove = list_value_remove;
|
||||
struct_.struct_.get_type = list_value_get_type;
|
||||
struct_.struct_.get_value = list_value_get_value;
|
||||
struct_.struct_.get_bool = list_value_get_bool;
|
||||
struct_.struct_.get_int = list_value_get_int;
|
||||
struct_.struct_.get_double = list_value_get_double;
|
||||
struct_.struct_.get_string = list_value_get_string;
|
||||
struct_.struct_.get_binary = list_value_get_binary;
|
||||
struct_.struct_.get_dictionary = list_value_get_dictionary;
|
||||
struct_.struct_.get_list = list_value_get_list;
|
||||
struct_.struct_.set_value = list_value_set_value;
|
||||
struct_.struct_.set_null = list_value_set_null;
|
||||
struct_.struct_.set_bool = list_value_set_bool;
|
||||
struct_.struct_.set_int = list_value_set_int;
|
||||
struct_.struct_.set_double = list_value_set_double;
|
||||
struct_.struct_.set_string = list_value_set_string;
|
||||
struct_.struct_.set_binary = list_value_set_binary;
|
||||
struct_.struct_.set_dictionary = list_value_set_dictionary;
|
||||
struct_.struct_.set_list = list_value_set_list;
|
||||
CefListValueCppToC::CefListValueCppToC() {
|
||||
GetStruct()->is_valid = list_value_is_valid;
|
||||
GetStruct()->is_owned = list_value_is_owned;
|
||||
GetStruct()->is_read_only = list_value_is_read_only;
|
||||
GetStruct()->is_same = list_value_is_same;
|
||||
GetStruct()->is_equal = list_value_is_equal;
|
||||
GetStruct()->copy = list_value_copy;
|
||||
GetStruct()->set_size = list_value_set_size;
|
||||
GetStruct()->get_size = list_value_get_size;
|
||||
GetStruct()->clear = list_value_clear;
|
||||
GetStruct()->remove = list_value_remove;
|
||||
GetStruct()->get_type = list_value_get_type;
|
||||
GetStruct()->get_value = list_value_get_value;
|
||||
GetStruct()->get_bool = list_value_get_bool;
|
||||
GetStruct()->get_int = list_value_get_int;
|
||||
GetStruct()->get_double = list_value_get_double;
|
||||
GetStruct()->get_string = list_value_get_string;
|
||||
GetStruct()->get_binary = list_value_get_binary;
|
||||
GetStruct()->get_dictionary = list_value_get_dictionary;
|
||||
GetStruct()->get_list = list_value_get_list;
|
||||
GetStruct()->set_value = list_value_set_value;
|
||||
GetStruct()->set_null = list_value_set_null;
|
||||
GetStruct()->set_bool = list_value_set_bool;
|
||||
GetStruct()->set_int = list_value_set_int;
|
||||
GetStruct()->set_double = list_value_set_double;
|
||||
GetStruct()->set_string = list_value_set_string;
|
||||
GetStruct()->set_binary = list_value_set_binary;
|
||||
GetStruct()->set_dictionary = list_value_set_dictionary;
|
||||
GetStruct()->set_list = list_value_set_list;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefListValue> CefCppToC<CefListValueCppToC, CefListValue,
|
||||
cef_list_value_t>::UnwrapDerived(CefWrapperType type,
|
||||
cef_list_value_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -616,3 +626,5 @@ template<> base::AtomicRefCount CefCppToC<CefListValueCppToC, CefListValue,
|
||||
cef_list_value_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefListValueCppToC, CefListValue,
|
||||
cef_list_value_t>::kWrapperType = WT_LIST_VALUE;
|
||||
|
@@ -27,9 +27,8 @@
|
||||
class CefListValueCppToC
|
||||
: public CefCppToC<CefListValueCppToC, CefListValue, cef_list_value_t> {
|
||||
public:
|
||||
explicit CefListValueCppToC(CefListValue* cls);
|
||||
CefListValueCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_LIST_VALUE_CPPTOC_H_
|
||||
|
||||
|
@@ -15,6 +15,8 @@
|
||||
#include "libcef_dll/ctocpp/frame_ctocpp.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK load_handler_on_loading_state_change(
|
||||
@@ -114,16 +116,23 @@ void CEF_CALLBACK load_handler_on_load_error(struct _cef_load_handler_t* self,
|
||||
CefString(failedUrl));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefLoadHandlerCppToC::CefLoadHandlerCppToC(CefLoadHandler* cls)
|
||||
: CefCppToC<CefLoadHandlerCppToC, CefLoadHandler, cef_load_handler_t>(cls) {
|
||||
struct_.struct_.on_loading_state_change =
|
||||
load_handler_on_loading_state_change;
|
||||
struct_.struct_.on_load_start = load_handler_on_load_start;
|
||||
struct_.struct_.on_load_end = load_handler_on_load_end;
|
||||
struct_.struct_.on_load_error = load_handler_on_load_error;
|
||||
CefLoadHandlerCppToC::CefLoadHandlerCppToC() {
|
||||
GetStruct()->on_loading_state_change = load_handler_on_loading_state_change;
|
||||
GetStruct()->on_load_start = load_handler_on_load_start;
|
||||
GetStruct()->on_load_end = load_handler_on_load_end;
|
||||
GetStruct()->on_load_error = load_handler_on_load_error;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefLoadHandler> CefCppToC<CefLoadHandlerCppToC,
|
||||
CefLoadHandler, cef_load_handler_t>::UnwrapDerived(CefWrapperType type,
|
||||
cef_load_handler_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -131,3 +140,5 @@ template<> base::AtomicRefCount CefCppToC<CefLoadHandlerCppToC, CefLoadHandler,
|
||||
cef_load_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefLoadHandlerCppToC, CefLoadHandler,
|
||||
cef_load_handler_t>::kWrapperType = WT_LOAD_HANDLER;
|
||||
|
@@ -28,9 +28,8 @@ class CefLoadHandlerCppToC
|
||||
: public CefCppToC<CefLoadHandlerCppToC, CefLoadHandler,
|
||||
cef_load_handler_t> {
|
||||
public:
|
||||
explicit CefLoadHandlerCppToC(CefLoadHandler* cls);
|
||||
CefLoadHandlerCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_LOAD_HANDLER_CPPTOC_H_
|
||||
|
||||
|
@@ -13,6 +13,8 @@
|
||||
#include "libcef_dll/cpptoc/menu_model_cpptoc.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
int CEF_CALLBACK menu_model_clear(struct _cef_menu_model_t* self) {
|
||||
@@ -957,60 +959,68 @@ int CEF_CALLBACK menu_model_get_accelerator_at(struct _cef_menu_model_t* self,
|
||||
return _retval;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefMenuModelCppToC::CefMenuModelCppToC(CefMenuModel* cls)
|
||||
: CefCppToC<CefMenuModelCppToC, CefMenuModel, cef_menu_model_t>(cls) {
|
||||
struct_.struct_.clear = menu_model_clear;
|
||||
struct_.struct_.get_count = menu_model_get_count;
|
||||
struct_.struct_.add_separator = menu_model_add_separator;
|
||||
struct_.struct_.add_item = menu_model_add_item;
|
||||
struct_.struct_.add_check_item = menu_model_add_check_item;
|
||||
struct_.struct_.add_radio_item = menu_model_add_radio_item;
|
||||
struct_.struct_.add_sub_menu = menu_model_add_sub_menu;
|
||||
struct_.struct_.insert_separator_at = menu_model_insert_separator_at;
|
||||
struct_.struct_.insert_item_at = menu_model_insert_item_at;
|
||||
struct_.struct_.insert_check_item_at = menu_model_insert_check_item_at;
|
||||
struct_.struct_.insert_radio_item_at = menu_model_insert_radio_item_at;
|
||||
struct_.struct_.insert_sub_menu_at = menu_model_insert_sub_menu_at;
|
||||
struct_.struct_.remove = menu_model_remove;
|
||||
struct_.struct_.remove_at = menu_model_remove_at;
|
||||
struct_.struct_.get_index_of = menu_model_get_index_of;
|
||||
struct_.struct_.get_command_id_at = menu_model_get_command_id_at;
|
||||
struct_.struct_.set_command_id_at = menu_model_set_command_id_at;
|
||||
struct_.struct_.get_label = menu_model_get_label;
|
||||
struct_.struct_.get_label_at = menu_model_get_label_at;
|
||||
struct_.struct_.set_label = menu_model_set_label;
|
||||
struct_.struct_.set_label_at = menu_model_set_label_at;
|
||||
struct_.struct_.get_type = menu_model_get_type;
|
||||
struct_.struct_.get_type_at = menu_model_get_type_at;
|
||||
struct_.struct_.get_group_id = menu_model_get_group_id;
|
||||
struct_.struct_.get_group_id_at = menu_model_get_group_id_at;
|
||||
struct_.struct_.set_group_id = menu_model_set_group_id;
|
||||
struct_.struct_.set_group_id_at = menu_model_set_group_id_at;
|
||||
struct_.struct_.get_sub_menu = menu_model_get_sub_menu;
|
||||
struct_.struct_.get_sub_menu_at = menu_model_get_sub_menu_at;
|
||||
struct_.struct_.is_visible = menu_model_is_visible;
|
||||
struct_.struct_.is_visible_at = menu_model_is_visible_at;
|
||||
struct_.struct_.set_visible = menu_model_set_visible;
|
||||
struct_.struct_.set_visible_at = menu_model_set_visible_at;
|
||||
struct_.struct_.is_enabled = menu_model_is_enabled;
|
||||
struct_.struct_.is_enabled_at = menu_model_is_enabled_at;
|
||||
struct_.struct_.set_enabled = menu_model_set_enabled;
|
||||
struct_.struct_.set_enabled_at = menu_model_set_enabled_at;
|
||||
struct_.struct_.is_checked = menu_model_is_checked;
|
||||
struct_.struct_.is_checked_at = menu_model_is_checked_at;
|
||||
struct_.struct_.set_checked = menu_model_set_checked;
|
||||
struct_.struct_.set_checked_at = menu_model_set_checked_at;
|
||||
struct_.struct_.has_accelerator = menu_model_has_accelerator;
|
||||
struct_.struct_.has_accelerator_at = menu_model_has_accelerator_at;
|
||||
struct_.struct_.set_accelerator = menu_model_set_accelerator;
|
||||
struct_.struct_.set_accelerator_at = menu_model_set_accelerator_at;
|
||||
struct_.struct_.remove_accelerator = menu_model_remove_accelerator;
|
||||
struct_.struct_.remove_accelerator_at = menu_model_remove_accelerator_at;
|
||||
struct_.struct_.get_accelerator = menu_model_get_accelerator;
|
||||
struct_.struct_.get_accelerator_at = menu_model_get_accelerator_at;
|
||||
CefMenuModelCppToC::CefMenuModelCppToC() {
|
||||
GetStruct()->clear = menu_model_clear;
|
||||
GetStruct()->get_count = menu_model_get_count;
|
||||
GetStruct()->add_separator = menu_model_add_separator;
|
||||
GetStruct()->add_item = menu_model_add_item;
|
||||
GetStruct()->add_check_item = menu_model_add_check_item;
|
||||
GetStruct()->add_radio_item = menu_model_add_radio_item;
|
||||
GetStruct()->add_sub_menu = menu_model_add_sub_menu;
|
||||
GetStruct()->insert_separator_at = menu_model_insert_separator_at;
|
||||
GetStruct()->insert_item_at = menu_model_insert_item_at;
|
||||
GetStruct()->insert_check_item_at = menu_model_insert_check_item_at;
|
||||
GetStruct()->insert_radio_item_at = menu_model_insert_radio_item_at;
|
||||
GetStruct()->insert_sub_menu_at = menu_model_insert_sub_menu_at;
|
||||
GetStruct()->remove = menu_model_remove;
|
||||
GetStruct()->remove_at = menu_model_remove_at;
|
||||
GetStruct()->get_index_of = menu_model_get_index_of;
|
||||
GetStruct()->get_command_id_at = menu_model_get_command_id_at;
|
||||
GetStruct()->set_command_id_at = menu_model_set_command_id_at;
|
||||
GetStruct()->get_label = menu_model_get_label;
|
||||
GetStruct()->get_label_at = menu_model_get_label_at;
|
||||
GetStruct()->set_label = menu_model_set_label;
|
||||
GetStruct()->set_label_at = menu_model_set_label_at;
|
||||
GetStruct()->get_type = menu_model_get_type;
|
||||
GetStruct()->get_type_at = menu_model_get_type_at;
|
||||
GetStruct()->get_group_id = menu_model_get_group_id;
|
||||
GetStruct()->get_group_id_at = menu_model_get_group_id_at;
|
||||
GetStruct()->set_group_id = menu_model_set_group_id;
|
||||
GetStruct()->set_group_id_at = menu_model_set_group_id_at;
|
||||
GetStruct()->get_sub_menu = menu_model_get_sub_menu;
|
||||
GetStruct()->get_sub_menu_at = menu_model_get_sub_menu_at;
|
||||
GetStruct()->is_visible = menu_model_is_visible;
|
||||
GetStruct()->is_visible_at = menu_model_is_visible_at;
|
||||
GetStruct()->set_visible = menu_model_set_visible;
|
||||
GetStruct()->set_visible_at = menu_model_set_visible_at;
|
||||
GetStruct()->is_enabled = menu_model_is_enabled;
|
||||
GetStruct()->is_enabled_at = menu_model_is_enabled_at;
|
||||
GetStruct()->set_enabled = menu_model_set_enabled;
|
||||
GetStruct()->set_enabled_at = menu_model_set_enabled_at;
|
||||
GetStruct()->is_checked = menu_model_is_checked;
|
||||
GetStruct()->is_checked_at = menu_model_is_checked_at;
|
||||
GetStruct()->set_checked = menu_model_set_checked;
|
||||
GetStruct()->set_checked_at = menu_model_set_checked_at;
|
||||
GetStruct()->has_accelerator = menu_model_has_accelerator;
|
||||
GetStruct()->has_accelerator_at = menu_model_has_accelerator_at;
|
||||
GetStruct()->set_accelerator = menu_model_set_accelerator;
|
||||
GetStruct()->set_accelerator_at = menu_model_set_accelerator_at;
|
||||
GetStruct()->remove_accelerator = menu_model_remove_accelerator;
|
||||
GetStruct()->remove_accelerator_at = menu_model_remove_accelerator_at;
|
||||
GetStruct()->get_accelerator = menu_model_get_accelerator;
|
||||
GetStruct()->get_accelerator_at = menu_model_get_accelerator_at;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefMenuModel> CefCppToC<CefMenuModelCppToC, CefMenuModel,
|
||||
cef_menu_model_t>::UnwrapDerived(CefWrapperType type,
|
||||
cef_menu_model_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -1018,3 +1028,5 @@ template<> base::AtomicRefCount CefCppToC<CefMenuModelCppToC, CefMenuModel,
|
||||
cef_menu_model_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefMenuModelCppToC, CefMenuModel,
|
||||
cef_menu_model_t>::kWrapperType = WT_MENU_MODEL;
|
||||
|
@@ -27,9 +27,8 @@
|
||||
class CefMenuModelCppToC
|
||||
: public CefCppToC<CefMenuModelCppToC, CefMenuModel, cef_menu_model_t> {
|
||||
public:
|
||||
explicit CefMenuModelCppToC(CefMenuModel* cls);
|
||||
CefMenuModelCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_MENU_MODEL_CPPTOC_H_
|
||||
|
||||
|
@@ -13,6 +13,8 @@
|
||||
#include "libcef_dll/cpptoc/navigation_entry_cpptoc.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
int CEF_CALLBACK navigation_entry_is_valid(
|
||||
@@ -166,22 +168,29 @@ int CEF_CALLBACK navigation_entry_get_http_status_code(
|
||||
return _retval;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefNavigationEntryCppToC::CefNavigationEntryCppToC(CefNavigationEntry* cls)
|
||||
: CefCppToC<CefNavigationEntryCppToC, CefNavigationEntry,
|
||||
cef_navigation_entry_t>(cls) {
|
||||
struct_.struct_.is_valid = navigation_entry_is_valid;
|
||||
struct_.struct_.get_url = navigation_entry_get_url;
|
||||
struct_.struct_.get_display_url = navigation_entry_get_display_url;
|
||||
struct_.struct_.get_original_url = navigation_entry_get_original_url;
|
||||
struct_.struct_.get_title = navigation_entry_get_title;
|
||||
struct_.struct_.get_transition_type = navigation_entry_get_transition_type;
|
||||
struct_.struct_.has_post_data = navigation_entry_has_post_data;
|
||||
struct_.struct_.get_frame_name = navigation_entry_get_frame_name;
|
||||
struct_.struct_.get_completion_time = navigation_entry_get_completion_time;
|
||||
struct_.struct_.get_http_status_code = navigation_entry_get_http_status_code;
|
||||
CefNavigationEntryCppToC::CefNavigationEntryCppToC() {
|
||||
GetStruct()->is_valid = navigation_entry_is_valid;
|
||||
GetStruct()->get_url = navigation_entry_get_url;
|
||||
GetStruct()->get_display_url = navigation_entry_get_display_url;
|
||||
GetStruct()->get_original_url = navigation_entry_get_original_url;
|
||||
GetStruct()->get_title = navigation_entry_get_title;
|
||||
GetStruct()->get_transition_type = navigation_entry_get_transition_type;
|
||||
GetStruct()->has_post_data = navigation_entry_has_post_data;
|
||||
GetStruct()->get_frame_name = navigation_entry_get_frame_name;
|
||||
GetStruct()->get_completion_time = navigation_entry_get_completion_time;
|
||||
GetStruct()->get_http_status_code = navigation_entry_get_http_status_code;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefNavigationEntry> CefCppToC<CefNavigationEntryCppToC,
|
||||
CefNavigationEntry, cef_navigation_entry_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_navigation_entry_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -189,3 +198,6 @@ template<> base::AtomicRefCount CefCppToC<CefNavigationEntryCppToC,
|
||||
CefNavigationEntry, cef_navigation_entry_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefNavigationEntryCppToC,
|
||||
CefNavigationEntry, cef_navigation_entry_t>::kWrapperType =
|
||||
WT_NAVIGATION_ENTRY;
|
||||
|
@@ -28,9 +28,8 @@ class CefNavigationEntryCppToC
|
||||
: public CefCppToC<CefNavigationEntryCppToC, CefNavigationEntry,
|
||||
cef_navigation_entry_t> {
|
||||
public:
|
||||
explicit CefNavigationEntryCppToC(CefNavigationEntry* cls);
|
||||
CefNavigationEntryCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_NAVIGATION_ENTRY_CPPTOC_H_
|
||||
|
||||
|
@@ -14,6 +14,8 @@
|
||||
#include "libcef_dll/ctocpp/navigation_entry_ctocpp.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
int CEF_CALLBACK navigation_entry_visitor_visit(
|
||||
@@ -41,14 +43,20 @@ int CEF_CALLBACK navigation_entry_visitor_visit(
|
||||
return _retval;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefNavigationEntryVisitorCppToC::CefNavigationEntryVisitorCppToC(
|
||||
CefNavigationEntryVisitor* cls)
|
||||
: CefCppToC<CefNavigationEntryVisitorCppToC, CefNavigationEntryVisitor,
|
||||
cef_navigation_entry_visitor_t>(cls) {
|
||||
struct_.struct_.visit = navigation_entry_visitor_visit;
|
||||
CefNavigationEntryVisitorCppToC::CefNavigationEntryVisitorCppToC() {
|
||||
GetStruct()->visit = navigation_entry_visitor_visit;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefNavigationEntryVisitor> CefCppToC<CefNavigationEntryVisitorCppToC,
|
||||
CefNavigationEntryVisitor, cef_navigation_entry_visitor_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_navigation_entry_visitor_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -57,3 +65,6 @@ template<> base::AtomicRefCount CefCppToC<CefNavigationEntryVisitorCppToC,
|
||||
0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefNavigationEntryVisitorCppToC,
|
||||
CefNavigationEntryVisitor, cef_navigation_entry_visitor_t>::kWrapperType =
|
||||
WT_NAVIGATION_ENTRY_VISITOR;
|
||||
|
@@ -30,9 +30,8 @@ class CefNavigationEntryVisitorCppToC
|
||||
: public CefCppToC<CefNavigationEntryVisitorCppToC,
|
||||
CefNavigationEntryVisitor, cef_navigation_entry_visitor_t> {
|
||||
public:
|
||||
explicit CefNavigationEntryVisitorCppToC(CefNavigationEntryVisitor* cls);
|
||||
CefNavigationEntryVisitorCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_NAVIGATION_ENTRY_VISITOR_CPPTOC_H_
|
||||
|
||||
|
@@ -28,6 +28,8 @@ CEF_EXPORT cef_post_data_t* cef_post_data_create() {
|
||||
}
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
int CEF_CALLBACK post_data_is_read_only(struct _cef_post_data_t* self) {
|
||||
@@ -144,17 +146,24 @@ void CEF_CALLBACK post_data_remove_elements(struct _cef_post_data_t* self) {
|
||||
CefPostDataCppToC::Get(self)->RemoveElements();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefPostDataCppToC::CefPostDataCppToC(CefPostData* cls)
|
||||
: CefCppToC<CefPostDataCppToC, CefPostData, cef_post_data_t>(cls) {
|
||||
struct_.struct_.is_read_only = post_data_is_read_only;
|
||||
struct_.struct_.get_element_count = post_data_get_element_count;
|
||||
struct_.struct_.get_elements = post_data_get_elements;
|
||||
struct_.struct_.remove_element = post_data_remove_element;
|
||||
struct_.struct_.add_element = post_data_add_element;
|
||||
struct_.struct_.remove_elements = post_data_remove_elements;
|
||||
CefPostDataCppToC::CefPostDataCppToC() {
|
||||
GetStruct()->is_read_only = post_data_is_read_only;
|
||||
GetStruct()->get_element_count = post_data_get_element_count;
|
||||
GetStruct()->get_elements = post_data_get_elements;
|
||||
GetStruct()->remove_element = post_data_remove_element;
|
||||
GetStruct()->add_element = post_data_add_element;
|
||||
GetStruct()->remove_elements = post_data_remove_elements;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefPostData> CefCppToC<CefPostDataCppToC, CefPostData,
|
||||
cef_post_data_t>::UnwrapDerived(CefWrapperType type, cef_post_data_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -162,3 +171,5 @@ template<> base::AtomicRefCount CefCppToC<CefPostDataCppToC, CefPostData,
|
||||
cef_post_data_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefPostDataCppToC, CefPostData,
|
||||
cef_post_data_t>::kWrapperType = WT_POST_DATA;
|
||||
|
@@ -27,9 +27,8 @@
|
||||
class CefPostDataCppToC
|
||||
: public CefCppToC<CefPostDataCppToC, CefPostData, cef_post_data_t> {
|
||||
public:
|
||||
explicit CefPostDataCppToC(CefPostData* cls);
|
||||
CefPostDataCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_POST_DATA_CPPTOC_H_
|
||||
|
||||
|
@@ -26,6 +26,8 @@ CEF_EXPORT cef_post_data_element_t* cef_post_data_element_create() {
|
||||
}
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
int CEF_CALLBACK post_data_element_is_read_only(
|
||||
@@ -157,20 +159,27 @@ size_t CEF_CALLBACK post_data_element_get_bytes(
|
||||
return _retval;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefPostDataElementCppToC::CefPostDataElementCppToC(CefPostDataElement* cls)
|
||||
: CefCppToC<CefPostDataElementCppToC, CefPostDataElement,
|
||||
cef_post_data_element_t>(cls) {
|
||||
struct_.struct_.is_read_only = post_data_element_is_read_only;
|
||||
struct_.struct_.set_to_empty = post_data_element_set_to_empty;
|
||||
struct_.struct_.set_to_file = post_data_element_set_to_file;
|
||||
struct_.struct_.set_to_bytes = post_data_element_set_to_bytes;
|
||||
struct_.struct_.get_type = post_data_element_get_type;
|
||||
struct_.struct_.get_file = post_data_element_get_file;
|
||||
struct_.struct_.get_bytes_count = post_data_element_get_bytes_count;
|
||||
struct_.struct_.get_bytes = post_data_element_get_bytes;
|
||||
CefPostDataElementCppToC::CefPostDataElementCppToC() {
|
||||
GetStruct()->is_read_only = post_data_element_is_read_only;
|
||||
GetStruct()->set_to_empty = post_data_element_set_to_empty;
|
||||
GetStruct()->set_to_file = post_data_element_set_to_file;
|
||||
GetStruct()->set_to_bytes = post_data_element_set_to_bytes;
|
||||
GetStruct()->get_type = post_data_element_get_type;
|
||||
GetStruct()->get_file = post_data_element_get_file;
|
||||
GetStruct()->get_bytes_count = post_data_element_get_bytes_count;
|
||||
GetStruct()->get_bytes = post_data_element_get_bytes;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefPostDataElement> CefCppToC<CefPostDataElementCppToC,
|
||||
CefPostDataElement, cef_post_data_element_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_post_data_element_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -178,3 +187,6 @@ template<> base::AtomicRefCount CefCppToC<CefPostDataElementCppToC,
|
||||
CefPostDataElement, cef_post_data_element_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefPostDataElementCppToC,
|
||||
CefPostDataElement, cef_post_data_element_t>::kWrapperType =
|
||||
WT_POST_DATA_ELEMENT;
|
||||
|
@@ -28,9 +28,8 @@ class CefPostDataElementCppToC
|
||||
: public CefCppToC<CefPostDataElementCppToC, CefPostDataElement,
|
||||
cef_post_data_element_t> {
|
||||
public:
|
||||
explicit CefPostDataElementCppToC(CefPostDataElement* cls);
|
||||
CefPostDataElementCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_POST_DATA_ELEMENT_CPPTOC_H_
|
||||
|
||||
|
@@ -14,6 +14,8 @@
|
||||
#include "libcef_dll/cpptoc/print_settings_cpptoc.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK print_dialog_callback_cont(
|
||||
@@ -46,15 +48,21 @@ void CEF_CALLBACK print_dialog_callback_cancel(
|
||||
CefPrintDialogCallbackCppToC::Get(self)->Cancel();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefPrintDialogCallbackCppToC::CefPrintDialogCallbackCppToC(
|
||||
CefPrintDialogCallback* cls)
|
||||
: CefCppToC<CefPrintDialogCallbackCppToC, CefPrintDialogCallback,
|
||||
cef_print_dialog_callback_t>(cls) {
|
||||
struct_.struct_.cont = print_dialog_callback_cont;
|
||||
struct_.struct_.cancel = print_dialog_callback_cancel;
|
||||
CefPrintDialogCallbackCppToC::CefPrintDialogCallbackCppToC() {
|
||||
GetStruct()->cont = print_dialog_callback_cont;
|
||||
GetStruct()->cancel = print_dialog_callback_cancel;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefPrintDialogCallback> CefCppToC<CefPrintDialogCallbackCppToC,
|
||||
CefPrintDialogCallback, cef_print_dialog_callback_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_print_dialog_callback_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -62,3 +70,6 @@ template<> base::AtomicRefCount CefCppToC<CefPrintDialogCallbackCppToC,
|
||||
CefPrintDialogCallback, cef_print_dialog_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefPrintDialogCallbackCppToC,
|
||||
CefPrintDialogCallback, cef_print_dialog_callback_t>::kWrapperType =
|
||||
WT_PRINT_DIALOG_CALLBACK;
|
||||
|
@@ -28,9 +28,8 @@ class CefPrintDialogCallbackCppToC
|
||||
: public CefCppToC<CefPrintDialogCallbackCppToC, CefPrintDialogCallback,
|
||||
cef_print_dialog_callback_t> {
|
||||
public:
|
||||
explicit CefPrintDialogCallbackCppToC(CefPrintDialogCallback* cls);
|
||||
CefPrintDialogCallbackCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_PRINT_DIALOG_CALLBACK_CPPTOC_H_
|
||||
|
||||
|
@@ -16,6 +16,8 @@
|
||||
#include "libcef_dll/ctocpp/print_settings_ctocpp.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK print_handler_on_print_settings(
|
||||
@@ -102,16 +104,23 @@ void CEF_CALLBACK print_handler_on_print_reset(
|
||||
CefPrintHandlerCppToC::Get(self)->OnPrintReset();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefPrintHandlerCppToC::CefPrintHandlerCppToC(CefPrintHandler* cls)
|
||||
: CefCppToC<CefPrintHandlerCppToC, CefPrintHandler, cef_print_handler_t>(
|
||||
cls) {
|
||||
struct_.struct_.on_print_settings = print_handler_on_print_settings;
|
||||
struct_.struct_.on_print_dialog = print_handler_on_print_dialog;
|
||||
struct_.struct_.on_print_job = print_handler_on_print_job;
|
||||
struct_.struct_.on_print_reset = print_handler_on_print_reset;
|
||||
CefPrintHandlerCppToC::CefPrintHandlerCppToC() {
|
||||
GetStruct()->on_print_settings = print_handler_on_print_settings;
|
||||
GetStruct()->on_print_dialog = print_handler_on_print_dialog;
|
||||
GetStruct()->on_print_job = print_handler_on_print_job;
|
||||
GetStruct()->on_print_reset = print_handler_on_print_reset;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefPrintHandler> CefCppToC<CefPrintHandlerCppToC,
|
||||
CefPrintHandler, cef_print_handler_t>::UnwrapDerived(CefWrapperType type,
|
||||
cef_print_handler_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -119,3 +128,5 @@ template<> base::AtomicRefCount CefCppToC<CefPrintHandlerCppToC,
|
||||
CefPrintHandler, cef_print_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefPrintHandlerCppToC, CefPrintHandler,
|
||||
cef_print_handler_t>::kWrapperType = WT_PRINT_HANDLER;
|
||||
|
@@ -28,9 +28,8 @@ class CefPrintHandlerCppToC
|
||||
: public CefCppToC<CefPrintHandlerCppToC, CefPrintHandler,
|
||||
cef_print_handler_t> {
|
||||
public:
|
||||
explicit CefPrintHandlerCppToC(CefPrintHandler* cls);
|
||||
CefPrintHandlerCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_PRINT_HANDLER_CPPTOC_H_
|
||||
|
||||
|
@@ -13,6 +13,8 @@
|
||||
#include "libcef_dll/cpptoc/print_job_callback_cpptoc.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK print_job_callback_cont(
|
||||
@@ -27,13 +29,20 @@ void CEF_CALLBACK print_job_callback_cont(
|
||||
CefPrintJobCallbackCppToC::Get(self)->Continue();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefPrintJobCallbackCppToC::CefPrintJobCallbackCppToC(CefPrintJobCallback* cls)
|
||||
: CefCppToC<CefPrintJobCallbackCppToC, CefPrintJobCallback,
|
||||
cef_print_job_callback_t>(cls) {
|
||||
struct_.struct_.cont = print_job_callback_cont;
|
||||
CefPrintJobCallbackCppToC::CefPrintJobCallbackCppToC() {
|
||||
GetStruct()->cont = print_job_callback_cont;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefPrintJobCallback> CefCppToC<CefPrintJobCallbackCppToC,
|
||||
CefPrintJobCallback, cef_print_job_callback_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_print_job_callback_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -41,3 +50,6 @@ template<> base::AtomicRefCount CefCppToC<CefPrintJobCallbackCppToC,
|
||||
CefPrintJobCallback, cef_print_job_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefPrintJobCallbackCppToC,
|
||||
CefPrintJobCallback, cef_print_job_callback_t>::kWrapperType =
|
||||
WT_PRINT_JOB_CALLBACK;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user