Set eol-style property on all files. Future commits will use the subversion auto-props configuration at http://src.chromium.org/viewvc/chrome/trunk/tools/buildbot/slave/config

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@109 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2010-10-03 21:04:50 +00:00
parent 5fc6307a6f
commit 46b831304c
182 changed files with 30470 additions and 30470 deletions

View File

@ -1,143 +1,143 @@
// 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 _BASE_CPPTOC_H
#define _BASE_CPPTOC_H
#include "include/cef.h"
#include "include/cef_capi.h"
#include "libcef_dll/cef_logging.h"
// CefCppToC implementation for CefBase.
class CefBaseCppToC : public CefThreadSafeBase<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)
{
// 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)
{
// 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)
{
// 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_;
};
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.
virtual int AddRef()
{
UnderlyingAddRef();
return CefThreadSafeBase<CefBase>::AddRef();
}
virtual int Release()
{
UnderlyingRelease();
return CefThreadSafeBase<CefBase>::Release();
}
// 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:
Struct struct_;
CefBase* class_;
};
#endif // _BASE_CPPTOC_H
// 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 _BASE_CPPTOC_H
#define _BASE_CPPTOC_H
#include "include/cef.h"
#include "include/cef_capi.h"
#include "libcef_dll/cef_logging.h"
// CefCppToC implementation for CefBase.
class CefBaseCppToC : public CefThreadSafeBase<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)
{
// 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)
{
// 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)
{
// 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_;
};
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.
virtual int AddRef()
{
UnderlyingAddRef();
return CefThreadSafeBase<CefBase>::AddRef();
}
virtual int Release()
{
UnderlyingRelease();
return CefThreadSafeBase<CefBase>::Release();
}
// 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:
Struct struct_;
CefBase* class_;
};
#endif // _BASE_CPPTOC_H

View File

@ -1,284 +1,284 @@
// 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.
//
// ---------------------------------------------------------------------------
//
// A portion of this file was generated by the CEF translator tool. When
// making changes by hand only do so within the body of existing 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/ctocpp/handler_ctocpp.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT int cef_browser_create(cef_window_info_t* windowInfo, int popup,
struct _cef_handler_t* handler, const wchar_t* url)
{
DCHECK(windowInfo);
CefRefPtr<CefHandler> handlerPtr;
std::wstring urlStr;
CefWindowInfo wi = *windowInfo;
if(handler)
handlerPtr = CefHandlerCToCpp::Wrap(handler);
if(url)
urlStr = url;
return CefBrowser::CreateBrowser(wi, popup?true:false, handlerPtr, urlStr);
}
CEF_EXPORT cef_browser_t* cef_browser_create_sync(cef_window_info_t* windowInfo,
int popup, struct _cef_handler_t* handler, const wchar_t* url)
{
DCHECK(windowInfo);
CefRefPtr<CefHandler> handlerPtr;
std::wstring urlStr;
CefWindowInfo wi = *windowInfo;
if(handler)
handlerPtr = CefHandlerCToCpp::Wrap(handler);
if(url)
urlStr = url;
CefRefPtr<CefBrowser> browserPtr(
CefBrowser::CreateBrowserSync(wi, popup?true:false, handlerPtr, urlStr));
if(browserPtr.get())
return CefBrowserCppToC::Wrap(browserPtr);
return NULL;
}
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK browser_can_go_back(struct _cef_browser_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefBrowserCppToC::Get(self)->CanGoBack();
}
void CEF_CALLBACK browser_go_back(struct _cef_browser_t* self)
{
DCHECK(self);
if(!self)
return;
CefBrowserCppToC::Get(self)->GoBack();
}
int CEF_CALLBACK browser_can_go_forward(struct _cef_browser_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefBrowserCppToC::Get(self)->CanGoForward();
}
void CEF_CALLBACK browser_go_forward(struct _cef_browser_t* self)
{
DCHECK(self);
if(!self)
return;
CefBrowserCppToC::Get(self)->GoForward();
}
void CEF_CALLBACK browser_reload(struct _cef_browser_t* self)
{
DCHECK(self);
if(!self)
return;
CefBrowserCppToC::Get(self)->Reload();
}
void CEF_CALLBACK browser_reload_ignore_cache(struct _cef_browser_t* self)
{
DCHECK(self);
if(!self)
return;
CefBrowserCppToC::Get(self)->ReloadIgnoreCache();
}
void CEF_CALLBACK browser_stop_load(struct _cef_browser_t* self)
{
DCHECK(self);
if(!self)
return;
CefBrowserCppToC::Get(self)->StopLoad();
}
void CEF_CALLBACK browser_set_focus(struct _cef_browser_t* self, int enable)
{
DCHECK(self);
if(!self)
return;
CefBrowserCppToC::Get(self)->SetFocus(enable ? true : false);
}
cef_window_handle_t CEF_CALLBACK browser_get_window_handle(
struct _cef_browser_t* self)
{
DCHECK(self);
if(!self)
return NULL;
return CefBrowserCppToC::Get(self)->GetWindowHandle();
}
int CEF_CALLBACK browser_is_popup(struct _cef_browser_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefBrowserCppToC::Get(self)->IsPopup();
}
struct _cef_handler_t* CEF_CALLBACK browser_get_handler(
struct _cef_browser_t* self)
{
DCHECK(self);
if(!self)
return NULL;
CefRefPtr<CefBrowser> browserPtr = CefBrowserCppToC::Get(self);
CefRefPtr<CefHandler> handlerPtr = browserPtr->GetHandler();
if(handlerPtr.get())
return CefHandlerCToCpp::Unwrap(handlerPtr);
return NULL;
}
struct _cef_frame_t* CEF_CALLBACK browser_get_main_frame(
struct _cef_browser_t* self)
{
DCHECK(self);
if(!self)
return NULL;
CefRefPtr<CefBrowser> browserPtr = CefBrowserCppToC::Get(self);
CefRefPtr<CefFrame> framePtr = browserPtr->GetMainFrame();
if(framePtr.get())
return CefFrameCppToC::Wrap(framePtr);
return NULL;
}
struct _cef_frame_t* CEF_CALLBACK browser_get_focused_frame(
struct _cef_browser_t* self)
{
DCHECK(self);
if(!self)
return NULL;
CefRefPtr<CefBrowser> browserPtr = CefBrowserCppToC::Get(self);
CefRefPtr<CefFrame> framePtr = browserPtr->GetFocusedFrame();
if(framePtr.get())
return CefFrameCppToC::Wrap(framePtr);
return NULL;
}
struct _cef_frame_t* CEF_CALLBACK browser_get_frame(struct _cef_browser_t* self,
const wchar_t* name)
{
DCHECK(self);
if(!self)
return NULL;
std::wstring nameStr;
if(name)
nameStr = name;
if(nameStr.empty())
return NULL;
CefRefPtr<CefBrowser> browserPtr = CefBrowserCppToC::Get(self);
CefRefPtr<CefFrame> framePtr = browserPtr->GetFrame(nameStr);
if(framePtr.get())
return CefFrameCppToC::Wrap(framePtr);
return NULL;
}
void CEF_CALLBACK browser_get_frame_names(struct _cef_browser_t* self,
cef_string_list_t names)
{
DCHECK(self);
DCHECK(names);
if(!self || !names)
return;
CefRefPtr<CefBrowser> browserPtr = CefBrowserCppToC::Get(self);
std::vector<std::wstring> stringList;
browserPtr->GetFrameNames(stringList);
size_t size = stringList.size();
for(size_t i = 0; i < size; ++i)
cef_string_list_append(names, stringList[i].c_str());
}
void CEF_CALLBACK browser_find(struct _cef_browser_t* self, int identifier,
const wchar_t* searchText, int forward, int matchCase, int findNext)
{
DCHECK(self);
if(!self)
return;
std::wstring searchTextStr;
if(searchText)
searchTextStr = searchText;
CefBrowserCppToC::Get(self)->Find(identifier, searchTextStr,
forward?true:false, matchCase?true:false, findNext?true:false);
}
void CEF_CALLBACK browser_stop_finding(struct _cef_browser_t* self,
int clearSelection)
{
DCHECK(self);
if(!self)
return;
CefBrowserCppToC::Get(self)->StopFinding(clearSelection?true:false);
}
// CONSTRUCTOR - Do not edit by hand.
CefBrowserCppToC::CefBrowserCppToC(CefBrowser* cls)
: CefCppToC<CefBrowserCppToC, CefBrowser, cef_browser_t>(cls)
{
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_.reload = browser_reload;
struct_.struct_.reload_ignore_cache = browser_reload_ignore_cache;
struct_.struct_.stop_load = browser_stop_load;
struct_.struct_.set_focus = browser_set_focus;
struct_.struct_.get_window_handle = browser_get_window_handle;
struct_.struct_.is_popup = browser_is_popup;
struct_.struct_.get_handler = browser_get_handler;
struct_.struct_.get_main_frame = browser_get_main_frame;
struct_.struct_.get_focused_frame = browser_get_focused_frame;
struct_.struct_.get_frame = browser_get_frame;
struct_.struct_.get_frame_names = browser_get_frame_names;
struct_.struct_.find = browser_find;
struct_.struct_.stop_finding = browser_stop_finding;
}
#ifdef _DEBUG
long CefCppToC<CefBrowserCppToC, CefBrowser, cef_browser_t>::DebugObjCt = 0;
#endif
// 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.
//
// ---------------------------------------------------------------------------
//
// A portion of this file was generated by the CEF translator tool. When
// making changes by hand only do so within the body of existing 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/ctocpp/handler_ctocpp.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT int cef_browser_create(cef_window_info_t* windowInfo, int popup,
struct _cef_handler_t* handler, const wchar_t* url)
{
DCHECK(windowInfo);
CefRefPtr<CefHandler> handlerPtr;
std::wstring urlStr;
CefWindowInfo wi = *windowInfo;
if(handler)
handlerPtr = CefHandlerCToCpp::Wrap(handler);
if(url)
urlStr = url;
return CefBrowser::CreateBrowser(wi, popup?true:false, handlerPtr, urlStr);
}
CEF_EXPORT cef_browser_t* cef_browser_create_sync(cef_window_info_t* windowInfo,
int popup, struct _cef_handler_t* handler, const wchar_t* url)
{
DCHECK(windowInfo);
CefRefPtr<CefHandler> handlerPtr;
std::wstring urlStr;
CefWindowInfo wi = *windowInfo;
if(handler)
handlerPtr = CefHandlerCToCpp::Wrap(handler);
if(url)
urlStr = url;
CefRefPtr<CefBrowser> browserPtr(
CefBrowser::CreateBrowserSync(wi, popup?true:false, handlerPtr, urlStr));
if(browserPtr.get())
return CefBrowserCppToC::Wrap(browserPtr);
return NULL;
}
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK browser_can_go_back(struct _cef_browser_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefBrowserCppToC::Get(self)->CanGoBack();
}
void CEF_CALLBACK browser_go_back(struct _cef_browser_t* self)
{
DCHECK(self);
if(!self)
return;
CefBrowserCppToC::Get(self)->GoBack();
}
int CEF_CALLBACK browser_can_go_forward(struct _cef_browser_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefBrowserCppToC::Get(self)->CanGoForward();
}
void CEF_CALLBACK browser_go_forward(struct _cef_browser_t* self)
{
DCHECK(self);
if(!self)
return;
CefBrowserCppToC::Get(self)->GoForward();
}
void CEF_CALLBACK browser_reload(struct _cef_browser_t* self)
{
DCHECK(self);
if(!self)
return;
CefBrowserCppToC::Get(self)->Reload();
}
void CEF_CALLBACK browser_reload_ignore_cache(struct _cef_browser_t* self)
{
DCHECK(self);
if(!self)
return;
CefBrowserCppToC::Get(self)->ReloadIgnoreCache();
}
void CEF_CALLBACK browser_stop_load(struct _cef_browser_t* self)
{
DCHECK(self);
if(!self)
return;
CefBrowserCppToC::Get(self)->StopLoad();
}
void CEF_CALLBACK browser_set_focus(struct _cef_browser_t* self, int enable)
{
DCHECK(self);
if(!self)
return;
CefBrowserCppToC::Get(self)->SetFocus(enable ? true : false);
}
cef_window_handle_t CEF_CALLBACK browser_get_window_handle(
struct _cef_browser_t* self)
{
DCHECK(self);
if(!self)
return NULL;
return CefBrowserCppToC::Get(self)->GetWindowHandle();
}
int CEF_CALLBACK browser_is_popup(struct _cef_browser_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefBrowserCppToC::Get(self)->IsPopup();
}
struct _cef_handler_t* CEF_CALLBACK browser_get_handler(
struct _cef_browser_t* self)
{
DCHECK(self);
if(!self)
return NULL;
CefRefPtr<CefBrowser> browserPtr = CefBrowserCppToC::Get(self);
CefRefPtr<CefHandler> handlerPtr = browserPtr->GetHandler();
if(handlerPtr.get())
return CefHandlerCToCpp::Unwrap(handlerPtr);
return NULL;
}
struct _cef_frame_t* CEF_CALLBACK browser_get_main_frame(
struct _cef_browser_t* self)
{
DCHECK(self);
if(!self)
return NULL;
CefRefPtr<CefBrowser> browserPtr = CefBrowserCppToC::Get(self);
CefRefPtr<CefFrame> framePtr = browserPtr->GetMainFrame();
if(framePtr.get())
return CefFrameCppToC::Wrap(framePtr);
return NULL;
}
struct _cef_frame_t* CEF_CALLBACK browser_get_focused_frame(
struct _cef_browser_t* self)
{
DCHECK(self);
if(!self)
return NULL;
CefRefPtr<CefBrowser> browserPtr = CefBrowserCppToC::Get(self);
CefRefPtr<CefFrame> framePtr = browserPtr->GetFocusedFrame();
if(framePtr.get())
return CefFrameCppToC::Wrap(framePtr);
return NULL;
}
struct _cef_frame_t* CEF_CALLBACK browser_get_frame(struct _cef_browser_t* self,
const wchar_t* name)
{
DCHECK(self);
if(!self)
return NULL;
std::wstring nameStr;
if(name)
nameStr = name;
if(nameStr.empty())
return NULL;
CefRefPtr<CefBrowser> browserPtr = CefBrowserCppToC::Get(self);
CefRefPtr<CefFrame> framePtr = browserPtr->GetFrame(nameStr);
if(framePtr.get())
return CefFrameCppToC::Wrap(framePtr);
return NULL;
}
void CEF_CALLBACK browser_get_frame_names(struct _cef_browser_t* self,
cef_string_list_t names)
{
DCHECK(self);
DCHECK(names);
if(!self || !names)
return;
CefRefPtr<CefBrowser> browserPtr = CefBrowserCppToC::Get(self);
std::vector<std::wstring> stringList;
browserPtr->GetFrameNames(stringList);
size_t size = stringList.size();
for(size_t i = 0; i < size; ++i)
cef_string_list_append(names, stringList[i].c_str());
}
void CEF_CALLBACK browser_find(struct _cef_browser_t* self, int identifier,
const wchar_t* searchText, int forward, int matchCase, int findNext)
{
DCHECK(self);
if(!self)
return;
std::wstring searchTextStr;
if(searchText)
searchTextStr = searchText;
CefBrowserCppToC::Get(self)->Find(identifier, searchTextStr,
forward?true:false, matchCase?true:false, findNext?true:false);
}
void CEF_CALLBACK browser_stop_finding(struct _cef_browser_t* self,
int clearSelection)
{
DCHECK(self);
if(!self)
return;
CefBrowserCppToC::Get(self)->StopFinding(clearSelection?true:false);
}
// CONSTRUCTOR - Do not edit by hand.
CefBrowserCppToC::CefBrowserCppToC(CefBrowser* cls)
: CefCppToC<CefBrowserCppToC, CefBrowser, cef_browser_t>(cls)
{
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_.reload = browser_reload;
struct_.struct_.reload_ignore_cache = browser_reload_ignore_cache;
struct_.struct_.stop_load = browser_stop_load;
struct_.struct_.set_focus = browser_set_focus;
struct_.struct_.get_window_handle = browser_get_window_handle;
struct_.struct_.is_popup = browser_is_popup;
struct_.struct_.get_handler = browser_get_handler;
struct_.struct_.get_main_frame = browser_get_main_frame;
struct_.struct_.get_focused_frame = browser_get_focused_frame;
struct_.struct_.get_frame = browser_get_frame;
struct_.struct_.get_frame_names = browser_get_frame_names;
struct_.struct_.find = browser_find;
struct_.struct_.stop_finding = browser_stop_finding;
}
#ifdef _DEBUG
long CefCppToC<CefBrowserCppToC, CefBrowser, cef_browser_t>::DebugObjCt = 0;
#endif

