Upgraded to version 1.1025.607 of CEF1

This commit is contained in:
Corey Johnson & Nathan Sobo
2012-05-03 16:02:34 -07:00
committed by Corey Johnson
parent 870db53d3e
commit d83d2a54f9
159 changed files with 2948 additions and 11709 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
#import "BrowserDelegate.h"
#import "include/cef.h"
#import "include/cef_base.h"
#import "include/cef_application_mac.h"
class ClientHandler;

View File

@@ -1,9 +1,10 @@
#import "Atom.h"
#import "include/cef.h"
#import "include/cef_base.h"
#import "AtomController.h"
#import "native_handler.h"
#import "client_handler.h"
#import "include/cef_app.h"
@interface Atom ()
- (CefRefPtr<CefV8Context>)atomContext;
@@ -105,7 +106,7 @@
CefRefPtr<NativeHandler> nativeHandler = new NativeHandler();
global->SetValue("$native", nativeHandler->m_object, V8_PROPERTY_ATTRIBUTE_NONE);
CefRefPtr<CefV8Value> atom = CefV8Value::CreateObject(NULL);
CefRefPtr<CefV8Value> atom = CefV8Value::CreateObject(NULL, NULL);
global->SetValue("atom", atom, V8_PROPERTY_ATTRIBUTE_NONE);
#ifdef DEBUG

View File

@@ -1,7 +1,8 @@
#import <Cocoa/Cocoa.h>
#import "BrowserDelegate.h"
#import "include/cef.h"
#import "include/cef_base.h"
#import "include/cef_v8.h"
class ClientHandler;

View File

@@ -1,6 +1,6 @@
#import "AtomController.h"
#import "include/cef.h"
#import "include/cef_base.h"
#import "client_handler.h"
#import "native_handler.h"
#import "PathWatcher.h"
@@ -167,7 +167,6 @@ void AppGetBrowserSettings(CefBrowserSettings& settings) {
settings.accelerated_layers_disabled = false;
settings.accelerated_video_disabled = false;
settings.accelerated_2d_canvas_disabled = false;
settings.accelerated_drawing_disabled = false;
settings.accelerated_plugins_disabled = false;
settings.developer_tools_disabled = false;
}

View File

@@ -1,5 +1,5 @@
#import <Foundation/Foundation.h>
#import "include/cef.h"
#import "include/cef_base.h"
@protocol BrowserDelegate <NSObject>

View File

@@ -5,7 +5,8 @@
#ifndef _CLIENT_HANDLER_H
#define _CLIENT_HANDLER_H
#import "include/cef.h"
#import "include/cef_base.h"
#import "include/cef_client.h"
@class AtomController;

View File

@@ -1,5 +1,4 @@
#import "include/cef.h"
#import "include/cef_wrapper.h"
#import "include/cef_base.h"
#import "client_handler.h"
#import "AtomController.h"

View File

@@ -1,6 +1,7 @@
#import <Cocoa/Cocoa.h>
#include "include/cef.h"
#include "include/cef_base.h"
#include "include/cef_app.h"
int main(int argc, char* argv[]) {
NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];

View File

