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,9 +95,8 @@ 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
// system handler will be used. // system handler will be used.
@ -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__)
@ -43,7 +43,7 @@
// Use the existing empty protocol definitions. // Use the existing empty protocol definitions.
#import "base/mac/cocoa_protocols.h" #import "base/mac/cocoa_protocols.h"
#else // BUILDING_CEF_SHARED #else // BUILDING_CEF_SHARED
#import <AppKit/AppKit.h> #import <AppKit/AppKit.h>
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>
@ -88,7 +88,7 @@ DEFINE_EMPTY_PROTOCOL(NSWindowDelegate)
#endif #endif
#endif // BUILDING_CEF_SHARED #endif // BUILDING_CEF_SHARED
// All CEF client applications must subclass NSApplication and implement this // All CEF client applications must subclass NSApplication and implement this
// protocol. // protocol.
@ -99,7 +99,7 @@ DEFINE_EMPTY_PROTOCOL(NSWindowDelegate)
// Controls the state of |isHandlingSendEvent| in the event loop so that it is // Controls the state of |isHandlingSendEvent| in the event loop so that it is
// reset properly. // reset properly.
class CefScopedSendingEvent { class CefScopedSendingEvent {
public: public:
CefScopedSendingEvent() CefScopedSendingEvent()
: app_(static_cast<NSApplication<CefAppProtocol>*>( : app_(static_cast<NSApplication<CefAppProtocol>*>(
[NSApplication sharedApplication])), [NSApplication sharedApplication])),
@ -109,12 +109,12 @@ public:
~CefScopedSendingEvent() { ~CefScopedSendingEvent() {
[app_ setHandlingSendEvent:handling_]; [app_ setHandlingSendEvent:handling_];
} }
private: private:
NSApplication<CefAppProtocol>* app_; NSApplication<CefAppProtocol>* app_;
BOOL handling_; BOOL handling_;
}; };
#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,29 +35,29 @@
// //
#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
// be called for every new copy of a pointer to a given object. The resulting // be called for every new copy of a pointer to a given object. The resulting
@ -79,7 +79,7 @@ public:
/// ///
virtual int GetRefCt() =0; virtual int GetRefCt() =0;
protected: protected:
virtual ~CefBase() {} virtual ~CefBase() {}
}; };
@ -87,11 +87,10 @@ 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) {}
/// ///
// Atomic reference increment. // Atomic reference increment.
/// ///
@ -111,8 +110,8 @@ public:
/// ///
int GetRefCt() { return refct_; } int GetRefCt() { return refct_; }
private: private:
long refct_; long refct_; // NOLINT(runtime/int)
}; };
/// ///
@ -124,7 +123,7 @@ private:
int AddRef() { return refct_.AddRef(); } \ int AddRef() { return refct_.AddRef(); } \
int Release() { \ int Release() { \
int retval = refct_.Release(); \ int retval = refct_.Release(); \
if(retval == 0) \ if (retval == 0) \
delete this; \ delete this; \
return retval; \ return retval; \
} \ } \
@ -138,18 +137,18 @@ private:
// threads. The AutoLock class is a helper that will hold the lock while in // threads. The AutoLock class is a helper that will hold the lock while in
// scope. // scope.
/// ///
#define IMPLEMENT_LOCKING(ClassName) \ #define IMPLEMENT_LOCKING(ClassName) \
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_; \
}; \ }; \
void Lock() { critsec_.Lock(); } \ void Lock() { critsec_.Lock(); } \
void Unlock() { critsec_.Unlock(); } \ void Unlock() { critsec_.Unlock(); } \
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,9 +49,8 @@ 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;
typedef cef_paint_element_type_t PaintElementType; typedef cef_paint_element_type_t PaintElementType;
@ -146,7 +146,7 @@ public:
/// ///
/*--cef()--*/ /*--cef()--*/
virtual CefWindowHandle GetOpenerWindowHandle() =0; virtual CefWindowHandle GetOpenerWindowHandle() =0;
/// ///
// Returns true if the window is a popup window. // Returns true if the window is a popup window.
/// ///
@ -274,7 +274,7 @@ public:
/// ///
// Invalidate the |dirtyRect| region of the view. This method is only used // Invalidate the |dirtyRect| region of the view. This method is only used
// when window rendering is disabled and will result in a call to // when window rendering is disabled and will result in a call to
// HandlePaint(). // HandlePaint().
/// ///
/*--cef()--*/ /*--cef()--*/
virtual void Invalidate(const CefRect& dirtyRect) =0; virtual void Invalidate(const CefRect& dirtyRect) =0;
@ -295,7 +295,7 @@ public:
/// ///
/*--cef()--*/ /*--cef()--*/
virtual void SendKeyEvent(KeyType type, int key, int modifiers, bool sysChar, virtual void SendKeyEvent(KeyType type, int key, int modifiers, bool sysChar,
bool imeChar) =0; bool imeChar) =0;
/// ///
// Send a mouse click event to the browser. The |x| and |y| coordinates are // Send a mouse click event to the browser. The |x| and |y| coordinates are
@ -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>
@ -45,18 +46,17 @@
// Class used to create and/or parse command line arguments. Arguments with // Class used to create and/or parse command line arguments. Arguments with
// '--', '-' and, on Windows, '/' prefixes are considered switches. Switches // '--', '-' and, on Windows, '/' prefixes are considered switches. Switches
// will always precede any arguments without switch prefixes. Switches can // will always precede any arguments without switch prefixes. Switches can
// optionally have a value specified using the '=' delimiter (e.g. // optionally have a value specified using the '=' delimiter (e.g.
// "-switch=value"). An argument of "--" will terminate switch parsing with all // "-switch=value"). An argument of "--" will terminate switch parsing with all
// subsequent tokens, regardless of prefix, being interpreted as non-switch // subsequent tokens, regardless of prefix, being interpreted as non-switch
// arguments. Switch names are considered case-insensitive. This class can be // arguments. Switch names are considered case-insensitive. This class can be
// 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;
/// ///
// Create a new CefCommandLine instance. // Create a new CefCommandLine instance.
@ -118,7 +118,7 @@ public:
virtual CefString GetSwitchValue(const CefString& name) =0; virtual CefString GetSwitchValue(const CefString& name) =0;
/// ///
// Returns the map of switch names and values. If a switch has no value an // Returns the map of switch names and values. If a switch has no value an
// empty string is returned. // empty string is returned.
/// ///
/*--cef()--*/ /*--cef()--*/
@ -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,9 +47,8 @@ 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
// should be modified. // should be modified.
@ -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,9 +96,8 @@ 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
// index for the current cookie. |total| is the total number of cookies. // index for the current cookie. |total| is the total number of cookies.
@ -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,9 +48,8 @@ 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,9 +50,8 @@ 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
// method represents a snapshot of the DOM at the time this method is // method represents a snapshot of the DOM at the time this method is
@ -69,9 +69,8 @@ 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,10 +177,9 @@ 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,9 +354,8 @@ 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,9 +414,8 @@ 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
// contains a snapshot of the DOM at the time this method is executed. DOM // contains a snapshot of the DOM at the time this method is executed. DOM
@ -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,19 +34,19 @@
// 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
// called multiple times until the download is complete. Return |true| to // called multiple times until the download is complete. Return |true| to
@ -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,9 +46,8 @@
// 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,9 +48,8 @@ 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,9 +47,8 @@ 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|
// is the identifier passed to CefBrowser::Find(), |count| is the number of // is the identifier passed to CefBrowser::Find(), |count| is the number of
@ -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,9 +49,8 @@ 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,9 +51,8 @@ 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;
/// ///
@ -151,7 +151,7 @@ public:
// reporting. // reporting.
/// ///
/*--cef(optional_param=scriptUrl)--*/ /*--cef(optional_param=scriptUrl)--*/
virtual void ExecuteJavaScript(const CefString& jsCode, virtual void ExecuteJavaScript(const CefString& jsCode,
const CefString& scriptUrl, const CefString& scriptUrl,
int startLine) =0; int startLine) =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,9 +48,8 @@ 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
// default alert or true if you displayed a custom alert. // default alert or true if you displayed a custom alert.
@ -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,9 +47,8 @@ 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,9 +48,8 @@ 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
// will point to the parent browser window. The |popupFeatures| parameter will // will point to the parent browser window. The |popupFeatures| parameter will
@ -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,9 +48,8 @@ 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,9 +47,8 @@ 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);
@ -114,9 +105,8 @@ public:
return *this; return *this;
} }
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"
/// ///
@ -51,13 +52,13 @@
// XMLHttpRequest requests on http://target.example.com if the // XMLHttpRequest requests on http://target.example.com if the
// http://target.example.com request returns an "Access-Control-Allow-Origin: // http://target.example.com request returns an "Access-Control-Allow-Origin:
// https://source.example.com" response header. // https://source.example.com" response header.
// //
// Scripts in separate frames or iframes and hosted from the same protocol and // Scripts in separate frames or iframes and hosted from the same protocol and
// domain suffix can execute cross-origin JavaScript if both pages set the // domain suffix can execute cross-origin JavaScript if both pages set the
// document.domain value to the same domain suffix. For example, // document.domain value to the same domain suffix. For example,
// scheme://foo.example.com and scheme://bar.example.com can communicate using // scheme://foo.example.com and scheme://bar.example.com can communicate using
// JavaScript if both domains set document.domain="example.com". // JavaScript if both domains set document.domain="example.com".
// //
// This method is used to allow access to origins that would otherwise violate // This method is used to allow access to origins that would otherwise violate
// the same-origin policy. Scripts hosted underneath the fully qualified // the same-origin policy. Scripts hosted underneath the fully qualified
// |source_origin| URL (like http://www.example.com) will be allowed access to // |source_origin| URL (like http://www.example.com) will be allowed access to
@ -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,9 +48,8 @@ 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.
// Return false to let the extension load normally. // Return false to let the extension load normally.
@ -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,9 +48,8 @@ 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
// dialog is displayed. |printOptions| allows specification of paper size, // dialog is displayed. |printOptions| allows specification of paper size,
@ -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,18 +34,18 @@
// 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,9 +48,8 @@ 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,10 +50,9 @@ 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,9 +146,8 @@ 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,9 +194,8 @@ 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,9 +53,8 @@ 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,10 +46,9 @@
// 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;
/// ///
// Get the response status code. // Get the response status code.
@ -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;
@ -48,12 +49,12 @@ class CefSchemeHandlerFactory;
/// ///
// Register a custom scheme. This method should not be called for the built-in // Register a custom scheme. This method should not be called for the built-in
// HTTP, HTTPS, FILE, FTP, ABOUT and DATA schemes. // HTTP, HTTPS, FILE, FTP, ABOUT and DATA schemes.
// //
// If |is_standard| is true the scheme will be treated as a standard scheme. // If |is_standard| is true the scheme will be treated as a standard scheme.
// Standard schemes are subject to URL canonicalization and parsing rules as // Standard schemes are subject to URL canonicalization and parsing rules as
// defined in the Common Internet Scheme Syntax RFC 1738 Section 3.1 available // defined in the Common Internet Scheme Syntax RFC 1738 Section 3.1 available
// at http://www.ietf.org/rfc/rfc1738.txt // at http://www.ietf.org/rfc/rfc1738.txt
// //
// In particular, the syntax for standard scheme URLs must be of the form: // In particular, the syntax for standard scheme URLs must be of the form:
// <pre> // <pre>
// [scheme]://[username]:[password]@[host]:[port]/[url-path] // [scheme]://[username]:[password]@[host]:[port]/[url-path]
@ -66,12 +67,12 @@ class CefSchemeHandlerFactory;
// both be canonicalized to "scheme://host/path". The origin of a standard // both be canonicalized to "scheme://host/path". The origin of a standard
// scheme URL is the combination of scheme, host and port (i.e., // scheme URL is the combination of scheme, host and port (i.e.,
// "scheme://host:port" in the most explicit case). // "scheme://host:port" in the most explicit case).
// //
// For non-standard scheme URLs only the "scheme:" component is parsed and // For non-standard scheme URLs only the "scheme:" component is parsed and
// canonicalized. The remainder of the URL will be passed to the handler as-is. // canonicalized. The remainder of the URL will be passed to the handler as-is.
// For example, "scheme:///some%20text" will remain the same. Non-standard // For example, "scheme:///some%20text" will remain the same. Non-standard
// scheme URLs cannot be used as a target for form submission. // scheme URLs cannot be used as a target for form submission.
// //
// If |is_local| is true the scheme will be treated as local (i.e., with the // If |is_local| is true the scheme will be treated as local (i.e., with the
// same security rules as those applied to "file" URLs). Normal pages cannot // same security rules as those applied to "file" URLs). Normal pages cannot
// link to or access local URLs. Also, by default, local URLs can only perform // link to or access local URLs. Also, by default, local URLs can only perform
@ -80,12 +81,12 @@ class CefSchemeHandlerFactory;
// the same origin set the CefSettings.file_access_from_file_urls_allowed value // the same origin set the CefSettings.file_access_from_file_urls_allowed value
// to true. To allow XMLHttpRequest calls from a local URL to all origins set // to true. To allow XMLHttpRequest calls from a local URL to all origins set
// the CefSettings.universal_access_from_file_urls_allowed value to true. // the CefSettings.universal_access_from_file_urls_allowed value to true.
// //
// If |is_display_isolated| is true the scheme will be treated as display- // If |is_display_isolated| is true the scheme will be treated as display-
// isolated. This means that pages cannot display these URLs unless they are // isolated. This means that pages cannot display these URLs unless they are
// from the same scheme. For example, pages in another origin cannot create // from the same scheme. For example, pages in another origin cannot create
// iframes or hyperlinks to URLs with this scheme. // iframes or hyperlinks to URLs with this scheme.
// //
// This function may be called on any thread. It should only be called once // This function may be called on any thread. It should only be called once
// per unique |scheme_name| value. If |scheme_name| is already registered or if // per unique |scheme_name| value. If |scheme_name| is already registered or if
// an error occurs this method will return false. // an error occurs this method will return false.
@ -126,9 +127,8 @@ 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
// be the browser window that initiated the request. If the request was // be the browser window that initiated the request. If the request was
@ -145,9 +145,8 @@ 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,14 +171,13 @@ 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
// HeadersAvailable() once the response header information is available // HeadersAvailable() once the response header information is available
// (HeadersAvailable() can also be called from inside this method if header // (HeadersAvailable() can also be called from inside this method if header
// information is available immediately). To cancel the request return false. // information is available immediately). To cancel the request return false.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual bool ProcessRequest(CefRefPtr<CefRequest> request, virtual bool ProcessRequest(CefRefPtr<CefRequest> request,
@ -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,9 +92,8 @@ 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.
// |count| is the 0-based index for the current pair. |total| is the total // |count| is the 0-based index for the current pair. |total| is the total
@ -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,19 +34,18 @@
// 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,9 +79,8 @@ 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,9 +131,8 @@ 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,9 +166,8 @@ 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.
/// ///
@ -187,19 +185,20 @@ public:
/// ///
/*--cef()--*/ /*--cef()--*/
virtual size_t Write(const void* ptr, size_t size, size_t n) =0; virtual size_t Write(const void* ptr, size_t size, size_t n) =0;
/// ///
// 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,9 +77,8 @@ 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;
@ -53,7 +54,7 @@ class CefV8Value;
// keyword 'native'. The calling of a native function is restricted to the scope // keyword 'native'. The calling of a native function is restricted to the scope
// in which the prototype of the native function is defined. This function may // in which the prototype of the native function is defined. This function may
// be called on any thread. // be called on any thread.
// //
// Example JavaScript extension code: // Example JavaScript extension code:
// <pre> // <pre>
// // create the 'example' global object if it doesn't already exist. // // create the 'example' global object if it doesn't already exist.
@ -116,9 +117,8 @@ 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,9 +188,8 @@ 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
// receiver ('this' object) of the function. |arguments| is the list of // receiver ('this' object) of the function. |arguments| is the list of
@ -212,9 +211,8 @@ 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
// receiver ('this' object) of the accessor. If retrieval succeeds set // receiver ('this' object) of the accessor. If retrieval succeeds set
@ -246,9 +244,8 @@ 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,9 +306,8 @@ 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;
@ -359,7 +355,7 @@ public:
/// ///
/*--cef(capi_name=cef_v8value_create_object_with_accessor, /*--cef(capi_name=cef_v8value_create_object_with_accessor,
optional_param=user_data,optional_param=accessor)--*/ optional_param=user_data,optional_param=accessor)--*/
static CefRefPtr<CefV8Value> CreateObject(CefRefPtr<CefBase> user_data, static CefRefPtr<CefV8Value> CreateObject(CefRefPtr<CefBase> user_data,
CefRefPtr<CefV8Accessor> accessor); CefRefPtr<CefV8Accessor> accessor);
/// ///
// Create a new CefV8Value object of type array. This method should only be // Create a new CefV8Value object of type array. This method should only be
@ -436,7 +432,7 @@ public:
/// ///
/*--cef()--*/ /*--cef()--*/
virtual bool IsSame(CefRefPtr<CefV8Value> that) =0; virtual bool IsSame(CefRefPtr<CefV8Value> that) =0;
/// ///
// Return a bool value. The underlying data will be converted to if // Return a bool value. The underlying data will be converted to if
// necessary. // necessary.
@ -523,7 +519,7 @@ public:
// instance passed to CefV8Value::CreateObject(). // instance passed to CefV8Value::CreateObject().
/// ///
/*--cef(capi_name=set_value_byaccessor)--*/ /*--cef(capi_name=set_value_byaccessor)--*/
virtual bool SetValue(const CefString& key, AccessControl settings, virtual bool SetValue(const CefString& key, AccessControl settings,
PropertyAttribute attribute) =0; PropertyAttribute attribute) =0;
/// ///
@ -587,7 +583,7 @@ public:
// arguments that will be passed to the function. If execution succeeds // arguments that will be passed to the function. If execution succeeds
// |retval| will be set to the function return value. If execution fails // |retval| will be set to the function return value. If execution fails
// |exception| will be set to the exception that was thrown. If // |exception| will be set to the exception that was thrown. If
// |rethrow_exception| is true any exception will also be re-thrown. This // |rethrow_exception| is true any exception will also be re-thrown. This
// method returns false if called incorrectly. // method returns false if called incorrectly.
/// ///
/*--cef(optional_param=object)--*/ /*--cef(optional_param=object)--*/
@ -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,9 +49,8 @@ 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
// retrieve the JavaScript 'window' object use the CefV8Context::GetGlobal() // retrieve the JavaScript 'window' object use the CefV8Context::GetGlobal()
@ -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,9 +50,8 @@ 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;
/// ///
@ -59,7 +59,7 @@ public:
/// ///
/*--cef()--*/ /*--cef()--*/
static CefRefPtr<CefWebURLRequest> CreateWebURLRequest( static CefRefPtr<CefWebURLRequest> CreateWebURLRequest(
CefRefPtr<CefRequest> request, CefRefPtr<CefRequest> request,
CefRefPtr<CefWebURLRequestClient> client); CefRefPtr<CefWebURLRequestClient> client);
/// ///
@ -80,19 +80,18 @@ 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;
/// ///
// Notifies the client that the request state has changed. State change // Notifies the client that the request state has changed. State change
// notifications will always be sent before the below notification methods // notifications will always be sent before the below notification methods
// are called. // are called.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual void OnStateChange(CefRefPtr<CefWebURLRequest> requester, virtual void OnStateChange(CefRefPtr<CefWebURLRequest> requester,
RequestState state) =0; RequestState state) =0;
/// ///
@ -100,8 +99,8 @@ public:
// chance to change the request parameters. // chance to change the request parameters.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual void OnRedirect(CefRefPtr<CefWebURLRequest> requester, virtual void OnRedirect(CefRefPtr<CefWebURLRequest> requester,
CefRefPtr<CefRequest> request, CefRefPtr<CefRequest> request,
CefRefPtr<CefResponse> response) =0; CefRefPtr<CefResponse> response) =0;
/// ///
@ -115,22 +114,22 @@ public:
// Notifies the client of the upload progress. // Notifies the client of the upload progress.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual void OnProgress(CefRefPtr<CefWebURLRequest> requester, virtual void OnProgress(CefRefPtr<CefWebURLRequest> requester,
uint64 bytesSent, uint64 totalBytesToBeSent) =0; uint64 bytesSent, uint64 totalBytesToBeSent) =0;
/// ///
// Notifies the client that content has been received. // Notifies the client that content has been received.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual void OnData(CefRefPtr<CefWebURLRequest> requester, virtual void OnData(CefRefPtr<CefWebURLRequest> requester,
const void* data, int dataLength) =0; const void* data, int dataLength) =0;
/// ///
// Notifies the client that the request ended with an error. // Notifies the client that the request ended with an error.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual void OnError(CefRefPtr<CefWebURLRequest> requester, virtual void OnError(CefRefPtr<CefWebURLRequest> requester,
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,9 +48,8 @@ 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,9 +47,8 @@ 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
// be called from the thread that created the object. // be called from the thread that created the object.
@ -74,7 +73,7 @@ public:
/// ///
// Moves the cursor to the specified file in the archive. If |caseSensitive| // Moves the cursor to the specified file in the archive. If |caseSensitive|
// is true then the search will be case sensitive. Returns true if the cursor // is true then the search will be case sensitive. Returns true if the cursor
// position was set successfully. // position was set successfully.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual bool MoveToFile(const CefString& fileName, bool caseSensitive) =0; virtual bool MoveToFile(const CefString& fileName, bool caseSensitive) =0;
@ -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,14 +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_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)
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
#else // !BUILDING_CEF_SHARED #else // !BUILDING_CEF_SHARED
#if defined(_WIN32) #if defined(_WIN32)
#ifndef OS_WIN #ifndef OS_WIN
@ -116,13 +117,13 @@
#define ALLOW_THIS_IN_INITIALIZER_LIST(code) MSVC_PUSH_DISABLE_WARNING(4355) \ #define ALLOW_THIS_IN_INITIALIZER_LIST(code) MSVC_PUSH_DISABLE_WARNING(4355) \
code \ code \
MSVC_POP_WARNING() MSVC_POP_WARNING()
#else // !COMPILER_MSVC #else // !COMPILER_MSVC
#define ALLOW_THIS_IN_INITIALIZER_LIST(code) code #define ALLOW_THIS_IN_INITIALIZER_LIST(code) code
#endif // !COMPILER_MSVC #endif // !COMPILER_MSVC
#endif #endif
#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;
} }
}; };
@ -122,6 +114,6 @@ struct CefPrintInfoTraits {
// Class representing print context information. // Class representing print context information.
typedef CefStructBase<CefPrintInfoTraits> CefPrintInfo; 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;
} }
}; };
@ -139,6 +130,6 @@ struct CefPrintInfoTraits {
// Class representing print context information. // Class representing print context information.
typedef CefStructBase<CefPrintInfoTraits> CefPrintInfo; 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"
@ -61,15 +62,15 @@ typedef struct _cef_plugin_info_t {
// A description of the plugin. // A description of the plugin.
cef_string_t description; cef_string_t description;
// A pipe (|) delimited list of mime type values that the plugin supports. // A pipe (|) delimited list of mime type values that the plugin supports.
cef_string_t mime_types; cef_string_t mime_types;
// A pipe (|) delimited list of extension values. Each value is associated // A pipe (|) delimited list of extension values. Each value is associated
// with the mime type value at the same position. Multiple file extensions // with the mime type value at the same position. Multiple file extensions
// for the same mime type may be delimited with commas (,). // for the same mime type may be delimited with commas (,).
cef_string_t file_extensions; cef_string_t file_extensions;
// A pipe (|) delimited list of description values. Each value is associated // A pipe (|) delimited list of description values. Each value is associated
// with the mime type value at the same position. // with the mime type value at the same position.
cef_string_t type_descriptions; cef_string_t type_descriptions;
@ -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,27 +27,28 @@
// (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.
// If you change the default you MUST recompile all of CEF. // If you change the default you MUST recompile all of CEF.
// Build with the UTF8 string type as default. // Build with the UTF8 string type as default.
//#define CEF_STRING_TYPE_UTF8 1 // #define CEF_STRING_TYPE_UTF8 1
// Build with the UTF16 string type as default. // Build with the UTF16 string type as default.
#define CEF_STRING_TYPE_UTF16 1 #define CEF_STRING_TYPE_UTF16 1
// Build with the wide string type as default. // Build with the wide string type as default.
//#define CEF_STRING_TYPE_WIDE 1 // #define CEF_STRING_TYPE_WIDE 1
#include "cef_string_types.h" #include "include/internal/cef_string_types.h"
#ifdef __cplusplus #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)
@ -55,7 +56,7 @@ typedef CefStringUTF8 CefString;
#elif defined(CEF_STRING_TYPE_WIDE) #elif defined(CEF_STRING_TYPE_WIDE)
typedef CefStringWide CefString; typedef CefStringWide CefString;
#endif #endif
#endif // __cplusplus #endif // __cplusplus
#if defined(CEF_STRING_TYPE_UTF8) #if defined(CEF_STRING_TYPE_UTF8)
typedef char cef_char_t; typedef char cef_char_t;
@ -109,4 +110,4 @@ typedef cef_string_userfree_wide_t cef_string_userfree_t;
#error Please choose a string type. #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
@ -48,12 +49,12 @@ 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
#endif // !OS_WIN #endif // !OS_WIN
// CEF string type definitions. Whomever allocates |str| is responsible for // CEF string type definitions. Whomever allocates |str| is responsible for
@ -200,4 +201,4 @@ CEF_EXPORT void cef_string_userfree_utf16_free(cef_string_userfree_utf16_t str);
} }
#endif #endif
#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.
@ -44,25 +47,27 @@ struct CefStringTraitsWide {
typedef wchar_t char_type; typedef wchar_t char_type;
typedef cef_string_wide_t struct_type; typedef cef_string_wide_t struct_type;
typedef cef_string_userfree_wide_t userfree_struct_type; typedef cef_string_userfree_wide_t userfree_struct_type;
static inline void clear(struct_type *s) { cef_string_wide_clear(s); } static inline 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,23 +99,20 @@ 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;
} }
#endif // WCHAR_T_IS_UTF32 #endif // WCHAR_T_IS_UTF32
#endif // BUILDING_CEF_SHARED #endif // BUILDING_CEF_SHARED
}; };
/// ///
@ -124,33 +122,33 @@ struct CefStringTraitsUTF8 {
typedef char char_type; typedef char char_type;
typedef cef_string_utf8_t struct_type; typedef cef_string_utf8_t struct_type;
typedef cef_string_userfree_utf8_t userfree_struct_type; typedef cef_string_userfree_utf8_t userfree_struct_type;
static inline void clear(struct_type *s) { cef_string_utf8_clear(s); } static inline 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,12 +172,11 @@ 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;
} }
#endif // BUILDING_CEF_SHARED #endif // BUILDING_CEF_SHARED
}; };
/// ///
@ -191,25 +186,27 @@ struct CefStringTraitsUTF16 {
typedef char16 char_type; typedef char16 char_type;
typedef cef_string_utf16_t struct_type; typedef cef_string_utf16_t struct_type;
typedef cef_string_userfree_utf16_t userfree_struct_type; typedef cef_string_userfree_utf16_t userfree_struct_type;
static inline void clear(struct_type *s) { cef_string_utf16_clear(s); } static inline 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,33 +231,28 @@ 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;
} }
#endif // BUILDING_CEF_SHARED #endif // BUILDING_CEF_SHARED
}; };
/// ///
@ -295,7 +285,7 @@ struct CefStringTraitsUTF16 {
/// ///
template <class traits> template <class traits>
class CefStringBase { class CefStringBase {
public: public:
typedef typename traits::char_type char_type; typedef typename traits::char_type char_type;
typedef typename traits::struct_type struct_type; typedef typename traits::struct_type struct_type;
typedef typename traits::userfree_struct_type userfree_struct_type; typedef typename traits::userfree_struct_type userfree_struct_type;
@ -304,32 +294,42 @@ public:
// Default constructor. // Default constructor.
/// ///
CefStringBase() : string_(NULL), owner_(false) {} CefStringBase() : string_(NULL), owner_(false) {}
/// ///
// 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,12 +337,16 @@ 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)); } }
#endif // BUILDING_CEF_SHARED && WCHAR_T_IS_UTF32 CefStringBase(const char16* src) // NOLINT(runtime/explicit)
: string_(NULL), owner_(false) {
FromString16(string16(src));
}
#endif // BUILDING_CEF_SHARED && WCHAR_T_IS_UTF32
/// ///
// Create a new string from an existing character array. If |copy| is true // Create a new string from an existing character array. If |copy| is true
// this class will copy the data. Otherwise, this class will reference the // this class will copy the data. Otherwise, this class will reference the
@ -350,16 +354,17 @@ public:
// and will not be freed by this class. // 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.
@ -376,17 +381,17 @@ public:
// Return a read-only pointer to the string data. // Return a read-only pointer to the string data.
/// ///
const char_type* c_str() const { return (string_ ? string_->str : NULL); } const char_type* c_str() const { return (string_ ? string_->str : NULL); }
/// ///
// Return the length of the string data. // Return the length of the string data.
/// ///
size_t length() const { return (string_ ? string_->length : 0); } size_t length() const { return (string_ ? string_->length : 0); }
/// ///
// Return the length of the string data. // Return the length of the string data.
/// ///
inline size_t size() const { return length(); } inline size_t size() const { return length(); }
/// ///
// Returns true if the string is empty. // Returns true if the string is empty.
/// ///
@ -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())
@ -405,12 +409,11 @@ public:
return 1; return 1;
return traits::compare(string_, str.GetStruct()); return traits::compare(string_, str.GetStruct());
} }
/// ///
// Clear the string data. // Clear the string data.
/// ///
void clear() void clear() {
{
if (!empty()) if (!empty())
traits::clear(string_); traits::clear(string_);
} }
@ -422,29 +425,27 @@ public:
// Returns true if this class owns the underlying string structure. // Returns true if this class owns the underlying string structure.
/// ///
bool IsOwner() const { return owner_; } bool IsOwner() const { return owner_; }
/// ///
// Returns a read-only pointer to the underlying string structure. May return // Returns a read-only pointer to the underlying string structure. May return
// NULL if no structure is currently allocated. // NULL if no structure is currently allocated.
/// ///
const struct_type* GetStruct() const { return string_; } const struct_type* GetStruct() const { return string_; }
/// ///
// 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_;
} }
/// ///
// 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,11 +460,10 @@ 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();
string_ = str; string_ = str;
owner_ = owner; owner_ = owner;
} }
@ -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();
@ -484,7 +483,7 @@ public:
AllocIfNeeded(); AllocIfNeeded();
owner_ = true; owner_ = true;
memcpy(string_, str, sizeof(struct_type)); memcpy(string_, str, sizeof(struct_type));
// Free the |str| structure but not the data. // Free the |str| structure but not the data.
memset(str, 0, sizeof(struct_type)); memset(str, 0, sizeof(struct_type));
traits::userfree_free(str); traits::userfree_free(str);
@ -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,14 +504,13 @@ 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;
userfree_struct_type str = traits::userfree_alloc(); userfree_struct_type str = traits::userfree_alloc();
memcpy(str, string_, sizeof(struct_type)); memcpy(str, string_, sizeof(struct_type));
// Free this class' structure but not the data. // Free this class' structure but not the data.
memset(string_, 0, sizeof(struct_type)); memset(string_, 0, sizeof(struct_type));
ClearAndFree(); ClearAndFree();
@ -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;
@ -536,14 +532,13 @@ public:
AllocIfNeeded(); AllocIfNeeded();
return traits::set(src, src_len, string_, copy) ? true : false; return traits::set(src, src_len, string_, copy) ? true : false;
} }
/// ///
// Set this string's data from an existing ASCII string. Data will be always // Set this string's data from an existing ASCII string. Data will be always
// copied. Translation will occur if necessary based on the underlying string // 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();
@ -552,25 +547,23 @@ public:
AllocIfNeeded(); AllocIfNeeded();
return traits::from_ascii(str, len, string_); return traits::from_ascii(str, len, string_);
} }
/// ///
// 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_);
} }
/// ///
// Set this string's data from an existing std::string. Data will be always // Set this string's data from an existing std::string. Data will be always
// copied. Translation will occur if necessary based on the underlying string // 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;
@ -578,25 +571,23 @@ public:
AllocIfNeeded(); AllocIfNeeded();
return traits::from_string(str, string_); return traits::from_string(str, string_);
} }
/// ///
// 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_);
} }
/// ///
// Set this string's data from an existing std::wstring. Data will be always // Set this string's data from an existing std::wstring. Data will be always
// copied. Translation will occur if necessary based on the underlying string // 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,20 +600,18 @@ 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_);
} }
/// ///
// Set this string's data from an existing string16. Data will be always // Set this string's data from an existing string16. 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.
/// ///
bool FromString16(const string16& str) bool FromString16(const string16& str) {
{
if (str.empty()) { if (str.empty()) {
clear(); clear();
return true; return true;
@ -630,51 +619,76 @@ public:
AllocIfNeeded(); AllocIfNeeded();
return traits::from_string16(str, string_); return traits::from_string16(str, string_);
} }
#endif // BUILDING_CEF_SHARED #endif // BUILDING_CEF_SHARED
/// ///
// 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);
#endif // BUILDING_CEF_SHARED && WCHAR_T_IS_UTF32 return *this;
}
CefStringBase& operator=(const char16* str) {
FromString16(string16(str));
return *this;
}
#endif // BUILDING_CEF_SHARED && WCHAR_T_IS_UTF32
private: private:
// Allocate the string structure if it doesn't already exist. // 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)
@ -144,7 +144,7 @@ struct Tuple3 {
Tuple3(typename TupleTraits<A>::ParamType a, Tuple3(typename TupleTraits<A>::ParamType a,
typename TupleTraits<B>::ParamType b, typename TupleTraits<B>::ParamType b,
typename TupleTraits<C>::ParamType c) typename TupleTraits<C>::ParamType c)
: a(a), b(b), c(c){ : a(a), b(b), c(c) {
} }
A a; A a;
@ -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.
/// ///
@ -90,14 +94,14 @@ typedef struct _cef_settings_t
// your application message loop. // your application message loop.
/// ///
bool multi_threaded_message_loop; bool multi_threaded_message_loop;
/// ///
// The location where cache data will be stored on disk. If empty an // The location where cache data will be stored on disk. If empty an
// in-memory cache will be used. HTML5 databases such as localStorage will // in-memory cache will be used. HTML5 databases such as localStorage will
// only persist across sessions if a cache path is specified. // only persist across sessions if a cache path is specified.
/// ///
cef_string_t cache_path; cef_string_t cache_path;
/// ///
// Value that will be returned as the User-Agent HTTP header. If empty the // Value that will be returned as the User-Agent HTTP header. If empty the
// default User-Agent string will be used. // default User-Agent string will be used.
@ -160,7 +164,7 @@ typedef struct _cef_settings_t
#if defined(OS_WIN) #if defined(OS_WIN)
/// ///
// Set to true (1) to use the system proxy resolver on Windows when // Set to true (1) to use the system proxy resolver on Windows when
// "Automatically detect settings" is checked. This setting is disabled // "Automatically detect settings" is checked. This setting is disabled
// by default for performance reasons. // by default for performance reasons.
/// ///
@ -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.
/// ///
@ -328,7 +331,7 @@ typedef struct _cef_browser_settings_t
// Set to true (1) to enable the user style sheet for all pages. // Set to true (1) to enable the user style sheet for all pages.
/// ///
bool user_style_sheet_enabled; bool user_style_sheet_enabled;
/// ///
// Location of the user style sheet. This must be a data URL of the form // Location of the user style sheet. This must be a data URL of the form
// "data:text/css;charset=utf-8;base64,csscontent" where "csscontent" is the // "data:text/css;charset=utf-8;base64,csscontent" where "csscontent" is the
@ -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.
/// ///
@ -506,7 +507,7 @@ typedef struct _cef_cookie_t
// cookie creation. // cookie creation.
/// ///
cef_time_t creation; cef_time_t creation;
/// ///
// The cookie last access date. This is automatically populated by the system // The cookie last access date. This is automatically populated by the system
// on access. // on access.
@ -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,9 +644,8 @@ 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
V8_PROPERTY_ATTRIBUTE_DONTENUM = 1 << 1, // Not enumerable V8_PROPERTY_ATTRIBUTE_DONTENUM = 1 << 1, // Not enumerable
@ -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,11 +876,10 @@ 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.
double length; double length;
double width; double width;
}; };
@ -909,14 +887,13 @@ 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;
double top; double top;
double bottom; double bottom;
//Margin size (top/bottom) in inches for header/footer. // Margin size (top/bottom) in inches for header/footer.
double header; double header;
double footer; double footer;
}; };
@ -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,11 +57,10 @@ 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;
// Pointer for the new browser widget. // Pointer for the new browser widget.
cef_window_handle_t m_Widget; cef_window_handle_t m_Widget;
} cef_window_info_t; } cef_window_info_t;
@ -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;
@ -76,6 +76,6 @@ typedef struct _cef_print_info_t
} }
#endif #endif
#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;
@ -74,7 +75,7 @@ typedef struct _cef_window_info_t
// NSView pointer for the parent view. // NSView pointer for the parent view.
cef_window_handle_t m_ParentView; cef_window_handle_t m_ParentView;
// NSView pointer for the new browser view. // NSView pointer for the new browser view.
cef_window_handle_t m_View; cef_window_handle_t m_View;
} cef_window_info_t; } cef_window_info_t;
@ -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;
@ -91,6 +91,6 @@ typedef struct _cef_print_info_t
} }
#endif #endif
#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;
@ -77,7 +78,7 @@ typedef struct _cef_window_info_t
// Set to true to enable transparent painting. // Set to true to enable transparent painting.
BOOL m_bTransparentPainting; BOOL m_bTransparentPainting;
// Handle for the new browser window. // Handle for the new browser window.
cef_window_handle_t m_hWnd; cef_window_handle_t m_hWnd;
} cef_window_info_t; } cef_window_info_t;
@ -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;
@ -96,6 +96,6 @@ typedef struct _cef_print_info_t
} }
#endif #endif
#endif // OS_WIN #endif // OS_WIN
#endif // _CEF_TYPES_WIN_H #endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_WIN_H_