View File

@ -1,34 +1,34 @@
// 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef _BROWSER_CPPTOC_H
#define _BROWSER_CPPTOC_H
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_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:
CefBrowserCppToC(CefBrowser* cls);
virtual ~CefBrowserCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // _BROWSER_CPPTOC_H
// 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef _BROWSER_CPPTOC_H
#define _BROWSER_CPPTOC_H
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_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:
CefBrowserCppToC(CefBrowser* cls);
virtual ~CefBrowserCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // _BROWSER_CPPTOC_H

View File

@ -1,160 +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 _CPPTOC_H
#define _CPPTOC_H
#include "include/cef.h"
#include "include/cef_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 CefThreadSafeBase<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<BaseName> Get(StructName* s)
{
// Cast our structure to the wrapper structure type.
ClassName::Struct* wrapperStruct =
reinterpret_cast<ClassName::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)
{
// 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)
{
// Cast our structure to the wrapper structure type.
ClassName::Struct* wrapperStruct =
reinterpret_cast<ClassName::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;
}
// Structure representation with pointer to the C++ class.
struct Struct
{
StructName struct_;
CefCppToC<ClassName,BaseName,StructName>* class_;
};
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;
#ifdef _DEBUG
CefAtomicIncrement(&DebugObjCt);
#endif
}
virtual ~CefCppToC()
{
#ifdef _DEBUG
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.
virtual int AddRef()
{
UnderlyingAddRef();
return CefThreadSafeBase<CefBase>::AddRef();
}
virtual int Release()
{
UnderlyingRelease();
return CefThreadSafeBase<CefBase>::Release();
}
// Increment/decrement reference counts on only the underlying class.
int UnderlyingAddRef() { return class_->AddRef(); }
int UnderlyingRelease() { return class_->Release(); }
int UnderlyingGetRefCt() { return class_->GetRefCt(); }
#ifdef _DEBUG
// Simple tracking of allocated objects.
static long DebugObjCt;
#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:
Struct struct_;
BaseName* class_;
};
#endif // _CPPTOC_H
// 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 _CPPTOC_H
#define _CPPTOC_H
#include "include/cef.h"
#include "include/cef_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 CefThreadSafeBase<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<BaseName> Get(StructName* s)
{
// Cast our structure to the wrapper structure type.
ClassName::Struct* wrapperStruct =
reinterpret_cast<ClassName::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)
{
// 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)
{
// Cast our structure to the wrapper structure type.
ClassName::Struct* wrapperStruct =
reinterpret_cast<ClassName::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;
}
// Structure representation with pointer to the C++ class.
struct Struct
{
StructName struct_;
CefCppToC<ClassName,BaseName,StructName>* class_;
};
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;
#ifdef _DEBUG
CefAtomicIncrement(&DebugObjCt);
#endif
}
virtual ~CefCppToC()
{
#ifdef _DEBUG
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.
virtual int AddRef()
{
UnderlyingAddRef();
return CefThreadSafeBase<CefBase>::AddRef();
}
virtual int Release()
{
UnderlyingRelease();
return CefThreadSafeBase<CefBase>::Release();
}
// Increment/decrement reference counts on only the underlying class.
int UnderlyingAddRef() { return class_->AddRef(); }
int UnderlyingRelease() { return class_->Release(); }
int UnderlyingGetRefCt() { return class_->GetRefCt(); }
#ifdef _DEBUG
// Simple tracking of allocated objects.
static long DebugObjCt;
#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:
Struct struct_;
BaseName* class_;
};
#endif // _CPPTOC_H

View File