@@ -1,5 +1,6 @@
#import <Cocoa/Cocoa.h>
#import "include/cef.h"
#import "include/cef_base.h"
#import "include/cef_v8.h"
class NativeHandler : public CefV8Handler {
public:

View File

@@ -1,5 +1,5 @@
#import "native_handler.h"
#import "include/cef.h"
#import "include/cef_base.h"
#import "Atom.h"
#import "AtomController.h"
#import "client_handler.h"
@@ -14,7 +14,7 @@ NSString *stringFromCefV8Value(const CefRefPtr<CefV8Value>& value) {
}
NativeHandler::NativeHandler() : CefV8Handler() {
m_object = CefV8Value::CreateObject(NULL);
m_object = CefV8Value::CreateObject(NULL, NULL);
const char *functionNames[] = {"exists", "read", "write", "absolute", "list", "isFile", "isDirectory", "remove", "asyncList", "open", "openDialog", "quit", "writeToPasteboard", "readFromPasteboard", "showDevTools", "newWindow", "saveDialog", "exit", "watchPath", "unwatchPath", "makeDirectory", "move"};
NSUInteger arrayLength = sizeof(functionNames) / sizeof(const char *);
@@ -288,7 +288,7 @@ bool NativeHandler::Execute(const CefString& name,
CefRefPtr<CefV8Value> retval;
CefRefPtr<CefV8Exception> e;
CefRefPtr<CefV8Value> eventObject = CefV8Value::CreateObject(NULL);
CefRefPtr<CefV8Value> eventObject = CefV8Value::CreateObject(NULL, NULL);
for (NSString *event in eventList) {
eventObject->SetValue([event UTF8String], CefV8Value::CreateBool(true), V8_PROPERTY_ATTRIBUTE_NONE);
}

File diff suppressed because it is too large Load Diff

18
cef/include/cef_application_mac.h Executable file → Normal file
View File

@@ -27,11 +27,11 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_APPLICATION_MAC_H
#define _CEF_APPLICATION_MAC_H
#ifndef CEF_INCLUDE_CEF_APPLICATION_MAC_H_
#define CEF_INCLUDE_CEF_APPLICATION_MAC_H_
#pragma once
#include "cef.h"
#include "include/cef_base.h"
#if defined(OS_MACOSX) && defined(__OBJC__)
@@ -43,7 +43,7 @@
// Use the existing empty protocol definitions.
#import "base/mac/cocoa_protocols.h"
#else // BUILDING_CEF_SHARED
#else // BUILDING_CEF_SHARED
#import <AppKit/AppKit.h>
#import <Cocoa/Cocoa.h>
@@ -88,7 +88,7 @@ DEFINE_EMPTY_PROTOCOL(NSWindowDelegate)
#endif
#endif // BUILDING_CEF_SHARED
#endif // BUILDING_CEF_SHARED
// All CEF client applications must subclass NSApplication and implement this
// protocol.
@@ -99,7 +99,7 @@ DEFINE_EMPTY_PROTOCOL(NSWindowDelegate)
// Controls the state of |isHandlingSendEvent| in the event loop so that it is
// reset properly.
class CefScopedSendingEvent {
public:
public:
CefScopedSendingEvent()
: app_(static_cast<NSApplication<CefAppProtocol>*>(
[NSApplication sharedApplication])),
@@ -109,12 +109,12 @@ public:
~CefScopedSendingEvent() {
[app_ setHandlingSendEvent:handling_];
}
private:
private:
NSApplication<CefAppProtocol>* app_;
BOOL handling_;
};
#endif // defined(OS_MACOSX) && defined(__OBJC__)
#endif // _CEF_APPLICATION_MAC_H
#endif // CEF_INCLUDE_CEF_APPLICATION_MAC_H_

File diff suppressed because it is too large Load Diff

44
cef/include/cef_nplugin.h Executable file → Normal file
View File

@@ -28,8 +28,9 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_NPLUGIN_H
#define _CEF_NPLUGIN_H
#ifndef CEF_INCLUDE_CEF_NPLUGIN_H_
#define CEF_INCLUDE_CEF_NPLUGIN_H_
#pragma once
#include "internal/cef_nplugin_types.h"
@@ -44,31 +45,25 @@
// This class provides attribute information and entry point functions for a
// plugin.
///
class CefPluginInfo : public cef_plugin_info_t
{
public:
CefPluginInfo()
{
class CefPluginInfo : public cef_plugin_info_t {
public:
CefPluginInfo() {
Init();
}
virtual ~CefPluginInfo()
{
virtual ~CefPluginInfo() {
Reset();
}
CefPluginInfo(const CefPluginInfo& r)
{
CefPluginInfo(const CefPluginInfo& r) { // NOLINT(runtime/explicit)
Init();
*this = r;
}
CefPluginInfo(const cef_plugin_info_t& r)
{
CefPluginInfo(const cef_plugin_info_t& r) { // NOLINT(runtime/explicit)
Init();
*this = r;
}
void Reset()
{
void Reset() {
cef_string_clear(&unique_name);
cef_string_clear(&display_name);
cef_string_clear(&version);
@@ -79,24 +74,20 @@ public:
Init();
}
void Attach(const cef_plugin_info_t& r)
{
void Attach(const cef_plugin_info_t& r) {
Reset();
*static_cast<cef_plugin_info_t*>(this) = r;
}
void Detach()
{
void Detach() {
Init();
}
CefPluginInfo& operator=(const CefPluginInfo& r)
{
CefPluginInfo& operator=(const CefPluginInfo& r) {
return operator=(static_cast<const cef_plugin_info_t&>(r));
}
CefPluginInfo& operator=(const cef_plugin_info_t& r)
{
CefPluginInfo& operator=(const cef_plugin_info_t& r) {
cef_string_copy(r.unique_name.str, r.unique_name.length, &unique_name);
cef_string_copy(r.display_name.str, r.display_name.length, &display_name);
cef_string_copy(r.version.str, r.version.length, &version);
@@ -114,9 +105,8 @@ public:
return *this;
}
protected:
void Init()
{
protected:
void Init() {
memset(static_cast<cef_plugin_info_t*>(this), 0, sizeof(cef_plugin_info_t));
}
};
@@ -126,4 +116,4 @@ protected:
///
bool CefRegisterPlugin(const CefPluginInfo& plugin_info);
#endif // _CEF_NPLUGIN_H
#endif // CEF_INCLUDE_CEF_NPLUGIN_H_

View File

@@ -1,49 +0,0 @@
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the name Chromium Embedded
// Framework nor the names of its contributors may be used to endorse
// or promote products derived from this software without specific prior
// written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_NPLUGIN_CAPI_H
#define _CEF_NPLUGIN_CAPI_H
#ifdef __cplusplus
extern "C" {
#endif
#include "internal/cef_nplugin_types.h"
///
// Register a plugin with the system. Returns true (1) on success.
///
CEF_EXPORT int cef_register_plugin(const cef_plugin_info_t* plugin_info);
#ifdef __cplusplus
}
#endif
#endif // _CEF_NPLUGIN_CAPI_H

9
cef/include/cef_runnable.h Executable file → Normal file
View File

@@ -30,11 +30,12 @@
//
// The contents of this file are a modified extract of base/task.h
#ifndef _CEF_RUNNABLE_H
#define _CEF_RUNNABLE_H
#ifndef CEF_INCLUDE_CEF_RUNNABLE_H_
#define CEF_INCLUDE_CEF_RUNNABLE_H_
#pragma once
#include "cef.h"
#include "include/cef_base.h"
#include "include/cef_task.h"
#ifdef BUILDING_CEF_SHARED
#include "base/tuple.h"
#else
@@ -342,4 +343,4 @@ inline CefRefPtr<CefTask> NewCefRunnableFunction(Function function,
function, MakeTuple(a, b, c, d, e, f, g, h));
}
#endif // _CEF_RUNNABLE_H
#endif // CEF_INCLUDE_CEF_RUNNABLE_H_

20
cef/include/cef_version.h Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -32,16 +32,16 @@
// This file is generated by the make_version_header.py tool.
//
#ifndef _CEF_VERSION_H
#define _CEF_VERSION_H
#ifndef CEF_INCLUDE_CEF_VERSION_H_
#define CEF_INCLUDE_CEF_VERSION_H_
#define CEF_REVISION 439
#define COPYRIGHT_YEAR 2011
#define CEF_REVISION 607
#define COPYRIGHT_YEAR 2012
#define CHROME_VERSION_MAJOR 17
#define CHROME_VERSION_MAJOR 18
#define CHROME_VERSION_MINOR 0
#define CHROME_VERSION_BUILD 963
#define CHROME_VERSION_PATCH 15
#define CHROME_VERSION_BUILD 1025
#define CHROME_VERSION_PATCH 166
#define DO_MAKE_STRING(p) #p
#define MAKE_STRING(p) DO_MAKE_STRING(p)
@@ -63,6 +63,6 @@ CEF_EXPORT int cef_build_revision();
}
#endif
#endif // APSTUDIO_HIDDEN_SYMBOLS
#endif // APSTUDIO_HIDDEN_SYMBOLS
#endif // _CEF_VERSION_H
#endif // CEF_INCLUDE_CEF_VERSION_H_

View File

@@ -1,322 +0,0 @@
// Copyright (c) 2010 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the name Chromium Embedded
// Framework nor the names of its contributors may be used to endorse
// or promote products derived from this software without specific prior
// written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// ---------------------------------------------------------------------------
//
// The contents of this file are only available to applications that link
// against the libcef_dll_wrapper target.
//
#ifndef _CEF_WRAPPER_H
#define _CEF_WRAPPER_H
#include "cef.h"
#include <map>
#include <vector>
///
// Thread safe class for representing XML data as a structured object. This
// class should not be used with large XML documents because all data will be
// resident in memory at the same time. This implementation supports a
// restricted set of XML features:
// <pre>
// (1) Processing instructions, whitespace and comments are ignored.
// (2) Elements and attributes must always be referenced using the fully
// qualified name (ie, namespace:localname).
// (3) Empty elements (<a/>) and elements with zero-length values (<a></a>)
// are considered the same.
// (4) Element nodes are considered part of a value if:
// (a) The element node follows a non-element node at the same depth
// (see 5), or
// (b) The element node does not have a namespace and the parent node does.
// (5) Mixed node types at the same depth are combined into a single element
// value as follows:
// (a) All node values are concatenated to form a single string value.
// (b) Entity reference nodes are resolved to the corresponding entity
// value.
// (c) Element nodes are represented by their outer XML string.
// </pre>
///
class CefXmlObject : public CefBase
{
public:
typedef std::vector<CefRefPtr<CefXmlObject> > ObjectVector;
typedef std::map<CefString, CefString > AttributeMap;
///
// Create a new object with the specified name. An object name must always be
// at least one character long.
///
CefXmlObject(const CefString& name);
virtual ~CefXmlObject();
///
// Load the contents of the specified XML stream into this object. The
// existing children and attributes, if any, will first be cleared.
///
bool Load(CefRefPtr<CefStreamReader> stream,
CefXmlReader::EncodingType encodingType,
const CefString& URI, CefString* loadError);
///
// Set the name, children and attributes of this object to a duplicate of the
// specified object's contents. The existing children and attributes, if any,
// will first be cleared.
///
void Set(CefRefPtr<CefXmlObject> object);
///
// Append a duplicate of the children and attributes of the specified object
// to this object. If |overwriteAttributes| is true then any attributes in
// this object that also exist in the specified object will be overwritten
// with the new values. The name of this object is not changed.
///
void Append(CefRefPtr<CefXmlObject> object, bool overwriteAttributes);
///
// Return a new object with the same name, children and attributes as this
// object. The parent of the new object will be NULL.
///
CefRefPtr<CefXmlObject> Duplicate();
///
// Clears this object's children and attributes. The name and parenting of
// this object are not changed.
///
void Clear();
///
// Access the object's name. An object name must always be at least one
// character long.
///
CefString GetName();
bool SetName(const CefString& name);
///
// Access the object's parent. The parent can be NULL if this object has not
// been added as the child on another object.
///
bool HasParent();
CefRefPtr<CefXmlObject> GetParent();
///
// Access the object's value. An object cannot have a value if it also has
// children. Attempting to set the value while children exist will fail.
///
bool HasValue();
CefString GetValue();
bool SetValue(const CefString& value);
///
// Access the object's attributes. Attributes must have unique names.
///
bool HasAttributes();
size_t GetAttributeCount();
bool HasAttribute(const CefString& name);
CefString GetAttributeValue(const CefString& name);
bool SetAttributeValue(const CefString& name, const CefString& value);
size_t GetAttributes(AttributeMap& attributes);
void ClearAttributes();
///
// Access the object's children. Each object can only have one parent so
// attempting to add an object that already has a parent will fail. Removing a
// child will set the child's parent to NULL. Adding a child will set the
// child's parent to this object. This object's value, if any, will be cleared
// if a child is added.
///
bool HasChildren();
size_t GetChildCount();
bool HasChild(CefRefPtr<CefXmlObject> child);
bool AddChild(CefRefPtr<CefXmlObject> child);
bool RemoveChild(CefRefPtr<CefXmlObject> child);
size_t GetChildren(ObjectVector& children);
void ClearChildren();
///
// Find the first child with the specified name.
///
CefRefPtr<CefXmlObject> FindChild(const CefString& name);
///
// Find all children with the specified name.
///
size_t FindChildren(const CefString& name, ObjectVector& children);
private:
void SetParent(CefXmlObject* parent);
CefString name_;
CefXmlObject* parent_;
CefString value_;
AttributeMap attributes_;
ObjectVector children_;
IMPLEMENT_REFCOUNTING(CefXmlObject);
IMPLEMENT_LOCKING(CefXmlObject);
};
///
// Thread safe implementation of the CefReadHandler class for reading an
// in-memory array of bytes.
///
class CefByteReadHandler : public CefReadHandler
{
public:
///
// Create a new object for reading an array of bytes. An optional |source|
// reference can be kept to keep the underlying data source from being
// released while the reader exists.
///
CefByteReadHandler(const unsigned char* bytes, size_t size,
CefRefPtr<CefBase> source);
///
// Read raw binary data.
///
virtual size_t Read(void* ptr, size_t size, size_t n);
///
// Seek to the specified offset position. |whence| may be any one of
// SEEK_CUR, SEEK_END or SEEK_SET.
///
virtual int Seek(long offset, int whence);
///
// Return the current offset position.
///
virtual long Tell();
///
// Return non-zero if at end of file.
///
virtual int Eof();
private:
const unsigned char* bytes_;
size_t size_;
size_t offset_;
CefRefPtr<CefBase> source_;
IMPLEMENT_REFCOUNTING(CefByteReadHandler);
IMPLEMENT_LOCKING(CefByteReadHandler);
};
///
// Thread-safe class for accessing zip archive file contents. This class should
// not be used with large archive files because all data will be resident in
// memory at the same time. This implementation supports a restricted set of zip
// archive features:
// (1) Password-protected files are not supported.
// (2) All file names are stored and compared in lower case.
// (3) File ordering from the original zip archive is not maintained. This
// means that files from the same folder may not be located together in the
// file content map.
///
class CefZipArchive : public CefBase
{
public:
///
// Class representing a file in the archive. Accessing the file data from
// multiple threads is safe provided a reference to the File object is kept.
///
class File : public CefBase
{
public:
///
// Returns the read-only data contained in the file.
///
virtual const unsigned char* GetData() =0;
///
// Returns the size of the data in the file.
///
virtual size_t GetDataSize() =0;
///
// Returns a CefStreamReader object for streaming the contents of the file.
///
virtual CefRefPtr<CefStreamReader> GetStreamReader() =0;
};
typedef std::map<CefString, CefRefPtr<File> > FileMap;
///
// Create a new object.
///
CefZipArchive();
virtual ~CefZipArchive();
///
// Load the contents of the specified zip archive stream into this object.
// If |overwriteExisting| is true then any files in this object that also
// exist in the specified archive will be replaced with the new files.
// Returns the number of files successfully loaded.
///
size_t Load(CefRefPtr<CefStreamReader> stream, bool overwriteExisting);
///
// Clears the contents of this object.
///
void Clear();
///
// Returns the number of files in the archive.
///
size_t GetFileCount();
///
// Returns true if the specified file exists and has contents.
///
bool HasFile(const CefString& fileName);
///
// Returns the specified file.
///
CefRefPtr<File> GetFile(const CefString& fileName);
///
// Removes the specified file.
///
bool RemoveFile(const CefString& fileName);
///
// Returns the map of all files.
///
size_t GetFiles(FileMap& map);
private:
FileMap contents_;
IMPLEMENT_REFCOUNTING(CefZipArchive);
IMPLEMENT_LOCKING(CefZipArchive);
};
#endif // _CEF_WRAPPER_H

31
cef/include/internal/cef_build.h Executable file → Normal file
View File

@@ -28,21 +28,28 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_BUILD_H
#define _CEF_BUILD_H
#ifndef CEF_INCLUDE_INTERNAL_CEF_BUILD_H_
#define CEF_INCLUDE_INTERNAL_CEF_BUILD_H_
#pragma once
#if defined(BUILDING_CEF_SHARED)
#include "base/compiler_specific.h"
#else // !BUILDING_CEF_SHARED
#else // !BUILDING_CEF_SHARED
#if defined(_WIN32)
#ifndef OS_WIN
#define OS_WIN 1
#endif
#elif defined(__APPLE__)
#ifndef OS_MACOSX
#define OS_MACOSX 1
#endif
#elif defined(__linux__)
#ifndef OS_LINUX
#define OS_LINUX 1
#endif
#else
#error Please add support for your platform in cef_build.h
#endif
@@ -50,14 +57,20 @@
// For access to standard POSIXish features, use OS_POSIX instead of a
// more specific macro.
#if defined(OS_MACOSX) || defined(OS_LINUX)
#ifndef OS_POSIX
#define OS_POSIX 1
#endif
#endif
// Compiler detection.
#if defined(__GNUC__)
#ifndef COMPILER_GCC
#define COMPILER_GCC 1
#endif
#elif defined(_MSC_VER)
#ifndef COMPILER_MSVC
#define COMPILER_MSVC 1
#endif
#else
#error Please add support for your compiler in cef_build.h
#endif
@@ -66,6 +79,7 @@
// method in the parent class.
// Use like:
// virtual void foo() OVERRIDE;
#ifndef OVERRIDE
#if defined(COMPILER_MSVC)
#define OVERRIDE override
#elif defined(__clang__)
@@ -73,7 +87,9 @@
#else
#define OVERRIDE
#endif
#endif
#ifndef ALLOW_THIS_IN_INITIALIZER_LIST
#if defined(COMPILER_MSVC)
// MSVC_PUSH_DISABLE_WARNING pushes |n| onto a stack of warnings to be disabled.
@@ -101,12 +117,13 @@
#define ALLOW_THIS_IN_INITIALIZER_LIST(code) MSVC_PUSH_DISABLE_WARNING(4355) \
code \
MSVC_POP_WARNING()
#else // !COMPILER_MSVC
#else // !COMPILER_MSVC
#define ALLOW_THIS_IN_INITIALIZER_LIST(code) code
#endif // !COMPILER_MSVC
#endif // !COMPILER_MSVC
#endif
#endif // !BUILDING_CEF_SHARED
#endif // !BUILDING_CEF_SHARED
#endif // _CEF_BUILD_H
#endif // CEF_INCLUDE_INTERNAL_CEF_BUILD_H_

9
cef/include/internal/cef_export.h Executable file → Normal file
View File

@@ -28,10 +28,11 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_EXPORT_H
#define _CEF_EXPORT_H
#ifndef CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_
#define CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_
#pragma once
#include "cef_build.h"
#include "include/internal/cef_build.h"
#if defined(COMPILER_MSVC)
@@ -51,4 +52,4 @@
#endif // COMPILER_GCC
#endif // _CEF_EXPORT_H
#endif // CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_

61
cef/include/internal/cef_mac.h Executable file → Normal file
View File

@@ -28,21 +28,20 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_MAC_H
#define _CEF_MAC_H
#ifndef CEF_INCLUDE_INTERNAL_CEF_MAC_H_
#define CEF_INCLUDE_INTERNAL_CEF_MAC_H_
#pragma once
#if defined(OS_MACOSX)
#include <pthread.h>
#include "cef_types_mac.h"
#include "cef_types_wrappers.h"
#include "include/internal/cef_types_mac.h"
#include "include/internal/cef_types_wrappers.h"
// Atomic increment and decrement.
inline long CefAtomicIncrement(long volatile *pDest)
{
inline long CefAtomicIncrement(long volatile *pDest) { // NOLINT(runtime/int)
return __sync_add_and_fetch(pDest, 1);
}
inline long CefAtomicDecrement(long volatile *pDest)
{
inline long CefAtomicDecrement(long volatile *pDest) { // NOLINT(runtime/int)
return __sync_sub_and_fetch(pDest, 1);
}
@@ -51,26 +50,21 @@ inline long CefAtomicDecrement(long volatile *pDest)
#define CefCursorHandle cef_cursor_handle_t
// Critical section wrapper.
class CefCriticalSection
{
public:
CefCriticalSection()
{
class CefCriticalSection {
public:
CefCriticalSection() {
pthread_mutexattr_init(&attr_);
pthread_mutexattr_settype(&attr_, PTHREAD_MUTEX_RECURSIVE);
pthread_mutex_init(&lock_, &attr_);
}
virtual ~CefCriticalSection()
{
virtual ~CefCriticalSection() {
pthread_mutex_destroy(&lock_);
pthread_mutexattr_destroy(&attr_);
}
void Lock()
{
void Lock() {
pthread_mutex_lock(&lock_);
}
void Unlock()
{
void Unlock() {
pthread_mutex_unlock(&lock_);
}
@@ -83,13 +77,12 @@ struct CefWindowInfoTraits {
static inline void init(struct_type* s) {}
static inline void clear(struct_type* s)
{
static inline void clear(struct_type* s) {
cef_string_clear(&s->m_windowName);
}
static inline void set(const struct_type* src, struct_type* target, bool copy)
{
static inline void set(const struct_type* src, struct_type* target,
bool copy) {
target->m_View = src->m_View;
target->m_ParentView = src->m_ParentView;
cef_string_set(src->m_windowName.str, src->m_windowName.length,
@@ -103,18 +96,16 @@ struct CefWindowInfoTraits {
};
// Class representing window information.
class CefWindowInfo : public CefStructBase<CefWindowInfoTraits>
{
public:
class CefWindowInfo : public CefStructBase<CefWindowInfoTraits> {
public:
typedef CefStructBase<CefWindowInfoTraits> parent;
CefWindowInfo() : parent() {}
CefWindowInfo(const cef_window_info_t& r) : parent(r) {}
CefWindowInfo(const CefWindowInfo& r) : parent(r) {}
explicit CefWindowInfo(const cef_window_info_t& r) : parent(r) {}
explicit CefWindowInfo(const CefWindowInfo& r) : parent(r) {}
void SetAsChild(CefWindowHandle ParentView, int x, int y, int width,
int height)
{
int height) {
m_ParentView = ParentView;
m_x = x;
m_y = y;
@@ -130,8 +121,8 @@ struct CefPrintInfoTraits {
static inline void init(struct_type* s) {}
static inline void clear(struct_type* s) {}
static inline void set(const struct_type* src, struct_type* target, bool copy)
{
static inline void set(const struct_type* src, struct_type* target,
bool copy) {
target->m_Scale = src->m_Scale;
}
};
@@ -139,6 +130,6 @@ struct CefPrintInfoTraits {
// Class representing print context information.
typedef CefStructBase<CefPrintInfoTraits> CefPrintInfo;
#endif // OS_MACOSX
#endif // OS_MACOSX
#endif // _CEF_MAC_H
#endif // CEF_INCLUDE_INTERNAL_CEF_MAC_H_

21
cef/include/internal/cef_nplugin_types.h Executable file → Normal file
View File

@@ -28,15 +28,16 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_NPLUGIN_TYPES_H
#define _CEF_NPLUGIN_TYPES_H
#ifndef CEF_INCLUDE_INTERNAL_CEF_NPLUGIN_TYPES_H_
#define CEF_INCLUDE_INTERNAL_CEF_NPLUGIN_TYPES_H_
#pragma once
#include "cef_export.h"
#include "cef_string.h"
#include "include/internal/cef_export.h"
#include "include/internal/cef_string.h"
// Include path modified for CEF Binary Distribution.
#include "npapi/npapi.h"
#include "include/internal/npapi/npapi.h"
// Include path modified for CEF Binary Distribution.
#include "npapi/nphostapi.h"
#include "include/internal/npapi/nphostapi.h"
#ifdef __cplusplus
extern "C" {
@@ -63,15 +64,15 @@ typedef struct _cef_plugin_info_t {
// A description of the plugin.
cef_string_t description;
// A pipe (|) delimited list of mime type values that the plugin supports.
cef_string_t mime_types;
// A pipe (|) delimited list of extension values. Each value is associated
// with the mime type value at the same position. Multiple file extensions
// for the same mime type may be delimited with commas (,).
cef_string_t file_extensions;
// A pipe (|) delimited list of description values. Each value is associated
// with the mime type value at the same position.
cef_string_t type_descriptions;
@@ -88,4 +89,4 @@ typedef struct _cef_plugin_info_t {
}
#endif
#endif // _CEF_NPLUGIN_TYPES_H
#endif // CEF_INCLUDE_INTERNAL_CEF_NPLUGIN_TYPES_H_

13
cef/include/internal/cef_ptr.h Executable file → Normal file
View File

@@ -29,8 +29,11 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_PTR_H
#define _CEF_PTR_H
#ifndef CEF_INCLUDE_INTERNAL_CEF_PTR_H_
#define CEF_INCLUDE_INTERNAL_CEF_PTR_H_
#pragma once
#include <stddef.h>
///
// Smart pointer implementation borrowed from base/ref_counted.h
@@ -146,7 +149,7 @@ class CefRefPtr {
CefRefPtr() : ptr_(NULL) {
}
CefRefPtr(T* p) : ptr_(p) {
CefRefPtr(T* p) : ptr_(p) { // NOLINT(runtime/explicit)
if (ptr_)
ptr_->AddRef();
}
@@ -186,11 +189,11 @@ class CefRefPtr {
}
void swap(CefRefPtr<T>& r) {
swap(&r.ptr_);
swap(&r.ptr_); // NOLINT(build/include_what_you_use)
}
private:
T* ptr_;
};
#endif // _CEF_PTR_H
#endif // CEF_INCLUDE_INTERNAL_CEF_PTR_H_

17
cef/include/internal/cef_string.h Executable file → Normal file
View File

@@ -27,27 +27,28 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_STRING_H
#define _CEF_STRING_H
#ifndef CEF_INCLUDE_INTERNAL_CEF_STRING_H_
#define CEF_INCLUDE_INTERNAL_CEF_STRING_H_
#pragma once
// The CEF interface is built with one string type as the default. Comment out
// all but one of the CEF_STRING_TYPE_* defines below to specify the default.
// If you change the default you MUST recompile all of CEF.
// Build with the UTF8 string type as default.
//#define CEF_STRING_TYPE_UTF8 1
// #define CEF_STRING_TYPE_UTF8 1
// Build with the UTF16 string type as default.
#define CEF_STRING_TYPE_UTF16 1
// Build with the wide string type as default.
//#define CEF_STRING_TYPE_WIDE 1
// #define CEF_STRING_TYPE_WIDE 1
#include "cef_string_types.h"
#include "include/internal/cef_string_types.h"
#ifdef __cplusplus
#include "cef_string_wrappers.h"
#include "include/internal/cef_string_wrappers.h"
#if defined(CEF_STRING_TYPE_UTF16)
typedef CefStringUTF16 CefString;
#elif defined(CEF_STRING_TYPE_UTF8)
@@ -55,7 +56,7 @@ typedef CefStringUTF8 CefString;
#elif defined(CEF_STRING_TYPE_WIDE)
typedef CefStringWide CefString;
#endif
#endif // __cplusplus
#endif // __cplusplus
#if defined(CEF_STRING_TYPE_UTF8)
typedef char cef_char_t;
@@ -109,4 +110,4 @@ typedef cef_string_userfree_wide_t cef_string_userfree_t;
#error Please choose a string type.
#endif
#endif // _CEF_STRING_H
#endif // CEF_INCLUDE_INTERNAL_CEF_STRING_H_

11
cef/include/internal/cef_string_list.h Executable file → Normal file
View File

@@ -27,11 +27,12 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_STRING_LIST_H
#define _CEF_STRING_LIST_H
#ifndef CEF_INCLUDE_INTERNAL_CEF_STRING_LIST_H_
#define CEF_INCLUDE_INTERNAL_CEF_STRING_LIST_H_
#pragma once
#include "cef_export.h"
#include "cef_string.h"
#include "include/internal/cef_export.h"
#include "include/internal/cef_string.h"
#ifdef __cplusplus
extern "C" {
@@ -84,4 +85,4 @@ CEF_EXPORT cef_string_list_t cef_string_list_copy(cef_string_list_t list);
}
#endif
#endif // _CEF_STRING_LIST_H
#endif // CEF_INCLUDE_INTERNAL_CEF_STRING_LIST_H_

11
cef/include/internal/cef_string_map.h Executable file → Normal file
View File

@@ -27,11 +27,12 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_STRING_MAP_H
#define _CEF_STRING_MAP_H
#ifndef CEF_INCLUDE_INTERNAL_CEF_STRING_MAP_H_
#define CEF_INCLUDE_INTERNAL_CEF_STRING_MAP_H_
#pragma once
#include "cef_export.h"
#include "cef_string.h"
#include "include/internal/cef_export.h"
#include "include/internal/cef_string.h"
#ifdef __cplusplus
extern "C" {
@@ -93,4 +94,4 @@ CEF_EXPORT void cef_string_map_free(cef_string_map_t map);
}
#endif
#endif // _CEF_STRING_MAP_H
#endif // CEF_INCLUDE_INTERNAL_CEF_STRING_MAP_H_

11
cef/include/internal/cef_string_multimap.h Executable file → Normal file
View File

@@ -27,11 +27,12 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_STRING_MULTIMAP_H
#define _CEF_STRING_MULTIMAP_H
#ifndef CEF_INCLUDE_INTERNAL_CEF_STRING_MULTIMAP_H_
#define CEF_INCLUDE_INTERNAL_CEF_STRING_MULTIMAP_H_
#pragma once
#include "cef_export.h"
#include "cef_string.h"
#include "include/internal/cef_export.h"
#include "include/internal/cef_string.h"
#ifdef __cplusplus
extern "C" {
@@ -101,4 +102,4 @@ CEF_EXPORT void cef_string_multimap_free(cef_string_multimap_t map);
}
#endif
#endif // _CEF_STRING_MULTIMAP_H
#endif // CEF_INCLUDE_INTERNAL_CEF_STRING_MULTIMAP_H_

19
cef/include/internal/cef_string_types.h Executable file → Normal file
View File

@@ -27,8 +27,9 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_STRING_TYPES_T
#define _CEF_STRING_TYPES_T
#ifndef CEF_INCLUDE_INTERNAL_CEF_STRING_TYPES_H_
#define CEF_INCLUDE_INTERNAL_CEF_STRING_TYPES_H_
#pragma once
// CEF provides functions for converting between UTF-8, -16 and -32 strings.
// CEF string types are safe for reading from multiple threads but not for
@@ -39,8 +40,8 @@
extern "C" {
#endif
#include "cef_build.h"
#include "cef_export.h"
#include "include/internal/cef_build.h"
#include "include/internal/cef_export.h"
#include <stddef.h>
// CEF character type definitions. wchar_t is 2 bytes on Windows and 4 bytes on
@@ -48,12 +49,12 @@ extern "C" {
#if defined(OS_WIN)
typedef wchar_t char16;
#else // !OS_WIN
typedef unsigned short char16;
#else // !OS_WIN
typedef unsigned short char16; // NOLINT (runtime/int)
#ifndef WCHAR_T_IS_UTF32
#define WCHAR_T_IS_UTF32
#endif // WCHAR_T_IS_UTF32
#endif // !OS_WIN
#endif // WCHAR_T_IS_UTF32
#endif // !OS_WIN
// CEF string type definitions. Whomever allocates |str| is responsible for
@@ -200,4 +201,4 @@ CEF_EXPORT void cef_string_userfree_utf16_free(cef_string_userfree_utf16_t str);
}
#endif
#endif // _CEF_STRING_TYPES_T
#endif // CEF_INCLUDE_INTERNAL_CEF_STRING_TYPES_H_

414
cef/include/internal/cef_string_wrappers.h Executable file → Normal file
View File

@@ -27,15 +27,18 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_STRING_WRAPPERS_H
#define _CEF_STRING_WRAPPERS_H
#ifndef CEF_INCLUDE_INTERNAL_CEF_STRING_WRAPPERS_H_
#define CEF_INCLUDE_INTERNAL_CEF_STRING_WRAPPERS_H_
#pragma once
#include <memory.h>
#include <string>
#include "include/internal/cef_string_types.h"
#include "cef_string_types.h"
#ifdef BUILDING_CEF_SHARED
#include "base/string16.h"
#endif
#include <memory.h>
#include <string>
///
// Traits implementation for wide character strings.
@@ -44,25 +47,27 @@ struct CefStringTraitsWide {
typedef wchar_t char_type;
typedef cef_string_wide_t struct_type;
typedef cef_string_userfree_wide_t userfree_struct_type;
static inline void clear(struct_type *s) { cef_string_wide_clear(s); }
static inline int set(const char_type* src, size_t src_size,
struct_type *output, int copy)
{ return cef_string_wide_set(src, src_size, output, copy); }
static inline int compare(const struct_type* s1, const struct_type* s2)
{ return cef_string_wide_cmp(s1, s2); }
static inline userfree_struct_type userfree_alloc()
{ return cef_string_userfree_wide_alloc(); }
static inline void userfree_free(userfree_struct_type ufs)
{ return cef_string_userfree_wide_free(ufs); }
struct_type* output, int copy) {
return cef_string_wide_set(src, src_size, output, copy);
}
static inline int compare(const struct_type* s1, const struct_type* s2) {
return cef_string_wide_cmp(s1, s2);
}
static inline userfree_struct_type userfree_alloc() {
return cef_string_userfree_wide_alloc();
}
static inline void userfree_free(userfree_struct_type ufs) {
return cef_string_userfree_wide_free(ufs);
}
// Conversion methods.
static inline bool from_ascii(const char* str, size_t len, struct_type *s)
{
static inline bool from_ascii(const char* str, size_t len, struct_type *s) {
return cef_string_ascii_to_wide(str, len, s) ? true : false;
}
static inline std::string to_string(const struct_type *s)
{
static inline std::string to_string(const struct_type *s) {
cef_string_utf8_t cstr;
memset(&cstr, 0, sizeof(cstr));
cef_string_wide_to_utf8(s->str, s->length, &cstr);
@@ -72,23 +77,19 @@ struct CefStringTraitsWide {
cef_string_utf8_clear(&cstr);
return str;
}
static inline bool from_string(const std::string& str, struct_type *s)
{
static inline bool from_string(const std::string& str, struct_type *s) {
return cef_string_utf8_to_wide(str.c_str(), str.length(), s) ? true : false;
}
static inline std::wstring to_wstring(const struct_type *s)
{
static inline std::wstring to_wstring(const struct_type *s) {
return std::wstring(s->str, s->length);
}
static inline bool from_wstring(const std::wstring& str, struct_type *s)
{
static inline bool from_wstring(const std::wstring& str, struct_type *s) {
return cef_string_wide_set(str.c_str(), str.length(), s, true) ?
true : false;
}
#if defined(BUILDING_CEF_SHARED)
#if defined(WCHAR_T_IS_UTF32)
static inline string16 to_string16(const struct_type *s)
{
static inline string16 to_string16(const struct_type *s) {
cef_string_utf16_t cstr;
memset(&cstr, 0, sizeof(cstr));
cef_string_wide_to_utf16(s->str, s->length, &cstr);
@@ -98,23 +99,20 @@ struct CefStringTraitsWide {
cef_string_utf16_clear(&cstr);
return str;
}
static inline bool from_string16(const string16& str, struct_type *s)
{
static inline bool from_string16(const string16& str, struct_type *s) {
return cef_string_utf16_to_wide(str.c_str(), str.length(), s) ?
true : false;
}
#else // WCHAR_T_IS_UTF32
static inline string16 to_string16(const struct_type *s)
{
#else // WCHAR_T_IS_UTF32
static inline string16 to_string16(const struct_type *s) {
return string16(s->str, s->length);
}
static inline bool from_string16(const string16& str, struct_type *s)
{
static inline bool from_string16(const string16& str, struct_type *s) {
return cef_string_wide_set(str.c_str(), str.length(), s, true) ?
true : false;
}
#endif // WCHAR_T_IS_UTF32
#endif // BUILDING_CEF_SHARED
#endif // WCHAR_T_IS_UTF32
#endif // BUILDING_CEF_SHARED
};
///
@@ -124,33 +122,33 @@ struct CefStringTraitsUTF8 {
typedef char char_type;
typedef cef_string_utf8_t struct_type;
typedef cef_string_userfree_utf8_t userfree_struct_type;
static inline void clear(struct_type *s) { cef_string_utf8_clear(s); }
static inline int set(const char_type* src, size_t src_size,
struct_type *output, int copy)
{ return cef_string_utf8_set(src, src_size, output, copy); }
static inline int compare(const struct_type* s1, const struct_type* s2)
{ return cef_string_utf8_cmp(s1, s2); }
static inline userfree_struct_type userfree_alloc()
{ return cef_string_userfree_utf8_alloc(); }
static inline void userfree_free(userfree_struct_type ufs)
{ return cef_string_userfree_utf8_free(ufs); }
struct_type* output, int copy) {
return cef_string_utf8_set(src, src_size, output, copy);
}
static inline int compare(const struct_type* s1, const struct_type* s2) {
return cef_string_utf8_cmp(s1, s2);
}
static inline userfree_struct_type userfree_alloc() {
return cef_string_userfree_utf8_alloc();
}
static inline void userfree_free(userfree_struct_type ufs) {
return cef_string_userfree_utf8_free(ufs);
}
// Conversion methods.
static inline bool from_ascii(const char* str, size_t len, struct_type* s)
{
static inline bool from_ascii(const char* str, size_t len, struct_type* s) {
return cef_string_utf8_copy(str, len, s) ? true : false;
}
static inline std::string to_string(const struct_type* s)
{
static inline std::string to_string(const struct_type* s) {
return std::string(s->str, s->length);
}
static inline bool from_string(const std::string& str, struct_type* s)
{
static inline bool from_string(const std::string& str, struct_type* s) {
return cef_string_utf8_copy(str.c_str(), str.length(), s) ? true : false;
}
static inline std::wstring to_wstring(const struct_type* s)
{
static inline std::wstring to_wstring(const struct_type* s) {
cef_string_wide_t cstr;
memset(&cstr, 0, sizeof(cstr));
cef_string_utf8_to_wide(s->str, s->length, &cstr);
@@ -160,13 +158,11 @@ struct CefStringTraitsUTF8 {
cef_string_wide_clear(&cstr);
return str;
}
static inline bool from_wstring(const std::wstring& str, struct_type* s)
{
static inline bool from_wstring(const std::wstring& str, struct_type* s) {
return cef_string_wide_to_utf8(str.c_str(), str.length(), s) ? true : false;
}
#if defined(BUILDING_CEF_SHARED)
static inline string16 to_string16(const struct_type* s)
{
static inline string16 to_string16(const struct_type* s) {
cef_string_utf16_t cstr;
memset(&cstr, 0, sizeof(cstr));
cef_string_utf8_to_utf16(s->str, s->length, &cstr);
@@ -176,12 +172,11 @@ struct CefStringTraitsUTF8 {
cef_string_utf16_clear(&cstr);
return str;
}
static inline bool from_string16(const string16& str, struct_type* s)
{
static inline bool from_string16(const string16& str, struct_type* s) {
return cef_string_utf16_to_utf8(str.c_str(), str.length(), s) ?
true : false;
}
#endif // BUILDING_CEF_SHARED
#endif // BUILDING_CEF_SHARED
};
///
@@ -191,25 +186,27 @@ struct CefStringTraitsUTF16 {
typedef char16 char_type;
typedef cef_string_utf16_t struct_type;
typedef cef_string_userfree_utf16_t userfree_struct_type;
static inline void clear(struct_type *s) { cef_string_utf16_clear(s); }
static inline int set(const char_type* src, size_t src_size,
struct_type *output, int copy)
{ return cef_string_utf16_set(src, src_size, output, copy); }
static inline int compare(const struct_type* s1, const struct_type* s2)
{ return cef_string_utf16_cmp(s1, s2); }
static inline userfree_struct_type userfree_alloc()
{ return cef_string_userfree_utf16_alloc(); }
static inline void userfree_free(userfree_struct_type ufs)
{ return cef_string_userfree_utf16_free(ufs); }
struct_type* output, int copy) {
return cef_string_utf16_set(src, src_size, output, copy);
}
static inline int compare(const struct_type* s1, const struct_type* s2) {
return cef_string_utf16_cmp(s1, s2);
}
static inline userfree_struct_type userfree_alloc() {
return cef_string_userfree_utf16_alloc();
}
static inline void userfree_free(userfree_struct_type ufs) {
return cef_string_userfree_utf16_free(ufs);
}
// Conversion methods.
static inline bool from_ascii(const char* str, size_t len, struct_type* s)
{
static inline bool from_ascii(const char* str, size_t len, struct_type* s) {
return cef_string_ascii_to_utf16(str, len, s) ? true : false;
}
static inline std::string to_string(const struct_type* s)
{
static inline std::string to_string(const struct_type* s) {
cef_string_utf8_t cstr;
memset(&cstr, 0, sizeof(cstr));
cef_string_utf16_to_utf8(s->str, s->length, &cstr);
@@ -219,14 +216,12 @@ struct CefStringTraitsUTF16 {
cef_string_utf8_clear(&cstr);
return str;
}
static inline bool from_string(const std::string& str, struct_type* s)
{
static inline bool from_string(const std::string& str, struct_type* s) {
return cef_string_utf8_to_utf16(str.c_str(), str.length(), s) ?
true : false;
}
#if defined(WCHAR_T_IS_UTF32)
static inline std::wstring to_wstring(const struct_type* s)
{
static inline std::wstring to_wstring(const struct_type* s) {
cef_string_wide_t cstr;
memset(&cstr, 0, sizeof(cstr));
cef_string_utf16_to_wide(s->str, s->length, &cstr);
@@ -236,33 +231,28 @@ struct CefStringTraitsUTF16 {
cef_string_wide_clear(&cstr);
return str;
}
static inline bool from_wstring(const std::wstring& str, struct_type* s)
{
static inline bool from_wstring(const std::wstring& str, struct_type* s) {
return cef_string_wide_to_utf16(str.c_str(), str.length(), s) ?
true : false;
}
#else // WCHAR_T_IS_UTF32
static inline std::wstring to_wstring(const struct_type* s)
{
#else // WCHAR_T_IS_UTF32
static inline std::wstring to_wstring(const struct_type* s) {
return std::wstring(s->str, s->length);
}
static inline bool from_wstring(const std::wstring& str, struct_type* s)
{
static inline bool from_wstring(const std::wstring& str, struct_type* s) {
return cef_string_utf16_set(str.c_str(), str.length(), s, true) ?
true : false;
}
#endif // WCHAR_T_IS_UTF32
#endif // WCHAR_T_IS_UTF32
#if defined(BUILDING_CEF_SHARED)
static inline string16 to_string16(const struct_type* s)
{
static inline string16 to_string16(const struct_type* s) {
return string16(s->str, s->length);
}
static inline bool from_string16(const string16& str, struct_type* s)
{
static inline bool from_string16(const string16& str, struct_type* s) {
return cef_string_utf16_set(str.c_str(), str.length(), s, true) ?
true : false;
}
#endif // BUILDING_CEF_SHARED
#endif // BUILDING_CEF_SHARED
};
///
@@ -295,7 +285,7 @@ struct CefStringTraitsUTF16 {
///
template <class traits>
class CefStringBase {
public:
public:
typedef typename traits::char_type char_type;
typedef typename traits::struct_type struct_type;
typedef typename traits::userfree_struct_type userfree_struct_type;
@@ -304,32 +294,42 @@ public:
// Default constructor.
///
CefStringBase() : string_(NULL), owner_(false) {}
///
// Create a new string from an existing string. Data will always be copied.
///
CefStringBase(const CefStringBase& str) : string_(NULL), owner_(false)
{ FromString(str.c_str(), str.length(), true); }
CefStringBase(const CefStringBase& str)
: string_(NULL), owner_(false) {
FromString(str.c_str(), str.length(), true);
}
///
// Create a new string from an existing std::string. Data will be always
// copied. Translation will occur if necessary based on the underlying string
// type.
///
CefStringBase(const std::string& src) : string_(NULL), owner_(false)
{ FromString(src); }
CefStringBase(const char* src) : string_(NULL), owner_(false)
{ FromString(std::string(src)); }
CefStringBase(const std::string& src) // NOLINT(runtime/explicit)
: string_(NULL), owner_(false) {
FromString(src);
}
CefStringBase(const char* src) // NOLINT(runtime/explicit)
: string_(NULL), owner_(false) {
FromString(std::string(src));
}
///
// Create a new string from an existing std::wstring. Data will be always
// copied. Translation will occur if necessary based on the underlying string
// type.
///
CefStringBase(const std::wstring& src) : string_(NULL), owner_(false)
{ FromWString(src); }
CefStringBase(const wchar_t* src) : string_(NULL), owner_(false)
{ FromWString(std::wstring(src)); }
CefStringBase(const std::wstring& src) // NOLINT(runtime/explicit)
: string_(NULL), owner_(false) {
FromWString(src);
}
CefStringBase(const wchar_t* src) // NOLINT(runtime/explicit)
: string_(NULL), owner_(false) {
FromWString(std::wstring(src));
}
#if (defined(BUILDING_CEF_SHARED) && defined(WCHAR_T_IS_UTF32))
///
@@ -337,12 +337,16 @@ public:
// copied. Translation will occur if necessary based on the underlying string
// type.
///
CefStringBase(const string16& src) : string_(NULL), owner_(false)
{ FromString16(src); }
CefStringBase(const char16* src) : string_(NULL), owner_(false)
{ FromString16(string16(src)); }
#endif // BUILDING_CEF_SHARED && WCHAR_T_IS_UTF32
CefStringBase(const string16& src) // NOLINT(runtime/explicit)
: string_(NULL), owner_(false) {
FromString16(src);
}
CefStringBase(const char16* src) // NOLINT(runtime/explicit)
: string_(NULL), owner_(false) {
FromString16(string16(src));
}
#endif // BUILDING_CEF_SHARED && WCHAR_T_IS_UTF32
///
// Create a new string from an existing character array. If |copy| is true
// this class will copy the data. Otherwise, this class will reference the
@@ -350,16 +354,17 @@ public:
// and will not be freed by this class.
///
CefStringBase(const char_type* src, size_t src_len, bool copy)
: string_(NULL), owner_(false)
{ FromString(src, src_len, copy); }
: string_(NULL), owner_(false) {
FromString(src, src_len, copy);
}
///
// Create a new string referencing an existing string structure without taking
// ownership. Referenced structures must exist for the lifetime of this class
// and will not be freed by this class.
///
CefStringBase(const struct_type* src) : string_(NULL), owner_(false)
{
CefStringBase(const struct_type* src) // NOLINT(runtime/explicit)
: string_(NULL), owner_(false) {
if (!src)
return;
// Reference the existing structure without taking ownership.
@@ -376,17 +381,17 @@ public:
// Return a read-only pointer to the string data.
///
const char_type* c_str() const { return (string_ ? string_->str : NULL); }
///
// Return the length of the string data.
///
size_t length() const { return (string_ ? string_->length : 0); }
///
// Return the length of the string data.
///
inline size_t size() const { return length(); }
///
// Returns true if the string is empty.
///
@@ -395,8 +400,7 @@ public:
///
// Compare this string to the specified string.
///
int compare(const CefStringBase& str) const
{
int compare(const CefStringBase& str) const {
if (empty() && str.empty())
return 0;
if (empty())
@@ -405,13 +409,12 @@ public:
return 1;
return traits::compare(string_, str.GetStruct());
}
///
// Clear the string data.
///
void clear()
{
if (!empty())
void clear() {
if (string_)
traits::clear(string_);
}
@@ -422,29 +425,27 @@ public:
// Returns true if this class owns the underlying string structure.
///
bool IsOwner() const { return owner_; }
///
// Returns a read-only pointer to the underlying string structure. May return
// NULL if no structure is currently allocated.
///
const struct_type* GetStruct() const { return string_; }
///
// Returns a writable pointer to the underlying string structure. Will never
// return NULL.
///
struct_type* GetWritableStruct()
{
struct_type* GetWritableStruct() {
AllocIfNeeded();
return string_;
}
///
// Clear the state of this class. The underlying string structure and data
// will be freed if this class owns the structure.
///
void ClearAndFree()
{
void ClearAndFree() {
if (!string_)
return;
if (owner_) {
@@ -459,11 +460,10 @@ public:
// Attach to the specified string structure. If |owner| is true this class
// will take ownership of the structure.
///
void Attach(struct_type* str, bool owner)
{
void Attach(struct_type* str, bool owner) {
// Free the previous structure and data, if any.
ClearAndFree();
string_ = str;
owner_ = owner;
}
@@ -473,8 +473,7 @@ public:
// userfree structure itself will be freed. Only use this method with userfree
// structures.
///
void AttachToUserFree(userfree_struct_type str)
{
void AttachToUserFree(userfree_struct_type str) {
// Free the previous structure and data, if any.
ClearAndFree();
@@ -484,7 +483,7 @@ public:
AllocIfNeeded();
owner_ = true;
memcpy(string_, str, sizeof(struct_type));
// Free the |str| structure but not the data.
memset(str, 0, sizeof(struct_type));
traits::userfree_free(str);
@@ -495,8 +494,7 @@ public:
// this method if you already hold a pointer to the underlying string
// structure.
///
void Detach()
{
void Detach() {
string_ = NULL;
owner_ = false;
}
@@ -506,14 +504,13 @@ public:
// data. This class will be disassociated from the data. May return NULL if
// this string class currently contains no data.
///
userfree_struct_type DetachToUserFree()
{
userfree_struct_type DetachToUserFree() {
if (empty())
return NULL;
userfree_struct_type str = traits::userfree_alloc();
memcpy(str, string_, sizeof(struct_type));
// Free this class' structure but not the data.
memset(string_, 0, sizeof(struct_type));
ClearAndFree();
@@ -527,8 +524,7 @@ public:
// existing data. Referenced data must exist for the lifetime of this class
// and will not be freed by this class.
///
bool FromString(const char_type* src, size_t src_len, bool copy)
{
bool FromString(const char_type* src, size_t src_len, bool copy) {
if (src == NULL || src_len == 0) {
clear();
return true;
@@ -536,14 +532,13 @@ public:
AllocIfNeeded();
return traits::set(src, src_len, string_, copy) ? true : false;
}
///
// Set this string's data from an existing ASCII string. Data will be always
// copied. Translation will occur if necessary based on the underlying string
// type.
///
bool FromASCII(const char* str)
{
bool FromASCII(const char* str) {
size_t len = str ? strlen(str) : 0;
if (len == 0) {
clear();
@@ -552,25 +547,23 @@ public:
AllocIfNeeded();
return traits::from_ascii(str, len, string_);
}
///
// Return this string's data as a std::string. Translation will occur if
// necessary based on the underlying string type.
///
std::string ToString() const
{
std::string ToString() const {
if (empty())
return std::string();
return traits::to_string(string_);
}
///
// Set this string's data from an existing std::string. Data will be always
// copied. Translation will occur if necessary based on the underlying string
// type.
///
bool FromString(const std::string& str)
{
bool FromString(const std::string& str) {
if (str.empty()) {
clear();
return true;
@@ -578,25 +571,23 @@ public:
AllocIfNeeded();
return traits::from_string(str, string_);
}
///
// Return this string's data as a std::wstring. Translation will occur if
// necessary based on the underlying string type.
///
std::wstring ToWString() const
{
std::wstring ToWString() const {
if (empty())
return std::wstring();
return traits::to_wstring(string_);
}
///
// Set this string's data from an existing std::wstring. Data will be always
// copied. Translation will occur if necessary based on the underlying string
// type.
///
bool FromWString(const std::wstring& str)
{
bool FromWString(const std::wstring& str) {
if (str.empty()) {
clear();
return true;
@@ -609,20 +600,18 @@ public:
// Return this string's data as a string16. Translation will occur if
// necessary based on the underlying string type.
///
string16 ToString16() const
{
string16 ToString16() const {
if (empty())
return string16();
return traits::to_string16(string_);
}
///
// Set this string's data from an existing string16. Data will be always
// copied. Translation will occur if necessary based on the underlying string
// type.
///
bool FromString16(const string16& str)
{
bool FromString16(const string16& str) {
if (str.empty()) {
clear();
return true;
@@ -630,51 +619,76 @@ public:
AllocIfNeeded();
return traits::from_string16(str, string_);
}
#endif // BUILDING_CEF_SHARED
#endif // BUILDING_CEF_SHARED
///
// Comparison operator overloads.
///
bool operator<(const CefStringBase& str) const
{ return (compare(str) < 0); }
bool operator<=(const CefStringBase& str) const
{ return (compare(str) <= 0); }
bool operator>(const CefStringBase& str) const
{ return (compare(str) > 0); }
bool operator>=(const CefStringBase& str) const
{ return (compare(str) >= 0); }
bool operator==(const CefStringBase& str) const
{ return (compare(str) == 0); }
bool operator!=(const CefStringBase& str) const
{ return (compare(str) != 0); }
bool operator<(const CefStringBase& str) const {
return (compare(str) < 0);
}
bool operator<=(const CefStringBase& str) const {
return (compare(str) <= 0);
}
bool operator>(const CefStringBase& str) const {
return (compare(str) > 0);
}
bool operator>=(const CefStringBase& str) const {
return (compare(str) >= 0);
}
bool operator==(const CefStringBase& str) const {
return (compare(str) == 0);
}
bool operator!=(const CefStringBase& str) const {
return (compare(str) != 0);
}
///
// Assignment operator overloads.
///
CefStringBase& operator=(const CefStringBase& str)
{ FromString(str.c_str(), str.length(), true); return *this; }
operator std::string() const { return ToString(); }
CefStringBase& operator=(const std::string& str)
{ FromString(str); return *this; }
CefStringBase& operator=(const char* str)
{ FromString(std::string(str)); return *this; }
operator std::wstring() const { return ToWString(); }
CefStringBase& operator=(const std::wstring& str)
{ FromWString(str); return *this; }
CefStringBase& operator=(const wchar_t* str)
{ FromWString(std::wstring(str)); return *this; }
CefStringBase& operator=(const CefStringBase& str) {
FromString(str.c_str(), str.length(), true);
return *this;
}
operator std::string() const {
return ToString();
}
CefStringBase& operator=(const std::string& str) {
FromString(str);
return *this;
}
CefStringBase& operator=(const char* str) {
FromString(std::string(str));
return *this;
}
operator std::wstring() const {
return ToWString();
}
CefStringBase& operator=(const std::wstring& str) {
FromWString(str);
return *this;
}
CefStringBase& operator=(const wchar_t* str) {
FromWString(std::wstring(str));
return *this;
}
#if (defined(BUILDING_CEF_SHARED) && defined(WCHAR_T_IS_UTF32))
operator string16() const { return ToString16(); }
CefStringBase& operator=(const string16& str)
{ FromString16(str); return *this; }
CefStringBase& operator=(const char16* str)
{ FromString16(string16(str)); return *this; }
#endif // BUILDING_CEF_SHARED && WCHAR_T_IS_UTF32
operator string16() const {
return ToString16();
}
CefStringBase& operator=(const string16& str) {
FromString16(str);
return *this;
}
CefStringBase& operator=(const char16* str) {
FromString16(string16(str));
return *this;
}
#endif // BUILDING_CEF_SHARED && WCHAR_T_IS_UTF32
private:
private:
// Allocate the string structure if it doesn't already exist.
void AllocIfNeeded()
{
void AllocIfNeeded() {
if (string_ == NULL) {
string_ = new struct_type;
memset(string_, 0, sizeof(struct_type));
@@ -691,4 +705,4 @@ typedef CefStringBase<CefStringTraitsWide> CefStringWide;
typedef CefStringBase<CefStringTraitsUTF8> CefStringUTF8;
typedef CefStringBase<CefStringTraitsUTF16> CefStringUTF16;
#endif // _CEF_STRING_WRAPPERS_H
#endif // CEF_INCLUDE_INTERNAL_CEF_STRING_WRAPPERS_H_

14
cef/include/internal/cef_time.h Executable file → Normal file
View File

@@ -27,24 +27,26 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_TIME_H
#define _CEF_TIME_H
#ifndef CEF_INCLUDE_INTERNAL_CEF_TIME_H_
#define CEF_INCLUDE_INTERNAL_CEF_TIME_H_
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include "cef_export.h"
#include "include/internal/cef_export.h"
#include <time.h>
///
// Time information. Values should always be in UTC.
///
typedef struct _cef_time_t
{
typedef struct _cef_time_t {
int year; // Four digit year "2007"
int month; // 1-based month (values 1 = January, etc.)
#if !defined(OS_MACOSX)
int day_of_week; // 0-based day of week (0 = Sunday, etc.)
#endif
int day_of_month; // 1-based day of month (1-31)
int hour; // Hour within the current day (0-23)
int minute; // Minute within the current hour (0-59)
@@ -73,4 +75,4 @@ CEF_EXPORT int cef_time_from_doublet(double time, cef_time_t* cef_time);
}
#endif
#endif // _CEF_TIME_H
#endif // CEF_INCLUDE_INTERNAL_CEF_TIME_H_

9
cef/include/internal/cef_tuple.h Executable file → Normal file
View File

@@ -53,8 +53,8 @@
// DispatchToMethod(&foo, &Foo::SomeMeth, MakeTuple(1, 2, 3));
// // foo->SomeMeth(1, 2, 3);
#ifndef BASE_TUPLE_H__
#define BASE_TUPLE_H__
#ifndef CEF_INCLUDE_INTERNAL_CEF_TUPLE_H_
#define CEF_INCLUDE_INTERNAL_CEF_TUPLE_H_
#pragma once
#if defined(OS_CHROMEOS)
@@ -144,7 +144,7 @@ struct Tuple3 {
Tuple3(typename TupleTraits<A>::ParamType a,
typename TupleTraits<B>::ParamType b,
typename TupleTraits<C>::ParamType c)
: a(a), b(b), c(c){
: a(a), b(b), c(c) {
}
A a;
@@ -575,7 +575,6 @@ inline void DispatchToMethod(ObjT* obj, Method method, const A& arg) {
template <class ObjT, class Method, class A>
inline void DispatchToMethod(ObjT* obj, Method method, const Tuple1<A>& arg) {
#if defined(OS_CHROMEOS)
// To troubleshoot crosbug.com/7327.
CHECK(obj);
@@ -1080,4 +1079,4 @@ inline void DispatchToMethod(ObjT* obj, Method method,
&out->a, &out->b, &out->c, &out->d, &out->e);
}
#endif // BASE_TUPLE_H__
#endif // CEF_INCLUDE_INTERNAL_CEF_TUPLE_H_

220
cef/include/internal/cef_types.h Executable file → Normal file
View File

@@ -28,31 +28,37 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_TYPES_H
#define _CEF_TYPES_H
#ifndef CEF_INCLUDE_INTERNAL_CEF_TYPES_H_
#define CEF_INCLUDE_INTERNAL_CEF_TYPES_H_
#pragma once
#include "cef_build.h"
#include "cef_string.h"
#include "cef_string_list.h"
#include "cef_time.h"
#include "include/internal/cef_build.h"
#include "include/internal/cef_string.h"
#include "include/internal/cef_string_list.h"
#include "include/internal/cef_time.h"
// Bring in platform-specific definitions.
#if defined(OS_WIN)
#include "cef_types_win.h"
#include "include/internal/cef_types_win.h"
#elif defined(OS_MACOSX)
#include "cef_types_mac.h"
#include "include/internal/cef_types_mac.h"
#elif defined(OS_LINUX)
#include "cef_types_linux.h"
#include "include/internal/cef_types_linux.h"
#endif
// The NSPR system headers define 64-bit as |long| when possible. In order to
// not have typedef mismatches, we do the same on LP64.
#if __LP64__
typedef long int64;
typedef unsigned long uint64;
#include <stddef.h> // For size_t
// The NSPR system headers define 64-bit as |long| when possible, except on
// Mac OS X. In order to not have typedef mismatches, we do the same on LP64.
//
// On Mac OS X, |long long| is used for 64-bit types for compatibility with
// <inttypes.h> format macros even in the LP64 model.
#if defined(__LP64__) && !defined(OS_MACOSX) && !defined(OS_OPENBSD)
typedef long int64; // NOLINT(runtime/int)
typedef unsigned long uint64; // NOLINT(runtime/int)
#else
typedef long long int64;
typedef unsigned long long uint64;
typedef long long int64; // NOLINT(runtime/int)
typedef unsigned long long uint64; // NOLINT(runtime/int)
#endif
#ifdef __cplusplus
@@ -62,8 +68,7 @@ extern "C" {
///
// Log severity levels.
///
enum cef_log_severity_t
{
enum cef_log_severity_t {
LOGSEVERITY_VERBOSE = -1,
LOGSEVERITY_INFO,
LOGSEVERITY_WARNING,
@@ -77,8 +82,7 @@ enum cef_log_severity_t
// Initialization settings. Specify NULL or 0 to get the recommended default
// values.
///
typedef struct _cef_settings_t
{
typedef struct _cef_settings_t {
///
// Size of this structure.
///
@@ -90,14 +94,14 @@ typedef struct _cef_settings_t
// your application message loop.
///
bool multi_threaded_message_loop;
///
// The location where cache data will be stored on disk. If empty an
// in-memory cache will be used. HTML5 databases such as localStorage will
// only persist across sessions if a cache path is specified.
///
cef_string_t cache_path;
///
// Value that will be returned as the User-Agent HTTP header. If empty the
// default User-Agent string will be used.
@@ -113,7 +117,9 @@ typedef struct _cef_settings_t
///
// The locale string that will be passed to WebKit. If empty the default
// locale of "en-US" will be used.
// locale of "en-US" will be used. This value is ignored on Linux where locale
// is determined using environment variable parsing with the precedence order:
// LANGUAGE, LC_ALL, LC_MESSAGES and LANG.
///
cef_string_t locale;
@@ -160,12 +166,36 @@ typedef struct _cef_settings_t
#if defined(OS_WIN)
///
// Set to true (1) to use the system proxy resolver on Windows when
// Set to true (1) to use the system proxy resolver on Windows when
// "Automatically detect settings" is checked. This setting is disabled
// by default for performance reasons.
///
bool auto_detect_proxy_settings_enabled;
#endif
///
// The fully qualified path for the cef.pak file. If this value is empty
// the cef.pak file must be located in the module directory. This value is
// ignored on Mac OS X where pack files are always loaded from the app bundle
// resource directory.
///
cef_string_t pack_file_path;
///
// The fully qualified path for the locales directory. If this value is empty
// the locales directory must be located in the module directory. This value
// is ignored on Mac OS X where pack files are always loaded from the app
// bundle resource directory.
///
cef_string_t locales_dir_path;
///
// Set to true (1) to disable loading of pack files for resources and locales.
// A resource bundle handler must be provided for the browser and renderer
// processes via CefApp::GetResourceBundleHandler() if loading of pack files
// is disabled.
///
bool pack_loading_disabled;
} cef_settings_t;
///
@@ -173,8 +203,7 @@ typedef struct _cef_settings_t
// default values. The consequences of using custom values may not be well
// tested.
///
typedef struct _cef_browser_settings_t
{
typedef struct _cef_browser_settings_t {
///
// Size of this structure.
///
@@ -328,7 +357,7 @@ typedef struct _cef_browser_settings_t
// Set to true (1) to enable the user style sheet for all pages.
///
bool user_style_sheet_enabled;
///
// Location of the user style sheet. This must be a data URL of the form
// "data:text/css;charset=utf-8;base64,csscontent" where "csscontent" is the
@@ -391,9 +420,14 @@ typedef struct _cef_browser_settings_t
bool accelerated_2d_canvas_disabled;
///
// Set to true (1) to disable accelerated drawing.
// Set to true (1) to disable accelerated painting.
///
bool accelerated_drawing_disabled;
bool accelerated_painting_disabled;
///
// Set to true (1) to disable accelerated filters.
///
bool accelerated_filters_disabled;
///
// Set to true (1) to disable accelerated plugins.
@@ -414,8 +448,7 @@ typedef struct _cef_browser_settings_t
///
// URL component parts.
///
typedef struct _cef_urlparts_t
{
typedef struct _cef_urlparts_t {
///
// The complete URL specification.
///
@@ -461,8 +494,7 @@ typedef struct _cef_urlparts_t
///
// Cookie information.
///
typedef struct _cef_cookie_t
{
typedef struct _cef_cookie_t {
///
// The cookie name.
///
@@ -501,7 +533,7 @@ typedef struct _cef_cookie_t
// cookie creation.
///
cef_time_t creation;
///
// The cookie last access date. This is automatically populated by the system
// on access.
@@ -518,8 +550,7 @@ typedef struct _cef_cookie_t
///
// Storage types.
///
enum cef_storage_type_t
{
enum cef_storage_type_t {
ST_LOCALSTORAGE = 0,
ST_SESSIONSTORAGE,
};
@@ -527,8 +558,7 @@ enum cef_storage_type_t
///
// Mouse button types.
///
enum cef_mouse_button_type_t
{
enum cef_mouse_button_type_t {
MBT_LEFT = 0,
MBT_MIDDLE,
MBT_RIGHT,
@@ -537,8 +567,7 @@ enum cef_mouse_button_type_t
///
// Key types.
///
enum cef_key_type_t
{
enum cef_key_type_t {
KT_KEYUP = 0,
KT_KEYDOWN,
KT_CHAR,
@@ -547,8 +576,7 @@ enum cef_key_type_t
///
// Various browser navigation types supported by chrome.
///
enum cef_handler_navtype_t
{
enum cef_handler_navtype_t {
NAVTYPE_LINKCLICKED = 0,
NAVTYPE_FORMSUBMITTED,
NAVTYPE_BACKFORWARD,
@@ -562,8 +590,7 @@ enum cef_handler_navtype_t
// Supported error code values. See net\base\net_error_list.h for complete
// descriptions of the error codes.
///
enum cef_handler_errorcode_t
{
enum cef_handler_errorcode_t {
ERR_FAILED = -2,
ERR_ABORTED = -3,
ERR_INVALID_ARGUMENT = -4,
@@ -619,8 +646,7 @@ enum cef_handler_errorcode_t
// destination. These constants match their equivalents in WebCore's
// DragActions.h and should not be renumbered.
///
enum cef_drag_operations_mask_t
{
enum cef_drag_operations_mask_t {
DRAG_OPERATION_NONE = 0,
DRAG_OPERATION_COPY = 1,
DRAG_OPERATION_LINK = 2,
@@ -634,8 +660,7 @@ enum cef_drag_operations_mask_t
///
// V8 access control values.
///
enum cef_v8_accesscontrol_t
{
enum cef_v8_accesscontrol_t {
V8_ACCESS_CONTROL_DEFAULT = 0,
V8_ACCESS_CONTROL_ALL_CAN_READ = 1,
V8_ACCESS_CONTROL_ALL_CAN_WRITE = 1 << 1,
@@ -645,9 +670,8 @@ enum cef_v8_accesscontrol_t
///
// V8 property attribute values.
///
enum cef_v8_propertyattribute_t
{
V8_PROPERTY_ATTRIBUTE_NONE = 0, // Writeable, Enumerable,
enum cef_v8_propertyattribute_t {
V8_PROPERTY_ATTRIBUTE_NONE = 0, // Writeable, Enumerable,
// Configurable
V8_PROPERTY_ATTRIBUTE_READONLY = 1 << 0, // Not writeable
V8_PROPERTY_ATTRIBUTE_DONTENUM = 1 << 1, // Not enumerable
@@ -657,8 +681,7 @@ enum cef_v8_propertyattribute_t
///
// Structure representing menu information.
///
typedef struct _cef_menu_info_t
{
typedef struct _cef_menu_info_t {
///
// Values from the cef_handler_menutypebits_t enumeration.
///
@@ -690,8 +713,7 @@ typedef struct _cef_menu_info_t
// The cef_menu_info_t typeFlags value will be a combination of the
// following values.
///
enum cef_menu_typebits_t
{
enum cef_menu_typebits_t {
///
// No node is selected
///
@@ -738,8 +760,7 @@ enum cef_menu_typebits_t
// The cef_menu_info_t editFlags value will be a combination of the
// following values.
///
enum cef_menu_capabilitybits_t
{
enum cef_menu_capabilitybits_t {
// Values from WebContextMenuData::EditFlags in WebContextMenuData.h
MENU_CAN_DO_NONE = 0x0,
MENU_CAN_UNDO = 0x1,
@@ -758,8 +779,7 @@ enum cef_menu_capabilitybits_t
///
// Supported menu ID values.
///
enum cef_menu_id_t
{
enum cef_menu_id_t {
MENU_ID_NAV_BACK = 10,
MENU_ID_NAV_FORWARD = 11,
MENU_ID_NAV_RELOAD = 12,
@@ -776,8 +796,7 @@ enum cef_menu_id_t
MENU_ID_VIEWSOURCE = 31,
};
enum cef_paint_element_type_t
{
enum cef_paint_element_type_t {
PET_VIEW = 0,
PET_POPUP,
};
@@ -785,15 +804,13 @@ enum cef_paint_element_type_t
///
// Post data elements may represent either bytes or files.
///
enum cef_postdataelement_type_t
{
enum cef_postdataelement_type_t {
PDE_TYPE_EMPTY = 0,
PDE_TYPE_BYTES,
PDE_TYPE_FILE,
};
enum cef_weburlrequest_flags_t
{
enum cef_weburlrequest_flags_t {
WUR_FLAG_NONE = 0,
WUR_FLAG_SKIP_CACHE = 0x1,
WUR_FLAG_ALLOW_CACHED_CREDENTIALS = 0x2,
@@ -803,8 +820,7 @@ enum cef_weburlrequest_flags_t
WUR_FLAG_REPORT_RAW_HEADERS = 0x20
};
enum cef_weburlrequest_state_t
{
enum cef_weburlrequest_state_t {
WUR_STATE_UNSENT = 0,
WUR_STATE_STARTED = 1,
WUR_STATE_HEADERS_RECEIVED = 2,
@@ -817,8 +833,7 @@ enum cef_weburlrequest_state_t
///
// Focus sources.
///
enum cef_handler_focus_source_t
{
enum cef_handler_focus_source_t {
///
// The source is explicit navigation via the API (LoadURL(), etc).
///
@@ -836,8 +851,7 @@ enum cef_handler_focus_source_t
///
// Key event types.
///
enum cef_handler_keyevent_type_t
{
enum cef_handler_keyevent_type_t {
KEYEVENT_RAWKEYDOWN = 0,
KEYEVENT_KEYDOWN,
KEYEVENT_KEYUP,
@@ -847,8 +861,7 @@ enum cef_handler_keyevent_type_t
///
// Key event modifiers.
///
enum cef_handler_keyevent_modifiers_t
{
enum cef_handler_keyevent_modifiers_t {
KEY_SHIFT = 1 << 0,
KEY_CTRL = 1 << 1,
KEY_ALT = 1 << 2,
@@ -858,8 +871,7 @@ enum cef_handler_keyevent_modifiers_t
///
// Structure representing a rectangle.
///
typedef struct _cef_rect_t
{
typedef struct _cef_rect_t {
int x;
int y;
int width;
@@ -869,8 +881,7 @@ typedef struct _cef_rect_t
///
// Existing thread IDs.
///
enum cef_thread_id_t
{
enum cef_thread_id_t {
TID_UI = 0,
TID_IO = 1,
TID_FILE = 2,
@@ -879,8 +890,7 @@ enum cef_thread_id_t
///
// Paper type for printing.
///
enum cef_paper_type_t
{
enum cef_paper_type_t {
PT_LETTER = 0,
PT_LEGAL,
PT_EXECUTIVE,
@@ -892,11 +902,10 @@ enum cef_paper_type_t
///
// Paper metric information for printing.
///
struct cef_paper_metrics
{
struct cef_paper_metrics {
enum cef_paper_type_t paper_type;
//Length and width needed if paper_type is custom_size
//Units are in inches.
// Length and width needed if paper_type is custom_size
// Units are in inches.
double length;
double width;
};
@@ -904,14 +913,13 @@ struct cef_paper_metrics
///
// Paper print margins.
///
struct cef_print_margins
{
//Margin size in inches for left/right/top/bottom (this is content margins).
struct cef_print_margins {
// Margin size in inches for left/right/top/bottom (this is content margins).
double left;
double right;
double top;
double bottom;
//Margin size (top/bottom) in inches for header/footer.
// Margin size (top/bottom) in inches for header/footer.
double header;
double footer;
};
@@ -919,8 +927,7 @@ struct cef_print_margins
///
// Page orientation for printing.
///
enum cef_page_orientation
{
enum cef_page_orientation {
PORTRAIT = 0,
LANDSCAPE
};
@@ -928,8 +935,7 @@ enum cef_page_orientation
///
// Printing options.
///
typedef struct _cef_print_options_t
{
typedef struct _cef_print_options_t {
enum cef_page_orientation page_orientation;
struct cef_paper_metrics paper_metrics;
struct cef_print_margins paper_margins;
@@ -941,8 +947,7 @@ typedef struct _cef_print_options_t
// before being passed to the parser. If a BOM is detected and the correct
// decoder is available then that decoder will be used automatically.
///
enum cef_xml_encoding_type_t
{
enum cef_xml_encoding_type_t {
XML_ENCODING_NONE = 0,
XML_ENCODING_UTF8,
XML_ENCODING_UTF16LE,
@@ -953,8 +958,7 @@ enum cef_xml_encoding_type_t
///
// XML node types.
///
enum cef_xml_node_type_t
{
enum cef_xml_node_type_t {
XML_NODE_UNSUPPORTED = 0,
XML_NODE_PROCESSING_INSTRUCTION,
XML_NODE_DOCUMENT_TYPE,
@@ -971,8 +975,7 @@ enum cef_xml_node_type_t
///
// Status message types.
///
enum cef_handler_statustype_t
{
enum cef_handler_statustype_t {
STATUSTYPE_TEXT = 0,
STATUSTYPE_MOUSEOVER_URL,
STATUSTYPE_KEYBOARD_FOCUS_URL,
@@ -981,8 +984,7 @@ enum cef_handler_statustype_t
///
// Popup window features.
///
typedef struct _cef_popup_features_t
{
typedef struct _cef_popup_features_t {
int x;
bool xSet;
int y;
@@ -1007,8 +1009,7 @@ typedef struct _cef_popup_features_t
///
// DOM document types.
///
enum cef_dom_document_type_t
{
enum cef_dom_document_type_t {
DOM_DOCUMENT_TYPE_UNKNOWN = 0,
DOM_DOCUMENT_TYPE_HTML,
DOM_DOCUMENT_TYPE_XHTML,
@@ -1018,8 +1019,7 @@ enum cef_dom_document_type_t
///
// DOM event category flags.
///
enum cef_dom_event_category_t
{
enum cef_dom_event_category_t {
DOM_EVENT_CATEGORY_UNKNOWN = 0x0,
DOM_EVENT_CATEGORY_UI = 0x1,
DOM_EVENT_CATEGORY_MOUSE = 0x2,
@@ -1045,8 +1045,7 @@ enum cef_dom_event_category_t
///
// DOM event processing phases.
///
enum cef_dom_event_phase_t
{
enum cef_dom_event_phase_t {
DOM_EVENT_PHASE_UNKNOWN = 0,
DOM_EVENT_PHASE_CAPTURING,
DOM_EVENT_PHASE_AT_TARGET,
@@ -1056,8 +1055,7 @@ enum cef_dom_event_phase_t
///
// DOM node types.
///
enum cef_dom_node_type_t
{
enum cef_dom_node_type_t {
DOM_NODE_TYPE_UNSUPPORTED = 0,
DOM_NODE_TYPE_ELEMENT,
DOM_NODE_TYPE_ATTRIBUTE,
@@ -1077,8 +1075,7 @@ enum cef_dom_node_type_t
///
// Proxy types.
///
enum cef_proxy_type_t
{
enum cef_proxy_type_t {
PROXY_TYPE_DIRECT = 0,
PROXY_TYPE_NAMED,
PROXY_TYPE_PAC_STRING,
@@ -1087,8 +1084,7 @@ enum cef_proxy_type_t
///
// Proxy information.
///
typedef struct _cef_proxy_info_t
{
typedef struct _cef_proxy_info_t {
enum cef_proxy_type_t proxyType;
cef_string_t proxyList;
} cef_proxy_info_t;
@@ -1097,4 +1093,4 @@ typedef struct _cef_proxy_info_t
}
#endif
#endif // _CEF_TYPES_H
#endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_H_

24
cef/include/internal/cef_types_mac.h Executable file → Normal file
View File

@@ -28,11 +28,14 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_TYPES_MAC_H
#define _CEF_TYPES_MAC_H
#ifndef CEF_INCLUDE_INTERNAL_CEF_TYPES_MAC_H_
#define CEF_INCLUDE_INTERNAL_CEF_TYPES_MAC_H_
#pragma once
#include "include/internal/cef_build.h"
#if defined(OS_MACOSX)
#include "cef_string.h"
#include "include/internal/cef_string.h"
// Window handle.
#ifdef __cplusplus
@@ -54,8 +57,7 @@ extern "C" {
///
// Supported graphics implementations.
///
enum cef_graphics_implementation_t
{
enum cef_graphics_implementation_t {
DESKTOP_IN_PROCESS = 0,
DESKTOP_IN_PROCESS_COMMAND_BUFFER,
};
@@ -63,8 +65,7 @@ enum cef_graphics_implementation_t
///
// Class representing window information.
///
typedef struct _cef_window_info_t
{
typedef struct _cef_window_info_t {
cef_string_t m_windowName;
int m_x;
int m_y;
@@ -74,7 +75,7 @@ typedef struct _cef_window_info_t
// NSView pointer for the parent view.
cef_window_handle_t m_ParentView;
// NSView pointer for the new browser view.
cef_window_handle_t m_View;
} cef_window_info_t;
@@ -82,8 +83,7 @@ typedef struct _cef_window_info_t
///
// Class representing print context information.
///
typedef struct _cef_print_info_t
{
typedef struct _cef_print_info_t {
double m_Scale;
} cef_print_info_t;
@@ -91,6 +91,6 @@ typedef struct _cef_print_info_t
}
#endif
#endif // OS_MACOSX
#endif // OS_MACOSX
#endif // _CEF_TYPES_MAC_H
#endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_MAC_H_

206
cef/include/internal/cef_types_wrappers.h Executable file → Normal file
View File

@@ -27,40 +27,37 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_TYPES_WRAPPERS_H
#define _CEF_TYPES_WRAPPERS_H
#ifndef CEF_INCLUDE_INTERNAL_CEF_TYPES_WRAPPERS_H_
#define CEF_INCLUDE_INTERNAL_CEF_TYPES_WRAPPERS_H_
#pragma once
#include "cef_string.h"
#include "cef_string_list.h"
#include "cef_types.h"
#include "include/internal/cef_string.h"
#include "include/internal/cef_string_list.h"
#include "include/internal/cef_types.h"
///
// Template class that provides common functionality for CEF structure wrapping.
///
template <class traits>
class CefStructBase : public traits::struct_type {
public:
public:
typedef typename traits::struct_type struct_type;
CefStructBase() : attached_to_(NULL)
{
CefStructBase() : attached_to_(NULL) {
Init();
}
virtual ~CefStructBase()
{
virtual ~CefStructBase() {
// Only clear this object's data if it isn't currently attached to a
// structure.
if (!attached_to_)
Clear(this);
Clear(this);
}
CefStructBase(const CefStructBase& r)
{
CefStructBase(const CefStructBase& r) {
Init();
*this = r;
}
CefStructBase(const struct_type& r)
{
CefStructBase(const struct_type& r) { // NOLINT(runtime/explicit)
Init();
*this = r;
}
@@ -68,8 +65,7 @@ public:
///
// Clear this object's values.
///
void Reset()
{
void Reset() {
Clear(this);
Init();
}
@@ -78,16 +74,15 @@ public:
// Attach to the source structure's existing values. DetachTo() can be called
// to insert the values back into the existing structure.
///
void AttachTo(struct_type& source)
{
void AttachTo(struct_type& source) {
// Only clear this object's data if it isn't currently attached to a
// structure.
if (!attached_to_)
Clear(this);
// This object is now attached to the new structure.
attached_to_ = &source;
// Transfer ownership of the values from the source structure.
memcpy(static_cast<struct_type*>(this), &source, sizeof(struct_type));
}
@@ -95,8 +90,7 @@ public:
///
// Relinquish ownership of values to the target structure.
///
void DetachTo(struct_type& target)
{
void DetachTo(struct_type& target) {
if (attached_to_ != &target) {
// Clear the target structure's values only if we are not currently
// attached to that structure.
@@ -114,25 +108,21 @@ public:
// Set this object's values. If |copy| is true the source structure's values
// will be copied instead of referenced.
///
void Set(const struct_type& source, bool copy)
{
void Set(const struct_type& source, bool copy) {
traits::set(&source, this, copy);
}
CefStructBase& operator=(const CefStructBase& s)
{
CefStructBase& operator=(const CefStructBase& s) {
return operator=(static_cast<const struct_type&>(s));
}
CefStructBase& operator=(const struct_type& s)
{
CefStructBase& operator=(const struct_type& s) {
Set(s, true);
return *this;
}
protected:
void Init()
{
protected:
void Init() {
memset(static_cast<struct_type*>(this), 0, sizeof(struct_type));
attached_to_ = NULL;
traits::init(this);
@@ -150,8 +140,8 @@ struct CefRectTraits {
static inline void init(struct_type* s) {}
static inline void clear(struct_type* s) {}
static inline void set(const struct_type* src, struct_type* target, bool copy)
{
static inline void set(const struct_type* src, struct_type* target,
bool copy) {
*target = *src;
}
};
@@ -159,33 +149,28 @@ struct CefRectTraits {
///
// Class representing a rectangle.
///
class CefRect : public CefStructBase<CefRectTraits>
{
public:
class CefRect : public CefStructBase<CefRectTraits> {
public:
typedef CefStructBase<CefRectTraits> parent;
CefRect() : parent() {}
CefRect(const cef_rect_t& r) : parent(r) {}
CefRect(const CefRect& r) : parent(r) {}
CefRect(int x, int y, int width, int height) : parent()
{
CefRect(const cef_rect_t& r) : parent(r) {} // NOLINT(runtime/explicit)
CefRect(const CefRect& r) : parent(r) {} // NOLINT(runtime/explicit)
CefRect(int x, int y, int width, int height) : parent() {
Set(x, y, width, height);
}
bool IsEmpty() const { return width <= 0 || height <= 0; }
void Set(int x, int y, int width, int height)
{
void Set(int x, int y, int width, int height) {
this->x = x, this->y = y, this->width = width, this->height = height;
}
};
inline bool operator==(const CefRect& a, const CefRect& b)
{
inline bool operator==(const CefRect& a, const CefRect& b) {
return a.x == b.x && a.y == b.y && a.width == b.width && a.height == b.height;
}
inline bool operator!=(const CefRect& a, const CefRect& b)
{
inline bool operator!=(const CefRect& a, const CefRect& b) {
return !(a == b);
}
@@ -196,8 +181,8 @@ struct CefPrintOptionsTraits {
static inline void init(struct_type* s) {}
static inline void clear(struct_type* s) {}
static inline void set(const struct_type* src, struct_type* target, bool copy)
{
static inline void set(const struct_type* src, struct_type* target,
bool copy) {
*target = *src;
}
};
@@ -212,8 +197,7 @@ typedef CefStructBase<CefPrintOptionsTraits> CefPrintOptions;
struct CefPopupFeaturesTraits {
typedef cef_popup_features_t struct_type;
static inline void init(struct_type* s)
{
static inline void init(struct_type* s) {
s->menuBarVisible = true;
s->statusBarVisible = true;
s->toolBarVisible = true;
@@ -221,16 +205,15 @@ struct CefPopupFeaturesTraits {
s->scrollbarsVisible = true;
s->resizable = true;
}
static inline void clear(struct_type* s)
{
if(s->additionalFeatures)
static inline void clear(struct_type* s) {
if (s->additionalFeatures)
cef_string_list_free(s->additionalFeatures);
}
static inline void set(const struct_type* src, struct_type* target, bool copy)
{
if(target->additionalFeatures)
static inline void set(const struct_type* src, struct_type* target,
bool copy) {
if (target->additionalFeatures)
cef_string_list_free(target->additionalFeatures);
target->additionalFeatures = src->additionalFeatures ?
cef_string_list_copy(src->additionalFeatures) : NULL;
@@ -263,25 +246,25 @@ typedef CefStructBase<CefPopupFeaturesTraits> CefPopupFeatures;
struct CefSettingsTraits {
typedef cef_settings_t struct_type;
static inline void init(struct_type* s)
{
static inline void init(struct_type* s) {
s->size = sizeof(struct_type);
}
static inline void clear(struct_type* s)
{
static inline void clear(struct_type* s) {
cef_string_clear(&s->cache_path);
cef_string_clear(&s->user_agent);
cef_string_clear(&s->product_version);
cef_string_clear(&s->locale);
if(s->extra_plugin_paths)
if (s->extra_plugin_paths)
cef_string_list_free(s->extra_plugin_paths);
cef_string_clear(&s->log_file);
cef_string_clear(&s->javascript_flags);
cef_string_clear(&s->pack_file_path);
cef_string_clear(&s->locales_dir_path);
}
static inline void set(const struct_type* src, struct_type* target, bool copy)
{
static inline void set(const struct_type* src, struct_type* target,
bool copy) {
target->multi_threaded_message_loop = src->multi_threaded_message_loop;
cef_string_set(src->cache_path.str, src->cache_path.length,
@@ -292,7 +275,7 @@ struct CefSettingsTraits {
&target->product_version, copy);
cef_string_set(src->locale.str, src->locale.length, &target->locale, copy);
if(target->extra_plugin_paths)
if (target->extra_plugin_paths)
cef_string_list_free(target->extra_plugin_paths);
target->extra_plugin_paths = src->extra_plugin_paths ?
cef_string_list_copy(src->extra_plugin_paths) : NULL;
@@ -310,6 +293,12 @@ struct CefSettingsTraits {
target->auto_detect_proxy_settings_enabled =
src->auto_detect_proxy_settings_enabled;
#endif
cef_string_set(src->pack_file_path.str, src->pack_file_path.length,
&target->pack_file_path, copy);
cef_string_set(src->locales_dir_path.str, src->locales_dir_path.length,
&target->locales_dir_path, copy);
target->pack_loading_disabled = src->pack_loading_disabled;
}
};
@@ -322,13 +311,11 @@ typedef CefStructBase<CefSettingsTraits> CefSettings;
struct CefBrowserSettingsTraits {
typedef cef_browser_settings_t struct_type;
static inline void init(struct_type* s)
{
static inline void init(struct_type* s) {
s->size = sizeof(struct_type);
}
static inline void clear(struct_type* s)
{
static inline void clear(struct_type* s) {
cef_string_clear(&s->standard_font_family);
cef_string_clear(&s->fixed_font_family);
cef_string_clear(&s->serif_font_family);
@@ -339,8 +326,8 @@ struct CefBrowserSettingsTraits {
cef_string_clear(&s->user_style_sheet_location);
}
static inline void set(const struct_type* src, struct_type* target, bool copy)
{
static inline void set(const struct_type* src, struct_type* target,
bool copy) {
target->drag_drop_disabled = src->drag_drop_disabled;
target->load_drops_disabled = src->load_drops_disabled;
target->history_disabled = src->history_disabled;
@@ -413,7 +400,8 @@ struct CefBrowserSettingsTraits {
target->accelerated_video_disabled = src->accelerated_video_disabled;
target->accelerated_2d_canvas_disabled =
src->accelerated_2d_canvas_disabled;
target->accelerated_drawing_disabled = src->accelerated_drawing_disabled;
target->accelerated_painting_disabled = src->accelerated_painting_disabled;
target->accelerated_filters_disabled = src->accelerated_filters_disabled;
target->accelerated_plugins_disabled = src->accelerated_plugins_disabled;
target->developer_tools_disabled = src->developer_tools_disabled;
target->fullscreen_enabled = src->fullscreen_enabled;
@@ -430,9 +418,8 @@ struct CefURLPartsTraits {
typedef cef_urlparts_t struct_type;
static inline void init(struct_type* s) {}
static inline void clear(struct_type* s)
{
static inline void clear(struct_type* s) {
cef_string_clear(&s->spec);
cef_string_clear(&s->scheme);
cef_string_clear(&s->username);
@@ -443,8 +430,8 @@ struct CefURLPartsTraits {
cef_string_clear(&s->query);
}
static inline void set(const struct_type* src, struct_type* target, bool copy)
{
static inline void set(const struct_type* src, struct_type* target,
bool copy) {
cef_string_set(src->spec.str, src->spec.length, &target->spec, copy);
cef_string_set(src->scheme.str, src->scheme.length, &target->scheme, copy);
cef_string_set(src->username.str, src->username.length, &target->username,
@@ -468,11 +455,11 @@ struct CefTimeTraits {
typedef cef_time_t struct_type;
static inline void init(struct_type* s) {}
static inline void clear(struct_type* s) {}
static inline void set(const struct_type* src, struct_type* target, bool copy)
{
static inline void set(const struct_type* src, struct_type* target,
bool copy) {
*target = *src;
}
};
@@ -480,15 +467,15 @@ struct CefTimeTraits {
///
// Class representing a time.
///
class CefTime : public CefStructBase<CefTimeTraits>
{
public:
class CefTime : public CefStructBase<CefTimeTraits> {
public:
typedef CefStructBase<CefTimeTraits> parent;
CefTime() : parent() {}
CefTime(const cef_time_t& r) : parent(r) {}
CefTime(time_t r) : parent() { SetTimeT(r); }
CefTime(double r) : parent() { SetDoubleT(r); }
CefTime(const cef_time_t& r) : parent(r) {} // NOLINT(runtime/explicit)
CefTime(const CefTime& r) : parent(r) {} // NOLINT(runtime/explicit)
explicit CefTime(time_t r) : parent() { SetTimeT(r); }
explicit CefTime(double r) : parent() { SetDoubleT(r); }
// Converts to/from time_t.
void SetTimeT(time_t r) {
@@ -518,17 +505,16 @@ struct CefCookieTraits {
typedef cef_cookie_t struct_type;
static inline void init(struct_type* s) {}
static inline void clear(struct_type* s)
{
static inline void clear(struct_type* s) {
cef_string_clear(&s->name);
cef_string_clear(&s->value);
cef_string_clear(&s->domain);
cef_string_clear(&s->path);
}
static inline void set(const struct_type* src, struct_type* target, bool copy)
{
static inline void set(const struct_type* src, struct_type* target,
bool copy) {
cef_string_set(src->name.str, src->name.length, &target->name, copy);
cef_string_set(src->value.str, src->value.length, &target->value, copy);
cef_string_set(src->domain.str, src->domain.length, &target->domain, copy);
@@ -553,8 +539,7 @@ struct CefMenuInfoTraits {
static inline void init(struct_type* s) {}
static inline void clear(struct_type* s)
{
static inline void clear(struct_type* s) {
cef_string_clear(&s->linkUrl);
cef_string_clear(&s->imageUrl);
cef_string_clear(&s->pageUrl);
@@ -564,8 +549,8 @@ struct CefMenuInfoTraits {
cef_string_clear(&s->securityInfo);
}
static inline void set(const struct_type* src, struct_type* target, bool copy)
{
static inline void set(const struct_type* src, struct_type* target,
bool copy) {
target->typeFlags = src->typeFlags;
target->x = src->x;
target->y = src->y;
@@ -599,14 +584,13 @@ struct CefProxyInfoTraits {
typedef cef_proxy_info_t struct_type;
static inline void init(struct_type* s) {}
static inline void clear(struct_type* s)
{
static inline void clear(struct_type* s) {
cef_string_clear(&s->proxyList);
}
static inline void set(const struct_type* src, struct_type* target, bool copy)
{
static inline void set(const struct_type* src, struct_type* target,
bool copy) {
target->proxyType = src->proxyType;
cef_string_set(src->proxyList.str, src->proxyList.length,
&target->proxyList, copy);
@@ -616,14 +600,12 @@ struct CefProxyInfoTraits {
///
// Class representing the results of proxy resolution.
///
class CefProxyInfo : public CefStructBase<CefProxyInfoTraits>
{
public:
class CefProxyInfo : public CefStructBase<CefProxyInfoTraits> {
public:
///
// Use a direction connection instead of a proxy.
///
void UseDirect()
{
void UseDirect() {
proxyType = PROXY_TYPE_DIRECT;
}
@@ -636,8 +618,7 @@ public:
// Multiple values may be separated by semicolons or whitespace. For example,
// "foo1:80;foo2:80".
///
void UseNamedProxy(const CefString& proxy_uri_list)
{
void UseNamedProxy(const CefString& proxy_uri_list) {
proxyType = PROXY_TYPE_NAMED;
(CefString(&proxyList)) = proxy_uri_list;
}
@@ -646,8 +627,7 @@ public:
// Use one or more named proxy servers specified in PAC script format. For
// example, "PROXY foobar:99; SOCKS fml:2; DIRECT".
///
void UsePacString(const CefString& pac_string)
{
void UsePacString(const CefString& pac_string) {
proxyType = PROXY_TYPE_PAC_STRING;
(CefString(&proxyList)) = pac_string;
}
@@ -659,4 +639,4 @@ public:
CefString ProxyList() const { return CefString(&proxyList); }
};
#endif // _CEF_TYPES_WRAPPERS_H
#endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_WRAPPERS_H_

0
cef/include/internal/npapi/README-TRANSFER.txt Executable file → Normal file
View File

0
cef/include/internal/npapi/basictypes.h Executable file → Normal file
View File

7
cef/include/internal/npapi/build_config.h Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -71,11 +71,6 @@
#define USE_TCMALLOC 1
#endif
// Use heapchecker.
#if defined(OS_LINUX) && !defined(NO_HEAPCHECKER)
#define USE_HEAPCHECKER 1
#endif
// Compiler detection.
#if defined(__GNUC__)
#define COMPILER_GCC 1

10
cef/include/internal/npapi/npapi.h Executable file → Normal file
View File

@@ -404,7 +404,7 @@ typedef enum {
, NPPVpluginCoreAnimationLayer = 1003
#endif
#if (MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6)
#if defined(MOZ_PLATFORM_MAEMO) && ((MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6))
, NPPVpluginWindowlessLocalBool = 2002
#endif
} NPPVariable;
@@ -436,7 +436,9 @@ typedef enum {
NPNVprivateModeBool = 18,
NPNVsupportsAdvancedKeyHandling = 21
NPNVsupportsAdvancedKeyHandling = 21,
NPNVdocumentOrigin = 22
#if defined(XP_MACOSX)
/* Used for negotiating drawing models */
@@ -454,8 +456,10 @@ typedef enum {
, NPNVsupportsCocoaBool = 3001 /* TRUE if the browser supports the Cocoa event model */
, NPNVsupportsUpdatedCocoaTextInputBool = 3002 /* TRUE if the browser supports the updated
Cocoa text input specification. */
, NPNVsupportsCompositingCoreAnimationPluginsBool = 74656 /* TRUE if the browser supports
CA model compositing */
#endif
#if (MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6)
#if defined(MOZ_PLATFORM_MAEMO) && ((MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6))
, NPNVSupportsWindowlessLocal = 2002
#endif
} NPNVariable;

0
cef/include/internal/npapi/npapi_extensions.h Executable file → Normal file
View File

2
cef/include/internal/npapi/npfunctions.h Executable file → Normal file
View File

@@ -217,7 +217,7 @@ typedef struct _NPNetscapeFuncs {
* These can be called to retreive MIME information from the plugin dynamically
*
* Note: For compatibility with Quicktime, BPSupportedMIMEtypes is another way
* to get mime info from the plugin only on OSX and may not be supported
* to get mime info from the plugin only on OSX and may not be supported
* in furture version -- use NP_GetMIMEDescription instead
*/
enum

0
cef/include/internal/npapi/nphostapi.h Executable file → Normal file
View File

12
cef/include/internal/npapi/npruntime.h Executable file → Normal file
View File

@@ -1,12 +1,12 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* Copyright (c) 2004, Apple Computer, Inc. and The Mozilla Foundation.
* Copyright (c) 2004, Apple Computer, Inc. and The Mozilla Foundation.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
@@ -16,7 +16,7 @@
* Foundation ("Mozilla") nor the names of their contributors may be used
* to endorse or promote products derived from this software without
* specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY APPLE, MOZILLA AND THEIR CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
@@ -48,7 +48,7 @@ extern "C" {
objects. The API in this header does not assume the presence of a
user agent. That is, it can be used to bind C code to scripting
environments outside of the context of a user agent.
However, the normal use of the this API is in the context of a
scripting environment running in a browser or other user agent.
In particular it is used to support the extended Netscape
@@ -359,7 +359,7 @@ void NPN_ReleaseObject(NPObject *npobj);
value, it will be supplied via the result NPVariant
argument. Successful calls will return true, false will be
returned in case of an error.
Calls made from plugin code to script must be made from the thread
on which the plugin was initialized.
*/

2
cef/include/internal/npapi/nptypes.h Executable file → Normal file
View File

@@ -69,7 +69,7 @@
#endif
#elif defined(bsdi) || defined(FREEBSD) || defined(OPENBSD)
/*
* BSD/OS, FreeBSD, and OpenBSD ship sys/types.h that define int32_t and
* BSD/OS, FreeBSD, and OpenBSD ship sys/types.h that define int32_t and
* u_int32_t.
*/
#include <sys/types.h>

0
cef/include/internal/npapi/port.h Executable file → Normal file
View File

15
cef/libcef_dll/cef_logging.h Executable file → Normal file
View File

@@ -2,14 +2,21 @@
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
#ifndef _CEF_LOGGING_H
#define _CEF_LOGGING_H
#ifndef CEF_LIBCEF_DLL_CEF_LOGGING_H_
#define CEF_LIBCEF_DLL_CEF_LOGGING_H_
#pragma once
#ifdef BUILDING_CEF_SHARED
#include "base/logging.h"
#else
#include <assert.h>
#include <assert.h> // NOLINT(build/include_order)
#define DCHECK(condition) assert(condition)
#define DCHECK_EQ(val1, val2) DCHECK(val1 == val2)
#define DCHECK_NE(val1, val2) DCHECK(val1 != val2)
#define DCHECK_LE(val1, val2) DCHECK(val1 <= val2)
#define DCHECK_LT(val1, val2) DCHECK(val1 < val2)
#define DCHECK_GE(val1, val2) DCHECK(val1 >= val2)
#define DCHECK_GT(val1, val2) DCHECK(val1 > val2)
#endif
#endif // _CEF_LOGGING_H
#endif // CEF_LIBCEF_DLL_CEF_LOGGING_H_

28
cef/libcef_dll/cpptoc/app_cpptoc.cc Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -12,12 +12,29 @@
#include "libcef_dll/cpptoc/app_cpptoc.h"
#include "libcef_dll/cpptoc/proxy_handler_cpptoc.h"
#include "libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
cef_proxy_handler_t* CEF_CALLBACK app_get_proxy_handler(struct _cef_app_t* self)
{
struct _cef_resource_bundle_handler_t* CEF_CALLBACK app_get_resource_bundle_handler(
struct _cef_app_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefResourceBundleHandler> _retval = CefAppCppToC::Get(
self)->GetResourceBundleHandler();
// Return type: refptr_same
return CefResourceBundleHandlerCppToC::Wrap(_retval);
}
struct _cef_proxy_handler_t* CEF_CALLBACK app_get_proxy_handler(
struct _cef_app_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -33,12 +50,11 @@ cef_proxy_handler_t* CEF_CALLBACK app_get_proxy_handler(struct _cef_app_t* self)
}
// CONSTRUCTOR - Do not edit by hand.
CefAppCppToC::CefAppCppToC(CefApp* cls)
: CefCppToC<CefAppCppToC, CefApp, cef_app_t>(cls)
{
: CefCppToC<CefAppCppToC, CefApp, cef_app_t>(cls) {
struct_.struct_.get_resource_bundle_handler = app_get_resource_bundle_handler;
struct_.struct_.get_proxy_handler = app_get_proxy_handler;
}

24
cef/libcef_dll/cpptoc/app_cpptoc.h Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -10,27 +10,27 @@
// for more information.
//
#ifndef _APP_CPPTOC_H
#define _APP_CPPTOC_H
#ifndef CEF_LIBCEF_DLL_CPPTOC_APP_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_APP_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_capi.h"
#include "include/cef_app.h"
#include "include/capi/cef_app_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefAppCppToC
: public CefCppToC<CefAppCppToC, CefApp, cef_app_t>
{
public:
CefAppCppToC(CefApp* cls);
: public CefCppToC<CefAppCppToC, CefApp, cef_app_t> {
public:
explicit CefAppCppToC(CefApp* cls);
virtual ~CefAppCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _APP_CPPTOC_H
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_APP_CPPTOC_H_

62
cef/libcef_dll/cpptoc/base_cpptoc.h Executable file → Normal file
View File

@@ -2,24 +2,23 @@
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
#ifndef _BASE_CPPTOC_H
#define _BASE_CPPTOC_H
#ifndef CEF_LIBCEF_DLL_CPPTOC_BASE_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_BASE_CPPTOC_H_
#pragma once
#include "include/cef.h"
#include "include/cef_capi.h"
#include "include/cef_base.h"
#include "include/capi/cef_base_capi.h"
#include "libcef_dll/cef_logging.h"
// CefCppToC implementation for CefBase.
class CefBaseCppToC : public CefBase
{
public:
class CefBaseCppToC : public CefBase {
public:
// Use this method to retrieve the underlying class instance from our
// own structure when the structure is passed as the required first
// parameter of a C API function call. No explicit reference counting
// is done in this case.
static CefRefPtr<CefBase> Get(cef_base_t* s)
{
static CefRefPtr<CefBase> Get(cef_base_t* s) {
DCHECK(s);
// Cast our structure to the wrapper structure type.
@@ -28,11 +27,10 @@ public:
// Return the underlying object instance.
return wrapperStruct->class_->GetClass();
}
// Use this method to create a wrapper structure for passing our class
// instance to the other side.
static cef_base_t* Wrap(CefRefPtr<CefBase> c)
{
static cef_base_t* Wrap(CefRefPtr<CefBase> c) {
if (!c.get())
return NULL;
@@ -47,8 +45,7 @@ public:
// Use this method to retrieve the underlying class instance when receiving
// our wrapper structure back from the other side.
static CefRefPtr<CefBase> Unwrap(cef_base_t* s)
{
static CefRefPtr<CefBase> Unwrap(cef_base_t* s) {
if (!s)
return NULL;
@@ -65,19 +62,17 @@ public:
}
// Structure representation with pointer to the C++ class.
struct Struct
{
struct Struct {
cef_base_t struct_;
CefBaseCppToC* class_;
};
CefBaseCppToC(CefBase* cls)
: class_(cls)
{
explicit CefBaseCppToC(CefBase* cls)
: class_(cls) {
DCHECK(cls);
struct_.class_ = this;
// zero the underlying structure and set base members
memset(&struct_.struct_, 0, sizeof(cef_base_t));
struct_.struct_.size = sizeof(cef_base_t);
@@ -96,13 +91,11 @@ public:
// CefBase methods increment/decrement reference counts on both this object
// and the underlying wrapper class.
int AddRef()
{
int AddRef() {
UnderlyingAddRef();
return refct_.AddRef();
}
int Release()
{
int Release() {
UnderlyingRelease();
int retval = refct_.Release();
if (retval == 0)
@@ -116,41 +109,38 @@ public:
int UnderlyingRelease() { return class_->Release(); }
int UnderlyingGetRefCt() { return class_->GetRefCt(); }
private:
static int CEF_CALLBACK struct_add_ref(struct _cef_base_t* base)
{
private:
static int CEF_CALLBACK struct_add_ref(struct _cef_base_t* base) {
DCHECK(base);
if(!base)
if (!base)
return 0;
Struct* impl = reinterpret_cast<Struct*>(base);
return impl->class_->AddRef();
}
static int CEF_CALLBACK struct_release(struct _cef_base_t* base)
{
static int CEF_CALLBACK struct_release(struct _cef_base_t* base) {
DCHECK(base);
if(!base)
if (!base)
return 0;
Struct* impl = reinterpret_cast<Struct*>(base);
return impl->class_->Release();
}
static int CEF_CALLBACK struct_get_refct(struct _cef_base_t* base)
{
static int CEF_CALLBACK struct_get_refct(struct _cef_base_t* base) {
DCHECK(base);
if(!base)
if (!base)
return 0;
Struct* impl = reinterpret_cast<Struct*>(base);
return impl->class_->GetRefCt();
}
protected:
protected:
CefRefCount refct_;
Struct struct_;
CefBase* class_;
};
#endif // _BASE_CPPTOC_H
#endif // CEF_LIBCEF_DLL_CPPTOC_BASE_CPPTOC_H_

99
cef/libcef_dll/cpptoc/client_cpptoc.cc Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -20,6 +20,7 @@
#include "libcef_dll/cpptoc/life_span_handler_cpptoc.h"
#include "libcef_dll/cpptoc/load_handler_cpptoc.h"
#include "libcef_dll/cpptoc/menu_handler_cpptoc.h"
#include "libcef_dll/cpptoc/permission_handler_cpptoc.h"
#include "libcef_dll/cpptoc/print_handler_cpptoc.h"
#include "libcef_dll/cpptoc/render_handler_cpptoc.h"
#include "libcef_dll/cpptoc/request_handler_cpptoc.h"
@@ -28,9 +29,8 @@
// MEMBER FUNCTIONS - Body may be edited by hand.
cef_life_span_handler_t* CEF_CALLBACK client_get_life_span_handler(
struct _cef_client_t* self)
{
struct _cef_life_span_handler_t* CEF_CALLBACK client_get_life_span_handler(
struct _cef_client_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -45,10 +45,8 @@ cef_life_span_handler_t* CEF_CALLBACK client_get_life_span_handler(
return CefLifeSpanHandlerCppToC::Wrap(_retval);
}
cef_load_handler_t* CEF_CALLBACK client_get_load_handler(
struct _cef_client_t* self)
{
struct _cef_load_handler_t* CEF_CALLBACK client_get_load_handler(
struct _cef_client_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -63,10 +61,8 @@ cef_load_handler_t* CEF_CALLBACK client_get_load_handler(
return CefLoadHandlerCppToC::Wrap(_retval);
}
cef_request_handler_t* CEF_CALLBACK client_get_request_handler(
struct _cef_client_t* self)
{
struct _cef_request_handler_t* CEF_CALLBACK client_get_request_handler(
struct _cef_client_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -81,10 +77,8 @@ cef_request_handler_t* CEF_CALLBACK client_get_request_handler(
return CefRequestHandlerCppToC::Wrap(_retval);
}
cef_display_handler_t* CEF_CALLBACK client_get_display_handler(
struct _cef_client_t* self)
{
struct _cef_display_handler_t* CEF_CALLBACK client_get_display_handler(
struct _cef_client_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -99,10 +93,8 @@ cef_display_handler_t* CEF_CALLBACK client_get_display_handler(
return CefDisplayHandlerCppToC::Wrap(_retval);
}
cef_focus_handler_t* CEF_CALLBACK client_get_focus_handler(
struct _cef_client_t* self)
{
struct _cef_focus_handler_t* CEF_CALLBACK client_get_focus_handler(
struct _cef_client_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -117,10 +109,8 @@ cef_focus_handler_t* CEF_CALLBACK client_get_focus_handler(
return CefFocusHandlerCppToC::Wrap(_retval);
}
cef_keyboard_handler_t* CEF_CALLBACK client_get_keyboard_handler(
struct _cef_client_t* self)
{
struct _cef_keyboard_handler_t* CEF_CALLBACK client_get_keyboard_handler(
struct _cef_client_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -135,10 +125,8 @@ cef_keyboard_handler_t* CEF_CALLBACK client_get_keyboard_handler(
return CefKeyboardHandlerCppToC::Wrap(_retval);
}
cef_menu_handler_t* CEF_CALLBACK client_get_menu_handler(
struct _cef_client_t* self)
{
struct _cef_menu_handler_t* CEF_CALLBACK client_get_menu_handler(
struct _cef_client_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -153,10 +141,24 @@ cef_menu_handler_t* CEF_CALLBACK client_get_menu_handler(
return CefMenuHandlerCppToC::Wrap(_retval);
}
struct _cef_permission_handler_t* CEF_CALLBACK client_get_permission_handler(
struct _cef_client_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
cef_print_handler_t* CEF_CALLBACK client_get_print_handler(
struct _cef_client_t* self)
{
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefPermissionHandler> _retval = CefClientCppToC::Get(
self)->GetPermissionHandler();
// Return type: refptr_same
return CefPermissionHandlerCppToC::Wrap(_retval);
}
struct _cef_print_handler_t* CEF_CALLBACK client_get_print_handler(
struct _cef_client_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -171,10 +173,8 @@ cef_print_handler_t* CEF_CALLBACK client_get_print_handler(
return CefPrintHandlerCppToC::Wrap(_retval);
}
cef_find_handler_t* CEF_CALLBACK client_get_find_handler(
struct _cef_client_t* self)
{
struct _cef_find_handler_t* CEF_CALLBACK client_get_find_handler(
struct _cef_client_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -189,10 +189,8 @@ cef_find_handler_t* CEF_CALLBACK client_get_find_handler(
return CefFindHandlerCppToC::Wrap(_retval);
}
cef_jsdialog_handler_t* CEF_CALLBACK client_get_jsdialog_handler(
struct _cef_client_t* self)
{
struct _cef_jsdialog_handler_t* CEF_CALLBACK client_get_jsdialog_handler(
struct _cef_client_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -207,10 +205,8 @@ cef_jsdialog_handler_t* CEF_CALLBACK client_get_jsdialog_handler(
return CefJSDialogHandlerCppToC::Wrap(_retval);
}
cef_v8context_handler_t* CEF_CALLBACK client_get_v8context_handler(
struct _cef_client_t* self)
{
struct _cef_v8context_handler_t* CEF_CALLBACK client_get_v8context_handler(
struct _cef_client_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -225,10 +221,8 @@ cef_v8context_handler_t* CEF_CALLBACK client_get_v8context_handler(
return CefV8ContextHandlerCppToC::Wrap(_retval);
}
cef_render_handler_t* CEF_CALLBACK client_get_render_handler(
struct _cef_client_t* self)
{
struct _cef_render_handler_t* CEF_CALLBACK client_get_render_handler(
struct _cef_client_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -243,10 +237,8 @@ cef_render_handler_t* CEF_CALLBACK client_get_render_handler(
return CefRenderHandlerCppToC::Wrap(_retval);
}
cef_drag_handler_t* CEF_CALLBACK client_get_drag_handler(
struct _cef_client_t* self)
{
struct _cef_drag_handler_t* CEF_CALLBACK client_get_drag_handler(
struct _cef_client_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -262,12 +254,10 @@ cef_drag_handler_t* CEF_CALLBACK client_get_drag_handler(
}
// CONSTRUCTOR - Do not edit by hand.
CefClientCppToC::CefClientCppToC(CefClient* cls)
: CefCppToC<CefClientCppToC, CefClient, cef_client_t>(cls)
{
: CefCppToC<CefClientCppToC, CefClient, cef_client_t>(cls) {
struct_.struct_.get_life_span_handler = client_get_life_span_handler;
struct_.struct_.get_load_handler = client_get_load_handler;
struct_.struct_.get_request_handler = client_get_request_handler;
@@ -275,6 +265,7 @@ CefClientCppToC::CefClientCppToC(CefClient* cls)
struct_.struct_.get_focus_handler = client_get_focus_handler;
struct_.struct_.get_keyboard_handler = client_get_keyboard_handler;
struct_.struct_.get_menu_handler = client_get_menu_handler;
struct_.struct_.get_permission_handler = client_get_permission_handler;
struct_.struct_.get_print_handler = client_get_print_handler;
struct_.struct_.get_find_handler = client_get_find_handler;
struct_.struct_.get_jsdialog_handler = client_get_jsdialog_handler;

24
cef/libcef_dll/cpptoc/client_cpptoc.h Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -10,27 +10,27 @@
// for more information.
//
#ifndef _CLIENT_CPPTOC_H
#define _CLIENT_CPPTOC_H
#ifndef CEF_LIBCEF_DLL_CPPTOC_CLIENT_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_CLIENT_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_capi.h"
#include "include/cef_client.h"
#include "include/capi/cef_client_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefClientCppToC
: public CefCppToC<CefClientCppToC, CefClient, cef_client_t>
{
public:
CefClientCppToC(CefClient* cls);
: public CefCppToC<CefClientCppToC, CefClient, cef_client_t> {
public:
explicit CefClientCppToC(CefClient* cls);
virtual ~CefClientCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _CLIENT_CPPTOC_H
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_CLIENT_CPPTOC_H_

13
cef/libcef_dll/cpptoc/content_filter_cpptoc.cc Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -18,8 +18,7 @@
void CEF_CALLBACK content_filter_process_data(
struct _cef_content_filter_t* self, const void* data, int data_size,
cef_stream_reader_t** substitute_data)
{
struct _cef_stream_reader_t** substitute_data) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -58,10 +57,8 @@ void CEF_CALLBACK content_filter_process_data(
}
}
void CEF_CALLBACK content_filter_drain(struct _cef_content_filter_t* self,
cef_stream_reader_t** remainder)
{
struct _cef_stream_reader_t** remainder) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -95,13 +92,11 @@ void CEF_CALLBACK content_filter_drain(struct _cef_content_filter_t* self,
}
// CONSTRUCTOR - Do not edit by hand.
CefContentFilterCppToC::CefContentFilterCppToC(CefContentFilter* cls)
: CefCppToC<CefContentFilterCppToC, CefContentFilter, cef_content_filter_t>(
cls)
{
cls) {
struct_.struct_.process_data = content_filter_process_data;
struct_.struct_.drain = content_filter_drain;
}

24
cef/libcef_dll/cpptoc/content_filter_cpptoc.h Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -10,28 +10,28 @@
// for more information.
//
#ifndef _CONTENTFILTER_CPPTOC_H
#define _CONTENTFILTER_CPPTOC_H
#ifndef CEF_LIBCEF_DLL_CPPTOC_CONTENT_FILTER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_CONTENT_FILTER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_capi.h"
#include "include/cef_content_filter.h"
#include "include/capi/cef_content_filter_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefContentFilterCppToC
: public CefCppToC<CefContentFilterCppToC, CefContentFilter,
cef_content_filter_t>
{
public:
CefContentFilterCppToC(CefContentFilter* cls);
cef_content_filter_t> {
public:
explicit CefContentFilterCppToC(CefContentFilter* cls);
virtual ~CefContentFilterCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _CONTENTFILTER_CPPTOC_H
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_CONTENT_FILTER_CPPTOC_H_

9
cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.cc Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -17,8 +17,7 @@
int CEF_CALLBACK cookie_visitor_visit(struct _cef_cookie_visitor_t* self,
const struct _cef_cookie_t* cookie, int count, int total,
int* deleteCookie)
{
int* deleteCookie) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -56,13 +55,11 @@ int CEF_CALLBACK cookie_visitor_visit(struct _cef_cookie_visitor_t* self,
}
// CONSTRUCTOR - Do not edit by hand.
CefCookieVisitorCppToC::CefCookieVisitorCppToC(CefCookieVisitor* cls)
: CefCppToC<CefCookieVisitorCppToC, CefCookieVisitor, cef_cookie_visitor_t>(
cls)
{
cls) {
struct_.struct_.visit = cookie_visitor_visit;
}

24
cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.h Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -10,28 +10,28 @@
// for more information.
//
#ifndef _COOKIEVISITOR_CPPTOC_H
#define _COOKIEVISITOR_CPPTOC_H
#ifndef CEF_LIBCEF_DLL_CPPTOC_COOKIE_VISITOR_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_COOKIE_VISITOR_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_capi.h"
#include "include/cef_cookie.h"
#include "include/capi/cef_cookie_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefCookieVisitorCppToC
: public CefCppToC<CefCookieVisitorCppToC, CefCookieVisitor,
cef_cookie_visitor_t>
{
public:
CefCookieVisitorCppToC(CefCookieVisitor* cls);
cef_cookie_visitor_t> {
public:
explicit CefCookieVisitorCppToC(CefCookieVisitor* cls);
virtual ~CefCookieVisitorCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _COOKIEVISITOR_CPPTOC_H
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_COOKIE_VISITOR_CPPTOC_H_

71
cef/libcef_dll/cpptoc/cpptoc.h Executable file → Normal file
View File

@@ -2,11 +2,12 @@
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
#ifndef _CPPTOC_H
#define _CPPTOC_H
#ifndef CEF_LIBCEF_DLL_CPPTOC_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_CPPTOC_H_
#pragma once
#include "include/cef.h"
#include "include/cef_capi.h"
#include "include/cef_base.h"
#include "include/capi/cef_base_capi.h"
#include "libcef_dll/cef_logging.h"
@@ -14,22 +15,19 @@
// implementation exists on this side of the DLL boundary but will have methods
// called from the other side of the DLL boundary.
template <class ClassName, class BaseName, class StructName>
class CefCppToC : public CefBase
{
public:
class CefCppToC : public CefBase {
public:
// Structure representation with pointer to the C++ class.
struct Struct
{
struct Struct {
StructName struct_;
CefCppToC<ClassName,BaseName,StructName>* class_;
CefCppToC<ClassName, BaseName, StructName>* class_;
};
// Use this method to retrieve the underlying class instance from our
// own structure when the structure is passed as the required first
// parameter of a C API function call. No explicit reference counting
// is done in this case.
static CefRefPtr<BaseName> Get(StructName* s)
{
static CefRefPtr<BaseName> Get(StructName* s) {
DCHECK(s);
// Cast our structure to the wrapper structure type.
@@ -37,11 +35,10 @@ public:
// Return the underlying object instance.
return wrapperStruct->class_->GetClass();
}
// Use this method to create a wrapper structure for passing our class
// instance to the other side.
static StructName* Wrap(CefRefPtr<BaseName> c)
{
static StructName* Wrap(CefRefPtr<BaseName> c) {
if (!c.get())
return NULL;
@@ -56,8 +53,7 @@ public:
// Use this method to retrieve the underlying class instance when receiving
// our wrapper structure back from the other side.
static CefRefPtr<BaseName> Unwrap(StructName* s)
{
static CefRefPtr<BaseName> Unwrap(StructName* s) {
if (!s)
return NULL;
@@ -72,13 +68,12 @@ public:
return objectPtr;
}
CefCppToC(BaseName* cls)
: class_(cls)
{
explicit CefCppToC(BaseName* cls)
: class_(cls) {
DCHECK(cls);
struct_.class_ = this;
// zero the underlying structure and set base members
memset(&struct_.struct_, 0, sizeof(StructName));
struct_.struct_.base.size = sizeof(StructName);
@@ -90,8 +85,7 @@ public:
CefAtomicIncrement(&DebugObjCt);
#endif
}
virtual ~CefCppToC()
{
virtual ~CefCppToC() {
#ifndef NDEBUG
CefAtomicDecrement(&DebugObjCt);
#endif
@@ -106,13 +100,11 @@ public:
// CefBase methods increment/decrement reference counts on both this object
// and the underlying wrapper class.
int AddRef()
{
int AddRef() {
UnderlyingAddRef();
return refct_.AddRef();
}
int Release()
{
int Release() {
UnderlyingRelease();
int retval = refct_.Release();
if (retval == 0)
@@ -128,44 +120,41 @@ public:
#ifndef NDEBUG
// Simple tracking of allocated objects.
static long DebugObjCt;
static long DebugObjCt; // NOLINT(runtime/int)
#endif
private:
static int CEF_CALLBACK struct_add_ref(struct _cef_base_t* base)
{
private:
static int CEF_CALLBACK struct_add_ref(struct _cef_base_t* base) {
DCHECK(base);
if(!base)
if (!base)
return 0;
Struct* impl = reinterpret_cast<Struct*>(base);
return impl->class_->AddRef();
}
static int CEF_CALLBACK struct_release(struct _cef_base_t* base)
{
static int CEF_CALLBACK struct_release(struct _cef_base_t* base) {
DCHECK(base);
if(!base)
if (!base)
return 0;
Struct* impl = reinterpret_cast<Struct*>(base);
return impl->class_->Release();
}
static int CEF_CALLBACK struct_get_refct(struct _cef_base_t* base)
{
static int CEF_CALLBACK struct_get_refct(struct _cef_base_t* base) {
DCHECK(base);
if(!base)
if (!base)
return 0;
Struct* impl = reinterpret_cast<Struct*>(base);
return impl->class_->GetRefCt();
}
protected:
protected:
CefRefCount refct_;
Struct struct_;
BaseName* class_;
};
#endif // _CPPTOC_H
#endif // CEF_LIBCEF_DLL_CPPTOC_CPPTOC_H_

33
cef/libcef_dll/cpptoc/display_handler_cpptoc.cc Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -19,8 +19,7 @@
void CEF_CALLBACK display_handler_on_nav_state_change(
struct _cef_display_handler_t* self, cef_browser_t* browser, int canGoBack,
int canGoForward)
{
int canGoForward) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -38,11 +37,9 @@ void CEF_CALLBACK display_handler_on_nav_state_change(
canGoForward?true:false);
}
void CEF_CALLBACK display_handler_on_address_change(
struct _cef_display_handler_t* self, cef_browser_t* browser,
cef_frame_t* frame, const cef_string_t* url)
{
struct _cef_frame_t* frame, const cef_string_t* url) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -68,11 +65,9 @@ void CEF_CALLBACK display_handler_on_address_change(
CefString(url));
}
void CEF_CALLBACK display_handler_on_contents_size_change(
struct _cef_display_handler_t* self, cef_browser_t* browser,
cef_frame_t* frame, int width, int height)
{
struct _cef_frame_t* frame, int width, int height) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -95,11 +90,9 @@ void CEF_CALLBACK display_handler_on_contents_size_change(
height);
}
void CEF_CALLBACK display_handler_on_title_change(
struct _cef_display_handler_t* self, cef_browser_t* browser,
const cef_string_t* title)
{
const cef_string_t* title) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -117,10 +110,8 @@ void CEF_CALLBACK display_handler_on_title_change(
CefString(title));
}
int CEF_CALLBACK display_handler_on_tooltip(struct _cef_display_handler_t* self,
cef_browser_t* browser, cef_string_t* text)
{
cef_browser_t* browser, cef_string_t* text) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -144,11 +135,9 @@ int CEF_CALLBACK display_handler_on_tooltip(struct _cef_display_handler_t* self,
return _retval;
}
void CEF_CALLBACK display_handler_on_status_message(
struct _cef_display_handler_t* self, cef_browser_t* browser,
const cef_string_t* value, enum cef_handler_statustype_t type)
{
const cef_string_t* value, enum cef_handler_statustype_t type) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -167,11 +156,9 @@ void CEF_CALLBACK display_handler_on_status_message(
type);
}
int CEF_CALLBACK display_handler_on_console_message(
struct _cef_display_handler_t* self, cef_browser_t* browser,
const cef_string_t* message, const cef_string_t* source, int line)
{
const cef_string_t* message, const cef_string_t* source, int line) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -195,13 +182,11 @@ int CEF_CALLBACK display_handler_on_console_message(
}
// CONSTRUCTOR - Do not edit by hand.
CefDisplayHandlerCppToC::CefDisplayHandlerCppToC(CefDisplayHandler* cls)
: CefCppToC<CefDisplayHandlerCppToC, CefDisplayHandler,
cef_display_handler_t>(cls)
{
cef_display_handler_t>(cls) {
struct_.struct_.on_nav_state_change = display_handler_on_nav_state_change;
struct_.struct_.on_address_change = display_handler_on_address_change;
struct_.struct_.on_contents_size_change =

24
cef/libcef_dll/cpptoc/display_handler_cpptoc.h Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -10,28 +10,28 @@
// for more information.
//
#ifndef _DISPLAYHANDLER_CPPTOC_H
#define _DISPLAYHANDLER_CPPTOC_H
#ifndef CEF_LIBCEF_DLL_CPPTOC_DISPLAY_HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_DISPLAY_HANDLER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_capi.h"
#include "include/cef_display_handler.h"
#include "include/capi/cef_display_handler_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefDisplayHandlerCppToC
: public CefCppToC<CefDisplayHandlerCppToC, CefDisplayHandler,
cef_display_handler_t>
{
public:
CefDisplayHandlerCppToC(CefDisplayHandler* cls);
cef_display_handler_t> {
public:
explicit CefDisplayHandlerCppToC(CefDisplayHandler* cls);
virtual ~CefDisplayHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _DISPLAYHANDLER_CPPTOC_H
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_DISPLAY_HANDLER_CPPTOC_H_

9
cef/libcef_dll/cpptoc/domevent_listener_cpptoc.cc Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -17,8 +17,7 @@
// MEMBER FUNCTIONS - Body may be edited by hand.
void CEF_CALLBACK domevent_listener_handle_event(
struct _cef_domevent_listener_t* self, cef_domevent_t* event)
{
struct _cef_domevent_listener_t* self, cef_domevent_t* event) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -35,13 +34,11 @@ void CEF_CALLBACK domevent_listener_handle_event(
}
// CONSTRUCTOR - Do not edit by hand.
CefDOMEventListenerCppToC::CefDOMEventListenerCppToC(CefDOMEventListener* cls)
: CefCppToC<CefDOMEventListenerCppToC, CefDOMEventListener,
cef_domevent_listener_t>(cls)
{
cef_domevent_listener_t>(cls) {
struct_.struct_.handle_event = domevent_listener_handle_event;
}

24
cef/libcef_dll/cpptoc/domevent_listener_cpptoc.h Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -10,28 +10,28 @@
// for more information.
//
#ifndef _DOMEVENTLISTENER_CPPTOC_H
#define _DOMEVENTLISTENER_CPPTOC_H
#ifndef CEF_LIBCEF_DLL_CPPTOC_DOMEVENT_LISTENER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_DOMEVENT_LISTENER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_capi.h"
#include "include/cef_dom.h"
#include "include/capi/cef_dom_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefDOMEventListenerCppToC
: public CefCppToC<CefDOMEventListenerCppToC, CefDOMEventListener,
cef_domevent_listener_t>
{
public:
CefDOMEventListenerCppToC(CefDOMEventListener* cls);
cef_domevent_listener_t> {
public:
explicit CefDOMEventListenerCppToC(CefDOMEventListener* cls);
virtual ~CefDOMEventListenerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _DOMEVENTLISTENER_CPPTOC_H
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_DOMEVENT_LISTENER_CPPTOC_H_

9
cef/libcef_dll/cpptoc/domvisitor_cpptoc.cc Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -17,8 +17,7 @@
// MEMBER FUNCTIONS - Body may be edited by hand.
void CEF_CALLBACK domvisitor_visit(struct _cef_domvisitor_t* self,
struct _cef_domdocument_t* document)
{
struct _cef_domdocument_t* document) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -35,12 +34,10 @@ void CEF_CALLBACK domvisitor_visit(struct _cef_domvisitor_t* self,
}
// CONSTRUCTOR - Do not edit by hand.
CefDOMVisitorCppToC::CefDOMVisitorCppToC(CefDOMVisitor* cls)
: CefCppToC<CefDOMVisitorCppToC, CefDOMVisitor, cef_domvisitor_t>(cls)
{
: CefCppToC<CefDOMVisitorCppToC, CefDOMVisitor, cef_domvisitor_t>(cls) {
struct_.struct_.visit = domvisitor_visit;
}

24
cef/libcef_dll/cpptoc/domvisitor_cpptoc.h Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -10,27 +10,27 @@
// for more information.
//
#ifndef _DOMVISITOR_CPPTOC_H
#define _DOMVISITOR_CPPTOC_H
#ifndef CEF_LIBCEF_DLL_CPPTOC_DOMVISITOR_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_DOMVISITOR_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_capi.h"
#include "include/cef_dom.h"
#include "include/capi/cef_dom_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefDOMVisitorCppToC
: public CefCppToC<CefDOMVisitorCppToC, CefDOMVisitor, cef_domvisitor_t>
{
public:
CefDOMVisitorCppToC(CefDOMVisitor* cls);
: public CefCppToC<CefDOMVisitorCppToC, CefDOMVisitor, cef_domvisitor_t> {
public:
explicit CefDOMVisitorCppToC(CefDOMVisitor* cls);
virtual ~CefDOMVisitorCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _DOMVISITOR_CPPTOC_H
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_DOMVISITOR_CPPTOC_H_

13
cef/libcef_dll/cpptoc/download_handler_cpptoc.cc Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -16,8 +16,7 @@
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK download_handler_received_data(
struct _cef_download_handler_t* self, void* data, int data_size)
{
struct _cef_download_handler_t* self, void* data, int data_size) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -37,10 +36,8 @@ int CEF_CALLBACK download_handler_received_data(
return _retval;
}
void CEF_CALLBACK download_handler_complete(
struct _cef_download_handler_t* self)
{
struct _cef_download_handler_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -52,13 +49,11 @@ void CEF_CALLBACK download_handler_complete(
}
// CONSTRUCTOR - Do not edit by hand.
CefDownloadHandlerCppToC::CefDownloadHandlerCppToC(CefDownloadHandler* cls)
: CefCppToC<CefDownloadHandlerCppToC, CefDownloadHandler,
cef_download_handler_t>(cls)
{
cef_download_handler_t>(cls) {
struct_.struct_.received_data = download_handler_received_data;
struct_.struct_.complete = download_handler_complete;
}

24
cef/libcef_dll/cpptoc/download_handler_cpptoc.h Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -10,28 +10,28 @@
// for more information.
//
#ifndef _DOWNLOADHANDLER_CPPTOC_H
#define _DOWNLOADHANDLER_CPPTOC_H
#ifndef CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_HANDLER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_capi.h"
#include "include/cef_download_handler.h"
#include "include/capi/cef_download_handler_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefDownloadHandlerCppToC
: public CefCppToC<CefDownloadHandlerCppToC, CefDownloadHandler,
cef_download_handler_t>
{
public:
CefDownloadHandlerCppToC(CefDownloadHandler* cls);
cef_download_handler_t> {
public:
explicit CefDownloadHandlerCppToC(CefDownloadHandler* cls);
virtual ~CefDownloadHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _DOWNLOADHANDLER_CPPTOC_H
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_HANDLER_CPPTOC_H_

17
cef/libcef_dll/cpptoc/drag_handler_cpptoc.cc Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -18,9 +18,8 @@
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK drag_handler_on_drag_start(struct _cef_drag_handler_t* self,
cef_browser_t* browser, struct _cef_drag_data_t* dragData,
enum cef_drag_operations_mask_t mask)
{
cef_browser_t* browser, cef_drag_data_t* dragData,
enum cef_drag_operations_mask_t mask) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -45,11 +44,9 @@ int CEF_CALLBACK drag_handler_on_drag_start(struct _cef_drag_handler_t* self,
return _retval;
}
int CEF_CALLBACK drag_handler_on_drag_enter(struct _cef_drag_handler_t* self,
cef_browser_t* browser, struct _cef_drag_data_t* dragData,
enum cef_drag_operations_mask_t mask)
{
cef_browser_t* browser, cef_drag_data_t* dragData,
enum cef_drag_operations_mask_t mask) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -75,12 +72,10 @@ int CEF_CALLBACK drag_handler_on_drag_enter(struct _cef_drag_handler_t* self,
}
// CONSTRUCTOR - Do not edit by hand.
CefDragHandlerCppToC::CefDragHandlerCppToC(CefDragHandler* cls)
: CefCppToC<CefDragHandlerCppToC, CefDragHandler, cef_drag_handler_t>(cls)
{
: CefCppToC<CefDragHandlerCppToC, CefDragHandler, cef_drag_handler_t>(cls) {
struct_.struct_.on_drag_start = drag_handler_on_drag_start;
struct_.struct_.on_drag_enter = drag_handler_on_drag_enter;
}

25
cef/libcef_dll/cpptoc/drag_handler_cpptoc.h Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -10,27 +10,28 @@
// for more information.
//
#ifndef _DRAGHANDLER_CPPTOC_H
#define _DRAGHANDLER_CPPTOC_H
#ifndef CEF_LIBCEF_DLL_CPPTOC_DRAG_HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_DRAG_HANDLER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_capi.h"
#include "include/cef_drag_handler.h"
#include "include/capi/cef_drag_handler_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefDragHandlerCppToC
: public CefCppToC<CefDragHandlerCppToC, CefDragHandler, cef_drag_handler_t>
{
public:
CefDragHandlerCppToC(CefDragHandler* cls);
: public CefCppToC<CefDragHandlerCppToC, CefDragHandler,
cef_drag_handler_t> {
public:
explicit CefDragHandlerCppToC(CefDragHandler* cls);
virtual ~CefDragHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _DRAGHANDLER_CPPTOC_H
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_DRAG_HANDLER_CPPTOC_H_

10
cef/libcef_dll/cpptoc/find_handler_cpptoc.cc Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -18,8 +18,8 @@
void CEF_CALLBACK find_handler_on_find_result(struct _cef_find_handler_t* self,
cef_browser_t* browser, int identifier, int count,
const cef_rect_t* selectionRect, int activeMatchOrdinal, int finalUpdate)
{
const cef_rect_t* selectionRect, int activeMatchOrdinal,
int finalUpdate) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -48,12 +48,10 @@ void CEF_CALLBACK find_handler_on_find_result(struct _cef_find_handler_t* self,
}
// CONSTRUCTOR - Do not edit by hand.
CefFindHandlerCppToC::CefFindHandlerCppToC(CefFindHandler* cls)
: CefCppToC<CefFindHandlerCppToC, CefFindHandler, cef_find_handler_t>(cls)
{
: CefCppToC<CefFindHandlerCppToC, CefFindHandler, cef_find_handler_t>(cls) {
struct_.struct_.on_find_result = find_handler_on_find_result;
}

25
cef/libcef_dll/cpptoc/find_handler_cpptoc.h Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -10,27 +10,28 @@
// for more information.
//
#ifndef _FINDHANDLER_CPPTOC_H
#define _FINDHANDLER_CPPTOC_H
#ifndef CEF_LIBCEF_DLL_CPPTOC_FIND_HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_FIND_HANDLER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_capi.h"
#include "include/cef_find_handler.h"
#include "include/capi/cef_find_handler_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefFindHandlerCppToC
: public CefCppToC<CefFindHandlerCppToC, CefFindHandler, cef_find_handler_t>
{
public:
CefFindHandlerCppToC(CefFindHandler* cls);
: public CefCppToC<CefFindHandlerCppToC, CefFindHandler,
cef_find_handler_t> {
public:
explicit CefFindHandlerCppToC(CefFindHandler* cls);
virtual ~CefFindHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _FINDHANDLER_CPPTOC_H
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_FIND_HANDLER_CPPTOC_H_

17
cef/libcef_dll/cpptoc/focus_handler_cpptoc.cc Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -19,8 +19,7 @@
// MEMBER FUNCTIONS - Body may be edited by hand.
void CEF_CALLBACK focus_handler_on_take_focus(struct _cef_focus_handler_t* self,
cef_browser_t* browser, int next)
{
cef_browser_t* browser, int next) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -37,10 +36,8 @@ void CEF_CALLBACK focus_handler_on_take_focus(struct _cef_focus_handler_t* self,
next?true:false);
}
int CEF_CALLBACK focus_handler_on_set_focus(struct _cef_focus_handler_t* self,
cef_browser_t* browser, enum cef_handler_focus_source_t source)
{
cef_browser_t* browser, enum cef_handler_focus_source_t source) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -60,11 +57,9 @@ int CEF_CALLBACK focus_handler_on_set_focus(struct _cef_focus_handler_t* self,
return _retval;
}
void CEF_CALLBACK focus_handler_on_focused_node_changed(
struct _cef_focus_handler_t* self, cef_browser_t* browser,
cef_frame_t* frame, struct _cef_domnode_t* node)
{
struct _cef_frame_t* frame, cef_domnode_t* node) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -84,13 +79,11 @@ void CEF_CALLBACK focus_handler_on_focused_node_changed(
}
// CONSTRUCTOR - Do not edit by hand.
CefFocusHandlerCppToC::CefFocusHandlerCppToC(CefFocusHandler* cls)
: CefCppToC<CefFocusHandlerCppToC, CefFocusHandler, cef_focus_handler_t>(
cls)
{
cls) {
struct_.struct_.on_take_focus = focus_handler_on_take_focus;
struct_.struct_.on_set_focus = focus_handler_on_set_focus;
struct_.struct_.on_focused_node_changed =

24
cef/libcef_dll/cpptoc/focus_handler_cpptoc.h Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -10,28 +10,28 @@
// for more information.
//
#ifndef _FOCUSHANDLER_CPPTOC_H
#define _FOCUSHANDLER_CPPTOC_H
#ifndef CEF_LIBCEF_DLL_CPPTOC_FOCUS_HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_FOCUS_HANDLER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_capi.h"
#include "include/cef_focus_handler.h"
#include "include/capi/cef_focus_handler_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefFocusHandlerCppToC
: public CefCppToC<CefFocusHandlerCppToC, CefFocusHandler,
cef_focus_handler_t>
{
public:
CefFocusHandlerCppToC(CefFocusHandler* cls);
cef_focus_handler_t> {
public:
explicit CefFocusHandlerCppToC(CefFocusHandler* cls);
virtual ~CefFocusHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _FOCUSHANDLER_CPPTOC_H
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_FOCUS_HANDLER_CPPTOC_H_

17
cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.cc Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -19,8 +19,7 @@
int CEF_CALLBACK jsdialog_handler_on_jsalert(
struct _cef_jsdialog_handler_t* self, cef_browser_t* browser,
cef_frame_t* frame, const cef_string_t* message)
{
cef_frame_t* frame, const cef_string_t* message) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -49,11 +48,9 @@ int CEF_CALLBACK jsdialog_handler_on_jsalert(
return _retval;
}
int CEF_CALLBACK jsdialog_handler_on_jsconfirm(
struct _cef_jsdialog_handler_t* self, cef_browser_t* browser,
cef_frame_t* frame, const cef_string_t* message, int* retval)
{
cef_frame_t* frame, const cef_string_t* message, int* retval) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -94,12 +91,10 @@ int CEF_CALLBACK jsdialog_handler_on_jsconfirm(
return _retval;
}
int CEF_CALLBACK jsdialog_handler_on_jsprompt(
struct _cef_jsdialog_handler_t* self, cef_browser_t* browser,
cef_frame_t* frame, const cef_string_t* message,
const cef_string_t* defaultValue, int* retval, cef_string_t* result)
{
const cef_string_t* defaultValue, int* retval, cef_string_t* result) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -153,13 +148,11 @@ int CEF_CALLBACK jsdialog_handler_on_jsprompt(
}
// CONSTRUCTOR - Do not edit by hand.
CefJSDialogHandlerCppToC::CefJSDialogHandlerCppToC(CefJSDialogHandler* cls)
: CefCppToC<CefJSDialogHandlerCppToC, CefJSDialogHandler,
cef_jsdialog_handler_t>(cls)
{
cef_jsdialog_handler_t>(cls) {
struct_.struct_.on_jsalert = jsdialog_handler_on_jsalert;
struct_.struct_.on_jsconfirm = jsdialog_handler_on_jsconfirm;
struct_.struct_.on_jsprompt = jsdialog_handler_on_jsprompt;

24
cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.h Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -10,28 +10,28 @@
// for more information.
//
#ifndef _JSDIALOGHANDLER_CPPTOC_H
#define _JSDIALOGHANDLER_CPPTOC_H
#ifndef CEF_LIBCEF_DLL_CPPTOC_JSDIALOG_HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_JSDIALOG_HANDLER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_capi.h"
#include "include/cef_jsdialog_handler.h"
#include "include/capi/cef_jsdialog_handler_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefJSDialogHandlerCppToC
: public CefCppToC<CefJSDialogHandlerCppToC, CefJSDialogHandler,
cef_jsdialog_handler_t>
{
public:
CefJSDialogHandlerCppToC(CefJSDialogHandler* cls);
cef_jsdialog_handler_t> {
public:
explicit CefJSDialogHandlerCppToC(CefJSDialogHandler* cls);
virtual ~CefJSDialogHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _JSDIALOGHANDLER_CPPTOC_H
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_JSDIALOG_HANDLER_CPPTOC_H_

9
cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.cc Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -19,8 +19,7 @@
int CEF_CALLBACK keyboard_handler_on_key_event(
struct _cef_keyboard_handler_t* self, cef_browser_t* browser,
enum cef_handler_keyevent_type_t type, int code, int modifiers,
int isSystemKey, int isAfterJavaScript)
{
int isSystemKey, int isAfterJavaScript) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -45,13 +44,11 @@ int CEF_CALLBACK keyboard_handler_on_key_event(
}
// CONSTRUCTOR - Do not edit by hand.
CefKeyboardHandlerCppToC::CefKeyboardHandlerCppToC(CefKeyboardHandler* cls)
: CefCppToC<CefKeyboardHandlerCppToC, CefKeyboardHandler,
cef_keyboard_handler_t>(cls)
{
cef_keyboard_handler_t>(cls) {
struct_.struct_.on_key_event = keyboard_handler_on_key_event;
}

24
cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.h Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -10,28 +10,28 @@
// for more information.
//
#ifndef _KEYBOARDHANDLER_CPPTOC_H
#define _KEYBOARDHANDLER_CPPTOC_H
#ifndef CEF_LIBCEF_DLL_CPPTOC_KEYBOARD_HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_KEYBOARD_HANDLER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_capi.h"
#include "include/cef_keyboard_handler.h"
#include "include/capi/cef_keyboard_handler_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefKeyboardHandlerCppToC
: public CefCppToC<CefKeyboardHandlerCppToC, CefKeyboardHandler,
cef_keyboard_handler_t>
{
public:
CefKeyboardHandlerCppToC(CefKeyboardHandler* cls);
cef_keyboard_handler_t> {
public:
explicit CefKeyboardHandlerCppToC(CefKeyboardHandler* cls);
virtual ~CefKeyboardHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _KEYBOARDHANDLER_CPPTOC_H
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_KEYBOARD_HANDLER_CPPTOC_H_

25
cef/libcef_dll/cpptoc/life_span_handler_cpptoc.cc Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -21,8 +21,7 @@ int CEF_CALLBACK life_span_handler_on_before_popup(
struct _cef_life_span_handler_t* self, cef_browser_t* parentBrowser,
const struct _cef_popup_features_t* popupFeatures,
cef_window_info_t* windowInfo, const cef_string_t* url,
struct _cef_client_t** client, struct _cef_browser_settings_t* settings)
{
cef_client_t** client, struct _cef_browser_settings_t* settings) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -98,10 +97,8 @@ int CEF_CALLBACK life_span_handler_on_before_popup(
return _retval;
}
void CEF_CALLBACK life_span_handler_on_after_created(
struct _cef_life_span_handler_t* self, cef_browser_t* browser)
{
struct _cef_life_span_handler_t* self, cef_browser_t* browser) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -117,10 +114,8 @@ void CEF_CALLBACK life_span_handler_on_after_created(
CefBrowserCToCpp::Wrap(browser));
}
int CEF_CALLBACK life_span_handler_run_modal(
struct _cef_life_span_handler_t* self, cef_browser_t* browser)
{
struct _cef_life_span_handler_t* self, cef_browser_t* browser) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -139,10 +134,8 @@ int CEF_CALLBACK life_span_handler_run_modal(
return _retval;
}
int CEF_CALLBACK life_span_handler_do_close(
struct _cef_life_span_handler_t* self, cef_browser_t* browser)
{
struct _cef_life_span_handler_t* self, cef_browser_t* browser) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -161,10 +154,8 @@ int CEF_CALLBACK life_span_handler_do_close(
return _retval;
}
void CEF_CALLBACK life_span_handler_on_before_close(
struct _cef_life_span_handler_t* self, cef_browser_t* browser)
{
struct _cef_life_span_handler_t* self, cef_browser_t* browser) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -181,13 +172,11 @@ void CEF_CALLBACK life_span_handler_on_before_close(
}
// CONSTRUCTOR - Do not edit by hand.
CefLifeSpanHandlerCppToC::CefLifeSpanHandlerCppToC(CefLifeSpanHandler* cls)
: CefCppToC<CefLifeSpanHandlerCppToC, CefLifeSpanHandler,
cef_life_span_handler_t>(cls)
{
cef_life_span_handler_t>(cls) {
struct_.struct_.on_before_popup = life_span_handler_on_before_popup;
struct_.struct_.on_after_created = life_span_handler_on_after_created;
struct_.struct_.run_modal = life_span_handler_run_modal;

26
cef/libcef_dll/cpptoc/life_span_handler_cpptoc.h Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -10,28 +10,30 @@
// for more information.
//
#ifndef _LIFESPANHANDLER_CPPTOC_H
#define _LIFESPANHANDLER_CPPTOC_H
#ifndef CEF_LIBCEF_DLL_CPPTOC_LIFE_SPAN_HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_LIFE_SPAN_HANDLER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_capi.h"
#include "include/cef_life_span_handler.h"
#include "include/capi/cef_life_span_handler_capi.h"
#include "include/cef_client.h"
#include "include/capi/cef_client_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefLifeSpanHandlerCppToC
: public CefCppToC<CefLifeSpanHandlerCppToC, CefLifeSpanHandler,
cef_life_span_handler_t>
{
public:
CefLifeSpanHandlerCppToC(CefLifeSpanHandler* cls);
cef_life_span_handler_t> {
public:
explicit CefLifeSpanHandlerCppToC(CefLifeSpanHandler* cls);
virtual ~CefLifeSpanHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _LIFESPANHANDLER_CPPTOC_H
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_LIFE_SPAN_HANDLER_CPPTOC_H_

17
cef/libcef_dll/cpptoc/load_handler_cpptoc.cc Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -18,8 +18,7 @@
// MEMBER FUNCTIONS - Body may be edited by hand.
void CEF_CALLBACK load_handler_on_load_start(struct _cef_load_handler_t* self,
cef_browser_t* browser, cef_frame_t* frame)
{
cef_browser_t* browser, cef_frame_t* frame) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -40,10 +39,8 @@ void CEF_CALLBACK load_handler_on_load_start(struct _cef_load_handler_t* self,
CefFrameCToCpp::Wrap(frame));
}
void CEF_CALLBACK load_handler_on_load_end(struct _cef_load_handler_t* self,
cef_browser_t* browser, cef_frame_t* frame, int httpStatusCode)
{
cef_browser_t* browser, cef_frame_t* frame, int httpStatusCode) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -65,12 +62,10 @@ void CEF_CALLBACK load_handler_on_load_end(struct _cef_load_handler_t* self,
httpStatusCode);
}
int CEF_CALLBACK load_handler_on_load_error(struct _cef_load_handler_t* self,
cef_browser_t* browser, cef_frame_t* frame,
enum cef_handler_errorcode_t errorCode, const cef_string_t* failedUrl,
cef_string_t* errorText)
{
cef_string_t* errorText) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -109,12 +104,10 @@ int CEF_CALLBACK load_handler_on_load_error(struct _cef_load_handler_t* self,
}
// CONSTRUCTOR - Do not edit by hand.
CefLoadHandlerCppToC::CefLoadHandlerCppToC(CefLoadHandler* cls)
: CefCppToC<CefLoadHandlerCppToC, CefLoadHandler, cef_load_handler_t>(cls)
{
: CefCppToC<CefLoadHandlerCppToC, CefLoadHandler, cef_load_handler_t>(cls) {
struct_.struct_.on_load_start = load_handler_on_load_start;
struct_.struct_.on_load_end = load_handler_on_load_end;
struct_.struct_.on_load_error = load_handler_on_load_error;

25
cef/libcef_dll/cpptoc/load_handler_cpptoc.h Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -10,27 +10,28 @@
// for more information.
//
#ifndef _LOADHANDLER_CPPTOC_H
#define _LOADHANDLER_CPPTOC_H
#ifndef CEF_LIBCEF_DLL_CPPTOC_LOAD_HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_LOAD_HANDLER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_capi.h"
#include "include/cef_load_handler.h"
#include "include/capi/cef_load_handler_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefLoadHandlerCppToC
: public CefCppToC<CefLoadHandlerCppToC, CefLoadHandler, cef_load_handler_t>
{
public:
CefLoadHandlerCppToC(CefLoadHandler* cls);
: public CefCppToC<CefLoadHandlerCppToC, CefLoadHandler,
cef_load_handler_t> {
public:
explicit CefLoadHandlerCppToC(CefLoadHandler* cls);
virtual ~CefLoadHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _LOADHANDLER_CPPTOC_H
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_LOAD_HANDLER_CPPTOC_H_

17
cef/libcef_dll/cpptoc/menu_handler_cpptoc.cc Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -17,8 +17,7 @@
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK menu_handler_on_before_menu(struct _cef_menu_handler_t* self,
cef_browser_t* browser, const struct _cef_menu_info_t* menuInfo)
{
cef_browser_t* browser, const struct _cef_menu_info_t* menuInfo) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -47,10 +46,8 @@ int CEF_CALLBACK menu_handler_on_before_menu(struct _cef_menu_handler_t* self,
return _retval;
}
void CEF_CALLBACK menu_handler_get_menu_label(struct _cef_menu_handler_t* self,
cef_browser_t* browser, enum cef_menu_id_t menuId, cef_string_t* label)
{
cef_browser_t* browser, enum cef_menu_id_t menuId, cef_string_t* label) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -75,10 +72,8 @@ void CEF_CALLBACK menu_handler_get_menu_label(struct _cef_menu_handler_t* self,
labelStr);
}
int CEF_CALLBACK menu_handler_on_menu_action(struct _cef_menu_handler_t* self,
cef_browser_t* browser, enum cef_menu_id_t menuId)
{
cef_browser_t* browser, enum cef_menu_id_t menuId) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -99,12 +94,10 @@ int CEF_CALLBACK menu_handler_on_menu_action(struct _cef_menu_handler_t* self,
}
// CONSTRUCTOR - Do not edit by hand.
CefMenuHandlerCppToC::CefMenuHandlerCppToC(CefMenuHandler* cls)
: CefCppToC<CefMenuHandlerCppToC, CefMenuHandler, cef_menu_handler_t>(cls)
{
: CefCppToC<CefMenuHandlerCppToC, CefMenuHandler, cef_menu_handler_t>(cls) {
struct_.struct_.on_before_menu = menu_handler_on_before_menu;
struct_.struct_.get_menu_label = menu_handler_get_menu_label;
struct_.struct_.on_menu_action = menu_handler_on_menu_action;

25
cef/libcef_dll/cpptoc/menu_handler_cpptoc.h Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -10,27 +10,28 @@
// for more information.
//
#ifndef _MENUHANDLER_CPPTOC_H
#define _MENUHANDLER_CPPTOC_H
#ifndef CEF_LIBCEF_DLL_CPPTOC_MENU_HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_MENU_HANDLER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_capi.h"
#include "include/cef_menu_handler.h"
#include "include/capi/cef_menu_handler_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefMenuHandlerCppToC
: public CefCppToC<CefMenuHandlerCppToC, CefMenuHandler, cef_menu_handler_t>
{
public:
CefMenuHandlerCppToC(CefMenuHandler* cls);
: public CefCppToC<CefMenuHandlerCppToC, CefMenuHandler,
cef_menu_handler_t> {
public:
explicit CefMenuHandlerCppToC(CefMenuHandler* cls);
virtual ~CefMenuHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _MENUHANDLER_CPPTOC_H
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_MENU_HANDLER_CPPTOC_H_

13
cef/libcef_dll/cpptoc/print_handler_cpptoc.cc Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -19,8 +19,7 @@
int CEF_CALLBACK print_handler_get_print_options(
struct _cef_print_handler_t* self, cef_browser_t* browser,
struct _cef_print_options_t* printOptions)
{
struct _cef_print_options_t* printOptions) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -53,15 +52,13 @@ int CEF_CALLBACK print_handler_get_print_options(
return _retval;
}
int CEF_CALLBACK print_handler_get_print_header_footer(
struct _cef_print_handler_t* self, cef_browser_t* browser,
cef_frame_t* frame, const cef_print_info_t* printInfo,
const cef_string_t* url, const cef_string_t* title, int currentPage,
int maxPages, cef_string_t* topLeft, cef_string_t* topCenter,
cef_string_t* topRight, cef_string_t* bottomLeft,
cef_string_t* bottomCenter, cef_string_t* bottomRight)
{
cef_string_t* bottomCenter, cef_string_t* bottomRight) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -150,13 +147,11 @@ int CEF_CALLBACK print_handler_get_print_header_footer(
}
// CONSTRUCTOR - Do not edit by hand.
CefPrintHandlerCppToC::CefPrintHandlerCppToC(CefPrintHandler* cls)
: CefCppToC<CefPrintHandlerCppToC, CefPrintHandler, cef_print_handler_t>(
cls)
{
cls) {
struct_.struct_.get_print_options = print_handler_get_print_options;
struct_.struct_.get_print_header_footer =
print_handler_get_print_header_footer;

24
cef/libcef_dll/cpptoc/print_handler_cpptoc.h Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -10,28 +10,28 @@
// for more information.
//
#ifndef _PRINTHANDLER_CPPTOC_H
#define _PRINTHANDLER_CPPTOC_H
#ifndef CEF_LIBCEF_DLL_CPPTOC_PRINT_HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_PRINT_HANDLER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_capi.h"
#include "include/cef_print_handler.h"
#include "include/capi/cef_print_handler_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefPrintHandlerCppToC
: public CefCppToC<CefPrintHandlerCppToC, CefPrintHandler,
cef_print_handler_t>
{
public:
CefPrintHandlerCppToC(CefPrintHandler* cls);
cef_print_handler_t> {
public:
explicit CefPrintHandlerCppToC(CefPrintHandler* cls);
virtual ~CefPrintHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _PRINTHANDLER_CPPTOC_H
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_PRINT_HANDLER_CPPTOC_H_

9
cef/libcef_dll/cpptoc/proxy_handler_cpptoc.cc Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -17,8 +17,7 @@
void CEF_CALLBACK proxy_handler_get_proxy_for_url(
struct _cef_proxy_handler_t* self, const cef_string_t* url,
struct _cef_proxy_info_t* proxy_info)
{
struct _cef_proxy_info_t* proxy_info) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -49,13 +48,11 @@ void CEF_CALLBACK proxy_handler_get_proxy_for_url(
}
// CONSTRUCTOR - Do not edit by hand.
CefProxyHandlerCppToC::CefProxyHandlerCppToC(CefProxyHandler* cls)
: CefCppToC<CefProxyHandlerCppToC, CefProxyHandler, cef_proxy_handler_t>(
cls)
{
cls) {
struct_.struct_.get_proxy_for_url = proxy_handler_get_proxy_for_url;
}

24
cef/libcef_dll/cpptoc/proxy_handler_cpptoc.h Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -10,28 +10,28 @@
// for more information.
//
#ifndef _PROXYHANDLER_CPPTOC_H
#define _PROXYHANDLER_CPPTOC_H
#ifndef CEF_LIBCEF_DLL_CPPTOC_PROXY_HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_PROXY_HANDLER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_capi.h"
#include "include/cef_proxy_handler.h"
#include "include/capi/cef_proxy_handler_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefProxyHandlerCppToC
: public CefCppToC<CefProxyHandlerCppToC, CefProxyHandler,
cef_proxy_handler_t>
{
public:
CefProxyHandlerCppToC(CefProxyHandler* cls);
cef_proxy_handler_t> {
public:
explicit CefProxyHandlerCppToC(CefProxyHandler* cls);
virtual ~CefProxyHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _PROXYHANDLER_CPPTOC_H
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_PROXY_HANDLER_CPPTOC_H_

23
cef/libcef_dll/cpptoc/read_handler_cpptoc.cc Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -16,8 +16,7 @@
// MEMBER FUNCTIONS - Body may be edited by hand.
size_t CEF_CALLBACK read_handler_read(struct _cef_read_handler_t* self,
void* ptr, size_t size, size_t n)
{
void* ptr, size_t size, size_t n) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -38,10 +37,8 @@ size_t CEF_CALLBACK read_handler_read(struct _cef_read_handler_t* self,
return _retval;
}
int CEF_CALLBACK read_handler_seek(struct _cef_read_handler_t* self,
long offset, int whence)
{
int64 offset, int whence) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -57,9 +54,7 @@ int CEF_CALLBACK read_handler_seek(struct _cef_read_handler_t* self,
return _retval;
}
long CEF_CALLBACK read_handler_tell(struct _cef_read_handler_t* self)
{
int64 CEF_CALLBACK read_handler_tell(struct _cef_read_handler_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -67,15 +62,13 @@ long CEF_CALLBACK read_handler_tell(struct _cef_read_handler_t* self)
return 0;
// Execute
long _retval = CefReadHandlerCppToC::Get(self)->Tell();
int64 _retval = CefReadHandlerCppToC::Get(self)->Tell();
// Return type: simple
return _retval;
}
int CEF_CALLBACK read_handler_eof(struct _cef_read_handler_t* self)
{
int CEF_CALLBACK read_handler_eof(struct _cef_read_handler_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -90,12 +83,10 @@ int CEF_CALLBACK read_handler_eof(struct _cef_read_handler_t* self)
}
// CONSTRUCTOR - Do not edit by hand.
CefReadHandlerCppToC::CefReadHandlerCppToC(CefReadHandler* cls)
: CefCppToC<CefReadHandlerCppToC, CefReadHandler, cef_read_handler_t>(cls)
{
: CefCppToC<CefReadHandlerCppToC, CefReadHandler, cef_read_handler_t>(cls) {
struct_.struct_.read = read_handler_read;
struct_.struct_.seek = read_handler_seek;
struct_.struct_.tell = read_handler_tell;

25
cef/libcef_dll/cpptoc/read_handler_cpptoc.h Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -10,27 +10,28 @@
// for more information.
//
#ifndef _READHANDLER_CPPTOC_H
#define _READHANDLER_CPPTOC_H
#ifndef CEF_LIBCEF_DLL_CPPTOC_READ_HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_READ_HANDLER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_capi.h"
#include "include/cef_stream.h"
#include "include/capi/cef_stream_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefReadHandlerCppToC
: public CefCppToC<CefReadHandlerCppToC, CefReadHandler, cef_read_handler_t>
{
public:
CefReadHandlerCppToC(CefReadHandler* cls);
: public CefCppToC<CefReadHandlerCppToC, CefReadHandler,
cef_read_handler_t> {
public:
explicit CefReadHandlerCppToC(CefReadHandler* cls);
virtual ~CefReadHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _READHANDLER_CPPTOC_H
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_READ_HANDLER_CPPTOC_H_

34
cef/libcef_dll/cpptoc/render_handler_cpptoc.cc Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -18,8 +18,7 @@
int CEF_CALLBACK render_handler_get_view_rect(
struct _cef_render_handler_t* self, cef_browser_t* browser,
cef_rect_t* rect)
{
cef_rect_t* rect) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -50,11 +49,9 @@ int CEF_CALLBACK render_handler_get_view_rect(
return _retval;
}
int CEF_CALLBACK render_handler_get_screen_rect(
struct _cef_render_handler_t* self, cef_browser_t* browser,
cef_rect_t* rect)
{
cef_rect_t* rect) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -85,11 +82,9 @@ int CEF_CALLBACK render_handler_get_screen_rect(
return _retval;
}
int CEF_CALLBACK render_handler_get_screen_point(
struct _cef_render_handler_t* self, cef_browser_t* browser, int viewX,
int viewY, int* screenX, int* screenY)
{
int viewY, int* screenX, int* screenY) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -132,10 +127,8 @@ int CEF_CALLBACK render_handler_get_screen_point(
return _retval;
}
void CEF_CALLBACK render_handler_on_popup_show(
struct _cef_render_handler_t* self, cef_browser_t* browser, int show)
{
struct _cef_render_handler_t* self, cef_browser_t* browser, int show) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -152,11 +145,9 @@ void CEF_CALLBACK render_handler_on_popup_show(
show?true:false);
}
void CEF_CALLBACK render_handler_on_popup_size(
struct _cef_render_handler_t* self, cef_browser_t* browser,
const cef_rect_t* rect)
{
const cef_rect_t* rect) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -180,11 +171,10 @@ void CEF_CALLBACK render_handler_on_popup_size(
rectVal);
}
void CEF_CALLBACK render_handler_on_paint(struct _cef_render_handler_t* self,
cef_browser_t* browser, enum cef_paint_element_type_t type,
size_t dirtyRectsCount, cef_rect_t const* dirtyRects, const void* buffer)
{
size_t dirtyRectsCount, cef_rect_t const* dirtyRects,
const void* buffer) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -219,11 +209,9 @@ void CEF_CALLBACK render_handler_on_paint(struct _cef_render_handler_t* self,
buffer);
}
void CEF_CALLBACK render_handler_on_cursor_change(
struct _cef_render_handler_t* self, cef_browser_t* browser,
cef_cursor_handle_t cursor)
{
cef_cursor_handle_t cursor) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -241,13 +229,11 @@ void CEF_CALLBACK render_handler_on_cursor_change(
}
// CONSTRUCTOR - Do not edit by hand.
CefRenderHandlerCppToC::CefRenderHandlerCppToC(CefRenderHandler* cls)
: CefCppToC<CefRenderHandlerCppToC, CefRenderHandler, cef_render_handler_t>(
cls)
{
cls) {
struct_.struct_.get_view_rect = render_handler_get_view_rect;
struct_.struct_.get_screen_rect = render_handler_get_screen_rect;
struct_.struct_.get_screen_point = render_handler_get_screen_point;

24
cef/libcef_dll/cpptoc/render_handler_cpptoc.h Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -10,28 +10,28 @@
// for more information.
//
#ifndef _RENDERHANDLER_CPPTOC_H
#define _RENDERHANDLER_CPPTOC_H
#ifndef CEF_LIBCEF_DLL_CPPTOC_RENDER_HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_RENDER_HANDLER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_capi.h"
#include "include/cef_render_handler.h"
#include "include/capi/cef_render_handler_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefRenderHandlerCppToC
: public CefCppToC<CefRenderHandlerCppToC, CefRenderHandler,
cef_render_handler_t>
{
public:
CefRenderHandlerCppToC(CefRenderHandler* cls);
cef_render_handler_t> {
public:
explicit CefRenderHandlerCppToC(CefRenderHandler* cls);
virtual ~CefRenderHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _RENDERHANDLER_CPPTOC_H
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_RENDER_HANDLER_CPPTOC_H_

64
cef/libcef_dll/cpptoc/request_handler_cpptoc.cc Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -14,6 +14,7 @@
#include "libcef_dll/cpptoc/download_handler_cpptoc.h"
#include "libcef_dll/cpptoc/request_handler_cpptoc.h"
#include "libcef_dll/ctocpp/browser_ctocpp.h"
#include "libcef_dll/ctocpp/cookie_manager_ctocpp.h"
#include "libcef_dll/ctocpp/frame_ctocpp.h"
#include "libcef_dll/ctocpp/request_ctocpp.h"
#include "libcef_dll/ctocpp/response_ctocpp.h"
@@ -24,9 +25,8 @@
int CEF_CALLBACK request_handler_on_before_browse(
struct _cef_request_handler_t* self, cef_browser_t* browser,
cef_frame_t* frame, struct _cef_request_t* request,
enum cef_handler_navtype_t navType, int isRedirect)
{
cef_frame_t* frame, cef_request_t* request,
enum cef_handler_navtype_t navType, int isRedirect) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -57,13 +57,11 @@ int CEF_CALLBACK request_handler_on_before_browse(
return _retval;
}
int CEF_CALLBACK request_handler_on_before_resource_load(
struct _cef_request_handler_t* self, cef_browser_t* browser,
struct _cef_request_t* request, cef_string_t* redirectUrl,
cef_request_t* request, cef_string_t* redirectUrl,
struct _cef_stream_reader_t** resourceStream,
struct _cef_response_t* response, int loadFlags)
{
struct _cef_response_t* response, int loadFlags) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -122,11 +120,9 @@ int CEF_CALLBACK request_handler_on_before_resource_load(
return _retval;
}
void CEF_CALLBACK request_handler_on_resource_redirect(
struct _cef_request_handler_t* self, cef_browser_t* browser,
const cef_string_t* old_url, cef_string_t* new_url)
{
const cef_string_t* old_url, cef_string_t* new_url) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -155,12 +151,10 @@ void CEF_CALLBACK request_handler_on_resource_redirect(
new_urlStr);
}
void CEF_CALLBACK request_handler_on_resource_response(
struct _cef_request_handler_t* self, cef_browser_t* browser,
const cef_string_t* url, struct _cef_response_t* response,
struct _cef_content_filter_t** filter)
{
cef_content_filter_t** filter) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -208,11 +202,9 @@ void CEF_CALLBACK request_handler_on_resource_response(
}
}
int CEF_CALLBACK request_handler_on_protocol_execution(
struct _cef_request_handler_t* self, cef_browser_t* browser,
const cef_string_t* url, int* allowOSExecution)
{
const cef_string_t* url, int* allowOSExecution) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -249,12 +241,10 @@ int CEF_CALLBACK request_handler_on_protocol_execution(
return _retval;
}
int CEF_CALLBACK request_handler_get_download_handler(
struct _cef_request_handler_t* self, cef_browser_t* browser,
const cef_string_t* mimeType, const cef_string_t* fileName,
int64 contentLength, struct _cef_download_handler_t** handler)
{
int64 contentLength, cef_download_handler_t** handler) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -306,13 +296,11 @@ int CEF_CALLBACK request_handler_get_download_handler(
return _retval;
}
int CEF_CALLBACK request_handler_get_auth_credentials(
struct _cef_request_handler_t* self, cef_browser_t* browser, int isProxy,
const cef_string_t* host, int port, const cef_string_t* realm,
const cef_string_t* scheme, cef_string_t* username,
cef_string_t* password)
{
cef_string_t* password) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -360,14 +348,39 @@ int CEF_CALLBACK request_handler_get_auth_credentials(
return _retval;
}
cef_cookie_manager_t* CEF_CALLBACK request_handler_get_cookie_manager(
struct _cef_request_handler_t* self, cef_browser_t* browser,
const cef_string_t* main_url) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return NULL;
// Verify param: main_url; type: string_byref_const
DCHECK(main_url);
if (!main_url)
return NULL;
// Execute
CefRefPtr<CefCookieManager> _retval = CefRequestHandlerCppToC::Get(
self)->GetCookieManager(
CefBrowserCToCpp::Wrap(browser),
CefString(main_url));
// Return type: refptr_diff
return CefCookieManagerCToCpp::Unwrap(_retval);
}
// CONSTRUCTOR - Do not edit by hand.
CefRequestHandlerCppToC::CefRequestHandlerCppToC(CefRequestHandler* cls)
: CefCppToC<CefRequestHandlerCppToC, CefRequestHandler,
cef_request_handler_t>(cls)
{
cef_request_handler_t>(cls) {
struct_.struct_.on_before_browse = request_handler_on_before_browse;
struct_.struct_.on_before_resource_load =
request_handler_on_before_resource_load;
@@ -376,6 +389,7 @@ CefRequestHandlerCppToC::CefRequestHandlerCppToC(CefRequestHandler* cls)
struct_.struct_.on_protocol_execution = request_handler_on_protocol_execution;
struct_.struct_.get_download_handler = request_handler_get_download_handler;
struct_.struct_.get_auth_credentials = request_handler_get_auth_credentials;
struct_.struct_.get_cookie_manager = request_handler_get_cookie_manager;
}
#ifndef NDEBUG

24
cef/libcef_dll/cpptoc/request_handler_cpptoc.h Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -10,28 +10,28 @@
// for more information.
//
#ifndef _REQUESTHANDLER_CPPTOC_H
#define _REQUESTHANDLER_CPPTOC_H
#ifndef CEF_LIBCEF_DLL_CPPTOC_REQUEST_HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_REQUEST_HANDLER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_capi.h"
#include "include/cef_request_handler.h"
#include "include/capi/cef_request_handler_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefRequestHandlerCppToC
: public CefCppToC<CefRequestHandlerCppToC, CefRequestHandler,
cef_request_handler_t>
{
public:
CefRequestHandlerCppToC(CefRequestHandler* cls);
cef_request_handler_t> {
public:
explicit CefRequestHandlerCppToC(CefRequestHandler* cls);
virtual ~CefRequestHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _REQUESTHANDLER_CPPTOC_H
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_REQUEST_HANDLER_CPPTOC_H_

21
cef/libcef_dll/cpptoc/scheme_handler_cpptoc.cc Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -20,8 +20,7 @@
int CEF_CALLBACK scheme_handler_process_request(
struct _cef_scheme_handler_t* self, cef_request_t* request,
cef_scheme_handler_callback_t* callback)
{
cef_scheme_handler_callback_t* callback) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -45,11 +44,9 @@ int CEF_CALLBACK scheme_handler_process_request(
return _retval;
}
void CEF_CALLBACK scheme_handler_get_response_headers(
struct _cef_scheme_handler_t* self, cef_response_t* response,
int64* response_length, cef_string_t* redirectUrl)
{
int64* response_length, cef_string_t* redirectUrl) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -84,11 +81,9 @@ void CEF_CALLBACK scheme_handler_get_response_headers(
*response_length = response_lengthVal;
}
int CEF_CALLBACK scheme_handler_read_response(
struct _cef_scheme_handler_t* self, void* data_out, int bytes_to_read,
int* bytes_read, cef_scheme_handler_callback_t* callback)
{
int* bytes_read, cef_scheme_handler_callback_t* callback) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -125,9 +120,7 @@ int CEF_CALLBACK scheme_handler_read_response(
return _retval;
}
void CEF_CALLBACK scheme_handler_cancel(struct _cef_scheme_handler_t* self)
{
void CEF_CALLBACK scheme_handler_cancel(struct _cef_scheme_handler_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -139,13 +132,11 @@ void CEF_CALLBACK scheme_handler_cancel(struct _cef_scheme_handler_t* self)
}
// CONSTRUCTOR - Do not edit by hand.
CefSchemeHandlerCppToC::CefSchemeHandlerCppToC(CefSchemeHandler* cls)
: CefCppToC<CefSchemeHandlerCppToC, CefSchemeHandler, cef_scheme_handler_t>(
cls)
{
cls) {
struct_.struct_.process_request = scheme_handler_process_request;
struct_.struct_.get_response_headers = scheme_handler_get_response_headers;
struct_.struct_.read_response = scheme_handler_read_response;

24
cef/libcef_dll/cpptoc/scheme_handler_cpptoc.h Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -10,28 +10,28 @@
// for more information.
//
#ifndef _SCHEMEHANDLER_CPPTOC_H
#define _SCHEMEHANDLER_CPPTOC_H
#ifndef CEF_LIBCEF_DLL_CPPTOC_SCHEME_HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_SCHEME_HANDLER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_capi.h"
#include "include/cef_scheme.h"
#include "include/capi/cef_scheme_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefSchemeHandlerCppToC
: public CefCppToC<CefSchemeHandlerCppToC, CefSchemeHandler,
cef_scheme_handler_t>
{
public:
CefSchemeHandlerCppToC(CefSchemeHandler* cls);
cef_scheme_handler_t> {
public:
explicit CefSchemeHandlerCppToC(CefSchemeHandler* cls);
virtual ~CefSchemeHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _SCHEMEHANDLER_CPPTOC_H
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_SCHEME_HANDLER_CPPTOC_H_

9
cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.cc Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -20,8 +20,7 @@
struct _cef_scheme_handler_t* CEF_CALLBACK scheme_handler_factory_create(
struct _cef_scheme_handler_factory_t* self, cef_browser_t* browser,
const cef_string_t* scheme_name, cef_request_t* request)
{
const cef_string_t* scheme_name, cef_request_t* request) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -52,14 +51,12 @@ struct _cef_scheme_handler_t* CEF_CALLBACK scheme_handler_factory_create(
}
// CONSTRUCTOR - Do not edit by hand.
CefSchemeHandlerFactoryCppToC::CefSchemeHandlerFactoryCppToC(
CefSchemeHandlerFactory* cls)
: CefCppToC<CefSchemeHandlerFactoryCppToC, CefSchemeHandlerFactory,
cef_scheme_handler_factory_t>(cls)
{
cef_scheme_handler_factory_t>(cls) {
struct_.struct_.create = scheme_handler_factory_create;
}

24
cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -10,28 +10,28 @@
// for more information.
//
#ifndef _SCHEMEHANDLERFACTORY_CPPTOC_H
#define _SCHEMEHANDLERFACTORY_CPPTOC_H
#ifndef CEF_LIBCEF_DLL_CPPTOC_SCHEME_HANDLER_FACTORY_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_SCHEME_HANDLER_FACTORY_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_capi.h"
#include "include/cef_scheme.h"
#include "include/capi/cef_scheme_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefSchemeHandlerFactoryCppToC
: public CefCppToC<CefSchemeHandlerFactoryCppToC, CefSchemeHandlerFactory,
cef_scheme_handler_factory_t>
{
public:
CefSchemeHandlerFactoryCppToC(CefSchemeHandlerFactory* cls);
cef_scheme_handler_factory_t> {
public:
explicit CefSchemeHandlerFactoryCppToC(CefSchemeHandlerFactory* cls);
virtual ~CefSchemeHandlerFactoryCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _SCHEMEHANDLERFACTORY_CPPTOC_H
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_SCHEME_HANDLER_FACTORY_CPPTOC_H_

9
cef/libcef_dll/cpptoc/storage_visitor_cpptoc.cc Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -18,8 +18,7 @@
int CEF_CALLBACK storage_visitor_visit(struct _cef_storage_visitor_t* self,
enum cef_storage_type_t type, const cef_string_t* origin,
const cef_string_t* key, const cef_string_t* value, int count, int total,
int* deleteData)
{
int* deleteData) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -64,13 +63,11 @@ int CEF_CALLBACK storage_visitor_visit(struct _cef_storage_visitor_t* self,
}
// CONSTRUCTOR - Do not edit by hand.
CefStorageVisitorCppToC::CefStorageVisitorCppToC(CefStorageVisitor* cls)
: CefCppToC<CefStorageVisitorCppToC, CefStorageVisitor,
cef_storage_visitor_t>(cls)
{
cef_storage_visitor_t>(cls) {
struct_.struct_.visit = storage_visitor_visit;
}

24
cef/libcef_dll/cpptoc/storage_visitor_cpptoc.h Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -10,28 +10,28 @@
// for more information.
//
#ifndef _STORAGEVISITOR_CPPTOC_H
#define _STORAGEVISITOR_CPPTOC_H
#ifndef CEF_LIBCEF_DLL_CPPTOC_STORAGE_VISITOR_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_STORAGE_VISITOR_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_capi.h"
#include "include/cef_storage.h"
#include "include/capi/cef_storage_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefStorageVisitorCppToC
: public CefCppToC<CefStorageVisitorCppToC, CefStorageVisitor,
cef_storage_visitor_t>
{
public:
CefStorageVisitorCppToC(CefStorageVisitor* cls);
cef_storage_visitor_t> {
public:
explicit CefStorageVisitorCppToC(CefStorageVisitor* cls);
virtual ~CefStorageVisitorCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _STORAGEVISITOR_CPPTOC_H
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_STORAGE_VISITOR_CPPTOC_H_

9
cef/libcef_dll/cpptoc/task_cpptoc.cc Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -16,8 +16,7 @@
// MEMBER FUNCTIONS - Body may be edited by hand.
void CEF_CALLBACK task_execute(struct _cef_task_t* self,
cef_thread_id_t threadId)
{
cef_thread_id_t threadId) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -30,12 +29,10 @@ void CEF_CALLBACK task_execute(struct _cef_task_t* self,
}
// CONSTRUCTOR - Do not edit by hand.
CefTaskCppToC::CefTaskCppToC(CefTask* cls)
: CefCppToC<CefTaskCppToC, CefTask, cef_task_t>(cls)
{
: CefCppToC<CefTaskCppToC, CefTask, cef_task_t>(cls) {
struct_.struct_.execute = task_execute;
}

24
cef/libcef_dll/cpptoc/task_cpptoc.h Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -10,27 +10,27 @@
// for more information.
//
#ifndef _TASK_CPPTOC_H
#define _TASK_CPPTOC_H
#ifndef CEF_LIBCEF_DLL_CPPTOC_TASK_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_TASK_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_capi.h"
#include "include/cef_task.h"
#include "include/capi/cef_task_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefTaskCppToC
: public CefCppToC<CefTaskCppToC, CefTask, cef_task_t>
{
public:
CefTaskCppToC(CefTask* cls);
: public CefCppToC<CefTaskCppToC, CefTask, cef_task_t> {
public:
explicit CefTaskCppToC(CefTask* cls);
virtual ~CefTaskCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _TASK_CPPTOC_H
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_TASK_CPPTOC_H_

13
cef/libcef_dll/cpptoc/v8accessor_cpptoc.cc Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -18,8 +18,7 @@
int CEF_CALLBACK v8accessor_get(struct _cef_v8accessor_t* self,
const cef_string_t* name, struct _cef_v8value_t* object,
struct _cef_v8value_t** retval, cef_string_t* exception)
{
struct _cef_v8value_t** retval, cef_string_t* exception) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -72,11 +71,9 @@ int CEF_CALLBACK v8accessor_get(struct _cef_v8accessor_t* self,
return _retval;
}
int CEF_CALLBACK v8accessor_set(struct _cef_v8accessor_t* self,
const cef_string_t* name, struct _cef_v8value_t* object,
struct _cef_v8value_t* value, cef_string_t* exception)
{
struct _cef_v8value_t* value, cef_string_t* exception) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -114,12 +111,10 @@ int CEF_CALLBACK v8accessor_set(struct _cef_v8accessor_t* self,
}
// CONSTRUCTOR - Do not edit by hand.
CefV8AccessorCppToC::CefV8AccessorCppToC(CefV8Accessor* cls)
: CefCppToC<CefV8AccessorCppToC, CefV8Accessor, cef_v8accessor_t>(cls)
{
: CefCppToC<CefV8AccessorCppToC, CefV8Accessor, cef_v8accessor_t>(cls) {
struct_.struct_.get = v8accessor_get;
struct_.struct_.set = v8accessor_set;
}

24
cef/libcef_dll/cpptoc/v8accessor_cpptoc.h Executable file → Normal file
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -10,27 +10,27 @@
// for more information.
//
#ifndef _V8ACCESSOR_CPPTOC_H
#define _V8ACCESSOR_CPPTOC_H
#ifndef CEF_LIBCEF_DLL_CPPTOC_V8ACCESSOR_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_V8ACCESSOR_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#else // USING_CEF_SHARED
#include "include/cef.h"
#include "include/cef_capi.h"
#include "include/cef_v8.h"
#include "include/capi/cef_v8_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefV8AccessorCppToC
: public CefCppToC<CefV8AccessorCppToC, CefV8Accessor, cef_v8accessor_t>
{
public:
CefV8AccessorCppToC(CefV8Accessor* cls);
: public CefCppToC<CefV8AccessorCppToC, CefV8Accessor, cef_v8accessor_t> {
public:
explicit CefV8AccessorCppToC(CefV8Accessor* cls);
virtual ~CefV8AccessorCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // _V8ACCESSOR_CPPTOC_H
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_V8ACCESSOR_CPPTOC_H_

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