Make CEF compliant with Google/Chromium style (issue #473).

- Add a new check_style tool based on Google's cpplint that can be used to verify compliance of pending changes and specific files/directories.
- Update existing CEF source code to be compliant with the style requirements.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@463 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2012-01-09 23:46:23 +00:00
parent 9cc61f448b
commit 1073577d03
558 changed files with 9002 additions and 10977 deletions

202
cef.gyp
View File

@ -29,7 +29,7 @@
'mac_bundle': 1, 'mac_bundle': 1,
'msvs_guid': '6617FED9-C5D4-4907-BF55-A90062A6683F', 'msvs_guid': '6617FED9-C5D4-4907-BF55-A90062A6683F',
'dependencies': [ 'dependencies': [
'../third_party/npapi/npapi.gyp:npapi', '<(DEPTH)/third_party/npapi/npapi.gyp:npapi',
'libcef', 'libcef',
'libcef_dll_wrapper', 'libcef_dll_wrapper',
], ],
@ -38,7 +38,9 @@
], ],
'include_dirs': [ 'include_dirs': [
'.', '.',
'..', # cefclient includes are relative to the tests directory to make
# creation of binary releases easier.
'tests'
], ],
'sources': [ 'sources': [
'<@(includes_common)', '<@(includes_common)',
@ -298,12 +300,12 @@
'mac_bundle': 1, 'mac_bundle': 1,
'msvs_guid': '8500027C-B11A-11DE-A16E-B80256D89593', 'msvs_guid': '8500027C-B11A-11DE-A16E-B80256D89593',
'dependencies': [ 'dependencies': [
'../base/base.gyp:base', '<(DEPTH)/base/base.gyp:base',
'../base/base.gyp:base_i18n', '<(DEPTH)/base/base.gyp:base_i18n',
'../base/base.gyp:test_support_base', '<(DEPTH)/base/base.gyp:test_support_base',
'../testing/gtest.gyp:gtest', '<(DEPTH)/testing/gtest.gyp:gtest',
'../third_party/icu/icu.gyp:icui18n', '<(DEPTH)/third_party/icu/icu.gyp:icui18n',
'../third_party/icu/icu.gyp:icuuc', '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
'libcef', 'libcef',
'libcef_dll_wrapper', 'libcef_dll_wrapper',
], ],
@ -348,7 +350,6 @@
}, },
'include_dirs': [ 'include_dirs': [
'.', '.',
'..',
], ],
'conditions': [ 'conditions': [
[ 'OS=="mac"', { [ 'OS=="mac"', {
@ -431,42 +432,42 @@
'type': 'shared_library', 'type': 'shared_library',
'msvs_guid': 'C13650D5-CF1A-4259-BE45-B1EBA6280E47', 'msvs_guid': 'C13650D5-CF1A-4259-BE45-B1EBA6280E47',
'dependencies': [ 'dependencies': [
'../base/base.gyp:base', '<(DEPTH)/base/base.gyp:base',
'../base/base.gyp:base_i18n', '<(DEPTH)/base/base.gyp:base_i18n',
'../build/temp_gyp/googleurl.gyp:googleurl', '<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl',
'../media/media.gyp:media', '<(DEPTH)/media/media.gyp:media',
'../net/net.gyp:net', '<(DEPTH)/net/net.gyp:net',
'../net/net.gyp:net_resources', '<(DEPTH)/net/net.gyp:net_resources',
'../printing/printing.gyp:printing', '<(DEPTH)/printing/printing.gyp:printing',
'../sdch/sdch.gyp:sdch', '<(DEPTH)/sdch/sdch.gyp:sdch',
'../skia/skia.gyp:skia', '<(DEPTH)/skia/skia.gyp:skia',
'../third_party/bzip2/bzip2.gyp:bzip2', '<(DEPTH)/third_party/bzip2/bzip2.gyp:bzip2',
'../third_party/ffmpeg/ffmpeg.gyp:ffmpeg', '<(DEPTH)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
'../third_party/icu/icu.gyp:icui18n', '<(DEPTH)/third_party/icu/icu.gyp:icui18n',
'../third_party/icu/icu.gyp:icuuc', '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
'../third_party/leveldatabase/leveldatabase.gyp:leveldatabase', '<(DEPTH)/third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
'../third_party/libjpeg_turbo/libjpeg.gyp:libjpeg', '<(DEPTH)/third_party/libjpeg_turbo/libjpeg.gyp:libjpeg',
'../third_party/libpng/libpng.gyp:libpng', '<(DEPTH)/third_party/libpng/libpng.gyp:libpng',
'../third_party/libxml/libxml.gyp:libxml', '<(DEPTH)/third_party/libxml/libxml.gyp:libxml',
'../third_party/libxslt/libxslt.gyp:libxslt', '<(DEPTH)/third_party/libxslt/libxslt.gyp:libxslt',
'../third_party/modp_b64/modp_b64.gyp:modp_b64', '<(DEPTH)/third_party/modp_b64/modp_b64.gyp:modp_b64',
'../third_party/WebKit/Source/WebCore/WebCore.gyp/WebCore.gyp:webcore', '<(DEPTH)/third_party/WebKit/Source/WebCore/WebCore.gyp/WebCore.gyp:webcore',
'../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit', '<(DEPTH)/third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit',
'../third_party/zlib/zlib.gyp:zlib', '<(DEPTH)/third_party/zlib/zlib.gyp:zlib',
'../ui/ui.gyp:gfx_resources', '<(DEPTH)/ui/ui.gyp:gfx_resources',
'../ui/ui.gyp:ui', '<(DEPTH)/ui/ui.gyp:ui',
'../v8/tools/gyp/v8.gyp:v8', '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
'../webkit/support/webkit_support.gyp:appcache', '<(DEPTH)/webkit/support/webkit_support.gyp:appcache',
'../webkit/support/webkit_support.gyp:blob', '<(DEPTH)/webkit/support/webkit_support.gyp:blob',
'../webkit/support/webkit_support.gyp:database', '<(DEPTH)/webkit/support/webkit_support.gyp:database',
'../webkit/support/webkit_support.gyp:fileapi', '<(DEPTH)/webkit/support/webkit_support.gyp:fileapi',
'../webkit/support/webkit_support.gyp:glue', '<(DEPTH)/webkit/support/webkit_support.gyp:glue',
'../webkit/support/webkit_support.gyp:quota', '<(DEPTH)/webkit/support/webkit_support.gyp:quota',
'../webkit/support/webkit_support.gyp:webkit_gpu', '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_gpu',
'../webkit/support/webkit_support.gyp:webkit_media', '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_media',
'../webkit/support/webkit_support.gyp:webkit_resources', '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_resources',
'../webkit/support/webkit_support.gyp:webkit_strings', '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_strings',
'../webkit/support/webkit_support.gyp:webkit_user_agent', '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_user_agent',
'libcef_static', 'libcef_static',
], ],
'defines': [ 'defines': [
@ -474,7 +475,6 @@
], ],
'include_dirs': [ 'include_dirs': [
'.', '.',
'..',
], ],
# Avoid "RC1102: internal error : too many arguments to RCPP" error by # Avoid "RC1102: internal error : too many arguments to RCPP" error by
# explicitly specifying a short list of resource include directories. # explicitly specifying a short list of resource include directories.
@ -498,10 +498,10 @@
'conditions': [ 'conditions': [
['OS=="win"', { ['OS=="win"', {
'dependencies': [ 'dependencies': [
'../breakpad/breakpad.gyp:breakpad_handler', '<(DEPTH)/breakpad/breakpad.gyp:breakpad_handler',
'../third_party/angle/src/build_angle.gyp:libEGL', '<(DEPTH)/third_party/angle/src/build_angle.gyp:libEGL',
'../third_party/angle/src/build_angle.gyp:libGLESv2', '<(DEPTH)/third_party/angle/src/build_angle.gyp:libGLESv2',
'../ui/views/views.gyp:views', '<(DEPTH)/ui/views/views.gyp:views',
], ],
'sources': [ 'sources': [
'<@(includes_win)', '<@(includes_win)',
@ -523,7 +523,7 @@
}], }],
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', { [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
'dependencies':[ 'dependencies':[
'../base/allocator/allocator.gyp:allocator', '<(DEPTH)/base/allocator/allocator.gyp:allocator',
], ],
'direct_dependent_settings': { 'direct_dependent_settings': {
'cflags': [ 'cflags': [
@ -546,7 +546,7 @@
'type': 'static_library', 'type': 'static_library',
'msvs_guid': 'A9D6DC71-C0DC-4549-AEA0-3B15B44E86A9', 'msvs_guid': 'A9D6DC71-C0DC-4549-AEA0-3B15B44E86A9',
'dependencies': [ 'dependencies': [
'../third_party/npapi/npapi.gyp:npapi', '<(DEPTH)/third_party/npapi/npapi.gyp:npapi',
'libcef', 'libcef',
], ],
'defines': [ 'defines': [
@ -554,7 +554,6 @@
], ],
'include_dirs': [ 'include_dirs': [
'.', '.',
'..',
], ],
'sources': [ 'sources': [
'<@(includes_common)', '<@(includes_common)',
@ -567,7 +566,7 @@
'target_name': 'cef_extra_resources', 'target_name': 'cef_extra_resources',
'type': 'none', 'type': 'none',
'dependencies': [ 'dependencies': [
'../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:generate_devtools_grd', '<(DEPTH)/third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:generate_devtools_grd',
], ],
# These resources end up in chrome.pak because they are resources # These resources end up in chrome.pak because they are resources
# used by internal pages. Putting them in a spearate pak file makes # used by internal pages. Putting them in a spearate pak file makes
@ -611,48 +610,47 @@
], ],
'include_dirs': [ 'include_dirs': [
'.', '.',
'..', '<(DEPTH)/third_party/WebKit/Source/WebKit/chromium/public',
'../third_party/WebKit/Source/WebKit/chromium/public',
'<(grit_out_dir)', '<(grit_out_dir)',
], ],
'dependencies': [ 'dependencies': [
'cef_extra_resources', 'cef_extra_resources',
'../base/base.gyp:base', '<(DEPTH)/base/base.gyp:base',
'../base/base.gyp:base_i18n', '<(DEPTH)/base/base.gyp:base_i18n',
'../build/temp_gyp/googleurl.gyp:googleurl', '<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl',
'../media/media.gyp:media', '<(DEPTH)/media/media.gyp:media',
'../net/net.gyp:net', '<(DEPTH)/net/net.gyp:net',
'../net/net.gyp:net_resources', '<(DEPTH)/net/net.gyp:net_resources',
'../printing/printing.gyp:printing', '<(DEPTH)/printing/printing.gyp:printing',
'../sdch/sdch.gyp:sdch', '<(DEPTH)/sdch/sdch.gyp:sdch',
'../skia/skia.gyp:skia', '<(DEPTH)/skia/skia.gyp:skia',
'../third_party/bzip2/bzip2.gyp:bzip2', '<(DEPTH)/third_party/bzip2/bzip2.gyp:bzip2',
'../third_party/ffmpeg/ffmpeg.gyp:ffmpeg', '<(DEPTH)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
'../third_party/icu/icu.gyp:icui18n', '<(DEPTH)/third_party/icu/icu.gyp:icui18n',
'../third_party/icu/icu.gyp:icuuc', '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
'../third_party/leveldatabase/leveldatabase.gyp:leveldatabase', '<(DEPTH)/third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
'../third_party/libjpeg_turbo/libjpeg.gyp:libjpeg', '<(DEPTH)/third_party/libjpeg_turbo/libjpeg.gyp:libjpeg',
'../third_party/libpng/libpng.gyp:libpng', '<(DEPTH)/third_party/libpng/libpng.gyp:libpng',
'../third_party/libxml/libxml.gyp:libxml', '<(DEPTH)/third_party/libxml/libxml.gyp:libxml',
'../third_party/libxslt/libxslt.gyp:libxslt', '<(DEPTH)/third_party/libxslt/libxslt.gyp:libxslt',
'../third_party/modp_b64/modp_b64.gyp:modp_b64', '<(DEPTH)/third_party/modp_b64/modp_b64.gyp:modp_b64',
'../third_party/WebKit/Source/WebCore/WebCore.gyp/WebCore.gyp:webcore', '<(DEPTH)/third_party/WebKit/Source/WebCore/WebCore.gyp/WebCore.gyp:webcore',
'../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit', '<(DEPTH)/third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit',
'../third_party/zlib/zlib.gyp:zlib', '<(DEPTH)/third_party/zlib/zlib.gyp:zlib',
'../ui/ui.gyp:gfx_resources', '<(DEPTH)/ui/ui.gyp:gfx_resources',
'../ui/ui.gyp:ui', '<(DEPTH)/ui/ui.gyp:ui',
'../v8/tools/gyp/v8.gyp:v8', '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
'../webkit/support/webkit_support.gyp:appcache', '<(DEPTH)/webkit/support/webkit_support.gyp:appcache',
'../webkit/support/webkit_support.gyp:blob', '<(DEPTH)/webkit/support/webkit_support.gyp:blob',
'../webkit/support/webkit_support.gyp:database', '<(DEPTH)/webkit/support/webkit_support.gyp:database',
'../webkit/support/webkit_support.gyp:fileapi', '<(DEPTH)/webkit/support/webkit_support.gyp:fileapi',
'../webkit/support/webkit_support.gyp:glue', '<(DEPTH)/webkit/support/webkit_support.gyp:glue',
'../webkit/support/webkit_support.gyp:quota', '<(DEPTH)/webkit/support/webkit_support.gyp:quota',
'../webkit/support/webkit_support.gyp:webkit_gpu', '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_gpu',
'../webkit/support/webkit_support.gyp:webkit_media', '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_media',
'../webkit/support/webkit_support.gyp:webkit_resources', '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_resources',
'../webkit/support/webkit_support.gyp:webkit_strings', '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_strings',
'../webkit/support/webkit_support.gyp:webkit_user_agent', '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_user_agent',
], ],
'sources': [ 'sources': [
'<@(includes_common)', '<@(includes_common)',
@ -779,10 +777,10 @@
'conditions': [ 'conditions': [
['OS=="win"', { ['OS=="win"', {
'dependencies': [ 'dependencies': [
'../breakpad/breakpad.gyp:breakpad_handler', '<(DEPTH)/breakpad/breakpad.gyp:breakpad_handler',
'../third_party/angle/src/build_angle.gyp:libEGL', '<(DEPTH)/third_party/angle/src/build_angle.gyp:libEGL',
'../third_party/angle/src/build_angle.gyp:libGLESv2', '<(DEPTH)/third_party/angle/src/build_angle.gyp:libGLESv2',
'../ui/views/views.gyp:views', '<(DEPTH)/ui/views/views.gyp:views',
], ],
'sources': [ 'sources': [
'<@(includes_win)', '<@(includes_win)',
@ -828,12 +826,12 @@
'libcef/web_drop_target_mac.h', 'libcef/web_drop_target_mac.h',
'libcef/web_drop_target_mac.mm', 'libcef/web_drop_target_mac.mm',
# Build necessary Mozilla sources # Build necessary Mozilla sources
'../third_party/mozilla/NSPasteboard+Utils.h', '<(DEPTH)/third_party/mozilla/NSPasteboard+Utils.h',
'../third_party/mozilla/NSPasteboard+Utils.mm', '<(DEPTH)/third_party/mozilla/NSPasteboard+Utils.mm',
'../third_party/mozilla/NSString+Utils.h', '<(DEPTH)/third_party/mozilla/NSString+Utils.h',
'../third_party/mozilla/NSString+Utils.mm', '<(DEPTH)/third_party/mozilla/NSString+Utils.mm',
'../third_party/mozilla/NSURL+Utils.h', '<(DEPTH)/third_party/mozilla/NSURL+Utils.h',
'../third_party/mozilla/NSURL+Utils.m', '<(DEPTH)/third_party/mozilla/NSURL+Utils.m',
], ],
}], }],
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', { [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,14 +34,15 @@
// more information. // more information.
// //
#ifndef _CEF_APP_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_APP_CAPI_H_
#define _CEF_APP_CAPI_H #define CEF_INCLUDE_CAPI_CEF_APP_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
@ -89,8 +90,7 @@ CEF_EXPORT void cef_quit_message_loop();
/// ///
// Implement this structure to provide handler implementations. // Implement this structure to provide handler implementations.
/// ///
typedef struct _cef_app_t typedef struct _cef_app_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -102,7 +102,6 @@ typedef struct _cef_app_t
/// ///
struct _cef_proxy_handler_t* (CEF_CALLBACK *get_proxy_handler)( struct _cef_proxy_handler_t* (CEF_CALLBACK *get_proxy_handler)(
struct _cef_app_t* self); struct _cef_app_t* self);
} cef_app_t; } cef_app_t;
@ -110,4 +109,4 @@ typedef struct _cef_app_t
} }
#endif #endif
#endif // _CEF_APP_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_APP_CAPI_H_

View File

@ -28,26 +28,25 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_BASE_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_BASE_CAPI_H_
#define _CEF_BASE_CAPI_H #define CEF_INCLUDE_CAPI_CEF_BASE_CAPI_H_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "../internal/cef_export.h" #include "include/internal/cef_export.h"
#include "../internal/cef_string.h" #include "include/internal/cef_string.h"
#include "../internal/cef_string_list.h" #include "include/internal/cef_string_list.h"
#include "../internal/cef_string_map.h" #include "include/internal/cef_string_map.h"
#include "../internal/cef_string_multimap.h" #include "include/internal/cef_string_multimap.h"
#include "../internal/cef_types.h" #include "include/internal/cef_types.h"
/// ///
// Structure defining the reference count implementation functions. All // Structure defining the reference count implementation functions. All
// framework structures must include the cef_base_t structure first. // framework structures must include the cef_base_t structure first.
/// ///
typedef struct _cef_base_t typedef struct _cef_base_t {
{
/// ///
// Size of the data structure. // Size of the data structure.
/// ///
@ -68,7 +67,6 @@ typedef struct _cef_base_t
// Returns the current number of references. // Returns the current number of references.
/// ///
int (CEF_CALLBACK *get_refct)(struct _cef_base_t* self); int (CEF_CALLBACK *get_refct)(struct _cef_base_t* self);
} cef_base_t; } cef_base_t;
@ -84,4 +82,4 @@ typedef struct _cef_base_t
} }
#endif #endif
#endif // _CEF_BASE_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_BASE_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,22 +34,22 @@
// more information. // more information.
// //
#ifndef _CEF_BROWSER_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_BROWSER_CAPI_H_
#define _CEF_BROWSER_CAPI_H #define CEF_INCLUDE_CAPI_CEF_BROWSER_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
// Structure used to represent a browser window. The functions of this structure // Structure used to represent a browser window. The functions of this structure
// may be called on any thread unless otherwise indicated in the comments. // may be called on any thread unless otherwise indicated in the comments.
/// ///
typedef struct _cef_browser_t typedef struct _cef_browser_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -294,7 +294,6 @@ typedef struct _cef_browser_t
// Send a capture lost event to the browser. // Send a capture lost event to the browser.
/// ///
void (CEF_CALLBACK *send_capture_lost_event)(struct _cef_browser_t* self); void (CEF_CALLBACK *send_capture_lost_event)(struct _cef_browser_t* self);
} cef_browser_t; } cef_browser_t;
@ -320,4 +319,4 @@ CEF_EXPORT cef_browser_t* cef_browser_create_sync(cef_window_info_t* windowInfo,
} }
#endif #endif
#endif // _CEF_BROWSER_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_BROWSER_CAPI_H_

View File

@ -34,21 +34,21 @@
// more information. // more information.
// //
#ifndef _CEF_CLIENT_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_
#define _CEF_CLIENT_CAPI_H #define CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
// Implement this structure to provide handler implementations. // Implement this structure to provide handler implementations.
/// ///
typedef struct _cef_client_t typedef struct _cef_client_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -137,7 +137,6 @@ typedef struct _cef_client_t
/// ///
struct _cef_drag_handler_t* (CEF_CALLBACK *get_drag_handler)( struct _cef_drag_handler_t* (CEF_CALLBACK *get_drag_handler)(
struct _cef_client_t* self); struct _cef_client_t* self);
} cef_client_t; } cef_client_t;
@ -145,4 +144,4 @@ typedef struct _cef_client_t
} }
#endif #endif
#endif // _CEF_CLIENT_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,14 +34,15 @@
// more information. // more information.
// //
#ifndef _CEF_COMMAND_LINE_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_COMMAND_LINE_CAPI_H_
#define _CEF_COMMAND_LINE_CAPI_H #define CEF_INCLUDE_CAPI_CEF_COMMAND_LINE_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
@ -54,8 +55,7 @@ extern "C" {
// arguments. Switch names are considered case-insensitive. This structure can // arguments. Switch names are considered case-insensitive. This structure can
// be used before cef_initialize() is called. // be used before cef_initialize() is called.
/// ///
typedef struct _cef_command_line_t typedef struct _cef_command_line_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -153,7 +153,6 @@ typedef struct _cef_command_line_t
/// ///
void (CEF_CALLBACK *append_argument)(struct _cef_command_line_t* self, void (CEF_CALLBACK *append_argument)(struct _cef_command_line_t* self,
const cef_string_t* argument); const cef_string_t* argument);
} cef_command_line_t; } cef_command_line_t;
@ -167,4 +166,4 @@ CEF_EXPORT cef_command_line_t* cef_command_line_create();
} }
#endif #endif
#endif // _CEF_COMMAND_LINE_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_COMMAND_LINE_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,22 +34,22 @@
// more information. // more information.
// //
#ifndef _CEF_CONTENT_FILTER_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_CONTENT_FILTER_CAPI_H_
#define _CEF_CONTENT_FILTER_CAPI_H #define CEF_INCLUDE_CAPI_CEF_CONTENT_FILTER_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
// Structure to implement for filtering response content. The functions of this // Structure to implement for filtering response content. The functions of this
// structure will always be called on the UI thread. // structure will always be called on the UI thread.
/// ///
typedef struct _cef_content_filter_t typedef struct _cef_content_filter_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -70,7 +70,6 @@ typedef struct _cef_content_filter_t
/// ///
void (CEF_CALLBACK *drain)(struct _cef_content_filter_t* self, void (CEF_CALLBACK *drain)(struct _cef_content_filter_t* self,
struct _cef_stream_reader_t** remainder); struct _cef_stream_reader_t** remainder);
} cef_content_filter_t; } cef_content_filter_t;
@ -78,4 +77,4 @@ typedef struct _cef_content_filter_t
} }
#endif #endif
#endif // _CEF_CONTENT_FILTER_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_CONTENT_FILTER_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,14 +34,15 @@
// more information. // more information.
// //
#ifndef _CEF_COOKIE_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_COOKIE_CAPI_H_
#define _CEF_COOKIE_CAPI_H #define CEF_INCLUDE_CAPI_CEF_COOKIE_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
@ -93,8 +94,7 @@ CEF_EXPORT int cef_set_cookie_path(const cef_string_t* path);
// Structure to implement for visiting cookie values. The functions of this // Structure to implement for visiting cookie values. The functions of this
// structure will always be called on the IO thread. // structure will always be called on the IO thread.
/// ///
typedef struct _cef_cookie_visitor_t typedef struct _cef_cookie_visitor_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -110,7 +110,6 @@ typedef struct _cef_cookie_visitor_t
int (CEF_CALLBACK *visit)(struct _cef_cookie_visitor_t* self, int (CEF_CALLBACK *visit)(struct _cef_cookie_visitor_t* self,
const struct _cef_cookie_t* cookie, int count, int total, const struct _cef_cookie_t* cookie, int count, int total,
int* deleteCookie); int* deleteCookie);
} cef_cookie_visitor_t; } cef_cookie_visitor_t;
@ -118,4 +117,4 @@ typedef struct _cef_cookie_visitor_t
} }
#endif #endif
#endif // _CEF_COOKIE_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_COOKIE_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,22 +34,22 @@
// more information. // more information.
// //
#ifndef _CEF_DISPLAY_HANDLER_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_DISPLAY_HANDLER_CAPI_H_
#define _CEF_DISPLAY_HANDLER_CAPI_H #define CEF_INCLUDE_CAPI_CEF_DISPLAY_HANDLER_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
// Implement this structure to handle events related to browser display state. // Implement this structure to handle events related to browser display state.
// The functions of this structure will be called on the UI thread. // The functions of this structure will be called on the UI thread.
/// ///
typedef struct _cef_display_handler_t typedef struct _cef_display_handler_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -107,7 +107,6 @@ typedef struct _cef_display_handler_t
int (CEF_CALLBACK *on_console_message)(struct _cef_display_handler_t* self, int (CEF_CALLBACK *on_console_message)(struct _cef_display_handler_t* self,
struct _cef_browser_t* browser, const cef_string_t* message, struct _cef_browser_t* browser, const cef_string_t* message,
const cef_string_t* source, int line); const cef_string_t* source, int line);
} cef_display_handler_t; } cef_display_handler_t;
@ -115,4 +114,4 @@ typedef struct _cef_display_handler_t
} }
#endif #endif
#endif // _CEF_DISPLAY_HANDLER_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_DISPLAY_HANDLER_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,22 +34,22 @@
// more information. // more information.
// //
#ifndef _CEF_DOM_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_DOM_CAPI_H_
#define _CEF_DOM_CAPI_H #define CEF_INCLUDE_CAPI_CEF_DOM_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
// Structure to implement for visiting the DOM. The functions of this structure // Structure to implement for visiting the DOM. The functions of this structure
// will be called on the UI thread. // will be called on the UI thread.
/// ///
typedef struct _cef_domvisitor_t typedef struct _cef_domvisitor_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -64,7 +64,6 @@ typedef struct _cef_domvisitor_t
/// ///
void (CEF_CALLBACK *visit)(struct _cef_domvisitor_t* self, void (CEF_CALLBACK *visit)(struct _cef_domvisitor_t* self,
struct _cef_domdocument_t* document); struct _cef_domdocument_t* document);
} cef_domvisitor_t; } cef_domvisitor_t;
@ -72,8 +71,7 @@ typedef struct _cef_domvisitor_t
// Structure used to represent a DOM document. The functions of this structure // Structure used to represent a DOM document. The functions of this structure
// should only be called on the UI thread. // should only be called on the UI thread.
/// ///
typedef struct _cef_domdocument_t typedef struct _cef_domdocument_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -178,7 +176,6 @@ typedef struct _cef_domdocument_t
// The resulting string must be freed by calling cef_string_userfree_free(). // The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_complete_url)( cef_string_userfree_t (CEF_CALLBACK *get_complete_url)(
struct _cef_domdocument_t* self, const cef_string_t* partialURL); struct _cef_domdocument_t* self, const cef_string_t* partialURL);
} cef_domdocument_t; } cef_domdocument_t;
@ -186,8 +183,7 @@ typedef struct _cef_domdocument_t
// Structure used to represent a DOM node. The functions of this structure // Structure used to represent a DOM node. The functions of this structure
// should only be called on the UI thread. // should only be called on the UI thread.
/// ///
typedef struct _cef_domnode_t typedef struct _cef_domnode_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -355,7 +351,6 @@ typedef struct _cef_domnode_t
// The resulting string must be freed by calling cef_string_userfree_free(). // The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_element_inner_text)( cef_string_userfree_t (CEF_CALLBACK *get_element_inner_text)(
struct _cef_domnode_t* self); struct _cef_domnode_t* self);
} cef_domnode_t; } cef_domnode_t;
@ -363,8 +358,7 @@ typedef struct _cef_domnode_t
// Structure used to represent a DOM event. The functions of this structure // Structure used to represent a DOM event. The functions of this structure
// should only be called on the UI thread. // should only be called on the UI thread.
/// ///
typedef struct _cef_domevent_t typedef struct _cef_domevent_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -415,7 +409,6 @@ typedef struct _cef_domevent_t
/// ///
struct _cef_domnode_t* (CEF_CALLBACK *get_current_target)( struct _cef_domnode_t* (CEF_CALLBACK *get_current_target)(
struct _cef_domevent_t* self); struct _cef_domevent_t* self);
} cef_domevent_t; } cef_domevent_t;
@ -423,8 +416,7 @@ typedef struct _cef_domevent_t
// Structure to implement for handling DOM events. The functions of this // Structure to implement for handling DOM events. The functions of this
// structure will be called on the UI thread. // structure will be called on the UI thread.
/// ///
typedef struct _cef_domevent_listener_t typedef struct _cef_domevent_listener_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -439,7 +431,6 @@ typedef struct _cef_domevent_listener_t
/// ///
void (CEF_CALLBACK *handle_event)(struct _cef_domevent_listener_t* self, void (CEF_CALLBACK *handle_event)(struct _cef_domevent_listener_t* self,
struct _cef_domevent_t* event); struct _cef_domevent_t* event);
} cef_domevent_listener_t; } cef_domevent_listener_t;
@ -447,4 +438,4 @@ typedef struct _cef_domevent_listener_t
} }
#endif #endif
#endif // _CEF_DOM_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_DOM_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,22 +34,22 @@
// more information. // more information.
// //
#ifndef _CEF_DOWNLOAD_HANDLER_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_DOWNLOAD_HANDLER_CAPI_H_
#define _CEF_DOWNLOAD_HANDLER_CAPI_H #define CEF_INCLUDE_CAPI_CEF_DOWNLOAD_HANDLER_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
// Structure used to handle file downloads. The functions of this structure will // Structure used to handle file downloads. The functions of this structure will
// always be called on the UI thread. // always be called on the UI thread.
/// ///
typedef struct _cef_download_handler_t typedef struct _cef_download_handler_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -67,7 +67,6 @@ typedef struct _cef_download_handler_t
// The download is complete. // The download is complete.
/// ///
void (CEF_CALLBACK *complete)(struct _cef_download_handler_t* self); void (CEF_CALLBACK *complete)(struct _cef_download_handler_t* self);
} cef_download_handler_t; } cef_download_handler_t;
@ -75,4 +74,4 @@ typedef struct _cef_download_handler_t
} }
#endif #endif
#endif // _CEF_DOWNLOAD_HANDLER_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_DOWNLOAD_HANDLER_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,22 +34,22 @@
// more information. // more information.
// //
#ifndef _CEF_DRAG_DATA_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_DRAG_DATA_CAPI_H_
#define _CEF_DRAG_DATA_CAPI_H #define CEF_INCLUDE_CAPI_CEF_DRAG_DATA_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
// Structure used to represent drag data. The functions of this structure may be // Structure used to represent drag data. The functions of this structure may be
// called on any thread. // called on any thread.
/// ///
typedef struct _cef_drag_data_t typedef struct _cef_drag_data_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -133,7 +133,6 @@ typedef struct _cef_drag_data_t
/// ///
int (CEF_CALLBACK *get_file_names)(struct _cef_drag_data_t* self, int (CEF_CALLBACK *get_file_names)(struct _cef_drag_data_t* self,
cef_string_list_t names); cef_string_list_t names);
} cef_drag_data_t; } cef_drag_data_t;
@ -141,4 +140,4 @@ typedef struct _cef_drag_data_t
} }
#endif #endif
#endif // _CEF_DRAG_DATA_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_DRAG_DATA_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,22 +34,22 @@
// more information. // more information.
// //
#ifndef _CEF_DRAG_HANDLER_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_DRAG_HANDLER_CAPI_H_
#define _CEF_DRAG_HANDLER_CAPI_H #define CEF_INCLUDE_CAPI_CEF_DRAG_HANDLER_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
// Implement this structure to handle events related to dragging. The functions // Implement this structure to handle events related to dragging. The functions
// of this structure will be called on the UI thread. // of this structure will be called on the UI thread.
/// ///
typedef struct _cef_drag_handler_t typedef struct _cef_drag_handler_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -74,7 +74,6 @@ typedef struct _cef_drag_handler_t
int (CEF_CALLBACK *on_drag_enter)(struct _cef_drag_handler_t* self, int (CEF_CALLBACK *on_drag_enter)(struct _cef_drag_handler_t* self,
struct _cef_browser_t* browser, struct _cef_drag_data_t* dragData, struct _cef_browser_t* browser, struct _cef_drag_data_t* dragData,
enum cef_drag_operations_mask_t mask); enum cef_drag_operations_mask_t mask);
} cef_drag_handler_t; } cef_drag_handler_t;
@ -82,4 +81,4 @@ typedef struct _cef_drag_handler_t
} }
#endif #endif
#endif // _CEF_DRAG_HANDLER_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_DRAG_HANDLER_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,22 +34,22 @@
// more information. // more information.
// //
#ifndef _CEF_FIND_HANDLER_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_FIND_HANDLER_CAPI_H_
#define _CEF_FIND_HANDLER_CAPI_H #define CEF_INCLUDE_CAPI_CEF_FIND_HANDLER_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
// Implement this structure to handle events related to find results. The // Implement this structure to handle events related to find results. The
// functions of this structure will be called on the UI thread. // functions of this structure will be called on the UI thread.
/// ///
typedef struct _cef_find_handler_t typedef struct _cef_find_handler_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -67,7 +67,6 @@ typedef struct _cef_find_handler_t
struct _cef_browser_t* browser, int identifier, int count, struct _cef_browser_t* browser, int identifier, int count,
const cef_rect_t* selectionRect, int activeMatchOrdinal, const cef_rect_t* selectionRect, int activeMatchOrdinal,
int finalUpdate); int finalUpdate);
} cef_find_handler_t; } cef_find_handler_t;
@ -75,4 +74,4 @@ typedef struct _cef_find_handler_t
} }
#endif #endif
#endif // _CEF_FIND_HANDLER_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_FIND_HANDLER_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,22 +34,22 @@
// more information. // more information.
// //
#ifndef _CEF_FOCUS_HANDLER_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_FOCUS_HANDLER_CAPI_H_
#define _CEF_FOCUS_HANDLER_CAPI_H #define CEF_INCLUDE_CAPI_CEF_FOCUS_HANDLER_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
// Implement this structure to handle events related to focus. The functions of // Implement this structure to handle events related to focus. The functions of
// this structure will be called on the UI thread. // this structure will be called on the UI thread.
/// ///
typedef struct _cef_focus_handler_t typedef struct _cef_focus_handler_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -83,7 +83,6 @@ typedef struct _cef_focus_handler_t
void (CEF_CALLBACK *on_focused_node_changed)( void (CEF_CALLBACK *on_focused_node_changed)(
struct _cef_focus_handler_t* self, struct _cef_browser_t* browser, struct _cef_focus_handler_t* self, struct _cef_browser_t* browser,
struct _cef_frame_t* frame, struct _cef_domnode_t* node); struct _cef_frame_t* frame, struct _cef_domnode_t* node);
} cef_focus_handler_t; } cef_focus_handler_t;
@ -91,4 +90,4 @@ typedef struct _cef_focus_handler_t
} }
#endif #endif
#endif // _CEF_FOCUS_HANDLER_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_FOCUS_HANDLER_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,14 +34,15 @@
// more information. // more information.
// //
#ifndef _CEF_FRAME_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_FRAME_CAPI_H_
#define _CEF_FRAME_CAPI_H #define CEF_INCLUDE_CAPI_CEF_FRAME_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
@ -49,8 +50,7 @@ extern "C" {
// this structure may be called on any thread unless otherwise indicated in the // this structure may be called on any thread unless otherwise indicated in the
// comments. // comments.
/// ///
typedef struct _cef_frame_t typedef struct _cef_frame_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -130,10 +130,10 @@ typedef struct _cef_frame_t
const cef_string_t* url); const cef_string_t* url);
/// ///
// Load the contents of |string| with the optional dummy target |url|. // Load the contents of |string_val| with the optional dummy target |url|.
/// ///
void (CEF_CALLBACK *load_string)(struct _cef_frame_t* self, void (CEF_CALLBACK *load_string)(struct _cef_frame_t* self,
const cef_string_t* string, const cef_string_t* url); const cef_string_t* string_val, const cef_string_t* url);
/// ///
// Load the contents of |stream| with the optional dummy target |url|. // Load the contents of |stream| with the optional dummy target |url|.
@ -177,7 +177,7 @@ typedef struct _cef_frame_t
// Returns the globally unique identifier for this frame. This function should // Returns the globally unique identifier for this frame. This function should
// only be called on the UI thread. // only be called on the UI thread.
/// ///
long long (CEF_CALLBACK *get_identifier)(struct _cef_frame_t* self); int64 (CEF_CALLBACK *get_identifier)(struct _cef_frame_t* self);
/// ///
// Returns the parent of this frame or NULL if this is the main (top-level) // Returns the parent of this frame or NULL if this is the main (top-level)
@ -209,7 +209,6 @@ typedef struct _cef_frame_t
/// ///
struct _cef_v8context_t* (CEF_CALLBACK *get_v8context)( struct _cef_v8context_t* (CEF_CALLBACK *get_v8context)(
struct _cef_frame_t* self); struct _cef_frame_t* self);
} cef_frame_t; } cef_frame_t;
@ -217,4 +216,4 @@ typedef struct _cef_frame_t
} }
#endif #endif
#endif // _CEF_FRAME_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_FRAME_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,22 +34,22 @@
// more information. // more information.
// //
#ifndef _CEF_JSDIALOG_HANDLER_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_JSDIALOG_HANDLER_CAPI_H_
#define _CEF_JSDIALOG_HANDLER_CAPI_H #define CEF_INCLUDE_CAPI_CEF_JSDIALOG_HANDLER_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
// Implement this structure to handle events related to JavaScript dialogs. The // Implement this structure to handle events related to JavaScript dialogs. The
// functions of this structure will be called on the UI thread. // functions of this structure will be called on the UI thread.
/// ///
typedef struct _cef_jsdialog_handler_t typedef struct _cef_jsdialog_handler_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -82,7 +82,6 @@ typedef struct _cef_jsdialog_handler_t
struct _cef_browser_t* browser, struct _cef_frame_t* frame, struct _cef_browser_t* browser, struct _cef_frame_t* frame,
const cef_string_t* message, const cef_string_t* defaultValue, const cef_string_t* message, const cef_string_t* defaultValue,
int* retval, cef_string_t* result); int* retval, cef_string_t* result);
} cef_jsdialog_handler_t; } cef_jsdialog_handler_t;
@ -90,4 +89,4 @@ typedef struct _cef_jsdialog_handler_t
} }
#endif #endif
#endif // _CEF_JSDIALOG_HANDLER_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_JSDIALOG_HANDLER_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,22 +34,22 @@
// more information. // more information.
// //
#ifndef _CEF_KEYBOARD_HANDLER_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_KEYBOARD_HANDLER_CAPI_H_
#define _CEF_KEYBOARD_HANDLER_CAPI_H #define CEF_INCLUDE_CAPI_CEF_KEYBOARD_HANDLER_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
// Implement this structure to handle events related to keyboard input. The // Implement this structure to handle events related to keyboard input. The
// functions of this structure will be called on the UI thread. // functions of this structure will be called on the UI thread.
/// ///
typedef struct _cef_keyboard_handler_t typedef struct _cef_keyboard_handler_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -72,7 +72,6 @@ typedef struct _cef_keyboard_handler_t
int (CEF_CALLBACK *on_key_event)(struct _cef_keyboard_handler_t* self, int (CEF_CALLBACK *on_key_event)(struct _cef_keyboard_handler_t* self,
struct _cef_browser_t* browser, enum cef_handler_keyevent_type_t type, struct _cef_browser_t* browser, enum cef_handler_keyevent_type_t type,
int code, int modifiers, int isSystemKey, int isAfterJavaScript); int code, int modifiers, int isSystemKey, int isAfterJavaScript);
} cef_keyboard_handler_t; } cef_keyboard_handler_t;
@ -80,4 +79,4 @@ typedef struct _cef_keyboard_handler_t
} }
#endif #endif
#endif // _CEF_KEYBOARD_HANDLER_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_KEYBOARD_HANDLER_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,22 +34,22 @@
// more information. // more information.
// //
#ifndef _CEF_LIFE_SPAN_HANDLER_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_LIFE_SPAN_HANDLER_CAPI_H_
#define _CEF_LIFE_SPAN_HANDLER_CAPI_H #define CEF_INCLUDE_CAPI_CEF_LIFE_SPAN_HANDLER_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
// Implement this structure to handle events related to browser life span. The // Implement this structure to handle events related to browser life span. The
// functions of this structure will be called on the UI thread. // functions of this structure will be called on the UI thread.
/// ///
typedef struct _cef_life_span_handler_t typedef struct _cef_life_span_handler_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -104,7 +104,6 @@ typedef struct _cef_life_span_handler_t
/// ///
void (CEF_CALLBACK *on_before_close)(struct _cef_life_span_handler_t* self, void (CEF_CALLBACK *on_before_close)(struct _cef_life_span_handler_t* self,
struct _cef_browser_t* browser); struct _cef_browser_t* browser);
} cef_life_span_handler_t; } cef_life_span_handler_t;
@ -112,4 +111,4 @@ typedef struct _cef_life_span_handler_t
} }
#endif #endif
#endif // _CEF_LIFE_SPAN_HANDLER_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_LIFE_SPAN_HANDLER_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,22 +34,22 @@
// more information. // more information.
// //
#ifndef _CEF_LOAD_HANDLER_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_LOAD_HANDLER_CAPI_H_
#define _CEF_LOAD_HANDLER_CAPI_H #define CEF_INCLUDE_CAPI_CEF_LOAD_HANDLER_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
// Implement this structure to handle events related to browser load status. The // Implement this structure to handle events related to browser load status. The
// functions of this structure will be called on the UI thread. // functions of this structure will be called on the UI thread.
/// ///
typedef struct _cef_load_handler_t typedef struct _cef_load_handler_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -89,7 +89,6 @@ typedef struct _cef_load_handler_t
struct _cef_browser_t* browser, struct _cef_frame_t* frame, struct _cef_browser_t* browser, struct _cef_frame_t* frame,
enum cef_handler_errorcode_t errorCode, const cef_string_t* failedUrl, enum cef_handler_errorcode_t errorCode, const cef_string_t* failedUrl,
cef_string_t* errorText); cef_string_t* errorText);
} cef_load_handler_t; } cef_load_handler_t;
@ -97,4 +96,4 @@ typedef struct _cef_load_handler_t
} }
#endif #endif
#endif // _CEF_LOAD_HANDLER_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_LOAD_HANDLER_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,22 +34,22 @@
// more information. // more information.
// //
#ifndef _CEF_MENU_HANDLER_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_MENU_HANDLER_CAPI_H_
#define _CEF_MENU_HANDLER_CAPI_H #define CEF_INCLUDE_CAPI_CEF_MENU_HANDLER_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
// Implement this structure to handle events related to browser context menus. // Implement this structure to handle events related to browser context menus.
// The functions of this structure will be called on the UI thread. // The functions of this structure will be called on the UI thread.
/// ///
typedef struct _cef_menu_handler_t typedef struct _cef_menu_handler_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -78,7 +78,6 @@ typedef struct _cef_menu_handler_t
/// ///
int (CEF_CALLBACK *on_menu_action)(struct _cef_menu_handler_t* self, int (CEF_CALLBACK *on_menu_action)(struct _cef_menu_handler_t* self,
struct _cef_browser_t* browser, enum cef_menu_id_t menuId); struct _cef_browser_t* browser, enum cef_menu_id_t menuId);
} cef_menu_handler_t; } cef_menu_handler_t;
@ -86,4 +85,4 @@ typedef struct _cef_menu_handler_t
} }
#endif #endif
#endif // _CEF_MENU_HANDLER_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_MENU_HANDLER_CAPI_H_