@ -1,270 +1,270 @@
// 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.
//
// ---------------------------------------------------------------------------
//
// A portion of this file was generated by the CEF translator tool. When
// making changes by hand only do so within the body of existing function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/frame_cpptoc.h"
#include "libcef_dll/cpptoc/request_cpptoc.h"
#include "libcef_dll/cpptoc/stream_reader_cpptoc.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
void CEF_CALLBACK frame_undo(struct _cef_frame_t* self)
{
DCHECK(self);
if(!self)
return;
CefFrameCppToC::Get(self)->Undo();
}
void CEF_CALLBACK frame_redo(struct _cef_frame_t* self)
{
DCHECK(self);
if(!self)
return;
CefFrameCppToC::Get(self)->Redo();
}
void CEF_CALLBACK frame_cut(struct _cef_frame_t* self)
{
DCHECK(self);
if(!self)
return;
CefFrameCppToC::Get(self)->Cut();
}
void CEF_CALLBACK frame_copy(struct _cef_frame_t* self)
{
DCHECK(self);
if(!self)
return;
CefFrameCppToC::Get(self)->Copy();
}
void CEF_CALLBACK frame_paste(struct _cef_frame_t* self)
{
DCHECK(self);
if(!self)
return;
CefFrameCppToC::Get(self)->Paste();
}
void CEF_CALLBACK frame_del(struct _cef_frame_t* self)
{
DCHECK(self);
if(!self)
return;
CefFrameCppToC::Get(self)->Delete();
}
void CEF_CALLBACK frame_select_all(struct _cef_frame_t* self)
{
DCHECK(self);
if(!self)
return;
CefFrameCppToC::Get(self)->SelectAll();
}
void CEF_CALLBACK frame_print(struct _cef_frame_t* self)
{
DCHECK(self);
if(!self)
return;
CefFrameCppToC::Get(self)->Print();
}
void CEF_CALLBACK frame_view_source(struct _cef_frame_t* self)
{
DCHECK(self);
if(!self)
return;
CefFrameCppToC::Get(self)->ViewSource();
}
cef_string_t CEF_CALLBACK frame_get_source(struct _cef_frame_t* self)
{
DCHECK(self);
if(!self)
return NULL;
std::wstring sourceStr = CefFrameCppToC::Get(self)->GetSource();
if(!sourceStr.empty())
return cef_string_alloc(sourceStr.c_str());
return NULL;
}
cef_string_t CEF_CALLBACK frame_get_text(struct _cef_frame_t* self)
{
DCHECK(self);
if(!self)
return NULL;
std::wstring textStr = CefFrameCppToC::Get(self)->GetText();
if(!textStr.empty())
return cef_string_alloc(textStr.c_str());
return NULL;
}
void CEF_CALLBACK frame_load_request(struct _cef_frame_t* self,
struct _cef_request_t* request)
{
DCHECK(self);
DCHECK(request);
if(!self || !request)
return;
CefRefPtr<CefRequest> requestPtr = CefRequestCppToC::Unwrap(request);
CefFrameCppToC::Get(self)->LoadRequest(requestPtr);
}
void CEF_CALLBACK frame_load_url(struct _cef_frame_t* self, const wchar_t* url)
{
DCHECK(self);
if(!self)
return;
std::wstring urlStr;
if(url)
urlStr = url;
CefFrameCppToC::Get(self)->LoadURL(urlStr);
}
void CEF_CALLBACK frame_load_string(struct _cef_frame_t* self,
const wchar_t* string, const wchar_t* url)
{
DCHECK(self);
if(!self)
return;
std::wstring stringStr, urlStr;
if(string)
stringStr = string;
if(url)
urlStr = url;
CefFrameCppToC::Get(self)->LoadString(stringStr, urlStr);
}
void CEF_CALLBACK frame_load_stream(struct _cef_frame_t* self,
struct _cef_stream_reader_t* stream, const wchar_t* url)
{
DCHECK(self);
DCHECK(stream);
if(!self || !stream)
return;
CefRefPtr<CefStreamReader> streamPtr = CefStreamReaderCppToC::Unwrap(stream);
std::wstring urlStr;
if(url)
urlStr = url;
CefFrameCppToC::Get(self)->LoadStream(streamPtr, urlStr);
}
void CEF_CALLBACK frame_execute_java_script(struct _cef_frame_t* self,
const wchar_t* jsCode, const wchar_t* scriptUrl, int startLine)
{
DCHECK(self);
if(!self)
return;
std::wstring jsCodeStr, scriptUrlStr;
if(jsCode)
jsCodeStr = jsCode;
if(scriptUrl)
scriptUrlStr = scriptUrl;
CefFrameCppToC::Get(self)->ExecuteJavaScript(jsCodeStr, scriptUrlStr,
startLine);
}
int CEF_CALLBACK frame_is_main(struct _cef_frame_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefFrameCppToC::Get(self)->IsMain();
}
int CEF_CALLBACK frame_is_focused(struct _cef_frame_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefFrameCppToC::Get(self)->IsFocused();
}
cef_string_t CEF_CALLBACK frame_get_name(struct _cef_frame_t* self)
{
DCHECK(self);
if(!self)
return 0;
std::wstring nameStr = CefFrameCppToC::Get(self)->GetName();
if(!nameStr.empty())
return cef_string_alloc(nameStr.c_str());
return NULL;
}
cef_string_t CEF_CALLBACK frame_get_url(struct _cef_frame_t* self)
{
DCHECK(self);
if(!self)
return NULL;
std::wstring urlStr = CefFrameCppToC::Get(self)->GetURL();
if(!urlStr.empty())
return cef_string_alloc(urlStr.c_str());
return NULL;
}
// CONSTRUCTOR - Do not edit by hand.
CefFrameCppToC::CefFrameCppToC(CefFrame* cls)
: CefCppToC<CefFrameCppToC, CefFrame, cef_frame_t>(cls)
{
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_.print = frame_print;
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_.load_stream = frame_load_stream;
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_url = frame_get_url;
}
#ifdef _DEBUG
long CefCppToC<CefFrameCppToC, CefFrame, cef_frame_t>::DebugObjCt = 0;
#endif
// 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.
//
// ---------------------------------------------------------------------------
//
// A portion of this file was generated by the CEF translator tool. When
// making changes by hand only do so within the body of existing function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/frame_cpptoc.h"
#include "libcef_dll/cpptoc/request_cpptoc.h"
#include "libcef_dll/cpptoc/stream_reader_cpptoc.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
void CEF_CALLBACK frame_undo(struct _cef_frame_t* self)
{
DCHECK(self);
if(!self)
return;
CefFrameCppToC::Get(self)->Undo();
}
void CEF_CALLBACK frame_redo(struct _cef_frame_t* self)
{
DCHECK(self);
if(!self)
return;
CefFrameCppToC::Get(self)->Redo();
}
void CEF_CALLBACK frame_cut(struct _cef_frame_t* self)
{
DCHECK(self);
if(!self)
return;
CefFrameCppToC::Get(self)->Cut();
}
void CEF_CALLBACK frame_copy(struct _cef_frame_t* self)
{
DCHECK(self);
if(!self)
return;
CefFrameCppToC::Get(self)->Copy();
}
void CEF_CALLBACK frame_paste(struct _cef_frame_t* self)
{
DCHECK(self);
if(!self)
return;
CefFrameCppToC::Get(self)->Paste();
}
void CEF_CALLBACK frame_del(struct _cef_frame_t* self)
{
DCHECK(self);
if(!self)
return;
CefFrameCppToC::Get(self)->Delete();
}
void CEF_CALLBACK frame_select_all(struct _cef_frame_t* self)
{
DCHECK(self);
if(!self)
return;
CefFrameCppToC::Get(self)->SelectAll();
}
void CEF_CALLBACK frame_print(struct _cef_frame_t* self)
{
DCHECK(self);
if(!self)
return;
CefFrameCppToC::Get(self)->Print();
}
void CEF_CALLBACK frame_view_source(struct _cef_frame_t* self)
{
DCHECK(self);
if(!self)
return;
CefFrameCppToC::Get(self)->ViewSource();
}
cef_string_t CEF_CALLBACK frame_get_source(struct _cef_frame_t* self)
{
DCHECK(self);
if(!self)
return NULL;
std::wstring sourceStr = CefFrameCppToC::Get(self)->GetSource();
if(!sourceStr.empty())
return cef_string_alloc(sourceStr.c_str());
return NULL;
}
cef_string_t CEF_CALLBACK frame_get_text(struct _cef_frame_t* self)
{
DCHECK(self);
if(!self)
return NULL;
std::wstring textStr = CefFrameCppToC::Get(self)->GetText();
if(!textStr.empty())
return cef_string_alloc(textStr.c_str());
return NULL;
}
void CEF_CALLBACK frame_load_request(struct _cef_frame_t* self,
struct _cef_request_t* request)
{
DCHECK(self);
DCHECK(request);
if(!self || !request)
return;
CefRefPtr<CefRequest> requestPtr = CefRequestCppToC::Unwrap(request);
CefFrameCppToC::Get(self)->LoadRequest(requestPtr);
}
void CEF_CALLBACK frame_load_url(struct _cef_frame_t* self, const wchar_t* url)
{
DCHECK(self);
if(!self)
return;
std::wstring urlStr;
if(url)
urlStr = url;
CefFrameCppToC::Get(self)->LoadURL(urlStr);
}
void CEF_CALLBACK frame_load_string(struct _cef_frame_t* self,
const wchar_t* string, const wchar_t* url)
{
DCHECK(self);
if(!self)
return;
std::wstring stringStr, urlStr;
if(string)
stringStr = string;
if(url)
urlStr = url;
CefFrameCppToC::Get(self)->LoadString(stringStr, urlStr);
}
void CEF_CALLBACK frame_load_stream(struct _cef_frame_t* self,
struct _cef_stream_reader_t* stream, const wchar_t* url)
{
DCHECK(self);
DCHECK(stream);
if(!self || !stream)
return;
CefRefPtr<CefStreamReader> streamPtr = CefStreamReaderCppToC::Unwrap(stream);
std::wstring urlStr;
if(url)
urlStr = url;
CefFrameCppToC::Get(self)->LoadStream(streamPtr, urlStr);
}
void CEF_CALLBACK frame_execute_java_script(struct _cef_frame_t* self,
const wchar_t* jsCode, const wchar_t* scriptUrl, int startLine)
{
DCHECK(self);
if(!self)
return;
std::wstring jsCodeStr, scriptUrlStr;
if(jsCode)
jsCodeStr = jsCode;
if(scriptUrl)
scriptUrlStr = scriptUrl;
CefFrameCppToC::Get(self)->ExecuteJavaScript(jsCodeStr, scriptUrlStr,
startLine);
}
int CEF_CALLBACK frame_is_main(struct _cef_frame_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefFrameCppToC::Get(self)->IsMain();
}
int CEF_CALLBACK frame_is_focused(struct _cef_frame_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefFrameCppToC::Get(self)->IsFocused();
}
cef_string_t CEF_CALLBACK frame_get_name(struct _cef_frame_t* self)
{
DCHECK(self);
if(!self)
return 0;
std::wstring nameStr = CefFrameCppToC::Get(self)->GetName();
if(!nameStr.empty())
return cef_string_alloc(nameStr.c_str());
return NULL;
}
cef_string_t CEF_CALLBACK frame_get_url(struct _cef_frame_t* self)
{
DCHECK(self);
if(!self)
return NULL;
std::wstring urlStr = CefFrameCppToC::Get(self)->GetURL();
if(!urlStr.empty())
return cef_string_alloc(urlStr.c_str());
return NULL;
}
// CONSTRUCTOR - Do not edit by hand.
CefFrameCppToC::CefFrameCppToC(CefFrame* cls)
: CefCppToC<CefFrameCppToC, CefFrame, cef_frame_t>(cls)
{
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_.print = frame_print;
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_.load_stream = frame_load_stream;
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_url = frame_get_url;
}
#ifdef _DEBUG
long CefCppToC<CefFrameCppToC, CefFrame, cef_frame_t>::DebugObjCt = 0;
#endif

View File

@ -1,34 +1,34 @@
// 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef _FRAME_CPPTOC_H
#define _FRAME_CPPTOC_H
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_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:
CefFrameCppToC(CefFrame* cls);
virtual ~CefFrameCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // _FRAME_CPPTOC_H
// 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef _FRAME_CPPTOC_H
#define _FRAME_CPPTOC_H
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_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:
CefFrameCppToC(CefFrame* cls);
virtual ~CefFrameCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // _FRAME_CPPTOC_H

File diff suppressed because it is too large Load Diff

View File

