Create 2272 release branch for CEF3.

git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/2272@1993 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2015-01-24 03:26:25 +00:00
parent 0d6bfeb4dd
commit dc47bc006a
1045 changed files with 190843 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/allow_certificate_error_callback_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
void CefAllowCertificateErrorCallbackCToCpp::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<> base::AtomicRefCount CefCToCpp<CefAllowCertificateErrorCallbackCToCpp,
CefAllowCertificateErrorCallback,
cef_allow_certificate_error_callback_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,44 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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_ALLOW_CERTIFICATE_ERROR_CALLBACK_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_ALLOW_CERTIFICATE_ERROR_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 CefAllowCertificateErrorCallbackCToCpp
: public CefCToCpp<CefAllowCertificateErrorCallbackCToCpp,
CefAllowCertificateErrorCallback,
cef_allow_certificate_error_callback_t> {
public:
explicit CefAllowCertificateErrorCallbackCToCpp(
cef_allow_certificate_error_callback_t* str)
: CefCToCpp<CefAllowCertificateErrorCallbackCToCpp,
CefAllowCertificateErrorCallback,
cef_allow_certificate_error_callback_t>(str) {}
// CefAllowCertificateErrorCallback methods
virtual void Continue(bool allow) OVERRIDE;
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_ALLOW_CERTIFICATE_ERROR_CALLBACK_CTOCPP_H_

View File

@@ -0,0 +1,106 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/cpptoc/scheme_registrar_cpptoc.h"
#include "libcef_dll/ctocpp/app_ctocpp.h"
#include "libcef_dll/ctocpp/browser_process_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));
}
void CefAppCToCpp::OnRegisterCustomSchemes(
CefRefPtr<CefSchemeRegistrar> registrar) {
if (CEF_MEMBER_MISSING(struct_, on_register_custom_schemes))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: registrar; type: refptr_diff
DCHECK(registrar.get());
if (!registrar.get())
return;
// Execute
struct_->on_register_custom_schemes(struct_,
CefSchemeRegistrarCppToC::Wrap(registrar));
}
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<CefBrowserProcessHandler> CefAppCToCpp::GetBrowserProcessHandler() {
if (CEF_MEMBER_MISSING(struct_, get_browser_process_handler))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_browser_process_handler_t* _retval = struct_->get_browser_process_handler(
struct_);
// Return type: refptr_same
return CefBrowserProcessHandlerCToCpp::Wrap(_retval);
}
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);
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefAppCToCpp, CefApp,
cef_app_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,45 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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) {}
// CefApp methods
void OnBeforeCommandLineProcessing(const CefString& process_type,
CefRefPtr<CefCommandLine> command_line) override;
void OnRegisterCustomSchemes(
CefRefPtr<CefSchemeRegistrar> registrar) override;
CefRefPtr<CefResourceBundleHandler> GetResourceBundleHandler() override;
CefRefPtr<CefBrowserProcessHandler> GetBrowserProcessHandler() override;
CefRefPtr<CefRenderProcessHandler> GetRenderProcessHandler() override;
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_APP_CTOCPP_H_

View File

@@ -0,0 +1,55 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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<> base::AtomicRefCount CefCToCpp<CefAuthCallbackCToCpp,
CefAuthCallback, cef_auth_callback_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,43 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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_auth_callback.h"
#include "include/capi/cef_auth_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 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) {}
// 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_

View File

@@ -0,0 +1,101 @@
// 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/base/cef_logging.h"
#include "include/base/cef_macros.h"
#include "include/cef_base.h"
#include "include/capi/cef_base_capi.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.
void AddRef() const {
UnderlyingAddRef();
ref_count_.AddRef();
}
bool Release() const {
UnderlyingRelease();
if (ref_count_.Release()) {
delete this;
return true;
}
return false;
}
bool HasOneRef() const { return ref_count_.HasOneRef(); }
// Increment/decrement reference counts on only the underlying class.
void UnderlyingAddRef() const {
if (struct_->add_ref)
struct_->add_ref(struct_);
}
bool UnderlyingRelease() const {
if (!struct_->release)
return false;
return struct_->release(struct_) ? true : false;
}
bool UnderlyingHasOneRef() const {
if (!struct_->has_one_ref)
return false;
return struct_->has_one_ref(struct_) ? true : false;
}
private:
CefRefCount ref_count_;
cef_base_t* struct_;
DISALLOW_COPY_AND_ASSIGN(CefBaseCToCpp);
};
#endif // CEF_LIBCEF_DLL_CTOCPP_BASE_CTOCPP_H_

View File

@@ -0,0 +1,39 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/before_download_callback_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
void CefBeforeDownloadCallbackCToCpp::Continue(const CefString& download_path,
bool show_dialog) {
if (CEF_MEMBER_MISSING(struct_, cont))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Unverified params: download_path
// Execute
struct_->cont(struct_,
download_path.GetStruct(),
show_dialog);
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefBeforeDownloadCallbackCToCpp,
CefBeforeDownloadCallback, cef_before_download_callback_t>::DebugObjCt =
0;
#endif

View File

@@ -0,0 +1,42 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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_BEFORE_DOWNLOAD_CALLBACK_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_BEFORE_DOWNLOAD_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_download_handler.h"
#include "include/capi/cef_download_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 CefBeforeDownloadCallbackCToCpp
: public CefCToCpp<CefBeforeDownloadCallbackCToCpp,
CefBeforeDownloadCallback, cef_before_download_callback_t> {
public:
explicit CefBeforeDownloadCallbackCToCpp(cef_before_download_callback_t* str)
: CefCToCpp<CefBeforeDownloadCallbackCToCpp, CefBeforeDownloadCallback,
cef_before_download_callback_t>(str) {}
// CefBeforeDownloadCallback methods
virtual void Continue(const CefString& download_path,
bool show_dialog) OVERRIDE;
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_BEFORE_DOWNLOAD_CALLBACK_CTOCPP_H_

View File

@@ -0,0 +1,118 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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<> base::AtomicRefCount CefCToCpp<CefBinaryValueCToCpp, CefBinaryValue,
cef_binary_value_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,46 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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) {}
// 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_

View File

@@ -0,0 +1,340 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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 <algorithm>
#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::IsSame(CefRefPtr<CefBrowser> 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_,
CefBrowserCToCpp::Unwrap(that));
// Return type: bool
return _retval?true:false;
}
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
// Unverified params: name
// 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<> base::AtomicRefCount CefCToCpp<CefBrowserCToCpp, CefBrowser,
cef_browser_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,63 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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) {}
// 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 IsSame(CefRefPtr<CefBrowser> that) 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_

View File

@@ -0,0 +1,651 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/client_cpptoc.h"
#include "libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.h"
#include "libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h"
#include "libcef_dll/ctocpp/browser_ctocpp.h"
#include "libcef_dll/ctocpp/browser_host_ctocpp.h"
#include "libcef_dll/ctocpp/drag_data_ctocpp.h"
#include "libcef_dll/ctocpp/request_context_ctocpp.h"
#include "libcef_dll/transfer_util.h"
// STATIC METHODS - Body may be edited by hand.
bool CefBrowserHost::CreateBrowser(const CefWindowInfo& windowInfo,
CefRefPtr<CefClient> client, const CefString& url,
const CefBrowserSettings& settings,
CefRefPtr<CefRequestContext> request_context) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Unverified params: client, url, request_context
// Execute
int _retval = cef_browser_host_create_browser(
&windowInfo,
CefClientCppToC::Wrap(client),
url.GetStruct(),
&settings,
CefRequestContextCToCpp::Unwrap(request_context));
// Return type: bool
return _retval?true:false;
}
CefRefPtr<CefBrowser> CefBrowserHost::CreateBrowserSync(
const CefWindowInfo& windowInfo, CefRefPtr<CefClient> client,
const CefString& url, const CefBrowserSettings& settings,
CefRefPtr<CefRequestContext> request_context) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Unverified params: client, url, request_context
// Execute
cef_browser_t* _retval = cef_browser_host_create_browser_sync(
&windowInfo,
CefClientCppToC::Wrap(client),
url.GetStruct(),
&settings,
CefRequestContextCToCpp::Unwrap(request_context));
// 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::CloseBrowser(bool force_close) {
if (CEF_MEMBER_MISSING(struct_, close_browser))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->close_browser(struct_,
force_close);
}
void CefBrowserHostCToCpp::SetFocus(bool focus) {
if (CEF_MEMBER_MISSING(struct_, set_focus))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->set_focus(struct_,
focus);
}
void CefBrowserHostCToCpp::SetWindowVisibility(bool visible) {
if (CEF_MEMBER_MISSING(struct_, set_window_visibility))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->set_window_visibility(struct_,
visible);
}
CefWindowHandle CefBrowserHostCToCpp::GetWindowHandle() {
if (CEF_MEMBER_MISSING(struct_, get_window_handle))
return kNullWindowHandle;
// 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 kNullWindowHandle;
// 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);
}
CefRefPtr<CefRequestContext> CefBrowserHostCToCpp::GetRequestContext() {
if (CEF_MEMBER_MISSING(struct_, get_request_context))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_request_context_t* _retval = struct_->get_request_context(struct_);
// Return type: refptr_same
return CefRequestContextCToCpp::Wrap(_retval);
}
double CefBrowserHostCToCpp::GetZoomLevel() {
if (CEF_MEMBER_MISSING(struct_, get_zoom_level))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
double _retval = struct_->get_zoom_level(struct_);
// Return type: simple
return _retval;
}
void CefBrowserHostCToCpp::SetZoomLevel(double zoomLevel) {
if (CEF_MEMBER_MISSING(struct_, set_zoom_level))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->set_zoom_level(struct_,
zoomLevel);
}
void CefBrowserHostCToCpp::RunFileDialog(FileDialogMode mode,
const CefString& title, const CefString& default_file_path,
const std::vector<CefString>& accept_filters, int selected_accept_filter,
CefRefPtr<CefRunFileDialogCallback> callback) {
if (CEF_MEMBER_MISSING(struct_, run_file_dialog))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: selected_accept_filter; type: simple_byval
DCHECK_GE(selected_accept_filter, 0);
if (selected_accept_filter < 0)
return;
// Verify param: callback; type: refptr_diff
DCHECK(callback.get());
if (!callback.get())
return;
// Unverified params: title, default_file_path, accept_filters
// Translate param: accept_filters; type: string_vec_byref_const
cef_string_list_t accept_filtersList = cef_string_list_alloc();
DCHECK(accept_filtersList);
if (accept_filtersList)
transfer_string_list_contents(accept_filters, accept_filtersList);
// Execute
struct_->run_file_dialog(struct_,
mode,
title.GetStruct(),
default_file_path.GetStruct(),
accept_filtersList,
selected_accept_filter,
CefRunFileDialogCallbackCppToC::Wrap(callback));
// Restore param:accept_filters; type: string_vec_byref_const
if (accept_filtersList)
cef_string_list_free(accept_filtersList);
}
void CefBrowserHostCToCpp::StartDownload(const CefString& url) {
if (CEF_MEMBER_MISSING(struct_, start_download))
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_->start_download(struct_,
url.GetStruct());
}
void CefBrowserHostCToCpp::Print() {
if (CEF_MEMBER_MISSING(struct_, print))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->print(struct_);
}
void CefBrowserHostCToCpp::Find(int identifier, const CefString& searchText,
bool forward, bool matchCase, bool findNext) {
if (CEF_MEMBER_MISSING(struct_, find))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: searchText; type: string_byref_const
DCHECK(!searchText.empty());
if (searchText.empty())
return;
// Execute
struct_->find(struct_,
identifier,
searchText.GetStruct(),
forward,
matchCase,
findNext);
}
void CefBrowserHostCToCpp::StopFinding(bool clearSelection) {
if (CEF_MEMBER_MISSING(struct_, stop_finding))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->stop_finding(struct_,
clearSelection);
}
void CefBrowserHostCToCpp::ShowDevTools(const CefWindowInfo& windowInfo,
CefRefPtr<CefClient> client, const CefBrowserSettings& settings,
const CefPoint& inspect_element_at) {
if (CEF_MEMBER_MISSING(struct_, show_dev_tools))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: client; type: refptr_diff
DCHECK(client.get());
if (!client.get())
return;
// Unverified params: inspect_element_at
// Execute
struct_->show_dev_tools(struct_,
&windowInfo,
CefClientCppToC::Wrap(client),
&settings,
&inspect_element_at);
}
void CefBrowserHostCToCpp::CloseDevTools() {
if (CEF_MEMBER_MISSING(struct_, close_dev_tools))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->close_dev_tools(struct_);
}
void CefBrowserHostCToCpp::GetNavigationEntries(
CefRefPtr<CefNavigationEntryVisitor> visitor, bool current_only) {
if (CEF_MEMBER_MISSING(struct_, get_navigation_entries))
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_navigation_entries(struct_,
CefNavigationEntryVisitorCppToC::Wrap(visitor),
current_only);
}
void CefBrowserHostCToCpp::SetMouseCursorChangeDisabled(bool disabled) {
if (CEF_MEMBER_MISSING(struct_, set_mouse_cursor_change_disabled))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->set_mouse_cursor_change_disabled(struct_,
disabled);
}
bool CefBrowserHostCToCpp::IsMouseCursorChangeDisabled() {
if (CEF_MEMBER_MISSING(struct_, is_mouse_cursor_change_disabled))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->is_mouse_cursor_change_disabled(struct_);
// Return type: bool
return _retval?true:false;
}
void CefBrowserHostCToCpp::ReplaceMisspelling(const CefString& word) {
if (CEF_MEMBER_MISSING(struct_, replace_misspelling))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: word; type: string_byref_const
DCHECK(!word.empty());
if (word.empty())
return;
// Execute
struct_->replace_misspelling(struct_,
word.GetStruct());
}
void CefBrowserHostCToCpp::AddWordToDictionary(const CefString& word) {
if (CEF_MEMBER_MISSING(struct_, add_word_to_dictionary))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: word; type: string_byref_const
DCHECK(!word.empty());
if (word.empty())
return;
// Execute
struct_->add_word_to_dictionary(struct_,
word.GetStruct());
}
bool CefBrowserHostCToCpp::IsWindowRenderingDisabled() {
if (CEF_MEMBER_MISSING(struct_, is_window_rendering_disabled))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->is_window_rendering_disabled(struct_);
// Return type: bool
return _retval?true:false;
}
void CefBrowserHostCToCpp::WasResized() {
if (CEF_MEMBER_MISSING(struct_, was_resized))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->was_resized(struct_);
}
void CefBrowserHostCToCpp::WasHidden(bool hidden) {
if (CEF_MEMBER_MISSING(struct_, was_hidden))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->was_hidden(struct_,
hidden);
}
void CefBrowserHostCToCpp::NotifyScreenInfoChanged() {
if (CEF_MEMBER_MISSING(struct_, notify_screen_info_changed))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->notify_screen_info_changed(struct_);
}
void CefBrowserHostCToCpp::Invalidate(PaintElementType type) {
if (CEF_MEMBER_MISSING(struct_, invalidate))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->invalidate(struct_,
type);
}
void CefBrowserHostCToCpp::SendKeyEvent(const CefKeyEvent& event) {
if (CEF_MEMBER_MISSING(struct_, send_key_event))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->send_key_event(struct_,
&event);
}
void CefBrowserHostCToCpp::SendMouseClickEvent(const CefMouseEvent& event,
MouseButtonType type, bool mouseUp, int clickCount) {
if (CEF_MEMBER_MISSING(struct_, send_mouse_click_event))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->send_mouse_click_event(struct_,
&event,
type,
mouseUp,
clickCount);
}
void CefBrowserHostCToCpp::SendMouseMoveEvent(const CefMouseEvent& event,
bool mouseLeave) {
if (CEF_MEMBER_MISSING(struct_, send_mouse_move_event))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->send_mouse_move_event(struct_,
&event,
mouseLeave);
}
void CefBrowserHostCToCpp::SendMouseWheelEvent(const CefMouseEvent& event,
int deltaX, int deltaY) {
if (CEF_MEMBER_MISSING(struct_, send_mouse_wheel_event))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->send_mouse_wheel_event(struct_,
&event,
deltaX,
deltaY);
}
void CefBrowserHostCToCpp::SendFocusEvent(bool setFocus) {
if (CEF_MEMBER_MISSING(struct_, send_focus_event))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->send_focus_event(struct_,
setFocus);
}
void CefBrowserHostCToCpp::SendCaptureLostEvent() {
if (CEF_MEMBER_MISSING(struct_, send_capture_lost_event))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->send_capture_lost_event(struct_);
}
void CefBrowserHostCToCpp::NotifyMoveOrResizeStarted() {
if (CEF_MEMBER_MISSING(struct_, notify_move_or_resize_started))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->notify_move_or_resize_started(struct_);
}
CefTextInputContext CefBrowserHostCToCpp::GetNSTextInputContext() {
if (CEF_MEMBER_MISSING(struct_, get_nstext_input_context))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_text_input_context_t _retval = struct_->get_nstext_input_context(struct_);
// Return type: simple
return _retval;
}
void CefBrowserHostCToCpp::HandleKeyEventBeforeTextInputClient(
CefEventHandle keyEvent) {
if (CEF_MEMBER_MISSING(struct_, handle_key_event_before_text_input_client))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->handle_key_event_before_text_input_client(struct_,
keyEvent);
}
void CefBrowserHostCToCpp::HandleKeyEventAfterTextInputClient(
CefEventHandle keyEvent) {
if (CEF_MEMBER_MISSING(struct_, handle_key_event_after_text_input_client))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->handle_key_event_after_text_input_client(struct_,
keyEvent);
}
void CefBrowserHostCToCpp::DragTargetDragEnter(CefRefPtr<CefDragData> drag_data,
const CefMouseEvent& event, DragOperationsMask allowed_ops) {
if (CEF_MEMBER_MISSING(struct_, drag_target_drag_enter))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: drag_data; type: refptr_same
DCHECK(drag_data.get());
if (!drag_data.get())
return;
// Execute
struct_->drag_target_drag_enter(struct_,
CefDragDataCToCpp::Unwrap(drag_data),
&event,
allowed_ops);
}
void CefBrowserHostCToCpp::DragTargetDragOver(const CefMouseEvent& event,
DragOperationsMask allowed_ops) {
if (CEF_MEMBER_MISSING(struct_, drag_target_drag_over))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->drag_target_drag_over(struct_,
&event,
allowed_ops);
}
void CefBrowserHostCToCpp::DragTargetDragLeave() {
if (CEF_MEMBER_MISSING(struct_, drag_target_drag_leave))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->drag_target_drag_leave(struct_);
}
void CefBrowserHostCToCpp::DragTargetDrop(const CefMouseEvent& event) {
if (CEF_MEMBER_MISSING(struct_, drag_target_drop))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->drag_target_drop(struct_,
&event);
}
void CefBrowserHostCToCpp::DragSourceEndedAt(int x, int y,
DragOperationsMask op) {
if (CEF_MEMBER_MISSING(struct_, drag_source_ended_at))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->drag_source_ended_at(struct_,
x,
y,
op);
}
void CefBrowserHostCToCpp::DragSourceSystemDragEnded() {
if (CEF_MEMBER_MISSING(struct_, drag_source_system_drag_ended))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->drag_source_system_drag_ended(struct_);
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefBrowserHostCToCpp, CefBrowserHost,
cef_browser_host_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,101 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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 <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 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) {}
// CefBrowserHost methods
virtual CefRefPtr<CefBrowser> GetBrowser() OVERRIDE;
virtual void CloseBrowser(bool force_close) OVERRIDE;
virtual void SetFocus(bool focus) OVERRIDE;
virtual void SetWindowVisibility(bool visible) OVERRIDE;
virtual CefWindowHandle GetWindowHandle() OVERRIDE;
virtual CefWindowHandle GetOpenerWindowHandle() OVERRIDE;
virtual CefRefPtr<CefClient> GetClient() OVERRIDE;
virtual CefRefPtr<CefRequestContext> GetRequestContext() OVERRIDE;
virtual double GetZoomLevel() OVERRIDE;
virtual void SetZoomLevel(double zoomLevel) OVERRIDE;
virtual void RunFileDialog(FileDialogMode mode, const CefString& title,
const CefString& default_file_path,
const std::vector<CefString>& accept_filters, int selected_accept_filter,
CefRefPtr<CefRunFileDialogCallback> callback) OVERRIDE;
virtual void StartDownload(const CefString& url) OVERRIDE;
virtual void Print() OVERRIDE;
virtual void Find(int identifier, const CefString& searchText, bool forward,
bool matchCase, bool findNext) OVERRIDE;
virtual void StopFinding(bool clearSelection) OVERRIDE;
virtual void ShowDevTools(const CefWindowInfo& windowInfo,
CefRefPtr<CefClient> client, const CefBrowserSettings& settings,
const CefPoint& inspect_element_at) OVERRIDE;
virtual void CloseDevTools() OVERRIDE;
virtual void GetNavigationEntries(
CefRefPtr<CefNavigationEntryVisitor> visitor,
bool current_only) OVERRIDE;
virtual void SetMouseCursorChangeDisabled(bool disabled) OVERRIDE;
virtual bool IsMouseCursorChangeDisabled() OVERRIDE;
virtual void ReplaceMisspelling(const CefString& word) OVERRIDE;
virtual void AddWordToDictionary(const CefString& word) OVERRIDE;
virtual bool IsWindowRenderingDisabled() OVERRIDE;
virtual void WasResized() OVERRIDE;
virtual void WasHidden(bool hidden) OVERRIDE;
virtual void NotifyScreenInfoChanged() OVERRIDE;
virtual void Invalidate(PaintElementType type) OVERRIDE;
virtual void SendKeyEvent(const CefKeyEvent& event) OVERRIDE;
virtual void SendMouseClickEvent(const CefMouseEvent& event,
MouseButtonType type, bool mouseUp, int clickCount) OVERRIDE;
virtual void SendMouseMoveEvent(const CefMouseEvent& event,
bool mouseLeave) OVERRIDE;
virtual void SendMouseWheelEvent(const CefMouseEvent& event, int deltaX,
int deltaY) OVERRIDE;
virtual void SendFocusEvent(bool setFocus) OVERRIDE;
virtual void SendCaptureLostEvent() OVERRIDE;
virtual void NotifyMoveOrResizeStarted() OVERRIDE;
virtual CefTextInputContext GetNSTextInputContext() OVERRIDE;
virtual void HandleKeyEventBeforeTextInputClient(
CefEventHandle keyEvent) OVERRIDE;
virtual void HandleKeyEventAfterTextInputClient(
CefEventHandle keyEvent) OVERRIDE;
virtual void DragTargetDragEnter(CefRefPtr<CefDragData> drag_data,
const CefMouseEvent& event, DragOperationsMask allowed_ops) OVERRIDE;
virtual void DragTargetDragOver(const CefMouseEvent& event,
DragOperationsMask allowed_ops) OVERRIDE;
virtual void DragTargetDragLeave() OVERRIDE;
virtual void DragTargetDrop(const CefMouseEvent& event) OVERRIDE;
virtual void DragSourceEndedAt(int x, int y, DragOperationsMask op) OVERRIDE;
virtual void DragSourceSystemDragEnded() OVERRIDE;
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_BROWSER_HOST_CTOCPP_H_