View File

@ -28,14 +28,14 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_NPLUGIN_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_NPLUGIN_CAPI_H_
#define _CEF_NPLUGIN_CAPI_H #define CEF_INCLUDE_CAPI_CEF_NPLUGIN_CAPI_H_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "../internal/cef_nplugin_types.h" #include "include/internal/cef_nplugin_types.h"
/// ///
// Register a plugin with the system. Returns true (1) on success. // Register a plugin with the system. Returns true (1) on success.
@ -46,4 +46,4 @@ CEF_EXPORT int cef_register_plugin(const cef_plugin_info_t* plugin_info);
} }
#endif #endif
#endif // _CEF_NPLUGIN_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_NPLUGIN_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,14 +34,15 @@
// more information. // more information.
// //
#ifndef _CEF_ORIGIN_WHITELIST_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_ORIGIN_WHITELIST_CAPI_H_
#define _CEF_ORIGIN_WHITELIST_CAPI_H #define CEF_INCLUDE_CAPI_CEF_ORIGIN_WHITELIST_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
@ -98,4 +99,4 @@ CEF_EXPORT int cef_clear_cross_origin_whitelist();
} }
#endif #endif
#endif // _CEF_ORIGIN_WHITELIST_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_ORIGIN_WHITELIST_CAPI_H_

View File