@ -1,34 +1,34 @@
// 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef _HANDLER_CPPTOC_H
#define _HANDLER_CPPTOC_H
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_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 CefHandlerCppToC
: public CefCppToC<CefHandlerCppToC, CefHandler, cef_handler_t>
{
public:
CefHandlerCppToC(CefHandler* cls);
virtual ~CefHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _HANDLER_CPPTOC_H
// 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef _HANDLER_CPPTOC_H
#define _HANDLER_CPPTOC_H
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_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 CefHandlerCppToC
: public CefCppToC<CefHandlerCppToC, CefHandler, cef_handler_t>
{
public:
CefHandlerCppToC(CefHandler* cls);
virtual ~CefHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _HANDLER_CPPTOC_H

View File

@ -1,106 +1,106 @@
// 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.
//
// ---------------------------------------------------------------------------
//
// A portion of this file was generated by the CEF translator tool. When
// making changes by hand only do so within the body of existing 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()
{
CefRefPtr<CefPostData> impl = CefPostData::CreatePostData();
if(impl.get())
return CefPostDataCppToC::Wrap(impl);
return NULL;
}
// MEMBER FUNCTIONS - Body may be edited by hand.
size_t CEF_CALLBACK post_data_get_element_count(struct _cef_post_data_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefPostDataCppToC::Get(self)->GetElementCount();
}
struct _cef_post_data_element_t* CEF_CALLBACK post_data_get_elements(
struct _cef_post_data_t* self, int elementIndex)
{
DCHECK(self);
if(!self)
return NULL;
CefPostData::ElementVector elements;
CefPostDataCppToC::Get(self)->GetElements(elements);
if(elementIndex < 0 || elementIndex >= (int)elements.size())
return NULL;
return CefPostDataElementCppToC::Wrap(elements[elementIndex]);
}
int CEF_CALLBACK post_data_remove_element(struct _cef_post_data_t* self,
struct _cef_post_data_element_t* element)
{
DCHECK(self);
DCHECK(element);
if(!self || !element)
return 0;
CefRefPtr<CefPostDataElement> selfElementPtr =
CefPostDataElementCppToC::Unwrap(element);
return CefPostDataCppToC::Get(self)->RemoveElement(selfElementPtr);
}
int CEF_CALLBACK post_data_add_element(struct _cef_post_data_t* self,
struct _cef_post_data_element_t* element)
{
DCHECK(self);
DCHECK(element);
if(!self || !element)
return 0;
CefRefPtr<CefPostDataElement> selfElementPtr =
CefPostDataElementCppToC::Unwrap(element);
return CefPostDataCppToC::Get(self)->AddElement(selfElementPtr);
}
void CEF_CALLBACK post_data_remove_elements(struct _cef_post_data_t* self)
{
DCHECK(self);
if(!self)
return;
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;
}
#ifdef _DEBUG
long CefCppToC<CefPostDataCppToC, CefPostData, cef_post_data_t>::DebugObjCt = 0;
#endif
// 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.
//
// ---------------------------------------------------------------------------
//
// A portion of this file was generated by the CEF translator tool. When
// making changes by hand only do so within the body of existing 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()
{
CefRefPtr<CefPostData> impl = CefPostData::CreatePostData();
if(impl.get())
return CefPostDataCppToC::Wrap(impl);
return NULL;
}
// MEMBER FUNCTIONS - Body may be edited by hand.
size_t CEF_CALLBACK post_data_get_element_count(struct _cef_post_data_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefPostDataCppToC::Get(self)->GetElementCount();
}
struct _cef_post_data_element_t* CEF_CALLBACK post_data_get_elements(
struct _cef_post_data_t* self, int elementIndex)
{
DCHECK(self);
if(!self)
return NULL;
CefPostData::ElementVector elements;
CefPostDataCppToC::Get(self)->GetElements(elements);
if(elementIndex < 0 || elementIndex >= (int)elements.size())
return NULL;
return CefPostDataElementCppToC::Wrap(elements[elementIndex]);
}
int CEF_CALLBACK post_data_remove_element(struct _cef_post_data_t* self,
struct _cef_post_data_element_t* element)
{
DCHECK(self);
DCHECK(element);
if(!self || !element)
return 0;
CefRefPtr<CefPostDataElement> selfElementPtr =
CefPostDataElementCppToC::Unwrap(element);
return CefPostDataCppToC::Get(self)->RemoveElement(selfElementPtr);
}
int CEF_CALLBACK post_data_add_element(struct _cef_post_data_t* self,
struct _cef_post_data_element_t* element)
{
DCHECK(self);
DCHECK(element);
if(!self || !element)
return 0;
CefRefPtr<CefPostDataElement> selfElementPtr =
CefPostDataElementCppToC::Unwrap(element);
return CefPostDataCppToC::Get(self)->AddElement(selfElementPtr);
}
void CEF_CALLBACK post_data_remove_elements(struct _cef_post_data_t* self)
{
DCHECK(self);
if(!self)
return;
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;
}
#ifdef _DEBUG
long CefCppToC<CefPostDataCppToC, CefPostData, cef_post_data_t>::DebugObjCt = 0;
#endif

View File

@ -1,34 +1,34 @@
// 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef _POSTDATA_CPPTOC_H
#define _POSTDATA_CPPTOC_H
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_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:
CefPostDataCppToC(CefPostData* cls);
virtual ~CefPostDataCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // _POSTDATA_CPPTOC_H
// 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef _POSTDATA_CPPTOC_H
#define _POSTDATA_CPPTOC_H
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_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:
CefPostDataCppToC(CefPostData* cls);
virtual ~CefPostDataCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // _POSTDATA_CPPTOC_H

View File

@ -1,128 +1,128 @@
// 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.
//
// ---------------------------------------------------------------------------
//
// A portion of this file was generated by the CEF translator tool. When
// making changes by hand only do so within the body of existing 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()
{
CefRefPtr<CefPostDataElement> impl =
CefPostDataElement::CreatePostDataElement();
if(impl.get())
return CefPostDataElementCppToC::Wrap(impl);
return NULL;
}
// MEMBER FUNCTIONS - Body may be edited by hand.
void CEF_CALLBACK post_data_element_set_to_empty(
struct _cef_post_data_element_t* self)
{
DCHECK(self);
if(!self)
return;
CefPostDataElementCppToC::Get(self)->SetToEmpty();
}
void CEF_CALLBACK post_data_element_set_to_file(
struct _cef_post_data_element_t* self, const wchar_t* fileName)
{
DCHECK(self);
if(!self)
return;
std::wstring fileNameStr;
if(fileName)
fileNameStr = fileName;
CefPostDataElementCppToC::Get(self)->SetToFile(fileNameStr);
}
void CEF_CALLBACK post_data_element_set_to_bytes(
struct _cef_post_data_element_t* self, size_t size, const void* bytes)
{
DCHECK(self);
if(!self)
return;
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)
{
DCHECK(self);
if(!self)
return PDE_TYPE_EMPTY;
return CefPostDataElementCppToC::Get(self)->GetType();
}
cef_string_t CEF_CALLBACK post_data_element_get_file(
struct _cef_post_data_element_t* self)
{
DCHECK(self);
if(!self)
return NULL;
std::wstring fileNameStr =
CefPostDataElementCppToC::Get(self)->GetFile();
if(!fileNameStr.empty())
return cef_string_alloc(fileNameStr.c_str());
return NULL;
}
size_t CEF_CALLBACK post_data_element_get_bytes_count(
struct _cef_post_data_element_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefPostDataElementCppToC::Get(self)->GetBytesCount();
}
size_t CEF_CALLBACK post_data_element_get_bytes(
struct _cef_post_data_element_t* self, size_t size, void* bytes)
{
DCHECK(self);
if(!self)
return 0;
return CefPostDataElementCppToC::Get(self)->GetBytes(size, bytes);
}
// 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;
}
#ifdef _DEBUG
long CefCppToC<CefPostDataElementCppToC, CefPostDataElement,
cef_post_data_element_t>::DebugObjCt = 0;
#endif
// 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.
//
// ---------------------------------------------------------------------------
//
// A portion of this file was generated by the CEF translator tool. When
// making changes by hand only do so within the body of existing 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()
{
CefRefPtr<CefPostDataElement> impl =
CefPostDataElement::CreatePostDataElement();
if(impl.get())
return CefPostDataElementCppToC::Wrap(impl);
return NULL;
}
// MEMBER FUNCTIONS - Body may be edited by hand.
void CEF_CALLBACK post_data_element_set_to_empty(
struct _cef_post_data_element_t* self)
{
DCHECK(self);
if(!self)
return;
CefPostDataElementCppToC::Get(self)->SetToEmpty();
}
void CEF_CALLBACK post_data_element_set_to_file(
struct _cef_post_data_element_t* self, const wchar_t* fileName)
{
DCHECK(self);
if(!self)
return;
std::wstring fileNameStr;
if(fileName)
fileNameStr = fileName;
CefPostDataElementCppToC::Get(self)->SetToFile(fileNameStr);
}
void CEF_CALLBACK post_data_element_set_to_bytes(
struct _cef_post_data_element_t* self, size_t size, const void* bytes)
{
DCHECK(self);
if(!self)
return;
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)
{
DCHECK(self);
if(!self)
return PDE_TYPE_EMPTY;
return CefPostDataElementCppToC::Get(self)->GetType();
}
cef_string_t CEF_CALLBACK post_data_element_get_file(
struct _cef_post_data_element_t* self)
{
DCHECK(self);
if(!self)
return NULL;
std::wstring fileNameStr =
CefPostDataElementCppToC::Get(self)->GetFile();
if(!fileNameStr.empty())
return cef_string_alloc(fileNameStr.c_str());
return NULL;
}
size_t CEF_CALLBACK post_data_element_get_bytes_count(
struct _cef_post_data_element_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefPostDataElementCppToC::Get(self)->GetBytesCount();
}
size_t CEF_CALLBACK post_data_element_get_bytes(
struct _cef_post_data_element_t* self, size_t size, void* bytes)
{
DCHECK(self);
if(!self)
return 0;
return CefPostDataElementCppToC::Get(self)->GetBytes(size, bytes);
}
// 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;
}
#ifdef _DEBUG
long CefCppToC<CefPostDataElementCppToC, CefPostDataElement,
cef_post_data_element_t>::DebugObjCt = 0;
#endif

View File

@ -1,35 +1,35 @@
// 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef _POSTDATAELEMENT_CPPTOC_H
#define _POSTDATAELEMENT_CPPTOC_H
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_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:
CefPostDataElementCppToC(CefPostDataElement* cls);
virtual ~CefPostDataElementCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // _POSTDATAELEMENT_CPPTOC_H
// 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef _POSTDATAELEMENT_CPPTOC_H
#define _POSTDATAELEMENT_CPPTOC_H
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_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:
CefPostDataElementCppToC(CefPostDataElement* cls);
virtual ~CefPostDataElementCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // _POSTDATAELEMENT_CPPTOC_H

View File

@ -1,72 +1,72 @@
// 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.
//
// ---------------------------------------------------------------------------
//
// A portion of this file was generated by the CEF translator tool. When
// making changes by hand only do so within the body of existing 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)
{
DCHECK(self);
if(!self)
return 0;
return CefReadHandlerCppToC::Get(self)->Read(ptr, size, n);
}
int CEF_CALLBACK read_handler_seek(struct _cef_read_handler_t* self,
long offset, int whence)
{
DCHECK(self);
if(!self)
return 0;
return CefReadHandlerCppToC::Get(self)->Seek(offset, whence);
}
long CEF_CALLBACK read_handler_tell(struct _cef_read_handler_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefReadHandlerCppToC::Get(self)->Tell();
}
int CEF_CALLBACK read_handler_eof(struct _cef_read_handler_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefReadHandlerCppToC::Get(self)->Eof();
}
// 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;
}
#ifdef _DEBUG
long CefCppToC<CefReadHandlerCppToC, CefReadHandler,
cef_read_handler_t>::DebugObjCt = 0;
#endif
// 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.
//
// ---------------------------------------------------------------------------
//
// A portion of this file was generated by the CEF translator tool. When
// making changes by hand only do so within the body of existing 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)
{
DCHECK(self);
if(!self)
return 0;
return CefReadHandlerCppToC::Get(self)->Read(ptr, size, n);
}
int CEF_CALLBACK read_handler_seek(struct _cef_read_handler_t* self,
long offset, int whence)
{
DCHECK(self);
if(!self)
return 0;
return CefReadHandlerCppToC::Get(self)->Seek(offset, whence);
}
long CEF_CALLBACK read_handler_tell(struct _cef_read_handler_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefReadHandlerCppToC::Get(self)->Tell();
}
int CEF_CALLBACK read_handler_eof(struct _cef_read_handler_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefReadHandlerCppToC::Get(self)->Eof();
}
// 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;
}
#ifdef _DEBUG
long CefCppToC<CefReadHandlerCppToC, CefReadHandler,
cef_read_handler_t>::DebugObjCt = 0;
#endif

View File

@ -1,34 +1,34 @@
// 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef _READHANDLER_CPPTOC_H
#define _READHANDLER_CPPTOC_H
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_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:
CefReadHandlerCppToC(CefReadHandler* cls);
virtual ~CefReadHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _READHANDLER_CPPTOC_H
// 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef _READHANDLER_CPPTOC_H
#define _READHANDLER_CPPTOC_H
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_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:
CefReadHandlerCppToC(CefReadHandler* cls);
virtual ~CefReadHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _READHANDLER_CPPTOC_H

View File

@ -1,180 +1,180 @@
// 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.
//
// ---------------------------------------------------------------------------
//
// A portion of this file was generated by the CEF translator tool. When
// making changes by hand only do so within the body of existing 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()
{
CefRefPtr<CefRequest> impl = CefRequest::CreateRequest();
if(impl.get())
return CefRequestCppToC::Wrap(impl);
return NULL;
}
// MEMBER FUNCTIONS - Body may be edited by hand.
cef_string_t CEF_CALLBACK request_get_url(struct _cef_request_t* self)
{
DCHECK(self);
if(!self)
return NULL;
std::wstring urlStr = CefRequestCppToC::Get(self)->GetURL();
if(!urlStr.empty())
return cef_string_alloc(urlStr.c_str());
return NULL;
}
void CEF_CALLBACK request_set_url(struct _cef_request_t* self,
const wchar_t* url)
{
DCHECK(self);
if(!self)
return;
std::wstring urlStr;
if(url)
urlStr = url;
CefRequestCppToC::Get(self)->SetURL(urlStr);
}
cef_string_t CEF_CALLBACK request_get_method(struct _cef_request_t* self)
{
DCHECK(self);
if(!self)
return NULL;
std::wstring methodStr = CefRequestCppToC::Get(self)->GetMethod();
if(!methodStr.empty())
return cef_string_alloc(methodStr.c_str());
return NULL;
}
void CEF_CALLBACK request_set_method(struct _cef_request_t* self,
const wchar_t* method)
{
DCHECK(self);
if(!self)
return;
std::wstring methodStr;
if(method)
methodStr = method;
CefRequestCppToC::Get(self)->SetMethod(methodStr);
}
struct _cef_post_data_t* CEF_CALLBACK request_get_post_data(
struct _cef_request_t* self)
{
DCHECK(self);
if(!self)
return NULL;
CefRefPtr<CefPostData> postDataPtr =
CefRequestCppToC::Get(self)->GetPostData();
if(!postDataPtr.get())
return NULL;
return CefPostDataCppToC::Wrap(postDataPtr);
}
void CEF_CALLBACK request_set_post_data(struct _cef_request_t* self,
struct _cef_post_data_t* postData)
{
DCHECK(self);
if(!self)
return;
CefRefPtr<CefPostData> postDataPtr;
if(postData)
postDataPtr = CefPostDataCppToC::Unwrap(postData);
CefRequestCppToC::Get(self)->SetPostData(postDataPtr);
}
void CEF_CALLBACK request_get_header_map(struct _cef_request_t* self,
cef_string_map_t headerMap)
{
DCHECK(self);
if(!self)
return;
CefRequest::HeaderMap map;
CefRequestCppToC::Get(self)->GetHeaderMap(map);
transfer_string_map_contents(map, headerMap);
}
void CEF_CALLBACK request_set_header_map(struct _cef_request_t* self,
cef_string_map_t headerMap)
{
DCHECK(self);
if(!self)
return;
CefRequest::HeaderMap map;
if(headerMap)
transfer_string_map_contents(headerMap, map);
CefRequestCppToC::Get(self)->SetHeaderMap(map);
}
void CEF_CALLBACK request_set(struct _cef_request_t* self, const wchar_t* url,
const wchar_t* method, struct _cef_post_data_t* postData,
cef_string_map_t headerMap)
{
DCHECK(self);
if(!self)
return;
std::wstring urlStr, methodStr;
CefRefPtr<CefPostData> postDataPtr;
CefRequest::HeaderMap map;
if(url)
urlStr = url;
if(method)
methodStr = method;
if(postData)
postDataPtr = CefPostDataCppToC::Unwrap(postData);
if(headerMap)
transfer_string_map_contents(headerMap, map);
CefRequestCppToC::Get(self)->Set(urlStr, methodStr, postDataPtr, map);
}
// 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;
}
#ifdef _DEBUG
long CefCppToC<CefRequestCppToC, CefRequest, cef_request_t>::DebugObjCt = 0;
#endif
// 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.
//
// ---------------------------------------------------------------------------
//
// A portion of this file was generated by the CEF translator tool. When
// making changes by hand only do so within the body of existing 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()
{
CefRefPtr<CefRequest> impl = CefRequest::CreateRequest();
if(impl.get())
return CefRequestCppToC::Wrap(impl);
return NULL;
}
// MEMBER FUNCTIONS - Body may be edited by hand.
cef_string_t CEF_CALLBACK request_get_url(struct _cef_request_t* self)
{
DCHECK(self);
if(!self)
return NULL;
std::wstring urlStr = CefRequestCppToC::Get(self)->GetURL();
if(!urlStr.empty())
return cef_string_alloc(urlStr.c_str());
return NULL;
}
void CEF_CALLBACK request_set_url(struct _cef_request_t* self,
const wchar_t* url)
{
DCHECK(self);
if(!self)
return;
std::wstring urlStr;
if(url)
urlStr = url;
CefRequestCppToC::Get(self)->SetURL(urlStr);
}
cef_string_t CEF_CALLBACK request_get_method(struct _cef_request_t* self)
{
DCHECK(self);
if(!self)
return NULL;
std::wstring methodStr = CefRequestCppToC::Get(self)->GetMethod();
if(!methodStr.empty())
return cef_string_alloc(methodStr.c_str());
return NULL;
}
void CEF_CALLBACK request_set_method(struct _cef_request_t* self,
const wchar_t* method)
{
DCHECK(self);
if(!self)
return;
std::wstring methodStr;
if(method)
methodStr = method;
CefRequestCppToC::Get(self)->SetMethod(methodStr);
}
struct _cef_post_data_t* CEF_CALLBACK request_get_post_data(
struct _cef_request_t* self)
{
DCHECK(self);
if(!self)
return NULL;
CefRefPtr<CefPostData> postDataPtr =
CefRequestCppToC::Get(self)->GetPostData();
if(!postDataPtr.get())
return NULL;
return CefPostDataCppToC::Wrap(postDataPtr);
}
void CEF_CALLBACK request_set_post_data(struct _cef_request_t* self,
struct _cef_post_data_t* postData)
{
DCHECK(self);
if(!self)
return;
CefRefPtr<CefPostData> postDataPtr;
if(postData)
postDataPtr = CefPostDataCppToC::Unwrap(postData);
CefRequestCppToC::Get(self)->SetPostData(postDataPtr);
}
void CEF_CALLBACK request_get_header_map(struct _cef_request_t* self,
cef_string_map_t headerMap)
{
DCHECK(self);
if(!self)
return;
CefRequest::HeaderMap map;
CefRequestCppToC::Get(self)->GetHeaderMap(map);
transfer_string_map_contents(map, headerMap);
}
void CEF_CALLBACK request_set_header_map(struct _cef_request_t* self,
cef_string_map_t headerMap)
{
DCHECK(self);
if(!self)
return;
CefRequest::HeaderMap map;
if(headerMap)
transfer_string_map_contents(headerMap, map);
CefRequestCppToC::Get(self)->SetHeaderMap(map);
}
void CEF_CALLBACK request_set(struct _cef_request_t* self, const wchar_t* url,
const wchar_t* method, struct _cef_post_data_t* postData,
cef_string_map_t headerMap)
{
DCHECK(self);
if(!self)
return;
std::wstring urlStr, methodStr;
CefRefPtr<CefPostData> postDataPtr;
CefRequest::HeaderMap map;
if(url)
urlStr = url;
if(method)
methodStr = method;
if(postData)
postDataPtr = CefPostDataCppToC::Unwrap(postData);
if(headerMap)
transfer_string_map_contents(headerMap, map);
CefRequestCppToC::Get(self)->Set(urlStr, methodStr, postDataPtr, map);
}
// 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;
}
#ifdef _DEBUG
long CefCppToC<CefRequestCppToC, CefRequest, cef_request_t>::DebugObjCt = 0;
#endif

