mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Branch CEF3 files from /branches/cef3 to /trunk/cef3 (issue #564).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@571 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
86
libcef_dll/ctocpp/app_ctocpp.cc
Normal file
86
libcef_dll/ctocpp/app_ctocpp.cc
Normal file
@@ -0,0 +1,86 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/command_line_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/app_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/proxy_handler_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/render_process_handler_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/resource_bundle_handler_ctocpp.h"
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
void CefAppCToCpp::OnBeforeCommandLineProcessing(const CefString& process_type,
|
||||
CefRefPtr<CefCommandLine> command_line) {
|
||||
if (CEF_MEMBER_MISSING(struct_, on_before_command_line_processing))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: command_line; type: refptr_diff
|
||||
DCHECK(command_line.get());
|
||||
if (!command_line.get())
|
||||
return;
|
||||
// Unverified params: process_type
|
||||
|
||||
// Execute
|
||||
struct_->on_before_command_line_processing(struct_,
|
||||
process_type.GetStruct(),
|
||||
CefCommandLineCppToC::Wrap(command_line));
|
||||
}
|
||||
|
||||
CefRefPtr<CefRenderProcessHandler> CefAppCToCpp::GetRenderProcessHandler() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_render_process_handler))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_render_process_handler_t* _retval = struct_->get_render_process_handler(
|
||||
struct_);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefRenderProcessHandlerCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefResourceBundleHandler> CefAppCToCpp::GetResourceBundleHandler() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_resource_bundle_handler))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_resource_bundle_handler_t* _retval = struct_->get_resource_bundle_handler(
|
||||
struct_);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefResourceBundleHandlerCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefProxyHandler> CefAppCToCpp::GetProxyHandler() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_proxy_handler))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_proxy_handler_t* _retval = struct_->get_proxy_handler(struct_);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefProxyHandlerCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefAppCToCpp, CefApp, cef_app_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
45
libcef_dll/ctocpp/app_ctocpp.h
Normal file
45
libcef_dll/ctocpp/app_ctocpp.h
Normal file
@@ -0,0 +1,45 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_APP_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_APP_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/cef_app.h"
|
||||
#include "include/capi/cef_app_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefAppCToCpp
|
||||
: public CefCToCpp<CefAppCToCpp, CefApp, cef_app_t> {
|
||||
public:
|
||||
explicit CefAppCToCpp(cef_app_t* str)
|
||||
: CefCToCpp<CefAppCToCpp, CefApp, cef_app_t>(str) {}
|
||||
virtual ~CefAppCToCpp() {}
|
||||
|
||||
// CefApp methods
|
||||
virtual void OnBeforeCommandLineProcessing(const CefString& process_type,
|
||||
CefRefPtr<CefCommandLine> command_line) OVERRIDE;
|
||||
virtual CefRefPtr<CefRenderProcessHandler> GetRenderProcessHandler() OVERRIDE;
|
||||
virtual CefRefPtr<CefResourceBundleHandler> GetResourceBundleHandler(
|
||||
) OVERRIDE;
|
||||
virtual CefRefPtr<CefProxyHandler> GetProxyHandler() OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_APP_CTOCPP_H_
|
||||
|
55
libcef_dll/ctocpp/auth_callback_ctocpp.cc
Normal file
55
libcef_dll/ctocpp/auth_callback_ctocpp.cc
Normal file
@@ -0,0 +1,55 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/auth_callback_ctocpp.h"
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
void CefAuthCallbackCToCpp::Continue(const CefString& username,
|
||||
const CefString& password) {
|
||||
if (CEF_MEMBER_MISSING(struct_, cont))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: username; type: string_byref_const
|
||||
DCHECK(!username.empty());
|
||||
if (username.empty())
|
||||
return;
|
||||
// Verify param: password; type: string_byref_const
|
||||
DCHECK(!password.empty());
|
||||
if (password.empty())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->cont(struct_,
|
||||
username.GetStruct(),
|
||||
password.GetStruct());
|
||||
}
|
||||
|
||||
void CefAuthCallbackCToCpp::Cancel() {
|
||||
if (CEF_MEMBER_MISSING(struct_, cancel))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->cancel(struct_);
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefAuthCallbackCToCpp, CefAuthCallback,
|
||||
cef_auth_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
44
libcef_dll/ctocpp/auth_callback_ctocpp.h
Normal file
44
libcef_dll/ctocpp/auth_callback_ctocpp.h
Normal file
@@ -0,0 +1,44 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_AUTH_CALLBACK_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_AUTH_CALLBACK_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/cef_request_handler.h"
|
||||
#include "include/capi/cef_request_handler_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefAuthCallbackCToCpp
|
||||
: public CefCToCpp<CefAuthCallbackCToCpp, CefAuthCallback,
|
||||
cef_auth_callback_t> {
|
||||
public:
|
||||
explicit CefAuthCallbackCToCpp(cef_auth_callback_t* str)
|
||||
: CefCToCpp<CefAuthCallbackCToCpp, CefAuthCallback, cef_auth_callback_t>(
|
||||
str) {}
|
||||
virtual ~CefAuthCallbackCToCpp() {}
|
||||
|
||||
// CefAuthCallback methods
|
||||
virtual void Continue(const CefString& username,
|
||||
const CefString& password) OVERRIDE;
|
||||
virtual void Cancel() OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_AUTH_CALLBACK_CTOCPP_H_
|
||||
|
98
libcef_dll/ctocpp/base_ctocpp.h
Normal file
98
libcef_dll/ctocpp/base_ctocpp.h
Normal file
@@ -0,0 +1,98 @@
|
||||
// Copyright (c) 2009 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_BASE_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_BASE_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
#include "libcef_dll/cef_logging.h"
|
||||
|
||||
|
||||
// CefCToCpp implementation for CefBase.
|
||||
class CefBaseCToCpp : public CefBase {
|
||||
public:
|
||||
// Use this method to create a wrapper class instance for a structure
|
||||
// received from the other side.
|
||||
static CefRefPtr<CefBase> Wrap(cef_base_t* s) {
|
||||
if (!s)
|
||||
return NULL;
|
||||
|
||||
// Wrap their structure with the CefCToCpp object.
|
||||
CefBaseCToCpp* wrapper = new CefBaseCToCpp(s);
|
||||
// Put the wrapper object in a smart pointer.
|
||||
CefRefPtr<CefBase> wrapperPtr(wrapper);
|
||||
// Release the reference that was added to the CefCppToC wrapper object on
|
||||
// the other side before their structure was passed to us.
|
||||
wrapper->UnderlyingRelease();
|
||||
// Return the smart pointer.
|
||||
return wrapperPtr;
|
||||
}
|
||||
|
||||
// Use this method to retrieve the underlying structure from a wrapper class
|
||||
// instance for return back to the other side.
|
||||
static cef_base_t* Unwrap(CefRefPtr<CefBase> c) {
|
||||
if (!c.get())
|
||||
return NULL;
|
||||
|
||||
// Cast the object to our wrapper class type.
|
||||
CefBaseCToCpp* wrapper = static_cast<CefBaseCToCpp*>(c.get());
|
||||
// Add a reference to the CefCppToC wrapper object on the other side that
|
||||
// will be released once the structure is received.
|
||||
wrapper->UnderlyingAddRef();
|
||||
// Return their original structure.
|
||||
return wrapper->GetStruct();
|
||||
}
|
||||
|
||||
explicit CefBaseCToCpp(cef_base_t* str)
|
||||
: struct_(str) {
|
||||
DCHECK(str);
|
||||
}
|
||||
virtual ~CefBaseCToCpp() {}
|
||||
|
||||
// If returning the structure across the DLL boundary you should call
|
||||
// UnderlyingAddRef() on this wrapping CefCToCpp object. On the other side of
|
||||
// the DLL boundary, call Release() on the CefCppToC object.
|
||||
cef_base_t* GetStruct() { return struct_; }
|
||||
|
||||
// CefBase methods increment/decrement reference counts on both this object
|
||||
// and the underlying wrapped structure.
|
||||
int AddRef() {
|
||||
UnderlyingAddRef();
|
||||
return refct_.AddRef();
|
||||
}
|
||||
int Release() {
|
||||
UnderlyingRelease();
|
||||
int retval = refct_.Release();
|
||||
if (retval == 0)
|
||||
delete this;
|
||||
return retval;
|
||||
}
|
||||
int GetRefCt() { return refct_.GetRefCt(); }
|
||||
|
||||
// Increment/decrement reference counts on only the underlying class.
|
||||
int UnderlyingAddRef() {
|
||||
if (!struct_->add_ref)
|
||||
return 0;
|
||||
return struct_->add_ref(struct_);
|
||||
}
|
||||
int UnderlyingRelease() {
|
||||
if (!struct_->release)
|
||||
return 0;
|
||||
return struct_->release(struct_);
|
||||
}
|
||||
int UnderlyingGetRefCt() {
|
||||
if (!struct_->get_refct)
|
||||
return 0;
|
||||
return struct_->get_refct(struct_);
|
||||
}
|
||||
|
||||
protected:
|
||||
CefRefCount refct_;
|
||||
cef_base_t* struct_;
|
||||
};
|
||||
|
||||
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_BASE_CTOCPP_H_
|
118
libcef_dll/ctocpp/binary_value_ctocpp.cc
Normal file
118
libcef_dll/ctocpp/binary_value_ctocpp.cc
Normal file
@@ -0,0 +1,118 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/binary_value_ctocpp.h"
|
||||
|
||||
|
||||
// STATIC METHODS - Body may be edited by hand.
|
||||
|
||||
CefRefPtr<CefBinaryValue> CefBinaryValue::Create(const void* data,
|
||||
size_t data_size) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: data; type: simple_byaddr
|
||||
DCHECK(data);
|
||||
if (!data)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
cef_binary_value_t* _retval = cef_binary_value_create(
|
||||
data,
|
||||
data_size);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefBinaryValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
bool CefBinaryValueCToCpp::IsValid() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_valid))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_valid(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefBinaryValueCToCpp::IsOwned() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_owned))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_owned(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
CefRefPtr<CefBinaryValue> CefBinaryValueCToCpp::Copy() {
|
||||
if (CEF_MEMBER_MISSING(struct_, copy))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_binary_value_t* _retval = struct_->copy(struct_);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefBinaryValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
size_t CefBinaryValueCToCpp::GetSize() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_size))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
size_t _retval = struct_->get_size(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
size_t CefBinaryValueCToCpp::GetData(void* buffer, size_t buffer_size,
|
||||
size_t data_offset) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_data))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: buffer; type: simple_byaddr
|
||||
DCHECK(buffer);
|
||||
if (!buffer)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
size_t _retval = struct_->get_data(struct_,
|
||||
buffer,
|
||||
buffer_size,
|
||||
data_offset);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefBinaryValueCToCpp, CefBinaryValue,
|
||||
cef_binary_value_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
47
libcef_dll/ctocpp/binary_value_ctocpp.h
Normal file
47
libcef_dll/ctocpp/binary_value_ctocpp.h
Normal file
@@ -0,0 +1,47 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_BINARY_VALUE_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_BINARY_VALUE_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/cef_values.h"
|
||||
#include "include/capi/cef_values_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefBinaryValueCToCpp
|
||||
: public CefCToCpp<CefBinaryValueCToCpp, CefBinaryValue,
|
||||
cef_binary_value_t> {
|
||||
public:
|
||||
explicit CefBinaryValueCToCpp(cef_binary_value_t* str)
|
||||
: CefCToCpp<CefBinaryValueCToCpp, CefBinaryValue, cef_binary_value_t>(
|
||||
str) {}
|
||||
virtual ~CefBinaryValueCToCpp() {}
|
||||
|
||||
// CefBinaryValue methods
|
||||
virtual bool IsValid() OVERRIDE;
|
||||
virtual bool IsOwned() OVERRIDE;
|
||||
virtual CefRefPtr<CefBinaryValue> Copy() OVERRIDE;
|
||||
virtual size_t GetSize() OVERRIDE;
|
||||
virtual size_t GetData(void* buffer, size_t buffer_size,
|
||||
size_t data_offset) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_BINARY_VALUE_CTOCPP_H_
|
||||
|
323
libcef_dll/ctocpp/browser_ctocpp.cc
Normal file
323
libcef_dll/ctocpp/browser_ctocpp.cc
Normal file
@@ -0,0 +1,323 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/browser_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/browser_host_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/frame_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/process_message_ctocpp.h"
|
||||
#include "libcef_dll/transfer_util.h"
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
CefRefPtr<CefBrowserHost> CefBrowserCToCpp::GetHost() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_host))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_browser_host_t* _retval = struct_->get_host(struct_);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefBrowserHostCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
bool CefBrowserCToCpp::CanGoBack() {
|
||||
if (CEF_MEMBER_MISSING(struct_, can_go_back))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->can_go_back(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
void CefBrowserCToCpp::GoBack() {
|
||||
if (CEF_MEMBER_MISSING(struct_, go_back))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->go_back(struct_);
|
||||
}
|
||||
|
||||
bool CefBrowserCToCpp::CanGoForward() {
|
||||
if (CEF_MEMBER_MISSING(struct_, can_go_forward))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->can_go_forward(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
void CefBrowserCToCpp::GoForward() {
|
||||
if (CEF_MEMBER_MISSING(struct_, go_forward))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->go_forward(struct_);
|
||||
}
|
||||
|
||||
bool CefBrowserCToCpp::IsLoading() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_loading))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_loading(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
void CefBrowserCToCpp::Reload() {
|
||||
if (CEF_MEMBER_MISSING(struct_, reload))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->reload(struct_);
|
||||
}
|
||||
|
||||
void CefBrowserCToCpp::ReloadIgnoreCache() {
|
||||
if (CEF_MEMBER_MISSING(struct_, reload_ignore_cache))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->reload_ignore_cache(struct_);
|
||||
}
|
||||
|
||||
void CefBrowserCToCpp::StopLoad() {
|
||||
if (CEF_MEMBER_MISSING(struct_, stop_load))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->stop_load(struct_);
|
||||
}
|
||||
|
||||
int CefBrowserCToCpp::GetIdentifier() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_identifier))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->get_identifier(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
bool CefBrowserCToCpp::IsPopup() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_popup))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_popup(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefBrowserCToCpp::HasDocument() {
|
||||
if (CEF_MEMBER_MISSING(struct_, has_document))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->has_document(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
CefRefPtr<CefFrame> CefBrowserCToCpp::GetMainFrame() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_main_frame))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_frame_t* _retval = struct_->get_main_frame(struct_);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefFrameCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefFrame> CefBrowserCToCpp::GetFocusedFrame() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_focused_frame))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_frame_t* _retval = struct_->get_focused_frame(struct_);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefFrameCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefFrame> CefBrowserCToCpp::GetFrame(int64 identifier) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_frame_byident))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_frame_t* _retval = struct_->get_frame_byident(struct_,
|
||||
identifier);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefFrameCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefFrame> CefBrowserCToCpp::GetFrame(const CefString& name) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_frame))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: name; type: string_byref_const
|
||||
DCHECK(!name.empty());
|
||||
if (name.empty())
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
cef_frame_t* _retval = struct_->get_frame(struct_,
|
||||
name.GetStruct());
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefFrameCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
size_t CefBrowserCToCpp::GetFrameCount() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_frame_count))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
size_t _retval = struct_->get_frame_count(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CefBrowserCToCpp::GetFrameIdentifiers(std::vector<int64>& identifiers) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_frame_identifiers))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Translate param: identifiers; type: simple_vec_byref
|
||||
size_t identifiersSize = identifiers.size();
|
||||
size_t identifiersCount = std::max(GetFrameCount(), identifiersSize);
|
||||
int64* identifiersList = NULL;
|
||||
if (identifiersCount > 0) {
|
||||
identifiersList = new int64[identifiersCount];
|
||||
DCHECK(identifiersList);
|
||||
if (identifiersList) {
|
||||
memset(identifiersList, 0, sizeof(int64)*identifiersCount);
|
||||
}
|
||||
if (identifiersList && identifiersSize > 0) {
|
||||
for (size_t i = 0; i < identifiersSize; ++i) {
|
||||
identifiersList[i] = identifiers[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Execute
|
||||
struct_->get_frame_identifiers(struct_,
|
||||
&identifiersCount,
|
||||
identifiersList);
|
||||
|
||||
// Restore param:identifiers; type: simple_vec_byref
|
||||
identifiers.clear();
|
||||
if (identifiersCount > 0 && identifiersList) {
|
||||
for (size_t i = 0; i < identifiersCount; ++i) {
|
||||
identifiers.push_back(identifiersList[i]);
|
||||
}
|
||||
delete [] identifiersList;
|
||||
}
|
||||
}
|
||||
|
||||
void CefBrowserCToCpp::GetFrameNames(std::vector<CefString>& names) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_frame_names))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Translate param: names; type: string_vec_byref
|
||||
cef_string_list_t namesList = cef_string_list_alloc();
|
||||
DCHECK(namesList);
|
||||
if (namesList)
|
||||
transfer_string_list_contents(names, namesList);
|
||||
|
||||
// Execute
|
||||
struct_->get_frame_names(struct_,
|
||||
namesList);
|
||||
|
||||
// Restore param:names; type: string_vec_byref
|
||||
if (namesList) {
|
||||
names.clear();
|
||||
transfer_string_list_contents(namesList, names);
|
||||
cef_string_list_free(namesList);
|
||||
}
|
||||
}
|
||||
|
||||
bool CefBrowserCToCpp::SendProcessMessage(CefProcessId target_process,
|
||||
CefRefPtr<CefProcessMessage> message) {
|
||||
if (CEF_MEMBER_MISSING(struct_, send_process_message))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: message; type: refptr_same
|
||||
DCHECK(message.get());
|
||||
if (!message.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->send_process_message(struct_,
|
||||
target_process,
|
||||
CefProcessMessageCToCpp::Unwrap(message));
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefBrowserCToCpp, CefBrowser,
|
||||
cef_browser_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
63
libcef_dll/ctocpp/browser_ctocpp.h
Normal file
63
libcef_dll/ctocpp/browser_ctocpp.h
Normal file
@@ -0,0 +1,63 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_BROWSER_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_BROWSER_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include <vector>
|
||||
#include "include/cef_browser.h"
|
||||
#include "include/capi/cef_browser_capi.h"
|
||||
#include "include/cef_client.h"
|
||||
#include "include/capi/cef_client_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefBrowserCToCpp
|
||||
: public CefCToCpp<CefBrowserCToCpp, CefBrowser, cef_browser_t> {
|
||||
public:
|
||||
explicit CefBrowserCToCpp(cef_browser_t* str)
|
||||
: CefCToCpp<CefBrowserCToCpp, CefBrowser, cef_browser_t>(str) {}
|
||||
virtual ~CefBrowserCToCpp() {}
|
||||
|
||||
// CefBrowser methods
|
||||
virtual CefRefPtr<CefBrowserHost> GetHost() OVERRIDE;
|
||||
virtual bool CanGoBack() OVERRIDE;
|
||||
virtual void GoBack() OVERRIDE;
|
||||
virtual bool CanGoForward() OVERRIDE;
|
||||
virtual void GoForward() OVERRIDE;
|
||||
virtual bool IsLoading() OVERRIDE;
|
||||
virtual void Reload() OVERRIDE;
|
||||
virtual void ReloadIgnoreCache() OVERRIDE;
|
||||
virtual void StopLoad() OVERRIDE;
|
||||
virtual int GetIdentifier() OVERRIDE;
|
||||
virtual bool IsPopup() OVERRIDE;
|
||||
virtual bool HasDocument() OVERRIDE;
|
||||
virtual CefRefPtr<CefFrame> GetMainFrame() OVERRIDE;
|
||||
virtual CefRefPtr<CefFrame> GetFocusedFrame() OVERRIDE;
|
||||
virtual CefRefPtr<CefFrame> GetFrame(int64 identifier) OVERRIDE;
|
||||
virtual CefRefPtr<CefFrame> GetFrame(const CefString& name) OVERRIDE;
|
||||
virtual size_t GetFrameCount() OVERRIDE;
|
||||
virtual void GetFrameIdentifiers(std::vector<int64>& identifiers) OVERRIDE;
|
||||
virtual void GetFrameNames(std::vector<CefString>& names) OVERRIDE;
|
||||
virtual bool SendProcessMessage(CefProcessId target_process,
|
||||
CefRefPtr<CefProcessMessage> message) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_BROWSER_CTOCPP_H_
|
||||
|
155
libcef_dll/ctocpp/browser_host_ctocpp.cc
Normal file
155
libcef_dll/ctocpp/browser_host_ctocpp.cc
Normal file
@@ -0,0 +1,155 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/client_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/browser_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/browser_host_ctocpp.h"
|
||||
|
||||
|
||||
// STATIC METHODS - Body may be edited by hand.
|
||||
|
||||
bool CefBrowserHost::CreateBrowser(const CefWindowInfo& windowInfo,
|
||||
CefRefPtr<CefClient> client, const CefString& url,
|
||||
const CefBrowserSettings& settings) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: client; type: refptr_diff
|
||||
DCHECK(client.get());
|
||||
if (!client.get())
|
||||
return false;
|
||||
// Unverified params: url
|
||||
|
||||
// Execute
|
||||
int _retval = cef_browser_host_create_browser(
|
||||
&windowInfo,
|
||||
CefClientCppToC::Wrap(client),
|
||||
url.GetStruct(),
|
||||
&settings);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
CefRefPtr<CefBrowser> CefBrowserHost::CreateBrowserSync(
|
||||
const CefWindowInfo& windowInfo, CefRefPtr<CefClient> client,
|
||||
const CefString& url, const CefBrowserSettings& settings) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: client; type: refptr_diff
|
||||
DCHECK(client.get());
|
||||
if (!client.get())
|
||||
return NULL;
|
||||
// Unverified params: url
|
||||
|
||||
// Execute
|
||||
cef_browser_t* _retval = cef_browser_host_create_browser_sync(
|
||||
&windowInfo,
|
||||
CefClientCppToC::Wrap(client),
|
||||
url.GetStruct(),
|
||||
&settings);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefBrowserCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
CefRefPtr<CefBrowser> CefBrowserHostCToCpp::GetBrowser() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_browser))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_browser_t* _retval = struct_->get_browser(struct_);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefBrowserCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
void CefBrowserHostCToCpp::ParentWindowWillClose() {
|
||||
if (CEF_MEMBER_MISSING(struct_, parent_window_will_close))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->parent_window_will_close(struct_);
|
||||
}
|
||||
|
||||
void CefBrowserHostCToCpp::CloseBrowser() {
|
||||
if (CEF_MEMBER_MISSING(struct_, close_browser))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->close_browser(struct_);
|
||||
}
|
||||
|
||||
void CefBrowserHostCToCpp::SetFocus(bool enable) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_focus))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->set_focus(struct_,
|
||||
enable);
|
||||
}
|
||||
|
||||
CefWindowHandle CefBrowserHostCToCpp::GetWindowHandle() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_window_handle))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_window_handle_t _retval = struct_->get_window_handle(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
CefWindowHandle CefBrowserHostCToCpp::GetOpenerWindowHandle() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_opener_window_handle))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_window_handle_t _retval = struct_->get_opener_window_handle(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
CefRefPtr<CefClient> CefBrowserHostCToCpp::GetClient() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_client))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_client_t* _retval = struct_->get_client(struct_);
|
||||
|
||||
// Return type: refptr_diff
|
||||
return CefClientCppToC::Unwrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefBrowserHostCToCpp, CefBrowserHost,
|
||||
cef_browser_host_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
50
libcef_dll/ctocpp/browser_host_ctocpp.h
Normal file
50
libcef_dll/ctocpp/browser_host_ctocpp.h
Normal file
@@ -0,0 +1,50 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_BROWSER_HOST_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_BROWSER_HOST_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/cef_browser.h"
|
||||
#include "include/capi/cef_browser_capi.h"
|
||||
#include "include/cef_client.h"
|
||||
#include "include/capi/cef_client_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefBrowserHostCToCpp
|
||||
: public CefCToCpp<CefBrowserHostCToCpp, CefBrowserHost,
|
||||
cef_browser_host_t> {
|
||||
public:
|
||||
explicit CefBrowserHostCToCpp(cef_browser_host_t* str)
|
||||
: CefCToCpp<CefBrowserHostCToCpp, CefBrowserHost, cef_browser_host_t>(
|
||||
str) {}
|
||||
virtual ~CefBrowserHostCToCpp() {}
|
||||
|
||||
// CefBrowserHost methods
|
||||
virtual CefRefPtr<CefBrowser> GetBrowser() OVERRIDE;
|
||||
virtual void ParentWindowWillClose() OVERRIDE;
|
||||
virtual void CloseBrowser() OVERRIDE;
|
||||
virtual void SetFocus(bool enable) OVERRIDE;
|
||||
virtual CefWindowHandle GetWindowHandle() OVERRIDE;
|
||||
virtual CefWindowHandle GetOpenerWindowHandle() OVERRIDE;
|
||||
virtual CefRefPtr<CefClient> GetClient() OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_BROWSER_HOST_CTOCPP_H_
|
||||
|
43
libcef_dll/ctocpp/callback_ctocpp.cc
Normal file
43
libcef_dll/ctocpp/callback_ctocpp.cc
Normal file
@@ -0,0 +1,43 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/callback_ctocpp.h"
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
void CefCallbackCToCpp::Continue() {
|
||||
if (CEF_MEMBER_MISSING(struct_, cont))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->cont(struct_);
|
||||
}
|
||||
|
||||
void CefCallbackCToCpp::Cancel() {
|
||||
if (CEF_MEMBER_MISSING(struct_, cancel))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->cancel(struct_);
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefCallbackCToCpp, CefCallback,
|
||||
cef_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
41
libcef_dll/ctocpp/callback_ctocpp.h
Normal file
41
libcef_dll/ctocpp/callback_ctocpp.h
Normal file
@@ -0,0 +1,41 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_CALLBACK_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_CALLBACK_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/cef_callback.h"
|
||||
#include "include/capi/cef_callback_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefCallbackCToCpp
|
||||
: public CefCToCpp<CefCallbackCToCpp, CefCallback, cef_callback_t> {
|
||||
public:
|
||||
explicit CefCallbackCToCpp(cef_callback_t* str)
|
||||
: CefCToCpp<CefCallbackCToCpp, CefCallback, cef_callback_t>(str) {}
|
||||
virtual ~CefCallbackCToCpp() {}
|
||||
|
||||
// CefCallback methods
|
||||
virtual void Continue() OVERRIDE;
|
||||
virtual void Cancel() OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_CALLBACK_CTOCPP_H_
|
||||
|
122
libcef_dll/ctocpp/client_ctocpp.cc
Normal file
122
libcef_dll/ctocpp/client_ctocpp.cc
Normal file
@@ -0,0 +1,122 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/browser_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/process_message_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/client_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/display_handler_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/geolocation_handler_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/life_span_handler_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/load_handler_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/request_handler_ctocpp.h"
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
CefRefPtr<CefLifeSpanHandler> CefClientCToCpp::GetLifeSpanHandler() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_life_span_handler))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_life_span_handler_t* _retval = struct_->get_life_span_handler(struct_);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefLifeSpanHandlerCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefLoadHandler> CefClientCToCpp::GetLoadHandler() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_load_handler))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_load_handler_t* _retval = struct_->get_load_handler(struct_);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefLoadHandlerCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefRequestHandler> CefClientCToCpp::GetRequestHandler() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_request_handler))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_request_handler_t* _retval = struct_->get_request_handler(struct_);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefRequestHandlerCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefDisplayHandler> CefClientCToCpp::GetDisplayHandler() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_display_handler))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_display_handler_t* _retval = struct_->get_display_handler(struct_);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefDisplayHandlerCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefGeolocationHandler> CefClientCToCpp::GetGeolocationHandler() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_geolocation_handler))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_geolocation_handler_t* _retval = struct_->get_geolocation_handler(
|
||||
struct_);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefGeolocationHandlerCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
bool CefClientCToCpp::OnProcessMessageRecieved(CefRefPtr<CefBrowser> browser,
|
||||
CefProcessId source_process, CefRefPtr<CefProcessMessage> message) {
|
||||
if (CEF_MEMBER_MISSING(struct_, on_process_message_recieved))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return false;
|
||||
// Verify param: message; type: refptr_diff
|
||||
DCHECK(message.get());
|
||||
if (!message.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->on_process_message_recieved(struct_,
|
||||
CefBrowserCppToC::Wrap(browser),
|
||||
source_process,
|
||||
CefProcessMessageCppToC::Wrap(message));
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefClientCToCpp, CefClient,
|
||||
cef_client_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
47
libcef_dll/ctocpp/client_ctocpp.h
Normal file
47
libcef_dll/ctocpp/client_ctocpp.h
Normal file
@@ -0,0 +1,47 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_CLIENT_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_CLIENT_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/cef_client.h"
|
||||
#include "include/capi/cef_client_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefClientCToCpp
|
||||
: public CefCToCpp<CefClientCToCpp, CefClient, cef_client_t> {
|
||||
public:
|
||||
explicit CefClientCToCpp(cef_client_t* str)
|
||||
: CefCToCpp<CefClientCToCpp, CefClient, cef_client_t>(str) {}
|
||||
virtual ~CefClientCToCpp() {}
|
||||
|
||||
// CefClient methods
|
||||
virtual CefRefPtr<CefLifeSpanHandler> GetLifeSpanHandler() OVERRIDE;
|
||||
virtual CefRefPtr<CefLoadHandler> GetLoadHandler() OVERRIDE;
|
||||
virtual CefRefPtr<CefRequestHandler> GetRequestHandler() OVERRIDE;
|
||||
virtual CefRefPtr<CefDisplayHandler> GetDisplayHandler() OVERRIDE;
|
||||
virtual CefRefPtr<CefGeolocationHandler> GetGeolocationHandler() OVERRIDE;
|
||||
virtual bool OnProcessMessageRecieved(CefRefPtr<CefBrowser> browser,
|
||||
CefProcessId source_process,
|
||||
CefRefPtr<CefProcessMessage> message) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_CLIENT_CTOCPP_H_
|
||||
|
358
libcef_dll/ctocpp/command_line_ctocpp.cc
Normal file
358
libcef_dll/ctocpp/command_line_ctocpp.cc
Normal file
@@ -0,0 +1,358 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "include/cef_version.h"
|
||||
#include "libcef_dll/ctocpp/command_line_ctocpp.h"
|
||||
#include "libcef_dll/transfer_util.h"
|
||||
|
||||
|
||||
// STATIC METHODS - Body may be edited by hand.
|
||||
|
||||
CefRefPtr<CefCommandLine> CefCommandLine::CreateCommandLine() {
|
||||
int build_revision = cef_build_revision();
|
||||
if (build_revision != CEF_REVISION) {
|
||||
// The libcef build revision does not match the CEF API revision.
|
||||
DCHECK(false);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_command_line_t* _retval = cef_command_line_create();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefCommandLineCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefCommandLine> CefCommandLine::GetGlobalCommandLine() {
|
||||
int build_revision = cef_build_revision();
|
||||
if (build_revision != CEF_REVISION) {
|
||||
// The libcef build revision does not match the CEF API revision.
|
||||
DCHECK(false);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_command_line_t* _retval = cef_command_line_get_global();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefCommandLineCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
bool CefCommandLineCToCpp::IsValid() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_valid))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_valid(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefCommandLineCToCpp::IsReadOnly() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_read_only))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_read_only(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
CefRefPtr<CefCommandLine> CefCommandLineCToCpp::Copy() {
|
||||
if (CEF_MEMBER_MISSING(struct_, copy))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_command_line_t* _retval = struct_->copy(struct_);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefCommandLineCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
void CefCommandLineCToCpp::InitFromArgv(int argc, const char* const* argv) {
|
||||
if (CEF_MEMBER_MISSING(struct_, init_from_argv))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: argv; type: simple_byaddr
|
||||
DCHECK(argv);
|
||||
if (!argv)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->init_from_argv(struct_,
|
||||
argc,
|
||||
argv);
|
||||
}
|
||||
|
||||
void CefCommandLineCToCpp::InitFromString(const CefString& command_line) {
|
||||
if (CEF_MEMBER_MISSING(struct_, init_from_string))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: command_line; type: string_byref_const
|
||||
DCHECK(!command_line.empty());
|
||||
if (command_line.empty())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->init_from_string(struct_,
|
||||
command_line.GetStruct());
|
||||
}
|
||||
|
||||
void CefCommandLineCToCpp::Reset() {
|
||||
if (CEF_MEMBER_MISSING(struct_, reset))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->reset(struct_);
|
||||
}
|
||||
|
||||
CefString CefCommandLineCToCpp::GetCommandLineString() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_command_line_string))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_command_line_string(struct_);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
CefString CefCommandLineCToCpp::GetProgram() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_program))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_program(struct_);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
void CefCommandLineCToCpp::SetProgram(const CefString& program) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_program))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: program; type: string_byref_const
|
||||
DCHECK(!program.empty());
|
||||
if (program.empty())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->set_program(struct_,
|
||||
program.GetStruct());
|
||||
}
|
||||
|
||||
bool CefCommandLineCToCpp::HasSwitches() {
|
||||
if (CEF_MEMBER_MISSING(struct_, has_switches))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->has_switches(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefCommandLineCToCpp::HasSwitch(const CefString& name) {
|
||||
if (CEF_MEMBER_MISSING(struct_, has_switch))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: name; type: string_byref_const
|
||||
DCHECK(!name.empty());
|
||||
if (name.empty())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->has_switch(struct_,
|
||||
name.GetStruct());
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
CefString CefCommandLineCToCpp::GetSwitchValue(const CefString& name) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_switch_value))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: name; type: string_byref_const
|
||||
DCHECK(!name.empty());
|
||||
if (name.empty())
|
||||
return CefString();
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_switch_value(struct_,
|
||||
name.GetStruct());
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
void CefCommandLineCToCpp::GetSwitches(SwitchMap& switches) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_switches))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Translate param: switches; type: string_map_single_byref
|
||||
cef_string_map_t switchesMap = cef_string_map_alloc();
|
||||
DCHECK(switchesMap);
|
||||
if (switchesMap)
|
||||
transfer_string_map_contents(switches, switchesMap);
|
||||
|
||||
// Execute
|
||||
struct_->get_switches(struct_,
|
||||
switchesMap);
|
||||
|
||||
// Restore param:switches; type: string_map_single_byref
|
||||
if (switchesMap) {
|
||||
switches.clear();
|
||||
transfer_string_map_contents(switchesMap, switches);
|
||||
cef_string_map_free(switchesMap);
|
||||
}
|
||||
}
|
||||
|
||||
void CefCommandLineCToCpp::AppendSwitch(const CefString& name) {
|
||||
if (CEF_MEMBER_MISSING(struct_, append_switch))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: name; type: string_byref_const
|
||||
DCHECK(!name.empty());
|
||||
if (name.empty())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->append_switch(struct_,
|
||||
name.GetStruct());
|
||||
}
|
||||
|
||||
void CefCommandLineCToCpp::AppendSwitchWithValue(const CefString& name,
|
||||
const CefString& value) {
|
||||
if (CEF_MEMBER_MISSING(struct_, append_switch_with_value))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: name; type: string_byref_const
|
||||
DCHECK(!name.empty());
|
||||
if (name.empty())
|
||||
return;
|
||||
// Verify param: value; type: string_byref_const
|
||||
DCHECK(!value.empty());
|
||||
if (value.empty())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->append_switch_with_value(struct_,
|
||||
name.GetStruct(),
|
||||
value.GetStruct());
|
||||
}
|
||||
|
||||
bool CefCommandLineCToCpp::HasArguments() {
|
||||
if (CEF_MEMBER_MISSING(struct_, has_arguments))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->has_arguments(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
void CefCommandLineCToCpp::GetArguments(ArgumentList& arguments) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_arguments))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Translate param: arguments; type: string_vec_byref
|
||||
cef_string_list_t argumentsList = cef_string_list_alloc();
|
||||
DCHECK(argumentsList);
|
||||
if (argumentsList)
|
||||
transfer_string_list_contents(arguments, argumentsList);
|
||||
|
||||
// Execute
|
||||
struct_->get_arguments(struct_,
|
||||
argumentsList);
|
||||
|
||||
// Restore param:arguments; type: string_vec_byref
|
||||
if (argumentsList) {
|
||||
arguments.clear();
|
||||
transfer_string_list_contents(argumentsList, arguments);
|
||||
cef_string_list_free(argumentsList);
|
||||
}
|
||||
}
|
||||
|
||||
void CefCommandLineCToCpp::AppendArgument(const CefString& argument) {
|
||||
if (CEF_MEMBER_MISSING(struct_, append_argument))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: argument; type: string_byref_const
|
||||
DCHECK(!argument.empty());
|
||||
if (argument.empty())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->append_argument(struct_,
|
||||
argument.GetStruct());
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefCommandLineCToCpp, CefCommandLine,
|
||||
cef_command_line_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
60
libcef_dll/ctocpp/command_line_ctocpp.h
Normal file
60
libcef_dll/ctocpp/command_line_ctocpp.h
Normal file
@@ -0,0 +1,60 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_COMMAND_LINE_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_COMMAND_LINE_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/cef_command_line.h"
|
||||
#include "include/capi/cef_command_line_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefCommandLineCToCpp
|
||||
: public CefCToCpp<CefCommandLineCToCpp, CefCommandLine,
|
||||
cef_command_line_t> {
|
||||
public:
|
||||
explicit CefCommandLineCToCpp(cef_command_line_t* str)
|
||||
: CefCToCpp<CefCommandLineCToCpp, CefCommandLine, cef_command_line_t>(
|
||||
str) {}
|
||||
virtual ~CefCommandLineCToCpp() {}
|
||||
|
||||
// CefCommandLine methods
|
||||
virtual bool IsValid() OVERRIDE;
|
||||
virtual bool IsReadOnly() OVERRIDE;
|
||||
virtual CefRefPtr<CefCommandLine> Copy() OVERRIDE;
|
||||
virtual void InitFromArgv(int argc, const char* const* argv) OVERRIDE;
|
||||
virtual void InitFromString(const CefString& command_line) OVERRIDE;
|
||||
virtual void Reset() OVERRIDE;
|
||||
virtual CefString GetCommandLineString() OVERRIDE;
|
||||
virtual CefString GetProgram() OVERRIDE;
|
||||
virtual void SetProgram(const CefString& program) OVERRIDE;
|
||||
virtual bool HasSwitches() OVERRIDE;
|
||||
virtual bool HasSwitch(const CefString& name) OVERRIDE;
|
||||
virtual CefString GetSwitchValue(const CefString& name) OVERRIDE;
|
||||
virtual void GetSwitches(SwitchMap& switches) OVERRIDE;
|
||||
virtual void AppendSwitch(const CefString& name) OVERRIDE;
|
||||
virtual void AppendSwitchWithValue(const CefString& name,
|
||||
const CefString& value) OVERRIDE;
|
||||
virtual bool HasArguments() OVERRIDE;
|
||||
virtual void GetArguments(ArgumentList& arguments) OVERRIDE;
|
||||
virtual void AppendArgument(const CefString& argument) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_COMMAND_LINE_CTOCPP_H_
|
||||
|
152
libcef_dll/ctocpp/cookie_manager_ctocpp.cc
Normal file
152
libcef_dll/ctocpp/cookie_manager_ctocpp.cc
Normal file
@@ -0,0 +1,152 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/cookie_visitor_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/cookie_manager_ctocpp.h"
|
||||
|
||||
|
||||
// STATIC METHODS - Body may be edited by hand.
|
||||
|
||||
CefRefPtr<CefCookieManager> CefCookieManager::GetGlobalManager() {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_cookie_manager_t* _retval = cef_cookie_manager_get_global_manager();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefCookieManagerCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefCookieManager> CefCookieManager::CreateManager(
|
||||
const CefString& path) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Unverified params: path
|
||||
|
||||
// Execute
|
||||
cef_cookie_manager_t* _retval = cef_cookie_manager_create_manager(
|
||||
path.GetStruct());
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefCookieManagerCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
bool CefCookieManagerCToCpp::VisitAllCookies(
|
||||
CefRefPtr<CefCookieVisitor> visitor) {
|
||||
if (CEF_MEMBER_MISSING(struct_, visit_all_cookies))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: visitor; type: refptr_diff
|
||||
DCHECK(visitor.get());
|
||||
if (!visitor.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->visit_all_cookies(struct_,
|
||||
CefCookieVisitorCppToC::Wrap(visitor));
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefCookieManagerCToCpp::VisitUrlCookies(const CefString& url,
|
||||
bool includeHttpOnly, CefRefPtr<CefCookieVisitor> visitor) {
|
||||
if (CEF_MEMBER_MISSING(struct_, visit_url_cookies))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: url; type: string_byref_const
|
||||
DCHECK(!url.empty());
|
||||
if (url.empty())
|
||||
return false;
|
||||
// Verify param: visitor; type: refptr_diff
|
||||
DCHECK(visitor.get());
|
||||
if (!visitor.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->visit_url_cookies(struct_,
|
||||
url.GetStruct(),
|
||||
includeHttpOnly,
|
||||
CefCookieVisitorCppToC::Wrap(visitor));
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefCookieManagerCToCpp::SetCookie(const CefString& url,
|
||||
const CefCookie& cookie) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_cookie))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: url; type: string_byref_const
|
||||
DCHECK(!url.empty());
|
||||
if (url.empty())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->set_cookie(struct_,
|
||||
url.GetStruct(),
|
||||
&cookie);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefCookieManagerCToCpp::DeleteCookies(const CefString& url,
|
||||
const CefString& cookie_name) {
|
||||
if (CEF_MEMBER_MISSING(struct_, delete_cookies))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Unverified params: url, cookie_name
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->delete_cookies(struct_,
|
||||
url.GetStruct(),
|
||||
cookie_name.GetStruct());
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefCookieManagerCToCpp::SetStoragePath(const CefString& path) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_storage_path))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Unverified params: path
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->set_storage_path(struct_,
|
||||
path.GetStruct());
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefCookieManagerCToCpp, CefCookieManager,
|
||||
cef_cookie_manager_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
49
libcef_dll/ctocpp/cookie_manager_ctocpp.h
Normal file
49
libcef_dll/ctocpp/cookie_manager_ctocpp.h
Normal file
@@ -0,0 +1,49 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_COOKIE_MANAGER_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_COOKIE_MANAGER_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/cef_cookie.h"
|
||||
#include "include/capi/cef_cookie_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefCookieManagerCToCpp
|
||||
: public CefCToCpp<CefCookieManagerCToCpp, CefCookieManager,
|
||||
cef_cookie_manager_t> {
|
||||
public:
|
||||
explicit CefCookieManagerCToCpp(cef_cookie_manager_t* str)
|
||||
: CefCToCpp<CefCookieManagerCToCpp, CefCookieManager,
|
||||
cef_cookie_manager_t>(str) {}
|
||||
virtual ~CefCookieManagerCToCpp() {}
|
||||
|
||||
// CefCookieManager methods
|
||||
virtual bool VisitAllCookies(CefRefPtr<CefCookieVisitor> visitor) OVERRIDE;
|
||||
virtual bool VisitUrlCookies(const CefString& url, bool includeHttpOnly,
|
||||
CefRefPtr<CefCookieVisitor> visitor) OVERRIDE;
|
||||
virtual bool SetCookie(const CefString& url,
|
||||
const CefCookie& cookie) OVERRIDE;
|
||||
virtual bool DeleteCookies(const CefString& url,
|
||||
const CefString& cookie_name) OVERRIDE;
|
||||
virtual bool SetStoragePath(const CefString& path) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_COOKIE_MANAGER_CTOCPP_H_
|
||||
|
47
libcef_dll/ctocpp/cookie_visitor_ctocpp.cc
Normal file
47
libcef_dll/ctocpp/cookie_visitor_ctocpp.cc
Normal file
@@ -0,0 +1,47 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/cookie_visitor_ctocpp.h"
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
bool CefCookieVisitorCToCpp::Visit(const CefCookie& cookie, int count,
|
||||
int total, bool& deleteCookie) {
|
||||
if (CEF_MEMBER_MISSING(struct_, visit))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Translate param: deleteCookie; type: bool_byref
|
||||
int deleteCookieInt = deleteCookie;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->visit(struct_,
|
||||
&cookie,
|
||||
count,
|
||||
total,
|
||||
&deleteCookieInt);
|
||||
|
||||
// Restore param:deleteCookie; type: bool_byref
|
||||
deleteCookie = deleteCookieInt?true:false;
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefCookieVisitorCToCpp, CefCookieVisitor,
|
||||
cef_cookie_visitor_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
43
libcef_dll/ctocpp/cookie_visitor_ctocpp.h
Normal file
43
libcef_dll/ctocpp/cookie_visitor_ctocpp.h
Normal file
@@ -0,0 +1,43 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_COOKIE_VISITOR_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_COOKIE_VISITOR_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/cef_cookie.h"
|
||||
#include "include/capi/cef_cookie_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefCookieVisitorCToCpp
|
||||
: public CefCToCpp<CefCookieVisitorCToCpp, CefCookieVisitor,
|
||||
cef_cookie_visitor_t> {
|
||||
public:
|
||||
explicit CefCookieVisitorCToCpp(cef_cookie_visitor_t* str)
|
||||
: CefCToCpp<CefCookieVisitorCToCpp, CefCookieVisitor,
|
||||
cef_cookie_visitor_t>(str) {}
|
||||
virtual ~CefCookieVisitorCToCpp() {}
|
||||
|
||||
// CefCookieVisitor methods
|
||||
virtual bool Visit(const CefCookie& cookie, int count, int total,
|
||||
bool& deleteCookie) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_COOKIE_VISITOR_CTOCPP_H_
|
||||
|
113
libcef_dll/ctocpp/ctocpp.h
Normal file
113
libcef_dll/ctocpp/ctocpp.h
Normal file
@@ -0,0 +1,113 @@
|
||||
// Copyright (c) 2009 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
#include "libcef_dll/cef_logging.h"
|
||||
|
||||
|
||||
// Wrap a C structure with a C++ class. This is used when the implementation
|
||||
// exists on the other side of the DLL boundary but will have methods called on
|
||||
// this side of the DLL boundary.
|
||||
template <class ClassName, class BaseName, class StructName>
|
||||
class CefCToCpp : public BaseName {
|
||||
public:
|
||||
// Use this method to create a wrapper class instance for a structure
|
||||
// received from the other side.
|
||||
static CefRefPtr<BaseName> Wrap(StructName* s) {
|
||||
if (!s)
|
||||
return NULL;
|
||||
|
||||
// Wrap their structure with the CefCToCpp object.
|
||||
ClassName* wrapper = new ClassName(s);
|
||||
// Put the wrapper object in a smart pointer.
|
||||
CefRefPtr<BaseName> wrapperPtr(wrapper);
|
||||
// Release the reference that was added to the CefCppToC wrapper object on
|
||||
// the other side before their structure was passed to us.
|
||||
wrapper->UnderlyingRelease();
|
||||
// Return the smart pointer.
|
||||
return wrapperPtr;
|
||||
}
|
||||
|
||||
// Use this method to retrieve the underlying structure from a wrapper class
|
||||
// instance for return back to the other side.
|
||||
static StructName* Unwrap(CefRefPtr<BaseName> c) {
|
||||
if (!c.get())
|
||||
return NULL;
|
||||
|
||||
// Cast the object to our wrapper class type.
|
||||
ClassName* wrapper = static_cast<ClassName*>(c.get());
|
||||
// Add a reference to the CefCppToC wrapper object on the other side that
|
||||
// will be released once the structure is received.
|
||||
wrapper->UnderlyingAddRef();
|
||||
// Return their original structure.
|
||||
return wrapper->GetStruct();
|
||||
}
|
||||
|
||||
explicit CefCToCpp(StructName* str)
|
||||
: struct_(str) {
|
||||
DCHECK(str);
|
||||
|
||||
#ifndef NDEBUG
|
||||
CefAtomicIncrement(&DebugObjCt);
|
||||
#endif
|
||||
}
|
||||
virtual ~CefCToCpp() {
|
||||
#ifndef NDEBUG
|
||||
CefAtomicDecrement(&DebugObjCt);
|
||||
#endif
|
||||
}
|
||||
|
||||
// If returning the structure across the DLL boundary you should call
|
||||
// UnderlyingAddRef() on this wrapping CefCToCpp object. On the other side of
|
||||
// the DLL boundary, call Release() on the CefCppToC object.
|
||||
StructName* GetStruct() { return struct_; }
|
||||
|
||||
// CefBase methods increment/decrement reference counts on both this object
|
||||
// and the underlying wrapped structure.
|
||||
int AddRef() {
|
||||
UnderlyingAddRef();
|
||||
return refct_.AddRef();
|
||||
}
|
||||
int Release() {
|
||||
UnderlyingRelease();
|
||||
int retval = refct_.Release();
|
||||
if (retval == 0)
|
||||
delete this;
|
||||
return retval;
|
||||
}
|
||||
int GetRefCt() { return refct_.GetRefCt(); }
|
||||
|
||||
// Increment/decrement reference counts on only the underlying class.
|
||||
int UnderlyingAddRef() {
|
||||
if (!struct_->base.add_ref)
|
||||
return 0;
|
||||
return struct_->base.add_ref(&struct_->base);
|
||||
}
|
||||
int UnderlyingRelease() {
|
||||
if (!struct_->base.release)
|
||||
return 0;
|
||||
return struct_->base.release(&struct_->base);
|
||||
}
|
||||
int UnderlyingGetRefCt() {
|
||||
if (!struct_->base.get_refct)
|
||||
return 0;
|
||||
return struct_->base.get_refct(&struct_->base);
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
// Simple tracking of allocated objects.
|
||||
static long DebugObjCt; // NOLINT(runtime/int)
|
||||
#endif
|
||||
|
||||
protected:
|
||||
CefRefCount refct_;
|
||||
StructName* struct_;
|
||||
};
|
||||
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_CTOCPP_H_
|
517
libcef_dll/ctocpp/dictionary_value_ctocpp.cc
Normal file
517
libcef_dll/ctocpp/dictionary_value_ctocpp.cc
Normal file
@@ -0,0 +1,517 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/binary_value_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/dictionary_value_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/list_value_ctocpp.h"
|
||||
#include "libcef_dll/transfer_util.h"
|
||||
|
||||
|
||||
// STATIC METHODS - Body may be edited by hand.
|
||||
|
||||
CefRefPtr<CefDictionaryValue> CefDictionaryValue::Create() {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_dictionary_value_t* _retval = cef_dictionary_value_create();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefDictionaryValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
bool CefDictionaryValueCToCpp::IsValid() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_valid))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_valid(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefDictionaryValueCToCpp::IsOwned() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_owned))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_owned(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefDictionaryValueCToCpp::IsReadOnly() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_read_only))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_read_only(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
CefRefPtr<CefDictionaryValue> CefDictionaryValueCToCpp::Copy(
|
||||
bool exclude_empty_children) {
|
||||
if (CEF_MEMBER_MISSING(struct_, copy))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_dictionary_value_t* _retval = struct_->copy(struct_,
|
||||
exclude_empty_children);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefDictionaryValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
size_t CefDictionaryValueCToCpp::GetSize() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_size))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
size_t _retval = struct_->get_size(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
bool CefDictionaryValueCToCpp::Clear() {
|
||||
if (CEF_MEMBER_MISSING(struct_, clear))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->clear(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefDictionaryValueCToCpp::HasKey(const CefString& key) {
|
||||
if (CEF_MEMBER_MISSING(struct_, has_key))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: key; type: string_byref_const
|
||||
DCHECK(!key.empty());
|
||||
if (key.empty())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->has_key(struct_,
|
||||
key.GetStruct());
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefDictionaryValueCToCpp::GetKeys(KeyList& keys) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_keys))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Translate param: keys; type: string_vec_byref
|
||||
cef_string_list_t keysList = cef_string_list_alloc();
|
||||
DCHECK(keysList);
|
||||
if (keysList)
|
||||
transfer_string_list_contents(keys, keysList);
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->get_keys(struct_,
|
||||
keysList);
|
||||
|
||||
// Restore param:keys; type: string_vec_byref
|
||||
if (keysList) {
|
||||
keys.clear();
|
||||
transfer_string_list_contents(keysList, keys);
|
||||
cef_string_list_free(keysList);
|
||||
}
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefDictionaryValueCToCpp::Remove(const CefString& key) {
|
||||
if (CEF_MEMBER_MISSING(struct_, remove))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: key; type: string_byref_const
|
||||
DCHECK(!key.empty());
|
||||
if (key.empty())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->remove(struct_,
|
||||
key.GetStruct());
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
CefValueType CefDictionaryValueCToCpp::GetType(const CefString& key) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_type))
|
||||
return VTYPE_INVALID;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: key; type: string_byref_const
|
||||
DCHECK(!key.empty());
|
||||
if (key.empty())
|
||||
return VTYPE_INVALID;
|
||||
|
||||
// Execute
|
||||
cef_value_type_t _retval = struct_->get_type(struct_,
|
||||
key.GetStruct());
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
bool CefDictionaryValueCToCpp::GetBool(const CefString& key) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_bool))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: key; type: string_byref_const
|
||||
DCHECK(!key.empty());
|
||||
if (key.empty())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->get_bool(struct_,
|
||||
key.GetStruct());
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
int CefDictionaryValueCToCpp::GetInt(const CefString& key) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_int))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: key; type: string_byref_const
|
||||
DCHECK(!key.empty());
|
||||
if (key.empty())
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->get_int(struct_,
|
||||
key.GetStruct());
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
double CefDictionaryValueCToCpp::GetDouble(const CefString& key) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_double))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: key; type: string_byref_const
|
||||
DCHECK(!key.empty());
|
||||
if (key.empty())
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
double _retval = struct_->get_double(struct_,
|
||||
key.GetStruct());
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
CefString CefDictionaryValueCToCpp::GetString(const CefString& key) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_string))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: key; type: string_byref_const
|
||||
DCHECK(!key.empty());
|
||||
if (key.empty())
|
||||
return CefString();
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_string(struct_,
|
||||
key.GetStruct());
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
CefRefPtr<CefBinaryValue> CefDictionaryValueCToCpp::GetBinary(
|
||||
const CefString& key) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_binary))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: key; type: string_byref_const
|
||||
DCHECK(!key.empty());
|
||||
if (key.empty())
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
cef_binary_value_t* _retval = struct_->get_binary(struct_,
|
||||
key.GetStruct());
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefBinaryValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefDictionaryValue> CefDictionaryValueCToCpp::GetDictionary(
|
||||
const CefString& key) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_dictionary))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: key; type: string_byref_const
|
||||
DCHECK(!key.empty());
|
||||
if (key.empty())
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
cef_dictionary_value_t* _retval = struct_->get_dictionary(struct_,
|
||||
key.GetStruct());
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefDictionaryValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefListValue> CefDictionaryValueCToCpp::GetList(
|
||||
const CefString& key) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_list))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: key; type: string_byref_const
|
||||
DCHECK(!key.empty());
|
||||
if (key.empty())
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
cef_list_value_t* _retval = struct_->get_list(struct_,
|
||||
key.GetStruct());
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefListValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
bool CefDictionaryValueCToCpp::SetNull(const CefString& key) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_null))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: key; type: string_byref_const
|
||||
DCHECK(!key.empty());
|
||||
if (key.empty())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->set_null(struct_,
|
||||
key.GetStruct());
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefDictionaryValueCToCpp::SetBool(const CefString& key, bool value) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_bool))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: key; type: string_byref_const
|
||||
DCHECK(!key.empty());
|
||||
if (key.empty())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->set_bool(struct_,
|
||||
key.GetStruct(),
|
||||
value);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefDictionaryValueCToCpp::SetInt(const CefString& key, int value) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_int))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: key; type: string_byref_const
|
||||
DCHECK(!key.empty());
|
||||
if (key.empty())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->set_int(struct_,
|
||||
key.GetStruct(),
|
||||
value);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefDictionaryValueCToCpp::SetDouble(const CefString& key, double value) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_double))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: key; type: string_byref_const
|
||||
DCHECK(!key.empty());
|
||||
if (key.empty())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->set_double(struct_,
|
||||
key.GetStruct(),
|
||||
value);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefDictionaryValueCToCpp::SetString(const CefString& key,
|
||||
const CefString& value) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_string))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: key; type: string_byref_const
|
||||
DCHECK(!key.empty());
|
||||
if (key.empty())
|
||||
return false;
|
||||
// Unverified params: value
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->set_string(struct_,
|
||||
key.GetStruct(),
|
||||
value.GetStruct());
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefDictionaryValueCToCpp::SetBinary(const CefString& key,
|
||||
CefRefPtr<CefBinaryValue> value) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_binary))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: key; type: string_byref_const
|
||||
DCHECK(!key.empty());
|
||||
if (key.empty())
|
||||
return false;
|
||||
// Verify param: value; type: refptr_same
|
||||
DCHECK(value.get());
|
||||
if (!value.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->set_binary(struct_,
|
||||
key.GetStruct(),
|
||||
CefBinaryValueCToCpp::Unwrap(value));
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefDictionaryValueCToCpp::SetDictionary(const CefString& key,
|
||||
CefRefPtr<CefDictionaryValue> value) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_dictionary))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: key; type: string_byref_const
|
||||
DCHECK(!key.empty());
|
||||
if (key.empty())
|
||||
return false;
|
||||
// Verify param: value; type: refptr_same
|
||||
DCHECK(value.get());
|
||||
if (!value.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->set_dictionary(struct_,
|
||||
key.GetStruct(),
|
||||
CefDictionaryValueCToCpp::Unwrap(value));
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefDictionaryValueCToCpp::SetList(const CefString& key,
|
||||
CefRefPtr<CefListValue> value) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_list))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: key; type: string_byref_const
|
||||
DCHECK(!key.empty());
|
||||
if (key.empty())
|
||||
return false;
|
||||
// Verify param: value; type: refptr_same
|
||||
DCHECK(value.get());
|
||||
if (!value.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->set_list(struct_,
|
||||
key.GetStruct(),
|
||||
CefListValueCToCpp::Unwrap(value));
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefDictionaryValueCToCpp, CefDictionaryValue,
|
||||
cef_dictionary_value_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
71
libcef_dll/ctocpp/dictionary_value_ctocpp.h
Normal file
71
libcef_dll/ctocpp/dictionary_value_ctocpp.h
Normal file
@@ -0,0 +1,71 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_DICTIONARY_VALUE_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_DICTIONARY_VALUE_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/cef_values.h"
|
||||
#include "include/capi/cef_values_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefDictionaryValueCToCpp
|
||||
: public CefCToCpp<CefDictionaryValueCToCpp, CefDictionaryValue,
|
||||
cef_dictionary_value_t> {
|
||||
public:
|
||||
explicit CefDictionaryValueCToCpp(cef_dictionary_value_t* str)
|
||||
: CefCToCpp<CefDictionaryValueCToCpp, CefDictionaryValue,
|
||||
cef_dictionary_value_t>(str) {}
|
||||
virtual ~CefDictionaryValueCToCpp() {}
|
||||
|
||||
// CefDictionaryValue methods
|
||||
virtual bool IsValid() OVERRIDE;
|
||||
virtual bool IsOwned() OVERRIDE;
|
||||
virtual bool IsReadOnly() OVERRIDE;
|
||||
virtual CefRefPtr<CefDictionaryValue> Copy(
|
||||
bool exclude_empty_children) OVERRIDE;
|
||||
virtual size_t GetSize() OVERRIDE;
|
||||
virtual bool Clear() OVERRIDE;
|
||||
virtual bool HasKey(const CefString& key) OVERRIDE;
|
||||
virtual bool GetKeys(KeyList& keys) OVERRIDE;
|
||||
virtual bool Remove(const CefString& key) OVERRIDE;
|
||||
virtual CefValueType GetType(const CefString& key) OVERRIDE;
|
||||
virtual bool GetBool(const CefString& key) OVERRIDE;
|
||||
virtual int GetInt(const CefString& key) OVERRIDE;
|
||||
virtual double GetDouble(const CefString& key) OVERRIDE;
|
||||
virtual CefString GetString(const CefString& key) OVERRIDE;
|
||||
virtual CefRefPtr<CefBinaryValue> GetBinary(const CefString& key) OVERRIDE;
|
||||
virtual CefRefPtr<CefDictionaryValue> GetDictionary(
|
||||
const CefString& key) OVERRIDE;
|
||||
virtual CefRefPtr<CefListValue> GetList(const CefString& key) OVERRIDE;
|
||||
virtual bool SetNull(const CefString& key) OVERRIDE;
|
||||
virtual bool SetBool(const CefString& key, bool value) OVERRIDE;
|
||||
virtual bool SetInt(const CefString& key, int value) OVERRIDE;
|
||||
virtual bool SetDouble(const CefString& key, double value) OVERRIDE;
|
||||
virtual bool SetString(const CefString& key, const CefString& value) OVERRIDE;
|
||||
virtual bool SetBinary(const CefString& key,
|
||||
CefRefPtr<CefBinaryValue> value) OVERRIDE;
|
||||
virtual bool SetDictionary(const CefString& key,
|
||||
CefRefPtr<CefDictionaryValue> value) OVERRIDE;
|
||||
virtual bool SetList(const CefString& key,
|
||||
CefRefPtr<CefListValue> value) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_DICTIONARY_VALUE_CTOCPP_H_
|
||||
|
158
libcef_dll/ctocpp/display_handler_ctocpp.cc
Normal file
158
libcef_dll/ctocpp/display_handler_ctocpp.cc
Normal file
@@ -0,0 +1,158 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/browser_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/frame_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/display_handler_ctocpp.h"
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
void CefDisplayHandlerCToCpp::OnLoadingStateChange(
|
||||
CefRefPtr<CefBrowser> browser, bool isLoading, bool canGoBack,
|
||||
bool canGoForward) {
|
||||
if (CEF_MEMBER_MISSING(struct_, on_loading_state_change))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->on_loading_state_change(struct_,
|
||||
CefBrowserCppToC::Wrap(browser),
|
||||
isLoading,
|
||||
canGoBack,
|
||||
canGoForward);
|
||||
}
|
||||
|
||||
void CefDisplayHandlerCToCpp::OnAddressChange(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame, const CefString& url) {
|
||||
if (CEF_MEMBER_MISSING(struct_, on_address_change))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return;
|
||||
// Verify param: frame; type: refptr_diff
|
||||
DCHECK(frame.get());
|
||||
if (!frame.get())
|
||||
return;
|
||||
// Verify param: url; type: string_byref_const
|
||||
DCHECK(!url.empty());
|
||||
if (url.empty())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->on_address_change(struct_,
|
||||
CefBrowserCppToC::Wrap(browser),
|
||||
CefFrameCppToC::Wrap(frame),
|
||||
url.GetStruct());
|
||||
}
|
||||
|
||||
void CefDisplayHandlerCToCpp::OnTitleChange(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& title) {
|
||||
if (CEF_MEMBER_MISSING(struct_, on_title_change))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return;
|
||||
// Unverified params: title
|
||||
|
||||
// Execute
|
||||
struct_->on_title_change(struct_,
|
||||
CefBrowserCppToC::Wrap(browser),
|
||||
title.GetStruct());
|
||||
}
|
||||
|
||||
bool CefDisplayHandlerCToCpp::OnTooltip(CefRefPtr<CefBrowser> browser,
|
||||
CefString& text) {
|
||||
if (CEF_MEMBER_MISSING(struct_, on_tooltip))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return false;
|
||||
// Unverified params: text
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->on_tooltip(struct_,
|
||||
CefBrowserCppToC::Wrap(browser),
|
||||
text.GetWritableStruct());
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
void CefDisplayHandlerCToCpp::OnStatusMessage(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& value, StatusType type) {
|
||||
if (CEF_MEMBER_MISSING(struct_, on_status_message))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return;
|
||||
// Unverified params: value
|
||||
|
||||
// Execute
|
||||
struct_->on_status_message(struct_,
|
||||
CefBrowserCppToC::Wrap(browser),
|
||||
value.GetStruct(),
|
||||
type);
|
||||
}
|
||||
|
||||
bool CefDisplayHandlerCToCpp::OnConsoleMessage(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& message, const CefString& source, int line) {
|
||||
if (CEF_MEMBER_MISSING(struct_, on_console_message))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return false;
|
||||
// Unverified params: message, source
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->on_console_message(struct_,
|
||||
CefBrowserCppToC::Wrap(browser),
|
||||
message.GetStruct(),
|
||||
source.GetStruct(),
|
||||
line);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefDisplayHandlerCToCpp, CefDisplayHandler,
|
||||
cef_display_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
53
libcef_dll/ctocpp/display_handler_ctocpp.h
Normal file
53
libcef_dll/ctocpp/display_handler_ctocpp.h
Normal file
@@ -0,0 +1,53 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_DISPLAY_HANDLER_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_DISPLAY_HANDLER_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/cef_display_handler.h"
|
||||
#include "include/capi/cef_display_handler_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefDisplayHandlerCToCpp
|
||||
: public CefCToCpp<CefDisplayHandlerCToCpp, CefDisplayHandler,
|
||||
cef_display_handler_t> {
|
||||
public:
|
||||
explicit CefDisplayHandlerCToCpp(cef_display_handler_t* str)
|
||||
: CefCToCpp<CefDisplayHandlerCToCpp, CefDisplayHandler,
|
||||
cef_display_handler_t>(str) {}
|
||||
virtual ~CefDisplayHandlerCToCpp() {}
|
||||
|
||||
// CefDisplayHandler methods
|
||||
virtual void OnLoadingStateChange(CefRefPtr<CefBrowser> browser,
|
||||
bool isLoading, bool canGoBack, bool canGoForward) OVERRIDE;
|
||||
virtual void OnAddressChange(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame, const CefString& url) OVERRIDE;
|
||||
virtual void OnTitleChange(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& title) OVERRIDE;
|
||||
virtual bool OnTooltip(CefRefPtr<CefBrowser> browser,
|
||||
CefString& text) OVERRIDE;
|
||||
virtual void OnStatusMessage(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& value, StatusType type) OVERRIDE;
|
||||
virtual bool OnConsoleMessage(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& message, const CefString& source, int line) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_DISPLAY_HANDLER_CTOCPP_H_
|
||||
|
334
libcef_dll/ctocpp/frame_ctocpp.cc
Normal file
334
libcef_dll/ctocpp/frame_ctocpp.cc
Normal file
@@ -0,0 +1,334 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/string_visitor_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/browser_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/frame_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/request_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/v8context_ctocpp.h"
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
bool CefFrameCToCpp::IsValid() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_valid))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_valid(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
void CefFrameCToCpp::Undo() {
|
||||
if (CEF_MEMBER_MISSING(struct_, undo))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->undo(struct_);
|
||||
}
|
||||
|
||||
void CefFrameCToCpp::Redo() {
|
||||
if (CEF_MEMBER_MISSING(struct_, redo))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->redo(struct_);
|
||||
}
|
||||
|
||||
void CefFrameCToCpp::Cut() {
|
||||
if (CEF_MEMBER_MISSING(struct_, cut))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->cut(struct_);
|
||||
}
|
||||
|
||||
void CefFrameCToCpp::Copy() {
|
||||
if (CEF_MEMBER_MISSING(struct_, copy))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->copy(struct_);
|
||||
}
|
||||
|
||||
void CefFrameCToCpp::Paste() {
|
||||
if (CEF_MEMBER_MISSING(struct_, paste))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->paste(struct_);
|
||||
}
|
||||
|
||||
void CefFrameCToCpp::Delete() {
|
||||
if (CEF_MEMBER_MISSING(struct_, del))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->del(struct_);
|
||||
}
|
||||
|
||||
void CefFrameCToCpp::SelectAll() {
|
||||
if (CEF_MEMBER_MISSING(struct_, select_all))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->select_all(struct_);
|
||||
}
|
||||
|
||||
void CefFrameCToCpp::ViewSource() {
|
||||
if (CEF_MEMBER_MISSING(struct_, view_source))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->view_source(struct_);
|
||||
}
|
||||
|
||||
void CefFrameCToCpp::GetSource(CefRefPtr<CefStringVisitor> visitor) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_source))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: visitor; type: refptr_diff
|
||||
DCHECK(visitor.get());
|
||||
if (!visitor.get())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->get_source(struct_,
|
||||
CefStringVisitorCppToC::Wrap(visitor));
|
||||
}
|
||||
|
||||
void CefFrameCToCpp::GetText(CefRefPtr<CefStringVisitor> visitor) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_text))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: visitor; type: refptr_diff
|
||||
DCHECK(visitor.get());
|
||||
if (!visitor.get())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->get_text(struct_,
|
||||
CefStringVisitorCppToC::Wrap(visitor));
|
||||
}
|
||||
|
||||
void CefFrameCToCpp::LoadRequest(CefRefPtr<CefRequest> request) {
|
||||
if (CEF_MEMBER_MISSING(struct_, load_request))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: request; type: refptr_same
|
||||
DCHECK(request.get());
|
||||
if (!request.get())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->load_request(struct_,
|
||||
CefRequestCToCpp::Unwrap(request));
|
||||
}
|
||||
|
||||
void CefFrameCToCpp::LoadURL(const CefString& url) {
|
||||
if (CEF_MEMBER_MISSING(struct_, load_url))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: url; type: string_byref_const
|
||||
DCHECK(!url.empty());
|
||||
if (url.empty())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->load_url(struct_,
|
||||
url.GetStruct());
|
||||
}
|
||||
|
||||
void CefFrameCToCpp::LoadString(const CefString& string_val,
|
||||
const CefString& url) {
|
||||
if (CEF_MEMBER_MISSING(struct_, load_string))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: string_val; type: string_byref_const
|
||||
DCHECK(!string_val.empty());
|
||||
if (string_val.empty())
|
||||
return;
|
||||
// Verify param: url; type: string_byref_const
|
||||
DCHECK(!url.empty());
|
||||
if (url.empty())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->load_string(struct_,
|
||||
string_val.GetStruct(),
|
||||
url.GetStruct());
|
||||
}
|
||||
|
||||
void CefFrameCToCpp::ExecuteJavaScript(const CefString& jsCode,
|
||||
const CefString& scriptUrl, int startLine) {
|
||||
if (CEF_MEMBER_MISSING(struct_, execute_java_script))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: jsCode; type: string_byref_const
|
||||
DCHECK(!jsCode.empty());
|
||||
if (jsCode.empty())
|
||||
return;
|
||||
// Unverified params: scriptUrl
|
||||
|
||||
// Execute
|
||||
struct_->execute_java_script(struct_,
|
||||
jsCode.GetStruct(),
|
||||
scriptUrl.GetStruct(),
|
||||
startLine);
|
||||
}
|
||||
|
||||
bool CefFrameCToCpp::IsMain() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_main))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_main(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefFrameCToCpp::IsFocused() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_focused))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_focused(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
CefString CefFrameCToCpp::GetName() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_name))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_name(struct_);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
int64 CefFrameCToCpp::GetIdentifier() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_identifier))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int64 _retval = struct_->get_identifier(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
CefRefPtr<CefFrame> CefFrameCToCpp::GetParent() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_parent))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_frame_t* _retval = struct_->get_parent(struct_);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefFrameCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefString CefFrameCToCpp::GetURL() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_url))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_url(struct_);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
CefRefPtr<CefBrowser> CefFrameCToCpp::GetBrowser() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_browser))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_browser_t* _retval = struct_->get_browser(struct_);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefBrowserCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefV8Context> CefFrameCToCpp::GetV8Context() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_v8context))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_v8context_t* _retval = struct_->get_v8context(struct_);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefV8ContextCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefFrameCToCpp, CefFrame, cef_frame_t>::DebugObjCt =
|
||||
0;
|
||||
#endif
|
||||
|
68
libcef_dll/ctocpp/frame_ctocpp.h
Normal file
68
libcef_dll/ctocpp/frame_ctocpp.h
Normal file
@@ -0,0 +1,68 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_FRAME_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_FRAME_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/cef_frame.h"
|
||||
#include "include/capi/cef_frame_capi.h"
|
||||
#include "include/cef_browser.h"
|
||||
#include "include/capi/cef_browser_capi.h"
|
||||
#include "include/cef_v8.h"
|
||||
#include "include/capi/cef_v8_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefFrameCToCpp
|
||||
: public CefCToCpp<CefFrameCToCpp, CefFrame, cef_frame_t> {
|
||||
public:
|
||||
explicit CefFrameCToCpp(cef_frame_t* str)
|
||||
: CefCToCpp<CefFrameCToCpp, CefFrame, cef_frame_t>(str) {}
|
||||
virtual ~CefFrameCToCpp() {}
|
||||
|
||||
// CefFrame methods
|
||||
virtual bool IsValid() OVERRIDE;
|
||||
virtual void Undo() OVERRIDE;
|
||||
virtual void Redo() OVERRIDE;
|
||||
virtual void Cut() OVERRIDE;
|
||||
virtual void Copy() OVERRIDE;
|
||||
virtual void Paste() OVERRIDE;
|
||||
virtual void Delete() OVERRIDE;
|
||||
virtual void SelectAll() OVERRIDE;
|
||||
virtual void ViewSource() OVERRIDE;
|
||||
virtual void GetSource(CefRefPtr<CefStringVisitor> visitor) OVERRIDE;
|
||||
virtual void GetText(CefRefPtr<CefStringVisitor> visitor) OVERRIDE;
|
||||
virtual void LoadRequest(CefRefPtr<CefRequest> request) OVERRIDE;
|
||||
virtual void LoadURL(const CefString& url) OVERRIDE;
|
||||
virtual void LoadString(const CefString& string_val,
|
||||
const CefString& url) OVERRIDE;
|
||||
virtual void ExecuteJavaScript(const CefString& jsCode,
|
||||
const CefString& scriptUrl, int startLine) OVERRIDE;
|
||||
virtual bool IsMain() OVERRIDE;
|
||||
virtual bool IsFocused() OVERRIDE;
|
||||
virtual CefString GetName() OVERRIDE;
|
||||
virtual int64 GetIdentifier() OVERRIDE;
|
||||
virtual CefRefPtr<CefFrame> GetParent() OVERRIDE;
|
||||
virtual CefString GetURL() OVERRIDE;
|
||||
virtual CefRefPtr<CefBrowser> GetBrowser() OVERRIDE;
|
||||
virtual CefRefPtr<CefV8Context> GetV8Context() OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_FRAME_CTOCPP_H_
|
||||
|
34
libcef_dll/ctocpp/geolocation_callback_ctocpp.cc
Normal file
34
libcef_dll/ctocpp/geolocation_callback_ctocpp.cc
Normal file
@@ -0,0 +1,34 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/geolocation_callback_ctocpp.h"
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
void CefGeolocationCallbackCToCpp::Continue(bool allow) {
|
||||
if (CEF_MEMBER_MISSING(struct_, cont))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->cont(struct_,
|
||||
allow);
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefGeolocationCallbackCToCpp, CefGeolocationCallback,
|
||||
cef_geolocation_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
42
libcef_dll/ctocpp/geolocation_callback_ctocpp.h
Normal file
42
libcef_dll/ctocpp/geolocation_callback_ctocpp.h
Normal file
@@ -0,0 +1,42 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_GEOLOCATION_CALLBACK_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_GEOLOCATION_CALLBACK_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/cef_geolocation_handler.h"
|
||||
#include "include/capi/cef_geolocation_handler_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefGeolocationCallbackCToCpp
|
||||
: public CefCToCpp<CefGeolocationCallbackCToCpp, CefGeolocationCallback,
|
||||
cef_geolocation_callback_t> {
|
||||
public:
|
||||
explicit CefGeolocationCallbackCToCpp(cef_geolocation_callback_t* str)
|
||||
: CefCToCpp<CefGeolocationCallbackCToCpp, CefGeolocationCallback,
|
||||
cef_geolocation_callback_t>(str) {}
|
||||
virtual ~CefGeolocationCallbackCToCpp() {}
|
||||
|
||||
// CefGeolocationCallback methods
|
||||
virtual void Continue(bool allow) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_GEOLOCATION_CALLBACK_CTOCPP_H_
|
||||
|
78
libcef_dll/ctocpp/geolocation_handler_ctocpp.cc
Normal file
78
libcef_dll/ctocpp/geolocation_handler_ctocpp.cc
Normal file
@@ -0,0 +1,78 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/browser_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/geolocation_callback_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/geolocation_handler_ctocpp.h"
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
void CefGeolocationHandlerCToCpp::OnRequestGeolocationPermission(
|
||||
CefRefPtr<CefBrowser> browser, const CefString& requesting_url,
|
||||
int request_id, CefRefPtr<CefGeolocationCallback> callback) {
|
||||
if (CEF_MEMBER_MISSING(struct_, on_request_geolocation_permission))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return;
|
||||
// Verify param: requesting_url; type: string_byref_const
|
||||
DCHECK(!requesting_url.empty());
|
||||
if (requesting_url.empty())
|
||||
return;
|
||||
// Verify param: callback; type: refptr_diff
|
||||
DCHECK(callback.get());
|
||||
if (!callback.get())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->on_request_geolocation_permission(struct_,
|
||||
CefBrowserCppToC::Wrap(browser),
|
||||
requesting_url.GetStruct(),
|
||||
request_id,
|
||||
CefGeolocationCallbackCppToC::Wrap(callback));
|
||||
}
|
||||
|
||||
void CefGeolocationHandlerCToCpp::OnCancelGeolocationPermission(
|
||||
CefRefPtr<CefBrowser> browser, const CefString& requesting_url,
|
||||
int request_id) {
|
||||
if (CEF_MEMBER_MISSING(struct_, on_cancel_geolocation_permission))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return;
|
||||
// Verify param: requesting_url; type: string_byref_const
|
||||
DCHECK(!requesting_url.empty());
|
||||
if (requesting_url.empty())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->on_cancel_geolocation_permission(struct_,
|
||||
CefBrowserCppToC::Wrap(browser),
|
||||
requesting_url.GetStruct(),
|
||||
request_id);
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefGeolocationHandlerCToCpp, CefGeolocationHandler,
|
||||
cef_geolocation_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
46
libcef_dll/ctocpp/geolocation_handler_ctocpp.h
Normal file
46
libcef_dll/ctocpp/geolocation_handler_ctocpp.h
Normal file
@@ -0,0 +1,46 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_GEOLOCATION_HANDLER_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_GEOLOCATION_HANDLER_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/cef_geolocation_handler.h"
|
||||
#include "include/capi/cef_geolocation_handler_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefGeolocationHandlerCToCpp
|
||||
: public CefCToCpp<CefGeolocationHandlerCToCpp, CefGeolocationHandler,
|
||||
cef_geolocation_handler_t> {
|
||||
public:
|
||||
explicit CefGeolocationHandlerCToCpp(cef_geolocation_handler_t* str)
|
||||
: CefCToCpp<CefGeolocationHandlerCToCpp, CefGeolocationHandler,
|
||||
cef_geolocation_handler_t>(str) {}
|
||||
virtual ~CefGeolocationHandlerCToCpp() {}
|
||||
|
||||
// CefGeolocationHandler methods
|
||||
virtual void OnRequestGeolocationPermission(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& requesting_url, int request_id,
|
||||
CefRefPtr<CefGeolocationCallback> callback) OVERRIDE;
|
||||
virtual void OnCancelGeolocationPermission(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& requesting_url, int request_id) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_GEOLOCATION_HANDLER_CTOCPP_H_
|
||||
|
138
libcef_dll/ctocpp/life_span_handler_ctocpp.cc
Normal file
138
libcef_dll/ctocpp/life_span_handler_ctocpp.cc
Normal file
@@ -0,0 +1,138 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/browser_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/client_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/life_span_handler_ctocpp.h"
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
bool CefLifeSpanHandlerCToCpp::OnBeforePopup(
|
||||
CefRefPtr<CefBrowser> parentBrowser, const CefPopupFeatures& popupFeatures,
|
||||
CefWindowInfo& windowInfo, const CefString& url,
|
||||
CefRefPtr<CefClient>& client, CefBrowserSettings& settings) {
|
||||
if (CEF_MEMBER_MISSING(struct_, on_before_popup))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: parentBrowser; type: refptr_diff
|
||||
DCHECK(parentBrowser.get());
|
||||
if (!parentBrowser.get())
|
||||
return false;
|
||||
// Unverified params: url
|
||||
|
||||
// Translate param: client; type: refptr_same_byref
|
||||
cef_client_t* clientStruct = NULL;
|
||||
if (client.get())
|
||||
clientStruct = CefClientCToCpp::Unwrap(client);
|
||||
cef_client_t* clientOrig = clientStruct;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->on_before_popup(struct_,
|
||||
CefBrowserCppToC::Wrap(parentBrowser),
|
||||
&popupFeatures,
|
||||
&windowInfo,
|
||||
url.GetStruct(),
|
||||
&clientStruct,
|
||||
&settings);
|
||||
|
||||
// Restore param:client; type: refptr_same_byref
|
||||
if (clientStruct) {
|
||||
if (clientStruct != clientOrig) {
|
||||
client = CefClientCToCpp::Wrap(clientStruct);
|
||||
}
|
||||
} else {
|
||||
client = NULL;
|
||||
}
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
void CefLifeSpanHandlerCToCpp::OnAfterCreated(CefRefPtr<CefBrowser> browser) {
|
||||
if (CEF_MEMBER_MISSING(struct_, on_after_created))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->on_after_created(struct_,
|
||||
CefBrowserCppToC::Wrap(browser));
|
||||
}
|
||||
|
||||
bool CefLifeSpanHandlerCToCpp::RunModal(CefRefPtr<CefBrowser> browser) {
|
||||
if (CEF_MEMBER_MISSING(struct_, run_modal))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->run_modal(struct_,
|
||||
CefBrowserCppToC::Wrap(browser));
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefLifeSpanHandlerCToCpp::DoClose(CefRefPtr<CefBrowser> browser) {
|
||||
if (CEF_MEMBER_MISSING(struct_, do_close))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->do_close(struct_,
|
||||
CefBrowserCppToC::Wrap(browser));
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
void CefLifeSpanHandlerCToCpp::OnBeforeClose(CefRefPtr<CefBrowser> browser) {
|
||||
if (CEF_MEMBER_MISSING(struct_, on_before_close))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->on_before_close(struct_,
|
||||
CefBrowserCppToC::Wrap(browser));
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefLifeSpanHandlerCToCpp, CefLifeSpanHandler,
|
||||
cef_life_span_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
51
libcef_dll/ctocpp/life_span_handler_ctocpp.h
Normal file
51
libcef_dll/ctocpp/life_span_handler_ctocpp.h
Normal file
@@ -0,0 +1,51 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_LIFE_SPAN_HANDLER_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_LIFE_SPAN_HANDLER_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/cef_life_span_handler.h"
|
||||
#include "include/capi/cef_life_span_handler_capi.h"
|
||||
#include "include/cef_client.h"
|
||||
#include "include/capi/cef_client_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefLifeSpanHandlerCToCpp
|
||||
: public CefCToCpp<CefLifeSpanHandlerCToCpp, CefLifeSpanHandler,
|
||||
cef_life_span_handler_t> {
|
||||
public:
|
||||
explicit CefLifeSpanHandlerCToCpp(cef_life_span_handler_t* str)
|
||||
: CefCToCpp<CefLifeSpanHandlerCToCpp, CefLifeSpanHandler,
|
||||
cef_life_span_handler_t>(str) {}
|
||||
virtual ~CefLifeSpanHandlerCToCpp() {}
|
||||
|
||||
// CefLifeSpanHandler methods
|
||||
virtual bool OnBeforePopup(CefRefPtr<CefBrowser> parentBrowser,
|
||||
const CefPopupFeatures& popupFeatures, CefWindowInfo& windowInfo,
|
||||
const CefString& url, CefRefPtr<CefClient>& client,
|
||||
CefBrowserSettings& settings) OVERRIDE;
|
||||
virtual void OnAfterCreated(CefRefPtr<CefBrowser> browser) OVERRIDE;
|
||||
virtual bool RunModal(CefRefPtr<CefBrowser> browser) OVERRIDE;
|
||||
virtual bool DoClose(CefRefPtr<CefBrowser> browser) OVERRIDE;
|
||||
virtual void OnBeforeClose(CefRefPtr<CefBrowser> browser) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_LIFE_SPAN_HANDLER_CTOCPP_H_
|
||||
|
476
libcef_dll/ctocpp/list_value_ctocpp.cc
Normal file
476
libcef_dll/ctocpp/list_value_ctocpp.cc
Normal file
@@ -0,0 +1,476 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/binary_value_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/dictionary_value_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/list_value_ctocpp.h"
|
||||
|
||||
|
||||
// STATIC METHODS - Body may be edited by hand.
|
||||
|
||||
CefRefPtr<CefListValue> CefListValue::Create() {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_list_value_t* _retval = cef_list_value_create();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefListValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
bool CefListValueCToCpp::IsValid() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_valid))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_valid(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefListValueCToCpp::IsOwned() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_owned))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_owned(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefListValueCToCpp::IsReadOnly() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_read_only))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_read_only(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
CefRefPtr<CefListValue> CefListValueCToCpp::Copy() {
|
||||
if (CEF_MEMBER_MISSING(struct_, copy))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_list_value_t* _retval = struct_->copy(struct_);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefListValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
bool CefListValueCToCpp::SetSize(size_t size) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_size))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->set_size(struct_,
|
||||
size);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
size_t CefListValueCToCpp::GetSize() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_size))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
size_t _retval = struct_->get_size(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
bool CefListValueCToCpp::Clear() {
|
||||
if (CEF_MEMBER_MISSING(struct_, clear))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->clear(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefListValueCToCpp::Remove(int index) {
|
||||
if (CEF_MEMBER_MISSING(struct_, remove))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->remove(struct_,
|
||||
index);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
CefValueType CefListValueCToCpp::GetType(int index) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_type))
|
||||
return VTYPE_INVALID;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return VTYPE_INVALID;
|
||||
|
||||
// Execute
|
||||
cef_value_type_t _retval = struct_->get_type(struct_,
|
||||
index);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
bool CefListValueCToCpp::GetBool(int index) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_bool))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->get_bool(struct_,
|
||||
index);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
int CefListValueCToCpp::GetInt(int index) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_int))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->get_int(struct_,
|
||||
index);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
double CefListValueCToCpp::GetDouble(int index) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_double))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
double _retval = struct_->get_double(struct_,
|
||||
index);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
CefString CefListValueCToCpp::GetString(int index) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_string))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return CefString();
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_string(struct_,
|
||||
index);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
CefRefPtr<CefBinaryValue> CefListValueCToCpp::GetBinary(int index) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_binary))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
cef_binary_value_t* _retval = struct_->get_binary(struct_,
|
||||
index);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefBinaryValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefDictionaryValue> CefListValueCToCpp::GetDictionary(int index) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_dictionary))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
cef_dictionary_value_t* _retval = struct_->get_dictionary(struct_,
|
||||
index);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefDictionaryValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefListValue> CefListValueCToCpp::GetList(int index) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_list))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
cef_list_value_t* _retval = struct_->get_list(struct_,
|
||||
index);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefListValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
bool CefListValueCToCpp::SetNull(int index) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_null))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->set_null(struct_,
|
||||
index);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefListValueCToCpp::SetBool(int index, bool value) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_bool))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->set_bool(struct_,
|
||||
index,
|
||||
value);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefListValueCToCpp::SetInt(int index, int value) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_int))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->set_int(struct_,
|
||||
index,
|
||||
value);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefListValueCToCpp::SetDouble(int index, double value) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_double))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->set_double(struct_,
|
||||
index,
|
||||
value);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefListValueCToCpp::SetString(int index, const CefString& value) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_string))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return false;
|
||||
// Unverified params: value
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->set_string(struct_,
|
||||
index,
|
||||
value.GetStruct());
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefListValueCToCpp::SetBinary(int index, CefRefPtr<CefBinaryValue> value) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_binary))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return false;
|
||||
// Verify param: value; type: refptr_same
|
||||
DCHECK(value.get());
|
||||
if (!value.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->set_binary(struct_,
|
||||
index,
|
||||
CefBinaryValueCToCpp::Unwrap(value));
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefListValueCToCpp::SetDictionary(int index,
|
||||
CefRefPtr<CefDictionaryValue> value) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_dictionary))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return false;
|
||||
// Verify param: value; type: refptr_same
|
||||
DCHECK(value.get());
|
||||
if (!value.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->set_dictionary(struct_,
|
||||
index,
|
||||
CefDictionaryValueCToCpp::Unwrap(value));
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefListValueCToCpp::SetList(int index, CefRefPtr<CefListValue> value) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_list))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return false;
|
||||
// Verify param: value; type: refptr_same
|
||||
DCHECK(value.get());
|
||||
if (!value.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->set_list(struct_,
|
||||
index,
|
||||
CefListValueCToCpp::Unwrap(value));
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefListValueCToCpp, CefListValue,
|
||||
cef_list_value_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
64
libcef_dll/ctocpp/list_value_ctocpp.h
Normal file
64
libcef_dll/ctocpp/list_value_ctocpp.h
Normal file
@@ -0,0 +1,64 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_LIST_VALUE_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_LIST_VALUE_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/cef_values.h"
|
||||
#include "include/capi/cef_values_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefListValueCToCpp
|
||||
: public CefCToCpp<CefListValueCToCpp, CefListValue, cef_list_value_t> {
|
||||
public:
|
||||
explicit CefListValueCToCpp(cef_list_value_t* str)
|
||||
: CefCToCpp<CefListValueCToCpp, CefListValue, cef_list_value_t>(str) {}
|
||||
virtual ~CefListValueCToCpp() {}
|
||||
|
||||
// CefListValue methods
|
||||
virtual bool IsValid() OVERRIDE;
|
||||
virtual bool IsOwned() OVERRIDE;
|
||||
virtual bool IsReadOnly() OVERRIDE;
|
||||
virtual CefRefPtr<CefListValue> Copy() OVERRIDE;
|
||||
virtual bool SetSize(size_t size) OVERRIDE;
|
||||
virtual size_t GetSize() OVERRIDE;
|
||||
virtual bool Clear() OVERRIDE;
|
||||
virtual bool Remove(int index) OVERRIDE;
|
||||
virtual CefValueType GetType(int index) OVERRIDE;
|
||||
virtual bool GetBool(int index) OVERRIDE;
|
||||
virtual int GetInt(int index) OVERRIDE;
|
||||
virtual double GetDouble(int index) OVERRIDE;
|
||||
virtual CefString GetString(int index) OVERRIDE;
|
||||
virtual CefRefPtr<CefBinaryValue> GetBinary(int index) OVERRIDE;
|
||||
virtual CefRefPtr<CefDictionaryValue> GetDictionary(int index) OVERRIDE;
|
||||
virtual CefRefPtr<CefListValue> GetList(int index) OVERRIDE;
|
||||
virtual bool SetNull(int index) OVERRIDE;
|
||||
virtual bool SetBool(int index, bool value) OVERRIDE;
|
||||
virtual bool SetInt(int index, int value) OVERRIDE;
|
||||
virtual bool SetDouble(int index, double value) OVERRIDE;
|
||||
virtual bool SetString(int index, const CefString& value) OVERRIDE;
|
||||
virtual bool SetBinary(int index, CefRefPtr<CefBinaryValue> value) OVERRIDE;
|
||||
virtual bool SetDictionary(int index,
|
||||
CefRefPtr<CefDictionaryValue> value) OVERRIDE;
|
||||
virtual bool SetList(int index, CefRefPtr<CefListValue> value) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_LIST_VALUE_CTOCPP_H_
|
||||
|
101
libcef_dll/ctocpp/load_handler_ctocpp.cc
Normal file
101
libcef_dll/ctocpp/load_handler_ctocpp.cc
Normal file
@@ -0,0 +1,101 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/browser_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/frame_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/load_handler_ctocpp.h"
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
void CefLoadHandlerCToCpp::OnLoadStart(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame) {
|
||||
if (CEF_MEMBER_MISSING(struct_, on_load_start))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return;
|
||||
// Verify param: frame; type: refptr_diff
|
||||
DCHECK(frame.get());
|
||||
if (!frame.get())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->on_load_start(struct_,
|
||||
CefBrowserCppToC::Wrap(browser),
|
||||
CefFrameCppToC::Wrap(frame));
|
||||
}
|
||||
|
||||
void CefLoadHandlerCToCpp::OnLoadEnd(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame, int httpStatusCode) {
|
||||
if (CEF_MEMBER_MISSING(struct_, on_load_end))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return;
|
||||
// Verify param: frame; type: refptr_diff
|
||||
DCHECK(frame.get());
|
||||
if (!frame.get())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->on_load_end(struct_,
|
||||
CefBrowserCppToC::Wrap(browser),
|
||||
CefFrameCppToC::Wrap(frame),
|
||||
httpStatusCode);
|
||||
}
|
||||
|
||||
void CefLoadHandlerCToCpp::OnLoadError(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame, ErrorCode errorCode, const CefString& errorText,
|
||||
const CefString& failedUrl) {
|
||||
if (CEF_MEMBER_MISSING(struct_, on_load_error))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return;
|
||||
// Verify param: frame; type: refptr_diff
|
||||
DCHECK(frame.get());
|
||||
if (!frame.get())
|
||||
return;
|
||||
// Verify param: failedUrl; type: string_byref_const
|
||||
DCHECK(!failedUrl.empty());
|
||||
if (failedUrl.empty())
|
||||
return;
|
||||
// Unverified params: errorText
|
||||
|
||||
// Execute
|
||||
struct_->on_load_error(struct_,
|
||||
CefBrowserCppToC::Wrap(browser),
|
||||
CefFrameCppToC::Wrap(frame),
|
||||
errorCode,
|
||||
errorText.GetStruct(),
|
||||
failedUrl.GetStruct());
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefLoadHandlerCToCpp, CefLoadHandler,
|
||||
cef_load_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
48
libcef_dll/ctocpp/load_handler_ctocpp.h
Normal file
48
libcef_dll/ctocpp/load_handler_ctocpp.h
Normal file
@@ -0,0 +1,48 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_LOAD_HANDLER_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_LOAD_HANDLER_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/cef_load_handler.h"
|
||||
#include "include/capi/cef_load_handler_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefLoadHandlerCToCpp
|
||||
: public CefCToCpp<CefLoadHandlerCToCpp, CefLoadHandler,
|
||||
cef_load_handler_t> {
|
||||
public:
|
||||
explicit CefLoadHandlerCToCpp(cef_load_handler_t* str)
|
||||
: CefCToCpp<CefLoadHandlerCToCpp, CefLoadHandler, cef_load_handler_t>(
|
||||
str) {}
|
||||
virtual ~CefLoadHandlerCToCpp() {}
|
||||
|
||||
// CefLoadHandler methods
|
||||
virtual void OnLoadStart(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame) OVERRIDE;
|
||||
virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame, int httpStatusCode) OVERRIDE;
|
||||
virtual void OnLoadError(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame, ErrorCode errorCode,
|
||||
const CefString& errorText, const CefString& failedUrl) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_LOAD_HANDLER_CTOCPP_H_
|
||||
|
56
libcef_dll/ctocpp/permission_handler_ctocpp.cc
Normal file
56
libcef_dll/ctocpp/permission_handler_ctocpp.cc
Normal file
@@ -0,0 +1,56 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/browser_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/frame_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/permission_handler_ctocpp.h"
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
bool CefPermissionHandlerCToCpp::OnBeforeScriptExtensionLoad(
|
||||
CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame,
|
||||
const CefString& extensionName) {
|
||||
if (CEF_MEMBER_MISSING(struct_, on_before_script_extension_load))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return false;
|
||||
// Verify param: frame; type: refptr_diff
|
||||
DCHECK(frame.get());
|
||||
if (!frame.get())
|
||||
return false;
|
||||
// Verify param: extensionName; type: string_byref_const
|
||||
DCHECK(!extensionName.empty());
|
||||
if (extensionName.empty())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->on_before_script_extension_load(struct_,
|
||||
CefBrowserCppToC::Wrap(browser),
|
||||
CefFrameCppToC::Wrap(frame),
|
||||
extensionName.GetStruct());
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefPermissionHandlerCToCpp, CefPermissionHandler,
|
||||
cef_permission_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
47
libcef_dll/ctocpp/permission_handler_ctocpp.h
Normal file
47
libcef_dll/ctocpp/permission_handler_ctocpp.h
Normal file
@@ -0,0 +1,47 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_PERMISSION_HANDLER_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_PERMISSION_HANDLER_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/cef_permission_handler.h"
|
||||
#include "include/capi/cef_permission_handler_capi.h"
|
||||
#include "include/cef_browser.h"
|
||||
#include "include/capi/cef_browser_capi.h"
|
||||
#include "include/cef_frame.h"
|
||||
#include "include/capi/cef_frame_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefPermissionHandlerCToCpp
|
||||
: public CefCToCpp<CefPermissionHandlerCToCpp, CefPermissionHandler,
|
||||
cef_permission_handler_t> {
|
||||
public:
|
||||
explicit CefPermissionHandlerCToCpp(cef_permission_handler_t* str)
|
||||
: CefCToCpp<CefPermissionHandlerCToCpp, CefPermissionHandler,
|
||||
cef_permission_handler_t>(str) {}
|
||||
virtual ~CefPermissionHandlerCToCpp() {}
|
||||
|
||||
// CefPermissionHandler methods
|
||||
virtual bool OnBeforeScriptExtensionLoad(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame, const CefString& extensionName) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_PERMISSION_HANDLER_CTOCPP_H_
|
||||
|
136
libcef_dll/ctocpp/post_data_ctocpp.cc
Normal file
136
libcef_dll/ctocpp/post_data_ctocpp.cc
Normal file
@@ -0,0 +1,136 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/post_data_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/post_data_element_ctocpp.h"
|
||||
|
||||
|
||||
// STATIC METHODS - Body may be edited by hand.
|
||||
|
||||
CefRefPtr<CefPostData> CefPostData::CreatePostData() {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_post_data_t* _retval = cef_post_data_create();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefPostDataCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
size_t CefPostDataCToCpp::GetElementCount() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_element_count))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
size_t _retval = struct_->get_element_count(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CefPostDataCToCpp::GetElements(ElementVector& elements) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_elements))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Translate param: elements; type: refptr_vec_same_byref
|
||||
size_t elementsSize = elements.size();
|
||||
size_t elementsCount = std::max(GetElementCount(), elementsSize);
|
||||
cef_post_data_element_t** elementsList = NULL;
|
||||
if (elementsCount > 0) {
|
||||
elementsList = new cef_post_data_element_t*[elementsCount];
|
||||
DCHECK(elementsList);
|
||||
if (elementsList) {
|
||||
memset(elementsList, 0, sizeof(cef_post_data_element_t*)*elementsCount);
|
||||
}
|
||||
if (elementsList && elementsSize > 0) {
|
||||
for (size_t i = 0; i < elementsSize; ++i) {
|
||||
elementsList[i] = CefPostDataElementCToCpp::Unwrap(elements[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Execute
|
||||
struct_->get_elements(struct_,
|
||||
&elementsCount,
|
||||
elementsList);
|
||||
|
||||
// Restore param:elements; type: refptr_vec_same_byref
|
||||
elements.clear();
|
||||
if (elementsCount > 0 && elementsList) {
|
||||
for (size_t i = 0; i < elementsCount; ++i) {
|
||||
elements.push_back(CefPostDataElementCToCpp::Wrap(elementsList[i]));
|
||||
}
|
||||
delete [] elementsList;
|
||||
}
|
||||
}
|
||||
|
||||
bool CefPostDataCToCpp::RemoveElement(CefRefPtr<CefPostDataElement> element) {
|
||||
if (CEF_MEMBER_MISSING(struct_, remove_element))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: element; type: refptr_same
|
||||
DCHECK(element.get());
|
||||
if (!element.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->remove_element(struct_,
|
||||
CefPostDataElementCToCpp::Unwrap(element));
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefPostDataCToCpp::AddElement(CefRefPtr<CefPostDataElement> element) {
|
||||
if (CEF_MEMBER_MISSING(struct_, add_element))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: element; type: refptr_same
|
||||
DCHECK(element.get());
|
||||
if (!element.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->add_element(struct_,
|
||||
CefPostDataElementCToCpp::Unwrap(element));
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
void CefPostDataCToCpp::RemoveElements() {
|
||||
if (CEF_MEMBER_MISSING(struct_, remove_elements))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->remove_elements(struct_);
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefPostDataCToCpp, CefPostData,
|
||||
cef_post_data_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
44
libcef_dll/ctocpp/post_data_ctocpp.h
Normal file
44
libcef_dll/ctocpp/post_data_ctocpp.h
Normal file
@@ -0,0 +1,44 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_POST_DATA_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_POST_DATA_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/cef_request.h"
|
||||
#include "include/capi/cef_request_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefPostDataCToCpp
|
||||
: public CefCToCpp<CefPostDataCToCpp, CefPostData, cef_post_data_t> {
|
||||
public:
|
||||
explicit CefPostDataCToCpp(cef_post_data_t* str)
|
||||
: CefCToCpp<CefPostDataCToCpp, CefPostData, cef_post_data_t>(str) {}
|
||||
virtual ~CefPostDataCToCpp() {}
|
||||
|
||||
// CefPostData methods
|
||||
virtual size_t GetElementCount() OVERRIDE;
|
||||
virtual void GetElements(ElementVector& elements) OVERRIDE;
|
||||
virtual bool RemoveElement(CefRefPtr<CefPostDataElement> element) OVERRIDE;
|
||||
virtual bool AddElement(CefRefPtr<CefPostDataElement> element) OVERRIDE;
|
||||
virtual void RemoveElements() OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_POST_DATA_CTOCPP_H_
|
||||
|
140
libcef_dll/ctocpp/post_data_element_ctocpp.cc
Normal file
140
libcef_dll/ctocpp/post_data_element_ctocpp.cc
Normal file
@@ -0,0 +1,140 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/post_data_element_ctocpp.h"
|
||||
|
||||
|
||||
// STATIC METHODS - Body may be edited by hand.
|
||||
|
||||
CefRefPtr<CefPostDataElement> CefPostDataElement::CreatePostDataElement() {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_post_data_element_t* _retval = cef_post_data_element_create();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefPostDataElementCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
void CefPostDataElementCToCpp::SetToEmpty() {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_to_empty))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->set_to_empty(struct_);
|
||||
}
|
||||
|
||||
void CefPostDataElementCToCpp::SetToFile(const CefString& fileName) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_to_file))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: fileName; type: string_byref_const
|
||||
DCHECK(!fileName.empty());
|
||||
if (fileName.empty())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->set_to_file(struct_,
|
||||
fileName.GetStruct());
|
||||
}
|
||||
|
||||
void CefPostDataElementCToCpp::SetToBytes(size_t size, const void* bytes) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_to_bytes))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: bytes; type: simple_byaddr
|
||||
DCHECK(bytes);
|
||||
if (!bytes)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->set_to_bytes(struct_,
|
||||
size,
|
||||
bytes);
|
||||
}
|
||||
|
||||
CefPostDataElement::Type CefPostDataElementCToCpp::GetType() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_type))
|
||||
return PDE_TYPE_EMPTY;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_postdataelement_type_t _retval = struct_->get_type(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
CefString CefPostDataElementCToCpp::GetFile() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_file))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_file(struct_);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
size_t CefPostDataElementCToCpp::GetBytesCount() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_bytes_count))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
size_t _retval = struct_->get_bytes_count(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
size_t CefPostDataElementCToCpp::GetBytes(size_t size, void* bytes) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_bytes))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: bytes; type: simple_byaddr
|
||||
DCHECK(bytes);
|
||||
if (!bytes)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
size_t _retval = struct_->get_bytes(struct_,
|
||||
size,
|
||||
bytes);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefPostDataElementCToCpp, CefPostDataElement,
|
||||
cef_post_data_element_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
48
libcef_dll/ctocpp/post_data_element_ctocpp.h
Normal file
48
libcef_dll/ctocpp/post_data_element_ctocpp.h
Normal file
@@ -0,0 +1,48 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_POST_DATA_ELEMENT_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_POST_DATA_ELEMENT_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/cef_request.h"
|
||||
#include "include/capi/cef_request_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefPostDataElementCToCpp
|
||||
: public CefCToCpp<CefPostDataElementCToCpp, CefPostDataElement,
|
||||
cef_post_data_element_t> {
|
||||
public:
|
||||
explicit CefPostDataElementCToCpp(cef_post_data_element_t* str)
|
||||
: CefCToCpp<CefPostDataElementCToCpp, CefPostDataElement,
|
||||
cef_post_data_element_t>(str) {}
|
||||
virtual ~CefPostDataElementCToCpp() {}
|
||||
|
||||
// CefPostDataElement methods
|
||||
virtual void SetToEmpty() OVERRIDE;
|
||||
virtual void SetToFile(const CefString& fileName) OVERRIDE;
|
||||
virtual void SetToBytes(size_t size, const void* bytes) OVERRIDE;
|
||||
virtual Type GetType() OVERRIDE;
|
||||
virtual CefString GetFile() OVERRIDE;
|
||||
virtual size_t GetBytesCount() OVERRIDE;
|
||||
virtual size_t GetBytes(size_t size, void* bytes) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_POST_DATA_ELEMENT_CTOCPP_H_
|
||||
|
110
libcef_dll/ctocpp/process_message_ctocpp.cc
Normal file
110
libcef_dll/ctocpp/process_message_ctocpp.cc
Normal file
@@ -0,0 +1,110 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/list_value_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/process_message_ctocpp.h"
|
||||
|
||||
|
||||
// STATIC METHODS - Body may be edited by hand.
|
||||
|
||||
CefRefPtr<CefProcessMessage> CefProcessMessage::Create(const CefString& name) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: name; type: string_byref_const
|
||||
DCHECK(!name.empty());
|
||||
if (name.empty())
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
cef_process_message_t* _retval = cef_process_message_create(
|
||||
name.GetStruct());
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefProcessMessageCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
bool CefProcessMessageCToCpp::IsValid() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_valid))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_valid(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefProcessMessageCToCpp::IsReadOnly() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_read_only))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_read_only(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
CefRefPtr<CefProcessMessage> CefProcessMessageCToCpp::Copy() {
|
||||
if (CEF_MEMBER_MISSING(struct_, copy))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_process_message_t* _retval = struct_->copy(struct_);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefProcessMessageCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefString CefProcessMessageCToCpp::GetName() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_name))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_name(struct_);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
CefRefPtr<CefListValue> CefProcessMessageCToCpp::GetArgumentList() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_argument_list))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_list_value_t* _retval = struct_->get_argument_list(struct_);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefListValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefProcessMessageCToCpp, CefProcessMessage,
|
||||
cef_process_message_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
46
libcef_dll/ctocpp/process_message_ctocpp.h
Normal file
46
libcef_dll/ctocpp/process_message_ctocpp.h
Normal file
@@ -0,0 +1,46 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_PROCESS_MESSAGE_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_PROCESS_MESSAGE_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/cef_process_message.h"
|
||||
#include "include/capi/cef_process_message_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefProcessMessageCToCpp
|
||||
: public CefCToCpp<CefProcessMessageCToCpp, CefProcessMessage,
|
||||
cef_process_message_t> {
|
||||
public:
|
||||
explicit CefProcessMessageCToCpp(cef_process_message_t* str)
|
||||
: CefCToCpp<CefProcessMessageCToCpp, CefProcessMessage,
|
||||
cef_process_message_t>(str) {}
|
||||
virtual ~CefProcessMessageCToCpp() {}
|
||||
|
||||
// CefProcessMessage methods
|
||||
virtual bool IsValid() OVERRIDE;
|
||||
virtual bool IsReadOnly() OVERRIDE;
|
||||
virtual CefRefPtr<CefProcessMessage> Copy() OVERRIDE;
|
||||
virtual CefString GetName() OVERRIDE;
|
||||
virtual CefRefPtr<CefListValue> GetArgumentList() OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_PROCESS_MESSAGE_CTOCPP_H_
|
||||
|
41
libcef_dll/ctocpp/proxy_handler_ctocpp.cc
Normal file
41
libcef_dll/ctocpp/proxy_handler_ctocpp.cc
Normal file
@@ -0,0 +1,41 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/proxy_handler_ctocpp.h"
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
void CefProxyHandlerCToCpp::GetProxyForUrl(const CefString& url,
|
||||
CefProxyInfo& proxy_info) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_proxy_for_url))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: url; type: string_byref_const
|
||||
DCHECK(!url.empty());
|
||||
if (url.empty())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->get_proxy_for_url(struct_,
|
||||
url.GetStruct(),
|
||||
&proxy_info);
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefProxyHandlerCToCpp, CefProxyHandler,
|
||||
cef_proxy_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
43
libcef_dll/ctocpp/proxy_handler_ctocpp.h
Normal file
43
libcef_dll/ctocpp/proxy_handler_ctocpp.h
Normal file
@@ -0,0 +1,43 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_PROXY_HANDLER_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_PROXY_HANDLER_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/cef_proxy_handler.h"
|
||||
#include "include/capi/cef_proxy_handler_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefProxyHandlerCToCpp
|
||||
: public CefCToCpp<CefProxyHandlerCToCpp, CefProxyHandler,
|
||||
cef_proxy_handler_t> {
|
||||
public:
|
||||
explicit CefProxyHandlerCToCpp(cef_proxy_handler_t* str)
|
||||
: CefCToCpp<CefProxyHandlerCToCpp, CefProxyHandler, cef_proxy_handler_t>(
|
||||
str) {}
|
||||
virtual ~CefProxyHandlerCToCpp() {}
|
||||
|
||||
// CefProxyHandler methods
|
||||
virtual void GetProxyForUrl(const CefString& url,
|
||||
CefProxyInfo& proxy_info) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_PROXY_HANDLER_CTOCPP_H_
|
||||
|
85
libcef_dll/ctocpp/read_handler_ctocpp.cc
Normal file
85
libcef_dll/ctocpp/read_handler_ctocpp.cc
Normal file
@@ -0,0 +1,85 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/read_handler_ctocpp.h"
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
size_t CefReadHandlerCToCpp::Read(void* ptr, size_t size, size_t n) {
|
||||
if (CEF_MEMBER_MISSING(struct_, read))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: ptr; type: simple_byaddr
|
||||
DCHECK(ptr);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
size_t _retval = struct_->read(struct_,
|
||||
ptr,
|
||||
size,
|
||||
n);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CefReadHandlerCToCpp::Seek(int64 offset, int whence) {
|
||||
if (CEF_MEMBER_MISSING(struct_, seek))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->seek(struct_,
|
||||
offset,
|
||||
whence);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int64 CefReadHandlerCToCpp::Tell() {
|
||||
if (CEF_MEMBER_MISSING(struct_, tell))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int64 _retval = struct_->tell(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CefReadHandlerCToCpp::Eof() {
|
||||
if (CEF_MEMBER_MISSING(struct_, eof))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->eof(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefReadHandlerCToCpp, CefReadHandler,
|
||||
cef_read_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
45
libcef_dll/ctocpp/read_handler_ctocpp.h
Normal file
45
libcef_dll/ctocpp/read_handler_ctocpp.h
Normal file
@@ -0,0 +1,45 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_READ_HANDLER_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_READ_HANDLER_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/cef_stream.h"
|
||||
#include "include/capi/cef_stream_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefReadHandlerCToCpp
|
||||
: public CefCToCpp<CefReadHandlerCToCpp, CefReadHandler,
|
||||
cef_read_handler_t> {
|
||||
public:
|
||||
explicit CefReadHandlerCToCpp(cef_read_handler_t* str)
|
||||
: CefCToCpp<CefReadHandlerCToCpp, CefReadHandler, cef_read_handler_t>(
|
||||
str) {}
|
||||
virtual ~CefReadHandlerCToCpp() {}
|
||||
|
||||
// CefReadHandler methods
|
||||
virtual size_t Read(void* ptr, size_t size, size_t n) OVERRIDE;
|
||||
virtual int Seek(int64 offset, int whence) OVERRIDE;
|
||||
virtual int64 Tell() OVERRIDE;
|
||||
virtual int Eof() OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_READ_HANDLER_CTOCPP_H_
|
||||
|
164
libcef_dll/ctocpp/render_process_handler_ctocpp.cc
Normal file
164
libcef_dll/ctocpp/render_process_handler_ctocpp.cc
Normal file
@@ -0,0 +1,164 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/browser_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/frame_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/process_message_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/v8context_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/render_process_handler_ctocpp.h"
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
void CefRenderProcessHandlerCToCpp::OnRenderThreadCreated() {
|
||||
if (CEF_MEMBER_MISSING(struct_, on_render_thread_created))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->on_render_thread_created(struct_);
|
||||
}
|
||||
|
||||
void CefRenderProcessHandlerCToCpp::OnWebKitInitialized() {
|
||||
if (CEF_MEMBER_MISSING(struct_, on_web_kit_initialized))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->on_web_kit_initialized(struct_);
|
||||
}
|
||||
|
||||
void CefRenderProcessHandlerCToCpp::OnBrowserCreated(
|
||||
CefRefPtr<CefBrowser> browser) {
|
||||
if (CEF_MEMBER_MISSING(struct_, on_browser_created))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->on_browser_created(struct_,
|
||||
CefBrowserCppToC::Wrap(browser));
|
||||
}
|
||||
|
||||
void CefRenderProcessHandlerCToCpp::OnBrowserDestroyed(
|
||||
CefRefPtr<CefBrowser> browser) {
|
||||
if (CEF_MEMBER_MISSING(struct_, on_browser_destroyed))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->on_browser_destroyed(struct_,
|
||||
CefBrowserCppToC::Wrap(browser));
|
||||
}
|
||||
|
||||
void CefRenderProcessHandlerCToCpp::OnContextCreated(
|
||||
CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefV8Context> context) {
|
||||
if (CEF_MEMBER_MISSING(struct_, on_context_created))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return;
|
||||
// Verify param: frame; type: refptr_diff
|
||||
DCHECK(frame.get());
|
||||
if (!frame.get())
|
||||
return;
|
||||
// Verify param: context; type: refptr_diff
|
||||
DCHECK(context.get());
|
||||
if (!context.get())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->on_context_created(struct_,
|
||||
CefBrowserCppToC::Wrap(browser),
|
||||
CefFrameCppToC::Wrap(frame),
|
||||
CefV8ContextCppToC::Wrap(context));
|
||||
}
|
||||
|
||||
void CefRenderProcessHandlerCToCpp::OnContextReleased(
|
||||
CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefV8Context> context) {
|
||||
if (CEF_MEMBER_MISSING(struct_, on_context_released))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return;
|
||||
// Verify param: frame; type: refptr_diff
|
||||
DCHECK(frame.get());
|
||||
if (!frame.get())
|
||||
return;
|
||||
// Verify param: context; type: refptr_diff
|
||||
DCHECK(context.get());
|
||||
if (!context.get())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->on_context_released(struct_,
|
||||
CefBrowserCppToC::Wrap(browser),
|
||||
CefFrameCppToC::Wrap(frame),
|
||||
CefV8ContextCppToC::Wrap(context));
|
||||
}
|
||||
|
||||
bool CefRenderProcessHandlerCToCpp::OnProcessMessageRecieved(
|
||||
CefRefPtr<CefBrowser> browser, CefProcessId source_process,
|
||||
CefRefPtr<CefProcessMessage> message) {
|
||||
if (CEF_MEMBER_MISSING(struct_, on_process_message_recieved))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return false;
|
||||
// Verify param: message; type: refptr_diff
|
||||
DCHECK(message.get());
|
||||
if (!message.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->on_process_message_recieved(struct_,
|
||||
CefBrowserCppToC::Wrap(browser),
|
||||
source_process,
|
||||
CefProcessMessageCppToC::Wrap(message));
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefRenderProcessHandlerCToCpp,
|
||||
CefRenderProcessHandler, cef_render_process_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
52
libcef_dll/ctocpp/render_process_handler_ctocpp.h
Normal file
52
libcef_dll/ctocpp/render_process_handler_ctocpp.h
Normal file
@@ -0,0 +1,52 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_RENDER_PROCESS_HANDLER_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_RENDER_PROCESS_HANDLER_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/cef_render_process_handler.h"
|
||||
#include "include/capi/cef_render_process_handler_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefRenderProcessHandlerCToCpp
|
||||
: public CefCToCpp<CefRenderProcessHandlerCToCpp, CefRenderProcessHandler,
|
||||
cef_render_process_handler_t> {
|
||||
public:
|
||||
explicit CefRenderProcessHandlerCToCpp(cef_render_process_handler_t* str)
|
||||
: CefCToCpp<CefRenderProcessHandlerCToCpp, CefRenderProcessHandler,
|
||||
cef_render_process_handler_t>(str) {}
|
||||
virtual ~CefRenderProcessHandlerCToCpp() {}
|
||||
|
||||
// CefRenderProcessHandler methods
|
||||
virtual void OnRenderThreadCreated() OVERRIDE;
|
||||
virtual void OnWebKitInitialized() OVERRIDE;
|
||||
virtual void OnBrowserCreated(CefRefPtr<CefBrowser> browser) OVERRIDE;
|
||||
virtual void OnBrowserDestroyed(CefRefPtr<CefBrowser> browser) OVERRIDE;
|
||||
virtual void OnContextCreated(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame, CefRefPtr<CefV8Context> context) OVERRIDE;
|
||||
virtual void OnContextReleased(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame, CefRefPtr<CefV8Context> context) OVERRIDE;
|
||||
virtual bool OnProcessMessageRecieved(CefRefPtr<CefBrowser> browser,
|
||||
CefProcessId source_process,
|
||||
CefRefPtr<CefProcessMessage> message) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_RENDER_PROCESS_HANDLER_CTOCPP_H_
|
||||
|
264
libcef_dll/ctocpp/request_ctocpp.cc
Normal file
264
libcef_dll/ctocpp/request_ctocpp.cc
Normal file
@@ -0,0 +1,264 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/post_data_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/request_ctocpp.h"
|
||||
#include "libcef_dll/transfer_util.h"
|
||||
|
||||
|
||||
// STATIC METHODS - Body may be edited by hand.
|
||||
|
||||
CefRefPtr<CefRequest> CefRequest::CreateRequest() {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_request_t* _retval = cef_request_create();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefRequestCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
CefString CefRequestCToCpp::GetURL() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_url))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_url(struct_);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
void CefRequestCToCpp::SetURL(const CefString& url) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_url))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: url; type: string_byref_const
|
||||
DCHECK(!url.empty());
|
||||
if (url.empty())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->set_url(struct_,
|
||||
url.GetStruct());
|
||||
}
|
||||
|
||||
CefString CefRequestCToCpp::GetMethod() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_method))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_method(struct_);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
void CefRequestCToCpp::SetMethod(const CefString& method) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_method))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: method; type: string_byref_const
|
||||
DCHECK(!method.empty());
|
||||
if (method.empty())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->set_method(struct_,
|
||||
method.GetStruct());
|
||||
}
|
||||
|
||||
CefRefPtr<CefPostData> CefRequestCToCpp::GetPostData() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_post_data))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_post_data_t* _retval = struct_->get_post_data(struct_);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefPostDataCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
void CefRequestCToCpp::SetPostData(CefRefPtr<CefPostData> postData) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_post_data))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: postData; type: refptr_same
|
||||
DCHECK(postData.get());
|
||||
if (!postData.get())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->set_post_data(struct_,
|
||||
CefPostDataCToCpp::Unwrap(postData));
|
||||
}
|
||||
|
||||
void CefRequestCToCpp::GetHeaderMap(HeaderMap& headerMap) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_header_map))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Translate param: headerMap; type: string_map_multi_byref
|
||||
cef_string_multimap_t headerMapMultimap = cef_string_multimap_alloc();
|
||||
DCHECK(headerMapMultimap);
|
||||
if (headerMapMultimap)
|
||||
transfer_string_multimap_contents(headerMap, headerMapMultimap);
|
||||
|
||||
// Execute
|
||||
struct_->get_header_map(struct_,
|
||||
headerMapMultimap);
|
||||
|
||||
// Restore param:headerMap; type: string_map_multi_byref
|
||||
if (headerMapMultimap) {
|
||||
headerMap.clear();
|
||||
transfer_string_multimap_contents(headerMapMultimap, headerMap);
|
||||
cef_string_multimap_free(headerMapMultimap);
|
||||
}
|
||||
}
|
||||
|
||||
void CefRequestCToCpp::SetHeaderMap(const HeaderMap& headerMap) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_header_map))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Translate param: headerMap; type: string_map_multi_byref_const
|
||||
cef_string_multimap_t headerMapMultimap = cef_string_multimap_alloc();
|
||||
DCHECK(headerMapMultimap);
|
||||
if (headerMapMultimap)
|
||||
transfer_string_multimap_contents(headerMap, headerMapMultimap);
|
||||
|
||||
// Execute
|
||||
struct_->set_header_map(struct_,
|
||||
headerMapMultimap);
|
||||
|
||||
// Restore param:headerMap; type: string_map_multi_byref_const
|
||||
if (headerMapMultimap)
|
||||
cef_string_multimap_free(headerMapMultimap);
|
||||
}
|
||||
|
||||
void CefRequestCToCpp::Set(const CefString& url, const CefString& method,
|
||||
CefRefPtr<CefPostData> postData, const HeaderMap& headerMap) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: url; type: string_byref_const
|
||||
DCHECK(!url.empty());
|
||||
if (url.empty())
|
||||
return;
|
||||
// Verify param: method; type: string_byref_const
|
||||
DCHECK(!method.empty());
|
||||
if (method.empty())
|
||||
return;
|
||||
// Unverified params: postData
|
||||
|
||||
// Translate param: headerMap; type: string_map_multi_byref_const
|
||||
cef_string_multimap_t headerMapMultimap = cef_string_multimap_alloc();
|
||||
DCHECK(headerMapMultimap);
|
||||
if (headerMapMultimap)
|
||||
transfer_string_multimap_contents(headerMap, headerMapMultimap);
|
||||
|
||||
// Execute
|
||||
struct_->set(struct_,
|
||||
url.GetStruct(),
|
||||
method.GetStruct(),
|
||||
CefPostDataCToCpp::Unwrap(postData),
|
||||
headerMapMultimap);
|
||||
|
||||
// Restore param:headerMap; type: string_map_multi_byref_const
|
||||
if (headerMapMultimap)
|
||||
cef_string_multimap_free(headerMapMultimap);
|
||||
}
|
||||
|
||||
CefRequest::RequestFlags CefRequestCToCpp::GetFlags() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_flags))
|
||||
return WUR_FLAG_NONE;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_weburlrequest_flags_t _retval = struct_->get_flags(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CefRequestCToCpp::SetFlags(RequestFlags flags) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_flags))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->set_flags(struct_,
|
||||
flags);
|
||||
}
|
||||
|
||||
CefString CefRequestCToCpp::GetFirstPartyForCookies() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_first_party_for_cookies))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_first_party_for_cookies(struct_);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
void CefRequestCToCpp::SetFirstPartyForCookies(const CefString& url) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_first_party_for_cookies))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: url; type: string_byref_const
|
||||
DCHECK(!url.empty());
|
||||
if (url.empty())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->set_first_party_for_cookies(struct_,
|
||||
url.GetStruct());
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefRequestCToCpp, CefRequest,
|
||||
cef_request_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
53
libcef_dll/ctocpp/request_ctocpp.h
Normal file
53
libcef_dll/ctocpp/request_ctocpp.h
Normal file
@@ -0,0 +1,53 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_REQUEST_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/cef_request.h"
|
||||
#include "include/capi/cef_request_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefRequestCToCpp
|
||||
: public CefCToCpp<CefRequestCToCpp, CefRequest, cef_request_t> {
|
||||
public:
|
||||
explicit CefRequestCToCpp(cef_request_t* str)
|
||||
: CefCToCpp<CefRequestCToCpp, CefRequest, cef_request_t>(str) {}
|
||||
virtual ~CefRequestCToCpp() {}
|
||||
|
||||
// CefRequest methods
|
||||
virtual CefString GetURL() OVERRIDE;
|
||||
virtual void SetURL(const CefString& url) OVERRIDE;
|
||||
virtual CefString GetMethod() OVERRIDE;
|
||||
virtual void SetMethod(const CefString& method) OVERRIDE;
|
||||
virtual CefRefPtr<CefPostData> GetPostData() OVERRIDE;
|
||||
virtual void SetPostData(CefRefPtr<CefPostData> postData) OVERRIDE;
|
||||
virtual void GetHeaderMap(HeaderMap& headerMap) OVERRIDE;
|
||||
virtual void SetHeaderMap(const HeaderMap& headerMap) OVERRIDE;
|
||||
virtual void Set(const CefString& url, const CefString& method,
|
||||
CefRefPtr<CefPostData> postData, const HeaderMap& headerMap) OVERRIDE;
|
||||
virtual RequestFlags GetFlags() OVERRIDE;
|
||||
virtual void SetFlags(RequestFlags flags) OVERRIDE;
|
||||
virtual CefString GetFirstPartyForCookies() OVERRIDE;
|
||||
virtual void SetFirstPartyForCookies(const CefString& url) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_REQUEST_CTOCPP_H_
|
||||
|
190
libcef_dll/ctocpp/request_handler_ctocpp.cc
Normal file
190
libcef_dll/ctocpp/request_handler_ctocpp.cc
Normal file
@@ -0,0 +1,190 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/auth_callback_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/browser_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/cookie_manager_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/frame_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/request_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/request_handler_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/resource_handler_ctocpp.h"
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
bool CefRequestHandlerCToCpp::OnBeforeResourceLoad(
|
||||
CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefRequest> request) {
|
||||
if (CEF_MEMBER_MISSING(struct_, on_before_resource_load))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return false;
|
||||
// Verify param: frame; type: refptr_diff
|
||||
DCHECK(frame.get());
|
||||
if (!frame.get())
|
||||
return false;
|
||||
// Verify param: request; type: refptr_diff
|
||||
DCHECK(request.get());
|
||||
if (!request.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->on_before_resource_load(struct_,
|
||||
CefBrowserCppToC::Wrap(browser),
|
||||
CefFrameCppToC::Wrap(frame),
|
||||
CefRequestCppToC::Wrap(request));
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
CefRefPtr<CefResourceHandler> CefRequestHandlerCToCpp::GetResourceHandler(
|
||||
CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefRequest> request) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_resource_handler))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return NULL;
|
||||
// Verify param: frame; type: refptr_diff
|
||||
DCHECK(frame.get());
|
||||
if (!frame.get())
|
||||
return NULL;
|
||||
// Verify param: request; type: refptr_diff
|
||||
DCHECK(request.get());
|
||||
if (!request.get())
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
cef_resource_handler_t* _retval = struct_->get_resource_handler(struct_,
|
||||
CefBrowserCppToC::Wrap(browser),
|
||||
CefFrameCppToC::Wrap(frame),
|
||||
CefRequestCppToC::Wrap(request));
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefResourceHandlerCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
void CefRequestHandlerCToCpp::OnResourceRedirect(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame, const CefString& old_url, CefString& new_url) {
|
||||
if (CEF_MEMBER_MISSING(struct_, on_resource_redirect))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return;
|
||||
// Verify param: frame; type: refptr_diff
|
||||
DCHECK(frame.get());
|
||||
if (!frame.get())
|
||||
return;
|
||||
// Verify param: old_url; type: string_byref_const
|
||||
DCHECK(!old_url.empty());
|
||||
if (old_url.empty())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->on_resource_redirect(struct_,
|
||||
CefBrowserCppToC::Wrap(browser),
|
||||
CefFrameCppToC::Wrap(frame),
|
||||
old_url.GetStruct(),
|
||||
new_url.GetWritableStruct());
|
||||
}
|
||||
|
||||
bool CefRequestHandlerCToCpp::GetAuthCredentials(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame, bool isProxy, const CefString& host, int port,
|
||||
const CefString& realm, const CefString& scheme,
|
||||
CefRefPtr<CefAuthCallback> callback) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_auth_credentials))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return false;
|
||||
// Verify param: frame; type: refptr_diff
|
||||
DCHECK(frame.get());
|
||||
if (!frame.get())
|
||||
return false;
|
||||
// Verify param: host; type: string_byref_const
|
||||
DCHECK(!host.empty());
|
||||
if (host.empty())
|
||||
return false;
|
||||
// Verify param: scheme; type: string_byref_const
|
||||
DCHECK(!scheme.empty());
|
||||
if (scheme.empty())
|
||||
return false;
|
||||
// Verify param: callback; type: refptr_diff
|
||||
DCHECK(callback.get());
|
||||
if (!callback.get())
|
||||
return false;
|
||||
// Unverified params: realm
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->get_auth_credentials(struct_,
|
||||
CefBrowserCppToC::Wrap(browser),
|
||||
CefFrameCppToC::Wrap(frame),
|
||||
isProxy,
|
||||
host.GetStruct(),
|
||||
port,
|
||||
realm.GetStruct(),
|
||||
scheme.GetStruct(),
|
||||
CefAuthCallbackCppToC::Wrap(callback));
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
CefRefPtr<CefCookieManager> CefRequestHandlerCToCpp::GetCookieManager(
|
||||
CefRefPtr<CefBrowser> browser, const CefString& main_url) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_cookie_manager))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return NULL;
|
||||
// Verify param: main_url; type: string_byref_const
|
||||
DCHECK(!main_url.empty());
|
||||
if (main_url.empty())
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
cef_cookie_manager_t* _retval = struct_->get_cookie_manager(struct_,
|
||||
CefBrowserCppToC::Wrap(browser),
|
||||
main_url.GetStruct());
|
||||
|
||||
// Return type: refptr_diff
|
||||
return CefCookieManagerCppToC::Unwrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefRequestHandlerCToCpp, CefRequestHandler,
|
||||
cef_request_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
55
libcef_dll/ctocpp/request_handler_ctocpp.h
Normal file
55
libcef_dll/ctocpp/request_handler_ctocpp.h
Normal file
@@ -0,0 +1,55 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_HANDLER_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_REQUEST_HANDLER_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/cef_request_handler.h"
|
||||
#include "include/capi/cef_request_handler_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefRequestHandlerCToCpp
|
||||
: public CefCToCpp<CefRequestHandlerCToCpp, CefRequestHandler,
|
||||
cef_request_handler_t> {
|
||||
public:
|
||||
explicit CefRequestHandlerCToCpp(cef_request_handler_t* str)
|
||||
: CefCToCpp<CefRequestHandlerCToCpp, CefRequestHandler,
|
||||
cef_request_handler_t>(str) {}
|
||||
virtual ~CefRequestHandlerCToCpp() {}
|
||||
|
||||
// CefRequestHandler methods
|
||||
virtual bool OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame, CefRefPtr<CefRequest> request) OVERRIDE;
|
||||
virtual CefRefPtr<CefResourceHandler> GetResourceHandler(
|
||||
CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefRequest> request) OVERRIDE;
|
||||
virtual void OnResourceRedirect(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame, const CefString& old_url,
|
||||
CefString& new_url) OVERRIDE;
|
||||
virtual bool GetAuthCredentials(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame, bool isProxy, const CefString& host, int port,
|
||||
const CefString& realm, const CefString& scheme,
|
||||
CefRefPtr<CefAuthCallback> callback) OVERRIDE;
|
||||
virtual CefRefPtr<CefCookieManager> GetCookieManager(
|
||||
CefRefPtr<CefBrowser> browser, const CefString& main_url) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_REQUEST_HANDLER_CTOCPP_H_
|
||||
|
56
libcef_dll/ctocpp/resource_bundle_handler_ctocpp.cc
Normal file
56
libcef_dll/ctocpp/resource_bundle_handler_ctocpp.cc
Normal file
@@ -0,0 +1,56 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/resource_bundle_handler_ctocpp.h"
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
bool CefResourceBundleHandlerCToCpp::GetLocalizedString(int message_id,
|
||||
CefString& string) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_localized_string))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->get_localized_string(struct_,
|
||||
message_id,
|
||||
string.GetWritableStruct());
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefResourceBundleHandlerCToCpp::GetDataResource(int resource_id,
|
||||
void*& data, size_t& data_size) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_data_resource))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->get_data_resource(struct_,
|
||||
resource_id,
|
||||
&data,
|
||||
&data_size);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefResourceBundleHandlerCToCpp,
|
||||
CefResourceBundleHandler, cef_resource_bundle_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
44
libcef_dll/ctocpp/resource_bundle_handler_ctocpp.h
Normal file
44
libcef_dll/ctocpp/resource_bundle_handler_ctocpp.h
Normal file
@@ -0,0 +1,44 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_RESOURCE_BUNDLE_HANDLER_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_RESOURCE_BUNDLE_HANDLER_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/cef_resource_bundle_handler.h"
|
||||
#include "include/capi/cef_resource_bundle_handler_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefResourceBundleHandlerCToCpp
|
||||
: public CefCToCpp<CefResourceBundleHandlerCToCpp, CefResourceBundleHandler,
|
||||
cef_resource_bundle_handler_t> {
|
||||
public:
|
||||
explicit CefResourceBundleHandlerCToCpp(cef_resource_bundle_handler_t* str)
|
||||
: CefCToCpp<CefResourceBundleHandlerCToCpp, CefResourceBundleHandler,
|
||||
cef_resource_bundle_handler_t>(str) {}
|
||||
virtual ~CefResourceBundleHandlerCToCpp() {}
|
||||
|
||||
// CefResourceBundleHandler methods
|
||||
virtual bool GetLocalizedString(int message_id, CefString& string) OVERRIDE;
|
||||
virtual bool GetDataResource(int resource_id, void*& data,
|
||||
size_t& data_size) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_RESOURCE_BUNDLE_HANDLER_CTOCPP_H_
|
||||
|
108
libcef_dll/ctocpp/resource_handler_ctocpp.cc
Normal file
108
libcef_dll/ctocpp/resource_handler_ctocpp.cc
Normal file
@@ -0,0 +1,108 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/callback_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/request_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/response_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/resource_handler_ctocpp.h"
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
bool CefResourceHandlerCToCpp::ProcessRequest(CefRefPtr<CefRequest> request,
|
||||
CefRefPtr<CefCallback> callback) {
|
||||
if (CEF_MEMBER_MISSING(struct_, process_request))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: request; type: refptr_diff
|
||||
DCHECK(request.get());
|
||||
if (!request.get())
|
||||
return false;
|
||||
// Verify param: callback; type: refptr_diff
|
||||
DCHECK(callback.get());
|
||||
if (!callback.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->process_request(struct_,
|
||||
CefRequestCppToC::Wrap(request),
|
||||
CefCallbackCppToC::Wrap(callback));
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
void CefResourceHandlerCToCpp::GetResponseHeaders(
|
||||
CefRefPtr<CefResponse> response, int64& response_length,
|
||||
CefString& redirectUrl) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_response_headers))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: response; type: refptr_diff
|
||||
DCHECK(response.get());
|
||||
if (!response.get())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->get_response_headers(struct_,
|
||||
CefResponseCppToC::Wrap(response),
|
||||
&response_length,
|
||||
redirectUrl.GetWritableStruct());
|
||||
}
|
||||
|
||||
bool CefResourceHandlerCToCpp::ReadResponse(void* data_out, int bytes_to_read,
|
||||
int& bytes_read, CefRefPtr<CefCallback> callback) {
|
||||
if (CEF_MEMBER_MISSING(struct_, read_response))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: data_out; type: simple_byaddr
|
||||
DCHECK(data_out);
|
||||
if (!data_out)
|
||||
return false;
|
||||
// Verify param: callback; type: refptr_diff
|
||||
DCHECK(callback.get());
|
||||
if (!callback.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->read_response(struct_,
|
||||
data_out,
|
||||
bytes_to_read,
|
||||
&bytes_read,
|
||||
CefCallbackCppToC::Wrap(callback));
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
void CefResourceHandlerCToCpp::Cancel() {
|
||||
if (CEF_MEMBER_MISSING(struct_, cancel))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->cancel(struct_);
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefResourceHandlerCToCpp, CefResourceHandler,
|
||||
cef_resource_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
48
libcef_dll/ctocpp/resource_handler_ctocpp.h
Normal file
48
libcef_dll/ctocpp/resource_handler_ctocpp.h
Normal file
@@ -0,0 +1,48 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_RESOURCE_HANDLER_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_RESOURCE_HANDLER_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/cef_resource_handler.h"
|
||||
#include "include/capi/cef_resource_handler_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefResourceHandlerCToCpp
|
||||
: public CefCToCpp<CefResourceHandlerCToCpp, CefResourceHandler,
|
||||
cef_resource_handler_t> {
|
||||
public:
|
||||
explicit CefResourceHandlerCToCpp(cef_resource_handler_t* str)
|
||||
: CefCToCpp<CefResourceHandlerCToCpp, CefResourceHandler,
|
||||
cef_resource_handler_t>(str) {}
|
||||
virtual ~CefResourceHandlerCToCpp() {}
|
||||
|
||||
// CefResourceHandler methods
|
||||
virtual bool ProcessRequest(CefRefPtr<CefRequest> request,
|
||||
CefRefPtr<CefCallback> callback) OVERRIDE;
|
||||
virtual void GetResponseHeaders(CefRefPtr<CefResponse> response,
|
||||
int64& response_length, CefString& redirectUrl) OVERRIDE;
|
||||
virtual bool ReadResponse(void* data_out, int bytes_to_read, int& bytes_read,
|
||||
CefRefPtr<CefCallback> callback) OVERRIDE;
|
||||
virtual void Cancel() OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_RESOURCE_HANDLER_CTOCPP_H_
|
||||
|
176
libcef_dll/ctocpp/response_ctocpp.cc
Normal file
176
libcef_dll/ctocpp/response_ctocpp.cc
Normal file
@@ -0,0 +1,176 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/response_ctocpp.h"
|
||||
#include "libcef_dll/transfer_util.h"
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
int CefResponseCToCpp::GetStatus() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_status))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->get_status(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CefResponseCToCpp::SetStatus(int status) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_status))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->set_status(struct_,
|
||||
status);
|
||||
}
|
||||
|
||||
CefString CefResponseCToCpp::GetStatusText() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_status_text))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_status_text(struct_);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
void CefResponseCToCpp::SetStatusText(const CefString& statusText) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_status_text))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: statusText; type: string_byref_const
|
||||
DCHECK(!statusText.empty());
|
||||
if (statusText.empty())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->set_status_text(struct_,
|
||||
statusText.GetStruct());
|
||||
}
|
||||
|
||||
CefString CefResponseCToCpp::GetMimeType() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_mime_type))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_mime_type(struct_);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
void CefResponseCToCpp::SetMimeType(const CefString& mimeType) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_mime_type))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: mimeType; type: string_byref_const
|
||||
DCHECK(!mimeType.empty());
|
||||
if (mimeType.empty())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->set_mime_type(struct_,
|
||||
mimeType.GetStruct());
|
||||
}
|
||||
|
||||
CefString CefResponseCToCpp::GetHeader(const CefString& name) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_header))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: name; type: string_byref_const
|
||||
DCHECK(!name.empty());
|
||||
if (name.empty())
|
||||
return CefString();
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_header(struct_,
|
||||
name.GetStruct());
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
void CefResponseCToCpp::GetHeaderMap(HeaderMap& headerMap) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_header_map))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Translate param: headerMap; type: string_map_multi_byref
|
||||
cef_string_multimap_t headerMapMultimap = cef_string_multimap_alloc();
|
||||
DCHECK(headerMapMultimap);
|
||||
if (headerMapMultimap)
|
||||
transfer_string_multimap_contents(headerMap, headerMapMultimap);
|
||||
|
||||
// Execute
|
||||
struct_->get_header_map(struct_,
|
||||
headerMapMultimap);
|
||||
|
||||
// Restore param:headerMap; type: string_map_multi_byref
|
||||
if (headerMapMultimap) {
|
||||
headerMap.clear();
|
||||
transfer_string_multimap_contents(headerMapMultimap, headerMap);
|
||||
cef_string_multimap_free(headerMapMultimap);
|
||||
}
|
||||
}
|
||||
|
||||
void CefResponseCToCpp::SetHeaderMap(const HeaderMap& headerMap) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_header_map))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Translate param: headerMap; type: string_map_multi_byref_const
|
||||
cef_string_multimap_t headerMapMultimap = cef_string_multimap_alloc();
|
||||
DCHECK(headerMapMultimap);
|
||||
if (headerMapMultimap)
|
||||
transfer_string_multimap_contents(headerMap, headerMapMultimap);
|
||||
|
||||
// Execute
|
||||
struct_->set_header_map(struct_,
|
||||
headerMapMultimap);
|
||||
|
||||
// Restore param:headerMap; type: string_map_multi_byref_const
|
||||
if (headerMapMultimap)
|
||||
cef_string_multimap_free(headerMapMultimap);
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefResponseCToCpp, CefResponse,
|
||||
cef_response_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
48
libcef_dll/ctocpp/response_ctocpp.h
Normal file
48
libcef_dll/ctocpp/response_ctocpp.h
Normal file
@@ -0,0 +1,48 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_RESPONSE_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_RESPONSE_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/cef_response.h"
|
||||
#include "include/capi/cef_response_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefResponseCToCpp
|
||||
: public CefCToCpp<CefResponseCToCpp, CefResponse, cef_response_t> {
|
||||
public:
|
||||
explicit CefResponseCToCpp(cef_response_t* str)
|
||||
: CefCToCpp<CefResponseCToCpp, CefResponse, cef_response_t>(str) {}
|
||||
virtual ~CefResponseCToCpp() {}
|
||||
|
||||
// CefResponse methods
|
||||
virtual int GetStatus() OVERRIDE;
|
||||
virtual void SetStatus(int status) OVERRIDE;
|
||||
virtual CefString GetStatusText() OVERRIDE;
|
||||
virtual void SetStatusText(const CefString& statusText) OVERRIDE;
|
||||
virtual CefString GetMimeType() OVERRIDE;
|
||||
virtual void SetMimeType(const CefString& mimeType) OVERRIDE;
|
||||
virtual CefString GetHeader(const CefString& name) OVERRIDE;
|
||||
virtual void GetHeaderMap(HeaderMap& headerMap) OVERRIDE;
|
||||
virtual void SetHeaderMap(const HeaderMap& headerMap) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_RESPONSE_CTOCPP_H_
|
||||
|
63
libcef_dll/ctocpp/scheme_handler_factory_ctocpp.cc
Normal file
63
libcef_dll/ctocpp/scheme_handler_factory_ctocpp.cc
Normal file
@@ -0,0 +1,63 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/browser_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/frame_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/request_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/resource_handler_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/scheme_handler_factory_ctocpp.h"
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
CefRefPtr<CefResourceHandler> CefSchemeHandlerFactoryCToCpp::Create(
|
||||
CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame,
|
||||
const CefString& scheme_name, CefRefPtr<CefRequest> request) {
|
||||
if (CEF_MEMBER_MISSING(struct_, create))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return NULL;
|
||||
// Verify param: frame; type: refptr_diff
|
||||
DCHECK(frame.get());
|
||||
if (!frame.get())
|
||||
return NULL;
|
||||
// Verify param: scheme_name; type: string_byref_const
|
||||
DCHECK(!scheme_name.empty());
|
||||
if (scheme_name.empty())
|
||||
return NULL;
|
||||
// Verify param: request; type: refptr_diff
|
||||
DCHECK(request.get());
|
||||
if (!request.get())
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
cef_resource_handler_t* _retval = struct_->create(struct_,
|
||||
CefBrowserCppToC::Wrap(browser),
|
||||
CefFrameCppToC::Wrap(frame),
|
||||
scheme_name.GetStruct(),
|
||||
CefRequestCppToC::Wrap(request));
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefResourceHandlerCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefSchemeHandlerFactoryCToCpp,
|
||||
CefSchemeHandlerFactory, cef_scheme_handler_factory_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
44
libcef_dll/ctocpp/scheme_handler_factory_ctocpp.h
Normal file
44
libcef_dll/ctocpp/scheme_handler_factory_ctocpp.h
Normal file
@@ -0,0 +1,44 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_SCHEME_HANDLER_FACTORY_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_SCHEME_HANDLER_FACTORY_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/cef_scheme.h"
|
||||
#include "include/capi/cef_scheme_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefSchemeHandlerFactoryCToCpp
|
||||
: public CefCToCpp<CefSchemeHandlerFactoryCToCpp, CefSchemeHandlerFactory,
|
||||
cef_scheme_handler_factory_t> {
|
||||
public:
|
||||
explicit CefSchemeHandlerFactoryCToCpp(cef_scheme_handler_factory_t* str)
|
||||
: CefCToCpp<CefSchemeHandlerFactoryCToCpp, CefSchemeHandlerFactory,
|
||||
cef_scheme_handler_factory_t>(str) {}
|
||||
virtual ~CefSchemeHandlerFactoryCToCpp() {}
|
||||
|
||||
// CefSchemeHandlerFactory methods
|
||||
virtual CefRefPtr<CefResourceHandler> Create(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame, const CefString& scheme_name,
|
||||
CefRefPtr<CefRequest> request) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_SCHEME_HANDLER_FACTORY_CTOCPP_H_
|
||||
|
141
libcef_dll/ctocpp/stream_reader_ctocpp.cc
Normal file
141
libcef_dll/ctocpp/stream_reader_ctocpp.cc
Normal file
@@ -0,0 +1,141 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/read_handler_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/stream_reader_ctocpp.h"
|
||||
|
||||
|
||||
// STATIC METHODS - Body may be edited by hand.
|
||||
|
||||
CefRefPtr<CefStreamReader> CefStreamReader::CreateForFile(
|
||||
const CefString& fileName) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: fileName; type: string_byref_const
|
||||
DCHECK(!fileName.empty());
|
||||
if (fileName.empty())
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
cef_stream_reader_t* _retval = cef_stream_reader_create_for_file(
|
||||
fileName.GetStruct());
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefStreamReaderCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefStreamReader> CefStreamReader::CreateForData(void* data,
|
||||
size_t size) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: data; type: simple_byaddr
|
||||
DCHECK(data);
|
||||
if (!data)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
cef_stream_reader_t* _retval = cef_stream_reader_create_for_data(
|
||||
data,
|
||||
size);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefStreamReaderCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefStreamReader> CefStreamReader::CreateForHandler(
|
||||
CefRefPtr<CefReadHandler> handler) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: handler; type: refptr_diff
|
||||
DCHECK(handler.get());
|
||||
if (!handler.get())
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
cef_stream_reader_t* _retval = cef_stream_reader_create_for_handler(
|
||||
CefReadHandlerCppToC::Wrap(handler));
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefStreamReaderCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
size_t CefStreamReaderCToCpp::Read(void* ptr, size_t size, size_t n) {
|
||||
if (CEF_MEMBER_MISSING(struct_, read))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: ptr; type: simple_byaddr
|
||||
DCHECK(ptr);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
size_t _retval = struct_->read(struct_,
|
||||
ptr,
|
||||
size,
|
||||
n);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CefStreamReaderCToCpp::Seek(int64 offset, int whence) {
|
||||
if (CEF_MEMBER_MISSING(struct_, seek))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->seek(struct_,
|
||||
offset,
|
||||
whence);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int64 CefStreamReaderCToCpp::Tell() {
|
||||
if (CEF_MEMBER_MISSING(struct_, tell))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int64 _retval = struct_->tell(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CefStreamReaderCToCpp::Eof() {
|
||||
if (CEF_MEMBER_MISSING(struct_, eof))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->eof(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefStreamReaderCToCpp, CefStreamReader,
|
||||
cef_stream_reader_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
45
libcef_dll/ctocpp/stream_reader_ctocpp.h
Normal file
45
libcef_dll/ctocpp/stream_reader_ctocpp.h
Normal file
@@ -0,0 +1,45 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_STREAM_READER_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_STREAM_READER_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/cef_stream.h"
|
||||
#include "include/capi/cef_stream_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefStreamReaderCToCpp
|
||||
: public CefCToCpp<CefStreamReaderCToCpp, CefStreamReader,
|
||||
cef_stream_reader_t> {
|
||||
public:
|
||||
explicit CefStreamReaderCToCpp(cef_stream_reader_t* str)
|
||||
: CefCToCpp<CefStreamReaderCToCpp, CefStreamReader, cef_stream_reader_t>(
|
||||
str) {}
|
||||
virtual ~CefStreamReaderCToCpp() {}
|
||||
|
||||
// CefStreamReader methods
|
||||
virtual size_t Read(void* ptr, size_t size, size_t n) OVERRIDE;
|
||||
virtual int Seek(int64 offset, int whence) OVERRIDE;
|
||||
virtual int64 Tell() OVERRIDE;
|
||||
virtual int Eof() OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_STREAM_READER_CTOCPP_H_
|
||||
|
123
libcef_dll/ctocpp/stream_writer_ctocpp.cc
Normal file
123
libcef_dll/ctocpp/stream_writer_ctocpp.cc
Normal file
@@ -0,0 +1,123 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/write_handler_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/stream_writer_ctocpp.h"
|
||||
|
||||
|
||||
// STATIC METHODS - Body may be edited by hand.
|
||||
|
||||
CefRefPtr<CefStreamWriter> CefStreamWriter::CreateForFile(
|
||||
const CefString& fileName) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: fileName; type: string_byref_const
|
||||
DCHECK(!fileName.empty());
|
||||
if (fileName.empty())
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
cef_stream_writer_t* _retval = cef_stream_writer_create_for_file(
|
||||
fileName.GetStruct());
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefStreamWriterCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefStreamWriter> CefStreamWriter::CreateForHandler(
|
||||
CefRefPtr<CefWriteHandler> handler) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: handler; type: refptr_diff
|
||||
DCHECK(handler.get());
|
||||
if (!handler.get())
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
cef_stream_writer_t* _retval = cef_stream_writer_create_for_handler(
|
||||
CefWriteHandlerCppToC::Wrap(handler));
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefStreamWriterCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
size_t CefStreamWriterCToCpp::Write(const void* ptr, size_t size, size_t n) {
|
||||
if (CEF_MEMBER_MISSING(struct_, write))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: ptr; type: simple_byaddr
|
||||
DCHECK(ptr);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
size_t _retval = struct_->write(struct_,
|
||||
ptr,
|
||||
size,
|
||||
n);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CefStreamWriterCToCpp::Seek(int64 offset, int whence) {
|
||||
if (CEF_MEMBER_MISSING(struct_, seek))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->seek(struct_,
|
||||
offset,
|
||||
whence);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int64 CefStreamWriterCToCpp::Tell() {
|
||||
if (CEF_MEMBER_MISSING(struct_, tell))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int64 _retval = struct_->tell(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CefStreamWriterCToCpp::Flush() {
|
||||
if (CEF_MEMBER_MISSING(struct_, flush))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->flush(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefStreamWriterCToCpp, CefStreamWriter,
|
||||
cef_stream_writer_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
45
libcef_dll/ctocpp/stream_writer_ctocpp.h
Normal file
45
libcef_dll/ctocpp/stream_writer_ctocpp.h
Normal file
@@ -0,0 +1,45 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_STREAM_WRITER_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_STREAM_WRITER_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/cef_stream.h"
|
||||
#include "include/capi/cef_stream_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefStreamWriterCToCpp
|
||||
: public CefCToCpp<CefStreamWriterCToCpp, CefStreamWriter,
|
||||
cef_stream_writer_t> {
|
||||
public:
|
||||
explicit CefStreamWriterCToCpp(cef_stream_writer_t* str)
|
||||
: CefCToCpp<CefStreamWriterCToCpp, CefStreamWriter, cef_stream_writer_t>(
|
||||
str) {}
|
||||
virtual ~CefStreamWriterCToCpp() {}
|
||||
|
||||
// CefStreamWriter methods
|
||||
virtual size_t Write(const void* ptr, size_t size, size_t n) OVERRIDE;
|
||||
virtual int Seek(int64 offset, int whence) OVERRIDE;
|
||||
virtual int64 Tell() OVERRIDE;
|
||||
virtual int Flush() OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_STREAM_WRITER_CTOCPP_H_
|
||||
|
39
libcef_dll/ctocpp/string_visitor_ctocpp.cc
Normal file
39
libcef_dll/ctocpp/string_visitor_ctocpp.cc
Normal file
@@ -0,0 +1,39 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/string_visitor_ctocpp.h"
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
void CefStringVisitorCToCpp::Visit(const CefString& string) {
|
||||
if (CEF_MEMBER_MISSING(struct_, visit))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: string; type: string_byref_const
|
||||
DCHECK(!string.empty());
|
||||
if (string.empty())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->visit(struct_,
|
||||
string.GetStruct());
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefStringVisitorCToCpp, CefStringVisitor,
|
||||
cef_string_visitor_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
42
libcef_dll/ctocpp/string_visitor_ctocpp.h
Normal file
42
libcef_dll/ctocpp/string_visitor_ctocpp.h
Normal file
@@ -0,0 +1,42 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_STRING_VISITOR_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_STRING_VISITOR_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/cef_string_visitor.h"
|
||||
#include "include/capi/cef_string_visitor_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefStringVisitorCToCpp
|
||||
: public CefCToCpp<CefStringVisitorCToCpp, CefStringVisitor,
|
||||
cef_string_visitor_t> {
|
||||
public:
|
||||
explicit CefStringVisitorCToCpp(cef_string_visitor_t* str)
|
||||
: CefCToCpp<CefStringVisitorCToCpp, CefStringVisitor,
|
||||
cef_string_visitor_t>(str) {}
|
||||
virtual ~CefStringVisitorCToCpp() {}
|
||||
|
||||
// CefStringVisitor methods
|
||||
virtual void Visit(const CefString& string) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_STRING_VISITOR_CTOCPP_H_
|
||||
|
33
libcef_dll/ctocpp/task_ctocpp.cc
Normal file
33
libcef_dll/ctocpp/task_ctocpp.cc
Normal file
@@ -0,0 +1,33 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/task_ctocpp.h"
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
void CefTaskCToCpp::Execute(CefThreadId threadId) {
|
||||
if (CEF_MEMBER_MISSING(struct_, execute))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->execute(struct_,
|
||||
threadId);
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefTaskCToCpp, CefTask, cef_task_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
40
libcef_dll/ctocpp/task_ctocpp.h
Normal file
40
libcef_dll/ctocpp/task_ctocpp.h
Normal file
@@ -0,0 +1,40 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_TASK_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_TASK_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/cef_task.h"
|
||||
#include "include/capi/cef_task_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefTaskCToCpp
|
||||
: public CefCToCpp<CefTaskCToCpp, CefTask, cef_task_t> {
|
||||
public:
|
||||
explicit CefTaskCToCpp(cef_task_t* str)
|
||||
: CefCToCpp<CefTaskCToCpp, CefTask, cef_task_t>(str) {}
|
||||
virtual ~CefTaskCToCpp() {}
|
||||
|
||||
// CefTask methods
|
||||
virtual void Execute(CefThreadId threadId) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_TASK_CTOCPP_H_
|
||||
|
99
libcef_dll/ctocpp/v8accessor_ctocpp.cc
Normal file
99
libcef_dll/ctocpp/v8accessor_ctocpp.cc
Normal file
@@ -0,0 +1,99 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/v8value_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/v8accessor_ctocpp.h"
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
bool CefV8AccessorCToCpp::Get(const CefString& name,
|
||||
const CefRefPtr<CefV8Value> object, CefRefPtr<CefV8Value>& retval,
|
||||
CefString& exception) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: name; type: string_byref_const
|
||||
DCHECK(!name.empty());
|
||||
if (name.empty())
|
||||
return false;
|
||||
// Verify param: object; type: refptr_diff
|
||||
DCHECK(object.get());
|
||||
if (!object.get())
|
||||
return false;
|
||||
|
||||
// Translate param: retval; type: refptr_diff_byref
|
||||
cef_v8value_t* retvalStruct = NULL;
|
||||
if (retval.get())
|
||||
retvalStruct = CefV8ValueCppToC::Wrap(retval);
|
||||
cef_v8value_t* retvalOrig = retvalStruct;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->get(struct_,
|
||||
name.GetStruct(),
|
||||
CefV8ValueCppToC::Wrap(object),
|
||||
&retvalStruct,
|
||||
exception.GetWritableStruct());
|
||||
|
||||
// Restore param:retval; type: refptr_diff_byref
|
||||
if (retvalStruct) {
|
||||
if (retvalStruct != retvalOrig) {
|
||||
retval = CefV8ValueCppToC::Unwrap(retvalStruct);
|
||||
}
|
||||
} else {
|
||||
retval = NULL;
|
||||
}
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefV8AccessorCToCpp::Set(const CefString& name,
|
||||
const CefRefPtr<CefV8Value> object, const CefRefPtr<CefV8Value> value,
|
||||
CefString& exception) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: name; type: string_byref_const
|
||||
DCHECK(!name.empty());
|
||||
if (name.empty())
|
||||
return false;
|
||||
// Verify param: object; type: refptr_diff
|
||||
DCHECK(object.get());
|
||||
if (!object.get())
|
||||
return false;
|
||||
// Verify param: value; type: refptr_diff
|
||||
DCHECK(value.get());
|
||||
if (!value.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->set(struct_,
|
||||
name.GetStruct(),
|
||||
CefV8ValueCppToC::Wrap(object),
|
||||
CefV8ValueCppToC::Wrap(value),
|
||||
exception.GetWritableStruct());
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefV8AccessorCToCpp, CefV8Accessor,
|
||||
cef_v8accessor_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
43
libcef_dll/ctocpp/v8accessor_ctocpp.h
Normal file
43
libcef_dll/ctocpp/v8accessor_ctocpp.h
Normal file
@@ -0,0 +1,43 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_V8ACCESSOR_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_V8ACCESSOR_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/cef_v8.h"
|
||||
#include "include/capi/cef_v8_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefV8AccessorCToCpp
|
||||
: public CefCToCpp<CefV8AccessorCToCpp, CefV8Accessor, cef_v8accessor_t> {
|
||||
public:
|
||||
explicit CefV8AccessorCToCpp(cef_v8accessor_t* str)
|
||||
: CefCToCpp<CefV8AccessorCToCpp, CefV8Accessor, cef_v8accessor_t>(str) {}
|
||||
virtual ~CefV8AccessorCToCpp() {}
|
||||
|
||||
// CefV8Accessor methods
|
||||
virtual bool Get(const CefString& name, const CefRefPtr<CefV8Value> object,
|
||||
CefRefPtr<CefV8Value>& retval, CefString& exception) OVERRIDE;
|
||||
virtual bool Set(const CefString& name, const CefRefPtr<CefV8Value> object,
|
||||
const CefRefPtr<CefV8Value> value, CefString& exception) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_V8ACCESSOR_CTOCPP_H_
|
||||
|
194
libcef_dll/ctocpp/v8context_ctocpp.cc
Normal file
194
libcef_dll/ctocpp/v8context_ctocpp.cc
Normal file
@@ -0,0 +1,194 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/browser_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/frame_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/v8context_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/v8exception_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/v8value_ctocpp.h"
|
||||
|
||||
|
||||
// STATIC METHODS - Body may be edited by hand.
|
||||
|
||||
CefRefPtr<CefV8Context> CefV8Context::GetCurrentContext() {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_v8context_t* _retval = cef_v8context_get_current_context();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefV8ContextCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefV8Context> CefV8Context::GetEnteredContext() {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_v8context_t* _retval = cef_v8context_get_entered_context();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefV8ContextCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
bool CefV8Context::InContext() {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = cef_v8context_in_context();
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
CefRefPtr<CefBrowser> CefV8ContextCToCpp::GetBrowser() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_browser))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_browser_t* _retval = struct_->get_browser(struct_);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefBrowserCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefFrame> CefV8ContextCToCpp::GetFrame() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_frame))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_frame_t* _retval = struct_->get_frame(struct_);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefFrameCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefV8Value> CefV8ContextCToCpp::GetGlobal() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_global))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_v8value_t* _retval = struct_->get_global(struct_);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefV8ValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
bool CefV8ContextCToCpp::Enter() {
|
||||
if (CEF_MEMBER_MISSING(struct_, enter))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->enter(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefV8ContextCToCpp::Exit() {
|
||||
if (CEF_MEMBER_MISSING(struct_, exit))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->exit(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefV8ContextCToCpp::IsSame(CefRefPtr<CefV8Context> that) {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_same))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: that; type: refptr_same
|
||||
DCHECK(that.get());
|
||||
if (!that.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_same(struct_,
|
||||
CefV8ContextCToCpp::Unwrap(that));
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefV8ContextCToCpp::Eval(const CefString& code,
|
||||
CefRefPtr<CefV8Value>& retval, CefRefPtr<CefV8Exception>& exception) {
|
||||
if (CEF_MEMBER_MISSING(struct_, eval))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: code; type: string_byref_const
|
||||
DCHECK(!code.empty());
|
||||
if (code.empty())
|
||||
return false;
|
||||
|
||||
// Translate param: retval; type: refptr_same_byref
|
||||
cef_v8value_t* retvalStruct = NULL;
|
||||
if (retval.get())
|
||||
retvalStruct = CefV8ValueCToCpp::Unwrap(retval);
|
||||
cef_v8value_t* retvalOrig = retvalStruct;
|
||||
// Translate param: exception; type: refptr_same_byref
|
||||
cef_v8exception_t* exceptionStruct = NULL;
|
||||
if (exception.get())
|
||||
exceptionStruct = CefV8ExceptionCToCpp::Unwrap(exception);
|
||||
cef_v8exception_t* exceptionOrig = exceptionStruct;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->eval(struct_,
|
||||
code.GetStruct(),
|
||||
&retvalStruct,
|
||||
&exceptionStruct);
|
||||
|
||||
// Restore param:retval; type: refptr_same_byref
|
||||
if (retvalStruct) {
|
||||
if (retvalStruct != retvalOrig) {
|
||||
retval = CefV8ValueCToCpp::Wrap(retvalStruct);
|
||||
}
|
||||
} else {
|
||||
retval = NULL;
|
||||
}
|
||||
// Restore param:exception; type: refptr_same_byref
|
||||
if (exceptionStruct) {
|
||||
if (exceptionStruct != exceptionOrig) {
|
||||
exception = CefV8ExceptionCToCpp::Wrap(exceptionStruct);
|
||||
}
|
||||
} else {
|
||||
exception = NULL;
|
||||
}
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefV8ContextCToCpp, CefV8Context,
|
||||
cef_v8context_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
47
libcef_dll/ctocpp/v8context_ctocpp.h
Normal file
47
libcef_dll/ctocpp/v8context_ctocpp.h
Normal file
@@ -0,0 +1,47 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_V8CONTEXT_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_V8CONTEXT_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/cef_v8.h"
|
||||
#include "include/capi/cef_v8_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefV8ContextCToCpp
|
||||
: public CefCToCpp<CefV8ContextCToCpp, CefV8Context, cef_v8context_t> {
|
||||
public:
|
||||
explicit CefV8ContextCToCpp(cef_v8context_t* str)
|
||||
: CefCToCpp<CefV8ContextCToCpp, CefV8Context, cef_v8context_t>(str) {}
|
||||
virtual ~CefV8ContextCToCpp() {}
|
||||
|
||||
// CefV8Context methods
|
||||
virtual CefRefPtr<CefBrowser> GetBrowser() OVERRIDE;
|
||||
virtual CefRefPtr<CefFrame> GetFrame() OVERRIDE;
|
||||
virtual CefRefPtr<CefV8Value> GetGlobal() OVERRIDE;
|
||||
virtual bool Enter() OVERRIDE;
|
||||
virtual bool Exit() OVERRIDE;
|
||||
virtual bool IsSame(CefRefPtr<CefV8Context> that) OVERRIDE;
|
||||
virtual bool Eval(const CefString& code, CefRefPtr<CefV8Value>& retval,
|
||||
CefRefPtr<CefV8Exception>& exception) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_V8CONTEXT_CTOCPP_H_
|
||||
|
133
libcef_dll/ctocpp/v8exception_ctocpp.cc
Normal file
133
libcef_dll/ctocpp/v8exception_ctocpp.cc
Normal file
@@ -0,0 +1,133 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/v8exception_ctocpp.h"
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
CefString CefV8ExceptionCToCpp::GetMessage() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_message))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_message(struct_);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
CefString CefV8ExceptionCToCpp::GetSourceLine() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_source_line))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_source_line(struct_);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
CefString CefV8ExceptionCToCpp::GetScriptResourceName() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_script_resource_name))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_script_resource_name(struct_);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
int CefV8ExceptionCToCpp::GetLineNumber() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_line_number))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->get_line_number(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CefV8ExceptionCToCpp::GetStartPosition() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_start_position))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->get_start_position(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CefV8ExceptionCToCpp::GetEndPosition() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_end_position))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->get_end_position(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CefV8ExceptionCToCpp::GetStartColumn() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_start_column))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->get_start_column(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CefV8ExceptionCToCpp::GetEndColumn() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_end_column))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->get_end_column(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefV8ExceptionCToCpp, CefV8Exception,
|
||||
cef_v8exception_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
49
libcef_dll/ctocpp/v8exception_ctocpp.h
Normal file
49
libcef_dll/ctocpp/v8exception_ctocpp.h
Normal file
@@ -0,0 +1,49 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_V8EXCEPTION_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_V8EXCEPTION_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/cef_v8.h"
|
||||
#include "include/capi/cef_v8_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefV8ExceptionCToCpp
|
||||
: public CefCToCpp<CefV8ExceptionCToCpp, CefV8Exception,
|
||||
cef_v8exception_t> {
|
||||
public:
|
||||
explicit CefV8ExceptionCToCpp(cef_v8exception_t* str)
|
||||
: CefCToCpp<CefV8ExceptionCToCpp, CefV8Exception, cef_v8exception_t>(
|
||||
str) {}
|
||||
virtual ~CefV8ExceptionCToCpp() {}
|
||||
|
||||
// CefV8Exception methods
|
||||
virtual CefString GetMessage() OVERRIDE;
|
||||
virtual CefString GetSourceLine() OVERRIDE;
|
||||
virtual CefString GetScriptResourceName() OVERRIDE;
|
||||
virtual int GetLineNumber() OVERRIDE;
|
||||
virtual int GetStartPosition() OVERRIDE;
|
||||
virtual int GetEndPosition() OVERRIDE;
|
||||
virtual int GetStartColumn() OVERRIDE;
|
||||
virtual int GetEndColumn() OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_V8EXCEPTION_CTOCPP_H_
|
||||
|
84
libcef_dll/ctocpp/v8handler_ctocpp.cc
Normal file
84
libcef_dll/ctocpp/v8handler_ctocpp.cc
Normal file
@@ -0,0 +1,84 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/v8value_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/v8handler_ctocpp.h"
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
bool CefV8HandlerCToCpp::Execute(const CefString& name,
|
||||
CefRefPtr<CefV8Value> object, const CefV8ValueList& arguments,
|
||||
CefRefPtr<CefV8Value>& retval, CefString& exception) {
|
||||
if (CEF_MEMBER_MISSING(struct_, execute))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: name; type: string_byref_const
|
||||
DCHECK(!name.empty());
|
||||
if (name.empty())
|
||||
return false;
|
||||
// Verify param: object; type: refptr_diff
|
||||
DCHECK(object.get());
|
||||
if (!object.get())
|
||||
return false;
|
||||
|
||||
// Translate param: arguments; type: refptr_vec_diff_byref_const
|
||||
const size_t argumentsCount = arguments.size();
|
||||
cef_v8value_t** argumentsList = NULL;
|
||||
if (argumentsCount > 0) {
|
||||
argumentsList = new cef_v8value_t*[argumentsCount];
|
||||
DCHECK(argumentsList);
|
||||
if (argumentsList) {
|
||||
for (size_t i = 0; i < argumentsCount; ++i) {
|
||||
argumentsList[i] = CefV8ValueCppToC::Wrap(arguments[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Translate param: retval; type: refptr_diff_byref
|
||||
cef_v8value_t* retvalStruct = NULL;
|
||||
if (retval.get())
|
||||
retvalStruct = CefV8ValueCppToC::Wrap(retval);
|
||||
cef_v8value_t* retvalOrig = retvalStruct;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->execute(struct_,
|
||||
name.GetStruct(),
|
||||
CefV8ValueCppToC::Wrap(object),
|
||||
argumentsCount,
|
||||
argumentsList,
|
||||
&retvalStruct,
|
||||
exception.GetWritableStruct());
|
||||
|
||||
// Restore param:arguments; type: refptr_vec_diff_byref_const
|
||||
if (argumentsList)
|
||||
delete [] argumentsList;
|
||||
// Restore param:retval; type: refptr_diff_byref
|
||||
if (retvalStruct) {
|
||||
if (retvalStruct != retvalOrig) {
|
||||
retval = CefV8ValueCppToC::Unwrap(retvalStruct);
|
||||
}
|
||||
} else {
|
||||
retval = NULL;
|
||||
}
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefV8HandlerCToCpp, CefV8Handler,
|
||||
cef_v8handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
42
libcef_dll/ctocpp/v8handler_ctocpp.h
Normal file
42
libcef_dll/ctocpp/v8handler_ctocpp.h
Normal file
@@ -0,0 +1,42 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_V8HANDLER_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_V8HANDLER_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/cef_v8.h"
|
||||
#include "include/capi/cef_v8_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefV8HandlerCToCpp
|
||||
: public CefCToCpp<CefV8HandlerCToCpp, CefV8Handler, cef_v8handler_t> {
|
||||
public:
|
||||
explicit CefV8HandlerCToCpp(cef_v8handler_t* str)
|
||||
: CefCToCpp<CefV8HandlerCToCpp, CefV8Handler, cef_v8handler_t>(str) {}
|
||||
virtual ~CefV8HandlerCToCpp() {}
|
||||
|
||||
// CefV8Handler methods
|
||||
virtual bool Execute(const CefString& name, CefRefPtr<CefV8Value> object,
|
||||
const CefV8ValueList& arguments, CefRefPtr<CefV8Value>& retval,
|
||||
CefString& exception) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_V8HANDLER_CTOCPP_H_
|
||||
|
876
libcef_dll/ctocpp/v8value_ctocpp.cc
Normal file
876
libcef_dll/ctocpp/v8value_ctocpp.cc
Normal file
@@ -0,0 +1,876 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/base_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/v8accessor_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/v8handler_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/v8context_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/v8exception_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/v8value_ctocpp.h"
|
||||
#include "libcef_dll/transfer_util.h"
|
||||
|
||||
|
||||
// STATIC METHODS - Body may be edited by hand.
|
||||
|
||||
CefRefPtr<CefV8Value> CefV8Value::CreateUndefined() {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_v8value_t* _retval = cef_v8value_create_undefined();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefV8ValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefV8Value> CefV8Value::CreateNull() {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_v8value_t* _retval = cef_v8value_create_null();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefV8ValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefV8Value> CefV8Value::CreateBool(bool value) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_v8value_t* _retval = cef_v8value_create_bool(
|
||||
value);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefV8ValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefV8Value> CefV8Value::CreateInt(int32 value) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_v8value_t* _retval = cef_v8value_create_int(
|
||||
value);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefV8ValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefV8Value> CefV8Value::CreateUInt(uint32 value) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_v8value_t* _retval = cef_v8value_create_uint(
|
||||
value);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefV8ValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefV8Value> CefV8Value::CreateDouble(double value) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_v8value_t* _retval = cef_v8value_create_double(
|
||||
value);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefV8ValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefV8Value> CefV8Value::CreateDate(const CefTime& date) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_v8value_t* _retval = cef_v8value_create_date(
|
||||
&date);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefV8ValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefV8Value> CefV8Value::CreateString(const CefString& value) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Unverified params: value
|
||||
|
||||
// Execute
|
||||
cef_v8value_t* _retval = cef_v8value_create_string(
|
||||
value.GetStruct());
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefV8ValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefV8Value> CefV8Value::CreateObject(
|
||||
CefRefPtr<CefV8Accessor> accessor) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Unverified params: accessor
|
||||
|
||||
// Execute
|
||||
cef_v8value_t* _retval = cef_v8value_create_object(
|
||||
CefV8AccessorCppToC::Wrap(accessor));
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefV8ValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefV8Value> CefV8Value::CreateArray(int length) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_v8value_t* _retval = cef_v8value_create_array(
|
||||
length);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefV8ValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefV8Value> CefV8Value::CreateFunction(const CefString& name,
|
||||
CefRefPtr<CefV8Handler> handler) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: name; type: string_byref_const
|
||||
DCHECK(!name.empty());
|
||||
if (name.empty())
|
||||
return NULL;
|
||||
// Verify param: handler; type: refptr_diff
|
||||
DCHECK(handler.get());
|
||||
if (!handler.get())
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
cef_v8value_t* _retval = cef_v8value_create_function(
|
||||
name.GetStruct(),
|
||||
CefV8HandlerCppToC::Wrap(handler));
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefV8ValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
bool CefV8ValueCToCpp::IsUndefined() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_undefined))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_undefined(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::IsNull() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_null))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_null(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::IsBool() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_bool))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_bool(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::IsInt() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_int))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_int(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::IsUInt() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_uint))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_uint(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::IsDouble() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_double))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_double(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::IsDate() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_date))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_date(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::IsString() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_string))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_string(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::IsObject() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_object))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_object(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::IsArray() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_array))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_array(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::IsFunction() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_function))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_function(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::IsSame(CefRefPtr<CefV8Value> that) {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_same))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: that; type: refptr_same
|
||||
DCHECK(that.get());
|
||||
if (!that.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_same(struct_,
|
||||
CefV8ValueCToCpp::Unwrap(that));
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::GetBoolValue() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_bool_value))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->get_bool_value(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
int32 CefV8ValueCToCpp::GetIntValue() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_int_value))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int32 _retval = struct_->get_int_value(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
uint32 CefV8ValueCToCpp::GetUIntValue() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_uint_value))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
uint32 _retval = struct_->get_uint_value(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
double CefV8ValueCToCpp::GetDoubleValue() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_double_value))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
double _retval = struct_->get_double_value(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
CefTime CefV8ValueCToCpp::GetDateValue() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_date_value))
|
||||
return CefTime();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_time_t _retval = struct_->get_date_value(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
CefString CefV8ValueCToCpp::GetStringValue() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_string_value))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_string_value(struct_);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::IsUserCreated() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_user_created))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_user_created(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::HasException() {
|
||||
if (CEF_MEMBER_MISSING(struct_, has_exception))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->has_exception(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
CefRefPtr<CefV8Exception> CefV8ValueCToCpp::GetException() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_exception))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_v8exception_t* _retval = struct_->get_exception(struct_);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefV8ExceptionCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::ClearException() {
|
||||
if (CEF_MEMBER_MISSING(struct_, clear_exception))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->clear_exception(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::WillRethrowExceptions() {
|
||||
if (CEF_MEMBER_MISSING(struct_, will_rethrow_exceptions))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->will_rethrow_exceptions(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::SetRethrowExceptions(bool rethrow) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_rethrow_exceptions))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->set_rethrow_exceptions(struct_,
|
||||
rethrow);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::HasValue(const CefString& key) {
|
||||
if (CEF_MEMBER_MISSING(struct_, has_value_bykey))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: key; type: string_byref_const
|
||||
DCHECK(!key.empty());
|
||||
if (key.empty())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->has_value_bykey(struct_,
|
||||
key.GetStruct());
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::HasValue(int index) {
|
||||
if (CEF_MEMBER_MISSING(struct_, has_value_byindex))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->has_value_byindex(struct_,
|
||||
index);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::DeleteValue(const CefString& key) {
|
||||
if (CEF_MEMBER_MISSING(struct_, delete_value_bykey))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: key; type: string_byref_const
|
||||
DCHECK(!key.empty());
|
||||
if (key.empty())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->delete_value_bykey(struct_,
|
||||
key.GetStruct());
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::DeleteValue(int index) {
|
||||
if (CEF_MEMBER_MISSING(struct_, delete_value_byindex))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->delete_value_byindex(struct_,
|
||||
index);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
CefRefPtr<CefV8Value> CefV8ValueCToCpp::GetValue(const CefString& key) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_value_bykey))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: key; type: string_byref_const
|
||||
DCHECK(!key.empty());
|
||||
if (key.empty())
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
cef_v8value_t* _retval = struct_->get_value_bykey(struct_,
|
||||
key.GetStruct());
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefV8ValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefV8Value> CefV8ValueCToCpp::GetValue(int index) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_value_byindex))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
cef_v8value_t* _retval = struct_->get_value_byindex(struct_,
|
||||
index);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefV8ValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::SetValue(const CefString& key,
|
||||
CefRefPtr<CefV8Value> value, PropertyAttribute attribute) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_value_bykey))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: key; type: string_byref_const
|
||||
DCHECK(!key.empty());
|
||||
if (key.empty())
|
||||
return false;
|
||||
// Verify param: value; type: refptr_same
|
||||
DCHECK(value.get());
|
||||
if (!value.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->set_value_bykey(struct_,
|
||||
key.GetStruct(),
|
||||
CefV8ValueCToCpp::Unwrap(value),
|
||||
attribute);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::SetValue(int index, CefRefPtr<CefV8Value> value) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_value_byindex))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return false;
|
||||
// Verify param: value; type: refptr_same
|
||||
DCHECK(value.get());
|
||||
if (!value.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->set_value_byindex(struct_,
|
||||
index,
|
||||
CefV8ValueCToCpp::Unwrap(value));
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::SetValue(const CefString& key, AccessControl settings,
|
||||
PropertyAttribute attribute) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_value_byaccessor))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: key; type: string_byref_const
|
||||
DCHECK(!key.empty());
|
||||
if (key.empty())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->set_value_byaccessor(struct_,
|
||||
key.GetStruct(),
|
||||
settings,
|
||||
attribute);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::GetKeys(std::vector<CefString>& keys) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_keys))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Translate param: keys; type: string_vec_byref
|
||||
cef_string_list_t keysList = cef_string_list_alloc();
|
||||
DCHECK(keysList);
|
||||
if (keysList)
|
||||
transfer_string_list_contents(keys, keysList);
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->get_keys(struct_,
|
||||
keysList);
|
||||
|
||||
// Restore param:keys; type: string_vec_byref
|
||||
if (keysList) {
|
||||
keys.clear();
|
||||
transfer_string_list_contents(keysList, keys);
|
||||
cef_string_list_free(keysList);
|
||||
}
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefV8ValueCToCpp::SetUserData(CefRefPtr<CefBase> user_data) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_user_data))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Unverified params: user_data
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->set_user_data(struct_,
|
||||
CefBaseCppToC::Wrap(user_data));
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
CefRefPtr<CefBase> CefV8ValueCToCpp::GetUserData() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_user_data))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_base_t* _retval = struct_->get_user_data(struct_);
|
||||
|
||||
// Return type: refptr_diff
|
||||
return CefBaseCppToC::Unwrap(_retval);
|
||||
}
|
||||
|
||||
int CefV8ValueCToCpp::GetExternallyAllocatedMemory() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_externally_allocated_memory))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->get_externally_allocated_memory(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CefV8ValueCToCpp::AdjustExternallyAllocatedMemory(int change_in_bytes) {
|
||||
if (CEF_MEMBER_MISSING(struct_, adjust_externally_allocated_memory))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->adjust_externally_allocated_memory(struct_,
|
||||
change_in_bytes);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CefV8ValueCToCpp::GetArrayLength() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_array_length))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->get_array_length(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
CefString CefV8ValueCToCpp::GetFunctionName() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_function_name))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_function_name(struct_);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
CefRefPtr<CefV8Handler> CefV8ValueCToCpp::GetFunctionHandler() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_function_handler))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_v8handler_t* _retval = struct_->get_function_handler(struct_);
|
||||
|
||||
// Return type: refptr_diff
|
||||
return CefV8HandlerCppToC::Unwrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefV8Value> CefV8ValueCToCpp::ExecuteFunction(
|
||||
CefRefPtr<CefV8Value> object, const CefV8ValueList& arguments) {
|
||||
if (CEF_MEMBER_MISSING(struct_, execute_function))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Unverified params: object
|
||||
|
||||
// Translate param: arguments; type: refptr_vec_same_byref_const
|
||||
const size_t argumentsCount = arguments.size();
|
||||
cef_v8value_t** argumentsList = NULL;
|
||||
if (argumentsCount > 0) {
|
||||
argumentsList = new cef_v8value_t*[argumentsCount];
|
||||
DCHECK(argumentsList);
|
||||
if (argumentsList) {
|
||||
for (size_t i = 0; i < argumentsCount; ++i) {
|
||||
argumentsList[i] = CefV8ValueCToCpp::Unwrap(arguments[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Execute
|
||||
cef_v8value_t* _retval = struct_->execute_function(struct_,
|
||||
CefV8ValueCToCpp::Unwrap(object),
|
||||
argumentsCount,
|
||||
argumentsList);
|
||||
|
||||
// Restore param:arguments; type: refptr_vec_same_byref_const
|
||||
if (argumentsList)
|
||||
delete [] argumentsList;
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefV8ValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefV8Value> CefV8ValueCToCpp::ExecuteFunctionWithContext(
|
||||
CefRefPtr<CefV8Context> context, CefRefPtr<CefV8Value> object,
|
||||
const CefV8ValueList& arguments) {
|
||||
if (CEF_MEMBER_MISSING(struct_, execute_function_with_context))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: context; type: refptr_same
|
||||
DCHECK(context.get());
|
||||
if (!context.get())
|
||||
return NULL;
|
||||
// Unverified params: object
|
||||
|
||||
// Translate param: arguments; type: refptr_vec_same_byref_const
|
||||
const size_t argumentsCount = arguments.size();
|
||||
cef_v8value_t** argumentsList = NULL;
|
||||
if (argumentsCount > 0) {
|
||||
argumentsList = new cef_v8value_t*[argumentsCount];
|
||||
DCHECK(argumentsList);
|
||||
if (argumentsList) {
|
||||
for (size_t i = 0; i < argumentsCount; ++i) {
|
||||
argumentsList[i] = CefV8ValueCToCpp::Unwrap(arguments[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Execute
|
||||
cef_v8value_t* _retval = struct_->execute_function_with_context(struct_,
|
||||
CefV8ContextCToCpp::Unwrap(context),
|
||||
CefV8ValueCToCpp::Unwrap(object),
|
||||
argumentsCount,
|
||||
argumentsList);
|
||||
|
||||
// Restore param:arguments; type: refptr_vec_same_byref_const
|
||||
if (argumentsList)
|
||||
delete [] argumentsList;
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefV8ValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefV8ValueCToCpp, CefV8Value,
|
||||
cef_v8value_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
88
libcef_dll/ctocpp/v8value_ctocpp.h
Normal file
88
libcef_dll/ctocpp/v8value_ctocpp.h
Normal file
@@ -0,0 +1,88 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_V8VALUE_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_V8VALUE_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include <vector>
|
||||
#include "include/cef_v8.h"
|
||||
#include "include/capi/cef_v8_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefV8ValueCToCpp
|
||||
: public CefCToCpp<CefV8ValueCToCpp, CefV8Value, cef_v8value_t> {
|
||||
public:
|
||||
explicit CefV8ValueCToCpp(cef_v8value_t* str)
|
||||
: CefCToCpp<CefV8ValueCToCpp, CefV8Value, cef_v8value_t>(str) {}
|
||||
virtual ~CefV8ValueCToCpp() {}
|
||||
|
||||
// CefV8Value methods
|
||||
virtual bool IsUndefined() OVERRIDE;
|
||||
virtual bool IsNull() OVERRIDE;
|
||||
virtual bool IsBool() OVERRIDE;
|
||||
virtual bool IsInt() OVERRIDE;
|
||||
virtual bool IsUInt() OVERRIDE;
|
||||
virtual bool IsDouble() OVERRIDE;
|
||||
virtual bool IsDate() OVERRIDE;
|
||||
virtual bool IsString() OVERRIDE;
|
||||
virtual bool IsObject() OVERRIDE;
|
||||
virtual bool IsArray() OVERRIDE;
|
||||
virtual bool IsFunction() OVERRIDE;
|
||||
virtual bool IsSame(CefRefPtr<CefV8Value> that) OVERRIDE;
|
||||
virtual bool GetBoolValue() OVERRIDE;
|
||||
virtual int32 GetIntValue() OVERRIDE;
|
||||
virtual uint32 GetUIntValue() OVERRIDE;
|
||||
virtual double GetDoubleValue() OVERRIDE;
|
||||
virtual CefTime GetDateValue() OVERRIDE;
|
||||
virtual CefString GetStringValue() OVERRIDE;
|
||||
virtual bool IsUserCreated() OVERRIDE;
|
||||
virtual bool HasException() OVERRIDE;
|
||||
virtual CefRefPtr<CefV8Exception> GetException() OVERRIDE;
|
||||
virtual bool ClearException() OVERRIDE;
|
||||
virtual bool WillRethrowExceptions() OVERRIDE;
|
||||
virtual bool SetRethrowExceptions(bool rethrow) OVERRIDE;
|
||||
virtual bool HasValue(const CefString& key) OVERRIDE;
|
||||
virtual bool HasValue(int index) OVERRIDE;
|
||||
virtual bool DeleteValue(const CefString& key) OVERRIDE;
|
||||
virtual bool DeleteValue(int index) OVERRIDE;
|
||||
virtual CefRefPtr<CefV8Value> GetValue(const CefString& key) OVERRIDE;
|
||||
virtual CefRefPtr<CefV8Value> GetValue(int index) OVERRIDE;
|
||||
virtual bool SetValue(const CefString& key, CefRefPtr<CefV8Value> value,
|
||||
PropertyAttribute attribute) OVERRIDE;
|
||||
virtual bool SetValue(int index, CefRefPtr<CefV8Value> value) OVERRIDE;
|
||||
virtual bool SetValue(const CefString& key, AccessControl settings,
|
||||
PropertyAttribute attribute) OVERRIDE;
|
||||
virtual bool GetKeys(std::vector<CefString>& keys) OVERRIDE;
|
||||
virtual bool SetUserData(CefRefPtr<CefBase> user_data) OVERRIDE;
|
||||
virtual CefRefPtr<CefBase> GetUserData() OVERRIDE;
|
||||
virtual int GetExternallyAllocatedMemory() OVERRIDE;
|
||||
virtual int AdjustExternallyAllocatedMemory(int change_in_bytes) OVERRIDE;
|
||||
virtual int GetArrayLength() OVERRIDE;
|
||||
virtual CefString GetFunctionName() OVERRIDE;
|
||||
virtual CefRefPtr<CefV8Handler> GetFunctionHandler() OVERRIDE;
|
||||
virtual CefRefPtr<CefV8Value> ExecuteFunction(CefRefPtr<CefV8Value> object,
|
||||
const CefV8ValueList& arguments) OVERRIDE;
|
||||
virtual CefRefPtr<CefV8Value> ExecuteFunctionWithContext(
|
||||
CefRefPtr<CefV8Context> context, CefRefPtr<CefV8Value> object,
|
||||
const CefV8ValueList& arguments) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_V8VALUE_CTOCPP_H_
|
||||
|
85
libcef_dll/ctocpp/write_handler_ctocpp.cc
Normal file
85
libcef_dll/ctocpp/write_handler_ctocpp.cc
Normal file
@@ -0,0 +1,85 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/write_handler_ctocpp.h"
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
size_t CefWriteHandlerCToCpp::Write(const void* ptr, size_t size, size_t n) {
|
||||
if (CEF_MEMBER_MISSING(struct_, write))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: ptr; type: simple_byaddr
|
||||
DCHECK(ptr);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
size_t _retval = struct_->write(struct_,
|
||||
ptr,
|
||||
size,
|
||||
n);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CefWriteHandlerCToCpp::Seek(int64 offset, int whence) {
|
||||
if (CEF_MEMBER_MISSING(struct_, seek))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->seek(struct_,
|
||||
offset,
|
||||
whence);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int64 CefWriteHandlerCToCpp::Tell() {
|
||||
if (CEF_MEMBER_MISSING(struct_, tell))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int64 _retval = struct_->tell(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CefWriteHandlerCToCpp::Flush() {
|
||||
if (CEF_MEMBER_MISSING(struct_, flush))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->flush(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefWriteHandlerCToCpp, CefWriteHandler,
|
||||
cef_write_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
45
libcef_dll/ctocpp/write_handler_ctocpp.h
Normal file
45
libcef_dll/ctocpp/write_handler_ctocpp.h
Normal file
@@ -0,0 +1,45 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_WRITE_HANDLER_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_WRITE_HANDLER_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/cef_stream.h"
|
||||
#include "include/capi/cef_stream_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefWriteHandlerCToCpp
|
||||
: public CefCToCpp<CefWriteHandlerCToCpp, CefWriteHandler,
|
||||
cef_write_handler_t> {
|
||||
public:
|
||||
explicit CefWriteHandlerCToCpp(cef_write_handler_t* str)
|
||||
: CefCToCpp<CefWriteHandlerCToCpp, CefWriteHandler, cef_write_handler_t>(
|
||||
str) {}
|
||||
virtual ~CefWriteHandlerCToCpp() {}
|
||||
|
||||
// CefWriteHandler methods
|
||||
virtual size_t Write(const void* ptr, size_t size, size_t n) OVERRIDE;
|
||||
virtual int Seek(int64 offset, int whence) OVERRIDE;
|
||||
virtual int64 Tell() OVERRIDE;
|
||||
virtual int Flush() OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_WRITE_HANDLER_CTOCPP_H_
|
||||
|
501
libcef_dll/ctocpp/xml_reader_ctocpp.cc
Normal file
501
libcef_dll/ctocpp/xml_reader_ctocpp.cc
Normal file
@@ -0,0 +1,501 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/stream_reader_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/xml_reader_ctocpp.h"
|
||||
|
||||
|
||||
// STATIC METHODS - Body may be edited by hand.
|
||||
|
||||
CefRefPtr<CefXmlReader> CefXmlReader::Create(CefRefPtr<CefStreamReader> stream,
|
||||
EncodingType encodingType, const CefString& URI) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: stream; type: refptr_same
|
||||
DCHECK(stream.get());
|
||||
if (!stream.get())
|
||||
return NULL;
|
||||
// Verify param: URI; type: string_byref_const
|
||||
DCHECK(!URI.empty());
|
||||
if (URI.empty())
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
cef_xml_reader_t* _retval = cef_xml_reader_create(
|
||||
CefStreamReaderCToCpp::Unwrap(stream),
|
||||
encodingType,
|
||||
URI.GetStruct());
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefXmlReaderCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
bool CefXmlReaderCToCpp::MoveToNextNode() {
|
||||
if (CEF_MEMBER_MISSING(struct_, move_to_next_node))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->move_to_next_node(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefXmlReaderCToCpp::Close() {
|
||||
if (CEF_MEMBER_MISSING(struct_, close))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->close(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefXmlReaderCToCpp::HasError() {
|
||||
if (CEF_MEMBER_MISSING(struct_, has_error))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->has_error(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
CefString CefXmlReaderCToCpp::GetError() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_error))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_error(struct_);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
CefXmlReader::NodeType CefXmlReaderCToCpp::GetType() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_type))
|
||||
return XML_NODE_UNSUPPORTED;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_xml_node_type_t _retval = struct_->get_type(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CefXmlReaderCToCpp::GetDepth() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_depth))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->get_depth(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
CefString CefXmlReaderCToCpp::GetLocalName() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_local_name))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_local_name(struct_);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
CefString CefXmlReaderCToCpp::GetPrefix() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_prefix))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_prefix(struct_);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
CefString CefXmlReaderCToCpp::GetQualifiedName() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_qualified_name))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_qualified_name(struct_);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
CefString CefXmlReaderCToCpp::GetNamespaceURI() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_namespace_uri))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_namespace_uri(struct_);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
CefString CefXmlReaderCToCpp::GetBaseURI() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_base_uri))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_base_uri(struct_);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
CefString CefXmlReaderCToCpp::GetXmlLang() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_xml_lang))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_xml_lang(struct_);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
bool CefXmlReaderCToCpp::IsEmptyElement() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_empty_element))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_empty_element(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefXmlReaderCToCpp::HasValue() {
|
||||
if (CEF_MEMBER_MISSING(struct_, has_value))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->has_value(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
CefString CefXmlReaderCToCpp::GetValue() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_value))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_value(struct_);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
bool CefXmlReaderCToCpp::HasAttributes() {
|
||||
if (CEF_MEMBER_MISSING(struct_, has_attributes))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->has_attributes(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
size_t CefXmlReaderCToCpp::GetAttributeCount() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_attribute_count))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
size_t _retval = struct_->get_attribute_count(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
CefString CefXmlReaderCToCpp::GetAttribute(int index) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_attribute_byindex))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return CefString();
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_attribute_byindex(struct_,
|
||||
index);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
CefString CefXmlReaderCToCpp::GetAttribute(const CefString& qualifiedName) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_attribute_byqname))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: qualifiedName; type: string_byref_const
|
||||
DCHECK(!qualifiedName.empty());
|
||||
if (qualifiedName.empty())
|
||||
return CefString();
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_attribute_byqname(struct_,
|
||||
qualifiedName.GetStruct());
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
CefString CefXmlReaderCToCpp::GetAttribute(const CefString& localName,
|
||||
const CefString& namespaceURI) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_attribute_bylname))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: localName; type: string_byref_const
|
||||
DCHECK(!localName.empty());
|
||||
if (localName.empty())
|
||||
return CefString();
|
||||
// Verify param: namespaceURI; type: string_byref_const
|
||||
DCHECK(!namespaceURI.empty());
|
||||
if (namespaceURI.empty())
|
||||
return CefString();
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_attribute_bylname(struct_,
|
||||
localName.GetStruct(),
|
||||
namespaceURI.GetStruct());
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
CefString CefXmlReaderCToCpp::GetInnerXml() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_inner_xml))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_inner_xml(struct_);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
CefString CefXmlReaderCToCpp::GetOuterXml() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_outer_xml))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_outer_xml(struct_);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
int CefXmlReaderCToCpp::GetLineNumber() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_line_number))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->get_line_number(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
bool CefXmlReaderCToCpp::MoveToAttribute(int index) {
|
||||
if (CEF_MEMBER_MISSING(struct_, move_to_attribute_byindex))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK_GE(index, 0);
|
||||
if (index < 0)
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->move_to_attribute_byindex(struct_,
|
||||
index);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefXmlReaderCToCpp::MoveToAttribute(const CefString& qualifiedName) {
|
||||
if (CEF_MEMBER_MISSING(struct_, move_to_attribute_byqname))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: qualifiedName; type: string_byref_const
|
||||
DCHECK(!qualifiedName.empty());
|
||||
if (qualifiedName.empty())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->move_to_attribute_byqname(struct_,
|
||||
qualifiedName.GetStruct());
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefXmlReaderCToCpp::MoveToAttribute(const CefString& localName,
|
||||
const CefString& namespaceURI) {
|
||||
if (CEF_MEMBER_MISSING(struct_, move_to_attribute_bylname))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: localName; type: string_byref_const
|
||||
DCHECK(!localName.empty());
|
||||
if (localName.empty())
|
||||
return false;
|
||||
// Verify param: namespaceURI; type: string_byref_const
|
||||
DCHECK(!namespaceURI.empty());
|
||||
if (namespaceURI.empty())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->move_to_attribute_bylname(struct_,
|
||||
localName.GetStruct(),
|
||||
namespaceURI.GetStruct());
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefXmlReaderCToCpp::MoveToFirstAttribute() {
|
||||
if (CEF_MEMBER_MISSING(struct_, move_to_first_attribute))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->move_to_first_attribute(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefXmlReaderCToCpp::MoveToNextAttribute() {
|
||||
if (CEF_MEMBER_MISSING(struct_, move_to_next_attribute))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->move_to_next_attribute(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefXmlReaderCToCpp::MoveToCarryingElement() {
|
||||
if (CEF_MEMBER_MISSING(struct_, move_to_carrying_element))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->move_to_carrying_element(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefXmlReaderCToCpp, CefXmlReader,
|
||||
cef_xml_reader_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
70
libcef_dll/ctocpp/xml_reader_ctocpp.h
Normal file
70
libcef_dll/ctocpp/xml_reader_ctocpp.h
Normal file
@@ -0,0 +1,70 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_XML_READER_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_XML_READER_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/cef_xml_reader.h"
|
||||
#include "include/capi/cef_xml_reader_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefXmlReaderCToCpp
|
||||
: public CefCToCpp<CefXmlReaderCToCpp, CefXmlReader, cef_xml_reader_t> {
|
||||
public:
|
||||
explicit CefXmlReaderCToCpp(cef_xml_reader_t* str)
|
||||
: CefCToCpp<CefXmlReaderCToCpp, CefXmlReader, cef_xml_reader_t>(str) {}
|
||||
virtual ~CefXmlReaderCToCpp() {}
|
||||
|
||||
// CefXmlReader methods
|
||||
virtual bool MoveToNextNode() OVERRIDE;
|
||||
virtual bool Close() OVERRIDE;
|
||||
virtual bool HasError() OVERRIDE;
|
||||
virtual CefString GetError() OVERRIDE;
|
||||
virtual NodeType GetType() OVERRIDE;
|
||||
virtual int GetDepth() OVERRIDE;
|
||||
virtual CefString GetLocalName() OVERRIDE;
|
||||
virtual CefString GetPrefix() OVERRIDE;
|
||||
virtual CefString GetQualifiedName() OVERRIDE;
|
||||
virtual CefString GetNamespaceURI() OVERRIDE;
|
||||
virtual CefString GetBaseURI() OVERRIDE;
|
||||
virtual CefString GetXmlLang() OVERRIDE;
|
||||
virtual bool IsEmptyElement() OVERRIDE;
|
||||
virtual bool HasValue() OVERRIDE;
|
||||
virtual CefString GetValue() OVERRIDE;
|
||||
virtual bool HasAttributes() OVERRIDE;
|
||||
virtual size_t GetAttributeCount() OVERRIDE;
|
||||
virtual CefString GetAttribute(int index) OVERRIDE;
|
||||
virtual CefString GetAttribute(const CefString& qualifiedName) OVERRIDE;
|
||||
virtual CefString GetAttribute(const CefString& localName,
|
||||
const CefString& namespaceURI) OVERRIDE;
|
||||
virtual CefString GetInnerXml() OVERRIDE;
|
||||
virtual CefString GetOuterXml() OVERRIDE;
|
||||
virtual int GetLineNumber() OVERRIDE;
|
||||
virtual bool MoveToAttribute(int index) OVERRIDE;
|
||||
virtual bool MoveToAttribute(const CefString& qualifiedName) OVERRIDE;
|
||||
virtual bool MoveToAttribute(const CefString& localName,
|
||||
const CefString& namespaceURI) OVERRIDE;
|
||||
virtual bool MoveToFirstAttribute() OVERRIDE;
|
||||
virtual bool MoveToNextAttribute() OVERRIDE;
|
||||
virtual bool MoveToCarryingElement() OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_XML_READER_CTOCPP_H_
|
||||
|
220
libcef_dll/ctocpp/zip_reader_ctocpp.cc
Normal file
220
libcef_dll/ctocpp/zip_reader_ctocpp.cc
Normal file
@@ -0,0 +1,220 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/stream_reader_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/zip_reader_ctocpp.h"
|
||||
|
||||
|
||||
// STATIC METHODS - Body may be edited by hand.
|
||||
|
||||
CefRefPtr<CefZipReader> CefZipReader::Create(
|
||||
CefRefPtr<CefStreamReader> stream) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: stream; type: refptr_same
|
||||
DCHECK(stream.get());
|
||||
if (!stream.get())
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
cef_zip_reader_t* _retval = cef_zip_reader_create(
|
||||
CefStreamReaderCToCpp::Unwrap(stream));
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefZipReaderCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
bool CefZipReaderCToCpp::MoveToFirstFile() {
|
||||
if (CEF_MEMBER_MISSING(struct_, move_to_first_file))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->move_to_first_file(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefZipReaderCToCpp::MoveToNextFile() {
|
||||
if (CEF_MEMBER_MISSING(struct_, move_to_next_file))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->move_to_next_file(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefZipReaderCToCpp::MoveToFile(const CefString& fileName,
|
||||
bool caseSensitive) {
|
||||
if (CEF_MEMBER_MISSING(struct_, move_to_file))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: fileName; type: string_byref_const
|
||||
DCHECK(!fileName.empty());
|
||||
if (fileName.empty())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->move_to_file(struct_,
|
||||
fileName.GetStruct(),
|
||||
caseSensitive);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefZipReaderCToCpp::Close() {
|
||||
if (CEF_MEMBER_MISSING(struct_, close))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->close(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
CefString CefZipReaderCToCpp::GetFileName() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_file_name))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_file_name(struct_);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
int64 CefZipReaderCToCpp::GetFileSize() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_file_size))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int64 _retval = struct_->get_file_size(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
time_t CefZipReaderCToCpp::GetFileLastModified() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_file_last_modified))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
time_t _retval = struct_->get_file_last_modified(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
bool CefZipReaderCToCpp::OpenFile(const CefString& password) {
|
||||
if (CEF_MEMBER_MISSING(struct_, open_file))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Unverified params: password
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->open_file(struct_,
|
||||
password.GetStruct());
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefZipReaderCToCpp::CloseFile() {
|
||||
if (CEF_MEMBER_MISSING(struct_, close_file))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->close_file(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
int CefZipReaderCToCpp::ReadFile(void* buffer, size_t bufferSize) {
|
||||
if (CEF_MEMBER_MISSING(struct_, read_file))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: buffer; type: simple_byaddr
|
||||
DCHECK(buffer);
|
||||
if (!buffer)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->read_file(struct_,
|
||||
buffer,
|
||||
bufferSize);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int64 CefZipReaderCToCpp::Tell() {
|
||||
if (CEF_MEMBER_MISSING(struct_, tell))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int64 _retval = struct_->tell(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
bool CefZipReaderCToCpp::Eof() {
|
||||
if (CEF_MEMBER_MISSING(struct_, eof))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->eof(struct_);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefZipReaderCToCpp, CefZipReader,
|
||||
cef_zip_reader_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
52
libcef_dll/ctocpp/zip_reader_ctocpp.h
Normal file
52
libcef_dll/ctocpp/zip_reader_ctocpp.h
Normal file
@@ -0,0 +1,52 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_ZIP_READER_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_ZIP_READER_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/cef_zip_reader.h"
|
||||
#include "include/capi/cef_zip_reader_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefZipReaderCToCpp
|
||||
: public CefCToCpp<CefZipReaderCToCpp, CefZipReader, cef_zip_reader_t> {
|
||||
public:
|
||||
explicit CefZipReaderCToCpp(cef_zip_reader_t* str)
|
||||
: CefCToCpp<CefZipReaderCToCpp, CefZipReader, cef_zip_reader_t>(str) {}
|
||||
virtual ~CefZipReaderCToCpp() {}
|
||||
|
||||
// CefZipReader methods
|
||||
virtual bool MoveToFirstFile() OVERRIDE;
|
||||
virtual bool MoveToNextFile() OVERRIDE;
|
||||
virtual bool MoveToFile(const CefString& fileName,
|
||||
bool caseSensitive) OVERRIDE;
|
||||
virtual bool Close() OVERRIDE;
|
||||
virtual CefString GetFileName() OVERRIDE;
|
||||
virtual int64 GetFileSize() OVERRIDE;
|
||||
virtual time_t GetFileLastModified() OVERRIDE;
|
||||
virtual bool OpenFile(const CefString& password) OVERRIDE;
|
||||
virtual bool CloseFile() OVERRIDE;
|
||||
virtual int ReadFile(void* buffer, size_t bufferSize) OVERRIDE;
|
||||
virtual int64 Tell() OVERRIDE;
|
||||
virtual bool Eof() OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_ZIP_READER_CTOCPP_H_
|
||||
|
Reference in New Issue
Block a user