@ -34,22 +34,22 @@
// more information. // more information.
// //
#ifndef _CEF_PERMISSION_HANDLER_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_PERMISSION_HANDLER_CAPI_H_
#define _CEF_PERMISSION_HANDLER_CAPI_H #define CEF_INCLUDE_CAPI_CEF_PERMISSION_HANDLER_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
// Implement this structure to handle events related to browser permissions. The // Implement this structure to handle events related to browser permissions. The
// functions of this structure will be called on the UI thread. // functions of this structure will be called on the UI thread.
/// ///
typedef struct _cef_permission_handler_t typedef struct _cef_permission_handler_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -57,12 +57,11 @@ typedef struct _cef_permission_handler_t
/// ///
// Called on the UI thread before a script extension is loaded. Return false // Called on the UI thread before a script extension is loaded. Return false
// (0) to prevent the extension from loading. // (0) to let the extension load normally.
/// ///
int (CEF_CALLBACK *on_before_script_extension_load)( int (CEF_CALLBACK *on_before_script_extension_load)(
struct _cef_permission_handler_t* self, struct _cef_browser_t* browser, struct _cef_permission_handler_t* self, struct _cef_browser_t* browser,
struct _cef_frame_t* frame, const cef_string_t* extensionName); struct _cef_frame_t* frame, const cef_string_t* extensionName);
} cef_permission_handler_t; } cef_permission_handler_t;
@ -70,4 +69,4 @@ typedef struct _cef_permission_handler_t
} }
#endif #endif
#endif // _CEF_PERMISSION_HANDLER_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_PERMISSION_HANDLER_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,22 +34,22 @@
// more information. // more information.
// //
#ifndef _CEF_PRINT_HANDLER_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_PRINT_HANDLER_CAPI_H_
#define _CEF_PRINT_HANDLER_CAPI_H #define CEF_INCLUDE_CAPI_CEF_PRINT_HANDLER_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
// Implement this structure to handle events related to printing. The functions // Implement this structure to handle events related to printing. The functions
// of this structure will be called on the UI thread. // of this structure will be called on the UI thread.
/// ///
typedef struct _cef_print_handler_t typedef struct _cef_print_handler_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -86,7 +86,6 @@ typedef struct _cef_print_handler_t
cef_string_t* topLeft, cef_string_t* topCenter, cef_string_t* topRight, cef_string_t* topLeft, cef_string_t* topCenter, cef_string_t* topRight,
cef_string_t* bottomLeft, cef_string_t* bottomCenter, cef_string_t* bottomLeft, cef_string_t* bottomCenter,
cef_string_t* bottomRight); cef_string_t* bottomRight);
} cef_print_handler_t; } cef_print_handler_t;
@ -94,4 +93,4 @@ typedef struct _cef_print_handler_t
} }
#endif #endif
#endif // _CEF_PRINT_HANDLER_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_PRINT_HANDLER_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,21 +34,21 @@
// more information. // more information.
// //
#ifndef _CEF_PROXY_HANDLER_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_PROXY_HANDLER_CAPI_H_
#define _CEF_PROXY_HANDLER_CAPI_H #define CEF_INCLUDE_CAPI_CEF_PROXY_HANDLER_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
// Implement this structure to handle proxy resolution events. // Implement this structure to handle proxy resolution events.
/// ///
typedef struct _cef_proxy_handler_t typedef struct _cef_proxy_handler_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -59,7 +59,6 @@ typedef struct _cef_proxy_handler_t
/// ///
void (CEF_CALLBACK *get_proxy_for_url)(struct _cef_proxy_handler_t* self, void (CEF_CALLBACK *get_proxy_for_url)(struct _cef_proxy_handler_t* self,
const cef_string_t* url, struct _cef_proxy_info_t* proxy_info); const cef_string_t* url, struct _cef_proxy_info_t* proxy_info);
} cef_proxy_handler_t; } cef_proxy_handler_t;
@ -67,4 +66,4 @@ typedef struct _cef_proxy_handler_t
} }
#endif #endif
#endif // _CEF_PROXY_HANDLER_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_PROXY_HANDLER_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,22 +34,22 @@
// more information. // more information.
// //
#ifndef _CEF_RENDER_HANDLER_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_RENDER_HANDLER_CAPI_H_
#define _CEF_RENDER_HANDLER_CAPI_H #define CEF_INCLUDE_CAPI_CEF_RENDER_HANDLER_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
// Implement this structure to handle events when window rendering is disabled. // Implement this structure to handle events when window rendering is disabled.
// The functions of this structure will be called on the UI thread. // The functions of this structure will be called on the UI thread.
/// ///
typedef struct _cef_render_handler_t typedef struct _cef_render_handler_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -108,7 +108,6 @@ typedef struct _cef_render_handler_t
/// ///
void (CEF_CALLBACK *on_cursor_change)(struct _cef_render_handler_t* self, void (CEF_CALLBACK *on_cursor_change)(struct _cef_render_handler_t* self,
struct _cef_browser_t* browser, cef_cursor_handle_t cursor); struct _cef_browser_t* browser, cef_cursor_handle_t cursor);
} cef_render_handler_t; } cef_render_handler_t;
@ -116,4 +115,4 @@ typedef struct _cef_render_handler_t
} }
#endif #endif
#endif // _CEF_RENDER_HANDLER_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_RENDER_HANDLER_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,22 +34,22 @@
// more information. // more information.
// //
#ifndef _CEF_REQUEST_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_CAPI_H_
#define _CEF_REQUEST_CAPI_H #define CEF_INCLUDE_CAPI_CEF_REQUEST_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
// Structure used to represent a web request. The functions of this structure // Structure used to represent a web request. The functions of this structure
// may be called on any thread. // may be called on any thread.
/// ///
typedef struct _cef_request_t typedef struct _cef_request_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -137,7 +137,6 @@ typedef struct _cef_request_t
/// ///
void (CEF_CALLBACK *set_first_party_for_cookies)(struct _cef_request_t* self, void (CEF_CALLBACK *set_first_party_for_cookies)(struct _cef_request_t* self,
const cef_string_t* url); const cef_string_t* url);
} cef_request_t; } cef_request_t;
@ -151,8 +150,7 @@ CEF_EXPORT cef_request_t* cef_request_create();
// Structure used to represent post data for a web request. The functions of // Structure used to represent post data for a web request. The functions of
// this structure may be called on any thread. // this structure may be called on any thread.
/// ///
typedef struct _cef_post_data_t typedef struct _cef_post_data_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -186,7 +184,6 @@ typedef struct _cef_post_data_t
// Remove all existing post data elements. // Remove all existing post data elements.
/// ///
void (CEF_CALLBACK *remove_elements)(struct _cef_post_data_t* self); void (CEF_CALLBACK *remove_elements)(struct _cef_post_data_t* self);
} cef_post_data_t; } cef_post_data_t;
@ -200,8 +197,7 @@ CEF_EXPORT cef_post_data_t* cef_post_data_create();
// Structure used to represent a single element in the request post data. The // Structure used to represent a single element in the request post data. The
// functions of this structure may be called on any thread. // functions of this structure may be called on any thread.
/// ///
typedef struct _cef_post_data_element_t typedef struct _cef_post_data_element_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -249,7 +245,6 @@ typedef struct _cef_post_data_element_t
/// ///
size_t (CEF_CALLBACK *get_bytes)(struct _cef_post_data_element_t* self, size_t (CEF_CALLBACK *get_bytes)(struct _cef_post_data_element_t* self,
size_t size, void* bytes); size_t size, void* bytes);
} cef_post_data_element_t; } cef_post_data_element_t;
@ -263,4 +258,4 @@ CEF_EXPORT cef_post_data_element_t* cef_post_data_element_create();
} }
#endif #endif
#endif // _CEF_REQUEST_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_REQUEST_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,22 +34,22 @@
// more information. // more information.
// //
#ifndef _CEF_REQUEST_HANDLER_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_HANDLER_CAPI_H_
#define _CEF_REQUEST_HANDLER_CAPI_H #define CEF_INCLUDE_CAPI_CEF_REQUEST_HANDLER_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
// Implement this structure to handle events related to browser requests. The // Implement this structure to handle events related to browser requests. The
// functions of this structure will be called on the thread indicated. // functions of this structure will be called on the thread indicated.
/// ///
typedef struct _cef_request_handler_t typedef struct _cef_request_handler_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -139,7 +139,6 @@ typedef struct _cef_request_handler_t
struct _cef_browser_t* browser, int isProxy, const cef_string_t* host, struct _cef_browser_t* browser, int isProxy, const cef_string_t* host,
int port, const cef_string_t* realm, const cef_string_t* scheme, int port, const cef_string_t* realm, const cef_string_t* scheme,
cef_string_t* username, cef_string_t* password); cef_string_t* username, cef_string_t* password);
} cef_request_handler_t; } cef_request_handler_t;
@ -147,4 +146,4 @@ typedef struct _cef_request_handler_t
} }
#endif #endif
#endif // _CEF_REQUEST_HANDLER_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_REQUEST_HANDLER_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,22 +34,22 @@
// more information. // more information.
// //
#ifndef _CEF_RESPONSE_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_RESPONSE_CAPI_H_
#define _CEF_RESPONSE_CAPI_H #define CEF_INCLUDE_CAPI_CEF_RESPONSE_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
// Structure used to represent a web response. The functions of this structure // Structure used to represent a web response. The functions of this structure
// may be called on any thread. // may be called on any thread.
/// ///
typedef struct _cef_response_t typedef struct _cef_response_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -109,7 +109,6 @@ typedef struct _cef_response_t
/// ///
void (CEF_CALLBACK *set_header_map)(struct _cef_response_t* self, void (CEF_CALLBACK *set_header_map)(struct _cef_response_t* self,
cef_string_multimap_t headerMap); cef_string_multimap_t headerMap);
} cef_response_t; } cef_response_t;
@ -117,4 +116,4 @@ typedef struct _cef_response_t
} }
#endif #endif
#endif // _CEF_RESPONSE_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_RESPONSE_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,14 +34,15 @@
// more information. // more information.
// //
#ifndef _CEF_SCHEME_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_SCHEME_CAPI_H_
#define _CEF_SCHEME_CAPI_H #define CEF_INCLUDE_CAPI_CEF_SCHEME_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
@ -117,8 +118,7 @@ CEF_EXPORT int cef_clear_scheme_handler_factories();
// Structure that creates cef_scheme_handler_t instances. The functions of this // Structure that creates cef_scheme_handler_t instances. The functions of this
// structure will always be called on the IO thread. // structure will always be called on the IO thread.
/// ///
typedef struct _cef_scheme_handler_factory_t typedef struct _cef_scheme_handler_factory_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -133,7 +133,6 @@ typedef struct _cef_scheme_handler_factory_t
struct _cef_scheme_handler_factory_t* self, struct _cef_scheme_handler_factory_t* self,
struct _cef_browser_t* browser, const cef_string_t* scheme_name, struct _cef_browser_t* browser, const cef_string_t* scheme_name,
struct _cef_request_t* request); struct _cef_request_t* request);
} cef_scheme_handler_factory_t; } cef_scheme_handler_factory_t;
@ -141,8 +140,7 @@ typedef struct _cef_scheme_handler_factory_t
// Structure used to facilitate asynchronous responses to custom scheme handler // Structure used to facilitate asynchronous responses to custom scheme handler
// requests. The functions of this structure may be called on any thread. // requests. The functions of this structure may be called on any thread.
/// ///
typedef struct _cef_scheme_handler_callback_t typedef struct _cef_scheme_handler_callback_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -164,7 +162,6 @@ typedef struct _cef_scheme_handler_callback_t
// Cancel processing of the request. // Cancel processing of the request.
/// ///
void (CEF_CALLBACK *cancel)(struct _cef_scheme_handler_callback_t* self); void (CEF_CALLBACK *cancel)(struct _cef_scheme_handler_callback_t* self);
} cef_scheme_handler_callback_t; } cef_scheme_handler_callback_t;
@ -172,8 +169,7 @@ typedef struct _cef_scheme_handler_callback_t
// Structure used to implement a custom scheme handler structure. The functions // Structure used to implement a custom scheme handler structure. The functions
// of this structure will always be called on the IO thread. // of this structure will always be called on the IO thread.
/// ///
typedef struct _cef_scheme_handler_t typedef struct _cef_scheme_handler_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -219,7 +215,6 @@ typedef struct _cef_scheme_handler_t
// Request processing has been canceled. // Request processing has been canceled.
/// ///
void (CEF_CALLBACK *cancel)(struct _cef_scheme_handler_t* self); void (CEF_CALLBACK *cancel)(struct _cef_scheme_handler_t* self);
} cef_scheme_handler_t; } cef_scheme_handler_t;
@ -227,4 +222,4 @@ typedef struct _cef_scheme_handler_t
} }
#endif #endif
#endif // _CEF_SCHEME_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_SCHEME_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,14 +34,15 @@
// more information. // more information.
// //
#ifndef _CEF_STORAGE_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_STORAGE_CAPI_H_
#define _CEF_STORAGE_CAPI_H #define CEF_INCLUDE_CAPI_CEF_STORAGE_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
@ -88,8 +89,7 @@ CEF_EXPORT int cef_set_storage_path(enum cef_storage_type_t type,
// Structure to implement for visiting storage. The functions of this structure // Structure to implement for visiting storage. The functions of this structure
// will always be called on the UI thread. // will always be called on the UI thread.
/// ///
typedef struct _cef_storage_visitor_t typedef struct _cef_storage_visitor_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -106,7 +106,6 @@ typedef struct _cef_storage_visitor_t
enum cef_storage_type_t type, const cef_string_t* origin, 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, const cef_string_t* key, const cef_string_t* value, int count, int total,
int* deleteData); int* deleteData);
} cef_storage_visitor_t; } cef_storage_visitor_t;
@ -114,4 +113,4 @@ typedef struct _cef_storage_visitor_t
} }
#endif #endif
#endif // _CEF_STORAGE_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_STORAGE_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,22 +34,22 @@
// more information. // more information.
// //
#ifndef _CEF_STREAM_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_STREAM_CAPI_H_
#define _CEF_STREAM_CAPI_H #define CEF_INCLUDE_CAPI_CEF_STREAM_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
// Structure the client can implement to provide a custom stream reader. The // Structure the client can implement to provide a custom stream reader. The
// functions of this structure may be called on any thread. // functions of this structure may be called on any thread.
/// ///
typedef struct _cef_read_handler_t typedef struct _cef_read_handler_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -63,21 +63,20 @@ typedef struct _cef_read_handler_t
/// ///
// Seek to the specified offset position. |whence| may be any one of SEEK_CUR, // Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
// SEEK_END or SEEK_SET. // SEEK_END or SEEK_SET. Return zero on success and non-zero on failure.
/// ///
int (CEF_CALLBACK *seek)(struct _cef_read_handler_t* self, long offset, int (CEF_CALLBACK *seek)(struct _cef_read_handler_t* self, int64 offset,
int whence); int whence);
/// ///
// Return the current offset position. // Return the current offset position.
/// ///
long (CEF_CALLBACK *tell)(struct _cef_read_handler_t* self); int64 (CEF_CALLBACK *tell)(struct _cef_read_handler_t* self);
/// ///
// Return non-zero if at end of file. // Return non-zero if at end of file.
/// ///
int (CEF_CALLBACK *eof)(struct _cef_read_handler_t* self); int (CEF_CALLBACK *eof)(struct _cef_read_handler_t* self);
} cef_read_handler_t; } cef_read_handler_t;
@ -85,8 +84,7 @@ typedef struct _cef_read_handler_t
// Structure used to read data from a stream. The functions of this structure // Structure used to read data from a stream. The functions of this structure
// may be called on any thread. // may be called on any thread.
/// ///
typedef struct _cef_stream_reader_t typedef struct _cef_stream_reader_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -102,19 +100,18 @@ typedef struct _cef_stream_reader_t
// Seek to the specified offset position. |whence| may be any one of SEEK_CUR, // Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
// SEEK_END or SEEK_SET. Returns zero on success and non-zero on failure. // SEEK_END or SEEK_SET. Returns zero on success and non-zero on failure.
/// ///
int (CEF_CALLBACK *seek)(struct _cef_stream_reader_t* self, long offset, int (CEF_CALLBACK *seek)(struct _cef_stream_reader_t* self, int64 offset,
int whence); int whence);
/// ///
// Return the current offset position. // Return the current offset position.
/// ///
long (CEF_CALLBACK *tell)(struct _cef_stream_reader_t* self); int64 (CEF_CALLBACK *tell)(struct _cef_stream_reader_t* self);
/// ///
// Return non-zero if at end of file. // Return non-zero if at end of file.
/// ///
int (CEF_CALLBACK *eof)(struct _cef_stream_reader_t* self); int (CEF_CALLBACK *eof)(struct _cef_stream_reader_t* self);
} cef_stream_reader_t; } cef_stream_reader_t;
@ -141,8 +138,7 @@ CEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_handler(
// Structure the client can implement to provide a custom stream writer. The // Structure the client can implement to provide a custom stream writer. The
// functions of this structure may be called on any thread. // functions of this structure may be called on any thread.
/// ///
typedef struct _cef_write_handler_t typedef struct _cef_write_handler_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -156,21 +152,20 @@ typedef struct _cef_write_handler_t
/// ///
// Seek to the specified offset position. |whence| may be any one of SEEK_CUR, // Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
// SEEK_END or SEEK_SET. // SEEK_END or SEEK_SET. Return zero on success and non-zero on failure.
/// ///
int (CEF_CALLBACK *seek)(struct _cef_write_handler_t* self, long offset, int (CEF_CALLBACK *seek)(struct _cef_write_handler_t* self, int64 offset,
int whence); int whence);
/// ///
// Return the current offset position. // Return the current offset position.
/// ///
long (CEF_CALLBACK *tell)(struct _cef_write_handler_t* self); int64 (CEF_CALLBACK *tell)(struct _cef_write_handler_t* self);
/// ///
// Flush the stream. // Flush the stream.
/// ///
int (CEF_CALLBACK *flush)(struct _cef_write_handler_t* self); int (CEF_CALLBACK *flush)(struct _cef_write_handler_t* self);
} cef_write_handler_t; } cef_write_handler_t;
@ -178,8 +173,7 @@ typedef struct _cef_write_handler_t
// Structure used to write data to a stream. The functions of this structure may // Structure used to write data to a stream. The functions of this structure may
// be called on any thread. // be called on any thread.
/// ///
typedef struct _cef_stream_writer_t typedef struct _cef_stream_writer_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -193,21 +187,20 @@ typedef struct _cef_stream_writer_t
/// ///
// Seek to the specified offset position. |whence| may be any one of SEEK_CUR, // Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
// SEEK_END or SEEK_SET. // SEEK_END or SEEK_SET. Returns zero on success and non-zero on failure.
/// ///
int (CEF_CALLBACK *seek)(struct _cef_stream_writer_t* self, long offset, int (CEF_CALLBACK *seek)(struct _cef_stream_writer_t* self, int64 offset,
int whence); int whence);
/// ///
// Return the current offset position. // Return the current offset position.
/// ///
long (CEF_CALLBACK *tell)(struct _cef_stream_writer_t* self); int64 (CEF_CALLBACK *tell)(struct _cef_stream_writer_t* self);
/// ///
// Flush the stream. // Flush the stream.
/// ///
int (CEF_CALLBACK *flush)(struct _cef_stream_writer_t* self); int (CEF_CALLBACK *flush)(struct _cef_stream_writer_t* self);
} cef_stream_writer_t; } cef_stream_writer_t;
@ -228,4 +221,4 @@ CEF_EXPORT cef_stream_writer_t* cef_stream_writer_create_for_handler(
} }
#endif #endif
#endif // _CEF_STREAM_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_STREAM_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,14 +34,15 @@
// more information. // more information.
// //
#ifndef _CEF_TASK_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_TASK_CAPI_H_
#define _CEF_TASK_CAPI_H #define CEF_INCLUDE_CAPI_CEF_TASK_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
@ -68,14 +69,13 @@ CEF_EXPORT int cef_post_task(cef_thread_id_t threadId,
// be called on any thread. // be called on any thread.
/// ///
CEF_EXPORT int cef_post_delayed_task(cef_thread_id_t threadId, CEF_EXPORT int cef_post_delayed_task(cef_thread_id_t threadId,
struct _cef_task_t* task, long delay_ms); struct _cef_task_t* task, int64 delay_ms);
/// ///
// Implement this structure for task execution. The functions of this structure // Implement this structure for task execution. The functions of this structure
// may be called on any thread. // may be called on any thread.
/// ///
typedef struct _cef_task_t typedef struct _cef_task_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -86,7 +86,6 @@ typedef struct _cef_task_t
/// ///
void (CEF_CALLBACK *execute)(struct _cef_task_t* self, void (CEF_CALLBACK *execute)(struct _cef_task_t* self,
cef_thread_id_t threadId); cef_thread_id_t threadId);
} cef_task_t; } cef_task_t;
@ -94,4 +93,4 @@ typedef struct _cef_task_t
} }
#endif #endif
#endif // _CEF_TASK_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_TASK_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,14 +34,15 @@
// more information. // more information.
// //
#ifndef _CEF_URL_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_URL_CAPI_H_
#define _CEF_URL_CAPI_H #define CEF_INCLUDE_CAPI_CEF_URL_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
@ -63,4 +64,4 @@ CEF_EXPORT int cef_create_url(const struct _cef_urlparts_t* parts,
} }
#endif #endif
#endif // _CEF_URL_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_URL_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,14 +34,15 @@
// more information. // more information.
// //
#ifndef _CEF_V8_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_V8_CAPI_H_
#define _CEF_V8_CAPI_H #define CEF_INCLUDE_CAPI_CEF_V8_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
@ -106,8 +107,7 @@ CEF_EXPORT int cef_register_extension(const cef_string_t* extension_name,
/// ///
// Structure that encapsulates a V8 context handle. // Structure that encapsulates a V8 context handle.
/// ///
typedef struct _cef_v8context_t typedef struct _cef_v8context_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -151,7 +151,6 @@ typedef struct _cef_v8context_t
/// ///
int (CEF_CALLBACK *is_same)(struct _cef_v8context_t* self, int (CEF_CALLBACK *is_same)(struct _cef_v8context_t* self,
struct _cef_v8context_t* that); struct _cef_v8context_t* that);
} cef_v8context_t; } cef_v8context_t;
@ -175,8 +174,7 @@ CEF_EXPORT int cef_v8context_in_context();
// Structure that should be implemented to handle V8 function calls. The // Structure that should be implemented to handle V8 function calls. The
// functions of this structure will always be called on the UI thread. // functions of this structure will always be called on the UI thread.
/// ///
typedef struct _cef_v8handler_t typedef struct _cef_v8handler_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -193,7 +191,6 @@ typedef struct _cef_v8handler_t
const cef_string_t* name, struct _cef_v8value_t* object, const cef_string_t* name, struct _cef_v8value_t* object,
size_t argumentsCount, struct _cef_v8value_t* const* arguments, size_t argumentsCount, struct _cef_v8value_t* const* arguments,
struct _cef_v8value_t** retval, cef_string_t* exception); struct _cef_v8value_t** retval, cef_string_t* exception);
} cef_v8handler_t; } cef_v8handler_t;
@ -202,8 +199,7 @@ typedef struct _cef_v8handler_t
// identifiers are registered by calling cef_v8value_t::set_value_byaccessor(). // identifiers are registered by calling cef_v8value_t::set_value_byaccessor().
// The functions of this structure will always be called on the UI thread. // The functions of this structure will always be called on the UI thread.
/// ///
typedef struct _cef_v8accessor_t typedef struct _cef_v8accessor_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -230,15 +226,13 @@ typedef struct _cef_v8accessor_t
int (CEF_CALLBACK *set)(struct _cef_v8accessor_t* self, int (CEF_CALLBACK *set)(struct _cef_v8accessor_t* self,
const cef_string_t* name, struct _cef_v8value_t* object, 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);
} cef_v8accessor_t; } cef_v8accessor_t;
/// ///
// Structure representing a V8 exception. // Structure representing a V8 exception.
/// ///
typedef struct _cef_v8exception_t typedef struct _cef_v8exception_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -295,7 +289,6 @@ typedef struct _cef_v8exception_t
// occurred. // occurred.
/// ///
int (CEF_CALLBACK *get_end_column)(struct _cef_v8exception_t* self); int (CEF_CALLBACK *get_end_column)(struct _cef_v8exception_t* self);
} cef_v8exception_t; } cef_v8exception_t;
@ -303,8 +296,7 @@ typedef struct _cef_v8exception_t
// Structure representing a V8 value. The functions of this structure should // Structure representing a V8 value. The functions of this structure should
// only be called on the UI thread. // only be called on the UI thread.
/// ///
typedef struct _cef_v8value_t typedef struct _cef_v8value_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -529,7 +521,6 @@ typedef struct _cef_v8value_t
size_t argumentsCount, struct _cef_v8value_t* const* arguments, size_t argumentsCount, struct _cef_v8value_t* const* arguments,
struct _cef_v8value_t** retval, struct _cef_v8exception_t** exception, struct _cef_v8value_t** retval, struct _cef_v8exception_t** exception,
int rethrow_exception); int rethrow_exception);
} cef_v8value_t; } cef_v8value_t;
@ -600,4 +591,4 @@ CEF_EXPORT cef_v8value_t* cef_v8value_create_function(const cef_string_t* name,
} }
#endif #endif
#endif // _CEF_V8_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_V8_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,22 +34,22 @@
// more information. // more information.
// //
#ifndef _CEF_V8CONTEXT_HANDLER_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_V8CONTEXT_HANDLER_CAPI_H_
#define _CEF_V8CONTEXT_HANDLER_CAPI_H #define CEF_INCLUDE_CAPI_CEF_V8CONTEXT_HANDLER_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
// Implement this structure to handle V8 context events. The functions of this // Implement this structure to handle V8 context events. The functions of this
// structure will be called on the UI thread. // structure will be called on the UI thread.
/// ///
typedef struct _cef_v8context_handler_t typedef struct _cef_v8context_handler_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -71,7 +71,6 @@ typedef struct _cef_v8context_handler_t
void (CEF_CALLBACK *on_context_released)( void (CEF_CALLBACK *on_context_released)(
struct _cef_v8context_handler_t* self, struct _cef_browser_t* browser, struct _cef_v8context_handler_t* self, struct _cef_browser_t* browser,
struct _cef_frame_t* frame, struct _cef_v8context_t* context); struct _cef_frame_t* frame, struct _cef_v8context_t* context);
} cef_v8context_handler_t; } cef_v8context_handler_t;
@ -79,4 +78,4 @@ typedef struct _cef_v8context_handler_t
} }
#endif #endif
#endif // _CEF_V8CONTEXT_HANDLER_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_V8CONTEXT_HANDLER_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,14 +34,15 @@
// more information. // more information.
// //
#ifndef _CEF_WEB_URLREQUEST_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_WEB_URLREQUEST_CAPI_H_
#define _CEF_WEB_URLREQUEST_CAPI_H #define CEF_INCLUDE_CAPI_CEF_WEB_URLREQUEST_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
@ -49,8 +50,7 @@ extern "C" {
// with a browser instance so no cef_client_t callbacks will be executed. The // with a browser instance so no cef_client_t callbacks will be executed. The
// functions of this structure may be called on any thread. // functions of this structure may be called on any thread.
/// ///
typedef struct _cef_web_urlrequest_t typedef struct _cef_web_urlrequest_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -66,7 +66,6 @@ typedef struct _cef_web_urlrequest_t
/// ///
enum cef_weburlrequest_state_t (CEF_CALLBACK *get_state)( enum cef_weburlrequest_state_t (CEF_CALLBACK *get_state)(
struct _cef_web_urlrequest_t* self); struct _cef_web_urlrequest_t* self);
} cef_web_urlrequest_t; } cef_web_urlrequest_t;
@ -82,8 +81,7 @@ CEF_EXPORT cef_web_urlrequest_t* cef_web_urlrequest_create(
// Structure that should be implemented by the cef_web_urlrequest_t client. The // Structure that should be implemented by the cef_web_urlrequest_t client. The
// functions of this structure will always be called on the UI thread. // functions of this structure will always be called on the UI thread.
/// ///
typedef struct _cef_web_urlrequest_client_t typedef struct _cef_web_urlrequest_client_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -135,7 +133,6 @@ typedef struct _cef_web_urlrequest_client_t
void (CEF_CALLBACK *on_error)(struct _cef_web_urlrequest_client_t* self, void (CEF_CALLBACK *on_error)(struct _cef_web_urlrequest_client_t* self,
struct _cef_web_urlrequest_t* requester, struct _cef_web_urlrequest_t* requester,
enum cef_handler_errorcode_t errorCode); enum cef_handler_errorcode_t errorCode);
} cef_web_urlrequest_client_t; } cef_web_urlrequest_client_t;
@ -143,4 +140,4 @@ typedef struct _cef_web_urlrequest_client_t
} }
#endif #endif
#endif // _CEF_WEB_URLREQUEST_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_WEB_URLREQUEST_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,14 +34,15 @@
// more information. // more information.
// //
#ifndef _CEF_XML_READER_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_XML_READER_CAPI_H_
#define _CEF_XML_READER_CAPI_H #define CEF_INCLUDE_CAPI_CEF_XML_READER_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
@ -49,8 +50,7 @@ extern "C" {
// The functions of this structure should only be called on the thread that // The functions of this structure should only be called on the thread that
// creates the object. // creates the object.
/// ///
typedef struct _cef_xml_reader_t typedef struct _cef_xml_reader_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -259,7 +259,6 @@ typedef struct _cef_xml_reader_t
// cursor position was set successfully. // cursor position was set successfully.
/// ///
int (CEF_CALLBACK *move_to_carrying_element)(struct _cef_xml_reader_t* self); int (CEF_CALLBACK *move_to_carrying_element)(struct _cef_xml_reader_t* self);
} cef_xml_reader_t; } cef_xml_reader_t;
@ -276,4 +275,4 @@ CEF_EXPORT cef_xml_reader_t* cef_xml_reader_create(
} }
#endif #endif
#endif // _CEF_XML_READER_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_XML_READER_CAPI_H_

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 // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
@ -34,14 +34,15 @@
// more information. // more information.
// //
#ifndef _CEF_ZIP_READER_CAPI_H #ifndef CEF_INCLUDE_CAPI_CEF_ZIP_READER_CAPI_H_
#define _CEF_ZIP_READER_CAPI_H #define CEF_INCLUDE_CAPI_CEF_ZIP_READER_CAPI_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_base_capi.h" #include "include/capi/cef_base_capi.h"
/// ///
@ -49,8 +50,7 @@ extern "C" {
// The functions of this structure should only be called on the thread that // The functions of this structure should only be called on the thread that
// creates the object. // creates the object.
/// ///
typedef struct _cef_zip_reader_t typedef struct _cef_zip_reader_t {
{
/// ///
// Base structure. // Base structure.
/// ///
@ -95,7 +95,7 @@ typedef struct _cef_zip_reader_t
/// ///
// Returns the uncompressed size of the file. // Returns the uncompressed size of the file.
/// ///
long (CEF_CALLBACK *get_file_size)(struct _cef_zip_reader_t* self); int64 (CEF_CALLBACK *get_file_size)(struct _cef_zip_reader_t* self);
/// ///
// Returns the last modified timestamp for the file. // Returns the last modified timestamp for the file.
@ -124,13 +124,12 @@ typedef struct _cef_zip_reader_t
/// ///
// Returns the current offset in the uncompressed file contents. // Returns the current offset in the uncompressed file contents.
/// ///
long (CEF_CALLBACK *tell)(struct _cef_zip_reader_t* self); int64 (CEF_CALLBACK *tell)(struct _cef_zip_reader_t* self);
/// ///
// Returns true (1) if at end of the file contents. // Returns true (1) if at end of the file contents.
/// ///
int (CEF_CALLBACK *eof)(struct _cef_zip_reader_t* self); int (CEF_CALLBACK *eof)(struct _cef_zip_reader_t* self);
} cef_zip_reader_t; } cef_zip_reader_t;
@ -146,4 +145,4 @@ CEF_EXPORT cef_zip_reader_t* cef_zip_reader_create(
} }
#endif #endif
#endif // _CEF_ZIP_READER_CAPI_H #endif // CEF_INCLUDE_CAPI_CEF_ZIP_READER_CAPI_H_