View File

@ -1,34 +1,34 @@
// 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef _REQUEST_CPPTOC_H
#define _REQUEST_CPPTOC_H
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_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:
CefRequestCppToC(CefRequest* cls);
virtual ~CefRequestCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // _REQUEST_CPPTOC_H
// 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef _REQUEST_CPPTOC_H
#define _REQUEST_CPPTOC_H
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_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:
CefRequestCppToC(CefRequest* cls);
virtual ~CefRequestCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // _REQUEST_CPPTOC_H

View File

@ -1,84 +1,84 @@
// 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.
//
// ---------------------------------------------------------------------------
//
// A portion of this file was generated by the CEF translator tool. When
// making changes by hand only do so within the body of existing function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/scheme_handler_cpptoc.h"
#include "libcef_dll/ctocpp/request_ctocpp.h"
#include "libcef_dll/transfer_util.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK scheme_handler_process_request(
struct _cef_scheme_handler_t* self, cef_request_t* request,
cef_string_t* mime_type, int* response_length)
{
DCHECK(self);
DCHECK(request);
DCHECK(mime_type);
DCHECK(response_length);
if(!self || !request || !mime_type || !response_length)
return 0;
std::wstring mimeTypeStr;
if(*mime_type)
mimeTypeStr = *mime_type;
bool rv = CefSchemeHandlerCppToC::Get(self)->ProcessRequest(
CefRequestCToCpp::Wrap(request), mimeTypeStr, response_length);
transfer_string_contents(mimeTypeStr, mime_type);
return rv?1:0;
}
void CEF_CALLBACK scheme_handler_cancel(struct _cef_scheme_handler_t* self)
{
DCHECK(self);
if(!self)
return;
CefSchemeHandlerCppToC::Get(self)->Cancel();
}
int CEF_CALLBACK scheme_handler_read_response(
struct _cef_scheme_handler_t* self, void* data_out, int bytes_to_read,
int* bytes_read)
{
DCHECK(self);
DCHECK(data_out);
DCHECK(bytes_read);
if(!self || !data_out || !bytes_read)
return 0;
bool rv = CefSchemeHandlerCppToC::Get(self)->ReadResponse(
data_out, bytes_to_read, bytes_read);
return rv?1:0;
}
// CONSTRUCTOR - Do not edit by hand.
CefSchemeHandlerCppToC::CefSchemeHandlerCppToC(CefSchemeHandler* cls)
: CefCppToC<CefSchemeHandlerCppToC, CefSchemeHandler, cef_scheme_handler_t>(
cls)
{
struct_.struct_.process_request = scheme_handler_process_request;
struct_.struct_.cancel = scheme_handler_cancel;
struct_.struct_.read_response = scheme_handler_read_response;
}
#ifdef _DEBUG
long CefCppToC<CefSchemeHandlerCppToC, CefSchemeHandler,
cef_scheme_handler_t>::DebugObjCt = 0;
#endif
// 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.
//
// ---------------------------------------------------------------------------
//
// A portion of this file was generated by the CEF translator tool. When
// making changes by hand only do so within the body of existing function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/scheme_handler_cpptoc.h"
#include "libcef_dll/ctocpp/request_ctocpp.h"
#include "libcef_dll/transfer_util.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK scheme_handler_process_request(
struct _cef_scheme_handler_t* self, cef_request_t* request,
cef_string_t* mime_type, int* response_length)
{
DCHECK(self);
DCHECK(request);
DCHECK(mime_type);
DCHECK(response_length);
if(!self || !request || !mime_type || !response_length)
return 0;
std::wstring mimeTypeStr;
if(*mime_type)
mimeTypeStr = *mime_type;
bool rv = CefSchemeHandlerCppToC::Get(self)->ProcessRequest(
CefRequestCToCpp::Wrap(request), mimeTypeStr, response_length);
transfer_string_contents(mimeTypeStr, mime_type);
return rv?1:0;
}
void CEF_CALLBACK scheme_handler_cancel(struct _cef_scheme_handler_t* self)
{
DCHECK(self);
if(!self)
return;
CefSchemeHandlerCppToC::Get(self)->Cancel();
}
int CEF_CALLBACK scheme_handler_read_response(
struct _cef_scheme_handler_t* self, void* data_out, int bytes_to_read,
int* bytes_read)
{
DCHECK(self);
DCHECK(data_out);
DCHECK(bytes_read);
if(!self || !data_out || !bytes_read)
return 0;
bool rv = CefSchemeHandlerCppToC::Get(self)->ReadResponse(
data_out, bytes_to_read, bytes_read);
return rv?1:0;
}
// CONSTRUCTOR - Do not edit by hand.
CefSchemeHandlerCppToC::CefSchemeHandlerCppToC(CefSchemeHandler* cls)
: CefCppToC<CefSchemeHandlerCppToC, CefSchemeHandler, cef_scheme_handler_t>(
cls)
{
struct_.struct_.process_request = scheme_handler_process_request;
struct_.struct_.cancel = scheme_handler_cancel;
struct_.struct_.read_response = scheme_handler_read_response;
}
#ifdef _DEBUG
long CefCppToC<CefSchemeHandlerCppToC, CefSchemeHandler,
cef_scheme_handler_t>::DebugObjCt = 0;
#endif

View File

@ -1,35 +1,35 @@
// 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef _SCHEMEHANDLER_CPPTOC_H
#define _SCHEMEHANDLER_CPPTOC_H
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_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 CefSchemeHandlerCppToC
: public CefCppToC<CefSchemeHandlerCppToC, CefSchemeHandler,
cef_scheme_handler_t>
{
public:
CefSchemeHandlerCppToC(CefSchemeHandler* cls);
virtual ~CefSchemeHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _SCHEMEHANDLER_CPPTOC_H
// 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef _SCHEMEHANDLER_CPPTOC_H
#define _SCHEMEHANDLER_CPPTOC_H
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_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 CefSchemeHandlerCppToC
: public CefCppToC<CefSchemeHandlerCppToC, CefSchemeHandler,
cef_scheme_handler_t>
{
public:
CefSchemeHandlerCppToC(CefSchemeHandler* cls);
virtual ~CefSchemeHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _SCHEMEHANDLER_CPPTOC_H

View File

@ -1,43 +1,43 @@
// 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.
//
// ---------------------------------------------------------------------------
//
// A portion of this file was generated by the CEF translator tool. When
// making changes by hand only do so within the body of existing function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/scheme_handler_cpptoc.h"
#include "libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
struct _cef_scheme_handler_t* CEF_CALLBACK scheme_handler_factory_create(
struct _cef_scheme_handler_factory_t* self)
{
CefRefPtr<CefSchemeHandler> rv =
CefSchemeHandlerFactoryCppToC::Get(self)->Create();
return CefSchemeHandlerCppToC::Wrap(rv);
}
// 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;
}
#ifdef _DEBUG
long CefCppToC<CefSchemeHandlerFactoryCppToC, CefSchemeHandlerFactory,
cef_scheme_handler_factory_t>::DebugObjCt = 0;
#endif
// 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.
//
// ---------------------------------------------------------------------------
//
// A portion of this file was generated by the CEF translator tool. When
// making changes by hand only do so within the body of existing function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/scheme_handler_cpptoc.h"
#include "libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
struct _cef_scheme_handler_t* CEF_CALLBACK scheme_handler_factory_create(
struct _cef_scheme_handler_factory_t* self)
{
CefRefPtr<CefSchemeHandler> rv =
CefSchemeHandlerFactoryCppToC::Get(self)->Create();
return CefSchemeHandlerCppToC::Wrap(rv);
}
// 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;
}
#ifdef _DEBUG
long CefCppToC<CefSchemeHandlerFactoryCppToC, CefSchemeHandlerFactory,
cef_scheme_handler_factory_t>::DebugObjCt = 0;
#endif

View File

@ -1,35 +1,35 @@
// 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef _SCHEMEHANDLERFACTORY_CPPTOC_H
#define _SCHEMEHANDLERFACTORY_CPPTOC_H
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_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:
CefSchemeHandlerFactoryCppToC(CefSchemeHandlerFactory* cls);
virtual ~CefSchemeHandlerFactoryCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _SCHEMEHANDLERFACTORY_CPPTOC_H
// 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef _SCHEMEHANDLERFACTORY_CPPTOC_H
#define _SCHEMEHANDLERFACTORY_CPPTOC_H
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_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:
CefSchemeHandlerFactoryCppToC(CefSchemeHandlerFactory* cls);
virtual ~CefSchemeHandlerFactoryCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _SCHEMEHANDLERFACTORY_CPPTOC_H

View File

