Branch CEF3 files from /branches/cef3 to /trunk/cef3 (issue #564).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@571 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2012-04-03 01:34:16 +00:00
parent b568f160d9
commit 34adee805c
516 changed files with 83249 additions and 0 deletions

View File

@ -0,0 +1,105 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/app_cpptoc.h"
#include "libcef_dll/cpptoc/proxy_handler_cpptoc.h"
#include "libcef_dll/cpptoc/render_process_handler_cpptoc.h"
#include "libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h"
#include "libcef_dll/ctocpp/command_line_ctocpp.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
void CEF_CALLBACK app_on_before_command_line_processing(struct _cef_app_t* self,
const cef_string_t* process_type,
struct _cef_command_line_t* command_line) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: command_line; type: refptr_diff
DCHECK(command_line);
if (!command_line)
return;
// Unverified params: process_type
// Execute
CefAppCppToC::Get(self)->OnBeforeCommandLineProcessing(
CefString(process_type),
CefCommandLineCToCpp::Wrap(command_line));
}
struct _cef_render_process_handler_t* CEF_CALLBACK app_get_render_process_handler(
struct _cef_app_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefRenderProcessHandler> _retval = CefAppCppToC::Get(
self)->GetRenderProcessHandler();
// Return type: refptr_same
return CefRenderProcessHandlerCppToC::Wrap(_retval);
}
struct _cef_resource_bundle_handler_t* CEF_CALLBACK app_get_resource_bundle_handler(
struct _cef_app_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefResourceBundleHandler> _retval = CefAppCppToC::Get(
self)->GetResourceBundleHandler();
// Return type: refptr_same
return CefResourceBundleHandlerCppToC::Wrap(_retval);
}
struct _cef_proxy_handler_t* CEF_CALLBACK app_get_proxy_handler(
struct _cef_app_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefProxyHandler> _retval = CefAppCppToC::Get(self)->GetProxyHandler(
);
// Return type: refptr_same
return CefProxyHandlerCppToC::Wrap(_retval);
}
// CONSTRUCTOR - Do not edit by hand.
CefAppCppToC::CefAppCppToC(CefApp* cls)
: CefCppToC<CefAppCppToC, CefApp, cef_app_t>(cls) {
struct_.struct_.on_before_command_line_processing =
app_on_before_command_line_processing;
struct_.struct_.get_render_process_handler = app_get_render_process_handler;
struct_.struct_.get_resource_bundle_handler = app_get_resource_bundle_handler;
struct_.struct_.get_proxy_handler = app_get_proxy_handler;
}
#ifndef NDEBUG
template<> long CefCppToC<CefAppCppToC, CefApp, cef_app_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,36 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_APP_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_APP_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef_app.h"
#include "include/capi/cef_app_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefAppCppToC
: public CefCppToC<CefAppCppToC, CefApp, cef_app_t> {
public:
explicit CefAppCppToC(CefApp* cls);
virtual ~CefAppCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_APP_CPPTOC_H_

View File

@ -0,0 +1,65 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/auth_callback_cpptoc.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
void CEF_CALLBACK auth_callback_cont(struct _cef_auth_callback_t* self,
const cef_string_t* username, const cef_string_t* password) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: username; type: string_byref_const
DCHECK(username);
if (!username)
return;
// Verify param: password; type: string_byref_const
DCHECK(password);
if (!password)
return;
// Execute
CefAuthCallbackCppToC::Get(self)->Continue(
CefString(username),
CefString(password));
}
void CEF_CALLBACK auth_callback_cancel(struct _cef_auth_callback_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefAuthCallbackCppToC::Get(self)->Cancel();
}
// 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;
}
#ifndef NDEBUG
template<> long CefCppToC<CefAuthCallbackCppToC, CefAuthCallback,
cef_auth_callback_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,37 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_AUTH_CALLBACK_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_AUTH_CALLBACK_CPPTOC_H_
#pragma once
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef_request_handler.h"
#include "include/capi/cef_request_handler_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefAuthCallbackCppToC
: public CefCppToC<CefAuthCallbackCppToC, CefAuthCallback,
cef_auth_callback_t> {
public:
explicit CefAuthCallbackCppToC(CefAuthCallback* cls);
virtual ~CefAuthCallbackCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_AUTH_CALLBACK_CPPTOC_H_

View File

@ -0,0 +1,146 @@
// Copyright (c) 2009 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.
#ifndef CEF_LIBCEF_DLL_CPPTOC_BASE_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_BASE_CPPTOC_H_
#pragma once
#include "include/cef_base.h"
#include "include/capi/cef_base_capi.h"
#include "libcef_dll/cef_logging.h"
// CefCppToC implementation for CefBase.
class CefBaseCppToC : public CefBase {
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_.get_refct = struct_get_refct;
}
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.
int AddRef() {
UnderlyingAddRef();
return refct_.AddRef();
}
int Release() {
UnderlyingRelease();
int retval = refct_.Release();
if (retval == 0)
delete this;
return retval;
}
int GetRefCt() { return refct_.GetRefCt(); }
// Increment/decrement reference counts on only the underlying class.
int UnderlyingAddRef() { return class_->AddRef(); }
int UnderlyingRelease() { return class_->Release(); }
int UnderlyingGetRefCt() { return class_->GetRefCt(); }
private:
static int CEF_CALLBACK struct_add_ref(struct _cef_base_t* base) {
DCHECK(base);
if (!base)
return 0;
Struct* impl = reinterpret_cast<Struct*>(base);
return 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_get_refct(struct _cef_base_t* base) {
DCHECK(base);
if (!base)
return 0;
Struct* impl = reinterpret_cast<Struct*>(base);
return impl->class_->GetRefCt();
}
protected:
CefRefCount refct_;
Struct struct_;
CefBase* class_;
};
#endif // CEF_LIBCEF_DLL_CPPTOC_BASE_CPPTOC_H_

View File

@ -0,0 +1,134 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/binary_value_cpptoc.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT cef_binary_value_t* cef_binary_value_create(const void* data,
size_t data_size) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: data; type: simple_byaddr
DCHECK(data);
if (!data)
return NULL;
// Execute
CefRefPtr<CefBinaryValue> _retval = CefBinaryValue::Create(
data,
data_size);
// Return type: refptr_same
return CefBinaryValueCppToC::Wrap(_retval);
}
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK binary_value_is_valid(struct _cef_binary_value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefBinaryValueCppToC::Get(self)->IsValid();
// Return type: bool
return _retval;
}
int CEF_CALLBACK binary_value_is_owned(struct _cef_binary_value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefBinaryValueCppToC::Get(self)->IsOwned();
// Return type: bool
return _retval;
}
struct _cef_binary_value_t* CEF_CALLBACK binary_value_copy(
struct _cef_binary_value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefBinaryValue> _retval = CefBinaryValueCppToC::Get(self)->Copy();
// Return type: refptr_same
return CefBinaryValueCppToC::Wrap(_retval);
}
size_t CEF_CALLBACK binary_value_get_size(struct _cef_binary_value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
size_t _retval = CefBinaryValueCppToC::Get(self)->GetSize();
// Return type: simple
return _retval;
}
size_t CEF_CALLBACK binary_value_get_data(struct _cef_binary_value_t* self,
void* buffer, size_t buffer_size, size_t data_offset) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: buffer; type: simple_byaddr
DCHECK(buffer);
if (!buffer)
return 0;
// Execute
size_t _retval = CefBinaryValueCppToC::Get(self)->GetData(
buffer,
buffer_size,
data_offset);
// Return type: simple
return _retval;
}
// 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_.copy = binary_value_copy;
struct_.struct_.get_size = binary_value_get_size;
struct_.struct_.get_data = binary_value_get_data;
}
#ifndef NDEBUG
template<> long CefCppToC<CefBinaryValueCppToC, CefBinaryValue,
cef_binary_value_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,37 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_BINARY_VALUE_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_BINARY_VALUE_CPPTOC_H_
#pragma once
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef_values.h"
#include "include/capi/cef_values_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefBinaryValueCppToC
: public CefCppToC<CefBinaryValueCppToC, CefBinaryValue,
cef_binary_value_t> {
public:
explicit CefBinaryValueCppToC(CefBinaryValue* cls);
virtual ~CefBinaryValueCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_BINARY_VALUE_CPPTOC_H_

View File

@ -0,0 +1,369 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/browser_cpptoc.h"
#include "libcef_dll/cpptoc/browser_host_cpptoc.h"
#include "libcef_dll/cpptoc/frame_cpptoc.h"
#include "libcef_dll/cpptoc/process_message_cpptoc.h"
#include "libcef_dll/transfer_util.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
struct _cef_browser_host_t* CEF_CALLBACK browser_get_host(
struct _cef_browser_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefBrowserHost> _retval = CefBrowserCppToC::Get(self)->GetHost();
// Return type: refptr_same
return CefBrowserHostCppToC::Wrap(_retval);
}
int CEF_CALLBACK browser_can_go_back(struct _cef_browser_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefBrowserCppToC::Get(self)->CanGoBack();
// Return type: bool
return _retval;
}
void CEF_CALLBACK browser_go_back(struct _cef_browser_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefBrowserCppToC::Get(self)->GoBack();
}
int CEF_CALLBACK browser_can_go_forward(struct _cef_browser_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefBrowserCppToC::Get(self)->CanGoForward();
// Return type: bool
return _retval;
}
void CEF_CALLBACK browser_go_forward(struct _cef_browser_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefBrowserCppToC::Get(self)->GoForward();
}
int CEF_CALLBACK browser_is_loading(struct _cef_browser_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefBrowserCppToC::Get(self)->IsLoading();
// Return type: bool
return _retval;
}
void CEF_CALLBACK browser_reload(struct _cef_browser_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefBrowserCppToC::Get(self)->Reload();
}
void CEF_CALLBACK browser_reload_ignore_cache(struct _cef_browser_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefBrowserCppToC::Get(self)->ReloadIgnoreCache();
}
void CEF_CALLBACK browser_stop_load(struct _cef_browser_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefBrowserCppToC::Get(self)->StopLoad();
}
int CEF_CALLBACK browser_get_identifier(struct _cef_browser_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefBrowserCppToC::Get(self)->GetIdentifier();
// Return type: simple
return _retval;
}
int CEF_CALLBACK browser_is_popup(struct _cef_browser_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefBrowserCppToC::Get(self)->IsPopup();
// Return type: bool
return _retval;
}
int CEF_CALLBACK browser_has_document(struct _cef_browser_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefBrowserCppToC::Get(self)->HasDocument();
// Return type: bool
return _retval;
}
struct _cef_frame_t* CEF_CALLBACK browser_get_main_frame(
struct _cef_browser_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefFrame> _retval = CefBrowserCppToC::Get(self)->GetMainFrame();
// Return type: refptr_same
return CefFrameCppToC::Wrap(_retval);
}
struct _cef_frame_t* CEF_CALLBACK browser_get_focused_frame(
struct _cef_browser_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefFrame> _retval = CefBrowserCppToC::Get(self)->GetFocusedFrame();
// Return type: refptr_same
return CefFrameCppToC::Wrap(_retval);
}
struct _cef_frame_t* CEF_CALLBACK browser_get_frame_byident(
struct _cef_browser_t* self, int64 identifier) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefFrame> _retval = CefBrowserCppToC::Get(self)->GetFrame(
identifier);
// Return type: refptr_same
return CefFrameCppToC::Wrap(_retval);
}
struct _cef_frame_t* CEF_CALLBACK browser_get_frame(struct _cef_browser_t* self,
const cef_string_t* name) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: name; type: string_byref_const
DCHECK(name);
if (!name)
return NULL;
// Execute
CefRefPtr<CefFrame> _retval = CefBrowserCppToC::Get(self)->GetFrame(
CefString(name));
// Return type: refptr_same
return CefFrameCppToC::Wrap(_retval);
}
size_t CEF_CALLBACK browser_get_frame_count(struct _cef_browser_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
size_t _retval = CefBrowserCppToC::Get(self)->GetFrameCount();
// Return type: simple
return _retval;
}
void CEF_CALLBACK browser_get_frame_identifiers(struct _cef_browser_t* self,
size_t* identifiersCount, int64* identifiers) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: identifiers; type: simple_vec_byref
DCHECK(identifiersCount && (*identifiersCount == 0 || identifiers));
if (!identifiersCount || (*identifiersCount > 0 && !identifiers))
return;
// Translate param: identifiers; type: simple_vec_byref
std::vector<int64 > identifiersList;
if (identifiersCount && *identifiersCount > 0 && identifiers) {
for (size_t i = 0; i < *identifiersCount; ++i) {
identifiersList.push_back(identifiers[i]);
}
}
// Execute
CefBrowserCppToC::Get(self)->GetFrameIdentifiers(
identifiersList);
// Restore param: identifiers; type: simple_vec_byref
if (identifiersCount && identifiers) {
*identifiersCount = std::min(identifiersList.size(), *identifiersCount);
if (*identifiersCount > 0) {
for (size_t i = 0; i < *identifiersCount; ++i) {
identifiers[i] = identifiersList[i];
}
}
}
}
void CEF_CALLBACK browser_get_frame_names(struct _cef_browser_t* self,
cef_string_list_t names) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: names; type: string_vec_byref
DCHECK(names);
if (!names)
return;
// Translate param: names; type: string_vec_byref
std::vector<CefString> namesList;
transfer_string_list_contents(names, namesList);
// Execute
CefBrowserCppToC::Get(self)->GetFrameNames(
namesList);
// Restore param: names; type: string_vec_byref
cef_string_list_clear(names);
transfer_string_list_contents(namesList, names);
}
int CEF_CALLBACK browser_send_process_message(struct _cef_browser_t* self,
enum cef_process_id_t target_process,
struct _cef_process_message_t* message) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: message; type: refptr_same
DCHECK(message);
if (!message)
return 0;
// Execute
bool _retval = CefBrowserCppToC::Get(self)->SendProcessMessage(
target_process,
CefProcessMessageCppToC::Unwrap(message));
// Return type: bool
return _retval;
}
// 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_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;
}
#ifndef NDEBUG
template<> long CefCppToC<CefBrowserCppToC, CefBrowser,
cef_browser_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,38 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_BROWSER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_BROWSER_CPPTOC_H_
#pragma once
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef_browser.h"
#include "include/capi/cef_browser_capi.h"
#include "include/cef_client.h"
#include "include/capi/cef_client_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefBrowserCppToC
: public CefCppToC<CefBrowserCppToC, CefBrowser, cef_browser_t> {
public:
explicit CefBrowserCppToC(CefBrowser* cls);
virtual ~CefBrowserCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_BROWSER_CPPTOC_H_

View File

@ -0,0 +1,219 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/browser_cpptoc.h"
#include "libcef_dll/cpptoc/browser_host_cpptoc.h"
#include "libcef_dll/ctocpp/client_ctocpp.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT int cef_browser_host_create_browser(
const cef_window_info_t* windowInfo, struct _cef_client_t* client,
const cef_string_t* url, const struct _cef_browser_settings_t* settings) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: windowInfo; type: struct_byref_const
DCHECK(windowInfo);
if (!windowInfo)
return 0;
// Verify param: client; type: refptr_diff
DCHECK(client);
if (!client)
return 0;
// Verify param: settings; type: struct_byref_const
DCHECK(settings);
if (!settings)
return 0;
// Unverified params: url
// Translate param: windowInfo; type: struct_byref_const
CefWindowInfo windowInfoObj;
if (windowInfo)
windowInfoObj.Set(*windowInfo, false);
// Translate param: settings; type: struct_byref_const
CefBrowserSettings settingsObj;
if (settings)
settingsObj.Set(*settings, false);
// Execute
bool _retval = CefBrowserHost::CreateBrowser(
windowInfoObj,
CefClientCToCpp::Wrap(client),
CefString(url),
settingsObj);
// Return type: bool
return _retval;
}
CEF_EXPORT cef_browser_t* cef_browser_host_create_browser_sync(
const cef_window_info_t* windowInfo, struct _cef_client_t* client,
const cef_string_t* url, const struct _cef_browser_settings_t* settings) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: windowInfo; type: struct_byref_const
DCHECK(windowInfo);
if (!windowInfo)
return NULL;
// Verify param: client; type: refptr_diff
DCHECK(client);
if (!client)
return NULL;
// Verify param: settings; type: struct_byref_const
DCHECK(settings);
if (!settings)
return NULL;
// Unverified params: url
// Translate param: windowInfo; type: struct_byref_const
CefWindowInfo windowInfoObj;
if (windowInfo)
windowInfoObj.Set(*windowInfo, false);
// Translate param: settings; type: struct_byref_const
CefBrowserSettings settingsObj;
if (settings)
settingsObj.Set(*settings, false);
// Execute
CefRefPtr<CefBrowser> _retval = CefBrowserHost::CreateBrowserSync(
windowInfoObj,
CefClientCToCpp::Wrap(client),
CefString(url),
settingsObj);
// Return type: refptr_same
return CefBrowserCppToC::Wrap(_retval);
}
// MEMBER FUNCTIONS - Body may be edited by hand.
cef_browser_t* CEF_CALLBACK browser_host_get_browser(
struct _cef_browser_host_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefBrowser> _retval = CefBrowserHostCppToC::Get(self)->GetBrowser();
// Return type: refptr_same
return CefBrowserCppToC::Wrap(_retval);
}
void CEF_CALLBACK browser_host_parent_window_will_close(
struct _cef_browser_host_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefBrowserHostCppToC::Get(self)->ParentWindowWillClose();
}
void CEF_CALLBACK browser_host_close_browser(struct _cef_browser_host_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefBrowserHostCppToC::Get(self)->CloseBrowser();
}
void CEF_CALLBACK browser_host_set_focus(struct _cef_browser_host_t* self,
int enable) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefBrowserHostCppToC::Get(self)->SetFocus(
enable?true:false);
}
cef_window_handle_t CEF_CALLBACK browser_host_get_window_handle(
struct _cef_browser_host_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
cef_window_handle_t _retval = CefBrowserHostCppToC::Get(
self)->GetWindowHandle();
// Return type: simple
return _retval;
}
cef_window_handle_t CEF_CALLBACK browser_host_get_opener_window_handle(
struct _cef_browser_host_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
cef_window_handle_t _retval = CefBrowserHostCppToC::Get(
self)->GetOpenerWindowHandle();
// Return type: simple
return _retval;
}
struct _cef_client_t* CEF_CALLBACK browser_host_get_client(
struct _cef_browser_host_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefClient> _retval = CefBrowserHostCppToC::Get(self)->GetClient();
// Return type: refptr_diff
return CefClientCToCpp::Unwrap(_retval);
}
// 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_.parent_window_will_close =
browser_host_parent_window_will_close;
struct_.struct_.close_browser = browser_host_close_browser;
struct_.struct_.set_focus = browser_host_set_focus;
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;
}
#ifndef NDEBUG
template<> long CefCppToC<CefBrowserHostCppToC, CefBrowserHost,
cef_browser_host_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,39 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_BROWSER_HOST_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_BROWSER_HOST_CPPTOC_H_
#pragma once
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef_browser.h"
#include "include/capi/cef_browser_capi.h"
#include "include/cef_client.h"
#include "include/capi/cef_client_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefBrowserHostCppToC
: public CefCppToC<CefBrowserHostCppToC, CefBrowserHost,
cef_browser_host_t> {
public:
explicit CefBrowserHostCppToC(CefBrowserHost* cls);
virtual ~CefBrowserHostCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_BROWSER_HOST_CPPTOC_H_

View File

@ -0,0 +1,53 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/callback_cpptoc.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
void CEF_CALLBACK callback_cont(struct _cef_callback_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefCallbackCppToC::Get(self)->Continue();
}
void CEF_CALLBACK callback_cancel(struct _cef_callback_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefCallbackCppToC::Get(self)->Cancel();
}
// 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;
}
#ifndef NDEBUG
template<> long CefCppToC<CefCallbackCppToC, CefCallback,
cef_callback_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,36 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_CALLBACK_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_CALLBACK_CPPTOC_H_
#pragma once
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef_callback.h"
#include "include/capi/cef_callback_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefCallbackCppToC
: public CefCppToC<CefCallbackCppToC, CefCallback, cef_callback_t> {
public:
explicit CefCallbackCppToC(CefCallback* cls);
virtual ~CefCallbackCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_CALLBACK_CPPTOC_H_

View File

@ -0,0 +1,150 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/client_cpptoc.h"
#include "libcef_dll/cpptoc/display_handler_cpptoc.h"
#include "libcef_dll/cpptoc/geolocation_handler_cpptoc.h"
#include "libcef_dll/cpptoc/life_span_handler_cpptoc.h"
#include "libcef_dll/cpptoc/load_handler_cpptoc.h"
#include "libcef_dll/cpptoc/request_handler_cpptoc.h"
#include "libcef_dll/ctocpp/browser_ctocpp.h"
#include "libcef_dll/ctocpp/process_message_ctocpp.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
struct _cef_life_span_handler_t* CEF_CALLBACK client_get_life_span_handler(
struct _cef_client_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefLifeSpanHandler> _retval = CefClientCppToC::Get(
self)->GetLifeSpanHandler();
// Return type: refptr_same
return CefLifeSpanHandlerCppToC::Wrap(_retval);
}
struct _cef_load_handler_t* CEF_CALLBACK client_get_load_handler(
struct _cef_client_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefLoadHandler> _retval = CefClientCppToC::Get(
self)->GetLoadHandler();
// Return type: refptr_same
return CefLoadHandlerCppToC::Wrap(_retval);
}
struct _cef_request_handler_t* CEF_CALLBACK client_get_request_handler(
struct _cef_client_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefRequestHandler> _retval = CefClientCppToC::Get(
self)->GetRequestHandler();
// Return type: refptr_same
return CefRequestHandlerCppToC::Wrap(_retval);
}
struct _cef_display_handler_t* CEF_CALLBACK client_get_display_handler(
struct _cef_client_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefDisplayHandler> _retval = CefClientCppToC::Get(
self)->GetDisplayHandler();
// Return type: refptr_same
return CefDisplayHandlerCppToC::Wrap(_retval);
}
struct _cef_geolocation_handler_t* CEF_CALLBACK client_get_geolocation_handler(
struct _cef_client_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefGeolocationHandler> _retval = CefClientCppToC::Get(
self)->GetGeolocationHandler();
// Return type: refptr_same
return CefGeolocationHandlerCppToC::Wrap(_retval);
}
int CEF_CALLBACK client_on_process_message_recieved(struct _cef_client_t* self,
cef_browser_t* browser, enum cef_process_id_t source_process,
struct _cef_process_message_t* message) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return 0;
// Verify param: message; type: refptr_diff
DCHECK(message);
if (!message)
return 0;
// Execute
bool _retval = CefClientCppToC::Get(self)->OnProcessMessageRecieved(
CefBrowserCToCpp::Wrap(browser),
source_process,
CefProcessMessageCToCpp::Wrap(message));
// Return type: bool
return _retval;
}
// CONSTRUCTOR - Do not edit by hand.
CefClientCppToC::CefClientCppToC(CefClient* cls)
: CefCppToC<CefClientCppToC, CefClient, cef_client_t>(cls) {
struct_.struct_.get_life_span_handler = client_get_life_span_handler;
struct_.struct_.get_load_handler = client_get_load_handler;
struct_.struct_.get_request_handler = client_get_request_handler;
struct_.struct_.get_display_handler = client_get_display_handler;
struct_.struct_.get_geolocation_handler = client_get_geolocation_handler;
struct_.struct_.on_process_message_recieved =
client_on_process_message_recieved;
}
#ifndef NDEBUG
template<> long CefCppToC<CefClientCppToC, CefClient,
cef_client_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,36 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_CLIENT_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_CLIENT_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef_client.h"
#include "include/capi/cef_client_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefClientCppToC
: public CefCppToC<CefClientCppToC, CefClient, cef_client_t> {
public:
explicit CefClientCppToC(CefClient* cls);
virtual ~CefClientCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_CLIENT_CPPTOC_H_

View File

@ -0,0 +1,384 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/command_line_cpptoc.h"
#include "libcef_dll/transfer_util.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT cef_command_line_t* cef_command_line_create() {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
CefRefPtr<CefCommandLine> _retval = CefCommandLine::CreateCommandLine();
// Return type: refptr_same
return CefCommandLineCppToC::Wrap(_retval);
}
CEF_EXPORT cef_command_line_t* cef_command_line_get_global() {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
CefRefPtr<CefCommandLine> _retval = CefCommandLine::GetGlobalCommandLine();
// Return type: refptr_same
return CefCommandLineCppToC::Wrap(_retval);
}
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK command_line_is_valid(struct _cef_command_line_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefCommandLineCppToC::Get(self)->IsValid();
// Return type: bool
return _retval;
}
int CEF_CALLBACK command_line_is_read_only(struct _cef_command_line_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefCommandLineCppToC::Get(self)->IsReadOnly();
// Return type: bool
return _retval;
}
struct _cef_command_line_t* CEF_CALLBACK command_line_copy(
struct _cef_command_line_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefCommandLine> _retval = CefCommandLineCppToC::Get(self)->Copy();
// Return type: refptr_same
return CefCommandLineCppToC::Wrap(_retval);
}
void CEF_CALLBACK command_line_init_from_argv(struct _cef_command_line_t* self,
int argc, const char* const* argv) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: argv; type: simple_byaddr
DCHECK(argv);
if (!argv)
return;
// Execute
CefCommandLineCppToC::Get(self)->InitFromArgv(
argc,
argv);
}
void CEF_CALLBACK command_line_init_from_string(
struct _cef_command_line_t* self, const cef_string_t* command_line) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: command_line; type: string_byref_const
DCHECK(command_line);
if (!command_line)
return;
// Execute
CefCommandLineCppToC::Get(self)->InitFromString(
CefString(command_line));
}
void CEF_CALLBACK command_line_reset(struct _cef_command_line_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefCommandLineCppToC::Get(self)->Reset();
}
cef_string_userfree_t CEF_CALLBACK command_line_get_command_line_string(
struct _cef_command_line_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefCommandLineCppToC::Get(self)->GetCommandLineString();
// Return type: string
return _retval.DetachToUserFree();
}
cef_string_userfree_t CEF_CALLBACK command_line_get_program(
struct _cef_command_line_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefCommandLineCppToC::Get(self)->GetProgram();
// Return type: string
return _retval.DetachToUserFree();
}
void CEF_CALLBACK command_line_set_program(struct _cef_command_line_t* self,
const cef_string_t* program) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: program; type: string_byref_const
DCHECK(program);
if (!program)
return;
// Execute
CefCommandLineCppToC::Get(self)->SetProgram(
CefString(program));
}
int CEF_CALLBACK command_line_has_switches(struct _cef_command_line_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefCommandLineCppToC::Get(self)->HasSwitches();
// Return type: bool
return _retval;
}
int CEF_CALLBACK command_line_has_switch(struct _cef_command_line_t* self,
const cef_string_t* name) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: name; type: string_byref_const
DCHECK(name);
if (!name)
return 0;
// Execute
bool _retval = CefCommandLineCppToC::Get(self)->HasSwitch(
CefString(name));
// Return type: bool
return _retval;
}
cef_string_userfree_t CEF_CALLBACK command_line_get_switch_value(
struct _cef_command_line_t* self, const cef_string_t* name) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: name; type: string_byref_const
DCHECK(name);
if (!name)
return NULL;
// Execute
CefString _retval = CefCommandLineCppToC::Get(self)->GetSwitchValue(
CefString(name));
// Return type: string
return _retval.DetachToUserFree();
}
void CEF_CALLBACK command_line_get_switches(struct _cef_command_line_t* self,
cef_string_map_t switches) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: switches; type: string_map_single_byref
DCHECK(switches);
if (!switches)
return;
// Translate param: switches; type: string_map_single_byref
std::map<CefString, CefString> switchesMap;
transfer_string_map_contents(switches, switchesMap);
// Execute
CefCommandLineCppToC::Get(self)->GetSwitches(
switchesMap);
// Restore param: switches; type: string_map_single_byref
cef_string_map_clear(switches);
transfer_string_map_contents(switchesMap, switches);
}
void CEF_CALLBACK command_line_append_switch(struct _cef_command_line_t* self,
const cef_string_t* name) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: name; type: string_byref_const
DCHECK(name);
if (!name)
return;
// Execute
CefCommandLineCppToC::Get(self)->AppendSwitch(
CefString(name));
}
void CEF_CALLBACK command_line_append_switch_with_value(
struct _cef_command_line_t* self, const cef_string_t* name,
const cef_string_t* value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: name; type: string_byref_const
DCHECK(name);
if (!name)
return;
// Verify param: value; type: string_byref_const
DCHECK(value);
if (!value)
return;
// Execute
CefCommandLineCppToC::Get(self)->AppendSwitchWithValue(
CefString(name),
CefString(value));
}
int CEF_CALLBACK command_line_has_arguments(struct _cef_command_line_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefCommandLineCppToC::Get(self)->HasArguments();
// Return type: bool
return _retval;
}
void CEF_CALLBACK command_line_get_arguments(struct _cef_command_line_t* self,
cef_string_list_t arguments) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: arguments; type: string_vec_byref
DCHECK(arguments);
if (!arguments)
return;
// Translate param: arguments; type: string_vec_byref
std::vector<CefString> argumentsList;
transfer_string_list_contents(arguments, argumentsList);
// Execute
CefCommandLineCppToC::Get(self)->GetArguments(
argumentsList);
// Restore param: arguments; type: string_vec_byref
cef_string_list_clear(arguments);
transfer_string_list_contents(argumentsList, arguments);
}
void CEF_CALLBACK command_line_append_argument(struct _cef_command_line_t* self,
const cef_string_t* argument) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: argument; type: string_byref_const
DCHECK(argument);
if (!argument)
return;
// Execute
CefCommandLineCppToC::Get(self)->AppendArgument(
CefString(argument));
}
// 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_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;
}
#ifndef NDEBUG
template<> long CefCppToC<CefCommandLineCppToC, CefCommandLine,
cef_command_line_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,37 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_COMMAND_LINE_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_COMMAND_LINE_CPPTOC_H_
#pragma once
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef_command_line.h"
#include "include/capi/cef_command_line_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefCommandLineCppToC
: public CefCppToC<CefCommandLineCppToC, CefCommandLine,
cef_command_line_t> {
public:
explicit CefCommandLineCppToC(CefCommandLine* cls);
virtual ~CefCommandLineCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_COMMAND_LINE_CPPTOC_H_

View File

@ -0,0 +1,177 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/cookie_manager_cpptoc.h"
#include "libcef_dll/ctocpp/cookie_visitor_ctocpp.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT cef_cookie_manager_t* cef_cookie_manager_get_global_manager() {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
CefRefPtr<CefCookieManager> _retval = CefCookieManager::GetGlobalManager();
// Return type: refptr_same
return CefCookieManagerCppToC::Wrap(_retval);
}
CEF_EXPORT cef_cookie_manager_t* cef_cookie_manager_create_manager(
const cef_string_t* path) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Unverified params: path
// Execute
CefRefPtr<CefCookieManager> _retval = CefCookieManager::CreateManager(
CefString(path));
// Return type: refptr_same
return CefCookieManagerCppToC::Wrap(_retval);
}
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK cookie_manager_visit_all_cookies(
struct _cef_cookie_manager_t* self,
struct _cef_cookie_visitor_t* visitor) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: visitor; type: refptr_diff
DCHECK(visitor);
if (!visitor)
return 0;
// Execute
bool _retval = CefCookieManagerCppToC::Get(self)->VisitAllCookies(
CefCookieVisitorCToCpp::Wrap(visitor));
// Return type: bool
return _retval;
}
int CEF_CALLBACK cookie_manager_visit_url_cookies(
struct _cef_cookie_manager_t* self, const cef_string_t* url,
int includeHttpOnly, struct _cef_cookie_visitor_t* visitor) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: url; type: string_byref_const
DCHECK(url);
if (!url)
return 0;
// Verify param: visitor; type: refptr_diff
DCHECK(visitor);
if (!visitor)
return 0;
// Execute
bool _retval = CefCookieManagerCppToC::Get(self)->VisitUrlCookies(
CefString(url),
includeHttpOnly?true:false,
CefCookieVisitorCToCpp::Wrap(visitor));
// Return type: bool
return _retval;
}
int CEF_CALLBACK cookie_manager_set_cookie(struct _cef_cookie_manager_t* self,
const cef_string_t* url, const struct _cef_cookie_t* cookie) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: url; type: string_byref_const
DCHECK(url);
if (!url)
return 0;
// Verify param: cookie; type: struct_byref_const
DCHECK(cookie);
if (!cookie)
return 0;
// Translate param: cookie; type: struct_byref_const
CefCookie cookieObj;
if (cookie)
cookieObj.Set(*cookie, false);
// Execute
bool _retval = CefCookieManagerCppToC::Get(self)->SetCookie(
CefString(url),
cookieObj);
// Return type: bool
return _retval;
}
int CEF_CALLBACK cookie_manager_delete_cookies(
struct _cef_cookie_manager_t* self, const cef_string_t* url,
const cef_string_t* cookie_name) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Unverified params: url, cookie_name
// Execute
bool _retval = CefCookieManagerCppToC::Get(self)->DeleteCookies(
CefString(url),
CefString(cookie_name));
// Return type: bool
return _retval;
}
int CEF_CALLBACK cookie_manager_set_storage_path(
struct _cef_cookie_manager_t* self, const cef_string_t* path) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Unverified params: path
// Execute
bool _retval = CefCookieManagerCppToC::Get(self)->SetStoragePath(
CefString(path));
// Return type: bool
return _retval;
}
// CONSTRUCTOR - Do not edit by hand.
CefCookieManagerCppToC::CefCookieManagerCppToC(CefCookieManager* cls)
: CefCppToC<CefCookieManagerCppToC, CefCookieManager, cef_cookie_manager_t>(
cls) {
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;
}
#ifndef NDEBUG
template<> long CefCppToC<CefCookieManagerCppToC, CefCookieManager,
cef_cookie_manager_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,37 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_COOKIE_MANAGER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_COOKIE_MANAGER_CPPTOC_H_
#pragma once
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef_cookie.h"
#include "include/capi/cef_cookie_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefCookieManagerCppToC
: public CefCppToC<CefCookieManagerCppToC, CefCookieManager,
cef_cookie_manager_t> {
public:
explicit CefCookieManagerCppToC(CefCookieManager* cls);
virtual ~CefCookieManagerCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_COOKIE_MANAGER_CPPTOC_H_

View File

@ -0,0 +1,70 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/cookie_visitor_cpptoc.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK cookie_visitor_visit(struct _cef_cookie_visitor_t* self,
const struct _cef_cookie_t* cookie, int count, int total,
int* deleteCookie) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: cookie; type: struct_byref_const
DCHECK(cookie);
if (!cookie)
return 0;
// Verify param: deleteCookie; type: bool_byref
DCHECK(deleteCookie);
if (!deleteCookie)
return 0;
// Translate param: cookie; type: struct_byref_const
CefCookie cookieObj;
if (cookie)
cookieObj.Set(*cookie, false);
// Translate param: deleteCookie; type: bool_byref
bool deleteCookieBool = (deleteCookie && *deleteCookie)?true:false;
// Execute
bool _retval = CefCookieVisitorCppToC::Get(self)->Visit(
cookieObj,
count,
total,
deleteCookieBool);
// Restore param: deleteCookie; type: bool_byref
if (deleteCookie)
*deleteCookie = deleteCookieBool?true:false;
// Return type: bool
return _retval;
}
// CONSTRUCTOR - Do not edit by hand.
CefCookieVisitorCppToC::CefCookieVisitorCppToC(CefCookieVisitor* cls)
: CefCppToC<CefCookieVisitorCppToC, CefCookieVisitor, cef_cookie_visitor_t>(
cls) {
struct_.struct_.visit = cookie_visitor_visit;
}
#ifndef NDEBUG
template<> long CefCppToC<CefCookieVisitorCppToC, CefCookieVisitor,
cef_cookie_visitor_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,37 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_COOKIE_VISITOR_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_COOKIE_VISITOR_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef_cookie.h"
#include "include/capi/cef_cookie_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefCookieVisitorCppToC
: public CefCppToC<CefCookieVisitorCppToC, CefCookieVisitor,
cef_cookie_visitor_t> {
public:
explicit CefCookieVisitorCppToC(CefCookieVisitor* cls);
virtual ~CefCookieVisitorCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_COOKIE_VISITOR_CPPTOC_H_

160
libcef_dll/cpptoc/cpptoc.h Normal file
View File

@ -0,0 +1,160 @@
// Copyright (c) 2009 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.
#ifndef CEF_LIBCEF_DLL_CPPTOC_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_CPPTOC_H_
#pragma once
#include "include/cef_base.h"
#include "include/capi/cef_base_capi.h"
#include "libcef_dll/cef_logging.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
// called from the other side of the DLL boundary.
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.
static StructName* Wrap(CefRefPtr<BaseName> c) {
if (!c.get())
return NULL;
// Wrap our object with the CefCppToC class.
ClassName* wrapper = new ClassName(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<BaseName> Unwrap(StructName* s) {
if (!s)
return NULL;
// Cast our structure to the wrapper structure type.
Struct* wrapperStruct = reinterpret_cast<Struct*>(s);
// Add the underlying object instance to a smart pointer.
CefRefPtr<BaseName> 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;
}
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.get_refct = struct_get_refct;
#ifndef NDEBUG
CefAtomicIncrement(&DebugObjCt);
#endif
}
virtual ~CefCppToC() {
#ifndef NDEBUG
CefAtomicDecrement(&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_; }
// CefBase methods increment/decrement reference counts on both this object
// and the underlying wrapper class.
int AddRef() {
UnderlyingAddRef();
return refct_.AddRef();
}
int Release() {
UnderlyingRelease();
int retval = refct_.Release();
if (retval == 0)
delete this;
return retval;
}
int GetRefCt() { return refct_.GetRefCt(); }
// Increment/decrement reference counts on only the underlying class.
int UnderlyingAddRef() { return class_->AddRef(); }
int UnderlyingRelease() { return class_->Release(); }
int UnderlyingGetRefCt() { return class_->GetRefCt(); }
#ifndef NDEBUG
// Simple tracking of allocated objects.
static long DebugObjCt; // NOLINT(runtime/int)
#endif
private:
static int CEF_CALLBACK struct_add_ref(struct _cef_base_t* base) {
DCHECK(base);
if (!base)
return 0;
Struct* impl = reinterpret_cast<Struct*>(base);
return 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_get_refct(struct _cef_base_t* base) {
DCHECK(base);
if (!base)
return 0;
Struct* impl = reinterpret_cast<Struct*>(base);
return impl->class_->GetRefCt();
}
protected:
CefRefCount refct_;
Struct struct_;
BaseName* class_;
};
#endif // CEF_LIBCEF_DLL_CPPTOC_CPPTOC_H_

View File

@ -0,0 +1,577 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/binary_value_cpptoc.h"
#include "libcef_dll/cpptoc/dictionary_value_cpptoc.h"
#include "libcef_dll/cpptoc/list_value_cpptoc.h"
#include "libcef_dll/transfer_util.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT cef_dictionary_value_t* cef_dictionary_value_create() {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
CefRefPtr<CefDictionaryValue> _retval = CefDictionaryValue::Create();
// Return type: refptr_same
return CefDictionaryValueCppToC::Wrap(_retval);
}
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK dictionary_value_is_valid(
struct _cef_dictionary_value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefDictionaryValueCppToC::Get(self)->IsValid();
// Return type: bool
return _retval;
}
int CEF_CALLBACK dictionary_value_is_owned(
struct _cef_dictionary_value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefDictionaryValueCppToC::Get(self)->IsOwned();
// Return type: bool
return _retval;
}
int CEF_CALLBACK dictionary_value_is_read_only(
struct _cef_dictionary_value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefDictionaryValueCppToC::Get(self)->IsReadOnly();
// Return type: bool
return _retval;
}
struct _cef_dictionary_value_t* CEF_CALLBACK dictionary_value_copy(
struct _cef_dictionary_value_t* self, int exclude_empty_children) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefDictionaryValue> _retval = CefDictionaryValueCppToC::Get(
self)->Copy(
exclude_empty_children?true:false);
// Return type: refptr_same
return CefDictionaryValueCppToC::Wrap(_retval);
}
size_t CEF_CALLBACK dictionary_value_get_size(
struct _cef_dictionary_value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
size_t _retval = CefDictionaryValueCppToC::Get(self)->GetSize();
// Return type: simple
return _retval;
}
int CEF_CALLBACK dictionary_value_clear(struct _cef_dictionary_value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefDictionaryValueCppToC::Get(self)->Clear();
// Return type: bool
return _retval;
}
int CEF_CALLBACK dictionary_value_has_key(struct _cef_dictionary_value_t* self,
const cef_string_t* key) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: key; type: string_byref_const
DCHECK(key);
if (!key)
return 0;
// Execute
bool _retval = CefDictionaryValueCppToC::Get(self)->HasKey(
CefString(key));
// Return type: bool
return _retval;
}
int CEF_CALLBACK dictionary_value_get_keys(struct _cef_dictionary_value_t* self,
cef_string_list_t keys) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: keys; type: string_vec_byref
DCHECK(keys);
if (!keys)
return 0;
// Translate param: keys; type: string_vec_byref
std::vector<CefString> keysList;
transfer_string_list_contents(keys, keysList);
// Execute
bool _retval = CefDictionaryValueCppToC::Get(self)->GetKeys(
keysList);
// Restore param: keys; type: string_vec_byref
cef_string_list_clear(keys);
transfer_string_list_contents(keysList, keys);
// Return type: bool
return _retval;
}
int CEF_CALLBACK dictionary_value_remove(struct _cef_dictionary_value_t* self,
const cef_string_t* key) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: key; type: string_byref_const
DCHECK(key);
if (!key)
return 0;
// Execute
bool _retval = CefDictionaryValueCppToC::Get(self)->Remove(
CefString(key));
// Return type: bool
return _retval;
}
enum cef_value_type_t CEF_CALLBACK dictionary_value_get_type(
struct _cef_dictionary_value_t* self, const cef_string_t* key) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return VTYPE_INVALID;
// Verify param: key; type: string_byref_const
DCHECK(key);
if (!key)
return VTYPE_INVALID;
// Execute
cef_value_type_t _retval = CefDictionaryValueCppToC::Get(self)->GetType(
CefString(key));
// Return type: simple
return _retval;
}
int CEF_CALLBACK dictionary_value_get_bool(struct _cef_dictionary_value_t* self,
const cef_string_t* key) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: key; type: string_byref_const
DCHECK(key);
if (!key)
return 0;
// Execute
bool _retval = CefDictionaryValueCppToC::Get(self)->GetBool(
CefString(key));
// Return type: bool
return _retval;
}
int CEF_CALLBACK dictionary_value_get_int(struct _cef_dictionary_value_t* self,
const cef_string_t* key) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: key; type: string_byref_const
DCHECK(key);
if (!key)
return 0;
// Execute
int _retval = CefDictionaryValueCppToC::Get(self)->GetInt(
CefString(key));
// Return type: simple
return _retval;
}
double CEF_CALLBACK dictionary_value_get_double(
struct _cef_dictionary_value_t* self, const cef_string_t* key) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: key; type: string_byref_const
DCHECK(key);
if (!key)
return 0;
// Execute
double _retval = CefDictionaryValueCppToC::Get(self)->GetDouble(
CefString(key));
// Return type: simple
return _retval;
}
cef_string_userfree_t CEF_CALLBACK dictionary_value_get_string(
struct _cef_dictionary_value_t* self, const cef_string_t* key) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: key; type: string_byref_const
DCHECK(key);
if (!key)
return NULL;
// Execute
CefString _retval = CefDictionaryValueCppToC::Get(self)->GetString(
CefString(key));
// Return type: string
return _retval.DetachToUserFree();
}
cef_binary_value_t* CEF_CALLBACK dictionary_value_get_binary(
struct _cef_dictionary_value_t* self, const cef_string_t* key) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: key; type: string_byref_const
DCHECK(key);
if (!key)
return NULL;
// Execute
CefRefPtr<CefBinaryValue> _retval = CefDictionaryValueCppToC::Get(
self)->GetBinary(
CefString(key));
// Return type: refptr_same
return CefBinaryValueCppToC::Wrap(_retval);
}
struct _cef_dictionary_value_t* CEF_CALLBACK dictionary_value_get_dictionary(
struct _cef_dictionary_value_t* self, const cef_string_t* key) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: key; type: string_byref_const
DCHECK(key);
if (!key)
return NULL;
// Execute
CefRefPtr<CefDictionaryValue> _retval = CefDictionaryValueCppToC::Get(
self)->GetDictionary(
CefString(key));
// Return type: refptr_same
return CefDictionaryValueCppToC::Wrap(_retval);
}
struct _cef_list_value_t* CEF_CALLBACK dictionary_value_get_list(
struct _cef_dictionary_value_t* self, const cef_string_t* key) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: key; type: string_byref_const
DCHECK(key);
if (!key)
return NULL;
// Execute
CefRefPtr<CefListValue> _retval = CefDictionaryValueCppToC::Get(
self)->GetList(
CefString(key));
// Return type: refptr_same
return CefListValueCppToC::Wrap(_retval);
}
int CEF_CALLBACK dictionary_value_set_null(struct _cef_dictionary_value_t* self,
const cef_string_t* key) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: key; type: string_byref_const
DCHECK(key);
if (!key)
return 0;
// Execute
bool _retval = CefDictionaryValueCppToC::Get(self)->SetNull(
CefString(key));
// Return type: bool
return _retval;
}
int CEF_CALLBACK dictionary_value_set_bool(struct _cef_dictionary_value_t* self,
const cef_string_t* key, int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: key; type: string_byref_const
DCHECK(key);
if (!key)
return 0;
// Execute
bool _retval = CefDictionaryValueCppToC::Get(self)->SetBool(
CefString(key),
value?true:false);
// Return type: bool
return _retval;
}
int CEF_CALLBACK dictionary_value_set_int(struct _cef_dictionary_value_t* self,
const cef_string_t* key, int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: key; type: string_byref_const
DCHECK(key);
if (!key)
return 0;
// Execute
bool _retval = CefDictionaryValueCppToC::Get(self)->SetInt(
CefString(key),
value);
// Return type: bool
return _retval;
}
int CEF_CALLBACK dictionary_value_set_double(
struct _cef_dictionary_value_t* self, const cef_string_t* key,
double value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: key; type: string_byref_const
DCHECK(key);
if (!key)
return 0;
// Execute
bool _retval = CefDictionaryValueCppToC::Get(self)->SetDouble(
CefString(key),
value);
// Return type: bool
return _retval;
}
int CEF_CALLBACK dictionary_value_set_string(
struct _cef_dictionary_value_t* self, const cef_string_t* key,
const cef_string_t* value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: key; type: string_byref_const
DCHECK(key);
if (!key)
return 0;
// Unverified params: value
// Execute
bool _retval = CefDictionaryValueCppToC::Get(self)->SetString(
CefString(key),
CefString(value));
// Return type: bool
return _retval;
}
int CEF_CALLBACK dictionary_value_set_binary(
struct _cef_dictionary_value_t* self, const cef_string_t* key,
cef_binary_value_t* value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: key; type: string_byref_const
DCHECK(key);
if (!key)
return 0;
// Verify param: value; type: refptr_same
DCHECK(value);
if (!value)
return 0;
// Execute
bool _retval = CefDictionaryValueCppToC::Get(self)->SetBinary(
CefString(key),
CefBinaryValueCppToC::Unwrap(value));
// Return type: bool
return _retval;
}
int CEF_CALLBACK dictionary_value_set_dictionary(
struct _cef_dictionary_value_t* self, const cef_string_t* key,
struct _cef_dictionary_value_t* value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: key; type: string_byref_const
DCHECK(key);
if (!key)
return 0;
// Verify param: value; type: refptr_same
DCHECK(value);
if (!value)
return 0;
// Execute
bool _retval = CefDictionaryValueCppToC::Get(self)->SetDictionary(
CefString(key),
CefDictionaryValueCppToC::Unwrap(value));
// Return type: bool
return _retval;
}
int CEF_CALLBACK dictionary_value_set_list(struct _cef_dictionary_value_t* self,
const cef_string_t* key, struct _cef_list_value_t* value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: key; type: string_byref_const
DCHECK(key);
if (!key)
return 0;
// Verify param: value; type: refptr_same
DCHECK(value);
if (!value)
return 0;
// Execute
bool _retval = CefDictionaryValueCppToC::Get(self)->SetList(
CefString(key),
CefListValueCppToC::Unwrap(value));
// Return type: bool
return _retval;
}
// 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_.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_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_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;
}
#ifndef NDEBUG
template<> long CefCppToC<CefDictionaryValueCppToC, CefDictionaryValue,
cef_dictionary_value_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,37 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_DICTIONARY_VALUE_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_DICTIONARY_VALUE_CPPTOC_H_
#pragma once
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef_values.h"
#include "include/capi/cef_values_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefDictionaryValueCppToC
: public CefCppToC<CefDictionaryValueCppToC, CefDictionaryValue,
cef_dictionary_value_t> {
public:
explicit CefDictionaryValueCppToC(CefDictionaryValue* cls);
virtual ~CefDictionaryValueCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_DICTIONARY_VALUE_CPPTOC_H_

View File

@ -0,0 +1,179 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/display_handler_cpptoc.h"
#include "libcef_dll/ctocpp/browser_ctocpp.h"
#include "libcef_dll/ctocpp/frame_ctocpp.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
void CEF_CALLBACK display_handler_on_loading_state_change(
struct _cef_display_handler_t* self, cef_browser_t* browser, int isLoading,
int canGoBack, int canGoForward) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return;
// Execute
CefDisplayHandlerCppToC::Get(self)->OnLoadingStateChange(
CefBrowserCToCpp::Wrap(browser),
isLoading?true:false,
canGoBack?true:false,
canGoForward?true:false);
}
void CEF_CALLBACK display_handler_on_address_change(
struct _cef_display_handler_t* self, cef_browser_t* browser,
struct _cef_frame_t* frame, const cef_string_t* url) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return;
// Verify param: frame; type: refptr_diff
DCHECK(frame);
if (!frame)
return;
// Verify param: url; type: string_byref_const
DCHECK(url);
if (!url)
return;
// Execute
CefDisplayHandlerCppToC::Get(self)->OnAddressChange(
CefBrowserCToCpp::Wrap(browser),
CefFrameCToCpp::Wrap(frame),
CefString(url));
}
void CEF_CALLBACK display_handler_on_title_change(
struct _cef_display_handler_t* self, cef_browser_t* browser,
const cef_string_t* title) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return;
// Unverified params: title
// Execute
CefDisplayHandlerCppToC::Get(self)->OnTitleChange(
CefBrowserCToCpp::Wrap(browser),
CefString(title));
}
int CEF_CALLBACK display_handler_on_tooltip(struct _cef_display_handler_t* self,
cef_browser_t* browser, cef_string_t* text) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return 0;
// Unverified params: text
// Translate param: text; type: string_byref
CefString textStr(text);
// Execute
bool _retval = CefDisplayHandlerCppToC::Get(self)->OnTooltip(
CefBrowserCToCpp::Wrap(browser),
textStr);
// Return type: bool
return _retval;
}
void CEF_CALLBACK display_handler_on_status_message(
struct _cef_display_handler_t* self, cef_browser_t* browser,
const cef_string_t* value, enum cef_handler_statustype_t type) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return;
// Unverified params: value
// Execute
CefDisplayHandlerCppToC::Get(self)->OnStatusMessage(
CefBrowserCToCpp::Wrap(browser),
CefString(value),
type);
}
int CEF_CALLBACK display_handler_on_console_message(
struct _cef_display_handler_t* self, cef_browser_t* browser,
const cef_string_t* message, const cef_string_t* source, int line) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return 0;
// Unverified params: message, source
// Execute
bool _retval = CefDisplayHandlerCppToC::Get(self)->OnConsoleMessage(
CefBrowserCToCpp::Wrap(browser),
CefString(message),
CefString(source),
line);
// Return type: bool
return _retval;
}
// CONSTRUCTOR - Do not edit by hand.
CefDisplayHandlerCppToC::CefDisplayHandlerCppToC(CefDisplayHandler* cls)
: CefCppToC<CefDisplayHandlerCppToC, CefDisplayHandler,
cef_display_handler_t>(cls) {
struct_.struct_.on_loading_state_change =
display_handler_on_loading_state_change;
struct_.struct_.on_address_change = display_handler_on_address_change;
struct_.struct_.on_title_change = display_handler_on_title_change;
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;
}
#ifndef NDEBUG
template<> long CefCppToC<CefDisplayHandlerCppToC, CefDisplayHandler,
cef_display_handler_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,37 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_DISPLAY_HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_DISPLAY_HANDLER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef_display_handler.h"
#include "include/capi/cef_display_handler_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefDisplayHandlerCppToC
: public CefCppToC<CefDisplayHandlerCppToC, CefDisplayHandler,
cef_display_handler_t> {
public:
explicit CefDisplayHandlerCppToC(CefDisplayHandler* cls);
virtual ~CefDisplayHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_DISPLAY_HANDLER_CPPTOC_H_

View File

@ -0,0 +1,382 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/browser_cpptoc.h"
#include "libcef_dll/cpptoc/frame_cpptoc.h"
#include "libcef_dll/cpptoc/request_cpptoc.h"
#include "libcef_dll/cpptoc/v8context_cpptoc.h"
#include "libcef_dll/ctocpp/string_visitor_ctocpp.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK frame_is_valid(struct _cef_frame_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefFrameCppToC::Get(self)->IsValid();
// Return type: bool
return _retval;
}
void CEF_CALLBACK frame_undo(struct _cef_frame_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefFrameCppToC::Get(self)->Undo();
}
void CEF_CALLBACK frame_redo(struct _cef_frame_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefFrameCppToC::Get(self)->Redo();
}
void CEF_CALLBACK frame_cut(struct _cef_frame_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefFrameCppToC::Get(self)->Cut();
}
void CEF_CALLBACK frame_copy(struct _cef_frame_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefFrameCppToC::Get(self)->Copy();
}
void CEF_CALLBACK frame_paste(struct _cef_frame_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefFrameCppToC::Get(self)->Paste();
}
void CEF_CALLBACK frame_del(struct _cef_frame_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefFrameCppToC::Get(self)->Delete();
}
void CEF_CALLBACK frame_select_all(struct _cef_frame_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefFrameCppToC::Get(self)->SelectAll();
}
void CEF_CALLBACK frame_view_source(struct _cef_frame_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefFrameCppToC::Get(self)->ViewSource();
}
void CEF_CALLBACK frame_get_source(struct _cef_frame_t* self,
struct _cef_string_visitor_t* visitor) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: visitor; type: refptr_diff
DCHECK(visitor);
if (!visitor)
return;
// Execute
CefFrameCppToC::Get(self)->GetSource(
CefStringVisitorCToCpp::Wrap(visitor));
}
void CEF_CALLBACK frame_get_text(struct _cef_frame_t* self,
struct _cef_string_visitor_t* visitor) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: visitor; type: refptr_diff
DCHECK(visitor);
if (!visitor)
return;
// Execute
CefFrameCppToC::Get(self)->GetText(
CefStringVisitorCToCpp::Wrap(visitor));
}
void CEF_CALLBACK frame_load_request(struct _cef_frame_t* self,
struct _cef_request_t* request) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: request; type: refptr_same
DCHECK(request);
if (!request)
return;
// Execute
CefFrameCppToC::Get(self)->LoadRequest(
CefRequestCppToC::Unwrap(request));
}
void CEF_CALLBACK frame_load_url(struct _cef_frame_t* self,
const cef_string_t* url) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: url; type: string_byref_const
DCHECK(url);
if (!url)
return;
// Execute
CefFrameCppToC::Get(self)->LoadURL(
CefString(url));
}
void CEF_CALLBACK frame_load_string(struct _cef_frame_t* self,
const cef_string_t* string_val, const cef_string_t* url) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: string_val; type: string_byref_const
DCHECK(string_val);
if (!string_val)
return;
// Verify param: url; type: string_byref_const
DCHECK(url);
if (!url)
return;
// Execute
CefFrameCppToC::Get(self)->LoadString(
CefString(string_val),
CefString(url));
}
void CEF_CALLBACK frame_execute_java_script(struct _cef_frame_t* self,
const cef_string_t* jsCode, const cef_string_t* scriptUrl,
int startLine) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: jsCode; type: string_byref_const
DCHECK(jsCode);
if (!jsCode)
return;
// Unverified params: scriptUrl
// Execute
CefFrameCppToC::Get(self)->ExecuteJavaScript(
CefString(jsCode),
CefString(scriptUrl),
startLine);
}
int CEF_CALLBACK frame_is_main(struct _cef_frame_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefFrameCppToC::Get(self)->IsMain();
// Return type: bool
return _retval;
}
int CEF_CALLBACK frame_is_focused(struct _cef_frame_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefFrameCppToC::Get(self)->IsFocused();
// Return type: bool
return _retval;
}
cef_string_userfree_t CEF_CALLBACK frame_get_name(struct _cef_frame_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefFrameCppToC::Get(self)->GetName();
// Return type: string
return _retval.DetachToUserFree();
}
int64 CEF_CALLBACK frame_get_identifier(struct _cef_frame_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int64 _retval = CefFrameCppToC::Get(self)->GetIdentifier();
// Return type: simple
return _retval;
}
struct _cef_frame_t* CEF_CALLBACK frame_get_parent(struct _cef_frame_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefFrame> _retval = CefFrameCppToC::Get(self)->GetParent();
// Return type: refptr_same
return CefFrameCppToC::Wrap(_retval);
}
cef_string_userfree_t CEF_CALLBACK frame_get_url(struct _cef_frame_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefFrameCppToC::Get(self)->GetURL();
// Return type: string
return _retval.DetachToUserFree();
}
cef_browser_t* CEF_CALLBACK frame_get_browser(struct _cef_frame_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefBrowser> _retval = CefFrameCppToC::Get(self)->GetBrowser();
// Return type: refptr_same
return CefBrowserCppToC::Wrap(_retval);
}
struct _cef_v8context_t* CEF_CALLBACK frame_get_v8context(
struct _cef_frame_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefV8Context> _retval = CefFrameCppToC::Get(self)->GetV8Context();
// Return type: refptr_same
return CefV8ContextCppToC::Wrap(_retval);
}
// 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;
}
#ifndef NDEBUG
template<> long CefCppToC<CefFrameCppToC, CefFrame, cef_frame_t>::DebugObjCt =
0;
#endif