View File

@ -35,11 +35,12 @@
// //
#ifndef _CEF_APP_H #ifndef CEF_INCLUDE_CEF_APP_H_
#define _CEF_APP_H #define CEF_INCLUDE_CEF_APP_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
#include "cef_proxy_handler.h" #include "include/cef_proxy_handler.h"
class CefApp; class CefApp;
@ -94,8 +95,7 @@ void CefQuitMessageLoop();
// Implement this interface to provide handler implementations. // Implement this interface to provide handler implementations.
/// ///
/*--cef(source=client,no_debugct_check)--*/ /*--cef(source=client,no_debugct_check)--*/
class CefApp : public virtual CefBase class CefApp : public virtual CefBase {
{
public: public:
/// ///
// Return the handler for proxy events. If not handler is returned the default // Return the handler for proxy events. If not handler is returned the default
@ -105,4 +105,4 @@ public:
virtual CefRefPtr<CefProxyHandler> GetProxyHandler() { return NULL; } virtual CefRefPtr<CefProxyHandler> GetProxyHandler() { return NULL; }
}; };
#endif // _CEF_APP_H #endif // CEF_INCLUDE_CEF_APP_H_

View File

@ -27,11 +27,11 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_APPLICATION_MAC_H #ifndef CEF_INCLUDE_CEF_APPLICATION_MAC_H_
#define _CEF_APPLICATION_MAC_H #define CEF_INCLUDE_CEF_APPLICATION_MAC_H_
#pragma once #pragma once
#include "cef_base.h" #include "include/cef_base.h"
#if defined(OS_MACOSX) && defined(__OBJC__) #if defined(OS_MACOSX) && defined(__OBJC__)
@ -117,4 +117,4 @@ private:
#endif // defined(OS_MACOSX) && defined(__OBJC__) #endif // defined(OS_MACOSX) && defined(__OBJC__)
#endif // _CEF_APPLICATION_MAC_H #endif // CEF_INCLUDE_CEF_APPLICATION_MAC_H_

View File

@ -35,28 +35,28 @@
// //
#ifndef _CEF_BASE_H #ifndef CEF_INCLUDE_CEF_BASE_H_
#define _CEF_BASE_H #define CEF_INCLUDE_CEF_BASE_H_
#pragma once
#include "internal/cef_build.h" #include "include/internal/cef_build.h"
#include "internal/cef_ptr.h" #include "include/internal/cef_ptr.h"
#include "internal/cef_types_wrappers.h" #include "include/internal/cef_types_wrappers.h"
// Bring in platform-specific definitions. // Bring in platform-specific definitions.
#if defined(OS_WIN) #if defined(OS_WIN)
#include "internal/cef_win.h" #include "include/internal/cef_win.h"
#elif defined(OS_MACOSX) #elif defined(OS_MACOSX)
#include "internal/cef_mac.h" #include "include/internal/cef_mac.h"
#elif defined(OS_LINUX) #elif defined(OS_LINUX)
#include "internal/cef_linux.h" #include "include/internal/cef_linux.h"
#endif #endif
/// ///
// Interface defining the reference count implementation methods. All framework // Interface defining the reference count implementation methods. All framework
// classes must extend the CefBase class. // classes must extend the CefBase class.
/// ///
class CefBase class CefBase {
{
public: public:
/// ///
// The AddRef method increments the reference count for the object. It should // The AddRef method increments the reference count for the object. It should
@ -87,8 +87,7 @@ protected:
/// ///
// Class that implements atomic reference counting. // Class that implements atomic reference counting.
/// ///
class CefRefCount class CefRefCount {
{
public: public:
CefRefCount() : refct_(0) {} CefRefCount() : refct_(0) {}
@ -112,7 +111,7 @@ public:
int GetRefCt() { return refct_; } int GetRefCt() { return refct_; }
private: private:
long refct_; long refct_; // NOLINT(runtime/int)
}; };
/// ///
@ -142,7 +141,7 @@ private:
public: \ public: \
class AutoLock { \ class AutoLock { \
public: \ public: \
AutoLock(ClassName* base) : base_(base) { base_->Lock(); } \ explicit AutoLock(ClassName* base) : base_(base) { base_->Lock(); } \
~AutoLock() { base_->Unlock(); } \ ~AutoLock() { base_->Unlock(); } \
private: \ private: \
ClassName* base_; \ ClassName* base_; \
@ -152,4 +151,4 @@ private:
private: \ private: \
CefCriticalSection critsec_; CefCriticalSection critsec_;
#endif // _CEF_BASE_H #endif // CEF_INCLUDE_CEF_BASE_H_

View File

@ -34,10 +34,11 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_BROWSER_H #ifndef CEF_INCLUDE_CEF_BROWSER_H_
#define _CEF_BROWSER_H #define CEF_INCLUDE_CEF_BROWSER_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
#include <vector> #include <vector>
class CefClient; class CefClient;
@ -48,8 +49,7 @@ class CefFrame;
// called on any thread unless otherwise indicated in the comments. // called on any thread unless otherwise indicated in the comments.
/// ///
/*--cef(source=library)--*/ /*--cef(source=library)--*/
class CefBrowser : public virtual CefBase class CefBrowser : public virtual CefBase {
{
public: public:
typedef cef_key_type_t KeyType; typedef cef_key_type_t KeyType;
typedef cef_mouse_button_type_t MouseButtonType; typedef cef_mouse_button_type_t MouseButtonType;
@ -332,4 +332,4 @@ public:
virtual void SendCaptureLostEvent() =0; virtual void SendCaptureLostEvent() =0;
}; };
#endif // _CEF_BROWSER_H #endif // CEF_INCLUDE_CEF_BROWSER_H_

View File

@ -34,38 +34,37 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_CLIENT_H #ifndef CEF_INCLUDE_CEF_CLIENT_H_
#define _CEF_CLIENT_H #define CEF_INCLUDE_CEF_CLIENT_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
#include "cef_display_handler.h" #include "include/cef_display_handler.h"
#include "cef_drag_handler.h" #include "include/cef_drag_handler.h"
#include "cef_find_handler.h" #include "include/cef_find_handler.h"
#include "cef_focus_handler.h" #include "include/cef_focus_handler.h"
#include "cef_jsdialog_handler.h" #include "include/cef_jsdialog_handler.h"
#include "cef_keyboard_handler.h" #include "include/cef_keyboard_handler.h"
#include "cef_life_span_handler.h" #include "include/cef_life_span_handler.h"
#include "cef_load_handler.h" #include "include/cef_load_handler.h"
#include "cef_menu_handler.h" #include "include/cef_menu_handler.h"
#include "cef_permission_handler.h" #include "include/cef_permission_handler.h"
#include "cef_print_handler.h" #include "include/cef_print_handler.h"
#include "cef_render_handler.h" #include "include/cef_render_handler.h"
#include "cef_request_handler.h" #include "include/cef_request_handler.h"
#include "cef_v8context_handler.h" #include "include/cef_v8context_handler.h"
/// ///
// Implement this interface to provide handler implementations. // Implement this interface to provide handler implementations.
/// ///
/*--cef(source=client,no_debugct_check)--*/ /*--cef(source=client,no_debugct_check)--*/
class CefClient : public virtual CefBase class CefClient : public virtual CefBase {
{
public: public:
/// ///
// Return the handler for browser life span events. // Return the handler for browser life span events.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual CefRefPtr<CefLifeSpanHandler> GetLifeSpanHandler() virtual CefRefPtr<CefLifeSpanHandler> GetLifeSpanHandler() {
{
return NULL; return NULL;
} }
@ -73,8 +72,7 @@ public:
// Return the handler for browser load status events. // Return the handler for browser load status events.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual CefRefPtr<CefLoadHandler> GetLoadHandler() virtual CefRefPtr<CefLoadHandler> GetLoadHandler() {
{
return NULL; return NULL;
} }
@ -82,8 +80,7 @@ public:
// Return the handler for browser request events. // Return the handler for browser request events.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual CefRefPtr<CefRequestHandler> GetRequestHandler() virtual CefRefPtr<CefRequestHandler> GetRequestHandler() {
{
return NULL; return NULL;
} }
@ -91,8 +88,7 @@ public:
// Return the handler for browser display state events. // Return the handler for browser display state events.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual CefRefPtr<CefDisplayHandler> GetDisplayHandler() virtual CefRefPtr<CefDisplayHandler> GetDisplayHandler() {
{
return NULL; return NULL;
} }
@ -100,8 +96,7 @@ public:
// Return the handler for focus events. // Return the handler for focus events.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual CefRefPtr<CefFocusHandler> GetFocusHandler() virtual CefRefPtr<CefFocusHandler> GetFocusHandler() {
{
return NULL; return NULL;
} }
@ -109,8 +104,7 @@ public:
// Return the handler for keyboard events. // Return the handler for keyboard events.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual CefRefPtr<CefKeyboardHandler> GetKeyboardHandler() virtual CefRefPtr<CefKeyboardHandler> GetKeyboardHandler() {
{
return NULL; return NULL;
} }
@ -118,8 +112,7 @@ public:
// Return the handler for context menu events. // Return the handler for context menu events.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual CefRefPtr<CefMenuHandler> GetMenuHandler() virtual CefRefPtr<CefMenuHandler> GetMenuHandler() {
{
return NULL; return NULL;
} }
@ -127,8 +120,7 @@ public:
// Return the handler for browser permission events. // Return the handler for browser permission events.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual CefRefPtr<CefPermissionHandler> GetPermissionHandler() virtual CefRefPtr<CefPermissionHandler> GetPermissionHandler() {
{
return NULL; return NULL;
} }
@ -136,8 +128,7 @@ public:
// Return the handler for printing events. // Return the handler for printing events.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual CefRefPtr<CefPrintHandler> GetPrintHandler() virtual CefRefPtr<CefPrintHandler> GetPrintHandler() {
{
return NULL; return NULL;
} }
@ -145,8 +136,7 @@ public:
// Return the handler for find result events. // Return the handler for find result events.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual CefRefPtr<CefFindHandler> GetFindHandler() virtual CefRefPtr<CefFindHandler> GetFindHandler() {
{
return NULL; return NULL;
} }
@ -154,8 +144,7 @@ public:
// Return the handler for JavaScript dialog events. // Return the handler for JavaScript dialog events.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual CefRefPtr<CefJSDialogHandler> GetJSDialogHandler() virtual CefRefPtr<CefJSDialogHandler> GetJSDialogHandler() {
{
return NULL; return NULL;
} }
@ -163,8 +152,7 @@ public:
// Return the handler for V8 context events. // Return the handler for V8 context events.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual CefRefPtr<CefV8ContextHandler> GetV8ContextHandler() virtual CefRefPtr<CefV8ContextHandler> GetV8ContextHandler() {
{
return NULL; return NULL;
} }
@ -172,8 +160,7 @@ public:
// Return the handler for off-screen rendering events. // Return the handler for off-screen rendering events.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual CefRefPtr<CefRenderHandler> GetRenderHandler() virtual CefRefPtr<CefRenderHandler> GetRenderHandler() {
{
return NULL; return NULL;
} }
@ -181,10 +168,9 @@ public:
// Return the handler for drag events. // Return the handler for drag events.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual CefRefPtr<CefDragHandler> GetDragHandler() virtual CefRefPtr<CefDragHandler> GetDragHandler() {
{
return NULL; return NULL;
} }
}; };
#endif // _CEF_CLIENT_H #endif // CEF_INCLUDE_CEF_CLIENT_H_

View File

@ -34,10 +34,11 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_COMMAND_LINE_H #ifndef CEF_INCLUDE_CEF_COMMAND_LINE_H_
#define _CEF_COMMAND_LINE_H #define CEF_INCLUDE_CEF_COMMAND_LINE_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
#include <map> #include <map>
#include <vector> #include <vector>
@ -52,8 +53,7 @@
// used before CefInitialize() is called. // used before CefInitialize() is called.
/// ///
/*--cef(source=library,no_debugct_check)--*/ /*--cef(source=library,no_debugct_check)--*/
class CefCommandLine : public virtual CefBase class CefCommandLine : public virtual CefBase {
{
public: public:
typedef std::vector<CefString> ArgumentList; typedef std::vector<CefString> ArgumentList;
typedef std::map<CefString, CefString> SwitchMap; typedef std::map<CefString, CefString> SwitchMap;
@ -157,4 +157,4 @@ public:
virtual void AppendArgument(const CefString& argument) =0; virtual void AppendArgument(const CefString& argument) =0;
}; };
#endif // _CEF_COMMAND_LINE_H #endif // CEF_INCLUDE_CEF_COMMAND_LINE_H_

View File

@ -34,10 +34,11 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_CONTENT_FILTER_H #ifndef CEF_INCLUDE_CEF_CONTENT_FILTER_H_
#define _CEF_CONTENT_FILTER_H #define CEF_INCLUDE_CEF_CONTENT_FILTER_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
class CefStreamReader; class CefStreamReader;
@ -46,8 +47,7 @@ class CefStreamReader;
// class will always be called on the UI thread. // class will always be called on the UI thread.
/// ///
/*--cef(source=client)--*/ /*--cef(source=client)--*/
class CefContentFilter : public virtual CefBase class CefContentFilter : public virtual CefBase {
{
public: public:
/// ///
// Set |substitute_data| to the replacement for the data in |data| if data // Set |substitute_data| to the replacement for the data in |data| if data
@ -66,4 +66,4 @@ public:
virtual void Drain(CefRefPtr<CefStreamReader>& remainder) {} virtual void Drain(CefRefPtr<CefStreamReader>& remainder) {}
}; };
#endif // _CEF_CONTENT_FILTER_H #endif // CEF_INCLUDE_CEF_CONTENT_FILTER_H_

View File

@ -34,10 +34,11 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_COOKIE_H #ifndef CEF_INCLUDE_CEF_COOKIE_H_
#define _CEF_COOKIE_H #define CEF_INCLUDE_CEF_COOKIE_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
class CefCookieVisitor; class CefCookieVisitor;
@ -95,8 +96,7 @@ bool CefSetCookiePath(const CefString& path);
// will always be called on the IO thread. // will always be called on the IO thread.
/// ///
/*--cef(source=client)--*/ /*--cef(source=client)--*/
class CefCookieVisitor : public virtual CefBase class CefCookieVisitor : public virtual CefBase {
{
public: public:
/// ///
// Method that will be called once for each cookie. |count| is the 0-based // Method that will be called once for each cookie. |count| is the 0-based
@ -110,4 +110,4 @@ public:
bool& deleteCookie) =0; bool& deleteCookie) =0;
}; };
#endif // _CEF_COOKIE_H #endif // CEF_INCLUDE_CEF_COOKIE_H_

View File

@ -34,10 +34,11 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_DISPLAY_HANDLER_H #ifndef CEF_INCLUDE_CEF_DISPLAY_HANDLER_H_
#define _CEF_DISPLAY_HANDLER_H #define CEF_INCLUDE_CEF_DISPLAY_HANDLER_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
class CefBrowser; class CefBrowser;
class CefFrame; class CefFrame;
@ -47,8 +48,7 @@ class CefFrame;
// The methods of this class will be called on the UI thread. // The methods of this class will be called on the UI thread.
/// ///
/*--cef(source=client)--*/ /*--cef(source=client)--*/
class CefDisplayHandler : public virtual CefBase class CefDisplayHandler : public virtual CefBase {
{
public: public:
typedef cef_handler_statustype_t StatusType; typedef cef_handler_statustype_t StatusType;
@ -115,4 +115,4 @@ public:
int line) { return false; } int line) { return false; }
}; };
#endif // _CEF_DISPLAY_HANDLER_H #endif // CEF_INCLUDE_CEF_DISPLAY_HANDLER_H_

View File

@ -34,10 +34,11 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_DOM_H #ifndef CEF_INCLUDE_CEF_DOM_H_
#define _CEF_DOM_H #define CEF_INCLUDE_CEF_DOM_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
#include <map> #include <map>
class CefDOMDocument; class CefDOMDocument;
@ -49,8 +50,7 @@ class CefDOMNode;
// be called on the UI thread. // be called on the UI thread.
/// ///
/*--cef(source=client)--*/ /*--cef(source=client)--*/
class CefDOMVisitor : public virtual CefBase class CefDOMVisitor : public virtual CefBase {
{
public: public:
/// ///
// Method executed for visiting the DOM. The document object passed to this // Method executed for visiting the DOM. The document object passed to this
@ -69,8 +69,7 @@ public:
// be called on the UI thread. // be called on the UI thread.
/// ///
/*--cef(source=library)--*/ /*--cef(source=library)--*/
class CefDOMDocument : public virtual CefBase class CefDOMDocument : public virtual CefBase {
{
public: public:
typedef cef_dom_document_type_t Type; typedef cef_dom_document_type_t Type;
@ -178,8 +177,7 @@ public:
// called on the UI thread. // called on the UI thread.
/// ///
/*--cef(source=library)--*/ /*--cef(source=library)--*/
class CefDOMNode : public virtual CefBase class CefDOMNode : public virtual CefBase {
{
public: public:
typedef std::map<CefString, CefString> AttributeMap; typedef std::map<CefString, CefString> AttributeMap;
typedef cef_dom_node_type_t Type; typedef cef_dom_node_type_t Type;
@ -356,8 +354,7 @@ public:
// be called on the UI thread. // be called on the UI thread.
/// ///
/*--cef(source=library)--*/ /*--cef(source=library)--*/
class CefDOMEvent : public virtual CefBase class CefDOMEvent : public virtual CefBase {
{
public: public:
typedef cef_dom_event_category_t Category; typedef cef_dom_event_category_t Category;
typedef cef_dom_event_phase_t Phase; typedef cef_dom_event_phase_t Phase;
@ -417,8 +414,7 @@ public:
// will be called on the UI thread. // will be called on the UI thread.
/// ///
/*--cef(source=client)--*/ /*--cef(source=client)--*/
class CefDOMEventListener : public virtual CefBase class CefDOMEventListener : public virtual CefBase {
{
public: public:
/// ///
// Called when an event is received. The event object passed to this method // Called when an event is received. The event object passed to this method
@ -430,4 +426,4 @@ public:
virtual void HandleEvent(CefRefPtr<CefDOMEvent> event) =0; virtual void HandleEvent(CefRefPtr<CefDOMEvent> event) =0;
}; };
#endif // _CEF_DOM_H #endif // CEF_INCLUDE_CEF_DOM_H_

View File

@ -34,18 +34,18 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_DOWNLOAD_HANDLER_H #ifndef CEF_INCLUDE_CEF_DOWNLOAD_HANDLER_H_
#define _CEF_DOWNLOAD_HANDLER_H #define CEF_INCLUDE_CEF_DOWNLOAD_HANDLER_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
/// ///
// Class used to handle file downloads. The methods of this class will always be // Class used to handle file downloads. The methods of this class will always be
// called on the UI thread. // called on the UI thread.
/// ///
/*--cef(source=client)--*/ /*--cef(source=client)--*/
class CefDownloadHandler : public virtual CefBase class CefDownloadHandler : public virtual CefBase {
{
public: public:
/// ///
// A portion of the file contents have been received. This method will be // A portion of the file contents have been received. This method will be
@ -62,4 +62,4 @@ public:
virtual void Complete() =0; virtual void Complete() =0;
}; };
#endif // _CEF_DOWNLOAD_HANDLER_H #endif // CEF_INCLUDE_CEF_DOWNLOAD_HANDLER_H_

View File

@ -34,10 +34,11 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_DRAG_DATA_H #ifndef CEF_INCLUDE_CEF_DRAG_DATA_H_
#define _CEF_DRAG_DATA_H #define CEF_INCLUDE_CEF_DRAG_DATA_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
#include <vector> #include <vector>
/// ///
@ -45,8 +46,7 @@
// on any thread. // on any thread.
/// ///
/*--cef(source=library)--*/ /*--cef(source=library)--*/
class CefDragData : public virtual CefBase class CefDragData : public virtual CefBase {
{
public: public:
/// ///
// Returns true if the drag data is a link. // Returns true if the drag data is a link.
@ -123,4 +123,4 @@ public:
virtual bool GetFileNames(std::vector<CefString>& names) =0; virtual bool GetFileNames(std::vector<CefString>& names) =0;
}; };
#endif // _CEF_DRAG_DATA_H #endif // CEF_INCLUDE_CEF_DRAG_DATA_H_

View File

@ -34,11 +34,12 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_DRAG_HANDLER_H #ifndef CEF_INCLUDE_CEF_DRAG_HANDLER_H_
#define _CEF_DRAG_HANDLER_H #define CEF_INCLUDE_CEF_DRAG_HANDLER_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
#include "cef_drag_data.h" #include "include/cef_drag_data.h"
class CefBrowser; class CefBrowser;
@ -47,8 +48,7 @@ class CefBrowser;
// this class will be called on the UI thread. // this class will be called on the UI thread.
/// ///
/*--cef(source=client)--*/ /*--cef(source=client)--*/
class CefDragHandler : public virtual CefBase class CefDragHandler : public virtual CefBase {
{
public: public:
typedef cef_drag_operations_mask_t DragOperationsMask; typedef cef_drag_operations_mask_t DragOperationsMask;
@ -75,4 +75,4 @@ public:
DragOperationsMask mask) { return false; } DragOperationsMask mask) { return false; }
}; };
#endif // _CEF_DRAG_HANDLER_H #endif // CEF_INCLUDE_CEF_DRAG_HANDLER_H_

View File

@ -34,10 +34,11 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_FIND_HANDLER_H #ifndef CEF_INCLUDE_CEF_FIND_HANDLER_H_
#define _CEF_FIND_HANDLER_H #define CEF_INCLUDE_CEF_FIND_HANDLER_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
class CefBrowser; class CefBrowser;
@ -46,8 +47,7 @@ class CefBrowser;
// methods of this class will be called on the UI thread. // methods of this class will be called on the UI thread.
/// ///
/*--cef(source=client)--*/ /*--cef(source=client)--*/
class CefFindHandler : public virtual CefBase class CefFindHandler : public virtual CefBase {
{
public: public:
/// ///
// Called to report find results returned by CefBrowser::Find(). |identifer| // Called to report find results returned by CefBrowser::Find(). |identifer|
@ -66,4 +66,4 @@ public:
bool finalUpdate) {} bool finalUpdate) {}
}; };
#endif // _CEF_FIND_HANDLER_H #endif // CEF_INCLUDE_CEF_FIND_HANDLER_H_

View File

@ -34,11 +34,12 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_FOCUS_HANDLER_H #ifndef CEF_INCLUDE_CEF_FOCUS_HANDLER_H_
#define _CEF_FOCUS_HANDLER_H #define CEF_INCLUDE_CEF_FOCUS_HANDLER_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
#include "cef_dom.h" #include "include/cef_dom.h"
class CefBrowser; class CefBrowser;
class CefFrame; class CefFrame;
@ -48,8 +49,7 @@ class CefFrame;
// this class will be called on the UI thread. // this class will be called on the UI thread.
/// ///
/*--cef(source=client)--*/ /*--cef(source=client)--*/
class CefFocusHandler : public virtual CefBase class CefFocusHandler : public virtual CefBase {
{
public: public:
typedef cef_handler_focus_source_t FocusSource; typedef cef_handler_focus_source_t FocusSource;
@ -86,4 +86,4 @@ public:
CefRefPtr<CefDOMNode> node) {} CefRefPtr<CefDOMNode> node) {}
}; };
#endif // _CEF_FOCUS_HANDLER_H #endif // CEF_INCLUDE_CEF_FOCUS_HANDLER_H_

View File

@ -34,10 +34,11 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_FRAME_H #ifndef CEF_INCLUDE_CEF_FRAME_H_
#define _CEF_FRAME_H #define CEF_INCLUDE_CEF_FRAME_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
class CefBrowser; class CefBrowser;
class CefDOMVisitor; class CefDOMVisitor;
@ -50,8 +51,7 @@ class CefV8Context;
// class may be called on any thread unless otherwise indicated in the comments. // class may be called on any thread unless otherwise indicated in the comments.
/// ///
/*--cef(source=library)--*/ /*--cef(source=library)--*/
class CefFrame : public virtual CefBase class CefFrame : public virtual CefBase {
{
public: public:
/// ///
// Execute undo in this frame. // Execute undo in this frame.
@ -130,10 +130,10 @@ public:
virtual void LoadURL(const CefString& url) =0; virtual void LoadURL(const CefString& url) =0;
/// ///
// Load the contents of |string| with the optional dummy target |url|. // Load the contents of |string_val| with the optional dummy target |url|.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual void LoadString(const CefString& string, virtual void LoadString(const CefString& string_val,
const CefString& url) =0; const CefString& url) =0;
/// ///
@ -183,7 +183,7 @@ public:
// only be called on the UI thread. // only be called on the UI thread.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual long long GetIdentifier() =0; virtual int64 GetIdentifier() =0;
/// ///
// Returns the parent of this frame or NULL if this is the main (top-level) // Returns the parent of this frame or NULL if this is the main (top-level)
@ -219,4 +219,4 @@ public:
virtual CefRefPtr<CefV8Context> GetV8Context() =0; virtual CefRefPtr<CefV8Context> GetV8Context() =0;
}; };
#endif // _CEF_FRAME_H #endif // CEF_INCLUDE_CEF_FRAME_H_