@ -1,108 +1,108 @@
// 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.
//
// ---------------------------------------------------------------------------
//
// A portion of this file was generated by the CEF translator tool. When
// making changes by hand only do so within the body of existing 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 wchar_t* fileName)
{
std::wstring filenamestr;
if(fileName)
filenamestr = fileName;
CefRefPtr<CefStreamReader> impl = CefStreamReader::CreateForFile(filenamestr);
if(impl.get())
return CefStreamReaderCppToC::Wrap(impl);
return NULL;
}
CEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_data(void* data,
size_t size)
{
CefRefPtr<CefStreamReader> impl = CefStreamReader::CreateForData(data, size);
if(impl.get())
return CefStreamReaderCppToC::Wrap(impl);
return NULL;
}
CEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_handler(
cef_read_handler_t* handler)
{
CefRefPtr<CefStreamReader> impl =
CefStreamReader::CreateForHandler(CefReadHandlerCToCpp::Wrap(handler));
if(impl.get())
return CefStreamReaderCppToC::Wrap(impl);
return NULL;
}
// 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)
{
DCHECK(self);
if(!self)
return 0;
return CefStreamReaderCppToC::Get(self)->Read(ptr, size, n);
}
int CEF_CALLBACK stream_reader_seek(struct _cef_stream_reader_t* self,
long offset, int whence)
{
DCHECK(self);
if(!self)
return 0;
return CefStreamReaderCppToC::Get(self)->Seek(offset, whence);
}
long CEF_CALLBACK stream_reader_tell(struct _cef_stream_reader_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefStreamReaderCppToC::Get(self)->Tell();
}
int CEF_CALLBACK stream_reader_eof(struct _cef_stream_reader_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefStreamReaderCppToC::Get(self)->Eof();
}
// 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;
}
#ifdef _DEBUG
long CefCppToC<CefStreamReaderCppToC, CefStreamReader,
cef_stream_reader_t>::DebugObjCt = 0;
#endif
// 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.
//
// ---------------------------------------------------------------------------
//
// A portion of this file was generated by the CEF translator tool. When
// making changes by hand only do so within the body of existing 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 wchar_t* fileName)
{
std::wstring filenamestr;
if(fileName)
filenamestr = fileName;
CefRefPtr<CefStreamReader> impl = CefStreamReader::CreateForFile(filenamestr);
if(impl.get())
return CefStreamReaderCppToC::Wrap(impl);
return NULL;
}
CEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_data(void* data,
size_t size)
{
CefRefPtr<CefStreamReader> impl = CefStreamReader::CreateForData(data, size);
if(impl.get())
return CefStreamReaderCppToC::Wrap(impl);
return NULL;
}
CEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_handler(
cef_read_handler_t* handler)
{
CefRefPtr<CefStreamReader> impl =
CefStreamReader::CreateForHandler(CefReadHandlerCToCpp::Wrap(handler));
if(impl.get())
return CefStreamReaderCppToC::Wrap(impl);
return NULL;
}
// 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)
{
DCHECK(self);
if(!self)
return 0;
return CefStreamReaderCppToC::Get(self)->Read(ptr, size, n);
}
int CEF_CALLBACK stream_reader_seek(struct _cef_stream_reader_t* self,
long offset, int whence)
{
DCHECK(self);
if(!self)
return 0;
return CefStreamReaderCppToC::Get(self)->Seek(offset, whence);
}
long CEF_CALLBACK stream_reader_tell(struct _cef_stream_reader_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefStreamReaderCppToC::Get(self)->Tell();
}
int CEF_CALLBACK stream_reader_eof(struct _cef_stream_reader_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefStreamReaderCppToC::Get(self)->Eof();
}
// 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;
}
#ifdef _DEBUG
long CefCppToC<CefStreamReaderCppToC, CefStreamReader,
cef_stream_reader_t>::DebugObjCt = 0;
#endif

View File

@ -1,35 +1,35 @@
// 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef _STREAMREADER_CPPTOC_H
#define _STREAMREADER_CPPTOC_H
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_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:
CefStreamReaderCppToC(CefStreamReader* cls);
virtual ~CefStreamReaderCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // _STREAMREADER_CPPTOC_H
// 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef _STREAMREADER_CPPTOC_H
#define _STREAMREADER_CPPTOC_H
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_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:
CefStreamReaderCppToC(CefStreamReader* cls);
virtual ~CefStreamReaderCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // _STREAMREADER_CPPTOC_H

View File

@ -1,105 +1,105 @@
// 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.
//
// ---------------------------------------------------------------------------
//
// A portion of this file was generated by the CEF translator tool. When
// making changes by hand only do so within the body of existing 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 wchar_t* fileName)
{
DCHECK(fileName);
if(!fileName)
return NULL;
std::wstring fileNameStr = fileName;
CefRefPtr<CefStreamWriter> impl = CefStreamWriter::CreateForFile(fileName);
if(impl.get())
return CefStreamWriterCppToC::Wrap(impl);
return NULL;
}
CEF_EXPORT cef_stream_writer_t* cef_stream_writer_create_for_handler(
cef_write_handler_t* handler)
{
DCHECK(handler);
if(!handler)
return NULL;
CefRefPtr<CefStreamWriter> impl =
CefStreamWriter::CreateForHandler(CefWriteHandlerCToCpp::Wrap(handler));
if(impl.get())
return CefStreamWriterCppToC::Wrap(impl);
return NULL;
}
// 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)
{
DCHECK(self);
if(!self)
return 0;
return CefStreamWriterCppToC::Get(self)->Write(ptr, size, n);
}
int CEF_CALLBACK stream_writer_seek(struct _cef_stream_writer_t* self,
long offset, int whence)
{
DCHECK(self);
if(!self)
return 0;
return CefStreamWriterCppToC::Get(self)->Seek(offset, whence);
}
long CEF_CALLBACK stream_writer_tell(struct _cef_stream_writer_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefStreamWriterCppToC::Get(self)->Tell();
}
int CEF_CALLBACK stream_writer_flush(struct _cef_stream_writer_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefStreamWriterCppToC::Get(self)->Flush();
}
// 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;
}
#ifdef _DEBUG
long CefCppToC<CefStreamWriterCppToC, CefStreamWriter,
cef_stream_writer_t>::DebugObjCt = 0;
#endif
// 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.
//
// ---------------------------------------------------------------------------
//
// A portion of this file was generated by the CEF translator tool. When
// making changes by hand only do so within the body of existing 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 wchar_t* fileName)
{
DCHECK(fileName);
if(!fileName)
return NULL;
std::wstring fileNameStr = fileName;
CefRefPtr<CefStreamWriter> impl = CefStreamWriter::CreateForFile(fileName);
if(impl.get())
return CefStreamWriterCppToC::Wrap(impl);
return NULL;
}
CEF_EXPORT cef_stream_writer_t* cef_stream_writer_create_for_handler(
cef_write_handler_t* handler)
{
DCHECK(handler);
if(!handler)
return NULL;
CefRefPtr<CefStreamWriter> impl =
CefStreamWriter::CreateForHandler(CefWriteHandlerCToCpp::Wrap(handler));
if(impl.get())
return CefStreamWriterCppToC::Wrap(impl);
return NULL;
}
// 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)
{
DCHECK(self);
if(!self)
return 0;
return CefStreamWriterCppToC::Get(self)->Write(ptr, size, n);
}
int CEF_CALLBACK stream_writer_seek(struct _cef_stream_writer_t* self,
long offset, int whence)
{
DCHECK(self);
if(!self)
return 0;
return CefStreamWriterCppToC::Get(self)->Seek(offset, whence);
}
long CEF_CALLBACK stream_writer_tell(struct _cef_stream_writer_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefStreamWriterCppToC::Get(self)->Tell();
}
int CEF_CALLBACK stream_writer_flush(struct _cef_stream_writer_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefStreamWriterCppToC::Get(self)->Flush();
}
// 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;
}
#ifdef _DEBUG
long CefCppToC<CefStreamWriterCppToC, CefStreamWriter,
cef_stream_writer_t>::DebugObjCt = 0;
#endif

View File

@ -1,35 +1,35 @@
// 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef _STREAMWRITER_CPPTOC_H
#define _STREAMWRITER_CPPTOC_H
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_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:
CefStreamWriterCppToC(CefStreamWriter* cls);
virtual ~CefStreamWriterCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // _STREAMWRITER_CPPTOC_H
// 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef _STREAMWRITER_CPPTOC_H
#define _STREAMWRITER_CPPTOC_H
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_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:
CefStreamWriterCppToC(CefStreamWriter* cls);
virtual ~CefStreamWriterCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // _STREAMWRITER_CPPTOC_H

View File

@ -1,40 +1,40 @@
// 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.
//
// ---------------------------------------------------------------------------
//
// A portion of this file was generated by the CEF translator tool. When
// making changes by hand only do so within the body of existing 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)
{
DCHECK(self);
if(!self)
return;
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;
}
#ifdef _DEBUG
long CefCppToC<CefTaskCppToC, CefTask, cef_task_t>::DebugObjCt = 0;
#endif
// 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.
//
// ---------------------------------------------------------------------------
//
// A portion of this file was generated by the CEF translator tool. When
// making changes by hand only do so within the body of existing 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)
{
DCHECK(self);
if(!self)
return;
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;
}
#ifdef _DEBUG
long CefCppToC<CefTaskCppToC, CefTask, cef_task_t>::DebugObjCt = 0;
#endif

View File

@ -1,34 +1,34 @@
// 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef _TASK_CPPTOC_H
#define _TASK_CPPTOC_H
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_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:
CefTaskCppToC(CefTask* cls);
virtual ~CefTaskCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _TASK_CPPTOC_H
// 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef _TASK_CPPTOC_H
#define _TASK_CPPTOC_H
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_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:
CefTaskCppToC(CefTask* cls);
virtual ~CefTaskCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _TASK_CPPTOC_H

View File

@ -1,68 +1,68 @@
// 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.
//
// ---------------------------------------------------------------------------
//
// A portion of this file was generated by the CEF translator tool. When
// making changes by hand only do so within the body of existing 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 wchar_t* name, struct _cef_v8value_t* object, size_t argumentCount,
struct _cef_v8value_t* const* arguments, struct _cef_v8value_t** retval,
cef_string_t* exception)
{
DCHECK(self);
if(!self)
return RV_CONTINUE;
CefRefPtr<CefV8Value> objectPtr;
if(object)
objectPtr = CefV8ValueCToCpp::Wrap(object);
std::wstring nameStr;
if(name)
nameStr = name;
CefV8ValueList list;
for(size_t i = 0; i < argumentCount; ++i) {
list.push_back(CefV8ValueCToCpp::Wrap(arguments[i]));
}
CefRefPtr<CefV8Value> retValPtr;
std::wstring exceptionStr;
bool rv = CefV8HandlerCppToC::Get(self)->Execute(nameStr, objectPtr,
list, retValPtr, exceptionStr);
if(rv) {
if(!exceptionStr.empty() && exception)
*exception = cef_string_alloc(exceptionStr.c_str());
if(retValPtr.get() && retval)
*retval = CefV8ValueCToCpp::Unwrap(retValPtr);
}
return rv;
}
// CONSTRUCTOR - Do not edit by hand.
CefV8HandlerCppToC::CefV8HandlerCppToC(CefV8Handler* cls)
: CefCppToC<CefV8HandlerCppToC, CefV8Handler, cef_v8handler_t>(cls)
{
struct_.struct_.execute = v8handler_execute;
}
#ifdef _DEBUG
long CefCppToC<CefV8HandlerCppToC, CefV8Handler, cef_v8handler_t>::DebugObjCt =
0;
#endif
// 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.
//
// ---------------------------------------------------------------------------
//
// A portion of this file was generated by the CEF translator tool. When
// making changes by hand only do so within the body of existing 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 wchar_t* name, struct _cef_v8value_t* object, size_t argumentCount,
struct _cef_v8value_t* const* arguments, struct _cef_v8value_t** retval,
cef_string_t* exception)
{
DCHECK(self);
if(!self)
return RV_CONTINUE;
CefRefPtr<CefV8Value> objectPtr;
if(object)
objectPtr = CefV8ValueCToCpp::Wrap(object);
std::wstring nameStr;
if(name)
nameStr = name;
CefV8ValueList list;
for(size_t i = 0; i < argumentCount; ++i) {
list.push_back(CefV8ValueCToCpp::Wrap(arguments[i]));
}
CefRefPtr<CefV8Value> retValPtr;
std::wstring exceptionStr;
bool rv = CefV8HandlerCppToC::Get(self)->Execute(nameStr, objectPtr,
list, retValPtr, exceptionStr);
if(rv) {
if(!exceptionStr.empty() && exception)
*exception = cef_string_alloc(exceptionStr.c_str());
if(retValPtr.get() && retval)
*retval = CefV8ValueCToCpp::Unwrap(retValPtr);
}
return rv;
}
// CONSTRUCTOR - Do not edit by hand.
CefV8HandlerCppToC::CefV8HandlerCppToC(CefV8Handler* cls)
: CefCppToC<CefV8HandlerCppToC, CefV8Handler, cef_v8handler_t>(cls)
{
struct_.struct_.execute = v8handler_execute;
}
#ifdef _DEBUG
long CefCppToC<CefV8HandlerCppToC, CefV8Handler, cef_v8handler_t>::DebugObjCt =
0;
#endif