View File

@@ -0,0 +1,83 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/cpptoc/list_value_cpptoc.h"
#include "libcef_dll/ctocpp/browser_process_handler_ctocpp.h"
#include "libcef_dll/ctocpp/print_handler_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
void CefBrowserProcessHandlerCToCpp::OnContextInitialized() {
if (CEF_MEMBER_MISSING(struct_, on_context_initialized))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->on_context_initialized(struct_);
}
void CefBrowserProcessHandlerCToCpp::OnBeforeChildProcessLaunch(
CefRefPtr<CefCommandLine> command_line) {
if (CEF_MEMBER_MISSING(struct_, on_before_child_process_launch))
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;
// Execute
struct_->on_before_child_process_launch(struct_,
CefCommandLineCppToC::Wrap(command_line));
}
void CefBrowserProcessHandlerCToCpp::OnRenderProcessThreadCreated(
CefRefPtr<CefListValue> extra_info) {
if (CEF_MEMBER_MISSING(struct_, on_render_process_thread_created))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: extra_info; type: refptr_diff
DCHECK(extra_info.get());
if (!extra_info.get())
return;
// Execute
struct_->on_render_process_thread_created(struct_,
CefListValueCppToC::Wrap(extra_info));
}
CefRefPtr<CefPrintHandler> CefBrowserProcessHandlerCToCpp::GetPrintHandler() {
if (CEF_MEMBER_MISSING(struct_, get_print_handler))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_print_handler_t* _retval = struct_->get_print_handler(struct_);
// Return type: refptr_same
return CefPrintHandlerCToCpp::Wrap(_retval);
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefBrowserProcessHandlerCToCpp,
CefBrowserProcessHandler, cef_browser_process_handler_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,46 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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_PROCESS_HANDLER_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_BROWSER_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_browser_process_handler.h"
#include "include/capi/cef_browser_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 CefBrowserProcessHandlerCToCpp
: public CefCToCpp<CefBrowserProcessHandlerCToCpp, CefBrowserProcessHandler,
cef_browser_process_handler_t> {
public:
explicit CefBrowserProcessHandlerCToCpp(cef_browser_process_handler_t* str)
: CefCToCpp<CefBrowserProcessHandlerCToCpp, CefBrowserProcessHandler,
cef_browser_process_handler_t>(str) {}
// CefBrowserProcessHandler methods
void OnContextInitialized() override;
void OnBeforeChildProcessLaunch(
CefRefPtr<CefCommandLine> command_line) override;
void OnRenderProcessThreadCreated(
CefRefPtr<CefListValue> extra_info) override;
CefRefPtr<CefPrintHandler> GetPrintHandler() override;
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_BROWSER_PROCESS_HANDLER_CTOCPP_H_

View File

@@ -0,0 +1,43 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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<> base::AtomicRefCount CefCToCpp<CefCallbackCToCpp, CefCallback,
cef_callback_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,40 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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) {}
// CefCallback methods
virtual void Continue() OVERRIDE;
virtual void Cancel() OVERRIDE;
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_CALLBACK_CTOCPP_H_

View File

@@ -0,0 +1,249 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/context_menu_handler_ctocpp.h"
#include "libcef_dll/ctocpp/dialog_handler_ctocpp.h"
#include "libcef_dll/ctocpp/display_handler_ctocpp.h"
#include "libcef_dll/ctocpp/download_handler_ctocpp.h"
#include "libcef_dll/ctocpp/drag_handler_ctocpp.h"
#include "libcef_dll/ctocpp/find_handler_ctocpp.h"
#include "libcef_dll/ctocpp/focus_handler_ctocpp.h"
#include "libcef_dll/ctocpp/geolocation_handler_ctocpp.h"
#include "libcef_dll/ctocpp/jsdialog_handler_ctocpp.h"
#include "libcef_dll/ctocpp/keyboard_handler_ctocpp.h"
#include "libcef_dll/ctocpp/life_span_handler_ctocpp.h"
#include "libcef_dll/ctocpp/load_handler_ctocpp.h"
#include "libcef_dll/ctocpp/render_handler_ctocpp.h"
#include "libcef_dll/ctocpp/request_handler_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
CefRefPtr<CefContextMenuHandler> CefClientCToCpp::GetContextMenuHandler() {
if (CEF_MEMBER_MISSING(struct_, get_context_menu_handler))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_context_menu_handler_t* _retval = struct_->get_context_menu_handler(
struct_);
// Return type: refptr_same
return CefContextMenuHandlerCToCpp::Wrap(_retval);
}
CefRefPtr<CefDialogHandler> CefClientCToCpp::GetDialogHandler() {
if (CEF_MEMBER_MISSING(struct_, get_dialog_handler))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_dialog_handler_t* _retval = struct_->get_dialog_handler(struct_);
// Return type: refptr_same
return CefDialogHandlerCToCpp::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<CefDownloadHandler> CefClientCToCpp::GetDownloadHandler() {
if (CEF_MEMBER_MISSING(struct_, get_download_handler))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_download_handler_t* _retval = struct_->get_download_handler(struct_);
// Return type: refptr_same
return CefDownloadHandlerCToCpp::Wrap(_retval);
}
CefRefPtr<CefDragHandler> CefClientCToCpp::GetDragHandler() {
if (CEF_MEMBER_MISSING(struct_, get_drag_handler))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_drag_handler_t* _retval = struct_->get_drag_handler(struct_);
// Return type: refptr_same
return CefDragHandlerCToCpp::Wrap(_retval);
}
CefRefPtr<CefFindHandler> CefClientCToCpp::GetFindHandler() {
if (CEF_MEMBER_MISSING(struct_, get_find_handler))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_find_handler_t* _retval = struct_->get_find_handler(struct_);
// Return type: refptr_same
return CefFindHandlerCToCpp::Wrap(_retval);
}
CefRefPtr<CefFocusHandler> CefClientCToCpp::GetFocusHandler() {
if (CEF_MEMBER_MISSING(struct_, get_focus_handler))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_focus_handler_t* _retval = struct_->get_focus_handler(struct_);
// Return type: refptr_same
return CefFocusHandlerCToCpp::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);
}
CefRefPtr<CefJSDialogHandler> CefClientCToCpp::GetJSDialogHandler() {
if (CEF_MEMBER_MISSING(struct_, get_jsdialog_handler))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_jsdialog_handler_t* _retval = struct_->get_jsdialog_handler(struct_);
// Return type: refptr_same
return CefJSDialogHandlerCToCpp::Wrap(_retval);
}
CefRefPtr<CefKeyboardHandler> CefClientCToCpp::GetKeyboardHandler() {
if (CEF_MEMBER_MISSING(struct_, get_keyboard_handler))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_keyboard_handler_t* _retval = struct_->get_keyboard_handler(struct_);
// Return type: refptr_same
return CefKeyboardHandlerCToCpp::Wrap(_retval);
}
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<CefRenderHandler> CefClientCToCpp::GetRenderHandler() {
if (CEF_MEMBER_MISSING(struct_, get_render_handler))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_render_handler_t* _retval = struct_->get_render_handler(struct_);
// Return type: refptr_same
return CefRenderHandlerCToCpp::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);
}
bool CefClientCToCpp::OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
CefProcessId source_process, CefRefPtr<CefProcessMessage> message) {
if (CEF_MEMBER_MISSING(struct_, on_process_message_received))
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_received(struct_,
CefBrowserCppToC::Wrap(browser),
source_process,
CefProcessMessageCppToC::Wrap(message));
// Return type: bool
return _retval?true:false;
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefClientCToCpp, CefClient,
cef_client_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,55 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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) {}
// CefClient methods
CefRefPtr<CefContextMenuHandler> GetContextMenuHandler() override;
CefRefPtr<CefDialogHandler> GetDialogHandler() override;
CefRefPtr<CefDisplayHandler> GetDisplayHandler() override;
CefRefPtr<CefDownloadHandler> GetDownloadHandler() override;
CefRefPtr<CefDragHandler> GetDragHandler() override;
CefRefPtr<CefFindHandler> GetFindHandler() override;
CefRefPtr<CefFocusHandler> GetFocusHandler() override;
CefRefPtr<CefGeolocationHandler> GetGeolocationHandler() override;
CefRefPtr<CefJSDialogHandler> GetJSDialogHandler() override;
CefRefPtr<CefKeyboardHandler> GetKeyboardHandler() override;
CefRefPtr<CefLifeSpanHandler> GetLifeSpanHandler() override;
CefRefPtr<CefLoadHandler> GetLoadHandler() override;
CefRefPtr<CefRenderHandler> GetRenderHandler() override;
CefRefPtr<CefRequestHandler> GetRequestHandler() override;
bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
CefProcessId source_process,
CefRefPtr<CefProcessMessage> message) override;
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_CLIENT_CTOCPP_H_

View File