View File

@ -34,10 +34,11 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_JSDIALOG_HANDLER_H #ifndef CEF_INCLUDE_CEF_JSDIALOG_HANDLER_H_
#define _CEF_JSDIALOG_HANDLER_H #define CEF_INCLUDE_CEF_JSDIALOG_HANDLER_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
class CefBrowser; class CefBrowser;
class CefFrame; class CefFrame;
@ -47,8 +48,7 @@ class CefFrame;
// methods of this class will be called on the UI thread. // methods of this class will be called on the UI thread.
/// ///
/*--cef(source=client)--*/ /*--cef(source=client)--*/
class CefJSDialogHandler : public virtual CefBase class CefJSDialogHandler : public virtual CefBase {
{
public: public:
/// ///
// Called to run a JavaScript alert message. Return false to display the // Called to run a JavaScript alert message. Return false to display the
@ -85,4 +85,4 @@ public:
CefString& result) { return false; } CefString& result) { return false; }
}; };
#endif // _CEF_JSDIALOG_HANDLER_H #endif // CEF_INCLUDE_CEF_JSDIALOG_HANDLER_H_

View File

@ -34,10 +34,11 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_KEYBOARD_HANDLER_H #ifndef CEF_INCLUDE_CEF_KEYBOARD_HANDLER_H_
#define _CEF_KEYBOARD_HANDLER_H #define CEF_INCLUDE_CEF_KEYBOARD_HANDLER_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
class CefBrowser; class CefBrowser;
@ -46,8 +47,7 @@ class CefBrowser;
// methods of this class will be called on the UI thread. // methods of this class will be called on the UI thread.
/// ///
/*--cef(source=client)--*/ /*--cef(source=client)--*/
class CefKeyboardHandler : public virtual CefBase class CefKeyboardHandler : public virtual CefBase {
{
public: public:
typedef cef_handler_keyevent_type_t KeyEventType; typedef cef_handler_keyevent_type_t KeyEventType;
@ -74,4 +74,4 @@ public:
bool isAfterJavaScript) { return false; } bool isAfterJavaScript) { return false; }
}; };
#endif // _CEF_KEYBOARD_HANDLER_H #endif // CEF_INCLUDE_CEF_KEYBOARD_HANDLER_H_

View File

@ -34,10 +34,11 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_LIFE_SPAN_HANDLER_H #ifndef CEF_INCLUDE_CEF_LIFE_SPAN_HANDLER_H_
#define _CEF_LIFE_SPAN_HANDLER_H #define CEF_INCLUDE_CEF_LIFE_SPAN_HANDLER_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
class CefBrowser; class CefBrowser;
class CefClient; class CefClient;
@ -47,8 +48,7 @@ class CefClient;
// methods of this class will be called on the UI thread. // methods of this class will be called on the UI thread.
/// ///
/*--cef(source=client)--*/ /*--cef(source=client)--*/
class CefLifeSpanHandler : public virtual CefBase class CefLifeSpanHandler : public virtual CefBase {
{
public: public:
/// ///
// Called before a new popup window is created. The |parentBrowser| parameter // Called before a new popup window is created. The |parentBrowser| parameter
@ -102,4 +102,4 @@ public:
virtual void OnBeforeClose(CefRefPtr<CefBrowser> browser) {} virtual void OnBeforeClose(CefRefPtr<CefBrowser> browser) {}
}; };
#endif // _CEF_LIFE_SPAN_HANDLER_H #endif // CEF_INCLUDE_CEF_LIFE_SPAN_HANDLER_H_

View File

@ -34,10 +34,11 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_LOAD_HANDLER_H #ifndef CEF_INCLUDE_CEF_LOAD_HANDLER_H_
#define _CEF_LOAD_HANDLER_H #define CEF_INCLUDE_CEF_LOAD_HANDLER_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
class CefBrowser; class CefBrowser;
class CefFrame; class CefFrame;
@ -47,8 +48,7 @@ class CefFrame;
// methods of this class will be called on the UI thread. // methods of this class will be called on the UI thread.
/// ///
/*--cef(source=client)--*/ /*--cef(source=client)--*/
class CefLoadHandler : public virtual CefBase class CefLoadHandler : public virtual CefBase {
{
public: public:
typedef cef_handler_errorcode_t ErrorCode; typedef cef_handler_errorcode_t ErrorCode;
@ -92,4 +92,4 @@ public:
CefString& errorText) { return false; } CefString& errorText) { return false; }
}; };
#endif // _CEF_LOAD_HANDLER_H #endif // CEF_INCLUDE_CEF_LOAD_HANDLER_H_

View File

@ -34,10 +34,11 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_MENU_HANDLER_H #ifndef CEF_INCLUDE_CEF_MENU_HANDLER_H_
#define _CEF_MENU_HANDLER_H #define CEF_INCLUDE_CEF_MENU_HANDLER_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
class CefBrowser; class CefBrowser;
@ -46,8 +47,7 @@ class CefBrowser;
// The methods of this class will be called on the UI thread. // The methods of this class will be called on the UI thread.
/// ///
/*--cef(source=client)--*/ /*--cef(source=client)--*/
class CefMenuHandler : public virtual CefBase class CefMenuHandler : public virtual CefBase {
{
public: public:
typedef cef_menu_id_t MenuId; typedef cef_menu_id_t MenuId;
@ -78,4 +78,4 @@ public:
MenuId menuId) { return false; } MenuId menuId) { return false; }
}; };
#endif // _CEF_MENU_HANDLER_H #endif // CEF_INCLUDE_CEF_MENU_HANDLER_H_

View File

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

View File

@ -34,10 +34,11 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_ORIGIN_WHITELIST_H #ifndef CEF_INCLUDE_CEF_ORIGIN_WHITELIST_H_
#define _CEF_ORIGIN_WHITELIST_H #define CEF_INCLUDE_CEF_ORIGIN_WHITELIST_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
/// ///
@ -95,4 +96,4 @@ bool CefRemoveCrossOriginWhitelistEntry(const CefString& source_origin,
/*--cef()--*/ /*--cef()--*/
bool CefClearCrossOriginWhitelist(); bool CefClearCrossOriginWhitelist();
#endif // _CEF_ORIGIN_WHITELIST_H #endif // CEF_INCLUDE_CEF_ORIGIN_WHITELIST_H_

View File

@ -34,10 +34,11 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_PERMISSION_HANDLER_H #ifndef CEF_INCLUDE_CEF_PERMISSION_HANDLER_H_
#define _CEF_PERMISSION_HANDLER_H #define CEF_INCLUDE_CEF_PERMISSION_HANDLER_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
class CefBrowser; class CefBrowser;
class CefFrame; class CefFrame;
@ -47,8 +48,7 @@ class CefFrame;
// The methods of this class will be called on the UI thread. // The methods of this class will be called on the UI thread.
/// ///
/*--cef(source=client)--*/ /*--cef(source=client)--*/
class CefPermissionHandler : public virtual CefBase class CefPermissionHandler : public virtual CefBase {
{
public: public:
/// ///
// Called on the UI thread before a script extension is loaded. // Called on the UI thread before a script extension is loaded.
@ -57,10 +57,9 @@ public:
/*--cef()--*/ /*--cef()--*/
virtual bool OnBeforeScriptExtensionLoad(CefRefPtr<CefBrowser> browser, virtual bool OnBeforeScriptExtensionLoad(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame, CefRefPtr<CefFrame> frame,
const CefString& extensionName) const CefString& extensionName) {
{
return false; return false;
} }
}; };
#endif // _CEF_PERMISSION_HANDLER_H #endif // CEF_INCLUDE_CEF_PERMISSION_HANDLER_H_

View File

@ -34,10 +34,11 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_PRINT_HANDLER_H #ifndef CEF_INCLUDE_CEF_PRINT_HANDLER_H_
#define _CEF_PRINT_HANDLER_H #define CEF_INCLUDE_CEF_PRINT_HANDLER_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
class CefBrowser; class CefBrowser;
class CefFrame; class CefFrame;
@ -47,8 +48,7 @@ class CefFrame;
// this class will be called on the UI thread. // this class will be called on the UI thread.
/// ///
/*--cef(source=client)--*/ /*--cef(source=client)--*/
class CefPrintHandler : public virtual CefBase class CefPrintHandler : public virtual CefBase {
{
public: public:
/// ///
// Called to allow customization of standard print options before the print // Called to allow customization of standard print options before the print
@ -89,4 +89,4 @@ public:
CefString& bottomRight) { return false; } CefString& bottomRight) { return false; }
}; };
#endif // _CEF_PRINT_HANDLER_H #endif // CEF_INCLUDE_CEF_PRINT_HANDLER_H_

View File

@ -34,17 +34,17 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_PROXY_HANDLER_H #ifndef CEF_INCLUDE_CEF_PROXY_HANDLER_H_
#define _CEF_PROXY_HANDLER_H #define CEF_INCLUDE_CEF_PROXY_HANDLER_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
/// ///
// Implement this interface to handle proxy resolution events. // Implement this interface to handle proxy resolution events.
/// ///
/*--cef(source=client)--*/ /*--cef(source=client)--*/
class CefProxyHandler : public virtual CefBase class CefProxyHandler : public virtual CefBase {
{
public: public:
/// ///
// Called to retrieve proxy information for the specified |url|. // Called to retrieve proxy information for the specified |url|.
@ -54,4 +54,4 @@ public:
CefProxyInfo& proxy_info) {} CefProxyInfo& proxy_info) {}
}; };
#endif // _CEF_PROXY_HANDLER_H #endif // CEF_INCLUDE_CEF_PROXY_HANDLER_H_

View File

@ -34,10 +34,11 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_RENDER_HANDLER_H #ifndef CEF_INCLUDE_CEF_RENDER_HANDLER_H_
#define _CEF_RENDER_HANDLER_H #define CEF_INCLUDE_CEF_RENDER_HANDLER_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
#include <vector> #include <vector>
class CefBrowser; class CefBrowser;
@ -47,8 +48,7 @@ class CefBrowser;
// The methods of this class will be called on the UI thread. // The methods of this class will be called on the UI thread.
/// ///
/*--cef(source=client)--*/ /*--cef(source=client)--*/
class CefRenderHandler : public virtual CefBase class CefRenderHandler : public virtual CefBase {
{
public: public:
typedef cef_paint_element_type_t PaintElementType; typedef cef_paint_element_type_t PaintElementType;
typedef std::vector<CefRect> RectList; typedef std::vector<CefRect> RectList;
@ -117,4 +117,4 @@ public:
CefCursorHandle cursor) {} CefCursorHandle cursor) {}
}; };
#endif // _CEF_RENDER_HANDLER_H #endif // CEF_INCLUDE_CEF_RENDER_HANDLER_H_

View File