View File

@ -0,0 +1,40 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_FRAME_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_FRAME_CPPTOC_H_
#pragma once
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef_frame.h"
#include "include/capi/cef_frame_capi.h"
#include "include/cef_browser.h"
#include "include/capi/cef_browser_capi.h"
#include "include/cef_v8.h"
#include "include/capi/cef_v8_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefFrameCppToC
: public CefCppToC<CefFrameCppToC, CefFrame, cef_frame_t> {
public:
explicit CefFrameCppToC(CefFrame* cls);
virtual ~CefFrameCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_FRAME_CPPTOC_H_

View File

@ -0,0 +1,45 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/geolocation_callback_cpptoc.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
void CEF_CALLBACK geolocation_callback_cont(
struct _cef_geolocation_callback_t* self, int allow) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefGeolocationCallbackCppToC::Get(self)->Continue(
allow?true:false);
}
// CONSTRUCTOR - Do not edit by hand.
CefGeolocationCallbackCppToC::CefGeolocationCallbackCppToC(
CefGeolocationCallback* cls)
: CefCppToC<CefGeolocationCallbackCppToC, CefGeolocationCallback,
cef_geolocation_callback_t>(cls) {
struct_.struct_.cont = geolocation_callback_cont;
}
#ifndef NDEBUG
template<> long CefCppToC<CefGeolocationCallbackCppToC, CefGeolocationCallback,
cef_geolocation_callback_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,37 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_GEOLOCATION_CALLBACK_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_GEOLOCATION_CALLBACK_CPPTOC_H_
#pragma once
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef_geolocation_handler.h"
#include "include/capi/cef_geolocation_handler_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefGeolocationCallbackCppToC
: public CefCppToC<CefGeolocationCallbackCppToC, CefGeolocationCallback,
cef_geolocation_callback_t> {
public:
explicit CefGeolocationCallbackCppToC(CefGeolocationCallback* cls);
virtual ~CefGeolocationCallbackCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_GEOLOCATION_CALLBACK_CPPTOC_H_

View File

@ -0,0 +1,91 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/geolocation_handler_cpptoc.h"
#include "libcef_dll/ctocpp/browser_ctocpp.h"
#include "libcef_dll/ctocpp/geolocation_callback_ctocpp.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
void CEF_CALLBACK geolocation_handler_on_request_geolocation_permission(
struct _cef_geolocation_handler_t* self, cef_browser_t* browser,
const cef_string_t* requesting_url, int request_id,
cef_geolocation_callback_t* callback) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return;
// Verify param: requesting_url; type: string_byref_const
DCHECK(requesting_url);
if (!requesting_url)
return;
// Verify param: callback; type: refptr_diff
DCHECK(callback);
if (!callback)
return;
// Execute
CefGeolocationHandlerCppToC::Get(self)->OnRequestGeolocationPermission(
CefBrowserCToCpp::Wrap(browser),
CefString(requesting_url),
request_id,
CefGeolocationCallbackCToCpp::Wrap(callback));
}
void CEF_CALLBACK geolocation_handler_on_cancel_geolocation_permission(
struct _cef_geolocation_handler_t* self, cef_browser_t* browser,
const cef_string_t* requesting_url, int request_id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return;
// Verify param: requesting_url; type: string_byref_const
DCHECK(requesting_url);
if (!requesting_url)
return;
// Execute
CefGeolocationHandlerCppToC::Get(self)->OnCancelGeolocationPermission(
CefBrowserCToCpp::Wrap(browser),
CefString(requesting_url),
request_id);
}
// CONSTRUCTOR - Do not edit by hand.
CefGeolocationHandlerCppToC::CefGeolocationHandlerCppToC(
CefGeolocationHandler* cls)
: CefCppToC<CefGeolocationHandlerCppToC, CefGeolocationHandler,
cef_geolocation_handler_t>(cls) {
struct_.struct_.on_request_geolocation_permission =
geolocation_handler_on_request_geolocation_permission;
struct_.struct_.on_cancel_geolocation_permission =
geolocation_handler_on_cancel_geolocation_permission;
}
#ifndef NDEBUG
template<> long CefCppToC<CefGeolocationHandlerCppToC, CefGeolocationHandler,
cef_geolocation_handler_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,37 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_GEOLOCATION_HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_GEOLOCATION_HANDLER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef_geolocation_handler.h"
#include "include/capi/cef_geolocation_handler_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefGeolocationHandlerCppToC
: public CefCppToC<CefGeolocationHandlerCppToC, CefGeolocationHandler,
cef_geolocation_handler_t> {
public:
explicit CefGeolocationHandlerCppToC(CefGeolocationHandler* cls);
virtual ~CefGeolocationHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_GEOLOCATION_HANDLER_CPPTOC_H_

View File

@ -0,0 +1,191 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/client_cpptoc.h"
#include "libcef_dll/cpptoc/life_span_handler_cpptoc.h"
#include "libcef_dll/ctocpp/browser_ctocpp.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK life_span_handler_on_before_popup(
struct _cef_life_span_handler_t* self, cef_browser_t* parentBrowser,
const struct _cef_popup_features_t* popupFeatures,
cef_window_info_t* windowInfo, const cef_string_t* url,
cef_client_t** client, struct _cef_browser_settings_t* settings) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: parentBrowser; type: refptr_diff
DCHECK(parentBrowser);
if (!parentBrowser)
return 0;
// Verify param: popupFeatures; type: struct_byref_const
DCHECK(popupFeatures);
if (!popupFeatures)
return 0;
// Verify param: windowInfo; type: struct_byref
DCHECK(windowInfo);
if (!windowInfo)
return 0;
// Verify param: client; type: refptr_same_byref
DCHECK(client);
if (!client)
return 0;
// Verify param: settings; type: struct_byref
DCHECK(settings);
if (!settings)
return 0;
// Unverified params: url
// Translate param: popupFeatures; type: struct_byref_const
CefPopupFeatures popupFeaturesObj;
if (popupFeatures)
popupFeaturesObj.Set(*popupFeatures, false);
// Translate param: windowInfo; type: struct_byref
CefWindowInfo windowInfoObj;
if (windowInfo)
windowInfoObj.AttachTo(*windowInfo);
// Translate param: client; type: refptr_same_byref
CefRefPtr<CefClient> clientPtr;
if (client && *client)
clientPtr = CefClientCppToC::Unwrap(*client);
CefClient* clientOrig = clientPtr.get();
// Translate param: settings; type: struct_byref
CefBrowserSettings settingsObj;
if (settings)
settingsObj.AttachTo(*settings);
// Execute
bool _retval = CefLifeSpanHandlerCppToC::Get(self)->OnBeforePopup(
CefBrowserCToCpp::Wrap(parentBrowser),
popupFeaturesObj,
windowInfoObj,
CefString(url),
clientPtr,
settingsObj);
// Restore param: windowInfo; type: struct_byref
if (windowInfo)
windowInfoObj.DetachTo(*windowInfo);
// Restore param: client; type: refptr_same_byref
if (client) {
if (clientPtr.get()) {
if (clientPtr.get() != clientOrig) {
*client = CefClientCppToC::Wrap(clientPtr);
}
} else {
*client = NULL;
}
}
// Restore param: settings; type: struct_byref
if (settings)
settingsObj.DetachTo(*settings);
// Return type: bool
return _retval;
}
void CEF_CALLBACK life_span_handler_on_after_created(
struct _cef_life_span_handler_t* self, cef_browser_t* browser) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return;
// Execute
CefLifeSpanHandlerCppToC::Get(self)->OnAfterCreated(
CefBrowserCToCpp::Wrap(browser));
}
int CEF_CALLBACK life_span_handler_run_modal(
struct _cef_life_span_handler_t* self, cef_browser_t* browser) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return 0;
// Execute
bool _retval = CefLifeSpanHandlerCppToC::Get(self)->RunModal(
CefBrowserCToCpp::Wrap(browser));
// Return type: bool
return _retval;
}
int CEF_CALLBACK life_span_handler_do_close(
struct _cef_life_span_handler_t* self, cef_browser_t* browser) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return 0;
// Execute
bool _retval = CefLifeSpanHandlerCppToC::Get(self)->DoClose(
CefBrowserCToCpp::Wrap(browser));
// Return type: bool
return _retval;
}
void CEF_CALLBACK life_span_handler_on_before_close(
struct _cef_life_span_handler_t* self, cef_browser_t* browser) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return;
// Execute
CefLifeSpanHandlerCppToC::Get(self)->OnBeforeClose(
CefBrowserCToCpp::Wrap(browser));
}
// 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;
}
#ifndef NDEBUG
template<> long CefCppToC<CefLifeSpanHandlerCppToC, CefLifeSpanHandler,
cef_life_span_handler_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,39 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_LIFE_SPAN_HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_LIFE_SPAN_HANDLER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef_life_span_handler.h"
#include "include/capi/cef_life_span_handler_capi.h"
#include "include/cef_client.h"
#include "include/capi/cef_client_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefLifeSpanHandlerCppToC
: public CefCppToC<CefLifeSpanHandlerCppToC, CefLifeSpanHandler,
cef_life_span_handler_t> {
public:
explicit CefLifeSpanHandlerCppToC(CefLifeSpanHandler* cls);
virtual ~CefLifeSpanHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_LIFE_SPAN_HANDLER_CPPTOC_H_

View File

@ -0,0 +1,528 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/binary_value_cpptoc.h"
#include "libcef_dll/cpptoc/dictionary_value_cpptoc.h"
#include "libcef_dll/cpptoc/list_value_cpptoc.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT cef_list_value_t* cef_list_value_create() {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
CefRefPtr<CefListValue> _retval = CefListValue::Create();
// Return type: refptr_same
return CefListValueCppToC::Wrap(_retval);
}
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK list_value_is_valid(struct _cef_list_value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefListValueCppToC::Get(self)->IsValid();
// Return type: bool
return _retval;
}
int CEF_CALLBACK list_value_is_owned(struct _cef_list_value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefListValueCppToC::Get(self)->IsOwned();
// Return type: bool
return _retval;
}
int CEF_CALLBACK list_value_is_read_only(struct _cef_list_value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefListValueCppToC::Get(self)->IsReadOnly();
// Return type: bool
return _retval;
}
struct _cef_list_value_t* CEF_CALLBACK list_value_copy(
struct _cef_list_value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefListValue> _retval = CefListValueCppToC::Get(self)->Copy();
// Return type: refptr_same
return CefListValueCppToC::Wrap(_retval);
}
int CEF_CALLBACK list_value_set_size(struct _cef_list_value_t* self,
size_t size) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefListValueCppToC::Get(self)->SetSize(
size);
// Return type: bool
return _retval;
}
size_t CEF_CALLBACK list_value_get_size(struct _cef_list_value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
size_t _retval = CefListValueCppToC::Get(self)->GetSize();
// Return type: simple
return _retval;
}
int CEF_CALLBACK list_value_clear(struct _cef_list_value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefListValueCppToC::Get(self)->Clear();
// Return type: bool
return _retval;
}
int CEF_CALLBACK list_value_remove(struct _cef_list_value_t* self, int index) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: index; type: simple_byval
DCHECK_GE(index, 0);
if (index < 0)
return 0;
// Execute
bool _retval = CefListValueCppToC::Get(self)->Remove(
index);
// Return type: bool
return _retval;
}
enum cef_value_type_t CEF_CALLBACK list_value_get_type(
struct _cef_list_value_t* self, int index) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return VTYPE_INVALID;
// Verify param: index; type: simple_byval
DCHECK_GE(index, 0);
if (index < 0)
return VTYPE_INVALID;
// Execute
cef_value_type_t _retval = CefListValueCppToC::Get(self)->GetType(
index);
// Return type: simple
return _retval;
}
int CEF_CALLBACK list_value_get_bool(struct _cef_list_value_t* self,
int index) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: index; type: simple_byval
DCHECK_GE(index, 0);
if (index < 0)
return 0;
// Execute
bool _retval = CefListValueCppToC::Get(self)->GetBool(
index);
// Return type: bool
return _retval;
}
int CEF_CALLBACK list_value_get_int(struct _cef_list_value_t* self, int index) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: index; type: simple_byval
DCHECK_GE(index, 0);
if (index < 0)
return 0;
// Execute
int _retval = CefListValueCppToC::Get(self)->GetInt(
index);
// Return type: simple
return _retval;
}
double CEF_CALLBACK list_value_get_double(struct _cef_list_value_t* self,
int index) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: index; type: simple_byval
DCHECK_GE(index, 0);
if (index < 0)
return 0;
// Execute
double _retval = CefListValueCppToC::Get(self)->GetDouble(
index);
// Return type: simple
return _retval;
}
cef_string_userfree_t CEF_CALLBACK list_value_get_string(
struct _cef_list_value_t* self, int index) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: index; type: simple_byval
DCHECK_GE(index, 0);
if (index < 0)
return NULL;
// Execute
CefString _retval = CefListValueCppToC::Get(self)->GetString(
index);
// Return type: string
return _retval.DetachToUserFree();
}
cef_binary_value_t* CEF_CALLBACK list_value_get_binary(
struct _cef_list_value_t* self, int index) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: index; type: simple_byval
DCHECK_GE(index, 0);
if (index < 0)
return NULL;
// Execute
CefRefPtr<CefBinaryValue> _retval = CefListValueCppToC::Get(self)->GetBinary(
index);
// Return type: refptr_same
return CefBinaryValueCppToC::Wrap(_retval);
}
cef_dictionary_value_t* CEF_CALLBACK list_value_get_dictionary(
struct _cef_list_value_t* self, int index) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: index; type: simple_byval
DCHECK_GE(index, 0);
if (index < 0)
return NULL;
// Execute
CefRefPtr<CefDictionaryValue> _retval = CefListValueCppToC::Get(
self)->GetDictionary(
index);
// Return type: refptr_same
return CefDictionaryValueCppToC::Wrap(_retval);
}
struct _cef_list_value_t* CEF_CALLBACK list_value_get_list(
struct _cef_list_value_t* self, int index) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: index; type: simple_byval
DCHECK_GE(index, 0);
if (index < 0)
return NULL;
// Execute
CefRefPtr<CefListValue> _retval = CefListValueCppToC::Get(self)->GetList(
index);
// Return type: refptr_same
return CefListValueCppToC::Wrap(_retval);
}
int CEF_CALLBACK list_value_set_null(struct _cef_list_value_t* self,
int index) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: index; type: simple_byval
DCHECK_GE(index, 0);
if (index < 0)
return 0;
// Execute
bool _retval = CefListValueCppToC::Get(self)->SetNull(
index);
// Return type: bool
return _retval;
}
int CEF_CALLBACK list_value_set_bool(struct _cef_list_value_t* self, int index,
int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: index; type: simple_byval
DCHECK_GE(index, 0);
if (index < 0)
return 0;
// Execute
bool _retval = CefListValueCppToC::Get(self)->SetBool(
index,
value?true:false);
// Return type: bool
return _retval;
}
int CEF_CALLBACK list_value_set_int(struct _cef_list_value_t* self, int index,
int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: index; type: simple_byval
DCHECK_GE(index, 0);
if (index < 0)
return 0;
// Execute
bool _retval = CefListValueCppToC::Get(self)->SetInt(
index,
value);
// Return type: bool
return _retval;
}
int CEF_CALLBACK list_value_set_double(struct _cef_list_value_t* self,
int index, double value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: index; type: simple_byval
DCHECK_GE(index, 0);
if (index < 0)
return 0;
// Execute
bool _retval = CefListValueCppToC::Get(self)->SetDouble(
index,
value);
// Return type: bool
return _retval;
}
int CEF_CALLBACK list_value_set_string(struct _cef_list_value_t* self,
int index, const cef_string_t* value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: index; type: simple_byval
DCHECK_GE(index, 0);
if (index < 0)
return 0;
// Unverified params: value
// Execute
bool _retval = CefListValueCppToC::Get(self)->SetString(
index,
CefString(value));
// Return type: bool
return _retval;
}
int CEF_CALLBACK list_value_set_binary(struct _cef_list_value_t* self,
int index, cef_binary_value_t* value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: index; type: simple_byval
DCHECK_GE(index, 0);
if (index < 0)
return 0;
// Verify param: value; type: refptr_same
DCHECK(value);
if (!value)
return 0;
// Execute
bool _retval = CefListValueCppToC::Get(self)->SetBinary(
index,
CefBinaryValueCppToC::Unwrap(value));
// Return type: bool
return _retval;
}
int CEF_CALLBACK list_value_set_dictionary(struct _cef_list_value_t* self,
int index, cef_dictionary_value_t* value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: index; type: simple_byval
DCHECK_GE(index, 0);
if (index < 0)
return 0;
// Verify param: value; type: refptr_same
DCHECK(value);
if (!value)
return 0;
// Execute
bool _retval = CefListValueCppToC::Get(self)->SetDictionary(
index,
CefDictionaryValueCppToC::Unwrap(value));
// Return type: bool
return _retval;
}
int CEF_CALLBACK list_value_set_list(struct _cef_list_value_t* self, int index,
struct _cef_list_value_t* value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: index; type: simple_byval
DCHECK_GE(index, 0);
if (index < 0)
return 0;
// Verify param: value; type: refptr_same
DCHECK(value);
if (!value)
return 0;
// Execute
bool _retval = CefListValueCppToC::Get(self)->SetList(
index,
CefListValueCppToC::Unwrap(value));
// Return type: bool
return _retval;
}
// 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_.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_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_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;
}
#ifndef NDEBUG
template<> long CefCppToC<CefListValueCppToC, CefListValue,
cef_list_value_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,36 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_LIST_VALUE_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_LIST_VALUE_CPPTOC_H_
#pragma once
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef_values.h"
#include "include/capi/cef_values_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefListValueCppToC
: public CefCppToC<CefListValueCppToC, CefListValue, cef_list_value_t> {
public:
explicit CefListValueCppToC(CefListValue* cls);
virtual ~CefListValueCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_LIST_VALUE_CPPTOC_H_

View File

@ -0,0 +1,111 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/load_handler_cpptoc.h"
#include "libcef_dll/ctocpp/browser_ctocpp.h"
#include "libcef_dll/ctocpp/frame_ctocpp.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
void CEF_CALLBACK load_handler_on_load_start(struct _cef_load_handler_t* self,
cef_browser_t* browser, cef_frame_t* frame) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return;
// Verify param: frame; type: refptr_diff
DCHECK(frame);
if (!frame)
return;
// Execute
CefLoadHandlerCppToC::Get(self)->OnLoadStart(
CefBrowserCToCpp::Wrap(browser),
CefFrameCToCpp::Wrap(frame));
}
void CEF_CALLBACK load_handler_on_load_end(struct _cef_load_handler_t* self,
cef_browser_t* browser, cef_frame_t* frame, int httpStatusCode) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return;
// Verify param: frame; type: refptr_diff
DCHECK(frame);
if (!frame)
return;
// Execute
CefLoadHandlerCppToC::Get(self)->OnLoadEnd(
CefBrowserCToCpp::Wrap(browser),
CefFrameCToCpp::Wrap(frame),
httpStatusCode);
}
void CEF_CALLBACK load_handler_on_load_error(struct _cef_load_handler_t* self,
cef_browser_t* browser, cef_frame_t* frame,
enum cef_handler_errorcode_t errorCode, const cef_string_t* errorText,
const cef_string_t* failedUrl) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return;
// Verify param: frame; type: refptr_diff
DCHECK(frame);
if (!frame)
return;
// Verify param: failedUrl; type: string_byref_const
DCHECK(failedUrl);
if (!failedUrl)
return;
// Unverified params: errorText
// Execute
CefLoadHandlerCppToC::Get(self)->OnLoadError(
CefBrowserCToCpp::Wrap(browser),
CefFrameCToCpp::Wrap(frame),
errorCode,
CefString(errorText),
CefString(failedUrl));
}
// CONSTRUCTOR - Do not edit by hand.
CefLoadHandlerCppToC::CefLoadHandlerCppToC(CefLoadHandler* cls)
: CefCppToC<CefLoadHandlerCppToC, CefLoadHandler, cef_load_handler_t>(cls) {
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;
}
#ifndef NDEBUG
template<> long CefCppToC<CefLoadHandlerCppToC, CefLoadHandler,
cef_load_handler_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,37 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_LOAD_HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_LOAD_HANDLER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef_load_handler.h"
#include "include/capi/cef_load_handler_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefLoadHandlerCppToC
: public CefCppToC<CefLoadHandlerCppToC, CefLoadHandler,
cef_load_handler_t> {
public:
explicit CefLoadHandlerCppToC(CefLoadHandler* cls);
virtual ~CefLoadHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_LOAD_HANDLER_CPPTOC_H_

View File

@ -0,0 +1,67 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/permission_handler_cpptoc.h"
#include "libcef_dll/ctocpp/browser_ctocpp.h"
#include "libcef_dll/ctocpp/frame_ctocpp.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK permission_handler_on_before_script_extension_load(
struct _cef_permission_handler_t* self, cef_browser_t* browser,
cef_frame_t* frame, const cef_string_t* extensionName) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return 0;
// Verify param: frame; type: refptr_diff
DCHECK(frame);
if (!frame)
return 0;
// Verify param: extensionName; type: string_byref_const
DCHECK(extensionName);
if (!extensionName)
return 0;
// Execute
bool _retval = CefPermissionHandlerCppToC::Get(
self)->OnBeforeScriptExtensionLoad(
CefBrowserCToCpp::Wrap(browser),
CefFrameCToCpp::Wrap(frame),
CefString(extensionName));
// Return type: bool
return _retval;
}
// CONSTRUCTOR - Do not edit by hand.
CefPermissionHandlerCppToC::CefPermissionHandlerCppToC(
CefPermissionHandler* cls)
: CefCppToC<CefPermissionHandlerCppToC, CefPermissionHandler,
cef_permission_handler_t>(cls) {
struct_.struct_.on_before_script_extension_load =
permission_handler_on_before_script_extension_load;
}
#ifndef NDEBUG
template<> long CefCppToC<CefPermissionHandlerCppToC, CefPermissionHandler,
cef_permission_handler_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,41 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_PERMISSION_HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_PERMISSION_HANDLER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef_permission_handler.h"
#include "include/capi/cef_permission_handler_capi.h"
#include "include/cef_browser.h"
#include "include/capi/cef_browser_capi.h"
#include "include/cef_frame.h"
#include "include/capi/cef_frame_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefPermissionHandlerCppToC
: public CefCppToC<CefPermissionHandlerCppToC, CefPermissionHandler,
cef_permission_handler_t> {
public:
explicit CefPermissionHandlerCppToC(CefPermissionHandler* cls);
virtual ~CefPermissionHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_PERMISSION_HANDLER_CPPTOC_H_

View File

@ -0,0 +1,148 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/post_data_cpptoc.h"
#include "libcef_dll/cpptoc/post_data_element_cpptoc.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT cef_post_data_t* cef_post_data_create() {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
CefRefPtr<CefPostData> _retval = CefPostData::CreatePostData();
// Return type: refptr_same
return CefPostDataCppToC::Wrap(_retval);
}
// MEMBER FUNCTIONS - Body may be edited by hand.
size_t CEF_CALLBACK post_data_get_element_count(struct _cef_post_data_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
size_t _retval = CefPostDataCppToC::Get(self)->GetElementCount();
// Return type: simple
return _retval;
}
void CEF_CALLBACK post_data_get_elements(struct _cef_post_data_t* self,
size_t* elementsCount, struct _cef_post_data_element_t** elements) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: elements; type: refptr_vec_same_byref
DCHECK(elementsCount && (*elementsCount == 0 || elements));
if (!elementsCount || (*elementsCount > 0 && !elements))
return;
// Translate param: elements; type: refptr_vec_same_byref
std::vector<CefRefPtr<CefPostDataElement> > elementsList;
if (elementsCount && *elementsCount > 0 && elements) {
for (size_t i = 0; i < *elementsCount; ++i) {
elementsList.push_back(CefPostDataElementCppToC::Unwrap(elements[i]));
}
}
// Execute
CefPostDataCppToC::Get(self)->GetElements(
elementsList);
// Restore param: elements; type: refptr_vec_same_byref
if (elementsCount && elements) {
*elementsCount = std::min(elementsList.size(), *elementsCount);
if (*elementsCount > 0) {
for (size_t i = 0; i < *elementsCount; ++i) {
elements[i] = CefPostDataElementCppToC::Wrap(elementsList[i]);
}
}
}
}
int CEF_CALLBACK post_data_remove_element(struct _cef_post_data_t* self,
struct _cef_post_data_element_t* element) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: element; type: refptr_same
DCHECK(element);
if (!element)
return 0;
// Execute
bool _retval = CefPostDataCppToC::Get(self)->RemoveElement(
CefPostDataElementCppToC::Unwrap(element));
// Return type: bool
return _retval;
}
int CEF_CALLBACK post_data_add_element(struct _cef_post_data_t* self,
struct _cef_post_data_element_t* element) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: element; type: refptr_same
DCHECK(element);
if (!element)
return 0;
// Execute
bool _retval = CefPostDataCppToC::Get(self)->AddElement(
CefPostDataElementCppToC::Unwrap(element));
// Return type: bool
return _retval;
}
void CEF_CALLBACK post_data_remove_elements(struct _cef_post_data_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefPostDataCppToC::Get(self)->RemoveElements();
}
// CONSTRUCTOR - Do not edit by hand.
CefPostDataCppToC::CefPostDataCppToC(CefPostData* cls)
: CefCppToC<CefPostDataCppToC, CefPostData, cef_post_data_t>(cls) {
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;
}
#ifndef NDEBUG
template<> long CefCppToC<CefPostDataCppToC, CefPostData,
cef_post_data_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,36 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_POST_DATA_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_POST_DATA_CPPTOC_H_
#pragma once
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef_request.h"
#include "include/capi/cef_request_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefPostDataCppToC
: public CefCppToC<CefPostDataCppToC, CefPostData, cef_post_data_t> {
public:
explicit CefPostDataCppToC(CefPostData* cls);
virtual ~CefPostDataCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_POST_DATA_CPPTOC_H_

View File

@ -0,0 +1,165 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/post_data_element_cpptoc.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT cef_post_data_element_t* cef_post_data_element_create() {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
CefRefPtr<CefPostDataElement> _retval =
CefPostDataElement::CreatePostDataElement();
// Return type: refptr_same
return CefPostDataElementCppToC::Wrap(_retval);
}
// MEMBER FUNCTIONS - Body may be edited by hand.
void CEF_CALLBACK post_data_element_set_to_empty(
struct _cef_post_data_element_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefPostDataElementCppToC::Get(self)->SetToEmpty();
}
void CEF_CALLBACK post_data_element_set_to_file(
struct _cef_post_data_element_t* self, const cef_string_t* fileName) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: fileName; type: string_byref_const
DCHECK(fileName);
if (!fileName)
return;
// Execute
CefPostDataElementCppToC::Get(self)->SetToFile(
CefString(fileName));
}
void CEF_CALLBACK post_data_element_set_to_bytes(
struct _cef_post_data_element_t* self, size_t size, const void* bytes) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: bytes; type: simple_byaddr
DCHECK(bytes);
if (!bytes)
return;
// Execute
CefPostDataElementCppToC::Get(self)->SetToBytes(
size,
bytes);
}
enum cef_postdataelement_type_t CEF_CALLBACK post_data_element_get_type(
struct _cef_post_data_element_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return PDE_TYPE_EMPTY;
// Execute
cef_postdataelement_type_t _retval = CefPostDataElementCppToC::Get(
self)->GetType();
// Return type: simple
return _retval;
}
cef_string_userfree_t CEF_CALLBACK post_data_element_get_file(
struct _cef_post_data_element_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefPostDataElementCppToC::Get(self)->GetFile();
// Return type: string
return _retval.DetachToUserFree();
}
size_t CEF_CALLBACK post_data_element_get_bytes_count(
struct _cef_post_data_element_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
size_t _retval = CefPostDataElementCppToC::Get(self)->GetBytesCount();
// Return type: simple
return _retval;
}
size_t CEF_CALLBACK post_data_element_get_bytes(
struct _cef_post_data_element_t* self, size_t size, void* bytes) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: bytes; type: simple_byaddr
DCHECK(bytes);
if (!bytes)
return 0;
// Execute
size_t _retval = CefPostDataElementCppToC::Get(self)->GetBytes(
size,
bytes);
// Return type: simple
return _retval;
}
// CONSTRUCTOR - Do not edit by hand.
CefPostDataElementCppToC::CefPostDataElementCppToC(CefPostDataElement* cls)
: CefCppToC<CefPostDataElementCppToC, CefPostDataElement,
cef_post_data_element_t>(cls) {
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;
}
#ifndef NDEBUG
template<> long CefCppToC<CefPostDataElementCppToC, CefPostDataElement,
cef_post_data_element_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,37 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_POST_DATA_ELEMENT_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_POST_DATA_ELEMENT_CPPTOC_H_
#pragma once
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef_request.h"
#include "include/capi/cef_request_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefPostDataElementCppToC
: public CefCppToC<CefPostDataElementCppToC, CefPostDataElement,
cef_post_data_element_t> {
public:
explicit CefPostDataElementCppToC(CefPostDataElement* cls);
virtual ~CefPostDataElementCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_POST_DATA_ELEMENT_CPPTOC_H_

View File

@ -0,0 +1,132 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/list_value_cpptoc.h"
#include "libcef_dll/cpptoc/process_message_cpptoc.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT cef_process_message_t* cef_process_message_create(
const cef_string_t* name) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: name; type: string_byref_const
DCHECK(name);
if (!name)
return NULL;
// Execute
CefRefPtr<CefProcessMessage> _retval = CefProcessMessage::Create(
CefString(name));
// Return type: refptr_same
return CefProcessMessageCppToC::Wrap(_retval);
}
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK process_message_is_valid(struct _cef_process_message_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefProcessMessageCppToC::Get(self)->IsValid();
// Return type: bool
return _retval;
}
int CEF_CALLBACK process_message_is_read_only(
struct _cef_process_message_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefProcessMessageCppToC::Get(self)->IsReadOnly();
// Return type: bool
return _retval;
}
struct _cef_process_message_t* CEF_CALLBACK process_message_copy(
struct _cef_process_message_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefProcessMessage> _retval = CefProcessMessageCppToC::Get(
self)->Copy();
// Return type: refptr_same
return CefProcessMessageCppToC::Wrap(_retval);
}
cef_string_userfree_t CEF_CALLBACK process_message_get_name(
struct _cef_process_message_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefProcessMessageCppToC::Get(self)->GetName();
// Return type: string
return _retval.DetachToUserFree();
}
struct _cef_list_value_t* CEF_CALLBACK process_message_get_argument_list(
struct _cef_process_message_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefListValue> _retval = CefProcessMessageCppToC::Get(
self)->GetArgumentList();
// Return type: refptr_same
return CefListValueCppToC::Wrap(_retval);
}
// CONSTRUCTOR - Do not edit by hand.
CefProcessMessageCppToC::CefProcessMessageCppToC(CefProcessMessage* cls)
: CefCppToC<CefProcessMessageCppToC, CefProcessMessage,
cef_process_message_t>(cls) {
struct_.struct_.is_valid = process_message_is_valid;
struct_.struct_.is_read_only = process_message_is_read_only;
struct_.struct_.copy = process_message_copy;
struct_.struct_.get_name = process_message_get_name;
struct_.struct_.get_argument_list = process_message_get_argument_list;
}
#ifndef NDEBUG
template<> long CefCppToC<CefProcessMessageCppToC, CefProcessMessage,
cef_process_message_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,37 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_PROCESS_MESSAGE_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_PROCESS_MESSAGE_CPPTOC_H_
#pragma once
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef_process_message.h"
#include "include/capi/cef_process_message_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefProcessMessageCppToC
: public CefCppToC<CefProcessMessageCppToC, CefProcessMessage,
cef_process_message_t> {
public:
explicit CefProcessMessageCppToC(CefProcessMessage* cls);
virtual ~CefProcessMessageCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_PROCESS_MESSAGE_CPPTOC_H_

View File

@ -0,0 +1,63 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/proxy_handler_cpptoc.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
void CEF_CALLBACK proxy_handler_get_proxy_for_url(
struct _cef_proxy_handler_t* self, const cef_string_t* url,
struct _cef_proxy_info_t* proxy_info) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: url; type: string_byref_const
DCHECK(url);
if (!url)
return;
// Verify param: proxy_info; type: struct_byref
DCHECK(proxy_info);
if (!proxy_info)
return;
// Translate param: proxy_info; type: struct_byref
CefProxyInfo proxy_infoObj;
if (proxy_info)
proxy_infoObj.AttachTo(*proxy_info);
// Execute
CefProxyHandlerCppToC::Get(self)->GetProxyForUrl(
CefString(url),
proxy_infoObj);
// Restore param: proxy_info; type: struct_byref
if (proxy_info)
proxy_infoObj.DetachTo(*proxy_info);
}
// CONSTRUCTOR - Do not edit by hand.
CefProxyHandlerCppToC::CefProxyHandlerCppToC(CefProxyHandler* cls)
: CefCppToC<CefProxyHandlerCppToC, CefProxyHandler, cef_proxy_handler_t>(
cls) {
struct_.struct_.get_proxy_for_url = proxy_handler_get_proxy_for_url;
}
#ifndef NDEBUG
template<> long CefCppToC<CefProxyHandlerCppToC, CefProxyHandler,
cef_proxy_handler_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,37 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_PROXY_HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_PROXY_HANDLER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef_proxy_handler.h"
#include "include/capi/cef_proxy_handler_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefProxyHandlerCppToC
: public CefCppToC<CefProxyHandlerCppToC, CefProxyHandler,
cef_proxy_handler_t> {
public:
explicit CefProxyHandlerCppToC(CefProxyHandler* cls);
virtual ~CefProxyHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_PROXY_HANDLER_CPPTOC_H_

View File

@ -0,0 +1,100 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/read_handler_cpptoc.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
size_t CEF_CALLBACK read_handler_read(struct _cef_read_handler_t* self,
void* ptr, size_t size, size_t n) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: ptr; type: simple_byaddr
DCHECK(ptr);
if (!ptr)
return 0;
// Execute
size_t _retval = CefReadHandlerCppToC::Get(self)->Read(
ptr,
size,
n);
// Return type: simple
return _retval;
}
int CEF_CALLBACK read_handler_seek(struct _cef_read_handler_t* self,
int64 offset, int whence) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefReadHandlerCppToC::Get(self)->Seek(
offset,
whence);
// Return type: simple
return _retval;
}
int64 CEF_CALLBACK read_handler_tell(struct _cef_read_handler_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int64 _retval = CefReadHandlerCppToC::Get(self)->Tell();
// Return type: simple
return _retval;
}
int CEF_CALLBACK read_handler_eof(struct _cef_read_handler_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefReadHandlerCppToC::Get(self)->Eof();
// Return type: simple
return _retval;
}
// CONSTRUCTOR - Do not edit by hand.
CefReadHandlerCppToC::CefReadHandlerCppToC(CefReadHandler* cls)
: CefCppToC<CefReadHandlerCppToC, CefReadHandler, cef_read_handler_t>(cls) {
struct_.struct_.read = read_handler_read;
struct_.struct_.seek = read_handler_seek;
struct_.struct_.tell = read_handler_tell;
struct_.struct_.eof = read_handler_eof;
}
#ifndef NDEBUG
template<> long CefCppToC<CefReadHandlerCppToC, CefReadHandler,
cef_read_handler_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,37 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_READ_HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_READ_HANDLER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef_stream.h"
#include "include/capi/cef_stream_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefReadHandlerCppToC
: public CefCppToC<CefReadHandlerCppToC, CefReadHandler,
cef_read_handler_t> {
public:
explicit CefReadHandlerCppToC(CefReadHandler* cls);
virtual ~CefReadHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_READ_HANDLER_CPPTOC_H_

View File

@ -0,0 +1,191 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/render_process_handler_cpptoc.h"
#include "libcef_dll/ctocpp/browser_ctocpp.h"
#include "libcef_dll/ctocpp/frame_ctocpp.h"
#include "libcef_dll/ctocpp/process_message_ctocpp.h"
#include "libcef_dll/ctocpp/v8context_ctocpp.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
void CEF_CALLBACK render_process_handler_on_render_thread_created(
struct _cef_render_process_handler_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefRenderProcessHandlerCppToC::Get(self)->OnRenderThreadCreated();
}
void CEF_CALLBACK render_process_handler_on_web_kit_initialized(
struct _cef_render_process_handler_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefRenderProcessHandlerCppToC::Get(self)->OnWebKitInitialized();
}
void CEF_CALLBACK render_process_handler_on_browser_created(
struct _cef_render_process_handler_t* self, cef_browser_t* browser) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return;
// Execute
CefRenderProcessHandlerCppToC::Get(self)->OnBrowserCreated(
CefBrowserCToCpp::Wrap(browser));
}
void CEF_CALLBACK render_process_handler_on_browser_destroyed(
struct _cef_render_process_handler_t* self, cef_browser_t* browser) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return;
// Execute
CefRenderProcessHandlerCppToC::Get(self)->OnBrowserDestroyed(
CefBrowserCToCpp::Wrap(browser));
}
void CEF_CALLBACK render_process_handler_on_context_created(
struct _cef_render_process_handler_t* self, cef_browser_t* browser,
cef_frame_t* frame, struct _cef_v8context_t* context) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return;
// Verify param: frame; type: refptr_diff
DCHECK(frame);
if (!frame)
return;
// Verify param: context; type: refptr_diff
DCHECK(context);
if (!context)
return;
// Execute
CefRenderProcessHandlerCppToC::Get(self)->OnContextCreated(
CefBrowserCToCpp::Wrap(browser),
CefFrameCToCpp::Wrap(frame),
CefV8ContextCToCpp::Wrap(context));
}
void CEF_CALLBACK render_process_handler_on_context_released(
struct _cef_render_process_handler_t* self, cef_browser_t* browser,
cef_frame_t* frame, struct _cef_v8context_t* context) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return;
// Verify param: frame; type: refptr_diff
DCHECK(frame);
if (!frame)
return;
// Verify param: context; type: refptr_diff
DCHECK(context);
if (!context)
return;
// Execute
CefRenderProcessHandlerCppToC::Get(self)->OnContextReleased(
CefBrowserCToCpp::Wrap(browser),
CefFrameCToCpp::Wrap(frame),
CefV8ContextCToCpp::Wrap(context));
}
int CEF_CALLBACK render_process_handler_on_process_message_recieved(
struct _cef_render_process_handler_t* self, cef_browser_t* browser,
enum cef_process_id_t source_process, cef_process_message_t* message) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return 0;
// Verify param: message; type: refptr_diff
DCHECK(message);
if (!message)
return 0;
// Execute
bool _retval = CefRenderProcessHandlerCppToC::Get(
self)->OnProcessMessageRecieved(
CefBrowserCToCpp::Wrap(browser),
source_process,
CefProcessMessageCToCpp::Wrap(message));
// Return type: bool
return _retval;
}
// CONSTRUCTOR - Do not edit by hand.
CefRenderProcessHandlerCppToC::CefRenderProcessHandlerCppToC(
CefRenderProcessHandler* cls)
: CefCppToC<CefRenderProcessHandlerCppToC, CefRenderProcessHandler,
cef_render_process_handler_t>(cls) {
struct_.struct_.on_render_thread_created =
render_process_handler_on_render_thread_created;
struct_.struct_.on_web_kit_initialized =
render_process_handler_on_web_kit_initialized;
struct_.struct_.on_browser_created =
render_process_handler_on_browser_created;
struct_.struct_.on_browser_destroyed =
render_process_handler_on_browser_destroyed;
struct_.struct_.on_context_created =
render_process_handler_on_context_created;
struct_.struct_.on_context_released =
render_process_handler_on_context_released;
struct_.struct_.on_process_message_recieved =
render_process_handler_on_process_message_recieved;
}
#ifndef NDEBUG
template<> long CefCppToC<CefRenderProcessHandlerCppToC,
CefRenderProcessHandler, cef_render_process_handler_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,37 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_RENDER_PROCESS_HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_RENDER_PROCESS_HANDLER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef_render_process_handler.h"
#include "include/capi/cef_render_process_handler_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefRenderProcessHandlerCppToC
: public CefCppToC<CefRenderProcessHandlerCppToC, CefRenderProcessHandler,
cef_render_process_handler_t> {
public:
explicit CefRenderProcessHandlerCppToC(CefRenderProcessHandler* cls);
virtual ~CefRenderProcessHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_RENDER_PROCESS_HANDLER_CPPTOC_H_

View File

@ -0,0 +1,295 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/post_data_cpptoc.h"
#include "libcef_dll/cpptoc/request_cpptoc.h"
#include "libcef_dll/transfer_util.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT cef_request_t* cef_request_create() {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
CefRefPtr<CefRequest> _retval = CefRequest::CreateRequest();
// Return type: refptr_same
return CefRequestCppToC::Wrap(_retval);
}
// MEMBER FUNCTIONS - Body may be edited by hand.
cef_string_userfree_t CEF_CALLBACK request_get_url(
struct _cef_request_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefRequestCppToC::Get(self)->GetURL();
// Return type: string
return _retval.DetachToUserFree();
}
void CEF_CALLBACK request_set_url(struct _cef_request_t* self,
const cef_string_t* url) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: url; type: string_byref_const
DCHECK(url);
if (!url)
return;
// Execute
CefRequestCppToC::Get(self)->SetURL(
CefString(url));
}
cef_string_userfree_t CEF_CALLBACK request_get_method(
struct _cef_request_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefRequestCppToC::Get(self)->GetMethod();
// Return type: string
return _retval.DetachToUserFree();
}
void CEF_CALLBACK request_set_method(struct _cef_request_t* self,
const cef_string_t* method) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: method; type: string_byref_const
DCHECK(method);
if (!method)
return;
// Execute
CefRequestCppToC::Get(self)->SetMethod(
CefString(method));
}
struct _cef_post_data_t* CEF_CALLBACK request_get_post_data(
struct _cef_request_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefPostData> _retval = CefRequestCppToC::Get(self)->GetPostData();
// Return type: refptr_same
return CefPostDataCppToC::Wrap(_retval);
}
void CEF_CALLBACK request_set_post_data(struct _cef_request_t* self,
struct _cef_post_data_t* postData) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: postData; type: refptr_same
DCHECK(postData);
if (!postData)
return;
// Execute
CefRequestCppToC::Get(self)->SetPostData(
CefPostDataCppToC::Unwrap(postData));
}
void CEF_CALLBACK request_get_header_map(struct _cef_request_t* self,
cef_string_multimap_t headerMap) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: headerMap; type: string_map_multi_byref
DCHECK(headerMap);
if (!headerMap)
return;
// Translate param: headerMap; type: string_map_multi_byref
std::multimap<CefString, CefString> headerMapMultimap;
transfer_string_multimap_contents(headerMap, headerMapMultimap);
// Execute
CefRequestCppToC::Get(self)->GetHeaderMap(
headerMapMultimap);
// Restore param: headerMap; type: string_map_multi_byref
cef_string_multimap_clear(headerMap);
transfer_string_multimap_contents(headerMapMultimap, headerMap);
}
void CEF_CALLBACK request_set_header_map(struct _cef_request_t* self,
cef_string_multimap_t headerMap) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: headerMap; type: string_map_multi_byref_const
DCHECK(headerMap);
if (!headerMap)
return;
// Translate param: headerMap; type: string_map_multi_byref_const
std::multimap<CefString, CefString> headerMapMultimap;
transfer_string_multimap_contents(headerMap, headerMapMultimap);
// Execute
CefRequestCppToC::Get(self)->SetHeaderMap(
headerMapMultimap);
}
void CEF_CALLBACK request_set(struct _cef_request_t* self,
const cef_string_t* url, const cef_string_t* method,
struct _cef_post_data_t* postData, cef_string_multimap_t headerMap) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: url; type: string_byref_const
DCHECK(url);
if (!url)
return;
// Verify param: method; type: string_byref_const
DCHECK(method);
if (!method)
return;
// Verify param: headerMap; type: string_map_multi_byref_const
DCHECK(headerMap);
if (!headerMap)
return;
// Unverified params: postData
// Translate param: headerMap; type: string_map_multi_byref_const
std::multimap<CefString, CefString> headerMapMultimap;
transfer_string_multimap_contents(headerMap, headerMapMultimap);
// Execute
CefRequestCppToC::Get(self)->Set(
CefString(url),
CefString(method),
CefPostDataCppToC::Unwrap(postData),
headerMapMultimap);
}
enum cef_weburlrequest_flags_t CEF_CALLBACK request_get_flags(
struct _cef_request_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return WUR_FLAG_NONE;
// Execute
cef_weburlrequest_flags_t _retval = CefRequestCppToC::Get(self)->GetFlags();
// Return type: simple
return _retval;
}
void CEF_CALLBACK request_set_flags(struct _cef_request_t* self,
enum cef_weburlrequest_flags_t flags) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefRequestCppToC::Get(self)->SetFlags(
flags);
}
cef_string_userfree_t CEF_CALLBACK request_get_first_party_for_cookies(
struct _cef_request_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefRequestCppToC::Get(self)->GetFirstPartyForCookies();
// Return type: string
return _retval.DetachToUserFree();
}
void CEF_CALLBACK request_set_first_party_for_cookies(
struct _cef_request_t* self, const cef_string_t* url) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: url; type: string_byref_const
DCHECK(url);
if (!url)
return;
// Execute
CefRequestCppToC::Get(self)->SetFirstPartyForCookies(
CefString(url));
}
// CONSTRUCTOR - Do not edit by hand.
CefRequestCppToC::CefRequestCppToC(CefRequest* cls)
: CefCppToC<CefRequestCppToC, CefRequest, cef_request_t>(cls) {
struct_.struct_.get_url = request_get_url;
struct_.struct_.set_url = request_set_url;
struct_.struct_.get_method = request_get_method;
struct_.struct_.set_method = request_set_method;
struct_.struct_.get_post_data = request_get_post_data;
struct_.struct_.set_post_data = request_set_post_data;
struct_.struct_.get_header_map = request_get_header_map;
struct_.struct_.set_header_map = request_set_header_map;
struct_.struct_.set = request_set;
struct_.struct_.get_flags = request_get_flags;
struct_.struct_.set_flags = request_set_flags;
struct_.struct_.get_first_party_for_cookies =
request_get_first_party_for_cookies;
struct_.struct_.set_first_party_for_cookies =
request_set_first_party_for_cookies;
}
#ifndef NDEBUG
template<> long CefCppToC<CefRequestCppToC, CefRequest,
cef_request_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,36 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_REQUEST_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_REQUEST_CPPTOC_H_
#pragma once
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef_request.h"
#include "include/capi/cef_request_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefRequestCppToC
: public CefCppToC<CefRequestCppToC, CefRequest, cef_request_t> {
public:
explicit CefRequestCppToC(CefRequest* cls);
virtual ~CefRequestCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_REQUEST_CPPTOC_H_

View File

@ -0,0 +1,215 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/request_handler_cpptoc.h"
#include "libcef_dll/cpptoc/resource_handler_cpptoc.h"
#include "libcef_dll/ctocpp/auth_callback_ctocpp.h"
#include "libcef_dll/ctocpp/browser_ctocpp.h"
#include "libcef_dll/ctocpp/cookie_manager_ctocpp.h"
#include "libcef_dll/ctocpp/frame_ctocpp.h"
#include "libcef_dll/ctocpp/request_ctocpp.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK request_handler_on_before_resource_load(
struct _cef_request_handler_t* self, cef_browser_t* browser,
cef_frame_t* frame, cef_request_t* request) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return 0;
// Verify param: frame; type: refptr_diff
DCHECK(frame);
if (!frame)
return 0;
// Verify param: request; type: refptr_diff
DCHECK(request);
if (!request)
return 0;
// Execute
bool _retval = CefRequestHandlerCppToC::Get(self)->OnBeforeResourceLoad(
CefBrowserCToCpp::Wrap(browser),
CefFrameCToCpp::Wrap(frame),
CefRequestCToCpp::Wrap(request));
// Return type: bool
return _retval;
}
struct _cef_resource_handler_t* CEF_CALLBACK request_handler_get_resource_handler(
struct _cef_request_handler_t* self, cef_browser_t* browser,
cef_frame_t* frame, cef_request_t* request) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return NULL;
// Verify param: frame; type: refptr_diff
DCHECK(frame);
if (!frame)
return NULL;
// Verify param: request; type: refptr_diff
DCHECK(request);
if (!request)
return NULL;
// Execute
CefRefPtr<CefResourceHandler> _retval = CefRequestHandlerCppToC::Get(
self)->GetResourceHandler(
CefBrowserCToCpp::Wrap(browser),
CefFrameCToCpp::Wrap(frame),
CefRequestCToCpp::Wrap(request));
// Return type: refptr_same
return CefResourceHandlerCppToC::Wrap(_retval);
}
void CEF_CALLBACK request_handler_on_resource_redirect(
struct _cef_request_handler_t* self, cef_browser_t* browser,
cef_frame_t* frame, const cef_string_t* old_url, cef_string_t* new_url) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return;
// Verify param: frame; type: refptr_diff
DCHECK(frame);
if (!frame)
return;
// Verify param: old_url; type: string_byref_const
DCHECK(old_url);
if (!old_url)
return;
// Verify param: new_url; type: string_byref
DCHECK(new_url);
if (!new_url)
return;
// Translate param: new_url; type: string_byref
CefString new_urlStr(new_url);
// Execute
CefRequestHandlerCppToC::Get(self)->OnResourceRedirect(
CefBrowserCToCpp::Wrap(browser),
CefFrameCToCpp::Wrap(frame),
CefString(old_url),
new_urlStr);
}
int CEF_CALLBACK request_handler_get_auth_credentials(
struct _cef_request_handler_t* self, cef_browser_t* browser,
cef_frame_t* frame, int isProxy, const cef_string_t* host, int port,
const cef_string_t* realm, const cef_string_t* scheme,
cef_auth_callback_t* callback) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return 0;
// Verify param: frame; type: refptr_diff
DCHECK(frame);
if (!frame)
return 0;
// Verify param: host; type: string_byref_const
DCHECK(host);
if (!host)
return 0;
// Verify param: scheme; type: string_byref_const
DCHECK(scheme);
if (!scheme)
return 0;
// Verify param: callback; type: refptr_diff
DCHECK(callback);
if (!callback)
return 0;
// Unverified params: realm
// Execute
bool _retval = CefRequestHandlerCppToC::Get(self)->GetAuthCredentials(
CefBrowserCToCpp::Wrap(browser),
CefFrameCToCpp::Wrap(frame),
isProxy?true:false,
CefString(host),
port,
CefString(realm),
CefString(scheme),
CefAuthCallbackCToCpp::Wrap(callback));
// Return type: bool
return _retval;
}
cef_cookie_manager_t* CEF_CALLBACK request_handler_get_cookie_manager(
struct _cef_request_handler_t* self, cef_browser_t* browser,
const cef_string_t* main_url) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return NULL;
// Verify param: main_url; type: string_byref_const
DCHECK(main_url);
if (!main_url)
return NULL;
// Execute
CefRefPtr<CefCookieManager> _retval = CefRequestHandlerCppToC::Get(
self)->GetCookieManager(
CefBrowserCToCpp::Wrap(browser),
CefString(main_url));
// Return type: refptr_diff
return CefCookieManagerCToCpp::Unwrap(_retval);
}
// CONSTRUCTOR - Do not edit by hand.
CefRequestHandlerCppToC::CefRequestHandlerCppToC(CefRequestHandler* cls)
: CefCppToC<CefRequestHandlerCppToC, CefRequestHandler,
cef_request_handler_t>(cls) {
struct_.struct_.on_before_resource_load =
request_handler_on_before_resource_load;
struct_.struct_.get_resource_handler = request_handler_get_resource_handler;
struct_.struct_.on_resource_redirect = request_handler_on_resource_redirect;
struct_.struct_.get_auth_credentials = request_handler_get_auth_credentials;
struct_.struct_.get_cookie_manager = request_handler_get_cookie_manager;
}
#ifndef NDEBUG
template<> long CefCppToC<CefRequestHandlerCppToC, CefRequestHandler,
cef_request_handler_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,37 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_REQUEST_HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_REQUEST_HANDLER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef_request_handler.h"
#include "include/capi/cef_request_handler_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefRequestHandlerCppToC
: public CefCppToC<CefRequestHandlerCppToC, CefRequestHandler,
cef_request_handler_t> {
public:
explicit CefRequestHandlerCppToC(CefRequestHandler* cls);
virtual ~CefRequestHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_REQUEST_HANDLER_CPPTOC_H_

View File

@ -0,0 +1,98 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK resource_bundle_handler_get_localized_string(
struct _cef_resource_bundle_handler_t* self, int message_id,
cef_string_t* string) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: string; type: string_byref
DCHECK(string);
if (!string)
return 0;
// Translate param: string; type: string_byref
CefString stringStr(string);
// Execute
bool _retval = CefResourceBundleHandlerCppToC::Get(self)->GetLocalizedString(
message_id,
stringStr);
// Return type: bool
return _retval;
}
int CEF_CALLBACK resource_bundle_handler_get_data_resource(
struct _cef_resource_bundle_handler_t* self, int resource_id, void** data,
size_t* data_size) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: data; type: simple_byref
DCHECK(data);
if (!data)
return 0;
// Verify param: data_size; type: simple_byref
DCHECK(data_size);
if (!data_size)
return 0;
// Translate param: data; type: simple_byref
void* dataVal = data?*data:NULL;
// Translate param: data_size; type: simple_byref
size_t data_sizeVal = data_size?*data_size:0;
// Execute
bool _retval = CefResourceBundleHandlerCppToC::Get(self)->GetDataResource(
resource_id,
dataVal,
data_sizeVal);
// Restore param: data; type: simple_byref
if (data)
*data = dataVal;
// Restore param: data_size; type: simple_byref
if (data_size)
*data_size = data_sizeVal;
// Return type: bool
return _retval;
}
// CONSTRUCTOR - Do not edit by hand.
CefResourceBundleHandlerCppToC::CefResourceBundleHandlerCppToC(
CefResourceBundleHandler* cls)
: CefCppToC<CefResourceBundleHandlerCppToC, CefResourceBundleHandler,
cef_resource_bundle_handler_t>(cls) {
struct_.struct_.get_localized_string =
resource_bundle_handler_get_localized_string;
struct_.struct_.get_data_resource = resource_bundle_handler_get_data_resource;
}
#ifndef NDEBUG
template<> long CefCppToC<CefResourceBundleHandlerCppToC,
CefResourceBundleHandler, cef_resource_bundle_handler_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,37 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_RESOURCE_BUNDLE_HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_RESOURCE_BUNDLE_HANDLER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef_resource_bundle_handler.h"
#include "include/capi/cef_resource_bundle_handler_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefResourceBundleHandlerCppToC
: public CefCppToC<CefResourceBundleHandlerCppToC, CefResourceBundleHandler,
cef_resource_bundle_handler_t> {
public:
explicit CefResourceBundleHandlerCppToC(CefResourceBundleHandler* cls);
virtual ~CefResourceBundleHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_RESOURCE_BUNDLE_HANDLER_CPPTOC_H_

View File

@ -0,0 +1,151 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/resource_handler_cpptoc.h"
#include "libcef_dll/ctocpp/callback_ctocpp.h"
#include "libcef_dll/ctocpp/request_ctocpp.h"
#include "libcef_dll/ctocpp/response_ctocpp.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK resource_handler_process_request(
struct _cef_resource_handler_t* self, cef_request_t* request,
cef_callback_t* callback) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: request; type: refptr_diff
DCHECK(request);
if (!request)
return 0;
// Verify param: callback; type: refptr_diff
DCHECK(callback);
if (!callback)
return 0;
// Execute
bool _retval = CefResourceHandlerCppToC::Get(self)->ProcessRequest(
CefRequestCToCpp::Wrap(request),
CefCallbackCToCpp::Wrap(callback));
// Return type: bool
return _retval;
}
void CEF_CALLBACK resource_handler_get_response_headers(
struct _cef_resource_handler_t* self, struct _cef_response_t* response,
int64* response_length, cef_string_t* redirectUrl) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: response; type: refptr_diff
DCHECK(response);
if (!response)
return;
// Verify param: response_length; type: simple_byref
DCHECK(response_length);
if (!response_length)
return;
// Verify param: redirectUrl; type: string_byref
DCHECK(redirectUrl);
if (!redirectUrl)
return;
// Translate param: response_length; type: simple_byref
int64 response_lengthVal = response_length?*response_length:0;
// Translate param: redirectUrl; type: string_byref
CefString redirectUrlStr(redirectUrl);
// Execute
CefResourceHandlerCppToC::Get(self)->GetResponseHeaders(
CefResponseCToCpp::Wrap(response),
response_lengthVal,
redirectUrlStr);
// Restore param: response_length; type: simple_byref
if (response_length)
*response_length = response_lengthVal;
}
int CEF_CALLBACK resource_handler_read_response(
struct _cef_resource_handler_t* self, void* data_out, int bytes_to_read,
int* bytes_read, cef_callback_t* callback) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: data_out; type: simple_byaddr
DCHECK(data_out);
if (!data_out)
return 0;
// Verify param: bytes_read; type: simple_byref
DCHECK(bytes_read);
if (!bytes_read)
return 0;
// Verify param: callback; type: refptr_diff
DCHECK(callback);
if (!callback)
return 0;
// Translate param: bytes_read; type: simple_byref
int bytes_readVal = bytes_read?*bytes_read:0;
// Execute
bool _retval = CefResourceHandlerCppToC::Get(self)->ReadResponse(
data_out,
bytes_to_read,
bytes_readVal,
CefCallbackCToCpp::Wrap(callback));
// Restore param: bytes_read; type: simple_byref
if (bytes_read)
*bytes_read = bytes_readVal;
// Return type: bool
return _retval;
}
void CEF_CALLBACK resource_handler_cancel(
struct _cef_resource_handler_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefResourceHandlerCppToC::Get(self)->Cancel();
}
// CONSTRUCTOR - Do not edit by hand.
CefResourceHandlerCppToC::CefResourceHandlerCppToC(CefResourceHandler* cls)
: CefCppToC<CefResourceHandlerCppToC, CefResourceHandler,
cef_resource_handler_t>(cls) {
struct_.struct_.process_request = resource_handler_process_request;
struct_.struct_.get_response_headers = resource_handler_get_response_headers;
struct_.struct_.read_response = resource_handler_read_response;
struct_.struct_.cancel = resource_handler_cancel;
}
#ifndef NDEBUG
template<> long CefCppToC<CefResourceHandlerCppToC, CefResourceHandler,
cef_resource_handler_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,37 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_RESOURCE_HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_RESOURCE_HANDLER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef_resource_handler.h"
#include "include/capi/cef_resource_handler_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefResourceHandlerCppToC
: public CefCppToC<CefResourceHandlerCppToC, CefResourceHandler,
cef_resource_handler_t> {
public:
explicit CefResourceHandlerCppToC(CefResourceHandler* cls);
virtual ~CefResourceHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_RESOURCE_HANDLER_CPPTOC_H_

View File

@ -0,0 +1,196 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/response_cpptoc.h"
#include "libcef_dll/transfer_util.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK response_get_status(struct _cef_response_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefResponseCppToC::Get(self)->GetStatus();
// Return type: simple
return _retval;
}
void CEF_CALLBACK response_set_status(struct _cef_response_t* self,
int status) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefResponseCppToC::Get(self)->SetStatus(
status);
}
cef_string_userfree_t CEF_CALLBACK response_get_status_text(
struct _cef_response_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefResponseCppToC::Get(self)->GetStatusText();
// Return type: string
return _retval.DetachToUserFree();
}
void CEF_CALLBACK response_set_status_text(struct _cef_response_t* self,
const cef_string_t* statusText) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: statusText; type: string_byref_const
DCHECK(statusText);
if (!statusText)
return;
// Execute
CefResponseCppToC::Get(self)->SetStatusText(
CefString(statusText));
}
cef_string_userfree_t CEF_CALLBACK response_get_mime_type(
struct _cef_response_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefResponseCppToC::Get(self)->GetMimeType();
// Return type: string
return _retval.DetachToUserFree();
}
void CEF_CALLBACK response_set_mime_type(struct _cef_response_t* self,
const cef_string_t* mimeType) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: mimeType; type: string_byref_const
DCHECK(mimeType);
if (!mimeType)
return;
// Execute
CefResponseCppToC::Get(self)->SetMimeType(
CefString(mimeType));
}
cef_string_userfree_t CEF_CALLBACK response_get_header(
struct _cef_response_t* self, const cef_string_t* name) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: name; type: string_byref_const
DCHECK(name);
if (!name)
return NULL;
// Execute
CefString _retval = CefResponseCppToC::Get(self)->GetHeader(
CefString(name));
// Return type: string
return _retval.DetachToUserFree();
}
void CEF_CALLBACK response_get_header_map(struct _cef_response_t* self,
cef_string_multimap_t headerMap) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: headerMap; type: string_map_multi_byref
DCHECK(headerMap);
if (!headerMap)
return;
// Translate param: headerMap; type: string_map_multi_byref
std::multimap<CefString, CefString> headerMapMultimap;
transfer_string_multimap_contents(headerMap, headerMapMultimap);
// Execute
CefResponseCppToC::Get(self)->GetHeaderMap(
headerMapMultimap);
// Restore param: headerMap; type: string_map_multi_byref
cef_string_multimap_clear(headerMap);
transfer_string_multimap_contents(headerMapMultimap, headerMap);
}
void CEF_CALLBACK response_set_header_map(struct _cef_response_t* self,
cef_string_multimap_t headerMap) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: headerMap; type: string_map_multi_byref_const
DCHECK(headerMap);
if (!headerMap)
return;
// Translate param: headerMap; type: string_map_multi_byref_const
std::multimap<CefString, CefString> headerMapMultimap;
transfer_string_multimap_contents(headerMap, headerMapMultimap);
// Execute
CefResponseCppToC::Get(self)->SetHeaderMap(
headerMapMultimap);
}
// CONSTRUCTOR - Do not edit by hand.
CefResponseCppToC::CefResponseCppToC(CefResponse* cls)
: CefCppToC<CefResponseCppToC, CefResponse, cef_response_t>(cls) {
struct_.struct_.get_status = response_get_status;
struct_.struct_.set_status = response_set_status;
struct_.struct_.get_status_text = response_get_status_text;
struct_.struct_.set_status_text = response_set_status_text;
struct_.struct_.get_mime_type = response_get_mime_type;
struct_.struct_.set_mime_type = response_set_mime_type;
struct_.struct_.get_header = response_get_header;
struct_.struct_.get_header_map = response_get_header_map;
struct_.struct_.set_header_map = response_set_header_map;
}
#ifndef NDEBUG
template<> long CefCppToC<CefResponseCppToC, CefResponse,
cef_response_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,36 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_RESPONSE_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_RESPONSE_CPPTOC_H_
#pragma once
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef_response.h"
#include "include/capi/cef_response_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefResponseCppToC
: public CefCppToC<CefResponseCppToC, CefResponse, cef_response_t> {
public:
explicit CefResponseCppToC(CefResponse* cls);
virtual ~CefResponseCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_RESPONSE_CPPTOC_H_

View File

@ -0,0 +1,74 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/resource_handler_cpptoc.h"
#include "libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h"
#include "libcef_dll/ctocpp/browser_ctocpp.h"
#include "libcef_dll/ctocpp/frame_ctocpp.h"
#include "libcef_dll/ctocpp/request_ctocpp.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
cef_resource_handler_t* CEF_CALLBACK scheme_handler_factory_create(
struct _cef_scheme_handler_factory_t* self, cef_browser_t* browser,
cef_frame_t* frame, const cef_string_t* scheme_name,
cef_request_t* request) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return NULL;
// Verify param: frame; type: refptr_diff
DCHECK(frame);
if (!frame)
return NULL;
// Verify param: scheme_name; type: string_byref_const
DCHECK(scheme_name);
if (!scheme_name)
return NULL;
// Verify param: request; type: refptr_diff
DCHECK(request);
if (!request)
return NULL;
// Execute
CefRefPtr<CefResourceHandler> _retval = CefSchemeHandlerFactoryCppToC::Get(
self)->Create(
CefBrowserCToCpp::Wrap(browser),
CefFrameCToCpp::Wrap(frame),
CefString(scheme_name),
CefRequestCToCpp::Wrap(request));
// Return type: refptr_same
return CefResourceHandlerCppToC::Wrap(_retval);
}
// CONSTRUCTOR - Do not edit by hand.
CefSchemeHandlerFactoryCppToC::CefSchemeHandlerFactoryCppToC(
CefSchemeHandlerFactory* cls)
: CefCppToC<CefSchemeHandlerFactoryCppToC, CefSchemeHandlerFactory,
cef_scheme_handler_factory_t>(cls) {
struct_.struct_.create = scheme_handler_factory_create;
}
#ifndef NDEBUG
template<> long CefCppToC<CefSchemeHandlerFactoryCppToC,
CefSchemeHandlerFactory, cef_scheme_handler_factory_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,37 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_SCHEME_HANDLER_FACTORY_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_SCHEME_HANDLER_FACTORY_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef_scheme.h"
#include "include/capi/cef_scheme_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefSchemeHandlerFactoryCppToC
: public CefCppToC<CefSchemeHandlerFactoryCppToC, CefSchemeHandlerFactory,
cef_scheme_handler_factory_t> {
public:
explicit CefSchemeHandlerFactoryCppToC(CefSchemeHandlerFactory* cls);
virtual ~CefSchemeHandlerFactoryCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_SCHEME_HANDLER_FACTORY_CPPTOC_H_

View File

@ -0,0 +1,157 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/stream_reader_cpptoc.h"
#include "libcef_dll/ctocpp/read_handler_ctocpp.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_file(
const cef_string_t* fileName) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: fileName; type: string_byref_const
DCHECK(fileName);
if (!fileName)
return NULL;
// Execute
CefRefPtr<CefStreamReader> _retval = CefStreamReader::CreateForFile(
CefString(fileName));
// Return type: refptr_same
return CefStreamReaderCppToC::Wrap(_retval);
}
CEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_data(void* data,
size_t size) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: data; type: simple_byaddr
DCHECK(data);
if (!data)
return NULL;
// Execute
CefRefPtr<CefStreamReader> _retval = CefStreamReader::CreateForData(
data,
size);
// Return type: refptr_same
return CefStreamReaderCppToC::Wrap(_retval);
}
CEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_handler(
cef_read_handler_t* handler) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: handler; type: refptr_diff
DCHECK(handler);
if (!handler)
return NULL;
// Execute
CefRefPtr<CefStreamReader> _retval = CefStreamReader::CreateForHandler(
CefReadHandlerCToCpp::Wrap(handler));
// Return type: refptr_same
return CefStreamReaderCppToC::Wrap(_retval);
}
// MEMBER FUNCTIONS - Body may be edited by hand.
size_t CEF_CALLBACK stream_reader_read(struct _cef_stream_reader_t* self,
void* ptr, size_t size, size_t n) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: ptr; type: simple_byaddr
DCHECK(ptr);
if (!ptr)
return 0;
// Execute
size_t _retval = CefStreamReaderCppToC::Get(self)->Read(
ptr,
size,
n);
// Return type: simple
return _retval;
}
int CEF_CALLBACK stream_reader_seek(struct _cef_stream_reader_t* self,
int64 offset, int whence) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefStreamReaderCppToC::Get(self)->Seek(
offset,
whence);
// Return type: simple
return _retval;
}
int64 CEF_CALLBACK stream_reader_tell(struct _cef_stream_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int64 _retval = CefStreamReaderCppToC::Get(self)->Tell();
// Return type: simple
return _retval;
}
int CEF_CALLBACK stream_reader_eof(struct _cef_stream_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefStreamReaderCppToC::Get(self)->Eof();
// Return type: simple
return _retval;
}
// CONSTRUCTOR - Do not edit by hand.
CefStreamReaderCppToC::CefStreamReaderCppToC(CefStreamReader* cls)
: CefCppToC<CefStreamReaderCppToC, CefStreamReader, cef_stream_reader_t>(
cls) {
struct_.struct_.read = stream_reader_read;
struct_.struct_.seek = stream_reader_seek;
struct_.struct_.tell = stream_reader_tell;
struct_.struct_.eof = stream_reader_eof;
}
#ifndef NDEBUG
template<> long CefCppToC<CefStreamReaderCppToC, CefStreamReader,
cef_stream_reader_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,37 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_STREAM_READER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_STREAM_READER_CPPTOC_H_
#pragma once
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef_stream.h"
#include "include/capi/cef_stream_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefStreamReaderCppToC
: public CefCppToC<CefStreamReaderCppToC, CefStreamReader,
cef_stream_reader_t> {
public:
explicit CefStreamReaderCppToC(CefStreamReader* cls);
virtual ~CefStreamReaderCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_STREAM_READER_CPPTOC_H_

View File

@ -0,0 +1,139 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/stream_writer_cpptoc.h"
#include "libcef_dll/ctocpp/write_handler_ctocpp.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT cef_stream_writer_t* cef_stream_writer_create_for_file(
const cef_string_t* fileName) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: fileName; type: string_byref_const
DCHECK(fileName);
if (!fileName)
return NULL;
// Execute
CefRefPtr<CefStreamWriter> _retval = CefStreamWriter::CreateForFile(
CefString(fileName));
// Return type: refptr_same
return CefStreamWriterCppToC::Wrap(_retval);
}
CEF_EXPORT cef_stream_writer_t* cef_stream_writer_create_for_handler(
cef_write_handler_t* handler) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: handler; type: refptr_diff
DCHECK(handler);
if (!handler)
return NULL;
// Execute
CefRefPtr<CefStreamWriter> _retval = CefStreamWriter::CreateForHandler(
CefWriteHandlerCToCpp::Wrap(handler));
// Return type: refptr_same
return CefStreamWriterCppToC::Wrap(_retval);
}
// MEMBER FUNCTIONS - Body may be edited by hand.
size_t CEF_CALLBACK stream_writer_write(struct _cef_stream_writer_t* self,
const void* ptr, size_t size, size_t n) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: ptr; type: simple_byaddr
DCHECK(ptr);
if (!ptr)
return 0;
// Execute
size_t _retval = CefStreamWriterCppToC::Get(self)->Write(
ptr,
size,
n);
// Return type: simple
return _retval;
}
int CEF_CALLBACK stream_writer_seek(struct _cef_stream_writer_t* self,
int64 offset, int whence) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefStreamWriterCppToC::Get(self)->Seek(
offset,
whence);
// Return type: simple
return _retval;
}
int64 CEF_CALLBACK stream_writer_tell(struct _cef_stream_writer_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int64 _retval = CefStreamWriterCppToC::Get(self)->Tell();
// Return type: simple
return _retval;
}
int CEF_CALLBACK stream_writer_flush(struct _cef_stream_writer_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefStreamWriterCppToC::Get(self)->Flush();
// Return type: simple
return _retval;
}
// CONSTRUCTOR - Do not edit by hand.
CefStreamWriterCppToC::CefStreamWriterCppToC(CefStreamWriter* cls)
: CefCppToC<CefStreamWriterCppToC, CefStreamWriter, cef_stream_writer_t>(
cls) {
struct_.struct_.write = stream_writer_write;
struct_.struct_.seek = stream_writer_seek;
struct_.struct_.tell = stream_writer_tell;
struct_.struct_.flush = stream_writer_flush;
}
#ifndef NDEBUG
template<> long CefCppToC<CefStreamWriterCppToC, CefStreamWriter,
cef_stream_writer_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,37 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_STREAM_WRITER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_STREAM_WRITER_CPPTOC_H_
#pragma once
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef_stream.h"
#include "include/capi/cef_stream_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefStreamWriterCppToC
: public CefCppToC<CefStreamWriterCppToC, CefStreamWriter,
cef_stream_writer_t> {
public:
explicit CefStreamWriterCppToC(CefStreamWriter* cls);
virtual ~CefStreamWriterCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_STREAM_WRITER_CPPTOC_H_

View File

@ -0,0 +1,48 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/string_visitor_cpptoc.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
void CEF_CALLBACK string_visitor_visit(struct _cef_string_visitor_t* self,
const cef_string_t* string) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: string; type: string_byref_const
DCHECK(string);
if (!string)
return;
// Execute
CefStringVisitorCppToC::Get(self)->Visit(
CefString(string));
}
// CONSTRUCTOR - Do not edit by hand.
CefStringVisitorCppToC::CefStringVisitorCppToC(CefStringVisitor* cls)
: CefCppToC<CefStringVisitorCppToC, CefStringVisitor, cef_string_visitor_t>(
cls) {
struct_.struct_.visit = string_visitor_visit;
}
#ifndef NDEBUG
template<> long CefCppToC<CefStringVisitorCppToC, CefStringVisitor,
cef_string_visitor_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,37 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_STRING_VISITOR_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_STRING_VISITOR_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef_string_visitor.h"
#include "include/capi/cef_string_visitor_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefStringVisitorCppToC
: public CefCppToC<CefStringVisitorCppToC, CefStringVisitor,
cef_string_visitor_t> {
public:
explicit CefStringVisitorCppToC(CefStringVisitor* cls);
virtual ~CefStringVisitorCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_STRING_VISITOR_CPPTOC_H_

View File

@ -0,0 +1,42 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/task_cpptoc.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
void CEF_CALLBACK task_execute(struct _cef_task_t* self,
cef_thread_id_t threadId) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefTaskCppToC::Get(self)->Execute(
threadId);
}
// CONSTRUCTOR - Do not edit by hand.
CefTaskCppToC::CefTaskCppToC(CefTask* cls)
: CefCppToC<CefTaskCppToC, CefTask, cef_task_t>(cls) {
struct_.struct_.execute = task_execute;
}
#ifndef NDEBUG
template<> long CefCppToC<CefTaskCppToC, CefTask, cef_task_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,36 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_TASK_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_TASK_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef_task.h"
#include "include/capi/cef_task_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefTaskCppToC
: public CefCppToC<CefTaskCppToC, CefTask, cef_task_t> {
public:
explicit CefTaskCppToC(CefTask* cls);
virtual ~CefTaskCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_TASK_CPPTOC_H_

View File

@ -0,0 +1,126 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/v8accessor_cpptoc.h"
#include "libcef_dll/ctocpp/v8value_ctocpp.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK v8accessor_get(struct _cef_v8accessor_t* self,
const cef_string_t* name, struct _cef_v8value_t* object,
struct _cef_v8value_t** retval, cef_string_t* exception) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: name; type: string_byref_const
DCHECK(name);
if (!name)
return 0;
// Verify param: object; type: refptr_diff
DCHECK(object);
if (!object)
return 0;
// Verify param: retval; type: refptr_diff_byref
DCHECK(retval);
if (!retval)
return 0;
// Verify param: exception; type: string_byref
DCHECK(exception);
if (!exception)
return 0;
// Translate param: retval; type: refptr_diff_byref
CefRefPtr<CefV8Value> retvalPtr;
if (retval && *retval)
retvalPtr = CefV8ValueCToCpp::Wrap(*retval);
CefV8Value* retvalOrig = retvalPtr.get();
// Translate param: exception; type: string_byref
CefString exceptionStr(exception);
// Execute
bool _retval = CefV8AccessorCppToC::Get(self)->Get(
CefString(name),
CefV8ValueCToCpp::Wrap(object),
retvalPtr,
exceptionStr);
// Restore param: retval; type: refptr_diff_byref
if (retval) {
if (retvalPtr.get()) {
if (retvalPtr.get() != retvalOrig) {
*retval = CefV8ValueCToCpp::Unwrap(retvalPtr);
}
} else {
*retval = NULL;
}
}
// Return type: bool
return _retval;
}
int CEF_CALLBACK v8accessor_set(struct _cef_v8accessor_t* self,
const cef_string_t* name, struct _cef_v8value_t* object,
struct _cef_v8value_t* value, cef_string_t* exception) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: name; type: string_byref_const
DCHECK(name);
if (!name)
return 0;
// Verify param: object; type: refptr_diff
DCHECK(object);
if (!object)
return 0;
// Verify param: value; type: refptr_diff
DCHECK(value);
if (!value)
return 0;
// Verify param: exception; type: string_byref
DCHECK(exception);
if (!exception)
return 0;
// Translate param: exception; type: string_byref
CefString exceptionStr(exception);
// Execute
bool _retval = CefV8AccessorCppToC::Get(self)->Set(
CefString(name),
CefV8ValueCToCpp::Wrap(object),
CefV8ValueCToCpp::Wrap(value),
exceptionStr);
// Return type: bool
return _retval;
}
// CONSTRUCTOR - Do not edit by hand.
CefV8AccessorCppToC::CefV8AccessorCppToC(CefV8Accessor* cls)
: CefCppToC<CefV8AccessorCppToC, CefV8Accessor, cef_v8accessor_t>(cls) {
struct_.struct_.get = v8accessor_get;
struct_.struct_.set = v8accessor_set;
}
#ifndef NDEBUG
template<> long CefCppToC<CefV8AccessorCppToC, CefV8Accessor,
cef_v8accessor_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,36 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_V8ACCESSOR_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_V8ACCESSOR_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef_v8.h"
#include "include/capi/cef_v8_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefV8AccessorCppToC
: public CefCppToC<CefV8AccessorCppToC, CefV8Accessor, cef_v8accessor_t> {
public:
explicit CefV8AccessorCppToC(CefV8Accessor* cls);
virtual ~CefV8AccessorCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_V8ACCESSOR_CPPTOC_H_

View File

@ -0,0 +1,228 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/browser_cpptoc.h"
#include "libcef_dll/cpptoc/frame_cpptoc.h"
#include "libcef_dll/cpptoc/v8context_cpptoc.h"
#include "libcef_dll/cpptoc/v8exception_cpptoc.h"
#include "libcef_dll/cpptoc/v8value_cpptoc.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT cef_v8context_t* cef_v8context_get_current_context() {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
CefRefPtr<CefV8Context> _retval = CefV8Context::GetCurrentContext();
// Return type: refptr_same
return CefV8ContextCppToC::Wrap(_retval);
}
CEF_EXPORT cef_v8context_t* cef_v8context_get_entered_context() {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
CefRefPtr<CefV8Context> _retval = CefV8Context::GetEnteredContext();
// Return type: refptr_same
return CefV8ContextCppToC::Wrap(_retval);
}
CEF_EXPORT int cef_v8context_in_context() {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
bool _retval = CefV8Context::InContext();
// Return type: bool
return _retval;
}
// MEMBER FUNCTIONS - Body may be edited by hand.
cef_browser_t* CEF_CALLBACK v8context_get_browser(
struct _cef_v8context_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefBrowser> _retval = CefV8ContextCppToC::Get(self)->GetBrowser();
// Return type: refptr_same
return CefBrowserCppToC::Wrap(_retval);
}
cef_frame_t* CEF_CALLBACK v8context_get_frame(struct _cef_v8context_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefFrame> _retval = CefV8ContextCppToC::Get(self)->GetFrame();
// Return type: refptr_same
return CefFrameCppToC::Wrap(_retval);
}
struct _cef_v8value_t* CEF_CALLBACK v8context_get_global(
struct _cef_v8context_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefV8Value> _retval = CefV8ContextCppToC::Get(self)->GetGlobal();
// Return type: refptr_same
return CefV8ValueCppToC::Wrap(_retval);
}
int CEF_CALLBACK v8context_enter(struct _cef_v8context_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefV8ContextCppToC::Get(self)->Enter();
// Return type: bool
return _retval;
}
int CEF_CALLBACK v8context_exit(struct _cef_v8context_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefV8ContextCppToC::Get(self)->Exit();
// Return type: bool
return _retval;
}
int CEF_CALLBACK v8context_is_same(struct _cef_v8context_t* self,
struct _cef_v8context_t* that) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: that; type: refptr_same
DCHECK(that);
if (!that)
return 0;
// Execute
bool _retval = CefV8ContextCppToC::Get(self)->IsSame(
CefV8ContextCppToC::Unwrap(that));
// Return type: bool
return _retval;
}
int CEF_CALLBACK v8context_eval(struct _cef_v8context_t* self,
const cef_string_t* code, struct _cef_v8value_t** retval,
struct _cef_v8exception_t** exception) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: code; type: string_byref_const
DCHECK(code);
if (!code)
return 0;
// Verify param: retval; type: refptr_same_byref
DCHECK(retval);
if (!retval)
return 0;
// Verify param: exception; type: refptr_same_byref
DCHECK(exception);
if (!exception)
return 0;
// Translate param: retval; type: refptr_same_byref
CefRefPtr<CefV8Value> retvalPtr;
if (retval && *retval)
retvalPtr = CefV8ValueCppToC::Unwrap(*retval);
CefV8Value* retvalOrig = retvalPtr.get();
// Translate param: exception; type: refptr_same_byref
CefRefPtr<CefV8Exception> exceptionPtr;
if (exception && *exception)
exceptionPtr = CefV8ExceptionCppToC::Unwrap(*exception);
CefV8Exception* exceptionOrig = exceptionPtr.get();
// Execute
bool _retval = CefV8ContextCppToC::Get(self)->Eval(
CefString(code),
retvalPtr,
exceptionPtr);
// Restore param: retval; type: refptr_same_byref
if (retval) {
if (retvalPtr.get()) {
if (retvalPtr.get() != retvalOrig) {
*retval = CefV8ValueCppToC::Wrap(retvalPtr);
}
} else {
*retval = NULL;
}
}
// Restore param: exception; type: refptr_same_byref
if (exception) {
if (exceptionPtr.get()) {
if (exceptionPtr.get() != exceptionOrig) {
*exception = CefV8ExceptionCppToC::Wrap(exceptionPtr);
}
} else {
*exception = NULL;
}
}
// Return type: bool
return _retval;
}
// CONSTRUCTOR - Do not edit by hand.
CefV8ContextCppToC::CefV8ContextCppToC(CefV8Context* cls)
: CefCppToC<CefV8ContextCppToC, CefV8Context, cef_v8context_t>(cls) {
struct_.struct_.get_browser = v8context_get_browser;
struct_.struct_.get_frame = v8context_get_frame;
struct_.struct_.get_global = v8context_get_global;
struct_.struct_.enter = v8context_enter;
struct_.struct_.exit = v8context_exit;
struct_.struct_.is_same = v8context_is_same;
struct_.struct_.eval = v8context_eval;
}
#ifndef NDEBUG
template<> long CefCppToC<CefV8ContextCppToC, CefV8Context,
cef_v8context_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,36 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_V8CONTEXT_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_V8CONTEXT_CPPTOC_H_
#pragma once
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef_v8.h"
#include "include/capi/cef_v8_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefV8ContextCppToC
: public CefCppToC<CefV8ContextCppToC, CefV8Context, cef_v8context_t> {
public:
explicit CefV8ContextCppToC(CefV8Context* cls);
virtual ~CefV8ContextCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_V8CONTEXT_CPPTOC_H_

View File

@ -0,0 +1,154 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/v8exception_cpptoc.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
cef_string_userfree_t CEF_CALLBACK v8exception_get_message(
struct _cef_v8exception_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefV8ExceptionCppToC::Get(self)->GetMessage();
// Return type: string
return _retval.DetachToUserFree();
}
cef_string_userfree_t CEF_CALLBACK v8exception_get_source_line(
struct _cef_v8exception_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefV8ExceptionCppToC::Get(self)->GetSourceLine();
// Return type: string
return _retval.DetachToUserFree();
}
cef_string_userfree_t CEF_CALLBACK v8exception_get_script_resource_name(
struct _cef_v8exception_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefV8ExceptionCppToC::Get(self)->GetScriptResourceName();
// Return type: string
return _retval.DetachToUserFree();
}
int CEF_CALLBACK v8exception_get_line_number(struct _cef_v8exception_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefV8ExceptionCppToC::Get(self)->GetLineNumber();
// Return type: simple
return _retval;
}
int CEF_CALLBACK v8exception_get_start_position(
struct _cef_v8exception_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefV8ExceptionCppToC::Get(self)->GetStartPosition();
// Return type: simple
return _retval;
}
int CEF_CALLBACK v8exception_get_end_position(struct _cef_v8exception_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefV8ExceptionCppToC::Get(self)->GetEndPosition();
// Return type: simple
return _retval;
}
int CEF_CALLBACK v8exception_get_start_column(struct _cef_v8exception_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefV8ExceptionCppToC::Get(self)->GetStartColumn();
// Return type: simple
return _retval;
}
int CEF_CALLBACK v8exception_get_end_column(struct _cef_v8exception_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefV8ExceptionCppToC::Get(self)->GetEndColumn();
// Return type: simple
return _retval;
}
// CONSTRUCTOR - Do not edit by hand.
CefV8ExceptionCppToC::CefV8ExceptionCppToC(CefV8Exception* cls)
: CefCppToC<CefV8ExceptionCppToC, CefV8Exception, cef_v8exception_t>(cls) {
struct_.struct_.get_message = v8exception_get_message;
struct_.struct_.get_source_line = v8exception_get_source_line;
struct_.struct_.get_script_resource_name =
v8exception_get_script_resource_name;
struct_.struct_.get_line_number = v8exception_get_line_number;
struct_.struct_.get_start_position = v8exception_get_start_position;
struct_.struct_.get_end_position = v8exception_get_end_position;
struct_.struct_.get_start_column = v8exception_get_start_column;
struct_.struct_.get_end_column = v8exception_get_end_column;
}
#ifndef NDEBUG
template<> long CefCppToC<CefV8ExceptionCppToC, CefV8Exception,
cef_v8exception_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,37 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_V8EXCEPTION_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_V8EXCEPTION_CPPTOC_H_
#pragma once
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef_v8.h"
#include "include/capi/cef_v8_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefV8ExceptionCppToC
: public CefCppToC<CefV8ExceptionCppToC, CefV8Exception,
cef_v8exception_t> {
public:
explicit CefV8ExceptionCppToC(CefV8Exception* cls);
virtual ~CefV8ExceptionCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_V8EXCEPTION_CPPTOC_H_

View File

@ -0,0 +1,99 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/v8handler_cpptoc.h"
#include "libcef_dll/ctocpp/v8value_ctocpp.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK v8handler_execute(struct _cef_v8handler_t* self,
const cef_string_t* name, struct _cef_v8value_t* object,
size_t argumentsCount, struct _cef_v8value_t* const* arguments,
struct _cef_v8value_t** retval, cef_string_t* exception) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: name; type: string_byref_const
DCHECK(name);
if (!name)
return 0;
// Verify param: object; type: refptr_diff
DCHECK(object);
if (!object)
return 0;
// Verify param: arguments; type: refptr_vec_diff_byref_const
DCHECK(argumentsCount == 0 || arguments);
if (argumentsCount > 0 && !arguments)
return 0;
// Verify param: retval; type: refptr_diff_byref
DCHECK(retval);
if (!retval)
return 0;
// Verify param: exception; type: string_byref
DCHECK(exception);
if (!exception)
return 0;
// Translate param: arguments; type: refptr_vec_diff_byref_const
std::vector<CefRefPtr<CefV8Value> > argumentsList;
if (argumentsCount > 0) {
for (size_t i = 0; i < argumentsCount; ++i) {
argumentsList.push_back(CefV8ValueCToCpp::Wrap(arguments[i]));
}
}
// Translate param: retval; type: refptr_diff_byref
CefRefPtr<CefV8Value> retvalPtr;
if (retval && *retval)
retvalPtr = CefV8ValueCToCpp::Wrap(*retval);
CefV8Value* retvalOrig = retvalPtr.get();
// Translate param: exception; type: string_byref
CefString exceptionStr(exception);
// Execute
bool _retval = CefV8HandlerCppToC::Get(self)->Execute(
CefString(name),
CefV8ValueCToCpp::Wrap(object),
argumentsList,
retvalPtr,
exceptionStr);
// Restore param: retval; type: refptr_diff_byref
if (retval) {
if (retvalPtr.get()) {
if (retvalPtr.get() != retvalOrig) {
*retval = CefV8ValueCToCpp::Unwrap(retvalPtr);
}
} else {
*retval = NULL;
}
}
// Return type: bool
return _retval;
}
// CONSTRUCTOR - Do not edit by hand.
CefV8HandlerCppToC::CefV8HandlerCppToC(CefV8Handler* cls)
: CefCppToC<CefV8HandlerCppToC, CefV8Handler, cef_v8handler_t>(cls) {
struct_.struct_.execute = v8handler_execute;
}
#ifndef NDEBUG
template<> long CefCppToC<CefV8HandlerCppToC, CefV8Handler,
cef_v8handler_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,36 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_V8HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_V8HANDLER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef_v8.h"
#include "include/capi/cef_v8_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefV8HandlerCppToC
: public CefCppToC<CefV8HandlerCppToC, CefV8Handler, cef_v8handler_t> {
public:
explicit CefV8HandlerCppToC(CefV8Handler* cls);
virtual ~CefV8HandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_V8HANDLER_CPPTOC_H_

View File

@ -0,0 +1,973 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/v8context_cpptoc.h"
#include "libcef_dll/cpptoc/v8exception_cpptoc.h"
#include "libcef_dll/cpptoc/v8value_cpptoc.h"
#include "libcef_dll/ctocpp/base_ctocpp.h"
#include "libcef_dll/ctocpp/v8accessor_ctocpp.h"
#include "libcef_dll/ctocpp/v8handler_ctocpp.h"
#include "libcef_dll/transfer_util.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT cef_v8value_t* cef_v8value_create_undefined() {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
CefRefPtr<CefV8Value> _retval = CefV8Value::CreateUndefined();
// Return type: refptr_same
return CefV8ValueCppToC::Wrap(_retval);
}
CEF_EXPORT cef_v8value_t* cef_v8value_create_null() {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
CefRefPtr<CefV8Value> _retval = CefV8Value::CreateNull();
// Return type: refptr_same
return CefV8ValueCppToC::Wrap(_retval);
}
CEF_EXPORT cef_v8value_t* cef_v8value_create_bool(int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
CefRefPtr<CefV8Value> _retval = CefV8Value::CreateBool(
value?true:false);
// Return type: refptr_same
return CefV8ValueCppToC::Wrap(_retval);
}
CEF_EXPORT cef_v8value_t* cef_v8value_create_int(int32 value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
CefRefPtr<CefV8Value> _retval = CefV8Value::CreateInt(
value);
// Return type: refptr_same
return CefV8ValueCppToC::Wrap(_retval);
}
CEF_EXPORT cef_v8value_t* cef_v8value_create_uint(uint32 value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
CefRefPtr<CefV8Value> _retval = CefV8Value::CreateUInt(
value);
// Return type: refptr_same
return CefV8ValueCppToC::Wrap(_retval);
}
CEF_EXPORT cef_v8value_t* cef_v8value_create_double(double value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
CefRefPtr<CefV8Value> _retval = CefV8Value::CreateDouble(
value);
// Return type: refptr_same
return CefV8ValueCppToC::Wrap(_retval);
}
CEF_EXPORT cef_v8value_t* cef_v8value_create_date(const cef_time_t* date) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: date; type: simple_byref_const
DCHECK(date);
if (!date)
return NULL;
// Translate param: date; type: simple_byref_const
CefTime dateVal = date?*date:CefTime();
// Execute
CefRefPtr<CefV8Value> _retval = CefV8Value::CreateDate(
dateVal);
// Return type: refptr_same
return CefV8ValueCppToC::Wrap(_retval);
}
CEF_EXPORT cef_v8value_t* cef_v8value_create_string(const cef_string_t* value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Unverified params: value
// Execute
CefRefPtr<CefV8Value> _retval = CefV8Value::CreateString(
CefString(value));
// Return type: refptr_same
return CefV8ValueCppToC::Wrap(_retval);
}
CEF_EXPORT cef_v8value_t* cef_v8value_create_object(
cef_v8accessor_t* accessor) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Unverified params: accessor
// Execute
CefRefPtr<CefV8Value> _retval = CefV8Value::CreateObject(
CefV8AccessorCToCpp::Wrap(accessor));
// Return type: refptr_same
return CefV8ValueCppToC::Wrap(_retval);
}
CEF_EXPORT cef_v8value_t* cef_v8value_create_array(int length) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
CefRefPtr<CefV8Value> _retval = CefV8Value::CreateArray(
length);
// Return type: refptr_same
return CefV8ValueCppToC::Wrap(_retval);
}
CEF_EXPORT cef_v8value_t* cef_v8value_create_function(const cef_string_t* name,
cef_v8handler_t* handler) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: name; type: string_byref_const
DCHECK(name);
if (!name)
return NULL;
// Verify param: handler; type: refptr_diff
DCHECK(handler);
if (!handler)
return NULL;
// Execute
CefRefPtr<CefV8Value> _retval = CefV8Value::CreateFunction(
CefString(name),
CefV8HandlerCToCpp::Wrap(handler));
// Return type: refptr_same
return CefV8ValueCppToC::Wrap(_retval);
}
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK v8value_is_undefined(struct _cef_v8value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefV8ValueCppToC::Get(self)->IsUndefined();
// Return type: bool
return _retval;
}
int CEF_CALLBACK v8value_is_null(struct _cef_v8value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefV8ValueCppToC::Get(self)->IsNull();
// Return type: bool
return _retval;
}
int CEF_CALLBACK v8value_is_bool(struct _cef_v8value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefV8ValueCppToC::Get(self)->IsBool();
// Return type: bool
return _retval;
}
int CEF_CALLBACK v8value_is_int(struct _cef_v8value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefV8ValueCppToC::Get(self)->IsInt();
// Return type: bool
return _retval;
}
int CEF_CALLBACK v8value_is_uint(struct _cef_v8value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefV8ValueCppToC::Get(self)->IsUInt();
// Return type: bool
return _retval;
}
int CEF_CALLBACK v8value_is_double(struct _cef_v8value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefV8ValueCppToC::Get(self)->IsDouble();
// Return type: bool
return _retval;
}
int CEF_CALLBACK v8value_is_date(struct _cef_v8value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefV8ValueCppToC::Get(self)->IsDate();
// Return type: bool
return _retval;
}
int CEF_CALLBACK v8value_is_string(struct _cef_v8value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefV8ValueCppToC::Get(self)->IsString();
// Return type: bool
return _retval;
}
int CEF_CALLBACK v8value_is_object(struct _cef_v8value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefV8ValueCppToC::Get(self)->IsObject();
// Return type: bool
return _retval;
}
int CEF_CALLBACK v8value_is_array(struct _cef_v8value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefV8ValueCppToC::Get(self)->IsArray();
// Return type: bool
return _retval;
}
int CEF_CALLBACK v8value_is_function(struct _cef_v8value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefV8ValueCppToC::Get(self)->IsFunction();
// Return type: bool
return _retval;
}
int CEF_CALLBACK v8value_is_same(struct _cef_v8value_t* self,
struct _cef_v8value_t* that) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: that; type: refptr_same
DCHECK(that);
if (!that)
return 0;
// Execute
bool _retval = CefV8ValueCppToC::Get(self)->IsSame(
CefV8ValueCppToC::Unwrap(that));
// Return type: bool
return _retval;
}
int CEF_CALLBACK v8value_get_bool_value(struct _cef_v8value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefV8ValueCppToC::Get(self)->GetBoolValue();
// Return type: bool
return _retval;
}
int32 CEF_CALLBACK v8value_get_int_value(struct _cef_v8value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int32 _retval = CefV8ValueCppToC::Get(self)->GetIntValue();
// Return type: simple
return _retval;
}
uint32 CEF_CALLBACK v8value_get_uint_value(struct _cef_v8value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
uint32 _retval = CefV8ValueCppToC::Get(self)->GetUIntValue();
// Return type: simple
return _retval;
}
double CEF_CALLBACK v8value_get_double_value(struct _cef_v8value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
double _retval = CefV8ValueCppToC::Get(self)->GetDoubleValue();
// Return type: simple
return _retval;
}
cef_time_t CEF_CALLBACK v8value_get_date_value(struct _cef_v8value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return CefTime();
// Execute
cef_time_t _retval = CefV8ValueCppToC::Get(self)->GetDateValue();
// Return type: simple
return _retval;
}
cef_string_userfree_t CEF_CALLBACK v8value_get_string_value(
struct _cef_v8value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefV8ValueCppToC::Get(self)->GetStringValue();
// Return type: string
return _retval.DetachToUserFree();
}
int CEF_CALLBACK v8value_is_user_created(struct _cef_v8value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefV8ValueCppToC::Get(self)->IsUserCreated();
// Return type: bool
return _retval;
}
int CEF_CALLBACK v8value_has_exception(struct _cef_v8value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefV8ValueCppToC::Get(self)->HasException();
// Return type: bool
return _retval;
}
cef_v8exception_t* CEF_CALLBACK v8value_get_exception(
struct _cef_v8value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefV8Exception> _retval = CefV8ValueCppToC::Get(self)->GetException(
);
// Return type: refptr_same
return CefV8ExceptionCppToC::Wrap(_retval);
}
int CEF_CALLBACK v8value_clear_exception(struct _cef_v8value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefV8ValueCppToC::Get(self)->ClearException();
// Return type: bool
return _retval;
}
int CEF_CALLBACK v8value_will_rethrow_exceptions(struct _cef_v8value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefV8ValueCppToC::Get(self)->WillRethrowExceptions();
// Return type: bool
return _retval;
}
int CEF_CALLBACK v8value_set_rethrow_exceptions(struct _cef_v8value_t* self,
int rethrow) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefV8ValueCppToC::Get(self)->SetRethrowExceptions(
rethrow?true:false);
// Return type: bool
return _retval;
}
int CEF_CALLBACK v8value_has_value_bykey(struct _cef_v8value_t* self,
const cef_string_t* key) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: key; type: string_byref_const
DCHECK(key);
if (!key)
return 0;
// Execute
bool _retval = CefV8ValueCppToC::Get(self)->HasValue(
CefString(key));
// Return type: bool
return _retval;
}
int CEF_CALLBACK v8value_has_value_byindex(struct _cef_v8value_t* self,
int index) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: index; type: simple_byval
DCHECK_GE(index, 0);
if (index < 0)
return 0;
// Execute
bool _retval = CefV8ValueCppToC::Get(self)->HasValue(
index);
// Return type: bool
return _retval;
}
int CEF_CALLBACK v8value_delete_value_bykey(struct _cef_v8value_t* self,
const cef_string_t* key) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: key; type: string_byref_const
DCHECK(key);
if (!key)
return 0;
// Execute
bool _retval = CefV8ValueCppToC::Get(self)->DeleteValue(
CefString(key));
// Return type: bool
return _retval;
}
int CEF_CALLBACK v8value_delete_value_byindex(struct _cef_v8value_t* self,
int index) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: index; type: simple_byval
DCHECK_GE(index, 0);
if (index < 0)
return 0;
// Execute
bool _retval = CefV8ValueCppToC::Get(self)->DeleteValue(
index);
// Return type: bool
return _retval;
}
struct _cef_v8value_t* CEF_CALLBACK v8value_get_value_bykey(
struct _cef_v8value_t* self, const cef_string_t* key) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: key; type: string_byref_const
DCHECK(key);
if (!key)
return NULL;
// Execute
CefRefPtr<CefV8Value> _retval = CefV8ValueCppToC::Get(self)->GetValue(
CefString(key));
// Return type: refptr_same
return CefV8ValueCppToC::Wrap(_retval);
}
struct _cef_v8value_t* CEF_CALLBACK v8value_get_value_byindex(
struct _cef_v8value_t* self, int index) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: index; type: simple_byval
DCHECK_GE(index, 0);
if (index < 0)
return NULL;
// Execute
CefRefPtr<CefV8Value> _retval = CefV8ValueCppToC::Get(self)->GetValue(
index);
// Return type: refptr_same
return CefV8ValueCppToC::Wrap(_retval);
}
int CEF_CALLBACK v8value_set_value_bykey(struct _cef_v8value_t* self,
const cef_string_t* key, struct _cef_v8value_t* value,
enum cef_v8_propertyattribute_t attribute) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: key; type: string_byref_const
DCHECK(key);
if (!key)
return 0;
// Verify param: value; type: refptr_same
DCHECK(value);
if (!value)
return 0;
// Execute
bool _retval = CefV8ValueCppToC::Get(self)->SetValue(
CefString(key),
CefV8ValueCppToC::Unwrap(value),
attribute);
// Return type: bool
return _retval;
}
int CEF_CALLBACK v8value_set_value_byindex(struct _cef_v8value_t* self,
int index, struct _cef_v8value_t* value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: index; type: simple_byval
DCHECK_GE(index, 0);
if (index < 0)
return 0;
// Verify param: value; type: refptr_same
DCHECK(value);
if (!value)
return 0;
// Execute
bool _retval = CefV8ValueCppToC::Get(self)->SetValue(
index,
CefV8ValueCppToC::Unwrap(value));
// Return type: bool
return _retval;
}
int CEF_CALLBACK v8value_set_value_byaccessor(struct _cef_v8value_t* self,
const cef_string_t* key, enum cef_v8_accesscontrol_t settings,
enum cef_v8_propertyattribute_t attribute) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: key; type: string_byref_const
DCHECK(key);
if (!key)
return 0;
// Execute
bool _retval = CefV8ValueCppToC::Get(self)->SetValue(
CefString(key),
settings,
attribute);
// Return type: bool
return _retval;
}
int CEF_CALLBACK v8value_get_keys(struct _cef_v8value_t* self,
cef_string_list_t keys) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: keys; type: string_vec_byref
DCHECK(keys);
if (!keys)
return 0;
// Translate param: keys; type: string_vec_byref
std::vector<CefString> keysList;
transfer_string_list_contents(keys, keysList);
// Execute
bool _retval = CefV8ValueCppToC::Get(self)->GetKeys(
keysList);
// Restore param: keys; type: string_vec_byref
cef_string_list_clear(keys);
transfer_string_list_contents(keysList, keys);
// Return type: bool
return _retval;
}
int CEF_CALLBACK v8value_set_user_data(struct _cef_v8value_t* self,
cef_base_t* user_data) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Unverified params: user_data
// Execute
bool _retval = CefV8ValueCppToC::Get(self)->SetUserData(
CefBaseCToCpp::Wrap(user_data));
// Return type: bool
return _retval;
}
cef_base_t* CEF_CALLBACK v8value_get_user_data(struct _cef_v8value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefBase> _retval = CefV8ValueCppToC::Get(self)->GetUserData();
// Return type: refptr_diff
return CefBaseCToCpp::Unwrap(_retval);
}
int CEF_CALLBACK v8value_get_externally_allocated_memory(
struct _cef_v8value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefV8ValueCppToC::Get(self)->GetExternallyAllocatedMemory();
// Return type: simple
return _retval;
}
int CEF_CALLBACK v8value_adjust_externally_allocated_memory(
struct _cef_v8value_t* self, int change_in_bytes) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefV8ValueCppToC::Get(self)->AdjustExternallyAllocatedMemory(
change_in_bytes);
// Return type: simple
return _retval;
}
int CEF_CALLBACK v8value_get_array_length(struct _cef_v8value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefV8ValueCppToC::Get(self)->GetArrayLength();
// Return type: simple
return _retval;
}
cef_string_userfree_t CEF_CALLBACK v8value_get_function_name(
struct _cef_v8value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefV8ValueCppToC::Get(self)->GetFunctionName();
// Return type: string
return _retval.DetachToUserFree();
}
cef_v8handler_t* CEF_CALLBACK v8value_get_function_handler(
struct _cef_v8value_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefV8Handler> _retval = CefV8ValueCppToC::Get(
self)->GetFunctionHandler();
// Return type: refptr_diff
return CefV8HandlerCToCpp::Unwrap(_retval);
}
struct _cef_v8value_t* CEF_CALLBACK v8value_execute_function(
struct _cef_v8value_t* self, struct _cef_v8value_t* object,
size_t argumentsCount, struct _cef_v8value_t* const* arguments) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: arguments; type: refptr_vec_same_byref_const
DCHECK(argumentsCount == 0 || arguments);
if (argumentsCount > 0 && !arguments)
return NULL;
// Unverified params: object
// Translate param: arguments; type: refptr_vec_same_byref_const
std::vector<CefRefPtr<CefV8Value> > argumentsList;
if (argumentsCount > 0) {
for (size_t i = 0; i < argumentsCount; ++i) {
argumentsList.push_back(CefV8ValueCppToC::Unwrap(arguments[i]));
}
}
// Execute
CefRefPtr<CefV8Value> _retval = CefV8ValueCppToC::Get(self)->ExecuteFunction(
CefV8ValueCppToC::Unwrap(object),
argumentsList);
// Return type: refptr_same
return CefV8ValueCppToC::Wrap(_retval);
}
struct _cef_v8value_t* CEF_CALLBACK v8value_execute_function_with_context(
struct _cef_v8value_t* self, cef_v8context_t* context,
struct _cef_v8value_t* object, size_t argumentsCount,
struct _cef_v8value_t* const* arguments) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: context; type: refptr_same
DCHECK(context);
if (!context)
return NULL;
// Verify param: arguments; type: refptr_vec_same_byref_const
DCHECK(argumentsCount == 0 || arguments);
if (argumentsCount > 0 && !arguments)
return NULL;
// Unverified params: object
// Translate param: arguments; type: refptr_vec_same_byref_const
std::vector<CefRefPtr<CefV8Value> > argumentsList;
if (argumentsCount > 0) {
for (size_t i = 0; i < argumentsCount; ++i) {
argumentsList.push_back(CefV8ValueCppToC::Unwrap(arguments[i]));
}
}
// Execute
CefRefPtr<CefV8Value> _retval = CefV8ValueCppToC::Get(
self)->ExecuteFunctionWithContext(
CefV8ContextCppToC::Unwrap(context),
CefV8ValueCppToC::Unwrap(object),
argumentsList);
// Return type: refptr_same
return CefV8ValueCppToC::Wrap(_retval);
}
// CONSTRUCTOR - Do not edit by hand.
CefV8ValueCppToC::CefV8ValueCppToC(CefV8Value* cls)
: CefCppToC<CefV8ValueCppToC, CefV8Value, cef_v8value_t>(cls) {
struct_.struct_.is_undefined = v8value_is_undefined;
struct_.struct_.is_null = v8value_is_null;
struct_.struct_.is_bool = v8value_is_bool;
struct_.struct_.is_int = v8value_is_int;
struct_.struct_.is_uint = v8value_is_uint;
struct_.struct_.is_double = v8value_is_double;
struct_.struct_.is_date = v8value_is_date;
struct_.struct_.is_string = v8value_is_string;
struct_.struct_.is_object = v8value_is_object;
struct_.struct_.is_array = v8value_is_array;
struct_.struct_.is_function = v8value_is_function;
struct_.struct_.is_same = v8value_is_same;
struct_.struct_.get_bool_value = v8value_get_bool_value;
struct_.struct_.get_int_value = v8value_get_int_value;
struct_.struct_.get_uint_value = v8value_get_uint_value;
struct_.struct_.get_double_value = v8value_get_double_value;
struct_.struct_.get_date_value = v8value_get_date_value;
struct_.struct_.get_string_value = v8value_get_string_value;
struct_.struct_.is_user_created = v8value_is_user_created;
struct_.struct_.has_exception = v8value_has_exception;
struct_.struct_.get_exception = v8value_get_exception;
struct_.struct_.clear_exception = v8value_clear_exception;
struct_.struct_.will_rethrow_exceptions = v8value_will_rethrow_exceptions;
struct_.struct_.set_rethrow_exceptions = v8value_set_rethrow_exceptions;
struct_.struct_.has_value_bykey = v8value_has_value_bykey;
struct_.struct_.has_value_byindex = v8value_has_value_byindex;
struct_.struct_.delete_value_bykey = v8value_delete_value_bykey;
struct_.struct_.delete_value_byindex = v8value_delete_value_byindex;
struct_.struct_.get_value_bykey = v8value_get_value_bykey;
struct_.struct_.get_value_byindex = v8value_get_value_byindex;
struct_.struct_.set_value_bykey = v8value_set_value_bykey;
struct_.struct_.set_value_byindex = v8value_set_value_byindex;
struct_.struct_.set_value_byaccessor = v8value_set_value_byaccessor;
struct_.struct_.get_keys = v8value_get_keys;
struct_.struct_.set_user_data = v8value_set_user_data;
struct_.struct_.get_user_data = v8value_get_user_data;
struct_.struct_.get_externally_allocated_memory =
v8value_get_externally_allocated_memory;
struct_.struct_.adjust_externally_allocated_memory =
v8value_adjust_externally_allocated_memory;
struct_.struct_.get_array_length = v8value_get_array_length;
struct_.struct_.get_function_name = v8value_get_function_name;
struct_.struct_.get_function_handler = v8value_get_function_handler;
struct_.struct_.execute_function = v8value_execute_function;
struct_.struct_.execute_function_with_context =
v8value_execute_function_with_context;
}
#ifndef NDEBUG
template<> long CefCppToC<CefV8ValueCppToC, CefV8Value,
cef_v8value_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,36 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_V8VALUE_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_V8VALUE_CPPTOC_H_
#pragma once
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef_v8.h"
#include "include/capi/cef_v8_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefV8ValueCppToC
: public CefCppToC<CefV8ValueCppToC, CefV8Value, cef_v8value_t> {
public:
explicit CefV8ValueCppToC(CefV8Value* cls);
virtual ~CefV8ValueCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_V8VALUE_CPPTOC_H_

View File

@ -0,0 +1,101 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/write_handler_cpptoc.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
size_t CEF_CALLBACK write_handler_write(struct _cef_write_handler_t* self,
const void* ptr, size_t size, size_t n) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: ptr; type: simple_byaddr
DCHECK(ptr);
if (!ptr)
return 0;
// Execute
size_t _retval = CefWriteHandlerCppToC::Get(self)->Write(
ptr,
size,
n);
// Return type: simple
return _retval;
}
int CEF_CALLBACK write_handler_seek(struct _cef_write_handler_t* self,
int64 offset, int whence) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefWriteHandlerCppToC::Get(self)->Seek(
offset,
whence);
// Return type: simple
return _retval;
}
int64 CEF_CALLBACK write_handler_tell(struct _cef_write_handler_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int64 _retval = CefWriteHandlerCppToC::Get(self)->Tell();
// Return type: simple
return _retval;
}
int CEF_CALLBACK write_handler_flush(struct _cef_write_handler_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefWriteHandlerCppToC::Get(self)->Flush();
// Return type: simple
return _retval;
}
// CONSTRUCTOR - Do not edit by hand.
CefWriteHandlerCppToC::CefWriteHandlerCppToC(CefWriteHandler* cls)
: CefCppToC<CefWriteHandlerCppToC, CefWriteHandler, cef_write_handler_t>(
cls) {
struct_.struct_.write = write_handler_write;
struct_.struct_.seek = write_handler_seek;
struct_.struct_.tell = write_handler_tell;
struct_.struct_.flush = write_handler_flush;
}
#ifndef NDEBUG
template<> long CefCppToC<CefWriteHandlerCppToC, CefWriteHandler,
cef_write_handler_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,37 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_WRITE_HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_WRITE_HANDLER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef_stream.h"
#include "include/capi/cef_stream_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefWriteHandlerCppToC
: public CefCppToC<CefWriteHandlerCppToC, CefWriteHandler,
cef_write_handler_t> {
public:
explicit CefWriteHandlerCppToC(CefWriteHandler* cls);
virtual ~CefWriteHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_WRITE_HANDLER_CPPTOC_H_

View File

@ -0,0 +1,558 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/stream_reader_cpptoc.h"
#include "libcef_dll/cpptoc/xml_reader_cpptoc.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT cef_xml_reader_t* cef_xml_reader_create(cef_stream_reader_t* stream,
enum cef_xml_encoding_type_t encodingType, const cef_string_t* URI) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: stream; type: refptr_same
DCHECK(stream);
if (!stream)
return NULL;
// Verify param: URI; type: string_byref_const
DCHECK(URI);
if (!URI)
return NULL;
// Execute
CefRefPtr<CefXmlReader> _retval = CefXmlReader::Create(
CefStreamReaderCppToC::Unwrap(stream),
encodingType,
CefString(URI));
// Return type: refptr_same
return CefXmlReaderCppToC::Wrap(_retval);
}
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK xml_reader_move_to_next_node(struct _cef_xml_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefXmlReaderCppToC::Get(self)->MoveToNextNode();
// Return type: bool
return _retval;
}
int CEF_CALLBACK xml_reader_close(struct _cef_xml_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefXmlReaderCppToC::Get(self)->Close();
// Return type: bool
return _retval;
}
int CEF_CALLBACK xml_reader_has_error(struct _cef_xml_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefXmlReaderCppToC::Get(self)->HasError();
// Return type: bool
return _retval;
}
cef_string_userfree_t CEF_CALLBACK xml_reader_get_error(
struct _cef_xml_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefXmlReaderCppToC::Get(self)->GetError();
// Return type: string
return _retval.DetachToUserFree();
}
enum cef_xml_node_type_t CEF_CALLBACK xml_reader_get_type(
struct _cef_xml_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return XML_NODE_UNSUPPORTED;
// Execute
cef_xml_node_type_t _retval = CefXmlReaderCppToC::Get(self)->GetType();
// Return type: simple
return _retval;
}
int CEF_CALLBACK xml_reader_get_depth(struct _cef_xml_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefXmlReaderCppToC::Get(self)->GetDepth();
// Return type: simple
return _retval;
}
cef_string_userfree_t CEF_CALLBACK xml_reader_get_local_name(
struct _cef_xml_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefXmlReaderCppToC::Get(self)->GetLocalName();
// Return type: string
return _retval.DetachToUserFree();
}
cef_string_userfree_t CEF_CALLBACK xml_reader_get_prefix(
struct _cef_xml_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefXmlReaderCppToC::Get(self)->GetPrefix();
// Return type: string
return _retval.DetachToUserFree();
}
cef_string_userfree_t CEF_CALLBACK xml_reader_get_qualified_name(
struct _cef_xml_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefXmlReaderCppToC::Get(self)->GetQualifiedName();
// Return type: string
return _retval.DetachToUserFree();
}
cef_string_userfree_t CEF_CALLBACK xml_reader_get_namespace_uri(
struct _cef_xml_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefXmlReaderCppToC::Get(self)->GetNamespaceURI();
// Return type: string
return _retval.DetachToUserFree();
}
cef_string_userfree_t CEF_CALLBACK xml_reader_get_base_uri(
struct _cef_xml_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefXmlReaderCppToC::Get(self)->GetBaseURI();
// Return type: string
return _retval.DetachToUserFree();
}
cef_string_userfree_t CEF_CALLBACK xml_reader_get_xml_lang(
struct _cef_xml_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefXmlReaderCppToC::Get(self)->GetXmlLang();
// Return type: string
return _retval.DetachToUserFree();
}
int CEF_CALLBACK xml_reader_is_empty_element(struct _cef_xml_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefXmlReaderCppToC::Get(self)->IsEmptyElement();
// Return type: bool
return _retval;
}
int CEF_CALLBACK xml_reader_has_value(struct _cef_xml_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefXmlReaderCppToC::Get(self)->HasValue();
// Return type: bool
return _retval;
}
cef_string_userfree_t CEF_CALLBACK xml_reader_get_value(
struct _cef_xml_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefXmlReaderCppToC::Get(self)->GetValue();
// Return type: string
return _retval.DetachToUserFree();
}
int CEF_CALLBACK xml_reader_has_attributes(struct _cef_xml_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefXmlReaderCppToC::Get(self)->HasAttributes();
// Return type: bool
return _retval;
}
size_t CEF_CALLBACK xml_reader_get_attribute_count(
struct _cef_xml_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
size_t _retval = CefXmlReaderCppToC::Get(self)->GetAttributeCount();
// Return type: simple
return _retval;
}
cef_string_userfree_t CEF_CALLBACK xml_reader_get_attribute_byindex(
struct _cef_xml_reader_t* self, int index) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: index; type: simple_byval
DCHECK_GE(index, 0);
if (index < 0)
return NULL;
// Execute
CefString _retval = CefXmlReaderCppToC::Get(self)->GetAttribute(
index);
// Return type: string
return _retval.DetachToUserFree();
}
cef_string_userfree_t CEF_CALLBACK xml_reader_get_attribute_byqname(
struct _cef_xml_reader_t* self, const cef_string_t* qualifiedName) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: qualifiedName; type: string_byref_const
DCHECK(qualifiedName);
if (!qualifiedName)
return NULL;
// Execute
CefString _retval = CefXmlReaderCppToC::Get(self)->GetAttribute(
CefString(qualifiedName));
// Return type: string
return _retval.DetachToUserFree();
}
cef_string_userfree_t CEF_CALLBACK xml_reader_get_attribute_bylname(
struct _cef_xml_reader_t* self, const cef_string_t* localName,
const cef_string_t* namespaceURI) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: localName; type: string_byref_const
DCHECK(localName);
if (!localName)
return NULL;
// Verify param: namespaceURI; type: string_byref_const
DCHECK(namespaceURI);
if (!namespaceURI)
return NULL;
// Execute
CefString _retval = CefXmlReaderCppToC::Get(self)->GetAttribute(
CefString(localName),
CefString(namespaceURI));
// Return type: string
return _retval.DetachToUserFree();
}
cef_string_userfree_t CEF_CALLBACK xml_reader_get_inner_xml(
struct _cef_xml_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefXmlReaderCppToC::Get(self)->GetInnerXml();
// Return type: string
return _retval.DetachToUserFree();
}
cef_string_userfree_t CEF_CALLBACK xml_reader_get_outer_xml(
struct _cef_xml_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefXmlReaderCppToC::Get(self)->GetOuterXml();
// Return type: string
return _retval.DetachToUserFree();
}
int CEF_CALLBACK xml_reader_get_line_number(struct _cef_xml_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefXmlReaderCppToC::Get(self)->GetLineNumber();
// Return type: simple
return _retval;
}
int CEF_CALLBACK xml_reader_move_to_attribute_byindex(
struct _cef_xml_reader_t* self, int index) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: index; type: simple_byval
DCHECK_GE(index, 0);
if (index < 0)
return 0;
// Execute
bool _retval = CefXmlReaderCppToC::Get(self)->MoveToAttribute(
index);
// Return type: bool
return _retval;
}
int CEF_CALLBACK xml_reader_move_to_attribute_byqname(
struct _cef_xml_reader_t* self, const cef_string_t* qualifiedName) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: qualifiedName; type: string_byref_const
DCHECK(qualifiedName);
if (!qualifiedName)
return 0;
// Execute
bool _retval = CefXmlReaderCppToC::Get(self)->MoveToAttribute(
CefString(qualifiedName));
// Return type: bool
return _retval;
}
int CEF_CALLBACK xml_reader_move_to_attribute_bylname(
struct _cef_xml_reader_t* self, const cef_string_t* localName,
const cef_string_t* namespaceURI) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: localName; type: string_byref_const
DCHECK(localName);
if (!localName)
return 0;
// Verify param: namespaceURI; type: string_byref_const
DCHECK(namespaceURI);
if (!namespaceURI)
return 0;
// Execute
bool _retval = CefXmlReaderCppToC::Get(self)->MoveToAttribute(
CefString(localName),
CefString(namespaceURI));
// Return type: bool
return _retval;
}
int CEF_CALLBACK xml_reader_move_to_first_attribute(
struct _cef_xml_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefXmlReaderCppToC::Get(self)->MoveToFirstAttribute();
// Return type: bool
return _retval;
}
int CEF_CALLBACK xml_reader_move_to_next_attribute(
struct _cef_xml_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefXmlReaderCppToC::Get(self)->MoveToNextAttribute();
// Return type: bool
return _retval;
}
int CEF_CALLBACK xml_reader_move_to_carrying_element(
struct _cef_xml_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefXmlReaderCppToC::Get(self)->MoveToCarryingElement();
// Return type: bool
return _retval;
}
// CONSTRUCTOR - Do not edit by hand.
CefXmlReaderCppToC::CefXmlReaderCppToC(CefXmlReader* cls)
: CefCppToC<CefXmlReaderCppToC, CefXmlReader, cef_xml_reader_t>(cls) {
struct_.struct_.move_to_next_node = xml_reader_move_to_next_node;
struct_.struct_.close = xml_reader_close;
struct_.struct_.has_error = xml_reader_has_error;
struct_.struct_.get_error = xml_reader_get_error;
struct_.struct_.get_type = xml_reader_get_type;
struct_.struct_.get_depth = xml_reader_get_depth;
struct_.struct_.get_local_name = xml_reader_get_local_name;
struct_.struct_.get_prefix = xml_reader_get_prefix;
struct_.struct_.get_qualified_name = xml_reader_get_qualified_name;
struct_.struct_.get_namespace_uri = xml_reader_get_namespace_uri;
struct_.struct_.get_base_uri = xml_reader_get_base_uri;
struct_.struct_.get_xml_lang = xml_reader_get_xml_lang;
struct_.struct_.is_empty_element = xml_reader_is_empty_element;
struct_.struct_.has_value = xml_reader_has_value;
struct_.struct_.get_value = xml_reader_get_value;
struct_.struct_.has_attributes = xml_reader_has_attributes;
struct_.struct_.get_attribute_count = xml_reader_get_attribute_count;
struct_.struct_.get_attribute_byindex = xml_reader_get_attribute_byindex;
struct_.struct_.get_attribute_byqname = xml_reader_get_attribute_byqname;
struct_.struct_.get_attribute_bylname = xml_reader_get_attribute_bylname;
struct_.struct_.get_inner_xml = xml_reader_get_inner_xml;
struct_.struct_.get_outer_xml = xml_reader_get_outer_xml;
struct_.struct_.get_line_number = xml_reader_get_line_number;
struct_.struct_.move_to_attribute_byindex =
xml_reader_move_to_attribute_byindex;
struct_.struct_.move_to_attribute_byqname =
xml_reader_move_to_attribute_byqname;
struct_.struct_.move_to_attribute_bylname =
xml_reader_move_to_attribute_bylname;
struct_.struct_.move_to_first_attribute = xml_reader_move_to_first_attribute;
struct_.struct_.move_to_next_attribute = xml_reader_move_to_next_attribute;
struct_.struct_.move_to_carrying_element =
xml_reader_move_to_carrying_element;
}
#ifndef NDEBUG
template<> long CefCppToC<CefXmlReaderCppToC, CefXmlReader,
cef_xml_reader_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,36 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_XML_READER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_XML_READER_CPPTOC_H_
#pragma once
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef_xml_reader.h"
#include "include/capi/cef_xml_reader_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefXmlReaderCppToC
: public CefCppToC<CefXmlReaderCppToC, CefXmlReader, cef_xml_reader_t> {
public:
explicit CefXmlReaderCppToC(CefXmlReader* cls);
virtual ~CefXmlReaderCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_XML_READER_CPPTOC_H_

View File

@ -0,0 +1,249 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/stream_reader_cpptoc.h"
#include "libcef_dll/cpptoc/zip_reader_cpptoc.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT cef_zip_reader_t* cef_zip_reader_create(
cef_stream_reader_t* stream) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: stream; type: refptr_same
DCHECK(stream);
if (!stream)
return NULL;
// Execute
CefRefPtr<CefZipReader> _retval = CefZipReader::Create(
CefStreamReaderCppToC::Unwrap(stream));
// Return type: refptr_same
return CefZipReaderCppToC::Wrap(_retval);
}
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK zip_reader_move_to_first_file(struct _cef_zip_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefZipReaderCppToC::Get(self)->MoveToFirstFile();
// Return type: bool
return _retval;
}
int CEF_CALLBACK zip_reader_move_to_next_file(struct _cef_zip_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefZipReaderCppToC::Get(self)->MoveToNextFile();
// Return type: bool
return _retval;
}
int CEF_CALLBACK zip_reader_move_to_file(struct _cef_zip_reader_t* self,
const cef_string_t* fileName, int caseSensitive) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: fileName; type: string_byref_const
DCHECK(fileName);
if (!fileName)
return 0;
// Execute
bool _retval = CefZipReaderCppToC::Get(self)->MoveToFile(
CefString(fileName),
caseSensitive?true:false);
// Return type: bool
return _retval;
}
int CEF_CALLBACK zip_reader_close(struct _cef_zip_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefZipReaderCppToC::Get(self)->Close();
// Return type: bool
return _retval;
}
cef_string_userfree_t CEF_CALLBACK zip_reader_get_file_name(
struct _cef_zip_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefZipReaderCppToC::Get(self)->GetFileName();
// Return type: string
return _retval.DetachToUserFree();
}
int64 CEF_CALLBACK zip_reader_get_file_size(struct _cef_zip_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int64 _retval = CefZipReaderCppToC::Get(self)->GetFileSize();
// Return type: simple
return _retval;
}
time_t CEF_CALLBACK zip_reader_get_file_last_modified(
struct _cef_zip_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
time_t _retval = CefZipReaderCppToC::Get(self)->GetFileLastModified();
// Return type: simple
return _retval;
}
int CEF_CALLBACK zip_reader_open_file(struct _cef_zip_reader_t* self,
const cef_string_t* password) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Unverified params: password
// Execute
bool _retval = CefZipReaderCppToC::Get(self)->OpenFile(
CefString(password));
// Return type: bool
return _retval;
}
int CEF_CALLBACK zip_reader_close_file(struct _cef_zip_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefZipReaderCppToC::Get(self)->CloseFile();
// Return type: bool
return _retval;
}
int CEF_CALLBACK zip_reader_read_file(struct _cef_zip_reader_t* self,
void* buffer, size_t bufferSize) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: buffer; type: simple_byaddr
DCHECK(buffer);
if (!buffer)
return 0;
// Execute
int _retval = CefZipReaderCppToC::Get(self)->ReadFile(
buffer,
bufferSize);
// Return type: simple
return _retval;
}
int64 CEF_CALLBACK zip_reader_tell(struct _cef_zip_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int64 _retval = CefZipReaderCppToC::Get(self)->Tell();
// Return type: simple
return _retval;
}
int CEF_CALLBACK zip_reader_eof(struct _cef_zip_reader_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefZipReaderCppToC::Get(self)->Eof();
// Return type: bool
return _retval;
}
// CONSTRUCTOR - Do not edit by hand.
CefZipReaderCppToC::CefZipReaderCppToC(CefZipReader* cls)
: CefCppToC<CefZipReaderCppToC, CefZipReader, cef_zip_reader_t>(cls) {
struct_.struct_.move_to_first_file = zip_reader_move_to_first_file;
struct_.struct_.move_to_next_file = zip_reader_move_to_next_file;
struct_.struct_.move_to_file = zip_reader_move_to_file;
struct_.struct_.close = zip_reader_close;
struct_.struct_.get_file_name = zip_reader_get_file_name;
struct_.struct_.get_file_size = zip_reader_get_file_size;
struct_.struct_.get_file_last_modified = zip_reader_get_file_last_modified;
struct_.struct_.open_file = zip_reader_open_file;
struct_.struct_.close_file = zip_reader_close_file;
struct_.struct_.read_file = zip_reader_read_file;
struct_.struct_.tell = zip_reader_tell;
struct_.struct_.eof = zip_reader_eof;
}
#ifndef NDEBUG
template<> long CefCppToC<CefZipReaderCppToC, CefZipReader,
cef_zip_reader_t>::DebugObjCt = 0;
#endif

View File

@ -0,0 +1,36 @@
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_ZIP_READER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_ZIP_READER_CPPTOC_H_
#pragma once
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef_zip_reader.h"
#include "include/capi/cef_zip_reader_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefZipReaderCppToC
: public CefCppToC<CefZipReaderCppToC, CefZipReader, cef_zip_reader_t> {
public:
explicit CefZipReaderCppToC(CefZipReader* cls);
virtual ~CefZipReaderCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_ZIP_READER_CPPTOC_H_