View File

@ -1,34 +1,34 @@
// 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef _V8HANDLER_CPPTOC_H
#define _V8HANDLER_CPPTOC_H
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_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:
CefV8HandlerCppToC(CefV8Handler* cls);
virtual ~CefV8HandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _V8HANDLER_CPPTOC_H
// 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef _V8HANDLER_CPPTOC_H
#define _V8HANDLER_CPPTOC_H
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_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:
CefV8HandlerCppToC(CefV8Handler* cls);
virtual ~CefV8HandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _V8HANDLER_CPPTOC_H

View File

@ -1,462 +1,462 @@
// 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.
//
// ---------------------------------------------------------------------------
//
// A portion of this file was generated by the CEF translator tool. When
// making changes by hand only do so within the body of existing function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/v8value_cpptoc.h"
#include "libcef_dll/ctocpp/base_ctocpp.h"
#include "libcef_dll/ctocpp/v8handler_ctocpp.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT cef_v8value_t* cef_v8value_create_undefined()
{
CefRefPtr<CefV8Value> impl = CefV8Value::CreateUndefined();
if(impl.get())
return CefV8ValueCppToC::Wrap(impl);
return NULL;
}
CEF_EXPORT cef_v8value_t* cef_v8value_create_null()
{
CefRefPtr<CefV8Value> impl = CefV8Value::CreateNull();
if(impl.get())
return CefV8ValueCppToC::Wrap(impl);
return NULL;
}
CEF_EXPORT cef_v8value_t* cef_v8value_create_bool(int value)
{
CefRefPtr<CefV8Value> impl = CefV8Value::CreateBool(value?true:false);
if(impl.get())
return CefV8ValueCppToC::Wrap(impl);
return NULL;
}
CEF_EXPORT cef_v8value_t* cef_v8value_create_int(int value)
{
CefRefPtr<CefV8Value> impl = CefV8Value::CreateInt(value);
if(impl.get())
return CefV8ValueCppToC::Wrap(impl);
return NULL;
}
CEF_EXPORT cef_v8value_t* cef_v8value_create_double(double value)
{
CefRefPtr<CefV8Value> impl = CefV8Value::CreateDouble(value);
if(impl.get())
return CefV8ValueCppToC::Wrap(impl);
return NULL;
}
CEF_EXPORT cef_v8value_t* cef_v8value_create_string(const wchar_t* value)
{
std::wstring valueStr;
if(value)
valueStr = value;
CefRefPtr<CefV8Value> impl = CefV8Value::CreateString(valueStr);
if(impl.get())
return CefV8ValueCppToC::Wrap(impl);
return NULL;
}
CEF_EXPORT cef_v8value_t* cef_v8value_create_object(cef_base_t* user_data)
{
CefRefPtr<CefBase> basePtr;
if(user_data)
basePtr = CefBaseCToCpp::Wrap(user_data);
CefRefPtr<CefV8Value> impl = CefV8Value::CreateObject(basePtr);
if(impl.get())
return CefV8ValueCppToC::Wrap(impl);
return NULL;
}
CEF_EXPORT cef_v8value_t* cef_v8value_create_array()
{
CefRefPtr<CefV8Value> impl = CefV8Value::CreateArray();
if(impl.get())
return CefV8ValueCppToC::Wrap(impl);
return NULL;
}
CEF_EXPORT cef_v8value_t* cef_v8value_create_function(const wchar_t* name,
cef_v8handler_t* handler)
{
std::wstring nameStr;
if(name)
nameStr = name;
CefRefPtr<CefV8Handler> handlerPtr;
if(handler)
handlerPtr = CefV8HandlerCToCpp::Wrap(handler);
CefRefPtr<CefV8Value> impl = CefV8Value::CreateFunction(nameStr, handlerPtr);
if(impl.get())
return CefV8ValueCppToC::Wrap(impl);
return NULL;
}
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK v8value_is_undefined(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefV8ValueCppToC::Get(self)->IsUndefined();
}
int CEF_CALLBACK v8value_is_null(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefV8ValueCppToC::Get(self)->IsNull();
}
int CEF_CALLBACK v8value_is_bool(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefV8ValueCppToC::Get(self)->IsBool();
}
int CEF_CALLBACK v8value_is_int(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefV8ValueCppToC::Get(self)->IsInt();
}
int CEF_CALLBACK v8value_is_double(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefV8ValueCppToC::Get(self)->IsDouble();
}
int CEF_CALLBACK v8value_is_string(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefV8ValueCppToC::Get(self)->IsString();
}
int CEF_CALLBACK v8value_is_object(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefV8ValueCppToC::Get(self)->IsObject();
}
int CEF_CALLBACK v8value_is_array(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefV8ValueCppToC::Get(self)->IsArray();
}
int CEF_CALLBACK v8value_is_function(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefV8ValueCppToC::Get(self)->IsFunction();
}
int CEF_CALLBACK v8value_get_bool_value(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefV8ValueCppToC::Get(self)->GetBoolValue();
}
int CEF_CALLBACK v8value_get_int_value(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefV8ValueCppToC::Get(self)->GetIntValue();
}
double CEF_CALLBACK v8value_get_double_value(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefV8ValueCppToC::Get(self)->GetDoubleValue();
}
cef_string_t CEF_CALLBACK v8value_get_string_value(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
std::wstring valueStr = CefV8ValueCppToC::Get(self)->GetStringValue();
if(!valueStr.empty())
return cef_string_alloc(valueStr.c_str());
return NULL;
}
int CEF_CALLBACK v8value_has_value_bykey(struct _cef_v8value_t* self,
const wchar_t* key)
{
DCHECK(self);
if(!self)
return 0;
std::wstring keyStr;
if(key)
keyStr = key;
return CefV8ValueCppToC::Get(self)->HasValue(keyStr);
}
int CEF_CALLBACK v8value_has_value_byindex(struct _cef_v8value_t* self,
int index)
{
DCHECK(self);
if(!self)
return 0;
return CefV8ValueCppToC::Get(self)->HasValue(index);
}
int CEF_CALLBACK v8value_delete_value_bykey(struct _cef_v8value_t* self,
const wchar_t* key)
{
DCHECK(self);
if(!self)
return 0;
std::wstring keyStr;
if(key)
keyStr = key;
return CefV8ValueCppToC::Get(self)->DeleteValue(keyStr);
}
int CEF_CALLBACK v8value_delete_value_byindex(struct _cef_v8value_t* self,
int index)
{
DCHECK(self);
if(!self)
return 0;
return CefV8ValueCppToC::Get(self)->DeleteValue(index);
}
struct _cef_v8value_t* CEF_CALLBACK v8value_get_value_bykey(
struct _cef_v8value_t* self, const wchar_t* key)
{
DCHECK(self);
if(!self)
return 0;
std::wstring keyStr;
if(key)
keyStr = key;
CefRefPtr<CefV8Value> valuePtr =
CefV8ValueCppToC::Get(self)->GetValue(keyStr);
return CefV8ValueCppToC::Wrap(valuePtr);
}
struct _cef_v8value_t* CEF_CALLBACK v8value_get_value_byindex(
struct _cef_v8value_t* self, int index)
{
DCHECK(self);
if(!self)
return 0;
CefRefPtr<CefV8Value> valuePtr =
CefV8ValueCppToC::Get(self)->GetValue(index);
return CefV8ValueCppToC::Wrap(valuePtr);
}
int CEF_CALLBACK v8value_set_value_bykey(struct _cef_v8value_t* self,
const wchar_t* key, struct _cef_v8value_t* value)
{
DCHECK(self);
if(!self)
return 0;
std::wstring keyStr;
if(key)
keyStr = key;
CefRefPtr<CefV8Value> valuePtr = CefV8ValueCppToC::Unwrap(value);
return CefV8ValueCppToC::Get(self)->SetValue(keyStr, valuePtr);
}
int CEF_CALLBACK v8value_set_value_byindex(struct _cef_v8value_t* self,
int index, struct _cef_v8value_t* value)
{
DCHECK(self);
if(!self)
return 0;
CefRefPtr<CefV8Value> valuePtr = CefV8ValueCppToC::Unwrap(value);
return CefV8ValueCppToC::Get(self)->SetValue(index, valuePtr);
}
int CEF_CALLBACK v8value_get_keys(struct _cef_v8value_t* self,
cef_string_list_t keys)
{
DCHECK(self);
if(!self)
return 0;
std::vector<std::wstring> keysList;
CefV8ValueCppToC::Get(self)->GetKeys(keysList);
size_t size = keysList.size();
for(size_t i = 0; i < size; ++i)
cef_string_list_append(keys, keysList[i].c_str());
return size;
}
cef_base_t* CEF_CALLBACK v8value_get_user_data(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
CefRefPtr<CefBase> base = CefV8ValueCppToC::Get(self)->GetUserData();
if(base.get())
return CefBaseCToCpp::Unwrap(base);
return NULL;
}
int CEF_CALLBACK v8value_get_array_length(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefV8ValueCppToC::Get(self)->GetArrayLength();
}
cef_string_t CEF_CALLBACK v8value_get_function_name(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
std::wstring functionNameStr =
CefV8ValueCppToC::Get(self)->GetFunctionName();
if(!functionNameStr.empty())
return cef_string_alloc(functionNameStr.c_str());
return NULL;
}
cef_v8handler_t* CEF_CALLBACK v8value_get_function_handler(
struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
CefRefPtr<CefV8Handler> handlerPtr =
CefV8ValueCppToC::Get(self)->GetFunctionHandler();
if(handlerPtr.get())
return CefV8HandlerCToCpp::Unwrap(handlerPtr);
return NULL;
}
int CEF_CALLBACK v8value_execute_function(struct _cef_v8value_t* self,
struct _cef_v8value_t* object, size_t argumentCount,
struct _cef_v8value_t* const* arguments, struct _cef_v8value_t** retval,
cef_string_t* exception)
{
DCHECK(self);
DCHECK(object);
if(!self || !object)
return 0;
CefRefPtr<CefV8Value> objectPtr = CefV8ValueCppToC::Unwrap(object);
CefV8ValueList argsList;
for(size_t i = 0; i < argumentCount; i++) {
argsList.push_back(CefV8ValueCppToC::Unwrap(arguments[i]));
}
CefRefPtr<CefV8Value> retvalPtr;
std::wstring exceptionStr;
bool rv = CefV8ValueCppToC::Get(self)->ExecuteFunction(objectPtr,
argsList, retvalPtr, exceptionStr);
if(retvalPtr.get() && retval)
*retval = CefV8ValueCppToC::Wrap(retvalPtr);
if(!exceptionStr.empty() && exception)
*exception = cef_string_alloc(exceptionStr.c_str());
return rv;
}
// 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_double = v8value_is_double;
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_.get_bool_value = v8value_get_bool_value;
struct_.struct_.get_int_value = v8value_get_int_value;
struct_.struct_.get_double_value = v8value_get_double_value;
struct_.struct_.get_string_value = v8value_get_string_value;
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_.get_keys = v8value_get_keys;
struct_.struct_.get_user_data = v8value_get_user_data;
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;
}
#ifdef _DEBUG
long CefCppToC<CefV8ValueCppToC, CefV8Value, cef_v8value_t>::DebugObjCt = 0;
#endif
// 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.
//
// ---------------------------------------------------------------------------
//
// A portion of this file was generated by the CEF translator tool. When
// making changes by hand only do so within the body of existing function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/v8value_cpptoc.h"
#include "libcef_dll/ctocpp/base_ctocpp.h"
#include "libcef_dll/ctocpp/v8handler_ctocpp.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT cef_v8value_t* cef_v8value_create_undefined()
{
CefRefPtr<CefV8Value> impl = CefV8Value::CreateUndefined();
if(impl.get())
return CefV8ValueCppToC::Wrap(impl);
return NULL;
}
CEF_EXPORT cef_v8value_t* cef_v8value_create_null()
{
CefRefPtr<CefV8Value> impl = CefV8Value::CreateNull();
if(impl.get())
return CefV8ValueCppToC::Wrap(impl);
return NULL;
}
CEF_EXPORT cef_v8value_t* cef_v8value_create_bool(int value)
{
CefRefPtr<CefV8Value> impl = CefV8Value::CreateBool(value?true:false);
if(impl.get())
return CefV8ValueCppToC::Wrap(impl);
return NULL;
}
CEF_EXPORT cef_v8value_t* cef_v8value_create_int(int value)
{
CefRefPtr<CefV8Value> impl = CefV8Value::CreateInt(value);
if(impl.get())
return CefV8ValueCppToC::Wrap(impl);
return NULL;
}
CEF_EXPORT cef_v8value_t* cef_v8value_create_double(double value)
{
CefRefPtr<CefV8Value> impl = CefV8Value::CreateDouble(value);
if(impl.get())
return CefV8ValueCppToC::Wrap(impl);
return NULL;
}
CEF_EXPORT cef_v8value_t* cef_v8value_create_string(const wchar_t* value)
{
std::wstring valueStr;
if(value)
valueStr = value;
CefRefPtr<CefV8Value> impl = CefV8Value::CreateString(valueStr);
if(impl.get())
return CefV8ValueCppToC::Wrap(impl);
return NULL;
}
CEF_EXPORT cef_v8value_t* cef_v8value_create_object(cef_base_t* user_data)
{
CefRefPtr<CefBase> basePtr;
if(user_data)
basePtr = CefBaseCToCpp::Wrap(user_data);
CefRefPtr<CefV8Value> impl = CefV8Value::CreateObject(basePtr);
if(impl.get())
return CefV8ValueCppToC::Wrap(impl);
return NULL;
}
CEF_EXPORT cef_v8value_t* cef_v8value_create_array()
{
CefRefPtr<CefV8Value> impl = CefV8Value::CreateArray();
if(impl.get())
return CefV8ValueCppToC::Wrap(impl);
return NULL;
}
CEF_EXPORT cef_v8value_t* cef_v8value_create_function(const wchar_t* name,
cef_v8handler_t* handler)
{
std::wstring nameStr;
if(name)
nameStr = name;
CefRefPtr<CefV8Handler> handlerPtr;
if(handler)
handlerPtr = CefV8HandlerCToCpp::Wrap(handler);
CefRefPtr<CefV8Value> impl = CefV8Value::CreateFunction(nameStr, handlerPtr);
if(impl.get())
return CefV8ValueCppToC::Wrap(impl);
return NULL;
}
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK v8value_is_undefined(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefV8ValueCppToC::Get(self)->IsUndefined();
}
int CEF_CALLBACK v8value_is_null(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefV8ValueCppToC::Get(self)->IsNull();
}
int CEF_CALLBACK v8value_is_bool(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefV8ValueCppToC::Get(self)->IsBool();
}
int CEF_CALLBACK v8value_is_int(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefV8ValueCppToC::Get(self)->IsInt();
}
int CEF_CALLBACK v8value_is_double(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefV8ValueCppToC::Get(self)->IsDouble();
}
int CEF_CALLBACK v8value_is_string(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefV8ValueCppToC::Get(self)->IsString();
}
int CEF_CALLBACK v8value_is_object(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefV8ValueCppToC::Get(self)->IsObject();
}
int CEF_CALLBACK v8value_is_array(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefV8ValueCppToC::Get(self)->IsArray();
}
int CEF_CALLBACK v8value_is_function(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefV8ValueCppToC::Get(self)->IsFunction();
}
int CEF_CALLBACK v8value_get_bool_value(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefV8ValueCppToC::Get(self)->GetBoolValue();
}
int CEF_CALLBACK v8value_get_int_value(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefV8ValueCppToC::Get(self)->GetIntValue();
}
double CEF_CALLBACK v8value_get_double_value(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefV8ValueCppToC::Get(self)->GetDoubleValue();
}
cef_string_t CEF_CALLBACK v8value_get_string_value(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
std::wstring valueStr = CefV8ValueCppToC::Get(self)->GetStringValue();
if(!valueStr.empty())
return cef_string_alloc(valueStr.c_str());
return NULL;
}
int CEF_CALLBACK v8value_has_value_bykey(struct _cef_v8value_t* self,
const wchar_t* key)
{
DCHECK(self);
if(!self)
return 0;
std::wstring keyStr;
if(key)
keyStr = key;
return CefV8ValueCppToC::Get(self)->HasValue(keyStr);
}
int CEF_CALLBACK v8value_has_value_byindex(struct _cef_v8value_t* self,
int index)
{
DCHECK(self);
if(!self)
return 0;
return CefV8ValueCppToC::Get(self)->HasValue(index);
}
int CEF_CALLBACK v8value_delete_value_bykey(struct _cef_v8value_t* self,
const wchar_t* key)
{
DCHECK(self);
if(!self)
return 0;
std::wstring keyStr;
if(key)
keyStr = key;
return CefV8ValueCppToC::Get(self)->DeleteValue(keyStr);
}
int CEF_CALLBACK v8value_delete_value_byindex(struct _cef_v8value_t* self,
int index)
{
DCHECK(self);
if(!self)
return 0;
return CefV8ValueCppToC::Get(self)->DeleteValue(index);
}
struct _cef_v8value_t* CEF_CALLBACK v8value_get_value_bykey(
struct _cef_v8value_t* self, const wchar_t* key)
{
DCHECK(self);
if(!self)
return 0;
std::wstring keyStr;
if(key)
keyStr = key;
CefRefPtr<CefV8Value> valuePtr =
CefV8ValueCppToC::Get(self)->GetValue(keyStr);
return CefV8ValueCppToC::Wrap(valuePtr);
}
struct _cef_v8value_t* CEF_CALLBACK v8value_get_value_byindex(
struct _cef_v8value_t* self, int index)
{
DCHECK(self);
if(!self)
return 0;
CefRefPtr<CefV8Value> valuePtr =
CefV8ValueCppToC::Get(self)->GetValue(index);
return CefV8ValueCppToC::Wrap(valuePtr);
}
int CEF_CALLBACK v8value_set_value_bykey(struct _cef_v8value_t* self,
const wchar_t* key, struct _cef_v8value_t* value)
{
DCHECK(self);
if(!self)
return 0;
std::wstring keyStr;
if(key)
keyStr = key;
CefRefPtr<CefV8Value> valuePtr = CefV8ValueCppToC::Unwrap(value);
return CefV8ValueCppToC::Get(self)->SetValue(keyStr, valuePtr);
}
int CEF_CALLBACK v8value_set_value_byindex(struct _cef_v8value_t* self,
int index, struct _cef_v8value_t* value)
{
DCHECK(self);
if(!self)
return 0;
CefRefPtr<CefV8Value> valuePtr = CefV8ValueCppToC::Unwrap(value);
return CefV8ValueCppToC::Get(self)->SetValue(index, valuePtr);
}
int CEF_CALLBACK v8value_get_keys(struct _cef_v8value_t* self,
cef_string_list_t keys)
{
DCHECK(self);
if(!self)
return 0;
std::vector<std::wstring> keysList;
CefV8ValueCppToC::Get(self)->GetKeys(keysList);
size_t size = keysList.size();
for(size_t i = 0; i < size; ++i)
cef_string_list_append(keys, keysList[i].c_str());
return size;
}
cef_base_t* CEF_CALLBACK v8value_get_user_data(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
CefRefPtr<CefBase> base = CefV8ValueCppToC::Get(self)->GetUserData();
if(base.get())
return CefBaseCToCpp::Unwrap(base);
return NULL;
}
int CEF_CALLBACK v8value_get_array_length(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefV8ValueCppToC::Get(self)->GetArrayLength();
}
cef_string_t CEF_CALLBACK v8value_get_function_name(struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
std::wstring functionNameStr =
CefV8ValueCppToC::Get(self)->GetFunctionName();
if(!functionNameStr.empty())
return cef_string_alloc(functionNameStr.c_str());
return NULL;
}
cef_v8handler_t* CEF_CALLBACK v8value_get_function_handler(
struct _cef_v8value_t* self)
{
DCHECK(self);
if(!self)
return 0;
CefRefPtr<CefV8Handler> handlerPtr =
CefV8ValueCppToC::Get(self)->GetFunctionHandler();
if(handlerPtr.get())
return CefV8HandlerCToCpp::Unwrap(handlerPtr);
return NULL;
}
int CEF_CALLBACK v8value_execute_function(struct _cef_v8value_t* self,
struct _cef_v8value_t* object, size_t argumentCount,
struct _cef_v8value_t* const* arguments, struct _cef_v8value_t** retval,
cef_string_t* exception)
{
DCHECK(self);
DCHECK(object);
if(!self || !object)
return 0;
CefRefPtr<CefV8Value> objectPtr = CefV8ValueCppToC::Unwrap(object);
CefV8ValueList argsList;
for(size_t i = 0; i < argumentCount; i++) {
argsList.push_back(CefV8ValueCppToC::Unwrap(arguments[i]));
}
CefRefPtr<CefV8Value> retvalPtr;
std::wstring exceptionStr;
bool rv = CefV8ValueCppToC::Get(self)->ExecuteFunction(objectPtr,
argsList, retvalPtr, exceptionStr);
if(retvalPtr.get() && retval)
*retval = CefV8ValueCppToC::Wrap(retvalPtr);
if(!exceptionStr.empty() && exception)
*exception = cef_string_alloc(exceptionStr.c_str());
return rv;
}
// 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_double = v8value_is_double;
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_.get_bool_value = v8value_get_bool_value;
struct_.struct_.get_int_value = v8value_get_int_value;
struct_.struct_.get_double_value = v8value_get_double_value;
struct_.struct_.get_string_value = v8value_get_string_value;
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_.get_keys = v8value_get_keys;
struct_.struct_.get_user_data = v8value_get_user_data;
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;
}
#ifdef _DEBUG
long CefCppToC<CefV8ValueCppToC, CefV8Value, cef_v8value_t>::DebugObjCt = 0;
#endif