View File

@ -27,40 +27,37 @@
// (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.
/// ///
template <class traits> template <class traits>
class CefStructBase : public traits::struct_type { 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,16 +74,15 @@ 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_)
Clear(this); Clear(this);
// This object is now attached to the new structure. // This object is now attached to the new structure.
attached_to_ = &source; attached_to_ = &source;
// Transfer ownership of the values from the source structure. // Transfer ownership of the values from the source structure.
memcpy(static_cast<struct_type*>(this), &source, sizeof(struct_type)); memcpy(static_cast<struct_type*>(this), &source, sizeof(struct_type));
} }
@ -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;
@ -221,16 +205,15 @@ struct CefPopupFeaturesTraits {
s->scrollbarsVisible = true; s->scrollbarsVisible = true;
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 ?
cef_string_list_copy(src->additionalFeatures) : NULL; cef_string_list_copy(src->additionalFeatures) : NULL;
@ -263,25 +246,23 @@ 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);
cef_string_clear(&s->locale); cef_string_clear(&s->locale);
if(s->extra_plugin_paths) if (s->extra_plugin_paths)
cef_string_list_free(s->extra_plugin_paths); cef_string_list_free(s->extra_plugin_paths);
cef_string_clear(&s->log_file); cef_string_clear(&s->log_file);
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,
@ -292,7 +273,7 @@ struct CefSettingsTraits {
&target->product_version, copy); &target->product_version, copy);
cef_string_set(src->locale.str, src->locale.length, &target->locale, copy); cef_string_set(src->locale.str, src->locale.length, &target->locale, copy);
if(target->extra_plugin_paths) if (target->extra_plugin_paths)
cef_string_list_free(target->extra_plugin_paths); cef_string_list_free(target->extra_plugin_paths);
target->extra_plugin_paths = src->extra_plugin_paths ? target->extra_plugin_paths = src->extra_plugin_paths ?
cef_string_list_copy(src->extra_plugin_paths) : NULL; cef_string_list_copy(src->extra_plugin_paths) : NULL;
@ -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;
@ -431,9 +410,8 @@ struct CefURLPartsTraits {
typedef cef_urlparts_t struct_type; typedef cef_urlparts_t struct_type;
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,
@ -469,11 +447,11 @@ struct CefTimeTraits {
typedef cef_time_t struct_type; typedef cef_time_t struct_type;
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;
} }
}; };
@ -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) {
@ -519,17 +497,16 @@ struct CefCookieTraits {
typedef cef_cookie_t struct_type; typedef cef_cookie_t struct_type;
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;
@ -600,14 +576,13 @@ struct CefProxyInfoTraits {
typedef cef_proxy_info_t struct_type; typedef cef_proxy_info_t struct_type;
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