@@ -0,0 +1,398 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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() {
const char* api_hash = cef_api_hash(0);
if (strcmp(api_hash, CEF_API_HASH_PLATFORM)) {
// The libcef API hash does not match the current header API hash.
NOTREACHED();
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() {
const char* api_hash = cef_api_hash(0);
if (strcmp(api_hash, CEF_API_HASH_PLATFORM)) {
// The libcef API hash does not match the current header API hash.
NOTREACHED();
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_);
}
void CefCommandLineCToCpp::GetArgv(std::vector<CefString>& argv) {
if (CEF_MEMBER_MISSING(struct_, get_argv))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Translate param: argv; type: string_vec_byref
cef_string_list_t argvList = cef_string_list_alloc();
DCHECK(argvList);
if (argvList)
transfer_string_list_contents(argv, argvList);
// Execute
struct_->get_argv(struct_,
argvList);
// Restore param:argv; type: string_vec_byref
if (argvList) {
argv.clear();
transfer_string_list_contents(argvList, argv);
cef_string_list_free(argvList);
}
}
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());
}
void CefCommandLineCToCpp::PrependWrapper(const CefString& wrapper) {
if (CEF_MEMBER_MISSING(struct_, prepend_wrapper))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: wrapper; type: string_byref_const
DCHECK(!wrapper.empty());
if (wrapper.empty())
return;
// Execute
struct_->prepend_wrapper(struct_,
wrapper.GetStruct());
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefCommandLineCToCpp, CefCommandLine,
cef_command_line_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,62 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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 <vector>
#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) {}
// 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 void GetArgv(std::vector<CefString>& argv) 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;
virtual void PrependWrapper(const CefString& wrapper) OVERRIDE;
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_COMMAND_LINE_CTOCPP_H_

View File

@@ -0,0 +1,33 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/completion_callback_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
void CefCompletionCallbackCToCpp::OnComplete() {
if (CEF_MEMBER_MISSING(struct_, on_complete))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->on_complete(struct_);
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefCompletionCallbackCToCpp,
CefCompletionCallback, cef_completion_callback_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,41 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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_COMPLETION_CALLBACK_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_COMPLETION_CALLBACK_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_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 DLL-side only.
class CefCompletionCallbackCToCpp
: public CefCToCpp<CefCompletionCallbackCToCpp, CefCompletionCallback,
cef_completion_callback_t> {
public:
explicit CefCompletionCallbackCToCpp(cef_completion_callback_t* str)
: CefCToCpp<CefCompletionCallbackCToCpp, CefCompletionCallback,
cef_completion_callback_t>(str) {}
// CefCompletionCallback methods
void OnComplete() override;
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_COMPLETION_CALLBACK_CTOCPP_H_

View File

@@ -0,0 +1,116 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/context_menu_params_cpptoc.h"
#include "libcef_dll/cpptoc/frame_cpptoc.h"
#include "libcef_dll/cpptoc/menu_model_cpptoc.h"
#include "libcef_dll/ctocpp/context_menu_handler_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
void CefContextMenuHandlerCToCpp::OnBeforeContextMenu(
CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame,
CefRefPtr<CefContextMenuParams> params, CefRefPtr<CefMenuModel> model) {
if (CEF_MEMBER_MISSING(struct_, on_before_context_menu))
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: params; type: refptr_diff
DCHECK(params.get());
if (!params.get())
return;
// Verify param: model; type: refptr_diff
DCHECK(model.get());
if (!model.get())
return;
// Execute
struct_->on_before_context_menu(struct_,
CefBrowserCppToC::Wrap(browser),
CefFrameCppToC::Wrap(frame),
CefContextMenuParamsCppToC::Wrap(params),
CefMenuModelCppToC::Wrap(model));
}
bool CefContextMenuHandlerCToCpp::OnContextMenuCommand(
CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame,
CefRefPtr<CefContextMenuParams> params, int command_id,
EventFlags event_flags) {
if (CEF_MEMBER_MISSING(struct_, on_context_menu_command))
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: params; type: refptr_diff
DCHECK(params.get());
if (!params.get())
return false;
// Execute
int _retval = struct_->on_context_menu_command(struct_,
CefBrowserCppToC::Wrap(browser),
CefFrameCppToC::Wrap(frame),
CefContextMenuParamsCppToC::Wrap(params),
command_id,
event_flags);
// Return type: bool
return _retval?true:false;
}
void CefContextMenuHandlerCToCpp::OnContextMenuDismissed(
CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame) {
if (CEF_MEMBER_MISSING(struct_, on_context_menu_dismissed))
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_context_menu_dismissed(struct_,
CefBrowserCppToC::Wrap(browser),
CefFrameCppToC::Wrap(frame));
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefContextMenuHandlerCToCpp,
CefContextMenuHandler, cef_context_menu_handler_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,48 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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_CONTEXT_MENU_HANDLER_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_CONTEXT_MENU_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_context_menu_handler.h"
#include "include/capi/cef_context_menu_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 CefContextMenuHandlerCToCpp
: public CefCToCpp<CefContextMenuHandlerCToCpp, CefContextMenuHandler,
cef_context_menu_handler_t> {
public:
explicit CefContextMenuHandlerCToCpp(cef_context_menu_handler_t* str)
: CefCToCpp<CefContextMenuHandlerCToCpp, CefContextMenuHandler,
cef_context_menu_handler_t>(str) {}
// CefContextMenuHandler methods
void OnBeforeContextMenu(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame, CefRefPtr<CefContextMenuParams> params,
CefRefPtr<CefMenuModel> model) override;
bool OnContextMenuCommand(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame, CefRefPtr<CefContextMenuParams> params,
int command_id, EventFlags event_flags) override;
void OnContextMenuDismissed(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame) override;
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_CONTEXT_MENU_HANDLER_CTOCPP_H_

View File

@@ -0,0 +1,306 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/context_menu_params_ctocpp.h"
#include "libcef_dll/transfer_util.h"
// VIRTUAL METHODS - Body may be edited by hand.
int CefContextMenuParamsCToCpp::GetXCoord() {
if (CEF_MEMBER_MISSING(struct_, get_xcoord))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->get_xcoord(struct_);
// Return type: simple
return _retval;
}
int CefContextMenuParamsCToCpp::GetYCoord() {
if (CEF_MEMBER_MISSING(struct_, get_ycoord))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->get_ycoord(struct_);
// Return type: simple
return _retval;
}
CefContextMenuParams::TypeFlags CefContextMenuParamsCToCpp::GetTypeFlags() {
if (CEF_MEMBER_MISSING(struct_, get_type_flags))
return CM_TYPEFLAG_NONE;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_context_menu_type_flags_t _retval = struct_->get_type_flags(struct_);
// Return type: simple
return _retval;
}
CefString CefContextMenuParamsCToCpp::GetLinkUrl() {
if (CEF_MEMBER_MISSING(struct_, get_link_url))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_link_url(struct_);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
CefString CefContextMenuParamsCToCpp::GetUnfilteredLinkUrl() {
if (CEF_MEMBER_MISSING(struct_, get_unfiltered_link_url))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_unfiltered_link_url(struct_);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
CefString CefContextMenuParamsCToCpp::GetSourceUrl() {
if (CEF_MEMBER_MISSING(struct_, get_source_url))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_source_url(struct_);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
bool CefContextMenuParamsCToCpp::HasImageContents() {
if (CEF_MEMBER_MISSING(struct_, has_image_contents))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->has_image_contents(struct_);
// Return type: bool
return _retval?true:false;
}
CefString CefContextMenuParamsCToCpp::GetPageUrl() {
if (CEF_MEMBER_MISSING(struct_, get_page_url))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_page_url(struct_);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
CefString CefContextMenuParamsCToCpp::GetFrameUrl() {
if (CEF_MEMBER_MISSING(struct_, get_frame_url))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_frame_url(struct_);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
CefString CefContextMenuParamsCToCpp::GetFrameCharset() {
if (CEF_MEMBER_MISSING(struct_, get_frame_charset))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_frame_charset(struct_);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
CefContextMenuParams::MediaType CefContextMenuParamsCToCpp::GetMediaType() {
if (CEF_MEMBER_MISSING(struct_, get_media_type))
return CM_MEDIATYPE_NONE;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_context_menu_media_type_t _retval = struct_->get_media_type(struct_);
// Return type: simple
return _retval;
}
CefContextMenuParams::MediaStateFlags CefContextMenuParamsCToCpp::GetMediaStateFlags(
) {
if (CEF_MEMBER_MISSING(struct_, get_media_state_flags))
return CM_MEDIAFLAG_NONE;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_context_menu_media_state_flags_t _retval = struct_->get_media_state_flags(
struct_);
// Return type: simple
return _retval;
}
CefString CefContextMenuParamsCToCpp::GetSelectionText() {
if (CEF_MEMBER_MISSING(struct_, get_selection_text))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_selection_text(struct_);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
CefString CefContextMenuParamsCToCpp::GetMisspelledWord() {
if (CEF_MEMBER_MISSING(struct_, get_misspelled_word))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_misspelled_word(struct_);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
int CefContextMenuParamsCToCpp::GetMisspellingHash() {
if (CEF_MEMBER_MISSING(struct_, get_misspelling_hash))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->get_misspelling_hash(struct_);
// Return type: simple
return _retval;
}
bool CefContextMenuParamsCToCpp::GetDictionarySuggestions(
std::vector<CefString>& suggestions) {
if (CEF_MEMBER_MISSING(struct_, get_dictionary_suggestions))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Translate param: suggestions; type: string_vec_byref
cef_string_list_t suggestionsList = cef_string_list_alloc();
DCHECK(suggestionsList);
if (suggestionsList)
transfer_string_list_contents(suggestions, suggestionsList);
// Execute
int _retval = struct_->get_dictionary_suggestions(struct_,
suggestionsList);
// Restore param:suggestions; type: string_vec_byref
if (suggestionsList) {
suggestions.clear();
transfer_string_list_contents(suggestionsList, suggestions);
cef_string_list_free(suggestionsList);
}
// Return type: bool
return _retval?true:false;
}
bool CefContextMenuParamsCToCpp::IsEditable() {
if (CEF_MEMBER_MISSING(struct_, is_editable))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->is_editable(struct_);
// Return type: bool
return _retval?true:false;
}
bool CefContextMenuParamsCToCpp::IsSpellCheckEnabled() {
if (CEF_MEMBER_MISSING(struct_, is_spell_check_enabled))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->is_spell_check_enabled(struct_);
// Return type: bool
return _retval?true:false;
}
CefContextMenuParams::EditStateFlags CefContextMenuParamsCToCpp::GetEditStateFlags(
) {
if (CEF_MEMBER_MISSING(struct_, get_edit_state_flags))
return CM_EDITFLAG_NONE;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_context_menu_edit_state_flags_t _retval = struct_->get_edit_state_flags(
struct_);
// Return type: simple
return _retval;
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefContextMenuParamsCToCpp,
CefContextMenuParams, cef_context_menu_params_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,61 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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_CONTEXT_MENU_PARAMS_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_CONTEXT_MENU_PARAMS_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_context_menu_handler.h"
#include "include/capi/cef_context_menu_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 CefContextMenuParamsCToCpp
: public CefCToCpp<CefContextMenuParamsCToCpp, CefContextMenuParams,
cef_context_menu_params_t> {
public:
explicit CefContextMenuParamsCToCpp(cef_context_menu_params_t* str)
: CefCToCpp<CefContextMenuParamsCToCpp, CefContextMenuParams,
cef_context_menu_params_t>(str) {}
// CefContextMenuParams methods
virtual int GetXCoord() OVERRIDE;
virtual int GetYCoord() OVERRIDE;
virtual TypeFlags GetTypeFlags() OVERRIDE;
virtual CefString GetLinkUrl() OVERRIDE;
virtual CefString GetUnfilteredLinkUrl() OVERRIDE;
virtual CefString GetSourceUrl() OVERRIDE;
virtual bool HasImageContents() OVERRIDE;
virtual CefString GetPageUrl() OVERRIDE;
virtual CefString GetFrameUrl() OVERRIDE;
virtual CefString GetFrameCharset() OVERRIDE;
virtual MediaType GetMediaType() OVERRIDE;
virtual MediaStateFlags GetMediaStateFlags() OVERRIDE;
virtual CefString GetSelectionText() OVERRIDE;
virtual CefString GetMisspelledWord() OVERRIDE;
virtual int GetMisspellingHash() OVERRIDE;
virtual bool GetDictionarySuggestions(
std::vector<CefString>& suggestions) OVERRIDE;
virtual bool IsEditable() OVERRIDE;
virtual bool IsSpellCheckEnabled() OVERRIDE;
virtual EditStateFlags GetEditStateFlags() OVERRIDE;
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_CONTEXT_MENU_PARAMS_CTOCPP_H_

View File

@@ -0,0 +1,199 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/completion_callback_cpptoc.h"
#include "libcef_dll/cpptoc/cookie_visitor_cpptoc.h"
#include "libcef_dll/ctocpp/cookie_manager_ctocpp.h"
#include "libcef_dll/transfer_util.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, bool persist_session_cookies) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Unverified params: path
// Execute
cef_cookie_manager_t* _retval = cef_cookie_manager_create_manager(
path.GetStruct(),
persist_session_cookies);
// Return type: refptr_same
return CefCookieManagerCToCpp::Wrap(_retval);
}
// VIRTUAL METHODS - Body may be edited by hand.
void CefCookieManagerCToCpp::SetSupportedSchemes(
const std::vector<CefString>& schemes) {
if (CEF_MEMBER_MISSING(struct_, set_supported_schemes))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Translate param: schemes; type: string_vec_byref_const
cef_string_list_t schemesList = cef_string_list_alloc();
DCHECK(schemesList);
if (schemesList)
transfer_string_list_contents(schemes, schemesList);
// Execute
struct_->set_supported_schemes(struct_,
schemesList);
// Restore param:schemes; type: string_vec_byref_const
if (schemesList)
cef_string_list_free(schemesList);
}
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,
bool persist_session_cookies) {
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(),
persist_session_cookies);
// Return type: bool
return _retval?true:false;
}
bool CefCookieManagerCToCpp::FlushStore(
CefRefPtr<CefCompletionCallback> callback) {
if (CEF_MEMBER_MISSING(struct_, flush_store))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: callback; type: refptr_diff
DCHECK(callback.get());
if (!callback.get())
return false;
// Execute
int _retval = struct_->flush_store(struct_,
CefCompletionCallbackCppToC::Wrap(callback));
// Return type: bool
return _retval?true:false;
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefCookieManagerCToCpp,
CefCookieManager, cef_cookie_manager_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,53 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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 <vector>
#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) {}
// CefCookieManager methods
virtual void SetSupportedSchemes(
const std::vector<CefString>& schemes) OVERRIDE;
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,
bool persist_session_cookies) OVERRIDE;
virtual bool FlushStore(CefRefPtr<CefCompletionCallback> callback) OVERRIDE;
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_COOKIE_MANAGER_CTOCPP_H_

View File

@@ -0,0 +1,47 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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<> base::AtomicRefCount CefCToCpp<CefCookieVisitorCToCpp,
CefCookieVisitor, cef_cookie_visitor_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,42 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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) {}
// CefCookieVisitor methods
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_

117
libcef_dll/ctocpp/ctocpp.h Normal file
View File

@@ -0,0 +1,117 @@
// 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/base/cef_logging.h"
#include "include/base/cef_macros.h"
#include "include/cef_base.h"
#include "include/capi/cef_base_capi.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
base::AtomicRefCountInc(&DebugObjCt);
#endif
}
virtual ~CefCToCpp() {
#ifndef NDEBUG
base::AtomicRefCountDec(&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.
void AddRef() const {
UnderlyingAddRef();
ref_count_.AddRef();
}
bool Release() const {
UnderlyingRelease();
if (ref_count_.Release()) {
delete this;
return true;
}
return false;
}
bool HasOneRef() const { return ref_count_.HasOneRef(); }
// Increment/decrement reference counts on only the underlying class.
void UnderlyingAddRef() const {
if (struct_->base.add_ref)
struct_->base.add_ref(&struct_->base);
}
bool UnderlyingRelease() const {
if (!struct_->base.release)
return false;
return struct_->base.release(&struct_->base) ? true : false;
}
bool UnderlyingHasOneRef() const {
if (!struct_->base.has_one_ref)
return false;
return struct_->base.has_one_ref(&struct_->base) ? true : false;
}
#ifndef NDEBUG
// Simple tracking of allocated objects.
static base::AtomicRefCount DebugObjCt; // NOLINT(runtime/int)
#endif
protected:
StructName* struct_;
private:
CefRefCount ref_count_;
DISALLOW_COPY_AND_ASSIGN(CefCToCpp);
};
#endif // CEF_LIBCEF_DLL_CTOCPP_CTOCPP_H_

View File

@@ -0,0 +1,74 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/file_dialog_callback_cpptoc.h"
#include "libcef_dll/ctocpp/dialog_handler_ctocpp.h"
#include "libcef_dll/transfer_util.h"
// VIRTUAL METHODS - Body may be edited by hand.
bool CefDialogHandlerCToCpp::OnFileDialog(CefRefPtr<CefBrowser> browser,
FileDialogMode mode, const CefString& title,
const CefString& default_file_path,
const std::vector<CefString>& accept_filters, int selected_accept_filter,
CefRefPtr<CefFileDialogCallback> callback) {
if (CEF_MEMBER_MISSING(struct_, on_file_dialog))
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: selected_accept_filter; type: simple_byval
DCHECK_GE(selected_accept_filter, 0);
if (selected_accept_filter < 0)
return false;
// Verify param: callback; type: refptr_diff
DCHECK(callback.get());
if (!callback.get())
return false;
// Unverified params: title, default_file_path, accept_filters
// Translate param: accept_filters; type: string_vec_byref_const
cef_string_list_t accept_filtersList = cef_string_list_alloc();
DCHECK(accept_filtersList);
if (accept_filtersList)
transfer_string_list_contents(accept_filters, accept_filtersList);
// Execute
int _retval = struct_->on_file_dialog(struct_,
CefBrowserCppToC::Wrap(browser),
mode,
title.GetStruct(),
default_file_path.GetStruct(),
accept_filtersList,
selected_accept_filter,
CefFileDialogCallbackCppToC::Wrap(callback));
// Restore param:accept_filters; type: string_vec_byref_const
if (accept_filtersList)
cef_string_list_free(accept_filtersList);
// Return type: bool
return _retval?true:false;
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefDialogHandlerCToCpp,
CefDialogHandler, cef_dialog_handler_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,45 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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_DIALOG_HANDLER_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_DIALOG_HANDLER_CTOCPP_H_
#pragma once
#ifndef BUILDING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
#else // BUILDING_CEF_SHARED
#include <vector>
#include "include/cef_dialog_handler.h"
#include "include/capi/cef_dialog_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 CefDialogHandlerCToCpp
: public CefCToCpp<CefDialogHandlerCToCpp, CefDialogHandler,
cef_dialog_handler_t> {
public:
explicit CefDialogHandlerCToCpp(cef_dialog_handler_t* str)
: CefCToCpp<CefDialogHandlerCToCpp, CefDialogHandler,
cef_dialog_handler_t>(str) {}
// CefDialogHandler methods
bool OnFileDialog(CefRefPtr<CefBrowser> browser, FileDialogMode mode,
const CefString& title, const CefString& default_file_path,
const std::vector<CefString>& accept_filters, int selected_accept_filter,
CefRefPtr<CefFileDialogCallback> callback) override;
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_DIALOG_HANDLER_CTOCPP_H_

View File

@@ -0,0 +1,517 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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<> base::AtomicRefCount CefCToCpp<CefDictionaryValueCToCpp,
CefDictionaryValue, cef_dictionary_value_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,70 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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) {}
// 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_

View File

@@ -0,0 +1,166 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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"
#include "libcef_dll/transfer_util.h"
// VIRTUAL METHODS - Body may be edited by hand.
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());
}
void CefDisplayHandlerCToCpp::OnFaviconURLChange(CefRefPtr<CefBrowser> browser,
const std::vector<CefString>& icon_urls) {
if (CEF_MEMBER_MISSING(struct_, on_favicon_urlchange))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: browser; type: refptr_diff
DCHECK(browser.get());
if (!browser.get())
return;
// Unverified params: icon_urls
// Translate param: icon_urls; type: string_vec_byref_const
cef_string_list_t icon_urlsList = cef_string_list_alloc();
DCHECK(icon_urlsList);
if (icon_urlsList)
transfer_string_list_contents(icon_urls, icon_urlsList);
// Execute
struct_->on_favicon_urlchange(struct_,
CefBrowserCppToC::Wrap(browser),
icon_urlsList);
// Restore param:icon_urls; type: string_vec_byref_const
if (icon_urlsList)
cef_string_list_free(icon_urlsList);
}
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) {
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());
}
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<> base::AtomicRefCount CefCToCpp<CefDisplayHandlerCToCpp,
CefDisplayHandler, cef_display_handler_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,52 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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 <vector>
#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) {}
// CefDisplayHandler methods
void OnAddressChange(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame,
const CefString& url) override;
void OnTitleChange(CefRefPtr<CefBrowser> browser,
const CefString& title) override;
void OnFaviconURLChange(CefRefPtr<CefBrowser> browser,
const std::vector<CefString>& icon_urls) override;
bool OnTooltip(CefRefPtr<CefBrowser> browser, CefString& text) override;
void OnStatusMessage(CefRefPtr<CefBrowser> browser,
const CefString& value) override;
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_

View File

@@ -0,0 +1,229 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/domdocument_ctocpp.h"
#include "libcef_dll/ctocpp/domnode_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
CefDOMDocument::Type CefDOMDocumentCToCpp::GetType() {
if (CEF_MEMBER_MISSING(struct_, get_type))
return DOM_DOCUMENT_TYPE_UNKNOWN;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_dom_document_type_t _retval = struct_->get_type(struct_);
// Return type: simple
return _retval;
}
CefRefPtr<CefDOMNode> CefDOMDocumentCToCpp::GetDocument() {
if (CEF_MEMBER_MISSING(struct_, get_document))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_domnode_t* _retval = struct_->get_document(struct_);
// Return type: refptr_same
return CefDOMNodeCToCpp::Wrap(_retval);
}
CefRefPtr<CefDOMNode> CefDOMDocumentCToCpp::GetBody() {
if (CEF_MEMBER_MISSING(struct_, get_body))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_domnode_t* _retval = struct_->get_body(struct_);
// Return type: refptr_same
return CefDOMNodeCToCpp::Wrap(_retval);
}
CefRefPtr<CefDOMNode> CefDOMDocumentCToCpp::GetHead() {
if (CEF_MEMBER_MISSING(struct_, get_head))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_domnode_t* _retval = struct_->get_head(struct_);
// Return type: refptr_same
return CefDOMNodeCToCpp::Wrap(_retval);
}
CefString CefDOMDocumentCToCpp::GetTitle() {
if (CEF_MEMBER_MISSING(struct_, get_title))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_title(struct_);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
CefRefPtr<CefDOMNode> CefDOMDocumentCToCpp::GetElementById(
const CefString& id) {
if (CEF_MEMBER_MISSING(struct_, get_element_by_id))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: id; type: string_byref_const
DCHECK(!id.empty());
if (id.empty())
return NULL;
// Execute
cef_domnode_t* _retval = struct_->get_element_by_id(struct_,
id.GetStruct());
// Return type: refptr_same
return CefDOMNodeCToCpp::Wrap(_retval);
}
CefRefPtr<CefDOMNode> CefDOMDocumentCToCpp::GetFocusedNode() {
if (CEF_MEMBER_MISSING(struct_, get_focused_node))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_domnode_t* _retval = struct_->get_focused_node(struct_);
// Return type: refptr_same
return CefDOMNodeCToCpp::Wrap(_retval);
}
bool CefDOMDocumentCToCpp::HasSelection() {
if (CEF_MEMBER_MISSING(struct_, has_selection))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->has_selection(struct_);
// Return type: bool
return _retval?true:false;
}
int CefDOMDocumentCToCpp::GetSelectionStartOffset() {
if (CEF_MEMBER_MISSING(struct_, get_selection_start_offset))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->get_selection_start_offset(struct_);
// Return type: simple
return _retval;
}
int CefDOMDocumentCToCpp::GetSelectionEndOffset() {
if (CEF_MEMBER_MISSING(struct_, get_selection_end_offset))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->get_selection_end_offset(struct_);
// Return type: simple
return _retval;
}
CefString CefDOMDocumentCToCpp::GetSelectionAsMarkup() {
if (CEF_MEMBER_MISSING(struct_, get_selection_as_markup))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_selection_as_markup(struct_);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
CefString CefDOMDocumentCToCpp::GetSelectionAsText() {
if (CEF_MEMBER_MISSING(struct_, get_selection_as_text))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_selection_as_text(struct_);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
CefString CefDOMDocumentCToCpp::GetBaseURL() {
if (CEF_MEMBER_MISSING(struct_, get_base_url))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_base_url(struct_);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
CefString CefDOMDocumentCToCpp::GetCompleteURL(const CefString& partialURL) {
if (CEF_MEMBER_MISSING(struct_, get_complete_url))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: partialURL; type: string_byref_const
DCHECK(!partialURL.empty());
if (partialURL.empty())
return CefString();
// Execute
cef_string_userfree_t _retval = struct_->get_complete_url(struct_,
partialURL.GetStruct());
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefDOMDocumentCToCpp, CefDOMDocument,
cef_domdocument_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,54 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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_DOMDOCUMENT_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_DOMDOCUMENT_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_dom.h"
#include "include/capi/cef_dom_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 CefDOMDocumentCToCpp
: public CefCToCpp<CefDOMDocumentCToCpp, CefDOMDocument,
cef_domdocument_t> {
public:
explicit CefDOMDocumentCToCpp(cef_domdocument_t* str)
: CefCToCpp<CefDOMDocumentCToCpp, CefDOMDocument, cef_domdocument_t>(
str) {}
// CefDOMDocument methods
virtual Type GetType() OVERRIDE;
virtual CefRefPtr<CefDOMNode> GetDocument() OVERRIDE;
virtual CefRefPtr<CefDOMNode> GetBody() OVERRIDE;
virtual CefRefPtr<CefDOMNode> GetHead() OVERRIDE;
virtual CefString GetTitle() OVERRIDE;
virtual CefRefPtr<CefDOMNode> GetElementById(const CefString& id) OVERRIDE;
virtual CefRefPtr<CefDOMNode> GetFocusedNode() OVERRIDE;
virtual bool HasSelection() OVERRIDE;
virtual int GetSelectionStartOffset() OVERRIDE;
virtual int GetSelectionEndOffset() OVERRIDE;
virtual CefString GetSelectionAsMarkup() OVERRIDE;
virtual CefString GetSelectionAsText() OVERRIDE;
virtual CefString GetBaseURL() OVERRIDE;
virtual CefString GetCompleteURL(const CefString& partialURL) OVERRIDE;
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_DOMDOCUMENT_CTOCPP_H_

View File

@@ -0,0 +1,412 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/domdocument_ctocpp.h"
#include "libcef_dll/ctocpp/domnode_ctocpp.h"
#include "libcef_dll/transfer_util.h"
// VIRTUAL METHODS - Body may be edited by hand.
CefDOMNode::Type CefDOMNodeCToCpp::GetType() {
if (CEF_MEMBER_MISSING(struct_, get_type))
return DOM_NODE_TYPE_UNSUPPORTED;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_dom_node_type_t _retval = struct_->get_type(struct_);
// Return type: simple
return _retval;
}
bool CefDOMNodeCToCpp::IsText() {
if (CEF_MEMBER_MISSING(struct_, is_text))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->is_text(struct_);
// Return type: bool
return _retval?true:false;
}
bool CefDOMNodeCToCpp::IsElement() {
if (CEF_MEMBER_MISSING(struct_, is_element))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->is_element(struct_);
// Return type: bool
return _retval?true:false;
}
bool CefDOMNodeCToCpp::IsEditable() {
if (CEF_MEMBER_MISSING(struct_, is_editable))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->is_editable(struct_);
// Return type: bool
return _retval?true:false;
}
bool CefDOMNodeCToCpp::IsFormControlElement() {
if (CEF_MEMBER_MISSING(struct_, is_form_control_element))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->is_form_control_element(struct_);
// Return type: bool
return _retval?true:false;
}
CefString CefDOMNodeCToCpp::GetFormControlElementType() {
if (CEF_MEMBER_MISSING(struct_, get_form_control_element_type))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_form_control_element_type(
struct_);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
bool CefDOMNodeCToCpp::IsSame(CefRefPtr<CefDOMNode> 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_,
CefDOMNodeCToCpp::Unwrap(that));
// Return type: bool
return _retval?true:false;
}
CefString CefDOMNodeCToCpp::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;
}
CefString CefDOMNodeCToCpp::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 CefDOMNodeCToCpp::SetValue(const CefString& value) {
if (CEF_MEMBER_MISSING(struct_, set_value))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: value; type: string_byref_const
DCHECK(!value.empty());
if (value.empty())
return false;
// Execute
int _retval = struct_->set_value(struct_,
value.GetStruct());
// Return type: bool
return _retval?true:false;
}
CefString CefDOMNodeCToCpp::GetAsMarkup() {
if (CEF_MEMBER_MISSING(struct_, get_as_markup))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_as_markup(struct_);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
CefRefPtr<CefDOMDocument> CefDOMNodeCToCpp::GetDocument() {
if (CEF_MEMBER_MISSING(struct_, get_document))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_domdocument_t* _retval = struct_->get_document(struct_);
// Return type: refptr_same
return CefDOMDocumentCToCpp::Wrap(_retval);
}
CefRefPtr<CefDOMNode> CefDOMNodeCToCpp::GetParent() {
if (CEF_MEMBER_MISSING(struct_, get_parent))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_domnode_t* _retval = struct_->get_parent(struct_);
// Return type: refptr_same
return CefDOMNodeCToCpp::Wrap(_retval);
}
CefRefPtr<CefDOMNode> CefDOMNodeCToCpp::GetPreviousSibling() {
if (CEF_MEMBER_MISSING(struct_, get_previous_sibling))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_domnode_t* _retval = struct_->get_previous_sibling(struct_);
// Return type: refptr_same
return CefDOMNodeCToCpp::Wrap(_retval);
}
CefRefPtr<CefDOMNode> CefDOMNodeCToCpp::GetNextSibling() {
if (CEF_MEMBER_MISSING(struct_, get_next_sibling))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_domnode_t* _retval = struct_->get_next_sibling(struct_);
// Return type: refptr_same
return CefDOMNodeCToCpp::Wrap(_retval);
}
bool CefDOMNodeCToCpp::HasChildren() {
if (CEF_MEMBER_MISSING(struct_, has_children))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->has_children(struct_);
// Return type: bool
return _retval?true:false;
}
CefRefPtr<CefDOMNode> CefDOMNodeCToCpp::GetFirstChild() {
if (CEF_MEMBER_MISSING(struct_, get_first_child))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_domnode_t* _retval = struct_->get_first_child(struct_);
// Return type: refptr_same
return CefDOMNodeCToCpp::Wrap(_retval);
}
CefRefPtr<CefDOMNode> CefDOMNodeCToCpp::GetLastChild() {
if (CEF_MEMBER_MISSING(struct_, get_last_child))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_domnode_t* _retval = struct_->get_last_child(struct_);
// Return type: refptr_same
return CefDOMNodeCToCpp::Wrap(_retval);
}
CefString CefDOMNodeCToCpp::GetElementTagName() {
if (CEF_MEMBER_MISSING(struct_, get_element_tag_name))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_element_tag_name(struct_);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
bool CefDOMNodeCToCpp::HasElementAttributes() {
if (CEF_MEMBER_MISSING(struct_, has_element_attributes))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->has_element_attributes(struct_);
// Return type: bool
return _retval?true:false;
}
bool CefDOMNodeCToCpp::HasElementAttribute(const CefString& attrName) {
if (CEF_MEMBER_MISSING(struct_, has_element_attribute))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: attrName; type: string_byref_const
DCHECK(!attrName.empty());
if (attrName.empty())
return false;
// Execute
int _retval = struct_->has_element_attribute(struct_,
attrName.GetStruct());
// Return type: bool
return _retval?true:false;
}
CefString CefDOMNodeCToCpp::GetElementAttribute(const CefString& attrName) {
if (CEF_MEMBER_MISSING(struct_, get_element_attribute))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: attrName; type: string_byref_const
DCHECK(!attrName.empty());
if (attrName.empty())
return CefString();
// Execute
cef_string_userfree_t _retval = struct_->get_element_attribute(struct_,
attrName.GetStruct());
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
void CefDOMNodeCToCpp::GetElementAttributes(AttributeMap& attrMap) {
if (CEF_MEMBER_MISSING(struct_, get_element_attributes))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Translate param: attrMap; type: string_map_single_byref
cef_string_map_t attrMapMap = cef_string_map_alloc();
DCHECK(attrMapMap);
if (attrMapMap)
transfer_string_map_contents(attrMap, attrMapMap);
// Execute
struct_->get_element_attributes(struct_,
attrMapMap);
// Restore param:attrMap; type: string_map_single_byref
if (attrMapMap) {
attrMap.clear();
transfer_string_map_contents(attrMapMap, attrMap);
cef_string_map_free(attrMapMap);
}
}
bool CefDOMNodeCToCpp::SetElementAttribute(const CefString& attrName,
const CefString& value) {
if (CEF_MEMBER_MISSING(struct_, set_element_attribute))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: attrName; type: string_byref_const
DCHECK(!attrName.empty());
if (attrName.empty())
return false;
// Verify param: value; type: string_byref_const
DCHECK(!value.empty());
if (value.empty())
return false;
// Execute
int _retval = struct_->set_element_attribute(struct_,
attrName.GetStruct(),
value.GetStruct());
// Return type: bool
return _retval?true:false;
}
CefString CefDOMNodeCToCpp::GetElementInnerText() {
if (CEF_MEMBER_MISSING(struct_, get_element_inner_text))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_element_inner_text(struct_);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefDOMNodeCToCpp, CefDOMNode,
cef_domnode_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,64 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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_DOMNODE_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_DOMNODE_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_dom.h"
#include "include/capi/cef_dom_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 CefDOMNodeCToCpp
: public CefCToCpp<CefDOMNodeCToCpp, CefDOMNode, cef_domnode_t> {
public:
explicit CefDOMNodeCToCpp(cef_domnode_t* str)
: CefCToCpp<CefDOMNodeCToCpp, CefDOMNode, cef_domnode_t>(str) {}
// CefDOMNode methods
virtual Type GetType() OVERRIDE;
virtual bool IsText() OVERRIDE;
virtual bool IsElement() OVERRIDE;
virtual bool IsEditable() OVERRIDE;
virtual bool IsFormControlElement() OVERRIDE;
virtual CefString GetFormControlElementType() OVERRIDE;
virtual bool IsSame(CefRefPtr<CefDOMNode> that) OVERRIDE;
virtual CefString GetName() OVERRIDE;
virtual CefString GetValue() OVERRIDE;
virtual bool SetValue(const CefString& value) OVERRIDE;
virtual CefString GetAsMarkup() OVERRIDE;
virtual CefRefPtr<CefDOMDocument> GetDocument() OVERRIDE;
virtual CefRefPtr<CefDOMNode> GetParent() OVERRIDE;
virtual CefRefPtr<CefDOMNode> GetPreviousSibling() OVERRIDE;
virtual CefRefPtr<CefDOMNode> GetNextSibling() OVERRIDE;
virtual bool HasChildren() OVERRIDE;
virtual CefRefPtr<CefDOMNode> GetFirstChild() OVERRIDE;
virtual CefRefPtr<CefDOMNode> GetLastChild() OVERRIDE;
virtual CefString GetElementTagName() OVERRIDE;
virtual bool HasElementAttributes() OVERRIDE;
virtual bool HasElementAttribute(const CefString& attrName) OVERRIDE;
virtual CefString GetElementAttribute(const CefString& attrName) OVERRIDE;
virtual void GetElementAttributes(AttributeMap& attrMap) OVERRIDE;
virtual bool SetElementAttribute(const CefString& attrName,
const CefString& value) OVERRIDE;
virtual CefString GetElementInnerText() OVERRIDE;
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_DOMNODE_CTOCPP_H_

View File

@@ -0,0 +1,40 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/domdocument_cpptoc.h"
#include "libcef_dll/ctocpp/domvisitor_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
void CefDOMVisitorCToCpp::Visit(CefRefPtr<CefDOMDocument> document) {
if (CEF_MEMBER_MISSING(struct_, visit))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: document; type: refptr_diff
DCHECK(document.get());
if (!document.get())
return;
// Execute
struct_->visit(struct_,
CefDOMDocumentCppToC::Wrap(document));
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefDOMVisitorCToCpp, CefDOMVisitor,
cef_domvisitor_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,39 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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_DOMVISITOR_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_DOMVISITOR_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_dom.h"
#include "include/capi/cef_dom_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 CefDOMVisitorCToCpp
: public CefCToCpp<CefDOMVisitorCToCpp, CefDOMVisitor, cef_domvisitor_t> {
public:
explicit CefDOMVisitorCToCpp(cef_domvisitor_t* str)
: CefCToCpp<CefDOMVisitorCToCpp, CefDOMVisitor, cef_domvisitor_t>(str) {}
// CefDOMVisitor methods
void Visit(CefRefPtr<CefDOMDocument> document) override;
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_DOMVISITOR_CTOCPP_H_

View File

@@ -0,0 +1,88 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/before_download_callback_cpptoc.h"
#include "libcef_dll/cpptoc/browser_cpptoc.h"
#include "libcef_dll/cpptoc/download_item_cpptoc.h"
#include "libcef_dll/cpptoc/download_item_callback_cpptoc.h"
#include "libcef_dll/ctocpp/download_handler_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
void CefDownloadHandlerCToCpp::OnBeforeDownload(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefDownloadItem> download_item, const CefString& suggested_name,
CefRefPtr<CefBeforeDownloadCallback> callback) {
if (CEF_MEMBER_MISSING(struct_, on_before_download))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: browser; type: refptr_diff
DCHECK(browser.get());
if (!browser.get())
return;
// Verify param: download_item; type: refptr_diff
DCHECK(download_item.get());
if (!download_item.get())
return;
// Verify param: suggested_name; type: string_byref_const
DCHECK(!suggested_name.empty());
if (suggested_name.empty())
return;
// Verify param: callback; type: refptr_diff
DCHECK(callback.get());
if (!callback.get())
return;
// Execute
struct_->on_before_download(struct_,
CefBrowserCppToC::Wrap(browser),
CefDownloadItemCppToC::Wrap(download_item),
suggested_name.GetStruct(),
CefBeforeDownloadCallbackCppToC::Wrap(callback));
}
void CefDownloadHandlerCToCpp::OnDownloadUpdated(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefDownloadItem> download_item,
CefRefPtr<CefDownloadItemCallback> callback) {
if (CEF_MEMBER_MISSING(struct_, on_download_updated))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: browser; type: refptr_diff
DCHECK(browser.get());
if (!browser.get())
return;
// Verify param: download_item; type: refptr_diff
DCHECK(download_item.get());
if (!download_item.get())
return;
// Verify param: callback; type: refptr_diff
DCHECK(callback.get());
if (!callback.get())
return;
// Execute
struct_->on_download_updated(struct_,
CefBrowserCppToC::Wrap(browser),
CefDownloadItemCppToC::Wrap(download_item),
CefDownloadItemCallbackCppToC::Wrap(callback));
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefDownloadHandlerCToCpp,
CefDownloadHandler, cef_download_handler_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,47 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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_DOWNLOAD_HANDLER_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_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_download_handler.h"
#include "include/capi/cef_download_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 CefDownloadHandlerCToCpp
: public CefCToCpp<CefDownloadHandlerCToCpp, CefDownloadHandler,
cef_download_handler_t> {
public:
explicit CefDownloadHandlerCToCpp(cef_download_handler_t* str)
: CefCToCpp<CefDownloadHandlerCToCpp, CefDownloadHandler,
cef_download_handler_t>(str) {}
// CefDownloadHandler methods
void OnBeforeDownload(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefDownloadItem> download_item,
const CefString& suggested_name,
CefRefPtr<CefBeforeDownloadCallback> callback) override;
void OnDownloadUpdated(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefDownloadItem> download_item,
CefRefPtr<CefDownloadItemCallback> callback) override;
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_HANDLER_CTOCPP_H_

View File

@@ -0,0 +1,53 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/download_item_callback_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
void CefDownloadItemCallbackCToCpp::Cancel() {
if (CEF_MEMBER_MISSING(struct_, cancel))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->cancel(struct_);
}
void CefDownloadItemCallbackCToCpp::Pause() {
if (CEF_MEMBER_MISSING(struct_, pause))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->pause(struct_);
}
void CefDownloadItemCallbackCToCpp::Resume() {
if (CEF_MEMBER_MISSING(struct_, resume))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->resume(struct_);
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefDownloadItemCallbackCToCpp,
CefDownloadItemCallback, cef_download_item_callback_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,43 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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_DOWNLOAD_ITEM_CALLBACK_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_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_download_handler.h"
#include "include/capi/cef_download_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 CefDownloadItemCallbackCToCpp
: public CefCToCpp<CefDownloadItemCallbackCToCpp, CefDownloadItemCallback,
cef_download_item_callback_t> {
public:
explicit CefDownloadItemCallbackCToCpp(cef_download_item_callback_t* str)
: CefCToCpp<CefDownloadItemCallbackCToCpp, CefDownloadItemCallback,
cef_download_item_callback_t>(str) {}
// CefDownloadItemCallback methods
virtual void Cancel() OVERRIDE;
virtual void Pause() OVERRIDE;
virtual void Resume() OVERRIDE;
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CALLBACK_CTOCPP_H_

View File

@@ -0,0 +1,256 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/download_item_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
bool CefDownloadItemCToCpp::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 CefDownloadItemCToCpp::IsInProgress() {
if (CEF_MEMBER_MISSING(struct_, is_in_progress))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->is_in_progress(struct_);
// Return type: bool
return _retval?true:false;
}
bool CefDownloadItemCToCpp::IsComplete() {
if (CEF_MEMBER_MISSING(struct_, is_complete))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->is_complete(struct_);
// Return type: bool
return _retval?true:false;
}
bool CefDownloadItemCToCpp::IsCanceled() {
if (CEF_MEMBER_MISSING(struct_, is_canceled))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->is_canceled(struct_);
// Return type: bool
return _retval?true:false;
}
int64 CefDownloadItemCToCpp::GetCurrentSpeed() {
if (CEF_MEMBER_MISSING(struct_, get_current_speed))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int64 _retval = struct_->get_current_speed(struct_);
// Return type: simple
return _retval;
}
int CefDownloadItemCToCpp::GetPercentComplete() {
if (CEF_MEMBER_MISSING(struct_, get_percent_complete))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->get_percent_complete(struct_);
// Return type: simple
return _retval;
}
int64 CefDownloadItemCToCpp::GetTotalBytes() {
if (CEF_MEMBER_MISSING(struct_, get_total_bytes))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int64 _retval = struct_->get_total_bytes(struct_);
// Return type: simple
return _retval;
}
int64 CefDownloadItemCToCpp::GetReceivedBytes() {
if (CEF_MEMBER_MISSING(struct_, get_received_bytes))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int64 _retval = struct_->get_received_bytes(struct_);
// Return type: simple
return _retval;
}
CefTime CefDownloadItemCToCpp::GetStartTime() {
if (CEF_MEMBER_MISSING(struct_, get_start_time))
return CefTime();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_time_t _retval = struct_->get_start_time(struct_);
// Return type: simple
return _retval;
}
CefTime CefDownloadItemCToCpp::GetEndTime() {
if (CEF_MEMBER_MISSING(struct_, get_end_time))
return CefTime();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_time_t _retval = struct_->get_end_time(struct_);
// Return type: simple
return _retval;
}
CefString CefDownloadItemCToCpp::GetFullPath() {
if (CEF_MEMBER_MISSING(struct_, get_full_path))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_full_path(struct_);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
uint32 CefDownloadItemCToCpp::GetId() {
if (CEF_MEMBER_MISSING(struct_, get_id))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
uint32 _retval = struct_->get_id(struct_);
// Return type: simple
return _retval;
}
CefString CefDownloadItemCToCpp::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;
}
CefString CefDownloadItemCToCpp::GetOriginalUrl() {
if (CEF_MEMBER_MISSING(struct_, get_original_url))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_original_url(struct_);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
CefString CefDownloadItemCToCpp::GetSuggestedFileName() {
if (CEF_MEMBER_MISSING(struct_, get_suggested_file_name))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_suggested_file_name(struct_);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
CefString CefDownloadItemCToCpp::GetContentDisposition() {
if (CEF_MEMBER_MISSING(struct_, get_content_disposition))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_content_disposition(struct_);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
CefString CefDownloadItemCToCpp::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;
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefDownloadItemCToCpp,
CefDownloadItem, cef_download_item_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,57 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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_DOWNLOAD_ITEM_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_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_download_item.h"
#include "include/capi/cef_download_item_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 CefDownloadItemCToCpp
: public CefCToCpp<CefDownloadItemCToCpp, CefDownloadItem,
cef_download_item_t> {
public:
explicit CefDownloadItemCToCpp(cef_download_item_t* str)
: CefCToCpp<CefDownloadItemCToCpp, CefDownloadItem, cef_download_item_t>(
str) {}
// CefDownloadItem methods
virtual bool IsValid() OVERRIDE;
virtual bool IsInProgress() OVERRIDE;
virtual bool IsComplete() OVERRIDE;
virtual bool IsCanceled() OVERRIDE;
virtual int64 GetCurrentSpeed() OVERRIDE;
virtual int GetPercentComplete() OVERRIDE;
virtual int64 GetTotalBytes() OVERRIDE;
virtual int64 GetReceivedBytes() OVERRIDE;
virtual CefTime GetStartTime() OVERRIDE;
virtual CefTime GetEndTime() OVERRIDE;
virtual CefString GetFullPath() OVERRIDE;
virtual uint32 GetId() OVERRIDE;
virtual CefString GetURL() OVERRIDE;
virtual CefString GetOriginalUrl() OVERRIDE;
virtual CefString GetSuggestedFileName() OVERRIDE;
virtual CefString GetContentDisposition() OVERRIDE;
virtual CefString GetMimeType() OVERRIDE;
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CTOCPP_H_

View File

@@ -0,0 +1,358 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/drag_data_ctocpp.h"
#include "libcef_dll/ctocpp/stream_writer_ctocpp.h"
#include "libcef_dll/transfer_util.h"
// STATIC METHODS - Body may be edited by hand.
CefRefPtr<CefDragData> CefDragData::Create() {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_drag_data_t* _retval = cef_drag_data_create();
// Return type: refptr_same
return CefDragDataCToCpp::Wrap(_retval);
}
// VIRTUAL METHODS - Body may be edited by hand.
CefRefPtr<CefDragData> CefDragDataCToCpp::Clone() {
if (CEF_MEMBER_MISSING(struct_, clone))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_drag_data_t* _retval = struct_->clone(struct_);
// Return type: refptr_same
return CefDragDataCToCpp::Wrap(_retval);
}
bool CefDragDataCToCpp::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;
}
bool CefDragDataCToCpp::IsLink() {
if (CEF_MEMBER_MISSING(struct_, is_link))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->is_link(struct_);
// Return type: bool
return _retval?true:false;
}
bool CefDragDataCToCpp::IsFragment() {
if (CEF_MEMBER_MISSING(struct_, is_fragment))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->is_fragment(struct_);
// Return type: bool
return _retval?true:false;
}
bool CefDragDataCToCpp::IsFile() {
if (CEF_MEMBER_MISSING(struct_, is_file))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->is_file(struct_);
// Return type: bool
return _retval?true:false;
}
CefString CefDragDataCToCpp::GetLinkURL() {
if (CEF_MEMBER_MISSING(struct_, get_link_url))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_link_url(struct_);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
CefString CefDragDataCToCpp::GetLinkTitle() {
if (CEF_MEMBER_MISSING(struct_, get_link_title))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_link_title(struct_);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
CefString CefDragDataCToCpp::GetLinkMetadata() {
if (CEF_MEMBER_MISSING(struct_, get_link_metadata))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_link_metadata(struct_);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
CefString CefDragDataCToCpp::GetFragmentText() {
if (CEF_MEMBER_MISSING(struct_, get_fragment_text))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_fragment_text(struct_);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
CefString CefDragDataCToCpp::GetFragmentHtml() {
if (CEF_MEMBER_MISSING(struct_, get_fragment_html))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_fragment_html(struct_);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
CefString CefDragDataCToCpp::GetFragmentBaseURL() {
if (CEF_MEMBER_MISSING(struct_, get_fragment_base_url))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_fragment_base_url(struct_);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
CefString CefDragDataCToCpp::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;
}
size_t CefDragDataCToCpp::GetFileContents(CefRefPtr<CefStreamWriter> writer) {
if (CEF_MEMBER_MISSING(struct_, get_file_contents))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Unverified params: writer
// Execute
size_t _retval = struct_->get_file_contents(struct_,
CefStreamWriterCToCpp::Unwrap(writer));
// Return type: simple
return _retval;
}
bool CefDragDataCToCpp::GetFileNames(std::vector<CefString>& names) {
if (CEF_MEMBER_MISSING(struct_, get_file_names))
return false;
// 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
int _retval = struct_->get_file_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);
}
// Return type: bool
return _retval?true:false;
}
void CefDragDataCToCpp::SetLinkURL(const CefString& url) {
if (CEF_MEMBER_MISSING(struct_, set_link_url))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Unverified params: url
// Execute
struct_->set_link_url(struct_,
url.GetStruct());
}
void CefDragDataCToCpp::SetLinkTitle(const CefString& title) {
if (CEF_MEMBER_MISSING(struct_, set_link_title))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Unverified params: title
// Execute
struct_->set_link_title(struct_,
title.GetStruct());
}
void CefDragDataCToCpp::SetLinkMetadata(const CefString& data) {
if (CEF_MEMBER_MISSING(struct_, set_link_metadata))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Unverified params: data
// Execute
struct_->set_link_metadata(struct_,
data.GetStruct());
}
void CefDragDataCToCpp::SetFragmentText(const CefString& text) {
if (CEF_MEMBER_MISSING(struct_, set_fragment_text))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Unverified params: text
// Execute
struct_->set_fragment_text(struct_,
text.GetStruct());
}
void CefDragDataCToCpp::SetFragmentHtml(const CefString& html) {
if (CEF_MEMBER_MISSING(struct_, set_fragment_html))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Unverified params: html
// Execute
struct_->set_fragment_html(struct_,
html.GetStruct());
}
void CefDragDataCToCpp::SetFragmentBaseURL(const CefString& base_url) {
if (CEF_MEMBER_MISSING(struct_, set_fragment_base_url))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Unverified params: base_url
// Execute
struct_->set_fragment_base_url(struct_,
base_url.GetStruct());
}
void CefDragDataCToCpp::ResetFileContents() {
if (CEF_MEMBER_MISSING(struct_, reset_file_contents))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->reset_file_contents(struct_);
}
void CefDragDataCToCpp::AddFile(const CefString& path,
const CefString& display_name) {
if (CEF_MEMBER_MISSING(struct_, add_file))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: path; type: string_byref_const
DCHECK(!path.empty());
if (path.empty())
return;
// Unverified params: display_name
// Execute
struct_->add_file(struct_,
path.GetStruct(),
display_name.GetStruct());
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefDragDataCToCpp, CefDragData,
cef_drag_data_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,62 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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_DRAG_DATA_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_DRAG_DATA_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_drag_data.h"
#include "include/capi/cef_drag_data_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 CefDragDataCToCpp
: public CefCToCpp<CefDragDataCToCpp, CefDragData, cef_drag_data_t> {
public:
explicit CefDragDataCToCpp(cef_drag_data_t* str)
: CefCToCpp<CefDragDataCToCpp, CefDragData, cef_drag_data_t>(str) {}
// CefDragData methods
virtual CefRefPtr<CefDragData> Clone() OVERRIDE;
virtual bool IsReadOnly() OVERRIDE;
virtual bool IsLink() OVERRIDE;
virtual bool IsFragment() OVERRIDE;
virtual bool IsFile() OVERRIDE;
virtual CefString GetLinkURL() OVERRIDE;
virtual CefString GetLinkTitle() OVERRIDE;
virtual CefString GetLinkMetadata() OVERRIDE;
virtual CefString GetFragmentText() OVERRIDE;
virtual CefString GetFragmentHtml() OVERRIDE;
virtual CefString GetFragmentBaseURL() OVERRIDE;
virtual CefString GetFileName() OVERRIDE;
virtual size_t GetFileContents(CefRefPtr<CefStreamWriter> writer) OVERRIDE;
virtual bool GetFileNames(std::vector<CefString>& names) OVERRIDE;
virtual void SetLinkURL(const CefString& url) OVERRIDE;
virtual void SetLinkTitle(const CefString& title) OVERRIDE;
virtual void SetLinkMetadata(const CefString& data) OVERRIDE;
virtual void SetFragmentText(const CefString& text) OVERRIDE;
virtual void SetFragmentHtml(const CefString& html) OVERRIDE;
virtual void SetFragmentBaseURL(const CefString& base_url) OVERRIDE;
virtual void ResetFileContents() OVERRIDE;
virtual void AddFile(const CefString& path,
const CefString& display_name) OVERRIDE;
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_DRAG_DATA_CTOCPP_H_

View File

@@ -0,0 +1,51 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/drag_data_cpptoc.h"
#include "libcef_dll/ctocpp/drag_handler_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
bool CefDragHandlerCToCpp::OnDragEnter(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefDragData> dragData, DragOperationsMask mask) {
if (CEF_MEMBER_MISSING(struct_, on_drag_enter))
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: dragData; type: refptr_diff
DCHECK(dragData.get());
if (!dragData.get())
return false;
// Execute
int _retval = struct_->on_drag_enter(struct_,
CefBrowserCppToC::Wrap(browser),
CefDragDataCppToC::Wrap(dragData),
mask);
// Return type: bool
return _retval?true:false;
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefDragHandlerCToCpp, CefDragHandler,
cef_drag_handler_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,42 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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_DRAG_HANDLER_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_DRAG_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_drag_handler.h"
#include "include/capi/cef_drag_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 CefDragHandlerCToCpp
: public CefCToCpp<CefDragHandlerCToCpp, CefDragHandler,
cef_drag_handler_t> {
public:
explicit CefDragHandlerCToCpp(cef_drag_handler_t* str)
: CefCToCpp<CefDragHandlerCToCpp, CefDragHandler, cef_drag_handler_t>(
str) {}
// CefDragHandler methods
bool OnDragEnter(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefDragData> dragData, DragOperationsMask mask) override;
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_DRAG_HANDLER_CTOCPP_H_

View File

@@ -0,0 +1,40 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/end_tracing_callback_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
void CefEndTracingCallbackCToCpp::OnEndTracingComplete(
const CefString& tracing_file) {
if (CEF_MEMBER_MISSING(struct_, on_end_tracing_complete))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: tracing_file; type: string_byref_const
DCHECK(!tracing_file.empty());
if (tracing_file.empty())
return;
// Execute
struct_->on_end_tracing_complete(struct_,
tracing_file.GetStruct());
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefEndTracingCallbackCToCpp,
CefEndTracingCallback, cef_end_tracing_callback_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,41 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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_END_TRACING_CALLBACK_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_END_TRACING_CALLBACK_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_trace.h"
#include "include/capi/cef_trace_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 CefEndTracingCallbackCToCpp
: public CefCToCpp<CefEndTracingCallbackCToCpp, CefEndTracingCallback,
cef_end_tracing_callback_t> {
public:
explicit CefEndTracingCallbackCToCpp(cef_end_tracing_callback_t* str)
: CefCToCpp<CefEndTracingCallbackCToCpp, CefEndTracingCallback,
cef_end_tracing_callback_t>(str) {}
// CefEndTracingCallback methods
void OnEndTracingComplete(const CefString& tracing_file) override;
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_END_TRACING_CALLBACK_CTOCPP_H_

View File

@@ -0,0 +1,63 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/file_dialog_callback_ctocpp.h"
#include "libcef_dll/transfer_util.h"
// VIRTUAL METHODS - Body may be edited by hand.
void CefFileDialogCallbackCToCpp::Continue(int selected_accept_filter,
const std::vector<CefString>& file_paths) {
if (CEF_MEMBER_MISSING(struct_, cont))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: selected_accept_filter; type: simple_byval
DCHECK_GE(selected_accept_filter, 0);
if (selected_accept_filter < 0)
return;
// Unverified params: file_paths
// Translate param: file_paths; type: string_vec_byref_const
cef_string_list_t file_pathsList = cef_string_list_alloc();
DCHECK(file_pathsList);
if (file_pathsList)
transfer_string_list_contents(file_paths, file_pathsList);
// Execute
struct_->cont(struct_,
selected_accept_filter,
file_pathsList);
// Restore param:file_paths; type: string_vec_byref_const
if (file_pathsList)
cef_string_list_free(file_pathsList);
}
void CefFileDialogCallbackCToCpp::Cancel() {
if (CEF_MEMBER_MISSING(struct_, cancel))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->cancel(struct_);
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefFileDialogCallbackCToCpp,
CefFileDialogCallback, cef_file_dialog_callback_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,44 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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_FILE_DIALOG_CALLBACK_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_FILE_DIALOG_CALLBACK_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_dialog_handler.h"
#include "include/capi/cef_dialog_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 CefFileDialogCallbackCToCpp
: public CefCToCpp<CefFileDialogCallbackCToCpp, CefFileDialogCallback,
cef_file_dialog_callback_t> {
public:
explicit CefFileDialogCallbackCToCpp(cef_file_dialog_callback_t* str)
: CefCToCpp<CefFileDialogCallbackCToCpp, CefFileDialogCallback,
cef_file_dialog_callback_t>(str) {}
// CefFileDialogCallback methods
virtual void Continue(int selected_accept_filter,
const std::vector<CefString>& file_paths) OVERRIDE;
virtual void Cancel() OVERRIDE;
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_FILE_DIALOG_CALLBACK_CTOCPP_H_

View File

@@ -0,0 +1,47 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/find_handler_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
void CefFindHandlerCToCpp::OnFindResult(CefRefPtr<CefBrowser> browser,
int identifier, int count, const CefRect& selectionRect,
int activeMatchOrdinal, bool finalUpdate) {
if (CEF_MEMBER_MISSING(struct_, on_find_result))
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_find_result(struct_,
CefBrowserCppToC::Wrap(browser),
identifier,
count,
&selectionRect,
activeMatchOrdinal,
finalUpdate);
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefFindHandlerCToCpp, CefFindHandler,
cef_find_handler_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,43 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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_FIND_HANDLER_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_FIND_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_find_handler.h"
#include "include/capi/cef_find_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 CefFindHandlerCToCpp
: public CefCToCpp<CefFindHandlerCToCpp, CefFindHandler,
cef_find_handler_t> {
public:
explicit CefFindHandlerCToCpp(cef_find_handler_t* str)
: CefCToCpp<CefFindHandlerCToCpp, CefFindHandler, cef_find_handler_t>(
str) {}
// CefFindHandler methods
void OnFindResult(CefRefPtr<CefBrowser> browser, int identifier, int count,
const CefRect& selectionRect, int activeMatchOrdinal,
bool finalUpdate) override;
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_FIND_HANDLER_CTOCPP_H_

View File

@@ -0,0 +1,79 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/focus_handler_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
void CefFocusHandlerCToCpp::OnTakeFocus(CefRefPtr<CefBrowser> browser,
bool next) {
if (CEF_MEMBER_MISSING(struct_, on_take_focus))
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_take_focus(struct_,
CefBrowserCppToC::Wrap(browser),
next);
}
bool CefFocusHandlerCToCpp::OnSetFocus(CefRefPtr<CefBrowser> browser,
FocusSource source) {
if (CEF_MEMBER_MISSING(struct_, on_set_focus))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: browser; type: refptr_diff
DCHECK(browser.get());
if (!browser.get())
return false;
// Execute
int _retval = struct_->on_set_focus(struct_,
CefBrowserCppToC::Wrap(browser),
source);
// Return type: bool
return _retval?true:false;
}
void CefFocusHandlerCToCpp::OnGotFocus(CefRefPtr<CefBrowser> browser) {
if (CEF_MEMBER_MISSING(struct_, on_got_focus))
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_got_focus(struct_,
CefBrowserCppToC::Wrap(browser));
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefFocusHandlerCToCpp,
CefFocusHandler, cef_focus_handler_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,43 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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_FOCUS_HANDLER_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_FOCUS_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_focus_handler.h"
#include "include/capi/cef_focus_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 CefFocusHandlerCToCpp
: public CefCToCpp<CefFocusHandlerCToCpp, CefFocusHandler,
cef_focus_handler_t> {
public:
explicit CefFocusHandlerCToCpp(cef_focus_handler_t* str)
: CefCToCpp<CefFocusHandlerCToCpp, CefFocusHandler, cef_focus_handler_t>(
str) {}
// CefFocusHandler methods
void OnTakeFocus(CefRefPtr<CefBrowser> browser, bool next) override;
bool OnSetFocus(CefRefPtr<CefBrowser> browser, FocusSource source) override;
void OnGotFocus(CefRefPtr<CefBrowser> browser) override;
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_FOCUS_HANDLER_CTOCPP_H_

View File

@@ -0,0 +1,351 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/domvisitor_cpptoc.h"
#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& code,
const CefString& script_url, int start_line) {
if (CEF_MEMBER_MISSING(struct_, execute_java_script))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: code; type: string_byref_const
DCHECK(!code.empty());
if (code.empty())
return;
// Unverified params: script_url
// Execute
struct_->execute_java_script(struct_,
code.GetStruct(),
script_url.GetStruct(),
start_line);
}
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);
}
void CefFrameCToCpp::VisitDOM(CefRefPtr<CefDOMVisitor> visitor) {
if (CEF_MEMBER_MISSING(struct_, visit_dom))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: visitor; type: refptr_diff
DCHECK(visitor.get());
if (!visitor.get())
return;
// Execute
struct_->visit_dom(struct_,
CefDOMVisitorCppToC::Wrap(visitor));
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefFrameCToCpp, CefFrame,
cef_frame_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,68 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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) {}
// 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& code,
const CefString& script_url, int start_line) 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;
virtual void VisitDOM(CefRefPtr<CefDOMVisitor> visitor) OVERRIDE;
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_FRAME_CTOCPP_H_

View File

@@ -0,0 +1,34 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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<> base::AtomicRefCount CefCToCpp<CefGeolocationCallbackCToCpp,
CefGeolocationCallback, cef_geolocation_callback_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,41 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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) {}
// CefGeolocationCallback methods
virtual void Continue(bool allow) OVERRIDE;
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_GEOLOCATION_CALLBACK_CTOCPP_H_

View File

@@ -0,0 +1,81 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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.
bool 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 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: requesting_url; type: string_byref_const
DCHECK(!requesting_url.empty());
if (requesting_url.empty())
return false;
// Verify param: callback; type: refptr_diff
DCHECK(callback.get());
if (!callback.get())
return false;
// Execute
int _retval = struct_->on_request_geolocation_permission(struct_,
CefBrowserCppToC::Wrap(browser),
requesting_url.GetStruct(),
request_id,
CefGeolocationCallbackCppToC::Wrap(callback));
// Return type: bool
return _retval?true:false;
}
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<> base::AtomicRefCount CefCToCpp<CefGeolocationHandlerCToCpp,
CefGeolocationHandler, cef_geolocation_handler_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,45 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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) {}
// CefGeolocationHandler methods
bool OnRequestGeolocationPermission(CefRefPtr<CefBrowser> browser,
const CefString& requesting_url, int request_id,
CefRefPtr<CefGeolocationCallback> callback) override;
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_

View File

@@ -0,0 +1,36 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/get_geolocation_callback_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
void CefGetGeolocationCallbackCToCpp::OnLocationUpdate(
const CefGeoposition& position) {
if (CEF_MEMBER_MISSING(struct_, on_location_update))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->on_location_update(struct_,
&position);
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefGetGeolocationCallbackCToCpp,
CefGetGeolocationCallback, cef_get_geolocation_callback_t>::DebugObjCt =
0;
#endif

View File

@@ -0,0 +1,41 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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_GET_GEOLOCATION_CALLBACK_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_GET_GEOLOCATION_CALLBACK_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.h"
#include "include/capi/cef_geolocation_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 CefGetGeolocationCallbackCToCpp
: public CefCToCpp<CefGetGeolocationCallbackCToCpp,
CefGetGeolocationCallback, cef_get_geolocation_callback_t> {
public:
explicit CefGetGeolocationCallbackCToCpp(cef_get_geolocation_callback_t* str)
: CefCToCpp<CefGetGeolocationCallbackCToCpp, CefGetGeolocationCallback,
cef_get_geolocation_callback_t>(str) {}
// CefGetGeolocationCallback methods
void OnLocationUpdate(const CefGeoposition& position) override;
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_GET_GEOLOCATION_CALLBACK_CTOCPP_H_

View File

@@ -0,0 +1,38 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/jsdialog_callback_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
void CefJSDialogCallbackCToCpp::Continue(bool success,
const CefString& user_input) {
if (CEF_MEMBER_MISSING(struct_, cont))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Unverified params: user_input
// Execute
struct_->cont(struct_,
success,
user_input.GetStruct());
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefJSDialogCallbackCToCpp,
CefJSDialogCallback, cef_jsdialog_callback_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,41 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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_JSDIALOG_CALLBACK_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_JSDIALOG_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_jsdialog_handler.h"
#include "include/capi/cef_jsdialog_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 CefJSDialogCallbackCToCpp
: public CefCToCpp<CefJSDialogCallbackCToCpp, CefJSDialogCallback,
cef_jsdialog_callback_t> {
public:
explicit CefJSDialogCallbackCToCpp(cef_jsdialog_callback_t* str)
: CefCToCpp<CefJSDialogCallbackCToCpp, CefJSDialogCallback,
cef_jsdialog_callback_t>(str) {}
// CefJSDialogCallback methods
virtual void Continue(bool success, const CefString& user_input) OVERRIDE;
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_JSDIALOG_CALLBACK_CTOCPP_H_

View File

@@ -0,0 +1,129 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/jsdialog_callback_cpptoc.h"
#include "libcef_dll/ctocpp/jsdialog_handler_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
bool CefJSDialogHandlerCToCpp::OnJSDialog(CefRefPtr<CefBrowser> browser,
const CefString& origin_url, const CefString& accept_lang,
JSDialogType dialog_type, const CefString& message_text,
const CefString& default_prompt_text,
CefRefPtr<CefJSDialogCallback> callback, bool& suppress_message) {
if (CEF_MEMBER_MISSING(struct_, on_jsdialog))
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: callback; type: refptr_diff
DCHECK(callback.get());
if (!callback.get())
return false;
// Unverified params: origin_url, accept_lang, message_text,
// default_prompt_text
// Translate param: suppress_message; type: bool_byref
int suppress_messageInt = suppress_message;
// Execute
int _retval = struct_->on_jsdialog(struct_,
CefBrowserCppToC::Wrap(browser),
origin_url.GetStruct(),
accept_lang.GetStruct(),
dialog_type,
message_text.GetStruct(),
default_prompt_text.GetStruct(),
CefJSDialogCallbackCppToC::Wrap(callback),
&suppress_messageInt);
// Restore param:suppress_message; type: bool_byref
suppress_message = suppress_messageInt?true:false;
// Return type: bool
return _retval?true:false;
}
bool CefJSDialogHandlerCToCpp::OnBeforeUnloadDialog(
CefRefPtr<CefBrowser> browser, const CefString& message_text,
bool is_reload, CefRefPtr<CefJSDialogCallback> callback) {
if (CEF_MEMBER_MISSING(struct_, on_before_unload_dialog))
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: callback; type: refptr_diff
DCHECK(callback.get());
if (!callback.get())
return false;
// Unverified params: message_text
// Execute
int _retval = struct_->on_before_unload_dialog(struct_,
CefBrowserCppToC::Wrap(browser),
message_text.GetStruct(),
is_reload,
CefJSDialogCallbackCppToC::Wrap(callback));
// Return type: bool
return _retval?true:false;
}
void CefJSDialogHandlerCToCpp::OnResetDialogState(
CefRefPtr<CefBrowser> browser) {
if (CEF_MEMBER_MISSING(struct_, on_reset_dialog_state))
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_reset_dialog_state(struct_,
CefBrowserCppToC::Wrap(browser));
}
void CefJSDialogHandlerCToCpp::OnDialogClosed(CefRefPtr<CefBrowser> browser) {
if (CEF_MEMBER_MISSING(struct_, on_dialog_closed))
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_dialog_closed(struct_,
CefBrowserCppToC::Wrap(browser));
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefJSDialogHandlerCToCpp,
CefJSDialogHandler, cef_jsdialog_handler_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,50 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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_JSDIALOG_HANDLER_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_JSDIALOG_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_jsdialog_handler.h"
#include "include/capi/cef_jsdialog_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 CefJSDialogHandlerCToCpp
: public CefCToCpp<CefJSDialogHandlerCToCpp, CefJSDialogHandler,
cef_jsdialog_handler_t> {
public:
explicit CefJSDialogHandlerCToCpp(cef_jsdialog_handler_t* str)
: CefCToCpp<CefJSDialogHandlerCToCpp, CefJSDialogHandler,
cef_jsdialog_handler_t>(str) {}
// CefJSDialogHandler methods
bool OnJSDialog(CefRefPtr<CefBrowser> browser, const CefString& origin_url,
const CefString& accept_lang, JSDialogType dialog_type,
const CefString& message_text, const CefString& default_prompt_text,
CefRefPtr<CefJSDialogCallback> callback,
bool& suppress_message) override;
bool OnBeforeUnloadDialog(CefRefPtr<CefBrowser> browser,
const CefString& message_text, bool is_reload,
CefRefPtr<CefJSDialogCallback> callback) override;
void OnResetDialogState(CefRefPtr<CefBrowser> browser) override;
void OnDialogClosed(CefRefPtr<CefBrowser> browser) override;
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_JSDIALOG_HANDLER_CTOCPP_H_

View File

@@ -0,0 +1,81 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/keyboard_handler_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
bool CefKeyboardHandlerCToCpp::OnPreKeyEvent(CefRefPtr<CefBrowser> browser,
const CefKeyEvent& event, CefEventHandle os_event,
bool* is_keyboard_shortcut) {
if (CEF_MEMBER_MISSING(struct_, on_pre_key_event))
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: is_keyboard_shortcut; type: bool_byaddr
DCHECK(is_keyboard_shortcut);
if (!is_keyboard_shortcut)
return false;
// Translate param: is_keyboard_shortcut; type: bool_byaddr
int is_keyboard_shortcutInt = is_keyboard_shortcut?*is_keyboard_shortcut:0;
// Execute
int _retval = struct_->on_pre_key_event(struct_,
CefBrowserCppToC::Wrap(browser),
&event,
os_event,
&is_keyboard_shortcutInt);
// Restore param:is_keyboard_shortcut; type: bool_byaddr
if (is_keyboard_shortcut)
*is_keyboard_shortcut = is_keyboard_shortcutInt?true:false;
// Return type: bool
return _retval?true:false;
}
bool CefKeyboardHandlerCToCpp::OnKeyEvent(CefRefPtr<CefBrowser> browser,
const CefKeyEvent& event, CefEventHandle os_event) {
if (CEF_MEMBER_MISSING(struct_, on_key_event))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: browser; type: refptr_diff
DCHECK(browser.get());
if (!browser.get())
return false;
// Execute
int _retval = struct_->on_key_event(struct_,
CefBrowserCppToC::Wrap(browser),
&event,
os_event);
// Return type: bool
return _retval?true:false;
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefKeyboardHandlerCToCpp,
CefKeyboardHandler, cef_keyboard_handler_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,44 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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_KEYBOARD_HANDLER_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_KEYBOARD_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_keyboard_handler.h"
#include "include/capi/cef_keyboard_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 CefKeyboardHandlerCToCpp
: public CefCToCpp<CefKeyboardHandlerCToCpp, CefKeyboardHandler,
cef_keyboard_handler_t> {
public:
explicit CefKeyboardHandlerCToCpp(cef_keyboard_handler_t* str)
: CefCToCpp<CefKeyboardHandlerCToCpp, CefKeyboardHandler,
cef_keyboard_handler_t>(str) {}
// CefKeyboardHandler methods
bool OnPreKeyEvent(CefRefPtr<CefBrowser> browser, const CefKeyEvent& event,
CefEventHandle os_event, bool* is_keyboard_shortcut) override;
bool OnKeyEvent(CefRefPtr<CefBrowser> browser, const CefKeyEvent& event,
CefEventHandle os_event) override;
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_KEYBOARD_HANDLER_CTOCPP_H_

View File

@@ -0,0 +1,156 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/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> browser,
CefRefPtr<CefFrame> frame, const CefString& target_url,
const CefString& target_frame_name, const CefPopupFeatures& popupFeatures,
CefWindowInfo& windowInfo, CefRefPtr<CefClient>& client,
CefBrowserSettings& settings, bool* no_javascript_access) {
if (CEF_MEMBER_MISSING(struct_, on_before_popup))
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: no_javascript_access; type: bool_byaddr
DCHECK(no_javascript_access);
if (!no_javascript_access)
return false;
// Unverified params: target_url, target_frame_name
// Translate param: client; type: refptr_same_byref
cef_client_t* clientStruct = NULL;
if (client.get())
clientStruct = CefClientCToCpp::Unwrap(client);
cef_client_t* clientOrig = clientStruct;
// Translate param: no_javascript_access; type: bool_byaddr
int no_javascript_accessInt = no_javascript_access?*no_javascript_access:0;
// Execute
int _retval = struct_->on_before_popup(struct_,
CefBrowserCppToC::Wrap(browser),
CefFrameCppToC::Wrap(frame),
target_url.GetStruct(),
target_frame_name.GetStruct(),
&popupFeatures,
&windowInfo,
&clientStruct,
&settings,
&no_javascript_accessInt);
// Restore param:client; type: refptr_same_byref
if (clientStruct) {
if (clientStruct != clientOrig) {
client = CefClientCToCpp::Wrap(clientStruct);
}
} else {
client = NULL;
}
// Restore param:no_javascript_access; type: bool_byaddr
if (no_javascript_access)
*no_javascript_access = no_javascript_accessInt?true:false;
// 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<> base::AtomicRefCount CefCToCpp<CefLifeSpanHandlerCToCpp,
CefLifeSpanHandler, cef_life_span_handler_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,51 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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) {}
// CefLifeSpanHandler methods
bool OnBeforePopup(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame,
const CefString& target_url, const CefString& target_frame_name,
const CefPopupFeatures& popupFeatures, CefWindowInfo& windowInfo,
CefRefPtr<CefClient>& client, CefBrowserSettings& settings,
bool* no_javascript_access) override;
void OnAfterCreated(CefRefPtr<CefBrowser> browser) override;
bool RunModal(CefRefPtr<CefBrowser> browser) override;
bool DoClose(CefRefPtr<CefBrowser> browser) override;
void OnBeforeClose(CefRefPtr<CefBrowser> browser) override;
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_LIFE_SPAN_HANDLER_CTOCPP_H_

View File

@@ -0,0 +1,476 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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<> base::AtomicRefCount CefCToCpp<CefListValueCToCpp, CefListValue,
cef_list_value_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,63 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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) {}
// 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_

View File

@@ -0,0 +1,121 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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::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 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<> base::AtomicRefCount CefCToCpp<CefLoadHandlerCToCpp, CefLoadHandler,
cef_load_handler_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,49 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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) {}
// CefLoadHandler methods
void OnLoadingStateChange(CefRefPtr<CefBrowser> browser, bool isLoading,
bool canGoBack, bool canGoForward) override;
void OnLoadStart(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame) override;
void OnLoadEnd(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame,
int httpStatusCode) override;
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_

View File

@@ -0,0 +1,839 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/menu_model_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
bool CefMenuModelCToCpp::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;
}
int CefMenuModelCToCpp::GetCount() {
if (CEF_MEMBER_MISSING(struct_, get_count))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->get_count(struct_);
// Return type: simple
return _retval;
}
bool CefMenuModelCToCpp::AddSeparator() {
if (CEF_MEMBER_MISSING(struct_, add_separator))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->add_separator(struct_);
// Return type: bool
return _retval?true:false;
}
bool CefMenuModelCToCpp::AddItem(int command_id, const CefString& label) {
if (CEF_MEMBER_MISSING(struct_, add_item))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: label; type: string_byref_const
DCHECK(!label.empty());
if (label.empty())
return false;
// Execute
int _retval = struct_->add_item(struct_,
command_id,
label.GetStruct());
// Return type: bool
return _retval?true:false;
}
bool CefMenuModelCToCpp::AddCheckItem(int command_id, const CefString& label) {
if (CEF_MEMBER_MISSING(struct_, add_check_item))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: label; type: string_byref_const
DCHECK(!label.empty());
if (label.empty())
return false;
// Execute
int _retval = struct_->add_check_item(struct_,
command_id,
label.GetStruct());
// Return type: bool
return _retval?true:false;
}
bool CefMenuModelCToCpp::AddRadioItem(int command_id, const CefString& label,
int group_id) {
if (CEF_MEMBER_MISSING(struct_, add_radio_item))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: label; type: string_byref_const
DCHECK(!label.empty());
if (label.empty())
return false;
// Execute
int _retval = struct_->add_radio_item(struct_,
command_id,
label.GetStruct(),
group_id);
// Return type: bool
return _retval?true:false;
}
CefRefPtr<CefMenuModel> CefMenuModelCToCpp::AddSubMenu(int command_id,
const CefString& label) {
if (CEF_MEMBER_MISSING(struct_, add_sub_menu))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: label; type: string_byref_const
DCHECK(!label.empty());
if (label.empty())
return NULL;
// Execute
cef_menu_model_t* _retval = struct_->add_sub_menu(struct_,
command_id,
label.GetStruct());
// Return type: refptr_same
return CefMenuModelCToCpp::Wrap(_retval);
}
bool CefMenuModelCToCpp::InsertSeparatorAt(int index) {
if (CEF_MEMBER_MISSING(struct_, insert_separator_at))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->insert_separator_at(struct_,
index);
// Return type: bool
return _retval?true:false;
}
bool CefMenuModelCToCpp::InsertItemAt(int index, int command_id,
const CefString& label) {
if (CEF_MEMBER_MISSING(struct_, insert_item_at))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: label; type: string_byref_const
DCHECK(!label.empty());
if (label.empty())
return false;
// Execute
int _retval = struct_->insert_item_at(struct_,
index,
command_id,
label.GetStruct());
// Return type: bool
return _retval?true:false;
}
bool CefMenuModelCToCpp::InsertCheckItemAt(int index, int command_id,
const CefString& label) {
if (CEF_MEMBER_MISSING(struct_, insert_check_item_at))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: label; type: string_byref_const
DCHECK(!label.empty());
if (label.empty())
return false;
// Execute
int _retval = struct_->insert_check_item_at(struct_,
index,
command_id,
label.GetStruct());
// Return type: bool
return _retval?true:false;
}
bool CefMenuModelCToCpp::InsertRadioItemAt(int index, int command_id,
const CefString& label, int group_id) {
if (CEF_MEMBER_MISSING(struct_, insert_radio_item_at))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: label; type: string_byref_const
DCHECK(!label.empty());
if (label.empty())
return false;
// Execute
int _retval = struct_->insert_radio_item_at(struct_,
index,
command_id,
label.GetStruct(),
group_id);
// Return type: bool
return _retval?true:false;
}
CefRefPtr<CefMenuModel> CefMenuModelCToCpp::InsertSubMenuAt(int index,
int command_id, const CefString& label) {
if (CEF_MEMBER_MISSING(struct_, insert_sub_menu_at))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: label; type: string_byref_const
DCHECK(!label.empty());
if (label.empty())
return NULL;
// Execute
cef_menu_model_t* _retval = struct_->insert_sub_menu_at(struct_,
index,
command_id,
label.GetStruct());
// Return type: refptr_same
return CefMenuModelCToCpp::Wrap(_retval);
}
bool CefMenuModelCToCpp::Remove(int command_id) {
if (CEF_MEMBER_MISSING(struct_, remove))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->remove(struct_,
command_id);
// Return type: bool
return _retval?true:false;
}
bool CefMenuModelCToCpp::RemoveAt(int index) {
if (CEF_MEMBER_MISSING(struct_, remove_at))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->remove_at(struct_,
index);
// Return type: bool
return _retval?true:false;
}
int CefMenuModelCToCpp::GetIndexOf(int command_id) {
if (CEF_MEMBER_MISSING(struct_, get_index_of))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->get_index_of(struct_,
command_id);
// Return type: simple
return _retval;
}
int CefMenuModelCToCpp::GetCommandIdAt(int index) {
if (CEF_MEMBER_MISSING(struct_, get_command_id_at))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->get_command_id_at(struct_,
index);
// Return type: simple
return _retval;
}
bool CefMenuModelCToCpp::SetCommandIdAt(int index, int command_id) {
if (CEF_MEMBER_MISSING(struct_, set_command_id_at))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->set_command_id_at(struct_,
index,
command_id);
// Return type: bool
return _retval?true:false;
}
CefString CefMenuModelCToCpp::GetLabel(int command_id) {
if (CEF_MEMBER_MISSING(struct_, get_label))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_label(struct_,
command_id);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
CefString CefMenuModelCToCpp::GetLabelAt(int index) {
if (CEF_MEMBER_MISSING(struct_, get_label_at))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_label_at(struct_,
index);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
bool CefMenuModelCToCpp::SetLabel(int command_id, const CefString& label) {
if (CEF_MEMBER_MISSING(struct_, set_label))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: label; type: string_byref_const
DCHECK(!label.empty());
if (label.empty())
return false;
// Execute
int _retval = struct_->set_label(struct_,
command_id,
label.GetStruct());
// Return type: bool
return _retval?true:false;
}
bool CefMenuModelCToCpp::SetLabelAt(int index, const CefString& label) {
if (CEF_MEMBER_MISSING(struct_, set_label_at))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: label; type: string_byref_const
DCHECK(!label.empty());
if (label.empty())
return false;
// Execute
int _retval = struct_->set_label_at(struct_,
index,
label.GetStruct());
// Return type: bool
return _retval?true:false;
}
CefMenuModel::MenuItemType CefMenuModelCToCpp::GetType(int command_id) {
if (CEF_MEMBER_MISSING(struct_, get_type))
return MENUITEMTYPE_NONE;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_menu_item_type_t _retval = struct_->get_type(struct_,
command_id);
// Return type: simple
return _retval;
}
CefMenuModel::MenuItemType CefMenuModelCToCpp::GetTypeAt(int index) {
if (CEF_MEMBER_MISSING(struct_, get_type_at))
return MENUITEMTYPE_NONE;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_menu_item_type_t _retval = struct_->get_type_at(struct_,
index);
// Return type: simple
return _retval;
}
int CefMenuModelCToCpp::GetGroupId(int command_id) {
if (CEF_MEMBER_MISSING(struct_, get_group_id))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->get_group_id(struct_,
command_id);
// Return type: simple
return _retval;
}
int CefMenuModelCToCpp::GetGroupIdAt(int index) {
if (CEF_MEMBER_MISSING(struct_, get_group_id_at))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->get_group_id_at(struct_,
index);
// Return type: simple
return _retval;
}
bool CefMenuModelCToCpp::SetGroupId(int command_id, int group_id) {
if (CEF_MEMBER_MISSING(struct_, set_group_id))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->set_group_id(struct_,
command_id,
group_id);
// Return type: bool
return _retval?true:false;
}
bool CefMenuModelCToCpp::SetGroupIdAt(int index, int group_id) {
if (CEF_MEMBER_MISSING(struct_, set_group_id_at))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->set_group_id_at(struct_,
index,
group_id);
// Return type: bool
return _retval?true:false;
}
CefRefPtr<CefMenuModel> CefMenuModelCToCpp::GetSubMenu(int command_id) {
if (CEF_MEMBER_MISSING(struct_, get_sub_menu))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_menu_model_t* _retval = struct_->get_sub_menu(struct_,
command_id);
// Return type: refptr_same
return CefMenuModelCToCpp::Wrap(_retval);
}
CefRefPtr<CefMenuModel> CefMenuModelCToCpp::GetSubMenuAt(int index) {
if (CEF_MEMBER_MISSING(struct_, get_sub_menu_at))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_menu_model_t* _retval = struct_->get_sub_menu_at(struct_,
index);
// Return type: refptr_same
return CefMenuModelCToCpp::Wrap(_retval);
}
bool CefMenuModelCToCpp::IsVisible(int command_id) {
if (CEF_MEMBER_MISSING(struct_, is_visible))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->is_visible(struct_,
command_id);
// Return type: bool
return _retval?true:false;
}
bool CefMenuModelCToCpp::IsVisibleAt(int index) {
if (CEF_MEMBER_MISSING(struct_, is_visible_at))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->is_visible_at(struct_,
index);
// Return type: bool
return _retval?true:false;
}
bool CefMenuModelCToCpp::SetVisible(int command_id, bool visible) {
if (CEF_MEMBER_MISSING(struct_, set_visible))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->set_visible(struct_,
command_id,
visible);
// Return type: bool
return _retval?true:false;
}
bool CefMenuModelCToCpp::SetVisibleAt(int index, bool visible) {
if (CEF_MEMBER_MISSING(struct_, set_visible_at))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->set_visible_at(struct_,
index,
visible);
// Return type: bool
return _retval?true:false;
}
bool CefMenuModelCToCpp::IsEnabled(int command_id) {
if (CEF_MEMBER_MISSING(struct_, is_enabled))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->is_enabled(struct_,
command_id);
// Return type: bool
return _retval?true:false;
}
bool CefMenuModelCToCpp::IsEnabledAt(int index) {
if (CEF_MEMBER_MISSING(struct_, is_enabled_at))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->is_enabled_at(struct_,
index);
// Return type: bool
return _retval?true:false;
}
bool CefMenuModelCToCpp::SetEnabled(int command_id, bool enabled) {
if (CEF_MEMBER_MISSING(struct_, set_enabled))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->set_enabled(struct_,
command_id,
enabled);
// Return type: bool
return _retval?true:false;
}
bool CefMenuModelCToCpp::SetEnabledAt(int index, bool enabled) {
if (CEF_MEMBER_MISSING(struct_, set_enabled_at))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->set_enabled_at(struct_,
index,
enabled);
// Return type: bool
return _retval?true:false;
}
bool CefMenuModelCToCpp::IsChecked(int command_id) {
if (CEF_MEMBER_MISSING(struct_, is_checked))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->is_checked(struct_,
command_id);
// Return type: bool
return _retval?true:false;
}
bool CefMenuModelCToCpp::IsCheckedAt(int index) {
if (CEF_MEMBER_MISSING(struct_, is_checked_at))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->is_checked_at(struct_,
index);
// Return type: bool
return _retval?true:false;
}
bool CefMenuModelCToCpp::SetChecked(int command_id, bool checked) {
if (CEF_MEMBER_MISSING(struct_, set_checked))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->set_checked(struct_,
command_id,
checked);
// Return type: bool
return _retval?true:false;
}
bool CefMenuModelCToCpp::SetCheckedAt(int index, bool checked) {
if (CEF_MEMBER_MISSING(struct_, set_checked_at))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->set_checked_at(struct_,
index,
checked);
// Return type: bool
return _retval?true:false;
}
bool CefMenuModelCToCpp::HasAccelerator(int command_id) {
if (CEF_MEMBER_MISSING(struct_, has_accelerator))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->has_accelerator(struct_,
command_id);
// Return type: bool
return _retval?true:false;
}
bool CefMenuModelCToCpp::HasAcceleratorAt(int index) {
if (CEF_MEMBER_MISSING(struct_, has_accelerator_at))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->has_accelerator_at(struct_,
index);
// Return type: bool
return _retval?true:false;
}
bool CefMenuModelCToCpp::SetAccelerator(int command_id, int key_code,
bool shift_pressed, bool ctrl_pressed, bool alt_pressed) {
if (CEF_MEMBER_MISSING(struct_, set_accelerator))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->set_accelerator(struct_,
command_id,
key_code,
shift_pressed,
ctrl_pressed,
alt_pressed);
// Return type: bool
return _retval?true:false;
}
bool CefMenuModelCToCpp::SetAcceleratorAt(int index, int key_code,
bool shift_pressed, bool ctrl_pressed, bool alt_pressed) {
if (CEF_MEMBER_MISSING(struct_, set_accelerator_at))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->set_accelerator_at(struct_,
index,
key_code,
shift_pressed,
ctrl_pressed,
alt_pressed);
// Return type: bool
return _retval?true:false;
}
bool CefMenuModelCToCpp::RemoveAccelerator(int command_id) {
if (CEF_MEMBER_MISSING(struct_, remove_accelerator))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->remove_accelerator(struct_,
command_id);
// Return type: bool
return _retval?true:false;
}
bool CefMenuModelCToCpp::RemoveAcceleratorAt(int index) {
if (CEF_MEMBER_MISSING(struct_, remove_accelerator_at))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->remove_accelerator_at(struct_,
index);
// Return type: bool
return _retval?true:false;
}
bool CefMenuModelCToCpp::GetAccelerator(int command_id, int& key_code,
bool& shift_pressed, bool& ctrl_pressed, bool& alt_pressed) {
if (CEF_MEMBER_MISSING(struct_, get_accelerator))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Translate param: shift_pressed; type: bool_byref
int shift_pressedInt = shift_pressed;
// Translate param: ctrl_pressed; type: bool_byref
int ctrl_pressedInt = ctrl_pressed;
// Translate param: alt_pressed; type: bool_byref
int alt_pressedInt = alt_pressed;
// Execute
int _retval = struct_->get_accelerator(struct_,
command_id,
&key_code,
&shift_pressedInt,
&ctrl_pressedInt,
&alt_pressedInt);
// Restore param:shift_pressed; type: bool_byref
shift_pressed = shift_pressedInt?true:false;
// Restore param:ctrl_pressed; type: bool_byref
ctrl_pressed = ctrl_pressedInt?true:false;
// Restore param:alt_pressed; type: bool_byref
alt_pressed = alt_pressedInt?true:false;
// Return type: bool
return _retval?true:false;
}
bool CefMenuModelCToCpp::GetAcceleratorAt(int index, int& key_code,
bool& shift_pressed, bool& ctrl_pressed, bool& alt_pressed) {
if (CEF_MEMBER_MISSING(struct_, get_accelerator_at))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Translate param: shift_pressed; type: bool_byref
int shift_pressedInt = shift_pressed;
// Translate param: ctrl_pressed; type: bool_byref
int ctrl_pressedInt = ctrl_pressed;
// Translate param: alt_pressed; type: bool_byref
int alt_pressedInt = alt_pressed;
// Execute
int _retval = struct_->get_accelerator_at(struct_,
index,
&key_code,
&shift_pressedInt,
&ctrl_pressedInt,
&alt_pressedInt);
// Restore param:shift_pressed; type: bool_byref
shift_pressed = shift_pressedInt?true:false;
// Restore param:ctrl_pressed; type: bool_byref
ctrl_pressed = ctrl_pressedInt?true:false;
// Restore param:alt_pressed; type: bool_byref
alt_pressed = alt_pressedInt?true:false;
// Return type: bool
return _retval?true:false;
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefMenuModelCToCpp, CefMenuModel,
cef_menu_model_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,97 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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_MENU_MODEL_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_MENU_MODEL_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_menu_model.h"
#include "include/capi/cef_menu_model_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 CefMenuModelCToCpp
: public CefCToCpp<CefMenuModelCToCpp, CefMenuModel, cef_menu_model_t> {
public:
explicit CefMenuModelCToCpp(cef_menu_model_t* str)
: CefCToCpp<CefMenuModelCToCpp, CefMenuModel, cef_menu_model_t>(str) {}
// CefMenuModel methods
virtual bool Clear() OVERRIDE;
virtual int GetCount() OVERRIDE;
virtual bool AddSeparator() OVERRIDE;
virtual bool AddItem(int command_id, const CefString& label) OVERRIDE;
virtual bool AddCheckItem(int command_id, const CefString& label) OVERRIDE;
virtual bool AddRadioItem(int command_id, const CefString& label,
int group_id) OVERRIDE;
virtual CefRefPtr<CefMenuModel> AddSubMenu(int command_id,
const CefString& label) OVERRIDE;
virtual bool InsertSeparatorAt(int index) OVERRIDE;
virtual bool InsertItemAt(int index, int command_id,
const CefString& label) OVERRIDE;
virtual bool InsertCheckItemAt(int index, int command_id,
const CefString& label) OVERRIDE;
virtual bool InsertRadioItemAt(int index, int command_id,
const CefString& label, int group_id) OVERRIDE;
virtual CefRefPtr<CefMenuModel> InsertSubMenuAt(int index, int command_id,
const CefString& label) OVERRIDE;
virtual bool Remove(int command_id) OVERRIDE;
virtual bool RemoveAt(int index) OVERRIDE;
virtual int GetIndexOf(int command_id) OVERRIDE;
virtual int GetCommandIdAt(int index) OVERRIDE;
virtual bool SetCommandIdAt(int index, int command_id) OVERRIDE;
virtual CefString GetLabel(int command_id) OVERRIDE;
virtual CefString GetLabelAt(int index) OVERRIDE;
virtual bool SetLabel(int command_id, const CefString& label) OVERRIDE;
virtual bool SetLabelAt(int index, const CefString& label) OVERRIDE;
virtual MenuItemType GetType(int command_id) OVERRIDE;
virtual MenuItemType GetTypeAt(int index) OVERRIDE;
virtual int GetGroupId(int command_id) OVERRIDE;
virtual int GetGroupIdAt(int index) OVERRIDE;
virtual bool SetGroupId(int command_id, int group_id) OVERRIDE;
virtual bool SetGroupIdAt(int index, int group_id) OVERRIDE;
virtual CefRefPtr<CefMenuModel> GetSubMenu(int command_id) OVERRIDE;
virtual CefRefPtr<CefMenuModel> GetSubMenuAt(int index) OVERRIDE;
virtual bool IsVisible(int command_id) OVERRIDE;
virtual bool IsVisibleAt(int index) OVERRIDE;
virtual bool SetVisible(int command_id, bool visible) OVERRIDE;
virtual bool SetVisibleAt(int index, bool visible) OVERRIDE;
virtual bool IsEnabled(int command_id) OVERRIDE;
virtual bool IsEnabledAt(int index) OVERRIDE;
virtual bool SetEnabled(int command_id, bool enabled) OVERRIDE;
virtual bool SetEnabledAt(int index, bool enabled) OVERRIDE;
virtual bool IsChecked(int command_id) OVERRIDE;
virtual bool IsCheckedAt(int index) OVERRIDE;
virtual bool SetChecked(int command_id, bool checked) OVERRIDE;
virtual bool SetCheckedAt(int index, bool checked) OVERRIDE;
virtual bool HasAccelerator(int command_id) OVERRIDE;
virtual bool HasAcceleratorAt(int index) OVERRIDE;
virtual bool SetAccelerator(int command_id, int key_code, bool shift_pressed,
bool ctrl_pressed, bool alt_pressed) OVERRIDE;
virtual bool SetAcceleratorAt(int index, int key_code, bool shift_pressed,
bool ctrl_pressed, bool alt_pressed) OVERRIDE;
virtual bool RemoveAccelerator(int command_id) OVERRIDE;
virtual bool RemoveAcceleratorAt(int index) OVERRIDE;
virtual bool GetAccelerator(int command_id, int& key_code,
bool& shift_pressed, bool& ctrl_pressed, bool& alt_pressed) OVERRIDE;
virtual bool GetAcceleratorAt(int index, int& key_code, bool& shift_pressed,
bool& ctrl_pressed, bool& alt_pressed) OVERRIDE;
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_MENU_MODEL_CTOCPP_H_

View File

@@ -0,0 +1,164 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/navigation_entry_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
bool CefNavigationEntryCToCpp::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;
}
CefString CefNavigationEntryCToCpp::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;
}
CefString CefNavigationEntryCToCpp::GetDisplayURL() {
if (CEF_MEMBER_MISSING(struct_, get_display_url))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_display_url(struct_);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
CefString CefNavigationEntryCToCpp::GetOriginalURL() {
if (CEF_MEMBER_MISSING(struct_, get_original_url))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_original_url(struct_);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
CefString CefNavigationEntryCToCpp::GetTitle() {
if (CEF_MEMBER_MISSING(struct_, get_title))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_title(struct_);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
CefNavigationEntry::TransitionType CefNavigationEntryCToCpp::GetTransitionType(
) {
if (CEF_MEMBER_MISSING(struct_, get_transition_type))
return TT_EXPLICIT;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_transition_type_t _retval = struct_->get_transition_type(struct_);
// Return type: simple
return _retval;
}
bool CefNavigationEntryCToCpp::HasPostData() {
if (CEF_MEMBER_MISSING(struct_, has_post_data))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->has_post_data(struct_);
// Return type: bool
return _retval?true:false;
}
CefString CefNavigationEntryCToCpp::GetFrameName() {
if (CEF_MEMBER_MISSING(struct_, get_frame_name))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_frame_name(struct_);
// Return type: string
CefString _retvalStr;
_retvalStr.AttachToUserFree(_retval);
return _retvalStr;
}
CefTime CefNavigationEntryCToCpp::GetCompletionTime() {
if (CEF_MEMBER_MISSING(struct_, get_completion_time))
return CefTime();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_time_t _retval = struct_->get_completion_time(struct_);
// Return type: simple
return _retval;
}
int CefNavigationEntryCToCpp::GetHttpStatusCode() {
if (CEF_MEMBER_MISSING(struct_, get_http_status_code))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->get_http_status_code(struct_);
// Return type: simple
return _retval;
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefNavigationEntryCToCpp,
CefNavigationEntry, cef_navigation_entry_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,50 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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_NAVIGATION_ENTRY_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_NAVIGATION_ENTRY_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_navigation_entry.h"
#include "include/capi/cef_navigation_entry_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 CefNavigationEntryCToCpp
: public CefCToCpp<CefNavigationEntryCToCpp, CefNavigationEntry,
cef_navigation_entry_t> {
public:
explicit CefNavigationEntryCToCpp(cef_navigation_entry_t* str)
: CefCToCpp<CefNavigationEntryCToCpp, CefNavigationEntry,
cef_navigation_entry_t>(str) {}
// CefNavigationEntry methods
virtual bool IsValid() OVERRIDE;
virtual CefString GetURL() OVERRIDE;
virtual CefString GetDisplayURL() OVERRIDE;
virtual CefString GetOriginalURL() OVERRIDE;
virtual CefString GetTitle() OVERRIDE;
virtual TransitionType GetTransitionType() OVERRIDE;
virtual bool HasPostData() OVERRIDE;
virtual CefString GetFrameName() OVERRIDE;
virtual CefTime GetCompletionTime() OVERRIDE;
virtual int GetHttpStatusCode() OVERRIDE;
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_NAVIGATION_ENTRY_CTOCPP_H_

View File

@@ -0,0 +1,48 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/navigation_entry_cpptoc.h"
#include "libcef_dll/ctocpp/navigation_entry_visitor_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
bool CefNavigationEntryVisitorCToCpp::Visit(CefRefPtr<CefNavigationEntry> entry,
bool current, int index, int total) {
if (CEF_MEMBER_MISSING(struct_, visit))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: entry; type: refptr_diff
DCHECK(entry.get());
if (!entry.get())
return false;
// Execute
int _retval = struct_->visit(struct_,
CefNavigationEntryCppToC::Wrap(entry),
current,
index,
total);
// Return type: bool
return _retval?true:false;
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefNavigationEntryVisitorCToCpp,
CefNavigationEntryVisitor, cef_navigation_entry_visitor_t>::DebugObjCt =
0;
#endif

View File

@@ -0,0 +1,44 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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_NAVIGATION_ENTRY_VISITOR_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_NAVIGATION_ENTRY_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_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 DLL-side only.
class CefNavigationEntryVisitorCToCpp
: public CefCToCpp<CefNavigationEntryVisitorCToCpp,
CefNavigationEntryVisitor, cef_navigation_entry_visitor_t> {
public:
explicit CefNavigationEntryVisitorCToCpp(cef_navigation_entry_visitor_t* str)
: CefCToCpp<CefNavigationEntryVisitorCToCpp, CefNavigationEntryVisitor,
cef_navigation_entry_visitor_t>(str) {}
// CefNavigationEntryVisitor methods
bool Visit(CefRefPtr<CefNavigationEntry> entry, bool current, int index,
int total) override;
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_NAVIGATION_ENTRY_VISITOR_CTOCPP_H_

View 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

View 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_

View File

@@ -0,0 +1,150 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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 <algorithm>
#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::Create() {
// 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.
bool CefPostDataCToCpp::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;
}
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<> base::AtomicRefCount CefCToCpp<CefPostDataCToCpp, CefPostData,
cef_post_data_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,44 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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) {}
// CefPostData methods
virtual bool IsReadOnly() OVERRIDE;
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_

View File

@@ -0,0 +1,153 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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::Create() {
// 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.
bool CefPostDataElementCToCpp::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;
}
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<> base::AtomicRefCount CefCToCpp<CefPostDataElementCToCpp,
CefPostDataElement, cef_post_data_element_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,48 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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) {}
// CefPostDataElement methods
virtual bool IsReadOnly() OVERRIDE;
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_

View File

@@ -0,0 +1,51 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/print_dialog_callback_ctocpp.h"
#include "libcef_dll/ctocpp/print_settings_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
void CefPrintDialogCallbackCToCpp::Continue(
CefRefPtr<CefPrintSettings> settings) {
if (CEF_MEMBER_MISSING(struct_, cont))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: settings; type: refptr_same
DCHECK(settings.get());
if (!settings.get())
return;
// Execute
struct_->cont(struct_,
CefPrintSettingsCToCpp::Unwrap(settings));
}
void CefPrintDialogCallbackCToCpp::Cancel() {
if (CEF_MEMBER_MISSING(struct_, cancel))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->cancel(struct_);
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefPrintDialogCallbackCToCpp,
CefPrintDialogCallback, cef_print_dialog_callback_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,42 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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_PRINT_DIALOG_CALLBACK_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_PRINT_DIALOG_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_print_handler.h"
#include "include/capi/cef_print_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 CefPrintDialogCallbackCToCpp
: public CefCToCpp<CefPrintDialogCallbackCToCpp, CefPrintDialogCallback,
cef_print_dialog_callback_t> {
public:
explicit CefPrintDialogCallbackCToCpp(cef_print_dialog_callback_t* str)
: CefCToCpp<CefPrintDialogCallbackCToCpp, CefPrintDialogCallback,
cef_print_dialog_callback_t>(str) {}
// CefPrintDialogCallback methods
virtual void Continue(CefRefPtr<CefPrintSettings> settings) OVERRIDE;
virtual void Cancel() OVERRIDE;
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_PRINT_DIALOG_CALLBACK_CTOCPP_H_

View File

@@ -0,0 +1,105 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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/print_dialog_callback_cpptoc.h"
#include "libcef_dll/cpptoc/print_job_callback_cpptoc.h"
#include "libcef_dll/cpptoc/print_settings_cpptoc.h"
#include "libcef_dll/ctocpp/print_handler_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
void CefPrintHandlerCToCpp::OnPrintSettings(
CefRefPtr<CefPrintSettings> settings, bool get_defaults) {
if (CEF_MEMBER_MISSING(struct_, on_print_settings))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: settings; type: refptr_diff
DCHECK(settings.get());
if (!settings.get())
return;
// Execute
struct_->on_print_settings(struct_,
CefPrintSettingsCppToC::Wrap(settings),
get_defaults);
}
bool CefPrintHandlerCToCpp::OnPrintDialog(bool has_selection,
CefRefPtr<CefPrintDialogCallback> callback) {
if (CEF_MEMBER_MISSING(struct_, on_print_dialog))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: callback; type: refptr_diff
DCHECK(callback.get());
if (!callback.get())
return false;
// Execute
int _retval = struct_->on_print_dialog(struct_,
has_selection,
CefPrintDialogCallbackCppToC::Wrap(callback));
// Return type: bool
return _retval?true:false;
}
bool CefPrintHandlerCToCpp::OnPrintJob(const CefString& document_name,
const CefString& pdf_file_path, CefRefPtr<CefPrintJobCallback> callback) {
if (CEF_MEMBER_MISSING(struct_, on_print_job))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: document_name; type: string_byref_const
DCHECK(!document_name.empty());
if (document_name.empty())
return false;
// Verify param: pdf_file_path; type: string_byref_const
DCHECK(!pdf_file_path.empty());
if (pdf_file_path.empty())
return false;
// Verify param: callback; type: refptr_diff
DCHECK(callback.get());
if (!callback.get())
return false;
// Execute
int _retval = struct_->on_print_job(struct_,
document_name.GetStruct(),
pdf_file_path.GetStruct(),
CefPrintJobCallbackCppToC::Wrap(callback));
// Return type: bool
return _retval?true:false;
}
void CefPrintHandlerCToCpp::OnPrintReset() {
if (CEF_MEMBER_MISSING(struct_, on_print_reset))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->on_print_reset(struct_);
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefPrintHandlerCToCpp,
CefPrintHandler, cef_print_handler_t>::DebugObjCt = 0;
#endif

View File

@@ -0,0 +1,48 @@
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// 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_PRINT_HANDLER_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_PRINT_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_print_handler.h"
#include "include/capi/cef_print_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 CefPrintHandlerCToCpp
: public CefCToCpp<CefPrintHandlerCToCpp, CefPrintHandler,
cef_print_handler_t> {
public:
explicit CefPrintHandlerCToCpp(cef_print_handler_t* str)
: CefCToCpp<CefPrintHandlerCToCpp, CefPrintHandler, cef_print_handler_t>(
str) {}
// CefPrintHandler methods
void OnPrintSettings(CefRefPtr<CefPrintSettings> settings,
bool get_defaults) override;
bool OnPrintDialog(bool has_selection,
CefRefPtr<CefPrintDialogCallback> callback) override;
bool OnPrintJob(const CefString& document_name,
const CefString& pdf_file_path,
CefRefPtr<CefPrintJobCallback> callback) override;
void OnPrintReset() override;
};
#endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_PRINT_HANDLER_CTOCPP_H_

Some files were not shown because too many files have changed in this diff Show More