View File

@ -1,34 +1,34 @@
// 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef _V8VALUE_CPPTOC_H
#define _V8VALUE_CPPTOC_H
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_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:
CefV8ValueCppToC(CefV8Value* cls);
virtual ~CefV8ValueCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // _V8VALUE_CPPTOC_H
// 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef _V8VALUE_CPPTOC_H
#define _V8VALUE_CPPTOC_H
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_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:
CefV8ValueCppToC(CefV8Value* cls);
virtual ~CefV8ValueCppToC() {}
};
#endif // BUILDING_CEF_SHARED
#endif // _V8VALUE_CPPTOC_H

View File

@ -1,73 +1,73 @@
// 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.
//
// ---------------------------------------------------------------------------
//
// A portion of this file was generated by the CEF translator tool. When
// making changes by hand only do so within the body of existing 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)
{
DCHECK(self);
if(!self)
return 0;
return CefWriteHandlerCppToC::Get(self)->Write(ptr, size, n);
}
int CEF_CALLBACK write_handler_seek(struct _cef_write_handler_t* self,
long offset, int whence)
{
DCHECK(self);
if(!self)
return 0;
return CefWriteHandlerCppToC::Get(self)->Seek(offset, whence);
}
long CEF_CALLBACK write_handler_tell(struct _cef_write_handler_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefWriteHandlerCppToC::Get(self)->Tell();
}
int CEF_CALLBACK write_handler_flush(struct _cef_write_handler_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefWriteHandlerCppToC::Get(self)->Flush();
}
// 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;
}
#ifdef _DEBUG
long CefCppToC<CefWriteHandlerCppToC, CefWriteHandler,
cef_write_handler_t>::DebugObjCt = 0;
#endif
// 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.
//
// ---------------------------------------------------------------------------
//
// A portion of this file was generated by the CEF translator tool. When
// making changes by hand only do so within the body of existing 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)
{
DCHECK(self);
if(!self)
return 0;
return CefWriteHandlerCppToC::Get(self)->Write(ptr, size, n);
}
int CEF_CALLBACK write_handler_seek(struct _cef_write_handler_t* self,
long offset, int whence)
{
DCHECK(self);
if(!self)
return 0;
return CefWriteHandlerCppToC::Get(self)->Seek(offset, whence);
}
long CEF_CALLBACK write_handler_tell(struct _cef_write_handler_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefWriteHandlerCppToC::Get(self)->Tell();
}
int CEF_CALLBACK write_handler_flush(struct _cef_write_handler_t* self)
{
DCHECK(self);
if(!self)
return 0;
return CefWriteHandlerCppToC::Get(self)->Flush();
}
// 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;
}
#ifdef _DEBUG
long CefCppToC<CefWriteHandlerCppToC, CefWriteHandler,
cef_write_handler_t>::DebugObjCt = 0;
#endif

View File

@ -1,35 +1,35 @@
// 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef _WRITEHANDLER_CPPTOC_H
#define _WRITEHANDLER_CPPTOC_H
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_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:
CefWriteHandlerCppToC(CefWriteHandler* cls);
virtual ~CefWriteHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _WRITEHANDLER_CPPTOC_H
// 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef _WRITEHANDLER_CPPTOC_H
#define _WRITEHANDLER_CPPTOC_H
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_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:
CefWriteHandlerCppToC(CefWriteHandler* cls);
virtual ~CefWriteHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _WRITEHANDLER_CPPTOC_H