@ -34,10 +34,11 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_REQUEST_H #ifndef CEF_INCLUDE_CEF_REQUEST_H_
#define _CEF_REQUEST_H #define CEF_INCLUDE_CEF_REQUEST_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
#include <map> #include <map>
#include <vector> #include <vector>
@ -49,8 +50,7 @@ class CefPostDataElement;
// called on any thread. // called on any thread.
/// ///
/*--cef(source=library)--*/ /*--cef(source=library)--*/
class CefRequest : public virtual CefBase class CefRequest : public virtual CefBase {
{
public: public:
typedef std::multimap<CefString, CefString> HeaderMap; typedef std::multimap<CefString, CefString> HeaderMap;
typedef cef_weburlrequest_flags_t RequestFlags; typedef cef_weburlrequest_flags_t RequestFlags;
@ -146,8 +146,7 @@ public:
// class may be called on any thread. // class may be called on any thread.
/// ///
/*--cef(source=library)--*/ /*--cef(source=library)--*/
class CefPostData : public virtual CefBase class CefPostData : public virtual CefBase {
{
public: public:
typedef std::vector<CefRefPtr<CefPostDataElement> > ElementVector; typedef std::vector<CefRefPtr<CefPostDataElement> > ElementVector;
@ -195,8 +194,7 @@ public:
// methods of this class may be called on any thread. // methods of this class may be called on any thread.
/// ///
/*--cef(source=library)--*/ /*--cef(source=library)--*/
class CefPostDataElement : public virtual CefBase class CefPostDataElement : public virtual CefBase {
{
public: public:
/// ///
// Post data elements may represent either bytes or files. // Post data elements may represent either bytes or files.
@ -254,4 +252,4 @@ public:
virtual size_t GetBytes(size_t size, void* bytes) =0; virtual size_t GetBytes(size_t size, void* bytes) =0;
}; };
#endif // _CEF_REQUEST_H #endif // CEF_INCLUDE_CEF_REQUEST_H_

View File

@ -34,15 +34,16 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_REQUEST_HANDLER_H #ifndef CEF_INCLUDE_CEF_REQUEST_HANDLER_H_
#define _CEF_REQUEST_HANDLER_H #define CEF_INCLUDE_CEF_REQUEST_HANDLER_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
#include "cef_download_handler.h" #include "include/cef_download_handler.h"
#include "cef_content_filter.h" #include "include/cef_content_filter.h"
#include "cef_response.h" #include "include/cef_response.h"
#include "cef_request.h" #include "include/cef_request.h"
#include "cef_stream.h" #include "include/cef_stream.h"
class CefBrowser; class CefBrowser;
class CefFrame; class CefFrame;
@ -52,8 +53,7 @@ class CefFrame;
// methods of this class will be called on the thread indicated. // methods of this class will be called on the thread indicated.
/// ///
/*--cef(source=client)--*/ /*--cef(source=client)--*/
class CefRequestHandler : public virtual CefBase class CefRequestHandler : public virtual CefBase {
{
public: public:
typedef cef_handler_navtype_t NavType; typedef cef_handler_navtype_t NavType;
@ -157,4 +157,4 @@ public:
CefString& password) { return false; } CefString& password) { return false; }
}; };
#endif // _CEF_REQUEST_HANDLER_H #endif // CEF_INCLUDE_CEF_REQUEST_HANDLER_H_

View File

@ -34,10 +34,11 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_RESPONSE_H #ifndef CEF_INCLUDE_CEF_RESPONSE_H_
#define _CEF_RESPONSE_H #define CEF_INCLUDE_CEF_RESPONSE_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
#include <map> #include <map>
/// ///
@ -45,8 +46,7 @@
// called on any thread. // called on any thread.
/// ///
/*--cef(source=library)--*/ /*--cef(source=library)--*/
class CefResponse : public virtual CefBase class CefResponse : public virtual CefBase {
{
public: public:
typedef std::multimap<CefString, CefString> HeaderMap; typedef std::multimap<CefString, CefString> HeaderMap;
@ -101,4 +101,4 @@ public:
virtual void SetHeaderMap(const HeaderMap& headerMap) =0; virtual void SetHeaderMap(const HeaderMap& headerMap) =0;
}; };
#endif // _CEF_RESPONSE_H #endif // CEF_INCLUDE_CEF_RESPONSE_H_

View File

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

View File

@ -34,10 +34,11 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_SCHEME_H #ifndef CEF_INCLUDE_CEF_SCHEME_H_
#define _CEF_SCHEME_H #define CEF_INCLUDE_CEF_SCHEME_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
class CefBrowser; class CefBrowser;
class CefRequest; class CefRequest;
@ -126,8 +127,7 @@ bool CefClearSchemeHandlerFactories();
// always be called on the IO thread. // always be called on the IO thread.
/// ///
/*--cef(source=client)--*/ /*--cef(source=client)--*/
class CefSchemeHandlerFactory : public virtual CefBase class CefSchemeHandlerFactory : public virtual CefBase {
{
public: public:
/// ///
// Return a new scheme handler instance to handle the request. |browser| will // Return a new scheme handler instance to handle the request. |browser| will
@ -145,8 +145,7 @@ public:
// requests. The methods of this class may be called on any thread. // requests. The methods of this class may be called on any thread.
/// ///
/*--cef(source=library)--*/ /*--cef(source=library)--*/
class CefSchemeHandlerCallback : public virtual CefBase class CefSchemeHandlerCallback : public virtual CefBase {
{
public: public:
/// ///
// Notify that header information is now available for retrieval. // Notify that header information is now available for retrieval.
@ -172,8 +171,7 @@ public:
// this class will always be called on the IO thread. // this class will always be called on the IO thread.
/// ///
/*--cef(source=client)--*/ /*--cef(source=client)--*/
class CefSchemeHandler : public virtual CefBase class CefSchemeHandler : public virtual CefBase {
{
public: public:
/// ///
// Begin processing the request. To handle the request return true and call // Begin processing the request. To handle the request return true and call
@ -220,4 +218,4 @@ public:
virtual void Cancel() =0; virtual void Cancel() =0;
}; };
#endif // _CEF_SCHEME_H #endif // CEF_INCLUDE_CEF_SCHEME_H_

View File

@ -34,10 +34,11 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_STORAGE_H #ifndef CEF_INCLUDE_CEF_STORAGE_H_
#define _CEF_STORAGE_H #define CEF_INCLUDE_CEF_STORAGE_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
class CefStorageVisitor; class CefStorageVisitor;
@ -91,8 +92,7 @@ bool CefSetStoragePath(CefStorageType type, const CefString& path);
// always be called on the UI thread. // always be called on the UI thread.
/// ///
/*--cef(source=client)--*/ /*--cef(source=client)--*/
class CefStorageVisitor : public virtual CefBase class CefStorageVisitor : public virtual CefBase {
{
public: public:
/// ///
// Method that will be called once for each key/value data pair in storage. // Method that will be called once for each key/value data pair in storage.
@ -107,4 +107,4 @@ public:
int total, bool& deleteData) =0; int total, bool& deleteData) =0;
}; };
#endif // _CEF_STORAGE_H #endif // CEF_INCLUDE_CEF_STORAGE_H_

View File

@ -34,18 +34,17 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_STREAM_H #ifndef CEF_INCLUDE_CEF_STREAM_H_
#define _CEF_STREAM_H #define CEF_INCLUDE_CEF_STREAM_H_
#include "cef_base.h" #include "include/cef_base.h"
/// ///
// Interface the client can implement to provide a custom stream reader. The // Interface the client can implement to provide a custom stream reader. The
// methods of this class may be called on any thread. // methods of this class may be called on any thread.
/// ///
/*--cef(source=client)--*/ /*--cef(source=client)--*/
class CefReadHandler : public virtual CefBase class CefReadHandler : public virtual CefBase {
{
public: public:
/// ///
// Read raw binary data. // Read raw binary data.
@ -55,16 +54,17 @@ public:
/// ///
// Seek to the specified offset position. |whence| may be any one of // Seek to the specified offset position. |whence| may be any one of
// SEEK_CUR, SEEK_END or SEEK_SET. // SEEK_CUR, SEEK_END or SEEK_SET. Return zero on success and non-zero on
// failure.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual int Seek(long offset, int whence) =0; virtual int Seek(int64 offset, int whence) =0;
/// ///
// Return the current offset position. // Return the current offset position.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual long Tell() =0; virtual int64 Tell() =0;
/// ///
// Return non-zero if at end of file. // Return non-zero if at end of file.
@ -79,8 +79,7 @@ public:
// called on any thread. // called on any thread.
/// ///
/*--cef(source=library)--*/ /*--cef(source=library)--*/
class CefStreamReader : public virtual CefBase class CefStreamReader : public virtual CefBase {
{
public: public:
/// ///
// Create a new CefStreamReader object from a file. // Create a new CefStreamReader object from a file.
@ -111,13 +110,13 @@ public:
// failure. // failure.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual int Seek(long offset, int whence) =0; virtual int Seek(int64 offset, int whence) =0;
/// ///
// Return the current offset position. // Return the current offset position.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual long Tell() =0; virtual int64 Tell() =0;
/// ///
// Return non-zero if at end of file. // Return non-zero if at end of file.
@ -132,8 +131,7 @@ public:
// methods of this class may be called on any thread. // methods of this class may be called on any thread.
/// ///
/*--cef(source=client)--*/ /*--cef(source=client)--*/
class CefWriteHandler : public virtual CefBase class CefWriteHandler : public virtual CefBase {
{
public: public:
/// ///
// Write raw binary data. // Write raw binary data.
@ -143,16 +141,17 @@ public:
/// ///
// Seek to the specified offset position. |whence| may be any one of // Seek to the specified offset position. |whence| may be any one of
// SEEK_CUR, SEEK_END or SEEK_SET. // SEEK_CUR, SEEK_END or SEEK_SET. Return zero on success and non-zero on
// failure.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual int Seek(long offset, int whence) =0; virtual int Seek(int64 offset, int whence) =0;
/// ///
// Return the current offset position. // Return the current offset position.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual long Tell() =0; virtual int64 Tell() =0;
/// ///
// Flush the stream. // Flush the stream.
@ -167,8 +166,7 @@ public:
// on any thread. // on any thread.
/// ///
/*--cef(source=library)--*/ /*--cef(source=library)--*/
class CefStreamWriter : public virtual CefBase class CefStreamWriter : public virtual CefBase {
{
public: public:
/// ///
// Create a new CefStreamWriter object for a file. // Create a new CefStreamWriter object for a file.
@ -190,16 +188,17 @@ public:
/// ///
// Seek to the specified offset position. |whence| may be any one of // Seek to the specified offset position. |whence| may be any one of
// SEEK_CUR, SEEK_END or SEEK_SET. // SEEK_CUR, SEEK_END or SEEK_SET. Returns zero on success and non-zero on
// failure.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual int Seek(long offset, int whence) =0; virtual int Seek(int64 offset, int whence) =0;
/// ///
// Return the current offset position. // Return the current offset position.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual long Tell() =0; virtual int64 Tell() =0;
/// ///
// Flush the stream. // Flush the stream.
@ -208,4 +207,4 @@ public:
virtual int Flush() =0; virtual int Flush() =0;
}; };
#endif // _CEF_STREAM_H #endif // CEF_INCLUDE_CEF_STREAM_H_

View File

@ -34,10 +34,10 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_TASK_H #ifndef CEF_INCLUDE_CEF_TASK_H_
#define _CEF_TASK_H #define CEF_INCLUDE_CEF_TASK_H_
#include "cef_base.h" #include "include/cef_base.h"
class CefTask; class CefTask;
@ -69,7 +69,7 @@ bool CefPostTask(CefThreadId threadId, CefRefPtr<CefTask> task);
/// ///
/*--cef()--*/ /*--cef()--*/
bool CefPostDelayedTask(CefThreadId threadId, CefRefPtr<CefTask> task, bool CefPostDelayedTask(CefThreadId threadId, CefRefPtr<CefTask> task,
long delay_ms); int64 delay_ms);
/// ///
@ -77,8 +77,7 @@ bool CefPostDelayedTask(CefThreadId threadId, CefRefPtr<CefTask> task,
// be called on any thread. // be called on any thread.
/// ///
/*--cef(source=client)--*/ /*--cef(source=client)--*/
class CefTask : public virtual CefBase class CefTask : public virtual CefBase {
{
public: public:
/// ///
// Method that will be executed. |threadId| is the thread executing the call. // Method that will be executed. |threadId| is the thread executing the call.
@ -87,4 +86,4 @@ public:
virtual void Execute(CefThreadId threadId) =0; virtual void Execute(CefThreadId threadId) =0;
}; };
#endif // _CEF_TASK_H #endif // CEF_INCLUDE_CEF_TASK_H_

View File

@ -34,10 +34,11 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_URL_H #ifndef CEF_INCLUDE_CEF_URL_H_
#define _CEF_URL_H #define CEF_INCLUDE_CEF_URL_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
/// ///
// Parse the specified |url| into its component parts. // Parse the specified |url| into its component parts.
@ -56,4 +57,4 @@ bool CefParseURL(const CefString& url,
bool CefCreateURL(const CefURLParts& parts, bool CefCreateURL(const CefURLParts& parts,
CefString& url); CefString& url);
#endif // _CEF_URL_H #endif // CEF_INCLUDE_CEF_URL_H_

View File

@ -35,10 +35,11 @@
// //
#ifndef _CEF_V8_H #ifndef CEF_INCLUDE_CEF_V8_H_
#define _CEF_V8_H #define CEF_INCLUDE_CEF_V8_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
#include <vector> #include <vector>
class CefBrowser; class CefBrowser;
@ -116,8 +117,7 @@ bool CefRegisterExtension(const CefString& extension_name,
// Class that encapsulates a V8 context handle. // Class that encapsulates a V8 context handle.
/// ///
/*--cef(source=library)--*/ /*--cef(source=library)--*/
class CefV8Context : public virtual CefBase class CefV8Context : public virtual CefBase {
{
public: public:
/// ///
// Returns the current (top) context object in the V8 context stack. // Returns the current (top) context object in the V8 context stack.
@ -188,8 +188,7 @@ typedef std::vector<CefRefPtr<CefV8Value> > CefV8ValueList;
// of this class will always be called on the UI thread. // of this class will always be called on the UI thread.
/// ///
/*--cef(source=client)--*/ /*--cef(source=client)--*/
class CefV8Handler : public virtual CefBase class CefV8Handler : public virtual CefBase {
{
public: public:
/// ///
// Handle execution of the function identified by |name|. |object| is the // Handle execution of the function identified by |name|. |object| is the
@ -212,8 +211,7 @@ public:
// of this class will always be called on the UI thread. // of this class will always be called on the UI thread.
/// ///
/*--cef(source=client)--*/ /*--cef(source=client)--*/
class CefV8Accessor : public virtual CefBase class CefV8Accessor : public virtual CefBase {
{
public: public:
/// ///
// Handle retrieval the accessor value identified by |name|. |object| is the // Handle retrieval the accessor value identified by |name|. |object| is the
@ -246,8 +244,7 @@ public:
// Class representing a V8 exception. // Class representing a V8 exception.
/// ///
/*--cef(source=library)--*/ /*--cef(source=library)--*/
class CefV8Exception : public virtual CefBase class CefV8Exception : public virtual CefBase {
{
public: public:
/// ///
// Returns the exception message. // Returns the exception message.
@ -309,8 +306,7 @@ public:
// called on the UI thread. // called on the UI thread.
/// ///
/*--cef(source=library)--*/ /*--cef(source=library)--*/
class CefV8Value : public virtual CefBase class CefV8Value : public virtual CefBase {
{
public: public:
typedef cef_v8_accesscontrol_t AccessControl; typedef cef_v8_accesscontrol_t AccessControl;
typedef cef_v8_propertyattribute_t PropertyAttribute; typedef cef_v8_propertyattribute_t PropertyAttribute;
@ -599,4 +595,4 @@ public:
bool rethrow_exception) =0; bool rethrow_exception) =0;
}; };
#endif // _CEF_V8_H #endif // CEF_INCLUDE_CEF_V8_H_

View File

@ -34,11 +34,12 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_V8CONTEXT_HANDLER_H #ifndef CEF_INCLUDE_CEF_V8CONTEXT_HANDLER_H_
#define _CEF_V8CONTEXT_HANDLER_H #define CEF_INCLUDE_CEF_V8CONTEXT_HANDLER_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
#include "cef_v8.h" #include "include/cef_v8.h"
class CefBrowser; class CefBrowser;
class CefFrame; class CefFrame;
@ -48,8 +49,7 @@ class CefFrame;
// class will be called on the UI thread. // class will be called on the UI thread.
/// ///
/*--cef(source=client)--*/ /*--cef(source=client)--*/
class CefV8ContextHandler : public virtual CefBase class CefV8ContextHandler : public virtual CefBase {
{
public: public:
/// ///
// Called immediately after the V8 context for a frame has been created. To // Called immediately after the V8 context for a frame has been created. To
@ -71,4 +71,4 @@ public:
CefRefPtr<CefV8Context> context) {} CefRefPtr<CefV8Context> context) {}
}; };
#endif // _CEF_V8CONTEXT_HANDLER_H #endif // CEF_INCLUDE_CEF_V8CONTEXT_HANDLER_H_

View File

@ -34,10 +34,11 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_WEB_URLREQUEST_H #ifndef CEF_INCLUDE_CEF_WEB_URLREQUEST_H_
#define _CEF_WEB_URLREQUEST_H #define CEF_INCLUDE_CEF_WEB_URLREQUEST_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
class CefRequest; class CefRequest;
class CefResponse; class CefResponse;
@ -49,8 +50,7 @@ class CefWebURLRequestClient;
// methods of this class may be called on any thread. // methods of this class may be called on any thread.
/// ///
/*--cef(source=library)--*/ /*--cef(source=library)--*/
class CefWebURLRequest : public virtual CefBase class CefWebURLRequest : public virtual CefBase {
{
public: public:
typedef cef_weburlrequest_state_t RequestState; typedef cef_weburlrequest_state_t RequestState;
@ -80,8 +80,7 @@ public:
// methods of this class will always be called on the UI thread. // methods of this class will always be called on the UI thread.
/// ///
/*--cef(source=client)--*/ /*--cef(source=client)--*/
class CefWebURLRequestClient : public virtual CefBase class CefWebURLRequestClient : public virtual CefBase {
{
public: public:
typedef cef_weburlrequest_state_t RequestState; typedef cef_weburlrequest_state_t RequestState;
typedef cef_handler_errorcode_t ErrorCode; typedef cef_handler_errorcode_t ErrorCode;
@ -133,4 +132,4 @@ public:
ErrorCode errorCode) =0; ErrorCode errorCode) =0;
}; };
#endif // _CEF_WEB_URLREQUEST_H #endif // CEF_INCLUDE_CEF_WEB_URLREQUEST_H_

View File

@ -34,10 +34,11 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_XML_READER_H #ifndef CEF_INCLUDE_CEF_XML_READER_H_
#define _CEF_XML_READER_H #define CEF_INCLUDE_CEF_XML_READER_H_
#pragma once
#include "cef_base.h" #include "include/cef_base.h"
class CefStreamReader; class CefStreamReader;
@ -47,8 +48,7 @@ class CefStreamReader;
// the object. // the object.
/// ///
/*--cef(source=library)--*/ /*--cef(source=library)--*/
class CefXmlReader : public virtual CefBase class CefXmlReader : public virtual CefBase {
{
public: public:
typedef cef_xml_encoding_type_t EncodingType; typedef cef_xml_encoding_type_t EncodingType;
typedef cef_xml_node_type_t NodeType; typedef cef_xml_node_type_t NodeType;
@ -266,4 +266,4 @@ public:
virtual bool MoveToCarryingElement() =0; virtual bool MoveToCarryingElement() =0;
}; };
#endif // _CEF_XML_READER_H #endif // CEF_INCLUDE_CEF_XML_READER_H_

View File

@ -34,10 +34,10 @@
// tools directory for more information. // tools directory for more information.
// //
#ifndef _CEF_ZIP_READER_H #ifndef CEF_INCLUDE_CEF_ZIP_READER_H_
#define _CEF_ZIP_READER_H #define CEF_INCLUDE_CEF_ZIP_READER_H_
#include "cef_base.h" #include "include/cef_base.h"
class CefStreamReader; class CefStreamReader;
@ -47,8 +47,7 @@ class CefStreamReader;
// the object. // the object.
/// ///
/*--cef(source=library)--*/ /*--cef(source=library)--*/
class CefZipReader : public virtual CefBase class CefZipReader : public virtual CefBase {
{
public: public:
/// ///
// Create a new CefZipReader object. The returned object's methods can only // Create a new CefZipReader object. The returned object's methods can only
@ -99,7 +98,7 @@ public:
// Returns the uncompressed size of the file. // Returns the uncompressed size of the file.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual long GetFileSize() =0; virtual int64 GetFileSize() =0;
/// ///
// Returns the last modified timestamp for the file. // Returns the last modified timestamp for the file.
@ -131,7 +130,7 @@ public:
// Returns the current offset in the uncompressed file contents. // Returns the current offset in the uncompressed file contents.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual long Tell() =0; virtual int64 Tell() =0;
/// ///
// Returns true if at end of the file contents. // Returns true if at end of the file contents.
@ -140,4 +139,4 @@ public:
virtual bool Eof() =0; virtual bool Eof() =0;
}; };
#endif // _CEF_ZIP_READER_H #endif // CEF_INCLUDE_CEF_ZIP_READER_H_

View File

@ -28,8 +28,9 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_BUILD_H #ifndef CEF_INCLUDE_INTERNAL_CEF_BUILD_H_
#define _CEF_BUILD_H #define CEF_INCLUDE_INTERNAL_CEF_BUILD_H_
#pragma once
#if defined(BUILDING_CEF_SHARED) #if defined(BUILDING_CEF_SHARED)
@ -125,4 +126,4 @@
#endif // !BUILDING_CEF_SHARED #endif // !BUILDING_CEF_SHARED
#endif // _CEF_BUILD_H #endif // CEF_INCLUDE_INTERNAL_CEF_BUILD_H_

View File

@ -28,10 +28,11 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_EXPORT_H #ifndef CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_
#define _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) #if defined(COMPILER_MSVC)
@ -51,4 +52,4 @@
#endif // COMPILER_GCC #endif // COMPILER_GCC
#endif // _CEF_EXPORT_H #endif // CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_

View File

@ -28,45 +28,39 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_LINUX_H #ifndef CEF_INCLUDE_INTERNAL_CEF_LINUX_H_
#define _CEF_LINUX_H #define CEF_INCLUDE_INTERNAL_CEF_LINUX_H_
#pragma once
#if defined(OS_LINUX) #if defined(OS_LINUX)
#include <pthread.h> #include <pthread.h>
#include "cef_types_linux.h" #include "include/internal/cef_types_linux.h"
#include "cef_types_wrappers.h" #include "include/internal/cef_types_wrappers.h"
// Atomic increment and decrement. // 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); 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); return __sync_sub_and_fetch(pDest, 1);
} }
// Critical section wrapper. // Critical section wrapper.
class CefCriticalSection class CefCriticalSection {
{
public: public:
CefCriticalSection() CefCriticalSection() {
{
pthread_mutexattr_init(&attr_); pthread_mutexattr_init(&attr_);
pthread_mutexattr_settype(&attr_, PTHREAD_MUTEX_RECURSIVE); pthread_mutexattr_settype(&attr_, PTHREAD_MUTEX_RECURSIVE);
pthread_mutex_init(&lock_, &attr_); pthread_mutex_init(&lock_, &attr_);
} }
virtual ~CefCriticalSection() virtual ~CefCriticalSection() {
{
pthread_mutex_destroy(&lock_); pthread_mutex_destroy(&lock_);
pthread_mutexattr_destroy(&attr_); pthread_mutexattr_destroy(&attr_);
} }
void Lock() void Lock() {
{
pthread_mutex_lock(&lock_); pthread_mutex_lock(&lock_);
} }
void Unlock() void Unlock() {
{
pthread_mutex_unlock(&lock_); pthread_mutex_unlock(&lock_);
} }
@ -84,25 +78,23 @@ struct CefWindowInfoTraits {
static inline void init(struct_type* s) {} static inline void init(struct_type* s) {}
static inline void clear(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_Widget = src->m_Widget; target->m_Widget = src->m_Widget;
target->m_ParentWidget = src->m_ParentWidget; target->m_ParentWidget = src->m_ParentWidget;
} }
}; };
// Class representing window information. // Class representing window information.
class CefWindowInfo : public CefStructBase<CefWindowInfoTraits> class CefWindowInfo : public CefStructBase<CefWindowInfoTraits> {
{
public: public:
typedef CefStructBase<CefWindowInfoTraits> parent; typedef CefStructBase<CefWindowInfoTraits> parent;
CefWindowInfo() : parent() {} CefWindowInfo() : parent() {}
CefWindowInfo(const cef_window_info_t& r) : parent(r) {} explicit CefWindowInfo(const cef_window_info_t& r) : parent(r) {}
CefWindowInfo(const CefWindowInfo& r) : parent(r) {} explicit CefWindowInfo(const CefWindowInfo& r) : parent(r) {}
void SetAsChild(CefWindowHandle ParentWidget) void SetAsChild(CefWindowHandle ParentWidget) {
{
m_ParentWidget = ParentWidget; m_ParentWidget = ParentWidget;
} }
}; };
@ -113,8 +105,8 @@ struct CefPrintInfoTraits {
static inline void init(struct_type* s) {} static inline void init(struct_type* s) {}
static inline void clear(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; target->m_Scale = src->m_Scale;
} }
}; };
@ -124,4 +116,4 @@ typedef CefStructBase<CefPrintInfoTraits> CefPrintInfo;
#endif // OS_LINUX #endif // OS_LINUX
#endif // _CEF_LINUX_H #endif // CEF_INCLUDE_INTERNAL_CEF_LINUX_H_

View File

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

View File

@ -28,11 +28,12 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_NPLUGIN_TYPES_H #ifndef CEF_INCLUDE_INTERNAL_CEF_NPLUGIN_TYPES_H_
#define _CEF_NPLUGIN_TYPES_H #define CEF_INCLUDE_INTERNAL_CEF_NPLUGIN_TYPES_H_
#pragma once
#include "cef_export.h" #include "include/internal/cef_export.h"
#include "cef_string.h" #include "include/internal/cef_string.h"
#include "third_party/npapi/bindings/npapi.h" #include "third_party/npapi/bindings/npapi.h"
#include "third_party/npapi/bindings/nphostapi.h" #include "third_party/npapi/bindings/nphostapi.h"
@ -86,4 +87,4 @@ typedef struct _cef_plugin_info_t {
} }
#endif #endif
#endif // _CEF_NPLUGIN_TYPES_H #endif // CEF_INCLUDE_INTERNAL_CEF_NPLUGIN_TYPES_H_

View File

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

View File

@ -27,8 +27,9 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_STRING_H #ifndef CEF_INCLUDE_INTERNAL_CEF_STRING_H_
#define _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 // 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. // all but one of the CEF_STRING_TYPE_* defines below to specify the default.
@ -44,10 +45,10 @@
// #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 #ifdef __cplusplus
#include "cef_string_wrappers.h" #include "include/internal/cef_string_wrappers.h"
#if defined(CEF_STRING_TYPE_UTF16) #if defined(CEF_STRING_TYPE_UTF16)
typedef CefStringUTF16 CefString; typedef CefStringUTF16 CefString;
#elif defined(CEF_STRING_TYPE_UTF8) #elif defined(CEF_STRING_TYPE_UTF8)
@ -109,4 +110,4 @@ typedef cef_string_userfree_wide_t cef_string_userfree_t;
#error Please choose a string type. #error Please choose a string type.
#endif #endif
#endif // _CEF_STRING_H #endif // CEF_INCLUDE_INTERNAL_CEF_STRING_H_

View File

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

View File

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

View File

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

View File

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

View File

@ -27,15 +27,18 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_STRING_WRAPPERS_H #ifndef CEF_INCLUDE_INTERNAL_CEF_STRING_WRAPPERS_H_
#define _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 #ifdef BUILDING_CEF_SHARED
#include "base/string16.h" #include "base/string16.h"
#endif #endif
#include <memory.h>
#include <string>
/// ///
// Traits implementation for wide character strings. // Traits implementation for wide character strings.
@ -47,22 +50,24 @@ struct CefStringTraitsWide {
static inline void clear(struct_type *s) { cef_string_wide_clear(s); } static inline void clear(struct_type *s) { cef_string_wide_clear(s); }
static inline int set(const char_type* src, size_t src_size, static inline int set(const char_type* src, size_t src_size,
struct_type *output, int copy) struct_type* output, int copy) {
{ return cef_string_wide_set(src, src_size, output, 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 int compare(const struct_type* s1, const struct_type* s2) {
static inline userfree_struct_type userfree_alloc() return cef_string_wide_cmp(s1, s2);
{ return cef_string_userfree_wide_alloc(); } }
static inline void userfree_free(userfree_struct_type ufs) static inline userfree_struct_type userfree_alloc() {
{ return cef_string_userfree_wide_free(ufs); } return cef_string_userfree_wide_alloc();
}
static inline void userfree_free(userfree_struct_type ufs) {
return cef_string_userfree_wide_free(ufs);
}
// Conversion methods. // 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; 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; cef_string_utf8_t cstr;
memset(&cstr, 0, sizeof(cstr)); memset(&cstr, 0, sizeof(cstr));
cef_string_wide_to_utf8(s->str, s->length, &cstr); cef_string_wide_to_utf8(s->str, s->length, &cstr);
@ -72,23 +77,19 @@ struct CefStringTraitsWide {
cef_string_utf8_clear(&cstr); cef_string_utf8_clear(&cstr);
return str; 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; 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); 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) ? return cef_string_wide_set(str.c_str(), str.length(), s, true) ?
true : false; true : false;
} }
#if defined(BUILDING_CEF_SHARED) #if defined(BUILDING_CEF_SHARED)
#if defined(WCHAR_T_IS_UTF32) #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; cef_string_utf16_t cstr;
memset(&cstr, 0, sizeof(cstr)); memset(&cstr, 0, sizeof(cstr));
cef_string_wide_to_utf16(s->str, s->length, &cstr); cef_string_wide_to_utf16(s->str, s->length, &cstr);
@ -98,18 +99,15 @@ struct CefStringTraitsWide {
cef_string_utf16_clear(&cstr); cef_string_utf16_clear(&cstr);
return str; 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) ? return cef_string_utf16_to_wide(str.c_str(), str.length(), s) ?
true : false; true : false;
} }
#else // WCHAR_T_IS_UTF32 #else // WCHAR_T_IS_UTF32
static inline string16 to_string16(const struct_type *s) static inline string16 to_string16(const struct_type *s) {
{
return string16(s->str, s->length); 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) ? return cef_string_wide_set(str.c_str(), str.length(), s, true) ?
true : false; true : false;
} }
@ -127,30 +125,30 @@ struct CefStringTraitsUTF8 {
static inline void clear(struct_type *s) { cef_string_utf8_clear(s); } static inline void clear(struct_type *s) { cef_string_utf8_clear(s); }
static inline int set(const char_type* src, size_t src_size, static inline int set(const char_type* src, size_t src_size,
struct_type *output, int copy) struct_type* output, int copy) {
{ return cef_string_utf8_set(src, src_size, output, 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 int compare(const struct_type* s1, const struct_type* s2) {
static inline userfree_struct_type userfree_alloc() return cef_string_utf8_cmp(s1, s2);
{ return cef_string_userfree_utf8_alloc(); } }
static inline void userfree_free(userfree_struct_type ufs) static inline userfree_struct_type userfree_alloc() {
{ return cef_string_userfree_utf8_free(ufs); } return cef_string_userfree_utf8_alloc();
}
static inline void userfree_free(userfree_struct_type ufs) {
return cef_string_userfree_utf8_free(ufs);
}
// Conversion methods. // 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; 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); 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; 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; cef_string_wide_t cstr;
memset(&cstr, 0, sizeof(cstr)); memset(&cstr, 0, sizeof(cstr));
cef_string_utf8_to_wide(s->str, s->length, &cstr); cef_string_utf8_to_wide(s->str, s->length, &cstr);
@ -160,13 +158,11 @@ struct CefStringTraitsUTF8 {
cef_string_wide_clear(&cstr); cef_string_wide_clear(&cstr);
return str; 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; return cef_string_wide_to_utf8(str.c_str(), str.length(), s) ? true : false;
} }
#if defined(BUILDING_CEF_SHARED) #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; cef_string_utf16_t cstr;
memset(&cstr, 0, sizeof(cstr)); memset(&cstr, 0, sizeof(cstr));
cef_string_utf8_to_utf16(s->str, s->length, &cstr); cef_string_utf8_to_utf16(s->str, s->length, &cstr);
@ -176,8 +172,7 @@ struct CefStringTraitsUTF8 {
cef_string_utf16_clear(&cstr); cef_string_utf16_clear(&cstr);
return str; 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) ? return cef_string_utf16_to_utf8(str.c_str(), str.length(), s) ?
true : false; true : false;
} }
@ -194,22 +189,24 @@ struct CefStringTraitsUTF16 {
static inline void clear(struct_type *s) { cef_string_utf16_clear(s); } static inline void clear(struct_type *s) { cef_string_utf16_clear(s); }
static inline int set(const char_type* src, size_t src_size, static inline int set(const char_type* src, size_t src_size,
struct_type *output, int copy) struct_type* output, int copy) {
{ return cef_string_utf16_set(src, src_size, output, 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 int compare(const struct_type* s1, const struct_type* s2) {
static inline userfree_struct_type userfree_alloc() return cef_string_utf16_cmp(s1, s2);
{ return cef_string_userfree_utf16_alloc(); } }
static inline void userfree_free(userfree_struct_type ufs) static inline userfree_struct_type userfree_alloc() {
{ return cef_string_userfree_utf16_free(ufs); } return cef_string_userfree_utf16_alloc();
}
static inline void userfree_free(userfree_struct_type ufs) {
return cef_string_userfree_utf16_free(ufs);
}
// Conversion methods. // 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; 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; cef_string_utf8_t cstr;
memset(&cstr, 0, sizeof(cstr)); memset(&cstr, 0, sizeof(cstr));
cef_string_utf16_to_utf8(s->str, s->length, &cstr); cef_string_utf16_to_utf8(s->str, s->length, &cstr);
@ -219,14 +216,12 @@ struct CefStringTraitsUTF16 {
cef_string_utf8_clear(&cstr); cef_string_utf8_clear(&cstr);
return str; 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) ? return cef_string_utf8_to_utf16(str.c_str(), str.length(), s) ?
true : false; true : false;
} }
#if defined(WCHAR_T_IS_UTF32) #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; cef_string_wide_t cstr;
memset(&cstr, 0, sizeof(cstr)); memset(&cstr, 0, sizeof(cstr));
cef_string_utf16_to_wide(s->str, s->length, &cstr); cef_string_utf16_to_wide(s->str, s->length, &cstr);
@ -236,29 +231,24 @@ struct CefStringTraitsUTF16 {
cef_string_wide_clear(&cstr); cef_string_wide_clear(&cstr);
return str; 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) ? return cef_string_wide_to_utf16(str.c_str(), str.length(), s) ?
true : false; true : false;
} }
#else // WCHAR_T_IS_UTF32 #else // WCHAR_T_IS_UTF32
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); 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) ? return cef_string_utf16_set(str.c_str(), str.length(), s, true) ?
true : false; true : false;
} }
#endif // WCHAR_T_IS_UTF32 #endif // WCHAR_T_IS_UTF32
#if defined(BUILDING_CEF_SHARED) #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); 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) ? return cef_string_utf16_set(str.c_str(), str.length(), s, true) ?
true : false; true : false;
} }
@ -308,28 +298,38 @@ public:
/// ///
// Create a new string from an existing string. Data will always be copied. // Create a new string from an existing string. Data will always be copied.
/// ///
CefStringBase(const CefStringBase& str) : string_(NULL), owner_(false) CefStringBase(const CefStringBase& str)
{ FromString(str.c_str(), str.length(), true); } : string_(NULL), owner_(false) {
FromString(str.c_str(), str.length(), true);
}
/// ///
// Create a new string from an existing std::string. Data will be always // Create a new string from an existing std::string. Data will be always
// copied. Translation will occur if necessary based on the underlying string // copied. Translation will occur if necessary based on the underlying string
// type. // type.
/// ///
CefStringBase(const std::string& src) : string_(NULL), owner_(false) CefStringBase(const std::string& src) // NOLINT(runtime/explicit)
{ FromString(src); } : string_(NULL), owner_(false) {
CefStringBase(const char* src) : string_(NULL), owner_(false) FromString(src);
{ FromString(std::string(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 // Create a new string from an existing std::wstring. Data will be always
// copied. Translation will occur if necessary based on the underlying string // copied. Translation will occur if necessary based on the underlying string
// type. // type.
/// ///
CefStringBase(const std::wstring& src) : string_(NULL), owner_(false) CefStringBase(const std::wstring& src) // NOLINT(runtime/explicit)
{ FromWString(src); } : string_(NULL), owner_(false) {
CefStringBase(const wchar_t* src) : string_(NULL), owner_(false) FromWString(src);
{ FromWString(std::wstring(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)) #if (defined(BUILDING_CEF_SHARED) && defined(WCHAR_T_IS_UTF32))
/// ///
@ -337,10 +337,14 @@ public:
// copied. Translation will occur if necessary based on the underlying string // copied. Translation will occur if necessary based on the underlying string
// type. // type.
/// ///
CefStringBase(const string16& src) : string_(NULL), owner_(false) CefStringBase(const string16& src) // NOLINT(runtime/explicit)
{ FromString16(src); } : string_(NULL), owner_(false) {
CefStringBase(const char16* src) : string_(NULL), owner_(false) FromString16(src);
{ FromString16(string16(src)); } }
CefStringBase(const char16* src) // NOLINT(runtime/explicit)
: string_(NULL), owner_(false) {
FromString16(string16(src));
}
#endif // BUILDING_CEF_SHARED && WCHAR_T_IS_UTF32 #endif // BUILDING_CEF_SHARED && WCHAR_T_IS_UTF32
/// ///
@ -350,16 +354,17 @@ public:
// and will not be freed by this class. // and will not be freed by this class.
/// ///
CefStringBase(const char_type* src, size_t src_len, bool copy) CefStringBase(const char_type* src, size_t src_len, bool copy)
: string_(NULL), owner_(false) : string_(NULL), owner_(false) {
{ FromString(src, src_len, copy); } FromString(src, src_len, copy);
}
/// ///
// Create a new string referencing an existing string structure without taking // Create a new string referencing an existing string structure without taking
// ownership. Referenced structures must exist for the lifetime of this class // ownership. Referenced structures must exist for the lifetime of this class
// and will not be freed by 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) if (!src)
return; return;
// Reference the existing structure without taking ownership. // Reference the existing structure without taking ownership.
@ -395,8 +400,7 @@ public:
/// ///
// Compare this string to the specified string. // Compare this string to the specified string.
/// ///
int compare(const CefStringBase& str) const int compare(const CefStringBase& str) const {
{
if (empty() && str.empty()) if (empty() && str.empty())
return 0; return 0;
if (empty()) if (empty())
@ -409,8 +413,7 @@ public:
/// ///
// Clear the string data. // Clear the string data.
/// ///
void clear() void clear() {
{
if (!empty()) if (!empty())
traits::clear(string_); traits::clear(string_);
} }
@ -433,8 +436,7 @@ public:
// Returns a writable pointer to the underlying string structure. Will never // Returns a writable pointer to the underlying string structure. Will never
// return NULL. // return NULL.
/// ///
struct_type* GetWritableStruct() struct_type* GetWritableStruct() {
{
AllocIfNeeded(); AllocIfNeeded();
return string_; return string_;
} }
@ -443,8 +445,7 @@ public:
// Clear the state of this class. The underlying string structure and data // Clear the state of this class. The underlying string structure and data
// will be freed if this class owns the structure. // will be freed if this class owns the structure.
/// ///
void ClearAndFree() void ClearAndFree() {
{
if (!string_) if (!string_)
return; return;
if (owner_) { if (owner_) {
@ -459,8 +460,7 @@ public:
// Attach to the specified string structure. If |owner| is true this class // Attach to the specified string structure. If |owner| is true this class
// will take ownership of the structure. // 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. // Free the previous structure and data, if any.
ClearAndFree(); ClearAndFree();
@ -473,8 +473,7 @@ public:
// userfree structure itself will be freed. Only use this method with userfree // userfree structure itself will be freed. Only use this method with userfree
// structures. // structures.
/// ///
void AttachToUserFree(userfree_struct_type str) void AttachToUserFree(userfree_struct_type str) {
{
// Free the previous structure and data, if any. // Free the previous structure and data, if any.
ClearAndFree(); ClearAndFree();
@ -495,8 +494,7 @@ public:
// this method if you already hold a pointer to the underlying string // this method if you already hold a pointer to the underlying string
// structure. // structure.
/// ///
void Detach() void Detach() {
{
string_ = NULL; string_ = NULL;
owner_ = false; owner_ = false;
} }
@ -506,8 +504,7 @@ public:
// data. This class will be disassociated from the data. May return NULL if // data. This class will be disassociated from the data. May return NULL if
// this string class currently contains no data. // this string class currently contains no data.
/// ///
userfree_struct_type DetachToUserFree() userfree_struct_type DetachToUserFree() {
{
if (empty()) if (empty())
return NULL; return NULL;
@ -527,8 +524,7 @@ public:
// existing data. Referenced data must exist for the lifetime of this class // existing data. Referenced data must exist for the lifetime of this class
// and will not be freed by 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) { if (src == NULL || src_len == 0) {
clear(); clear();
return true; return true;
@ -542,8 +538,7 @@ public:
// copied. Translation will occur if necessary based on the underlying string // copied. Translation will occur if necessary based on the underlying string
// type. // type.
/// ///
bool FromASCII(const char* str) bool FromASCII(const char* str) {
{
size_t len = str ? strlen(str) : 0; size_t len = str ? strlen(str) : 0;
if (len == 0) { if (len == 0) {
clear(); clear();
@ -557,8 +552,7 @@ public:
// Return this string's data as a std::string. Translation will occur if // Return this string's data as a std::string. Translation will occur if
// necessary based on the underlying string type. // necessary based on the underlying string type.
/// ///
std::string ToString() const std::string ToString() const {
{
if (empty()) if (empty())
return std::string(); return std::string();
return traits::to_string(string_); return traits::to_string(string_);
@ -569,8 +563,7 @@ public:
// copied. Translation will occur if necessary based on the underlying string // copied. Translation will occur if necessary based on the underlying string
// type. // type.
/// ///
bool FromString(const std::string& str) bool FromString(const std::string& str) {
{
if (str.empty()) { if (str.empty()) {
clear(); clear();
return true; return true;
@ -583,8 +576,7 @@ public:
// Return this string's data as a std::wstring. Translation will occur if // Return this string's data as a std::wstring. Translation will occur if
// necessary based on the underlying string type. // necessary based on the underlying string type.
/// ///
std::wstring ToWString() const std::wstring ToWString() const {
{
if (empty()) if (empty())
return std::wstring(); return std::wstring();
return traits::to_wstring(string_); return traits::to_wstring(string_);
@ -595,8 +587,7 @@ public:
// copied. Translation will occur if necessary based on the underlying string // copied. Translation will occur if necessary based on the underlying string
// type. // type.
/// ///
bool FromWString(const std::wstring& str) bool FromWString(const std::wstring& str) {
{
if (str.empty()) { if (str.empty()) {
clear(); clear();
return true; return true;
@ -609,8 +600,7 @@ public:
// Return this string's data as a string16. Translation will occur if // Return this string's data as a string16. Translation will occur if
// necessary based on the underlying string type. // necessary based on the underlying string type.
/// ///
string16 ToString16() const string16 ToString16() const {
{
if (empty()) if (empty())
return string16(); return string16();
return traits::to_string16(string_); return traits::to_string16(string_);
@ -621,8 +611,7 @@ public:
// copied. Translation will occur if necessary based on the underlying string // copied. Translation will occur if necessary based on the underlying string
// type. // type.
/// ///
bool FromString16(const string16& str) bool FromString16(const string16& str) {
{
if (str.empty()) { if (str.empty()) {
clear(); clear();
return true; return true;
@ -635,46 +624,71 @@ public:
/// ///
// Comparison operator overloads. // Comparison operator overloads.
/// ///
bool operator<(const CefStringBase& str) const bool operator<(const CefStringBase& str) const {
{ return (compare(str) < 0); } return (compare(str) < 0);
bool operator<=(const CefStringBase& str) const }
{ return (compare(str) <= 0); } bool operator<=(const CefStringBase& str) const {
bool operator>(const CefStringBase& str) const return (compare(str) <= 0);
{ return (compare(str) > 0); } }
bool operator>=(const CefStringBase& str) const bool operator>(const CefStringBase& str) const {
{ return (compare(str) >= 0); } return (compare(str) > 0);
bool operator==(const CefStringBase& str) const }
{ return (compare(str) == 0); } bool operator>=(const CefStringBase& str) const {
bool operator!=(const CefStringBase& str) const return (compare(str) >= 0);
{ 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. // Assignment operator overloads.
/// ///
CefStringBase& operator=(const CefStringBase& str) CefStringBase& operator=(const CefStringBase& str) {
{ FromString(str.c_str(), str.length(), true); return *this; } FromString(str.c_str(), str.length(), true);
operator std::string() const { return ToString(); } return *this;
CefStringBase& operator=(const std::string& str) }
{ FromString(str); return *this; } operator std::string() const {
CefStringBase& operator=(const char* str) return ToString();
{ FromString(std::string(str)); return *this; } }
operator std::wstring() const { return ToWString(); } CefStringBase& operator=(const std::string& str) {
CefStringBase& operator=(const std::wstring& str) FromString(str);
{ FromWString(str); return *this; } return *this;
CefStringBase& operator=(const wchar_t* str) }
{ FromWString(std::wstring(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)) #if (defined(BUILDING_CEF_SHARED) && defined(WCHAR_T_IS_UTF32))
operator string16() const { return ToString16(); } operator string16() const {
CefStringBase& operator=(const string16& str) return ToString16();
{ FromString16(str); return *this; } }
CefStringBase& operator=(const char16* str) CefStringBase& operator=(const string16& str) {
{ FromString16(string16(str)); return *this; } FromString16(str);
return *this;
}
CefStringBase& operator=(const char16* str) {
FromString16(string16(str));
return *this;
}
#endif // BUILDING_CEF_SHARED && WCHAR_T_IS_UTF32 #endif // BUILDING_CEF_SHARED && WCHAR_T_IS_UTF32
private: private:
// Allocate the string structure if it doesn't already exist. // Allocate the string structure if it doesn't already exist.
void AllocIfNeeded() void AllocIfNeeded() {
{
if (string_ == NULL) { if (string_ == NULL) {
string_ = new struct_type; string_ = new struct_type;
memset(string_, 0, sizeof(struct_type)); memset(string_, 0, sizeof(struct_type));
@ -691,4 +705,4 @@ typedef CefStringBase<CefStringTraitsWide> CefStringWide;
typedef CefStringBase<CefStringTraitsUTF8> CefStringUTF8; typedef CefStringBase<CefStringTraitsUTF8> CefStringUTF8;
typedef CefStringBase<CefStringTraitsUTF16> CefStringUTF16; typedef CefStringBase<CefStringTraitsUTF16> CefStringUTF16;
#endif // _CEF_STRING_WRAPPERS_H #endif // CEF_INCLUDE_INTERNAL_CEF_STRING_WRAPPERS_H_

View File

@ -27,21 +27,21 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_TIME_H #ifndef CEF_INCLUDE_INTERNAL_CEF_TIME_H_
#define _CEF_TIME_H #define CEF_INCLUDE_INTERNAL_CEF_TIME_H_
#pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "cef_export.h" #include "include/internal/cef_export.h"
#include <time.h> #include <time.h>
/// ///
// Time information. Values should always be in UTC. // 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 year; // Four digit year "2007"
int month; // 1-based month (values 1 = January, etc.) int month; // 1-based month (values 1 = January, etc.)
#if !defined(OS_MACOSX) #if !defined(OS_MACOSX)
@ -75,4 +75,4 @@ CEF_EXPORT int cef_time_from_doublet(double time, cef_time_t* cef_time);
} }
#endif #endif
#endif // _CEF_TIME_H #endif // CEF_INCLUDE_INTERNAL_CEF_TIME_H_

View File

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

View File

@ -28,31 +28,37 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_TYPES_H #ifndef CEF_INCLUDE_INTERNAL_CEF_TYPES_H_
#define _CEF_TYPES_H #define CEF_INCLUDE_INTERNAL_CEF_TYPES_H_
#pragma once
#include "cef_build.h" #include "include/internal/cef_build.h"
#include "cef_string.h" #include "include/internal/cef_string.h"
#include "cef_string_list.h" #include "include/internal/cef_string_list.h"
#include "cef_time.h" #include "include/internal/cef_time.h"
// Bring in platform-specific definitions. // Bring in platform-specific definitions.
#if defined(OS_WIN) #if defined(OS_WIN)
#include "cef_types_win.h" #include "include/internal/cef_types_win.h"
#elif defined(OS_MACOSX) #elif defined(OS_MACOSX)
#include "cef_types_mac.h" #include "include/internal/cef_types_mac.h"
#elif defined(OS_LINUX) #elif defined(OS_LINUX)
#include "cef_types_linux.h" #include "include/internal/cef_types_linux.h"
#endif #endif
// The NSPR system headers define 64-bit as |long| when possible. In order to #include <stddef.h> // For size_t
// not have typedef mismatches, we do the same on LP64.
#if __LP64__ // The NSPR system headers define 64-bit as |long| when possible, except on
typedef long int64; // Mac OS X. In order to not have typedef mismatches, we do the same on LP64.
typedef unsigned long uint64; //
// 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 #else
typedef long long int64; typedef long long int64; // NOLINT(runtime/int)
typedef unsigned long long uint64; typedef unsigned long long uint64; // NOLINT(runtime/int)
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
@ -62,8 +68,7 @@ extern "C" {
/// ///
// Log severity levels. // Log severity levels.
/// ///
enum cef_log_severity_t enum cef_log_severity_t {
{
LOGSEVERITY_VERBOSE = -1, LOGSEVERITY_VERBOSE = -1,
LOGSEVERITY_INFO, LOGSEVERITY_INFO,
LOGSEVERITY_WARNING, LOGSEVERITY_WARNING,
@ -77,8 +82,7 @@ enum cef_log_severity_t
// Initialization settings. Specify NULL or 0 to get the recommended default // Initialization settings. Specify NULL or 0 to get the recommended default
// values. // values.
/// ///
typedef struct _cef_settings_t typedef struct _cef_settings_t {
{
/// ///
// Size of this structure. // Size of this structure.
/// ///
@ -173,8 +177,7 @@ typedef struct _cef_settings_t
// default values. The consequences of using custom values may not be well // default values. The consequences of using custom values may not be well
// tested. // tested.
/// ///
typedef struct _cef_browser_settings_t typedef struct _cef_browser_settings_t {
{
/// ///
// Size of this structure. // Size of this structure.
/// ///
@ -419,8 +422,7 @@ typedef struct _cef_browser_settings_t
/// ///
// URL component parts. // URL component parts.
/// ///
typedef struct _cef_urlparts_t typedef struct _cef_urlparts_t {
{
/// ///
// The complete URL specification. // The complete URL specification.
/// ///
@ -466,8 +468,7 @@ typedef struct _cef_urlparts_t
/// ///
// Cookie information. // Cookie information.
/// ///
typedef struct _cef_cookie_t typedef struct _cef_cookie_t {
{
/// ///
// The cookie name. // The cookie name.
/// ///
@ -523,8 +524,7 @@ typedef struct _cef_cookie_t
/// ///
// Storage types. // Storage types.
/// ///
enum cef_storage_type_t enum cef_storage_type_t {
{
ST_LOCALSTORAGE = 0, ST_LOCALSTORAGE = 0,
ST_SESSIONSTORAGE, ST_SESSIONSTORAGE,
}; };
@ -532,8 +532,7 @@ enum cef_storage_type_t
/// ///
// Mouse button types. // Mouse button types.
/// ///
enum cef_mouse_button_type_t enum cef_mouse_button_type_t {
{
MBT_LEFT = 0, MBT_LEFT = 0,
MBT_MIDDLE, MBT_MIDDLE,
MBT_RIGHT, MBT_RIGHT,
@ -542,8 +541,7 @@ enum cef_mouse_button_type_t
/// ///
// Key types. // Key types.
/// ///
enum cef_key_type_t enum cef_key_type_t {
{
KT_KEYUP = 0, KT_KEYUP = 0,
KT_KEYDOWN, KT_KEYDOWN,
KT_CHAR, KT_CHAR,
@ -552,8 +550,7 @@ enum cef_key_type_t
/// ///
// Various browser navigation types supported by chrome. // Various browser navigation types supported by chrome.
/// ///
enum cef_handler_navtype_t enum cef_handler_navtype_t {
{
NAVTYPE_LINKCLICKED = 0, NAVTYPE_LINKCLICKED = 0,
NAVTYPE_FORMSUBMITTED, NAVTYPE_FORMSUBMITTED,
NAVTYPE_BACKFORWARD, NAVTYPE_BACKFORWARD,
@ -567,8 +564,7 @@ enum cef_handler_navtype_t
// Supported error code values. See net\base\net_error_list.h for complete // Supported error code values. See net\base\net_error_list.h for complete
// descriptions of the error codes. // descriptions of the error codes.
/// ///
enum cef_handler_errorcode_t enum cef_handler_errorcode_t {
{
ERR_FAILED = -2, ERR_FAILED = -2,
ERR_ABORTED = -3, ERR_ABORTED = -3,
ERR_INVALID_ARGUMENT = -4, ERR_INVALID_ARGUMENT = -4,
@ -624,8 +620,7 @@ enum cef_handler_errorcode_t
// destination. These constants match their equivalents in WebCore's // destination. These constants match their equivalents in WebCore's
// DragActions.h and should not be renumbered. // 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_NONE = 0,
DRAG_OPERATION_COPY = 1, DRAG_OPERATION_COPY = 1,
DRAG_OPERATION_LINK = 2, DRAG_OPERATION_LINK = 2,
@ -639,8 +634,7 @@ enum cef_drag_operations_mask_t
/// ///
// V8 access control values. // V8 access control values.
/// ///
enum cef_v8_accesscontrol_t enum cef_v8_accesscontrol_t {
{
V8_ACCESS_CONTROL_DEFAULT = 0, V8_ACCESS_CONTROL_DEFAULT = 0,
V8_ACCESS_CONTROL_ALL_CAN_READ = 1, V8_ACCESS_CONTROL_ALL_CAN_READ = 1,
V8_ACCESS_CONTROL_ALL_CAN_WRITE = 1 << 1, V8_ACCESS_CONTROL_ALL_CAN_WRITE = 1 << 1,
@ -650,8 +644,7 @@ enum cef_v8_accesscontrol_t
/// ///
// V8 property attribute values. // V8 property attribute values.
/// ///
enum cef_v8_propertyattribute_t enum cef_v8_propertyattribute_t {
{
V8_PROPERTY_ATTRIBUTE_NONE = 0, // Writeable, Enumerable, V8_PROPERTY_ATTRIBUTE_NONE = 0, // Writeable, Enumerable,
// Configurable // Configurable
V8_PROPERTY_ATTRIBUTE_READONLY = 1 << 0, // Not writeable V8_PROPERTY_ATTRIBUTE_READONLY = 1 << 0, // Not writeable
@ -662,8 +655,7 @@ enum cef_v8_propertyattribute_t
/// ///
// Structure representing menu information. // Structure representing menu information.
/// ///
typedef struct _cef_menu_info_t typedef struct _cef_menu_info_t {
{
/// ///
// Values from the cef_handler_menutypebits_t enumeration. // Values from the cef_handler_menutypebits_t enumeration.
/// ///
@ -695,8 +687,7 @@ typedef struct _cef_menu_info_t
// The cef_menu_info_t typeFlags value will be a combination of the // The cef_menu_info_t typeFlags value will be a combination of the
// following values. // following values.
/// ///
enum cef_menu_typebits_t enum cef_menu_typebits_t {
{
/// ///
// No node is selected // No node is selected
/// ///
@ -743,8 +734,7 @@ enum cef_menu_typebits_t
// The cef_menu_info_t editFlags value will be a combination of the // The cef_menu_info_t editFlags value will be a combination of the
// following values. // following values.
/// ///
enum cef_menu_capabilitybits_t enum cef_menu_capabilitybits_t {
{
// Values from WebContextMenuData::EditFlags in WebContextMenuData.h // Values from WebContextMenuData::EditFlags in WebContextMenuData.h
MENU_CAN_DO_NONE = 0x0, MENU_CAN_DO_NONE = 0x0,
MENU_CAN_UNDO = 0x1, MENU_CAN_UNDO = 0x1,
@ -763,8 +753,7 @@ enum cef_menu_capabilitybits_t
/// ///
// Supported menu ID values. // Supported menu ID values.
/// ///
enum cef_menu_id_t enum cef_menu_id_t {
{
MENU_ID_NAV_BACK = 10, MENU_ID_NAV_BACK = 10,
MENU_ID_NAV_FORWARD = 11, MENU_ID_NAV_FORWARD = 11,
MENU_ID_NAV_RELOAD = 12, MENU_ID_NAV_RELOAD = 12,
@ -781,8 +770,7 @@ enum cef_menu_id_t
MENU_ID_VIEWSOURCE = 31, MENU_ID_VIEWSOURCE = 31,
}; };
enum cef_paint_element_type_t enum cef_paint_element_type_t {
{
PET_VIEW = 0, PET_VIEW = 0,
PET_POPUP, PET_POPUP,
}; };
@ -790,15 +778,13 @@ enum cef_paint_element_type_t
/// ///
// Post data elements may represent either bytes or files. // 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_EMPTY = 0,
PDE_TYPE_BYTES, PDE_TYPE_BYTES,
PDE_TYPE_FILE, PDE_TYPE_FILE,
}; };
enum cef_weburlrequest_flags_t enum cef_weburlrequest_flags_t {
{
WUR_FLAG_NONE = 0, WUR_FLAG_NONE = 0,
WUR_FLAG_SKIP_CACHE = 0x1, WUR_FLAG_SKIP_CACHE = 0x1,
WUR_FLAG_ALLOW_CACHED_CREDENTIALS = 0x2, WUR_FLAG_ALLOW_CACHED_CREDENTIALS = 0x2,
@ -808,8 +794,7 @@ enum cef_weburlrequest_flags_t
WUR_FLAG_REPORT_RAW_HEADERS = 0x20 WUR_FLAG_REPORT_RAW_HEADERS = 0x20
}; };
enum cef_weburlrequest_state_t enum cef_weburlrequest_state_t {
{
WUR_STATE_UNSENT = 0, WUR_STATE_UNSENT = 0,
WUR_STATE_STARTED = 1, WUR_STATE_STARTED = 1,
WUR_STATE_HEADERS_RECEIVED = 2, WUR_STATE_HEADERS_RECEIVED = 2,
@ -822,8 +807,7 @@ enum cef_weburlrequest_state_t
/// ///
// Focus sources. // Focus sources.
/// ///
enum cef_handler_focus_source_t enum cef_handler_focus_source_t {
{
/// ///
// The source is explicit navigation via the API (LoadURL(), etc). // The source is explicit navigation via the API (LoadURL(), etc).
/// ///
@ -841,8 +825,7 @@ enum cef_handler_focus_source_t
/// ///
// Key event types. // Key event types.
/// ///
enum cef_handler_keyevent_type_t enum cef_handler_keyevent_type_t {
{
KEYEVENT_RAWKEYDOWN = 0, KEYEVENT_RAWKEYDOWN = 0,
KEYEVENT_KEYDOWN, KEYEVENT_KEYDOWN,
KEYEVENT_KEYUP, KEYEVENT_KEYUP,
@ -852,8 +835,7 @@ enum cef_handler_keyevent_type_t
/// ///
// Key event modifiers. // Key event modifiers.
/// ///
enum cef_handler_keyevent_modifiers_t enum cef_handler_keyevent_modifiers_t {
{
KEY_SHIFT = 1 << 0, KEY_SHIFT = 1 << 0,
KEY_CTRL = 1 << 1, KEY_CTRL = 1 << 1,
KEY_ALT = 1 << 2, KEY_ALT = 1 << 2,
@ -863,8 +845,7 @@ enum cef_handler_keyevent_modifiers_t
/// ///
// Structure representing a rectangle. // Structure representing a rectangle.
/// ///
typedef struct _cef_rect_t typedef struct _cef_rect_t {
{
int x; int x;
int y; int y;
int width; int width;
@ -874,8 +855,7 @@ typedef struct _cef_rect_t
/// ///
// Existing thread IDs. // Existing thread IDs.
/// ///
enum cef_thread_id_t enum cef_thread_id_t {
{
TID_UI = 0, TID_UI = 0,
TID_IO = 1, TID_IO = 1,
TID_FILE = 2, TID_FILE = 2,
@ -884,8 +864,7 @@ enum cef_thread_id_t
/// ///
// Paper type for printing. // Paper type for printing.
/// ///
enum cef_paper_type_t enum cef_paper_type_t {
{
PT_LETTER = 0, PT_LETTER = 0,
PT_LEGAL, PT_LEGAL,
PT_EXECUTIVE, PT_EXECUTIVE,
@ -897,8 +876,7 @@ enum cef_paper_type_t
/// ///
// Paper metric information for printing. // Paper metric information for printing.
/// ///
struct cef_paper_metrics struct cef_paper_metrics {
{
enum cef_paper_type_t paper_type; enum cef_paper_type_t paper_type;
// Length and width needed if paper_type is custom_size // Length and width needed if paper_type is custom_size
// Units are in inches. // Units are in inches.
@ -909,8 +887,7 @@ struct cef_paper_metrics
/// ///
// Paper print margins. // Paper print margins.
/// ///
struct cef_print_margins struct cef_print_margins {
{
// Margin size in inches for left/right/top/bottom (this is content margins). // Margin size in inches for left/right/top/bottom (this is content margins).
double left; double left;
double right; double right;
@ -924,8 +901,7 @@ struct cef_print_margins
/// ///
// Page orientation for printing. // Page orientation for printing.
/// ///
enum cef_page_orientation enum cef_page_orientation {
{
PORTRAIT = 0, PORTRAIT = 0,
LANDSCAPE LANDSCAPE
}; };
@ -933,8 +909,7 @@ enum cef_page_orientation
/// ///
// Printing options. // Printing options.
/// ///
typedef struct _cef_print_options_t typedef struct _cef_print_options_t {
{
enum cef_page_orientation page_orientation; enum cef_page_orientation page_orientation;
struct cef_paper_metrics paper_metrics; struct cef_paper_metrics paper_metrics;
struct cef_print_margins paper_margins; struct cef_print_margins paper_margins;
@ -946,8 +921,7 @@ typedef struct _cef_print_options_t
// before being passed to the parser. If a BOM is detected and the correct // before being passed to the parser. If a BOM is detected and the correct
// decoder is available then that decoder will be used automatically. // 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_NONE = 0,
XML_ENCODING_UTF8, XML_ENCODING_UTF8,
XML_ENCODING_UTF16LE, XML_ENCODING_UTF16LE,
@ -958,8 +932,7 @@ enum cef_xml_encoding_type_t
/// ///
// XML node types. // XML node types.
/// ///
enum cef_xml_node_type_t enum cef_xml_node_type_t {
{
XML_NODE_UNSUPPORTED = 0, XML_NODE_UNSUPPORTED = 0,
XML_NODE_PROCESSING_INSTRUCTION, XML_NODE_PROCESSING_INSTRUCTION,
XML_NODE_DOCUMENT_TYPE, XML_NODE_DOCUMENT_TYPE,
@ -976,8 +949,7 @@ enum cef_xml_node_type_t
/// ///
// Status message types. // Status message types.
/// ///
enum cef_handler_statustype_t enum cef_handler_statustype_t {
{
STATUSTYPE_TEXT = 0, STATUSTYPE_TEXT = 0,
STATUSTYPE_MOUSEOVER_URL, STATUSTYPE_MOUSEOVER_URL,
STATUSTYPE_KEYBOARD_FOCUS_URL, STATUSTYPE_KEYBOARD_FOCUS_URL,
@ -986,8 +958,7 @@ enum cef_handler_statustype_t
/// ///
// Popup window features. // Popup window features.
/// ///
typedef struct _cef_popup_features_t typedef struct _cef_popup_features_t {
{
int x; int x;
bool xSet; bool xSet;
int y; int y;
@ -1012,8 +983,7 @@ typedef struct _cef_popup_features_t
/// ///
// DOM document types. // DOM document types.
/// ///
enum cef_dom_document_type_t enum cef_dom_document_type_t {
{
DOM_DOCUMENT_TYPE_UNKNOWN = 0, DOM_DOCUMENT_TYPE_UNKNOWN = 0,
DOM_DOCUMENT_TYPE_HTML, DOM_DOCUMENT_TYPE_HTML,
DOM_DOCUMENT_TYPE_XHTML, DOM_DOCUMENT_TYPE_XHTML,
@ -1023,8 +993,7 @@ enum cef_dom_document_type_t
/// ///
// DOM event category flags. // DOM event category flags.
/// ///
enum cef_dom_event_category_t enum cef_dom_event_category_t {
{
DOM_EVENT_CATEGORY_UNKNOWN = 0x0, DOM_EVENT_CATEGORY_UNKNOWN = 0x0,
DOM_EVENT_CATEGORY_UI = 0x1, DOM_EVENT_CATEGORY_UI = 0x1,
DOM_EVENT_CATEGORY_MOUSE = 0x2, DOM_EVENT_CATEGORY_MOUSE = 0x2,
@ -1050,8 +1019,7 @@ enum cef_dom_event_category_t
/// ///
// DOM event processing phases. // DOM event processing phases.
/// ///
enum cef_dom_event_phase_t enum cef_dom_event_phase_t {
{
DOM_EVENT_PHASE_UNKNOWN = 0, DOM_EVENT_PHASE_UNKNOWN = 0,
DOM_EVENT_PHASE_CAPTURING, DOM_EVENT_PHASE_CAPTURING,
DOM_EVENT_PHASE_AT_TARGET, DOM_EVENT_PHASE_AT_TARGET,
@ -1061,8 +1029,7 @@ enum cef_dom_event_phase_t
/// ///
// DOM node types. // DOM node types.
/// ///
enum cef_dom_node_type_t enum cef_dom_node_type_t {
{
DOM_NODE_TYPE_UNSUPPORTED = 0, DOM_NODE_TYPE_UNSUPPORTED = 0,
DOM_NODE_TYPE_ELEMENT, DOM_NODE_TYPE_ELEMENT,
DOM_NODE_TYPE_ATTRIBUTE, DOM_NODE_TYPE_ATTRIBUTE,
@ -1082,8 +1049,7 @@ enum cef_dom_node_type_t
/// ///
// Proxy types. // Proxy types.
/// ///
enum cef_proxy_type_t enum cef_proxy_type_t {
{
PROXY_TYPE_DIRECT = 0, PROXY_TYPE_DIRECT = 0,
PROXY_TYPE_NAMED, PROXY_TYPE_NAMED,
PROXY_TYPE_PAC_STRING, PROXY_TYPE_PAC_STRING,
@ -1092,8 +1058,7 @@ enum cef_proxy_type_t
/// ///
// Proxy information. // Proxy information.
/// ///
typedef struct _cef_proxy_info_t typedef struct _cef_proxy_info_t {
{
enum cef_proxy_type_t proxyType; enum cef_proxy_type_t proxyType;
cef_string_t proxyList; cef_string_t proxyList;
} cef_proxy_info_t; } cef_proxy_info_t;
@ -1102,4 +1067,4 @@ typedef struct _cef_proxy_info_t
} }
#endif #endif
#endif // _CEF_TYPES_H #endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_H_

View File

@ -28,12 +28,15 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_TYPES_LINUX_H #ifndef CEF_INCLUDE_INTERNAL_CEF_TYPES_LINUX_H_
#define _CEF_TYPES_LINUX_H #define CEF_INCLUDE_INTERNAL_CEF_TYPES_LINUX_H_
#pragma once
#include "include/internal/cef_build.h"
#if defined(OS_LINUX) #if defined(OS_LINUX)
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include "cef_string.h" #include "include/internal/cef_string.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -46,8 +49,7 @@ extern "C" {
/// ///
// Supported graphics implementations. // Supported graphics implementations.
/// ///
enum cef_graphics_implementation_t enum cef_graphics_implementation_t {
{
DESKTOP_IN_PROCESS = 0, DESKTOP_IN_PROCESS = 0,
DESKTOP_IN_PROCESS_COMMAND_BUFFER, DESKTOP_IN_PROCESS_COMMAND_BUFFER,
}; };
@ -55,8 +57,7 @@ enum cef_graphics_implementation_t
/// ///
// Class representing window information. // Class representing window information.
/// ///
typedef struct _cef_window_info_t typedef struct _cef_window_info_t {
{
// Pointer for the parent GtkBox widget. // Pointer for the parent GtkBox widget.
cef_window_handle_t m_ParentWidget; cef_window_handle_t m_ParentWidget;
@ -67,8 +68,7 @@ typedef struct _cef_window_info_t
/// ///
// Class representing print context information. // Class representing print context information.
/// ///
typedef struct _cef_print_info_t typedef struct _cef_print_info_t {
{
double m_Scale; double m_Scale;
} cef_print_info_t; } cef_print_info_t;
@ -78,4 +78,4 @@ typedef struct _cef_print_info_t
#endif // OS_LINUX #endif // OS_LINUX
#endif // _CEF_TYPES_LINUX_H #endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_LINUX_H_

View File

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

View File

@ -28,12 +28,15 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_TYPES_WIN_H #ifndef CEF_INCLUDE_INTERNAL_CEF_TYPES_WIN_H_
#define _CEF_TYPES_WIN_H #define CEF_INCLUDE_INTERNAL_CEF_TYPES_WIN_H_
#pragma once
#include "include/internal/cef_build.h"
#if defined(OS_WIN) #if defined(OS_WIN)
#include <windows.h> #include <windows.h>
#include "cef_string.h" #include "include/internal/cef_string.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -46,8 +49,7 @@ extern "C" {
/// ///
// Supported graphics implementations. // Supported graphics implementations.
/// ///
enum cef_graphics_implementation_t enum cef_graphics_implementation_t {
{
ANGLE_IN_PROCESS = 0, ANGLE_IN_PROCESS = 0,
ANGLE_IN_PROCESS_COMMAND_BUFFER, ANGLE_IN_PROCESS_COMMAND_BUFFER,
DESKTOP_IN_PROCESS, DESKTOP_IN_PROCESS,
@ -57,8 +59,7 @@ enum cef_graphics_implementation_t
/// ///
// Class representing window information. // Class representing window information.
/// ///
typedef struct _cef_window_info_t typedef struct _cef_window_info_t {
{
// Standard parameters required by CreateWindowEx() // Standard parameters required by CreateWindowEx()
DWORD m_dwExStyle; DWORD m_dwExStyle;
cef_string_t m_windowName; cef_string_t m_windowName;
@ -85,8 +86,7 @@ typedef struct _cef_window_info_t
/// ///
// Class representing print context information. // Class representing print context information.
/// ///
typedef struct _cef_print_info_t typedef struct _cef_print_info_t {
{
HDC m_hDC; HDC m_hDC;
RECT m_Rect; RECT m_Rect;
double m_Scale; double m_Scale;
@ -98,4 +98,4 @@ typedef struct _cef_print_info_t
#endif // OS_WIN #endif // OS_WIN
#endif // _CEF_TYPES_WIN_H #endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_WIN_H_

View File

@ -27,12 +27,13 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_TYPES_WRAPPERS_H #ifndef CEF_INCLUDE_INTERNAL_CEF_TYPES_WRAPPERS_H_
#define _CEF_TYPES_WRAPPERS_H #define CEF_INCLUDE_INTERNAL_CEF_TYPES_WRAPPERS_H_
#pragma once
#include "cef_string.h" #include "include/internal/cef_string.h"
#include "cef_string_list.h" #include "include/internal/cef_string_list.h"
#include "cef_types.h" #include "include/internal/cef_types.h"
/// ///
// Template class that provides common functionality for CEF structure wrapping. // Template class that provides common functionality for CEF structure wrapping.
@ -42,25 +43,21 @@ class CefStructBase : public traits::struct_type {
public: public:
typedef typename traits::struct_type struct_type; typedef typename traits::struct_type struct_type;
CefStructBase() : attached_to_(NULL) CefStructBase() : attached_to_(NULL) {
{
Init(); Init();
} }
virtual ~CefStructBase() virtual ~CefStructBase() {
{
// Only clear this object's data if it isn't currently attached to a // Only clear this object's data if it isn't currently attached to a
// structure. // structure.
if (!attached_to_) if (!attached_to_)
Clear(this); Clear(this);
} }
CefStructBase(const CefStructBase& r) CefStructBase(const CefStructBase& r) {
{
Init(); Init();
*this = r; *this = r;
} }
CefStructBase(const struct_type& r) CefStructBase(const struct_type& r) { // NOLINT(runtime/explicit)
{
Init(); Init();
*this = r; *this = r;
} }
@ -68,8 +65,7 @@ public:
/// ///
// Clear this object's values. // Clear this object's values.
/// ///
void Reset() void Reset() {
{
Clear(this); Clear(this);
Init(); Init();
} }
@ -78,8 +74,7 @@ public:
// Attach to the source structure's existing values. DetachTo() can be called // Attach to the source structure's existing values. DetachTo() can be called
// to insert the values back into the existing structure. // 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 // Only clear this object's data if it isn't currently attached to a
// structure. // structure.
if (!attached_to_) if (!attached_to_)
@ -95,8 +90,7 @@ public:
/// ///
// Relinquish ownership of values to the target structure. // Relinquish ownership of values to the target structure.
/// ///
void DetachTo(struct_type& target) void DetachTo(struct_type& target) {
{
if (attached_to_ != &target) { if (attached_to_ != &target) {
// Clear the target structure's values only if we are not currently // Clear the target structure's values only if we are not currently
// attached to that structure. // attached to that structure.
@ -114,25 +108,21 @@ public:
// Set this object's values. If |copy| is true the source structure's values // Set this object's values. If |copy| is true the source structure's values
// will be copied instead of referenced. // 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); traits::set(&source, this, copy);
} }
CefStructBase& operator=(const CefStructBase& s) CefStructBase& operator=(const CefStructBase& s) {
{
return operator=(static_cast<const struct_type&>(s)); return operator=(static_cast<const struct_type&>(s));
} }
CefStructBase& operator=(const struct_type& s) CefStructBase& operator=(const struct_type& s) {
{
Set(s, true); Set(s, true);
return *this; return *this;
} }
protected: protected:
void Init() void Init() {
{
memset(static_cast<struct_type*>(this), 0, sizeof(struct_type)); memset(static_cast<struct_type*>(this), 0, sizeof(struct_type));
attached_to_ = NULL; attached_to_ = NULL;
traits::init(this); traits::init(this);
@ -150,8 +140,8 @@ struct CefRectTraits {
static inline void init(struct_type* s) {} static inline void init(struct_type* s) {}
static inline void clear(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; *target = *src;
} }
}; };
@ -159,33 +149,28 @@ struct CefRectTraits {
/// ///
// Class representing a rectangle. // Class representing a rectangle.
/// ///
class CefRect : public CefStructBase<CefRectTraits> class CefRect : public CefStructBase<CefRectTraits> {
{
public: public:
typedef CefStructBase<CefRectTraits> parent; typedef CefStructBase<CefRectTraits> parent;
CefRect() : parent() {} CefRect() : parent() {}
CefRect(const cef_rect_t& r) : parent(r) {} CefRect(const cef_rect_t& r) : parent(r) {} // NOLINT(runtime/explicit)
CefRect(const CefRect& r) : parent(r) {} CefRect(const CefRect& r) : parent(r) {} // NOLINT(runtime/explicit)
CefRect(int x, int y, int width, int height) : parent() CefRect(int x, int y, int width, int height) : parent() {
{
Set(x, y, width, height); Set(x, y, width, height);
} }
bool IsEmpty() const { return width <= 0 || height <= 0; } 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; 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; 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); return !(a == b);
} }
@ -196,8 +181,8 @@ struct CefPrintOptionsTraits {
static inline void init(struct_type* s) {} static inline void init(struct_type* s) {}
static inline void clear(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; *target = *src;
} }
}; };
@ -212,8 +197,7 @@ typedef CefStructBase<CefPrintOptionsTraits> CefPrintOptions;
struct CefPopupFeaturesTraits { struct CefPopupFeaturesTraits {
typedef cef_popup_features_t struct_type; 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->menuBarVisible = true;
s->statusBarVisible = true; s->statusBarVisible = true;
s->toolBarVisible = true; s->toolBarVisible = true;
@ -222,14 +206,13 @@ struct CefPopupFeaturesTraits {
s->resizable = true; s->resizable = true;
} }
static inline void clear(struct_type* s) static inline void clear(struct_type* s) {
{
if (s->additionalFeatures) if (s->additionalFeatures)
cef_string_list_free(s->additionalFeatures); cef_string_list_free(s->additionalFeatures);
} }
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) {
if (target->additionalFeatures) if (target->additionalFeatures)
cef_string_list_free(target->additionalFeatures); cef_string_list_free(target->additionalFeatures);
target->additionalFeatures = src->additionalFeatures ? target->additionalFeatures = src->additionalFeatures ?
@ -263,13 +246,11 @@ typedef CefStructBase<CefPopupFeaturesTraits> CefPopupFeatures;
struct CefSettingsTraits { struct CefSettingsTraits {
typedef cef_settings_t struct_type; 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); 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->cache_path);
cef_string_clear(&s->user_agent); cef_string_clear(&s->user_agent);
cef_string_clear(&s->product_version); cef_string_clear(&s->product_version);
@ -280,8 +261,8 @@ struct CefSettingsTraits {
cef_string_clear(&s->javascript_flags); cef_string_clear(&s->javascript_flags);
} }
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; target->multi_threaded_message_loop = src->multi_threaded_message_loop;
cef_string_set(src->cache_path.str, src->cache_path.length, cef_string_set(src->cache_path.str, src->cache_path.length,
@ -322,13 +303,11 @@ typedef CefStructBase<CefSettingsTraits> CefSettings;
struct CefBrowserSettingsTraits { struct CefBrowserSettingsTraits {
typedef cef_browser_settings_t struct_type; 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); 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->standard_font_family);
cef_string_clear(&s->fixed_font_family); cef_string_clear(&s->fixed_font_family);
cef_string_clear(&s->serif_font_family); cef_string_clear(&s->serif_font_family);
@ -339,8 +318,8 @@ struct CefBrowserSettingsTraits {
cef_string_clear(&s->user_style_sheet_location); 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->drag_drop_disabled = src->drag_drop_disabled;
target->load_drops_disabled = src->load_drops_disabled; target->load_drops_disabled = src->load_drops_disabled;
target->history_disabled = src->history_disabled; target->history_disabled = src->history_disabled;
@ -432,8 +411,7 @@ struct CefURLPartsTraits {
static inline void init(struct_type* s) {} 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->spec);
cef_string_clear(&s->scheme); cef_string_clear(&s->scheme);
cef_string_clear(&s->username); cef_string_clear(&s->username);
@ -444,8 +422,8 @@ struct CefURLPartsTraits {
cef_string_clear(&s->query); 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->spec.str, src->spec.length, &target->spec, copy);
cef_string_set(src->scheme.str, src->scheme.length, &target->scheme, copy); cef_string_set(src->scheme.str, src->scheme.length, &target->scheme, copy);
cef_string_set(src->username.str, src->username.length, &target->username, cef_string_set(src->username.str, src->username.length, &target->username,
@ -472,8 +450,8 @@ struct CefTimeTraits {
static inline void clear(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; *target = *src;
} }
}; };
@ -481,15 +459,15 @@ struct CefTimeTraits {
/// ///
// Class representing a time. // Class representing a time.
/// ///
class CefTime : public CefStructBase<CefTimeTraits> class CefTime : public CefStructBase<CefTimeTraits> {
{
public: public:
typedef CefStructBase<CefTimeTraits> parent; typedef CefStructBase<CefTimeTraits> parent;
CefTime() : parent() {} CefTime() : parent() {}
CefTime(const cef_time_t& r) : parent(r) {} CefTime(const cef_time_t& r) : parent(r) {} // NOLINT(runtime/explicit)
CefTime(time_t r) : parent() { SetTimeT(r); } CefTime(const CefTime& r) : parent(r) {} // NOLINT(runtime/explicit)
CefTime(double r) : parent() { SetDoubleT(r); } explicit CefTime(time_t r) : parent() { SetTimeT(r); }
explicit CefTime(double r) : parent() { SetDoubleT(r); }
// Converts to/from time_t. // Converts to/from time_t.
void SetTimeT(time_t r) { void SetTimeT(time_t r) {
@ -520,16 +498,15 @@ struct CefCookieTraits {
static inline void init(struct_type* s) {} 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->name);
cef_string_clear(&s->value); cef_string_clear(&s->value);
cef_string_clear(&s->domain); cef_string_clear(&s->domain);
cef_string_clear(&s->path); 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->name.str, src->name.length, &target->name, copy);
cef_string_set(src->value.str, src->value.length, &target->value, 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); cef_string_set(src->domain.str, src->domain.length, &target->domain, copy);
@ -554,8 +531,7 @@ struct CefMenuInfoTraits {
static inline void init(struct_type* s) {} 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->linkUrl);
cef_string_clear(&s->imageUrl); cef_string_clear(&s->imageUrl);
cef_string_clear(&s->pageUrl); cef_string_clear(&s->pageUrl);
@ -565,8 +541,8 @@ struct CefMenuInfoTraits {
cef_string_clear(&s->securityInfo); 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->typeFlags = src->typeFlags;
target->x = src->x; target->x = src->x;
target->y = src->y; target->y = src->y;
@ -601,13 +577,12 @@ struct CefProxyInfoTraits {
static inline void init(struct_type* s) {} 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); 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; target->proxyType = src->proxyType;
cef_string_set(src->proxyList.str, src->proxyList.length, cef_string_set(src->proxyList.str, src->proxyList.length,
&target->proxyList, copy); &target->proxyList, copy);
@ -617,14 +592,12 @@ struct CefProxyInfoTraits {
/// ///
// Class representing the results of proxy resolution. // Class representing the results of proxy resolution.
/// ///
class CefProxyInfo : public CefStructBase<CefProxyInfoTraits> class CefProxyInfo : public CefStructBase<CefProxyInfoTraits> {
{
public: public:
/// ///
// Use a direction connection instead of a proxy. // Use a direction connection instead of a proxy.
/// ///
void UseDirect() void UseDirect() {
{
proxyType = PROXY_TYPE_DIRECT; proxyType = PROXY_TYPE_DIRECT;
} }
@ -637,8 +610,7 @@ public:
// Multiple values may be separated by semicolons or whitespace. For example, // Multiple values may be separated by semicolons or whitespace. For example,
// "foo1:80;foo2:80". // "foo1:80;foo2:80".
/// ///
void UseNamedProxy(const CefString& proxy_uri_list) void UseNamedProxy(const CefString& proxy_uri_list) {
{
proxyType = PROXY_TYPE_NAMED; proxyType = PROXY_TYPE_NAMED;
(CefString(&proxyList)) = proxy_uri_list; (CefString(&proxyList)) = proxy_uri_list;
} }
@ -647,8 +619,7 @@ public:
// Use one or more named proxy servers specified in PAC script format. For // Use one or more named proxy servers specified in PAC script format. For
// example, "PROXY foobar:99; SOCKS fml:2; DIRECT". // 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; proxyType = PROXY_TYPE_PAC_STRING;
(CefString(&proxyList)) = pac_string; (CefString(&proxyList)) = pac_string;
} }
@ -660,4 +631,4 @@ public:
CefString ProxyList() const { return CefString(&proxyList); } CefString ProxyList() const { return CefString(&proxyList); }
}; };
#endif // _CEF_TYPES_WRAPPERS_H #endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_WRAPPERS_H_

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