mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Compare commits
33 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
b660893c6e | ||
|
6ae6e613f8 | ||
|
ea9b6c8a6b | ||
|
3d0912d766 | ||
|
e207b1758b | ||
|
d94bfc5a98 | ||
|
c4715049d1 | ||
|
8617e7c22c | ||
|
07e6226bbf | ||
|
f6bf57b45e | ||
|
abb11589b2 | ||
|
26b3a7a5d0 | ||
|
456ea5a198 | ||
|
00b7616fdc | ||
|
ced449a0ef | ||
|
d153a2c484 | ||
|
bd97e664c4 | ||
|
3fb1b92d20 | ||
|
e7a02fe00f | ||
|
2ddbe64750 | ||
|
bc8a9b09a8 | ||
|
61f7df010a | ||
|
3b5b58fb78 | ||
|
c6855b4489 | ||
|
37b43c83e1 | ||
|
ce6efff27f | ||
|
cf20046bba | ||
|
63aa211b61 | ||
|
42f0b5218d | ||
|
f082782859 | ||
|
c32584d266 | ||
|
156dc552b9 | ||
|
bdae0bf335 |
@@ -29,5 +29,3 @@ Felix Bruns <felixbruns@spotify.com>
|
||||
YuTeh Shen <shenyute@gmail.com>
|
||||
Andrei Kurushin <ajax16384@gmail.com>
|
||||
Gonzo Berman <gberman@factset.com>
|
||||
Jakub Trzebiatowski <kuba.trzebiatowski@gmail.com>
|
||||
Nishant Kaushik <nishantk@adobe.com>
|
||||
|
@@ -7,5 +7,5 @@
|
||||
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
|
||||
|
||||
{
|
||||
'chromium_checkout': 'refs/tags/55.0.2883.87',
|
||||
'chromium_checkout': 'refs/tags/47.0.2526.80',
|
||||
}
|
||||
|
@@ -24,13 +24,17 @@
|
||||
#
|
||||
# This CEF binary distribution includes the following CMake files:
|
||||
#
|
||||
# CMakeLists.txt Bootstrap that sets up the CMake environment.
|
||||
# cmake/*.cmake CEF configuration files shared by all targets.
|
||||
# CMakeLists.txt Bootstrap that sets up the CMake environment and
|
||||
# loads the other CMake files.
|
||||
# macros.cmake Helper macros for building a generic CEF-based
|
||||
# application.
|
||||
# libcef_dll/CMakeLists.txt Defines the libcef_dll_wrapper target.
|
||||
# tests/*/CMakeLists.txt Defines the test application target.
|
||||
# cefclient/CMakeLists.txt Defines the cefclient target.
|
||||
# cefsimple/CMakeLists.txt Defines the cefsimple target.
|
||||
#
|
||||
# See the "TODO:" comments below for guidance on how to integrate this CEF
|
||||
# binary distribution into a new or existing CMake project.
|
||||
# Existing CMake projects that use this binary distribution without changing the
|
||||
# directory structure can include the existing "libcef_dll/CMakeLists.txt" file
|
||||
# with minimal or no changes.
|
||||
#
|
||||
# BUILD REQUIREMENTS
|
||||
#
|
||||
@@ -40,21 +44,19 @@
|
||||
#
|
||||
# - Linux requirements:
|
||||
# Currently supported distributions include Debian Wheezy, Ubuntu Precise, and
|
||||
# related. Ubuntu 14.04 64-bit is recommended. Newer versions will likely also
|
||||
# work but may not have been tested.
|
||||
# related. Newer versions will likely also work but may not have been tested.
|
||||
# Required packages include:
|
||||
# build-essential
|
||||
# libgtk2.0-dev (required by the cefclient target only)
|
||||
# libgtkglext1-dev (required by the cefclient target only)
|
||||
#
|
||||
# - Mac OS X requirements:
|
||||
# Xcode 5 or newer building on Mac OS X 10.9 (Mavericks) or newer. Xcode 7.2
|
||||
# and OS X 10.11 are recommended. The Xcode command-line tools must also be
|
||||
# installed. Only 64-bit builds are supported on OS X.
|
||||
# Xcode 5 or newer building on Mac OS X 10.7 (Lion) or newer. The Xcode
|
||||
# command-line tools must also be installed.
|
||||
#
|
||||
# - Windows requirements:
|
||||
# Visual Studio 2010 or newer building on Windows 7 or newer. Visual Studio
|
||||
# 2015 Update 2 and Windows 10 64-bit are recommended.
|
||||
# Visual Studio 2010 or newer building on Windows XP SP3 or newer. 64-bit
|
||||
# version of Windows 7 or newer recommended.
|
||||
#
|
||||
# BUILD EXAMPLES
|
||||
#
|
||||
@@ -75,6 +77,15 @@
|
||||
# > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug ..
|
||||
# > ninja cefclient cefsimple
|
||||
#
|
||||
# To perform a Mac OS X build using a 32-bit CEF binary distribution:
|
||||
# Using the Xcode IDE:
|
||||
# > cmake -G "Xcode" -DPROJECT_ARCH="i386" ..
|
||||
# Open build\cef.xcodeproj in Xcode and select Product > Build.
|
||||
#
|
||||
# Using Ninja:
|
||||
# > cmake -G "Ninja" -DPROJECT_ARCH="i386" -DCMAKE_BUILD_TYPE=Debug ..
|
||||
# > ninja cefclient cefsimple
|
||||
#
|
||||
# To perform a Mac OS X build using a 64-bit CEF binary distribution:
|
||||
# Using the Xcode IDE:
|
||||
# > cmake -G "Xcode" -DPROJECT_ARCH="x86_64" ..
|
||||
@@ -85,29 +96,29 @@
|
||||
# > ninja cefclient cefsimple
|
||||
#
|
||||
# To perform a Windows build using a 32-bit CEF binary distribution:
|
||||
# Using the Visual Studio 2015 IDE:
|
||||
# > cmake -G "Visual Studio 14" ..
|
||||
# Using the Visual Studio 2013 IDE:
|
||||
# > cmake -G "Visual Studio 12" ..
|
||||
# Open build\cef.sln in Visual Studio and select Build > Build Solution.
|
||||
#
|
||||
# Using Ninja with Visual Studio 2015 command-line tools:
|
||||
# Using Ninja with Visual Studio 2013 command-line tools:
|
||||
# (this path may be different depending on your Visual Studio installation)
|
||||
# > "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\vcvars32.bat"
|
||||
# > "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\vcvars32.bat"
|
||||
# > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug ..
|
||||
# > ninja cefclient cefsimple
|
||||
#
|
||||
# To perform a Windows build using a 64-bit CEF binary distribution:
|
||||
# Using the Visual Studio 2015 IDE:
|
||||
# > cmake -G "Visual Studio 14 Win64" ..
|
||||
# Using the Visual Studio 2013 IDE:
|
||||
# > cmake -G "Visual Studio 12 Win64" ..
|
||||
# Open build\cef.sln in Visual Studio and select Build > Build Solution.
|
||||
#
|
||||
# Using Ninja with Visual Studio 2015 command-line tools:
|
||||
# Using Ninja with Visual Studio 2013 command-line tools:
|
||||
# (this path may be different depending on your Visual Studio installation)
|
||||
# > "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat"
|
||||
# > "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\vcvars64.bat"
|
||||
# > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug ..
|
||||
# > ninja cefclient cefsimple
|
||||
|
||||
#
|
||||
# Global setup.
|
||||
# Shared configuration.
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.12.1)
|
||||
@@ -116,93 +127,457 @@ cmake_minimum_required(VERSION 2.8.12.1)
|
||||
set(CMAKE_CONFIGURATION_TYPES Debug Release)
|
||||
|
||||
# Project name.
|
||||
# TODO: Change this line to match your project name when you copy this file.
|
||||
project(cef)
|
||||
|
||||
# Use folders in the resulting project files.
|
||||
set_property(GLOBAL PROPERTY OS_FOLDERS ON)
|
||||
|
||||
# Determine the platform.
|
||||
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
|
||||
set(OS_MACOSX 1)
|
||||
set(OS_POSIX 1)
|
||||
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
|
||||
set(OS_LINUX 1)
|
||||
set(OS_POSIX 1)
|
||||
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
|
||||
set(OS_WINDOWS 1)
|
||||
endif()
|
||||
|
||||
#
|
||||
# CEF_ROOT setup.
|
||||
# This variable must be set to locate the binary distribution.
|
||||
# TODO: Choose one of the below examples and comment out the rest.
|
||||
#
|
||||
# Determine the project architecture.
|
||||
if(NOT DEFINED PROJECT_ARCH)
|
||||
if(CMAKE_SIZEOF_VOID_P MATCHES 8)
|
||||
set(PROJECT_ARCH "x86_64")
|
||||
else()
|
||||
set(PROJECT_ARCH "x86")
|
||||
endif()
|
||||
|
||||
# Example 1: The current directory contains both the complete binary
|
||||
# distribution and your project.
|
||||
# A. Comment in these lines:
|
||||
#
|
||||
set(CEF_ROOT "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CEF_ROOT}/cmake")
|
||||
if(OS_MACOSX)
|
||||
# PROJECT_ARCH should be specified on Mac OS X.
|
||||
message(WARNING "No PROJECT_ARCH value specified, using ${PROJECT_ARCH}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Example 2: The binary distribution is in a separate directory from your
|
||||
# project. Locate the binary distribution using the CEF_ROOT CMake
|
||||
# variable.
|
||||
# A. Create a directory structure for your project like the following:
|
||||
# myproject/
|
||||
# CMakeLists.txt <= top-level CMake configuration
|
||||
# mytarget/
|
||||
# CMakeLists.txt <= CMake configuration for `mytarget`
|
||||
# ... other `mytarget` source files
|
||||
# B. Copy this file to "myproject/CMakeLists.txt" as the top-level CMake
|
||||
# configuration.
|
||||
# C. Create the target-specific "myproject/mytarget/CMakeLists.txt" file for
|
||||
# your application. See the included cefclient and cefsimple CMakeLists.txt
|
||||
# files as an example.
|
||||
# D. Comment in these lines:
|
||||
#
|
||||
# set(CEF_ROOT "c:/path/to/cef_binary_3.2704.xxxx.gyyyyyyy_windows32")
|
||||
# set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CEF_ROOT}/cmake")
|
||||
if(NOT CMAKE_BUILD_TYPE AND
|
||||
(${CMAKE_GENERATOR} STREQUAL "Ninja" OR ${CMAKE_GENERATOR} STREQUAL "Unix Makefiles"))
|
||||
# CMAKE_BUILD_TYPE should be specified when using Ninja or Unix Makefiles.
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
message(WARNING "No CMAKE_BUILD_TYPE value selected, using ${CMAKE_BUILD_TYPE}")
|
||||
endif()
|
||||
|
||||
# Example 3: The binary distribution is in a separate directory from your
|
||||
# project. Locate the binary distribution using the CEF_ROOT
|
||||
# environment variable.
|
||||
# A. Create a directory structure for your project like the following:
|
||||
# myproject/
|
||||
# CMakeLists.txt <= top-level CMake configuration
|
||||
# cmake/
|
||||
# FindCEF.cmake <= CEF CMake configuration entry point
|
||||
# mytarget/
|
||||
# CMakeLists.txt <= CMake configuration for `mytarget`
|
||||
# ... other `mytarget` source files
|
||||
# B. Copy this file to "myproject/CMakeLists.txt" as the top-level CMake
|
||||
# configuration.
|
||||
# C. Copy the cmake/FindCEF.cmake file to "myproject/cmake/FindCEF.cmake".
|
||||
# D. Create the target-specific "myproject/mytarget/CMakeLists.txt" file for
|
||||
# your application. See the included cefclient and cefsimple CMakeLists.txt
|
||||
# files as an example.
|
||||
# E. Set the CEF_ROOT environment variable before executing CMake. For example:
|
||||
# > set CEF_ROOT=c:\path\to\cef_binary_3.2704.xxxx.gyyyyyyy_windows32
|
||||
# F. Comment in these lines:
|
||||
#
|
||||
# set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
# Include cmake macros.
|
||||
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}")
|
||||
include("macros")
|
||||
|
||||
# Source include directory.
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
# Allow C++ programs to use stdint.h macros specified in the C99 standard that
|
||||
# aren't in the C++ standard (e.g. UINT8_MAX, INT64_MIN, etc).
|
||||
add_definitions(-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS)
|
||||
|
||||
|
||||
#
|
||||
# Load the CEF configuration.
|
||||
# Linux configuration.
|
||||
#
|
||||
|
||||
# Execute FindCEF.cmake which must exist in CMAKE_MODULE_PATH.
|
||||
find_package(CEF REQUIRED)
|
||||
if(OS_LINUX)
|
||||
# Platform-specific compiler/linker flags.
|
||||
set(CEF_LIBTYPE SHARED)
|
||||
# -fno-strict-aliasing = Avoid assumptions regarding non-aliasing of objects of different types
|
||||
# -fPIC = Generate position-independent code for shared libraries
|
||||
# -fstack-protector = Protect some vulnerable functions from stack-smashing (security feature)
|
||||
# -funwind-tables = Support stack unwinding for backtrace()
|
||||
# -fvisibility=hidden = Give hidden visibility to declarations that are not explicitly marked as visible
|
||||
# --param=ssp-buffer-size=4 = Set the minimum buffer size protected by SSP (security feature, related to stack-protector)
|
||||
# -pipe = Use pipes rather than temporary files for communication between build stages
|
||||
# -pthread = Use the pthread library
|
||||
# -Wall = Enable all warnings
|
||||
# -Werror = Treat warnings as errors
|
||||
# -Wno-missing-field-initializers = Don't warn about missing field initializers
|
||||
# -Wno-unused-parameter = Don't warn about unused parameters
|
||||
set(CEF_COMPILER_FLAGS "-fno-strict-aliasing -fPIC -fstack-protector -funwind-tables -fvisibility=hidden --param=ssp-buffer-size=4 -pipe -pthread -Wall -Werror -Wno-missing-field-initializers -Wno-unused-parameter")
|
||||
# -std=c99 = Use the C99 language standard
|
||||
set(CEF_C_COMPILER_FLAGS "-std=c99")
|
||||
# -fno-exceptions = Disable exceptions
|
||||
# -fno-rtti = Disable real-time type information
|
||||
# -fno-threadsafe-statics = Don't generate thread-safe statics
|
||||
# -fvisibility-inlines-hidden = Give hidden visibility to inlined class member functions
|
||||
# -std=gnu++11 = Use the C++11 language standard including GNU extensions
|
||||
# -Wsign-compare = Warn about mixed signed/unsigned type comparisons
|
||||
set(CEF_CXX_COMPILER_FLAGS "-fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -Wsign-compare")
|
||||
# -O0 = Disable optimizations
|
||||
# -g = Generate debug information
|
||||
set(CEF_COMPILER_FLAGS_DEBUG "-O0 -g")
|
||||
# -O2 = Optimize for maximum speed
|
||||
# -fdata-sections = Enable linker optimizations to improve locality of reference for data sections
|
||||
# -ffunction-sections = Enable linker optimizations to improve locality of reference for function sections
|
||||
# -fno-ident = Ignore the #ident directive
|
||||
# -DNDEBUG = Not a debug build
|
||||
# -U_FORTIFY_SOURCE = Undefine _FORTIFY_SOURCE in case it was previously defined
|
||||
# -D_FORTIFY_SOURCE=2 = Add memory and string function protection (security feature, related to stack-protector)
|
||||
set(CEF_COMPILER_FLAGS_RELEASE "-O2 -fdata-sections -ffunction-sections -fno-ident -DNDEBUG -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2")
|
||||
# -Wl,--disable-new-dtags = Don't generate new-style dynamic tags in ELF
|
||||
# -Wl,--fatal-warnings = Treat warnings as errors
|
||||
# -Wl,-rpath,. = Set rpath so that libraries can be placed next to the executable
|
||||
# -Wl,-z,noexecstack = Mark the stack as non-executable (security feature)
|
||||
# -Wl,-z,now = Resolve symbols on program start instead of on first use (security feature)
|
||||
# -Wl,-z,relro = Mark relocation sections as read-only (security feature)
|
||||
set(CEF_LINKER_FLAGS "-fPIC -pthread -Wl,--disable-new-dtags -Wl,--fatal-warnings -Wl,-rpath,. -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro")
|
||||
# -Wl,-O1 = Enable linker optimizations
|
||||
# -Wl,--as-needed = Only link libraries that export symbols used by the binary
|
||||
# -Wl,--gc-sections = Remove unused code resulting from -fdata-sections and -function-sections
|
||||
set(CEF_LINKER_FLAGS_RELEASE "-Wl,-O1 -Wl,--as-needed -Wl,--gc-sections")
|
||||
|
||||
include(CheckCCompilerFlag)
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
# -Wno-unused-local-typedefs = Don't warn about unused local typedefs
|
||||
CHECK_C_COMPILER_FLAG(-Wno-unused-local-typedefs COMPILER_SUPPORTS_NO_UNUSED_LOCAL_TYPEDEFS)
|
||||
if(COMPILER_SUPPORTS_NO_UNUSED_LOCAL_TYPEDEFS)
|
||||
set(CEF_C_COMPILER_FLAGS "${CEF_C_COMPILER_FLAGS} -Wno-unused-local-typedefs")
|
||||
endif()
|
||||
|
||||
# -Wno-literal-suffix = Don't warn about invalid suffixes on literals
|
||||
CHECK_CXX_COMPILER_FLAG(-Wno-literal-suffix COMPILER_SUPPORTS_NO_LITERAL_SUFFIX)
|
||||
if(COMPILER_SUPPORTS_NO_LITERAL_SUFFIX)
|
||||
set(CEF_CXX_COMPILER_FLAGS "${CEF_CXX_COMPILER_FLAGS} -Wno-literal-suffix")
|
||||
endif()
|
||||
|
||||
# -Wno-narrowing = Don't warn about type narrowing
|
||||
CHECK_CXX_COMPILER_FLAG(-Wno-narrowing COMPILER_SUPPORTS_NO_NARROWING)
|
||||
if(COMPILER_SUPPORTS_NO_NARROWING)
|
||||
set(CEF_CXX_COMPILER_FLAGS "${CEF_CXX_COMPILER_FLAGS} -Wno-narrowing")
|
||||
endif()
|
||||
|
||||
if(PROJECT_ARCH STREQUAL "x86_64")
|
||||
# 64-bit architecture.
|
||||
set(CEF_COMPILER_FLAGS "${CEF_COMPILER_FLAGS} -m64 -march=x86-64")
|
||||
set(CEF_LINKER_FLAGS "${CEF_LINKER_FLAGS} -m64")
|
||||
elseif(PROJECT_ARCH STREQUAL "x86")
|
||||
# 32-bit architecture.
|
||||
set(CEF_COMPILER_FLAGS "${CEF_COMPILER_FLAGS} -msse2 -mfpmath=sse -mmmx -m32")
|
||||
set(CEF_LINKER_FLAGS "${CEF_LINKER_FLAGS} -m32")
|
||||
endif()
|
||||
|
||||
# Allow the Large File Support (LFS) interface to replace the old interface.
|
||||
add_definitions(-D_FILE_OFFSET_BITS=64)
|
||||
|
||||
# Standard libraries.
|
||||
set(CEF_STANDARD_LIBS "X11")
|
||||
|
||||
# CEF directory paths.
|
||||
set(CEF_RESOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Resources")
|
||||
set(CEF_BINARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_BUILD_TYPE}")
|
||||
set(CEF_BINARY_DIR_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/Debug")
|
||||
set(CEF_BINARY_DIR_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/Release")
|
||||
|
||||
# CEF library paths.
|
||||
set(CEF_LIB_DEBUG "${CEF_BINARY_DIR_DEBUG}/libcef.so")
|
||||
set(CEF_LIB_RELEASE "${CEF_BINARY_DIR_RELEASE}/libcef.so")
|
||||
|
||||
# List of CEF binary files.
|
||||
set(CEF_BINARY_FILES
|
||||
chrome-sandbox
|
||||
libcef.so
|
||||
natives_blob.bin
|
||||
snapshot_blob.bin
|
||||
)
|
||||
|
||||
# List of CEF resource files.
|
||||
set(CEF_RESOURCE_FILES
|
||||
cef.pak
|
||||
cef_100_percent.pak
|
||||
cef_200_percent.pak
|
||||
cef_extensions.pak
|
||||
devtools_resources.pak
|
||||
icudtl.dat
|
||||
locales
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
#
|
||||
# Define CEF-based targets.
|
||||
# Mac OS X configuration.
|
||||
#
|
||||
|
||||
# Include the libcef_dll_wrapper target.
|
||||
# Comes from the libcef_dll/CMakeLists.txt file in the binary distribution
|
||||
# directory.
|
||||
add_subdirectory(${CEF_LIBCEF_DLL_WRAPPER_PATH} libcef_dll_wrapper)
|
||||
if(OS_MACOSX)
|
||||
# Platform-specific compiler/linker flags.
|
||||
# See also SET_XCODE_TARGET_PROPERTIES in macros.cmake.
|
||||
set(CEF_LIBTYPE SHARED)
|
||||
# -fno-strict-aliasing = Avoid assumptions regarding non-aliasing of objects of different types
|
||||
# -fstack-protector = Protect some vulnerable functions from stack-smashing (security feature)
|
||||
# -funwind-tables = Support stack unwinding for backtrace()
|
||||
# -fvisibility=hidden = Give hidden visibility to declarations that are not explicitly marked as visible
|
||||
# -Wall = Enable all warnings
|
||||
# -Wendif-labels = Warn whenever an #else or an #endif is followed by text
|
||||
# -Werror = Treat warnings as errors
|
||||
# -Wextra = Enable additional warnings
|
||||
# -Wnewline-eof = Warn about no newline at end of file
|
||||
# -Wno-missing-field-initializers = Don't warn about missing field initializers
|
||||
# -Wno-unused-parameter = Don't warn about unused parameters
|
||||
set(CEF_COMPILER_FLAGS "-fno-strict-aliasing -fstack-protector -funwind-tables -fvisibility=hidden -Wall -Wendif-labels -Werror -Wextra -Wnewline-eof -Wno-missing-field-initializers -Wno-unused-parameter")
|
||||
# -std=c99 = Use the C99 language standard
|
||||
set(CEF_C_COMPILER_FLAGS "-std=c99")
|
||||
# -fno-exceptions = Disable exceptions
|
||||
# -fno-rtti = Disable real-time type information
|
||||
# -fno-threadsafe-statics = Don't generate thread-safe statics
|
||||
# -fobjc-call-cxx-cdtors = Call the constructor/destructor of C++ instance variables in ObjC objects
|
||||
# -fvisibility-inlines-hidden = Give hidden visibility to inlined class member functions
|
||||
# -std=gnu++11 = Use the C++11 language standard including GNU extensions
|
||||
# -Wno-narrowing = Don't warn about type narrowing
|
||||
# -Wsign-compare = Warn about mixed signed/unsigned type comparisons
|
||||
set(CEF_CXX_COMPILER_FLAGS "-fno-exceptions -fno-rtti -fno-threadsafe-statics -fobjc-call-cxx-cdtors -fvisibility-inlines-hidden -std=gnu++11 -Wno-narrowing -Wsign-compare")
|
||||
# -O0 = Disable optimizations
|
||||
# -g = Generate debug information
|
||||
set(CEF_COMPILER_FLAGS_DEBUG "-O0 -g")
|
||||
# -O3 = Optimize for maximum speed plus a few extras
|
||||
set(CEF_COMPILER_FLAGS_RELEASE "-O3")
|
||||
# -Wl,-search_paths_first = Search for static or shared library versions in the same pass
|
||||
# -Wl,-ObjC = Support creation of creation of ObjC static libraries
|
||||
# -Wl,-pie = Generate position-independent code suitable for executables only
|
||||
set(CEF_LINKER_FLAGS "-Wl,-search_paths_first -Wl,-ObjC -Wl,-pie")
|
||||
# -Wl,-dead_strip = Strip dead code
|
||||
set(CEF_LINKER_FLAGS_RELEASE "-Wl,-dead_strip")
|
||||
|
||||
# Include application targets.
|
||||
# Comes from the <target>/CMakeLists.txt file in the current directory.
|
||||
# TODO: Change these lines to match your project target when you copy this file.
|
||||
add_subdirectory(tests/cefclient)
|
||||
add_subdirectory(tests/cefsimple)
|
||||
add_subdirectory(tests/gtest)
|
||||
add_subdirectory(tests/ceftests)
|
||||
# Standard libraries.
|
||||
set(CEF_STANDARD_LIBS "-lpthread" "-framework Cocoa" "-framework AppKit")
|
||||
|
||||
# Find the newest available base SDK.
|
||||
execute_process(COMMAND xcode-select --print-path OUTPUT_VARIABLE XCODE_PATH OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
foreach(OS_VERSION 10.10 10.9 10.8 10.7)
|
||||
set(SDK "${XCODE_PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${OS_VERSION}.sdk")
|
||||
if(NOT "${CMAKE_OSX_SYSROOT}" AND EXISTS "${SDK}" AND IS_DIRECTORY "${SDK}")
|
||||
set(CMAKE_OSX_SYSROOT ${SDK})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Target SDK.
|
||||
set(CEF_TARGET_SDK "10.6")
|
||||
set(CEF_COMPILER_FLAGS "${CEF_COMPILER_FLAGS} -mmacosx-version-min=${CEF_TARGET_SDK}")
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET ${CEF_TARGET_SDK})
|
||||
|
||||
# Target architecture.
|
||||
if(PROJECT_ARCH STREQUAL "x86_64")
|
||||
set(CMAKE_OSX_ARCHITECTURES "x86_64")
|
||||
else()
|
||||
set(CMAKE_OSX_ARCHITECTURES "i386")
|
||||
endif()
|
||||
|
||||
# CEF directory paths.
|
||||
set(CEF_BINARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/$<CONFIGURATION>")
|
||||
set(CEF_BINARY_DIR_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/Debug")
|
||||
set(CEF_BINARY_DIR_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/Release")
|
||||
|
||||
# CEF library paths.
|
||||
set(CEF_LIB_DEBUG "${CEF_BINARY_DIR_DEBUG}/Chromium Embedded Framework.framework/Chromium Embedded Framework")
|
||||
set(CEF_LIB_RELEASE "${CEF_BINARY_DIR_RELEASE}/Chromium Embedded Framework.framework/Chromium Embedded Framework")
|
||||
endif()
|
||||
|
||||
|
||||
#
|
||||
# Windows configuration.
|
||||
#
|
||||
|
||||
if(OS_WINDOWS)
|
||||
# Consumers who run into LNK4099 warnings can pass /Z7 instead (see issue #385).
|
||||
set(CEF_DEBUG_INFO_FLAG "/Zi" CACHE STRING "Optional flag specifying specific /Z flag to use")
|
||||
|
||||
# Platform-specific compiler/linker flags.
|
||||
set(CEF_LIBTYPE STATIC)
|
||||
# /MP = Multiprocess compilation
|
||||
# /Gy = Enable function-level linking
|
||||
# /GR- = Disable run-time type information
|
||||
# /W4 = Warning level 4
|
||||
# /WX = Treat warnings as errors
|
||||
# /wd"4100" = Ignore "unreferenced formal parameter" warning
|
||||
# /wd"4127" = Ignore "conditional expression is constant" warning
|
||||
# /wd"4244" = Ignore "conversion possible loss of data" warning
|
||||
# /wd"4512" = Ignore "assignment operator could not be generated" warning
|
||||
# /wd"4701" = Ignore "potentially uninitialized local variable" warning
|
||||
# /wd"4702" = Ignore "unreachable code" warning
|
||||
# /wd"4996" = Ignore "function or variable may be unsafe" warning
|
||||
set(CEF_COMPILER_FLAGS "/MP /Gy /GR- /W4 /WX /wd\"4100\" /wd\"4127\" /wd\"4244\" /wd\"4512\" /wd\"4701\" /wd\"4702\" /wd\"4996\" ${CEF_DEBUG_INFO_FLAG}")
|
||||
# /MTd = Multithreaded debug runtime
|
||||
# /Od = Disable optimizations
|
||||
# /RTC1 = Enable basic run-time checks
|
||||
set(CEF_COMPILER_FLAGS_DEBUG "/MTd /RTC1 /Od")
|
||||
# /MT = Multithreaded release runtime
|
||||
# /O2 = Optimize for maximum speed
|
||||
# /Ob2 = Inline any suitable function
|
||||
# /GF = Enable string pooling
|
||||
# /D NDEBUG /D _NDEBUG = Not a debug build
|
||||
set(CEF_COMPILER_FLAGS_RELEASE "/MT /O2 /Ob2 /GF /D NDEBUG /D _NDEBUG")
|
||||
# /DEBUG = Generate debug information
|
||||
set(CEF_LINKER_FLAGS_DEBUG "/DEBUG")
|
||||
# /MANIFEST:NO = No default manifest (see ADD_WINDOWS_MANIFEST macro usage)
|
||||
set(CEF_EXE_LINKER_FLAGS "/MANIFEST:NO")
|
||||
|
||||
# Standard definitions
|
||||
# -DWIN32 -D_WIN32 -D_WINDOWS = Windows platform
|
||||
# -DUNICODE -D_UNICODE = Unicode build
|
||||
# -DWINVER=0x0602 -D_WIN32_WINNT=0x602 = Targeting Windows 8
|
||||
# -DNOMINMAX = Use the standard's templated min/max
|
||||
# -DWIN32_LEAN_AND_MEAN = Exclude less common API declarations
|
||||
# -D_HAS_EXCEPTIONS=0 = Disable exceptions
|
||||
add_definitions(-DWIN32 -D_WIN32 -D_WINDOWS -DUNICODE -D_UNICODE -DWINVER=0x0602
|
||||
-D_WIN32_WINNT=0x602 -DNOMINMAX -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0)
|
||||
|
||||
# Standard libraries.
|
||||
set(CEF_STANDARD_LIBS "comctl32.lib" "rpcrt4.lib" "shlwapi.lib")
|
||||
|
||||
# CEF directory paths.
|
||||
set(CEF_RESOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Resources")
|
||||
set(CEF_BINARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/$<CONFIGURATION>")
|
||||
set(CEF_BINARY_DIR_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/Debug")
|
||||
set(CEF_BINARY_DIR_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/Release")
|
||||
|
||||
# CEF library paths.
|
||||
set(CEF_LIB_DEBUG "${CEF_BINARY_DIR_DEBUG}/libcef.lib")
|
||||
set(CEF_LIB_RELEASE "${CEF_BINARY_DIR_RELEASE}/libcef.lib")
|
||||
|
||||
# List of CEF binary files.
|
||||
set(CEF_BINARY_FILES
|
||||
d3dcompiler_43.dll
|
||||
d3dcompiler_47.dll
|
||||
libcef.dll
|
||||
libEGL.dll
|
||||
libGLESv2.dll
|
||||
natives_blob.bin
|
||||
snapshot_blob.bin
|
||||
)
|
||||
if(PROJECT_ARCH STREQUAL "x86")
|
||||
# Only used on 32-bit platforms.
|
||||
set(CEF_BINARY_FILES
|
||||
${CEF_BINARY_FILES}
|
||||
wow_helper.exe
|
||||
)
|
||||
endif()
|
||||
|
||||
# List of CEF resource files.
|
||||
set(CEF_RESOURCE_FILES
|
||||
cef.pak
|
||||
cef_100_percent.pak
|
||||
cef_200_percent.pak
|
||||
cef_extensions.pak
|
||||
devtools_resources.pak
|
||||
icudtl.dat
|
||||
locales
|
||||
)
|
||||
|
||||
# Configure use of the sandbox.
|
||||
option(USE_SANDBOX "Enable or disable use of the sandbox." ON)
|
||||
if(USE_SANDBOX AND NOT MSVC_VERSION EQUAL 1800)
|
||||
# The cef_sandbox.lib static library is currently built with VS2013. It will
|
||||
# not link successfully with other VS versions.
|
||||
set(USE_SANDBOX OFF)
|
||||
endif()
|
||||
|
||||
if(USE_SANDBOX)
|
||||
# Definition required by cef_sandbox.lib.
|
||||
add_definitions(-DPSAPI_VERSION=1)
|
||||
# Definition used by apps to test if the sandbox is enabled.
|
||||
add_definitions(-DCEF_USE_SANDBOX)
|
||||
|
||||
# Libraries required by cef_sandbox.lib.
|
||||
set(CEF_SANDBOX_STANDARD_LIBS "dbghelp.lib" "psapi.lib")
|
||||
|
||||
# CEF sandbox library paths.
|
||||
set(CEF_SANDBOX_LIB_DEBUG "${CEF_BINARY_DIR_DEBUG}/cef_sandbox.lib")
|
||||
set(CEF_SANDBOX_LIB_RELEASE "${CEF_BINARY_DIR_RELEASE}/cef_sandbox.lib")
|
||||
endif()
|
||||
|
||||
# Configure use of ATL.
|
||||
option(USE_ATL "Enable or disable use of ATL." ON)
|
||||
if(USE_ATL)
|
||||
# Determine if the Visual Studio install supports ATL.
|
||||
get_filename_component(VC_BIN_DIR ${CMAKE_CXX_COMPILER} DIRECTORY)
|
||||
get_filename_component(VC_DIR ${VC_BIN_DIR} DIRECTORY)
|
||||
if(NOT IS_DIRECTORY "${VC_DIR}/atlmfc")
|
||||
set(USE_ATL OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(USE_ATL)
|
||||
# Definition used by apps to test if ATL support is enabled.
|
||||
add_definitions(-DCEF_USE_ATL)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
#
|
||||
# Post-configuration actions.
|
||||
#
|
||||
|
||||
# Merge compiler/linker flags.
|
||||
set(CMAKE_C_FLAGS "${CEF_COMPILER_FLAGS} ${CEF_C_COMPILER_FLAGS}")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CEF_COMPILER_FLAGS_DEBUG} ${CEF_C_COMPILER_FLAGS_DEBUG}")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CEF_COMPILER_FLAGS_RELEASE} ${CEF_C_COMPILER_FLAGS_RELEASE}")
|
||||
set(CMAKE_CXX_FLAGS "${CEF_COMPILER_FLAGS} ${CEF_CXX_COMPILER_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CEF_COMPILER_FLAGS_DEBUG} ${CEF_CXX_COMPILER_FLAGS_DEBUG}")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CEF_COMPILER_FLAGS_RELEASE} ${CEF_CXX_COMPILER_FLAGS_RELEASE}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CEF_LINKER_FLAGS} ${CEF_EXE_LINKER_FLAGS}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CEF_LINKER_FLAGS_DEBUG} ${CEF_EXE_LINKER_FLAGS_DEBUG}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CEF_LINKER_FLAGS_RELEASE} ${CEF_EXE_LINKER_FLAGS_RELEASE}")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CEF_LINKER_FLAGS} ${CEF_SHARED_LINKER_FLAGS}")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CEF_LINKER_FLAGS_DEBUG} ${CEF_SHARED_LINKER_FLAGS_DEBUG}")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CEF_LINKER_FLAGS_RELEASE} ${CEF_SHARED_LINKER_FLAGS_RELEASE}")
|
||||
|
||||
|
||||
#
|
||||
# Include target subdirectories.
|
||||
#
|
||||
|
||||
add_subdirectory(libcef_dll)
|
||||
add_subdirectory(cefclient)
|
||||
add_subdirectory(cefsimple)
|
||||
|
||||
|
||||
#
|
||||
# Display configuration settings.
|
||||
PRINT_CEF_CONFIG()
|
||||
#
|
||||
|
||||
message(STATUS "*** CONFIGURATION SETTINGS ***")
|
||||
message(STATUS "Generator: ${CMAKE_GENERATOR}")
|
||||
message(STATUS "Platform: ${CMAKE_SYSTEM_NAME}")
|
||||
message(STATUS "Project architecture: ${PROJECT_ARCH}")
|
||||
|
||||
if(${CMAKE_GENERATOR} STREQUAL "Ninja" OR ${CMAKE_GENERATOR} STREQUAL "Unix Makefiles")
|
||||
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
|
||||
endif()
|
||||
|
||||
if(OS_MACOSX)
|
||||
message(STATUS "Base SDK: ${CMAKE_OSX_SYSROOT}")
|
||||
message(STATUS "Target SDK: ${CEF_TARGET_SDK}")
|
||||
endif()
|
||||
|
||||
if(OS_WINDOWS)
|
||||
message(STATUS "CEF Windows sandbox: ${USE_SANDBOX}")
|
||||
message(STATUS "Visual Studio ATL support: ${USE_ATL}")
|
||||
endif()
|
||||
|
||||
set(LIBRARIES ${CEF_STANDARD_LIBS})
|
||||
if(OS_WINDOWS AND USE_SANDBOX)
|
||||
set(LIBRARIES ${LIBRARIES} ${CEF_SANDBOX_STANDARD_LIBS})
|
||||
endif()
|
||||
message(STATUS "Standard libraries: ${LIBRARIES}")
|
||||
|
||||
get_directory_property(DEFINITIONS COMPILE_DEFINITIONS)
|
||||
message(STATUS "Compiler definitions: ${DEFINITIONS}")
|
||||
|
||||
message(STATUS "C_FLAGS: ${CMAKE_C_FLAGS}")
|
||||
message(STATUS "C_FLAGS_DEBUG: ${CMAKE_C_FLAGS_DEBUG}")
|
||||
message(STATUS "C_FLAGS_RELEASE: ${CMAKE_C_FLAGS_RELEASE}")
|
||||
message(STATUS "CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
|
||||
message(STATUS "CXX_FLAGS_DEBUG: ${CMAKE_CXX_FLAGS_DEBUG}")
|
||||
message(STATUS "CXX_FLAGS_RELEASE: ${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
message(STATUS "EXE_LINKER_FLAGS: ${CMAKE_EXE_LINKER_FLAGS}")
|
||||
message(STATUS "EXE_LINKER_FLAGS_DEBUG: ${CMAKE_EXE_LINKER_FLAGS_DEBUG}")
|
||||
message(STATUS "EXE_LINKER_FLAGS_RELEASE: ${CMAKE_EXE_LINKER_FLAGS_RELEASE}")
|
||||
message(STATUS "SHARED_LINKER_FLAGS: ${CMAKE_SHARED_LINKER_FLAGS}")
|
||||
message(STATUS "SHARED_LINKER_FLAGS_DEBUG: ${CMAKE_SHARED_LINKER_FLAGS_DEBUG}")
|
||||
message(STATUS "SHARED_LINKER_FLAGS_RELEASE: ${CMAKE_SHARED_LINKER_FLAGS_RELEASE}")
|
||||
|
||||
if(OS_LINUX OR OS_WINDOWS)
|
||||
message(STATUS "CEF Binary files: ${CEF_BINARY_FILES}")
|
||||
message(STATUS "CEF Resource files: ${CEF_RESOURCE_FILES}")
|
||||
endif()
|
||||
|
13
README.md
13
README.md
@@ -5,12 +5,11 @@ The Chromium Embedded Framework (CEF) is a simple framework for embedding Chromi
|
||||
* Project Page - https://bitbucket.org/chromiumembedded/cef
|
||||
* Tutorial - https://bitbucket.org/chromiumembedded/cef/wiki/Tutorial
|
||||
* General Usage - https://bitbucket.org/chromiumembedded/cef/wiki/GeneralUsage
|
||||
* Master Build Quick-Start - https://bitbucket.org/chromiumembedded/cef/wiki/MasterBuildQuickStart
|
||||
* Branches and Building - https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
|
||||
* Support Forum - http://www.magpcss.org/ceforum/
|
||||
* CEF1 C++ API Docs - http://magpcss.org/ceforum/apidocs/
|
||||
* CEF3 C++ API Docs - http://magpcss.org/ceforum/apidocs3/
|
||||
* Downloads - http://opensource.spotify.com/cefbuilds/index.html
|
||||
* Downloads - http://www.magpcss.net/cef_downloads/ and http://cefbuilds.com (automated nightly builds)
|
||||
* Donations - http://www.magpcss.org/ceforum/donate.php
|
||||
|
||||
# Introduction
|
||||
@@ -24,15 +23,15 @@ CEF is a BSD-licensed open source project founded by Marshall Greenblatt in 2008
|
||||
|
||||
CEF supports a wide range of programming languages and operating systems and can be easily integrated into both new and existing applications. It was designed from the ground up with both performance and ease of use in mind. The base framework includes C and C++ programming interfaces exposed via native libraries that insulate the host application from Chromium and Blink implementation details. It provides close integration between the browser and the host application including support for custom plugins, protocols, JavaScript objects and JavaScript extensions. The host application can optionally control resource loading, navigation, context menus, printing and more, while taking advantage of the same performance and HTML5 technologies available in the Google Chrome Web browser.
|
||||
|
||||
Numerous individuals and organizations contribute time and resources to support CEF development, but more involvement from the community is always welcome. This includes support for both the core CEF project and external projects that integrate CEF with additional programming languages and frameworks (see the "External Projects" section below). If you are interested in donating time to help with CEF development please see the "Helping Out" section below. If you are interested in donating money to support general CEF development and infrastructure efforts please visit the [CEF Donations](http://www.magpcss.org/ceforum/donate.php) page.
|
||||
|
||||
# Getting Started
|
||||
|
||||
Users new to CEF development should start by reading the [Tutorial](https://bitbucket.org/chromiumembedded/cef/wiki/Tutorial) Wiki page for an overview of CEF usage and then proceed to the [GeneralUsage](https://bitbucket.org/chromiumembedded/cef/wiki/GeneralUsage) Wiki page for a more in-depth discussion or architectural and usage issues. Complete API documentation is available [here](http://magpcss.org/ceforum/apidocs3/). CEF support and related discussion is available on the [CEF Forum](http://www.magpcss.org/ceforum/).
|
||||
|
||||
Numerous individuals and organizations contribute time and resources to support CEF development, but more involvement from the community is always welcome. This includes support for both the core CEF project and external projects that integrate CEF with additional programming languages and frameworks (see the "External Projects" section below). If you are interested in donating time to help with CEF development please see the "Helping Out" section below. If you are interested in donating money to support general CEF development and infrastructure efforts please visit the [CEF Donations](http://www.magpcss.org/ceforum/donate.php) page.
|
||||
|
||||
# Binary Distributions
|
||||
|
||||
Binary distributions, which include all files necessary to build a CEF-based application, are available on the [Downloads](http://opensource.spotify.com/cefbuilds/index.html) page. Binary distributions are stand-alone and do not require the download of CEF or Chromium source code. Symbol files for debugging binary distributions of libcef can also be downloaded from the above links.
|
||||
Binary distributions, which include all files necessary to build a CEF-based application, are available on the [Downloads](http://www.magpcss.net/cef_downloads/) page. Automated nightly builds, available from http://cefbuilds.com, include the newest changes but may not be fully tested. Binary distributions are stand-alone and do not require the download of CEF or Chromium source code. Symbol files for debugging binary distributions of libcef can also be downloaded from the above links.
|
||||
|
||||
Release notes for past and current CEF binary distributions are available [here](https://bitbucket.org/chromiumembedded/cef/wiki/ReleaseNotes).
|
||||
|
||||
# Source Distributions
|
||||
|
||||
|
40
cef.gypi
Normal file
40
cef.gypi
Normal file
@@ -0,0 +1,40 @@
|
||||
# Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights
|
||||
# reserved. Use of this source code is governed by a BSD-style license that
|
||||
# can be found in the LICENSE file.
|
||||
|
||||
{
|
||||
'variables': {
|
||||
# Don't use the chrome style plugin with CEF.
|
||||
'clang_use_chrome_plugins': 0,
|
||||
# Set ENABLE_PRINTING=1 ENABLE_BASIC_PRINTING=1.
|
||||
'enable_basic_printing': 1,
|
||||
'enable_print_preview': 0,
|
||||
# Enable support for Widevine CDM.
|
||||
'enable_widevine': 1,
|
||||
# Disable support for plugin installation.
|
||||
'enable_plugin_installation': 0,
|
||||
'conditions': [
|
||||
# Directory for CEF source files.
|
||||
[ 'OS=="win"', {
|
||||
'cef_directory' : '<!(echo %CEF_DIRECTORY%)',
|
||||
}, { # OS!="win"
|
||||
'cef_directory' : '<!(echo $CEF_DIRECTORY)',
|
||||
}],
|
||||
[ 'OS=="mac"', {
|
||||
# Strip symbols and create dSYM files for the Release target.
|
||||
'mac_strip_release': 1,
|
||||
}],
|
||||
['os_posix==1 and OS!="mac" and OS!="android"', {
|
||||
# Disable theme support on Linux so we don't need to implement
|
||||
# ThemeService[Factory] classes.
|
||||
'enable_themes': 0,
|
||||
}]
|
||||
]
|
||||
}, 'conditions': [
|
||||
['os_posix==1 and OS!="mac" and OS!="android"', {
|
||||
'target_defaults': {
|
||||
'cflags_cc': ['-Wno-deprecated-declarations'],
|
||||
},
|
||||
}]
|
||||
],
|
||||
}
|
190
cef_paths.gypi
190
cef_paths.gypi
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights
|
||||
# Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
# reserved. Use of this source code is governed by a BSD-style license that
|
||||
# can be found in the LICENSE file.
|
||||
#
|
||||
@@ -21,7 +21,6 @@
|
||||
'include/cef_command_line.h',
|
||||
'include/cef_context_menu_handler.h',
|
||||
'include/cef_cookie.h',
|
||||
'include/cef_crash_util.h',
|
||||
'include/cef_dialog_handler.h',
|
||||
'include/cef_display_handler.h',
|
||||
'include/cef_dom.h',
|
||||
@@ -29,19 +28,16 @@
|
||||
'include/cef_download_item.h',
|
||||
'include/cef_drag_data.h',
|
||||
'include/cef_drag_handler.h',
|
||||
'include/cef_file_util.h',
|
||||
'include/cef_find_handler.h',
|
||||
'include/cef_focus_handler.h',
|
||||
'include/cef_frame.h',
|
||||
'include/cef_geolocation.h',
|
||||
'include/cef_geolocation_handler.h',
|
||||
'include/cef_image.h',
|
||||
'include/cef_jsdialog_handler.h',
|
||||
'include/cef_keyboard_handler.h',
|
||||
'include/cef_life_span_handler.h',
|
||||
'include/cef_load_handler.h',
|
||||
'include/cef_menu_model.h',
|
||||
'include/cef_menu_model_delegate.h',
|
||||
'include/cef_navigation_entry.h',
|
||||
'include/cef_origin_whitelist.h',
|
||||
'include/cef_parser.h',
|
||||
@@ -63,41 +59,17 @@
|
||||
'include/cef_response_filter.h',
|
||||
'include/cef_scheme.h',
|
||||
'include/cef_ssl_info.h',
|
||||
'include/cef_ssl_status.h',
|
||||
'include/cef_stream.h',
|
||||
'include/cef_string_visitor.h',
|
||||
'include/cef_task.h',
|
||||
'include/cef_thread.h',
|
||||
'include/cef_trace.h',
|
||||
'include/cef_urlrequest.h',
|
||||
'include/cef_v8.h',
|
||||
'include/cef_values.h',
|
||||
'include/cef_waitable_event.h',
|
||||
'include/cef_web_plugin.h',
|
||||
'include/cef_x509_certificate.h',
|
||||
'include/cef_xml_reader.h',
|
||||
'include/cef_zip_reader.h',
|
||||
'include/test/cef_translator_test.h',
|
||||
'include/views/cef_box_layout.h',
|
||||
'include/views/cef_browser_view.h',
|
||||
'include/views/cef_browser_view_delegate.h',
|
||||
'include/views/cef_button.h',
|
||||
'include/views/cef_button_delegate.h',
|
||||
'include/views/cef_display.h',
|
||||
'include/views/cef_fill_layout.h',
|
||||
'include/views/cef_label_button.h',
|
||||
'include/views/cef_layout.h',
|
||||
'include/views/cef_menu_button.h',
|
||||
'include/views/cef_menu_button_delegate.h',
|
||||
'include/views/cef_panel.h',
|
||||
'include/views/cef_panel_delegate.h',
|
||||
'include/views/cef_scroll_view.h',
|
||||
'include/views/cef_textfield.h',
|
||||
'include/views/cef_textfield_delegate.h',
|
||||
'include/views/cef_view.h',
|
||||
'include/views/cef_view_delegate.h',
|
||||
'include/views/cef_window.h',
|
||||
'include/views/cef_window_delegate.h',
|
||||
],
|
||||
'autogen_capi_includes': [
|
||||
'include/capi/cef_app_capi.h',
|
||||
@@ -109,7 +81,6 @@
|
||||
'include/capi/cef_command_line_capi.h',
|
||||
'include/capi/cef_context_menu_handler_capi.h',
|
||||
'include/capi/cef_cookie_capi.h',
|
||||
'include/capi/cef_crash_util_capi.h',
|
||||
'include/capi/cef_dialog_handler_capi.h',
|
||||
'include/capi/cef_display_handler_capi.h',
|
||||
'include/capi/cef_dom_capi.h',
|
||||
@@ -117,19 +88,16 @@
|
||||
'include/capi/cef_download_item_capi.h',
|
||||
'include/capi/cef_drag_data_capi.h',
|
||||
'include/capi/cef_drag_handler_capi.h',
|
||||
'include/capi/cef_file_util_capi.h',
|
||||
'include/capi/cef_find_handler_capi.h',
|
||||
'include/capi/cef_focus_handler_capi.h',
|
||||
'include/capi/cef_frame_capi.h',
|
||||
'include/capi/cef_geolocation_capi.h',
|
||||
'include/capi/cef_geolocation_handler_capi.h',
|
||||
'include/capi/cef_image_capi.h',
|
||||
'include/capi/cef_jsdialog_handler_capi.h',
|
||||
'include/capi/cef_keyboard_handler_capi.h',
|
||||
'include/capi/cef_life_span_handler_capi.h',
|
||||
'include/capi/cef_load_handler_capi.h',
|
||||
'include/capi/cef_menu_model_capi.h',
|
||||
'include/capi/cef_menu_model_delegate_capi.h',
|
||||
'include/capi/cef_navigation_entry_capi.h',
|
||||
'include/capi/cef_origin_whitelist_capi.h',
|
||||
'include/capi/cef_parser_capi.h',
|
||||
@@ -151,41 +119,17 @@
|
||||
'include/capi/cef_response_filter_capi.h',
|
||||
'include/capi/cef_scheme_capi.h',
|
||||
'include/capi/cef_ssl_info_capi.h',
|
||||
'include/capi/cef_ssl_status_capi.h',
|
||||
'include/capi/cef_stream_capi.h',
|
||||
'include/capi/cef_string_visitor_capi.h',
|
||||
'include/capi/cef_task_capi.h',
|
||||
'include/capi/cef_thread_capi.h',
|
||||
'include/capi/cef_trace_capi.h',
|
||||
'include/capi/cef_urlrequest_capi.h',
|
||||
'include/capi/cef_v8_capi.h',
|
||||
'include/capi/cef_values_capi.h',
|
||||
'include/capi/cef_waitable_event_capi.h',
|
||||
'include/capi/cef_web_plugin_capi.h',
|
||||
'include/capi/cef_x509_certificate_capi.h',
|
||||
'include/capi/cef_xml_reader_capi.h',
|
||||
'include/capi/cef_zip_reader_capi.h',
|
||||
'include/capi/test/cef_translator_test_capi.h',
|
||||
'include/capi/views/cef_box_layout_capi.h',
|
||||
'include/capi/views/cef_browser_view_capi.h',
|
||||
'include/capi/views/cef_browser_view_delegate_capi.h',
|
||||
'include/capi/views/cef_button_capi.h',
|
||||
'include/capi/views/cef_button_delegate_capi.h',
|
||||
'include/capi/views/cef_display_capi.h',
|
||||
'include/capi/views/cef_fill_layout_capi.h',
|
||||
'include/capi/views/cef_label_button_capi.h',
|
||||
'include/capi/views/cef_layout_capi.h',
|
||||
'include/capi/views/cef_menu_button_capi.h',
|
||||
'include/capi/views/cef_menu_button_delegate_capi.h',
|
||||
'include/capi/views/cef_panel_capi.h',
|
||||
'include/capi/views/cef_panel_delegate_capi.h',
|
||||
'include/capi/views/cef_scroll_view_capi.h',
|
||||
'include/capi/views/cef_textfield_capi.h',
|
||||
'include/capi/views/cef_textfield_delegate_capi.h',
|
||||
'include/capi/views/cef_view_capi.h',
|
||||
'include/capi/views/cef_view_delegate_capi.h',
|
||||
'include/capi/views/cef_window_capi.h',
|
||||
'include/capi/views/cef_window_delegate_capi.h',
|
||||
],
|
||||
'autogen_library_side': [
|
||||
'libcef_dll/ctocpp/app_ctocpp.cc',
|
||||
@@ -196,22 +140,12 @@
|
||||
'libcef_dll/cpptoc/before_download_callback_cpptoc.h',
|
||||
'libcef_dll/cpptoc/binary_value_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/binary_value_cpptoc.h',
|
||||
'libcef_dll/cpptoc/views/box_layout_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/box_layout_cpptoc.h',
|
||||
'libcef_dll/cpptoc/browser_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/browser_cpptoc.h',
|
||||
'libcef_dll/cpptoc/browser_host_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/browser_host_cpptoc.h',
|
||||
'libcef_dll/ctocpp/browser_process_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/browser_process_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/views/browser_view_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/browser_view_cpptoc.h',
|
||||
'libcef_dll/ctocpp/views/browser_view_delegate_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/browser_view_delegate_ctocpp.h',
|
||||
'libcef_dll/cpptoc/views/button_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/button_cpptoc.h',
|
||||
'libcef_dll/ctocpp/views/button_delegate_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/button_delegate_ctocpp.h',
|
||||
'libcef_dll/cpptoc/callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/client_ctocpp.cc',
|
||||
@@ -240,14 +174,10 @@
|
||||
'libcef_dll/ctocpp/dialog_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/dictionary_value_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/dictionary_value_cpptoc.h',
|
||||
'libcef_dll/cpptoc/views/display_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/display_cpptoc.h',
|
||||
'libcef_dll/ctocpp/display_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/display_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/download_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/download_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/download_image_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/download_image_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/download_item_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/download_item_cpptoc.h',
|
||||
'libcef_dll/cpptoc/download_item_callback_cpptoc.cc',
|
||||
@@ -260,8 +190,6 @@
|
||||
'libcef_dll/ctocpp/end_tracing_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/file_dialog_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/file_dialog_callback_cpptoc.h',
|
||||
'libcef_dll/cpptoc/views/fill_layout_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/fill_layout_cpptoc.h',
|
||||
'libcef_dll/ctocpp/find_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/find_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/focus_handler_ctocpp.cc',
|
||||
@@ -274,40 +202,24 @@
|
||||
'libcef_dll/ctocpp/geolocation_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/get_geolocation_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/get_geolocation_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/image_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/image_cpptoc.h',
|
||||
'libcef_dll/cpptoc/jsdialog_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/jsdialog_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/jsdialog_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/jsdialog_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/keyboard_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/keyboard_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/views/label_button_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/label_button_cpptoc.h',
|
||||
'libcef_dll/cpptoc/views/layout_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/layout_cpptoc.h',
|
||||
'libcef_dll/ctocpp/life_span_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/life_span_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/list_value_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/list_value_cpptoc.h',
|
||||
'libcef_dll/ctocpp/load_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/load_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/views/menu_button_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/menu_button_cpptoc.h',
|
||||
'libcef_dll/ctocpp/views/menu_button_delegate_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/menu_button_delegate_ctocpp.h',
|
||||
'libcef_dll/cpptoc/menu_model_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/menu_model_cpptoc.h',
|
||||
'libcef_dll/ctocpp/menu_model_delegate_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/menu_model_delegate_ctocpp.h',
|
||||
'libcef_dll/cpptoc/navigation_entry_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/navigation_entry_cpptoc.h',
|
||||
'libcef_dll/ctocpp/navigation_entry_visitor_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/navigation_entry_visitor_ctocpp.h',
|
||||
'libcef_dll/cpptoc/views/panel_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/panel_cpptoc.h',
|
||||
'libcef_dll/ctocpp/views/panel_delegate_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/panel_delegate_ctocpp.h',
|
||||
'libcef_dll/ctocpp/pdf_print_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/pdf_print_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/post_data_cpptoc.cc',
|
||||
@@ -326,8 +238,6 @@
|
||||
'libcef_dll/cpptoc/process_message_cpptoc.h',
|
||||
'libcef_dll/ctocpp/read_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/read_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/register_cdm_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/register_cdm_callback_ctocpp.h',
|
||||
'libcef_dll/ctocpp/render_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/render_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/render_process_handler_ctocpp.cc',
|
||||
@@ -342,8 +252,6 @@
|
||||
'libcef_dll/ctocpp/request_context_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/request_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/request_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/resolve_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/resolve_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/resource_bundle_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/resource_bundle_cpptoc.h',
|
||||
'libcef_dll/ctocpp/resource_bundle_handler_ctocpp.cc',
|
||||
@@ -358,18 +266,14 @@
|
||||
'libcef_dll/cpptoc/run_context_menu_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/sslcert_principal_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/sslcert_principal_cpptoc.h',
|
||||
'libcef_dll/cpptoc/sslinfo_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/sslinfo_cpptoc.h',
|
||||
'libcef_dll/cpptoc/sslstatus_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/sslstatus_cpptoc.h',
|
||||
'libcef_dll/ctocpp/scheme_handler_factory_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/scheme_handler_factory_ctocpp.h',
|
||||
'libcef_dll/cpptoc/scheme_registrar_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/scheme_registrar_cpptoc.h',
|
||||
'libcef_dll/cpptoc/views/scroll_view_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/scroll_view_cpptoc.h',
|
||||
'libcef_dll/cpptoc/select_client_certificate_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/select_client_certificate_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/set_cookie_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/set_cookie_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/stream_reader_cpptoc.cc',
|
||||
@@ -382,12 +286,6 @@
|
||||
'libcef_dll/ctocpp/task_ctocpp.h',
|
||||
'libcef_dll/cpptoc/task_runner_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/task_runner_cpptoc.h',
|
||||
'libcef_dll/cpptoc/views/textfield_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/textfield_cpptoc.h',
|
||||
'libcef_dll/ctocpp/views/textfield_delegate_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/textfield_delegate_ctocpp.h',
|
||||
'libcef_dll/cpptoc/thread_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/thread_cpptoc.h',
|
||||
'libcef_dll/cpptoc/test/translator_test_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/test/translator_test_cpptoc.h',
|
||||
'libcef_dll/ctocpp/test/translator_test_handler_ctocpp.cc',
|
||||
@@ -412,8 +310,6 @@
|
||||
'libcef_dll/cpptoc/v8exception_cpptoc.h',
|
||||
'libcef_dll/ctocpp/v8handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/v8handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/v8interceptor_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/v8interceptor_ctocpp.h',
|
||||
'libcef_dll/cpptoc/v8stack_frame_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/v8stack_frame_cpptoc.h',
|
||||
'libcef_dll/cpptoc/v8stack_trace_cpptoc.cc',
|
||||
@@ -422,28 +318,14 @@
|
||||
'libcef_dll/cpptoc/v8value_cpptoc.h',
|
||||
'libcef_dll/cpptoc/value_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/value_cpptoc.h',
|
||||
'libcef_dll/cpptoc/views/view_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/view_cpptoc.h',
|
||||
'libcef_dll/ctocpp/views/view_delegate_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/view_delegate_ctocpp.h',
|
||||
'libcef_dll/cpptoc/waitable_event_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/waitable_event_cpptoc.h',
|
||||
'libcef_dll/cpptoc/web_plugin_info_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/web_plugin_info_cpptoc.h',
|
||||
'libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.h',
|
||||
'libcef_dll/ctocpp/web_plugin_unstable_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/web_plugin_unstable_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/views/window_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/window_cpptoc.h',
|
||||
'libcef_dll/ctocpp/views/window_delegate_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/window_delegate_ctocpp.h',
|
||||
'libcef_dll/ctocpp/write_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/write_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/x509cert_principal_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/x509cert_principal_cpptoc.h',
|
||||
'libcef_dll/cpptoc/x509certificate_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/x509certificate_cpptoc.h',
|
||||
'libcef_dll/cpptoc/xml_reader_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/xml_reader_cpptoc.h',
|
||||
'libcef_dll/cpptoc/zip_reader_cpptoc.cc',
|
||||
@@ -458,22 +340,12 @@
|
||||
'libcef_dll/ctocpp/before_download_callback_ctocpp.h',
|
||||
'libcef_dll/ctocpp/binary_value_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/binary_value_ctocpp.h',
|
||||
'libcef_dll/ctocpp/views/box_layout_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/box_layout_ctocpp.h',
|
||||
'libcef_dll/ctocpp/browser_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/browser_ctocpp.h',
|
||||
'libcef_dll/ctocpp/browser_host_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/browser_host_ctocpp.h',
|
||||
'libcef_dll/cpptoc/browser_process_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/browser_process_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/views/browser_view_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/browser_view_ctocpp.h',
|
||||
'libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.h',
|
||||
'libcef_dll/ctocpp/views/button_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/button_ctocpp.h',
|
||||
'libcef_dll/cpptoc/views/button_delegate_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/button_delegate_cpptoc.h',
|
||||
'libcef_dll/ctocpp/callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/client_cpptoc.cc',
|
||||
@@ -502,14 +374,10 @@
|
||||
'libcef_dll/cpptoc/dialog_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/dictionary_value_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/dictionary_value_ctocpp.h',
|
||||
'libcef_dll/ctocpp/views/display_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/display_ctocpp.h',
|
||||
'libcef_dll/cpptoc/display_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/display_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/download_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/download_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/download_image_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/download_image_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/download_item_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/download_item_ctocpp.h',
|
||||
'libcef_dll/ctocpp/download_item_callback_ctocpp.cc',
|
||||
@@ -522,8 +390,6 @@
|
||||
'libcef_dll/cpptoc/end_tracing_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/file_dialog_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/file_dialog_callback_ctocpp.h',
|
||||
'libcef_dll/ctocpp/views/fill_layout_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/fill_layout_ctocpp.h',
|
||||
'libcef_dll/cpptoc/find_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/find_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/focus_handler_cpptoc.cc',
|
||||
@@ -536,40 +402,24 @@
|
||||
'libcef_dll/cpptoc/geolocation_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/get_geolocation_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/get_geolocation_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/image_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/image_ctocpp.h',
|
||||
'libcef_dll/ctocpp/jsdialog_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/jsdialog_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/jsdialog_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/jsdialog_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/keyboard_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/keyboard_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/views/label_button_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/label_button_ctocpp.h',
|
||||
'libcef_dll/ctocpp/views/layout_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/layout_ctocpp.h',
|
||||
'libcef_dll/cpptoc/life_span_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/life_span_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/list_value_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/list_value_ctocpp.h',
|
||||
'libcef_dll/cpptoc/load_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/load_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/views/menu_button_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/menu_button_ctocpp.h',
|
||||
'libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.h',
|
||||
'libcef_dll/ctocpp/menu_model_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/menu_model_ctocpp.h',
|
||||
'libcef_dll/cpptoc/menu_model_delegate_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/menu_model_delegate_cpptoc.h',
|
||||
'libcef_dll/ctocpp/navigation_entry_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/navigation_entry_ctocpp.h',
|
||||
'libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.h',
|
||||
'libcef_dll/ctocpp/views/panel_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/panel_ctocpp.h',
|
||||
'libcef_dll/cpptoc/views/panel_delegate_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/panel_delegate_cpptoc.h',
|
||||
'libcef_dll/cpptoc/pdf_print_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/pdf_print_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/post_data_ctocpp.cc',
|
||||
@@ -588,8 +438,6 @@
|
||||
'libcef_dll/ctocpp/process_message_ctocpp.h',
|
||||
'libcef_dll/cpptoc/read_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/read_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/register_cdm_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/register_cdm_callback_cpptoc.h',
|
||||
'libcef_dll/cpptoc/render_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/render_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/render_process_handler_cpptoc.cc',
|
||||
@@ -604,8 +452,6 @@
|
||||
'libcef_dll/cpptoc/request_context_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/request_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/request_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/resolve_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/resolve_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/resource_bundle_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/resource_bundle_ctocpp.h',
|
||||
'libcef_dll/cpptoc/resource_bundle_handler_cpptoc.cc',
|
||||
@@ -620,18 +466,14 @@
|
||||
'libcef_dll/ctocpp/run_context_menu_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/sslcert_principal_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/sslcert_principal_ctocpp.h',
|
||||
'libcef_dll/ctocpp/sslinfo_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/sslinfo_ctocpp.h',
|
||||
'libcef_dll/ctocpp/sslstatus_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/sslstatus_ctocpp.h',
|
||||
'libcef_dll/cpptoc/scheme_handler_factory_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h',
|
||||
'libcef_dll/ctocpp/scheme_registrar_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/scheme_registrar_ctocpp.h',
|
||||
'libcef_dll/ctocpp/views/scroll_view_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/scroll_view_ctocpp.h',
|
||||
'libcef_dll/ctocpp/select_client_certificate_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/select_client_certificate_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/set_cookie_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/set_cookie_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/stream_reader_ctocpp.cc',
|
||||
@@ -644,12 +486,6 @@
|
||||
'libcef_dll/cpptoc/task_cpptoc.h',
|
||||
'libcef_dll/ctocpp/task_runner_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/task_runner_ctocpp.h',
|
||||
'libcef_dll/ctocpp/views/textfield_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/textfield_ctocpp.h',
|
||||
'libcef_dll/cpptoc/views/textfield_delegate_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/textfield_delegate_cpptoc.h',
|
||||
'libcef_dll/ctocpp/thread_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/thread_ctocpp.h',
|
||||
'libcef_dll/ctocpp/test/translator_test_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/test/translator_test_ctocpp.h',
|
||||
'libcef_dll/cpptoc/test/translator_test_handler_cpptoc.cc',
|
||||
@@ -674,8 +510,6 @@
|
||||
'libcef_dll/ctocpp/v8exception_ctocpp.h',
|
||||
'libcef_dll/cpptoc/v8handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/v8handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/v8interceptor_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/v8interceptor_cpptoc.h',
|
||||
'libcef_dll/ctocpp/v8stack_frame_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/v8stack_frame_ctocpp.h',
|
||||
'libcef_dll/ctocpp/v8stack_trace_ctocpp.cc',
|
||||
@@ -684,28 +518,14 @@
|
||||
'libcef_dll/ctocpp/v8value_ctocpp.h',
|
||||
'libcef_dll/ctocpp/value_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/value_ctocpp.h',
|
||||
'libcef_dll/ctocpp/views/view_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/view_ctocpp.h',
|
||||
'libcef_dll/cpptoc/views/view_delegate_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/view_delegate_cpptoc.h',
|
||||
'libcef_dll/ctocpp/waitable_event_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/waitable_event_ctocpp.h',
|
||||
'libcef_dll/ctocpp/web_plugin_info_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/web_plugin_info_ctocpp.h',
|
||||
'libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h',
|
||||
'libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/views/window_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/window_ctocpp.h',
|
||||
'libcef_dll/cpptoc/views/window_delegate_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/window_delegate_cpptoc.h',
|
||||
'libcef_dll/cpptoc/write_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/write_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/x509cert_principal_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/x509cert_principal_ctocpp.h',
|
||||
'libcef_dll/ctocpp/x509certificate_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/x509certificate_ctocpp.h',
|
||||
'libcef_dll/ctocpp/xml_reader_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/xml_reader_ctocpp.h',
|
||||
'libcef_dll/ctocpp/zip_reader_ctocpp.cc',
|
||||
|
277
cef_paths2.gypi
277
cef_paths2.gypi
@@ -3,6 +3,10 @@
|
||||
# can be found in the LICENSE file.
|
||||
|
||||
{
|
||||
'includes': [
|
||||
# Bring in the autogenerated source file lists.
|
||||
'cef_paths.gypi',
|
||||
],
|
||||
'variables': {
|
||||
'includes_common': [
|
||||
'include/base/cef_atomic_ref_count.h',
|
||||
@@ -36,6 +40,9 @@
|
||||
'include/base/internal/cef_raw_scoped_refptr_mismatch_checker.h',
|
||||
'include/base/internal/cef_thread_checker_impl.h',
|
||||
'include/cef_base.h',
|
||||
'include/cef_pack_resources.h',
|
||||
'include/cef_pack_strings.h',
|
||||
'include/cef_runnable.h',
|
||||
'include/cef_version.h',
|
||||
'include/internal/cef_export.h',
|
||||
'include/internal/cef_logging_internal.h',
|
||||
@@ -51,9 +58,11 @@
|
||||
'include/internal/cef_trace_event_internal.h',
|
||||
'include/internal/cef_types.h',
|
||||
'include/internal/cef_types_wrappers.h',
|
||||
'<@(autogen_cpp_includes)',
|
||||
],
|
||||
'includes_capi': [
|
||||
'include/capi/cef_base_capi.h',
|
||||
'<@(autogen_capi_includes)',
|
||||
],
|
||||
'includes_wrapper': [
|
||||
'include/wrapper/cef_byte_read_handler.h',
|
||||
@@ -61,7 +70,6 @@
|
||||
'include/wrapper/cef_helpers.h',
|
||||
'include/wrapper/cef_message_router.h',
|
||||
'include/wrapper/cef_resource_manager.h',
|
||||
'include/wrapper/cef_scoped_temp_dir.h',
|
||||
'include/wrapper/cef_stream_resource_handler.h',
|
||||
'include/wrapper/cef_xml_object.h',
|
||||
'include/wrapper/cef_zip_archive.h',
|
||||
@@ -82,7 +90,6 @@
|
||||
],
|
||||
'includes_linux': [
|
||||
'include/base/internal/cef_atomicops_atomicword_compat.h',
|
||||
'include/base/internal/cef_atomicops_arm_gcc.h',
|
||||
'include/base/internal/cef_atomicops_x86_gcc.h',
|
||||
'include/internal/cef_linux.h',
|
||||
'include/internal/cef_types_linux.h',
|
||||
@@ -98,8 +105,9 @@
|
||||
'libcef_dll/transfer_util.cc',
|
||||
'libcef_dll/transfer_util.h',
|
||||
'libcef_dll/wrapper_types.h',
|
||||
'<@(autogen_library_side)',
|
||||
],
|
||||
'libcef_dll_wrapper_sources_base': [
|
||||
'libcef_dll_wrapper_sources_common': [
|
||||
'libcef_dll/base/cef_atomicops_x86_gcc.cc',
|
||||
'libcef_dll/base/cef_bind_helpers.cc',
|
||||
'libcef_dll/base/cef_callback_helpers.cc',
|
||||
@@ -112,8 +120,6 @@
|
||||
'libcef_dll/base/cef_thread_checker_impl.cc',
|
||||
'libcef_dll/base/cef_thread_collision_warner.cc',
|
||||
'libcef_dll/base/cef_weak_ptr.cc',
|
||||
],
|
||||
'libcef_dll_wrapper_sources_common': [
|
||||
'libcef_dll/cpptoc/base_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/base_cpptoc.h',
|
||||
'libcef_dll/cpptoc/cpptoc.h',
|
||||
@@ -126,64 +132,12 @@
|
||||
'libcef_dll/wrapper/cef_closure_task.cc',
|
||||
'libcef_dll/wrapper/cef_message_router.cc',
|
||||
'libcef_dll/wrapper/cef_resource_manager.cc',
|
||||
'libcef_dll/wrapper/cef_scoped_temp_dir.cc',
|
||||
'libcef_dll/wrapper/cef_stream_resource_handler.cc',
|
||||
'libcef_dll/wrapper/cef_xml_object.cc',
|
||||
'libcef_dll/wrapper/cef_zip_archive.cc',
|
||||
'libcef_dll/wrapper/libcef_dll_wrapper.cc',
|
||||
'libcef_dll/wrapper/libcef_dll_wrapper2.cc',
|
||||
],
|
||||
'shared_sources_browser': [
|
||||
'tests/shared/browser/client_app_browser.cc',
|
||||
'tests/shared/browser/client_app_browser.h',
|
||||
'tests/shared/browser/geometry_util.cc',
|
||||
'tests/shared/browser/geometry_util.h',
|
||||
'tests/shared/browser/main_message_loop.cc',
|
||||
'tests/shared/browser/main_message_loop.h',
|
||||
'tests/shared/browser/main_message_loop_external_pump.cc',
|
||||
'tests/shared/browser/main_message_loop_external_pump.h',
|
||||
'tests/shared/browser/main_message_loop_std.cc',
|
||||
'tests/shared/browser/main_message_loop_std.h',
|
||||
'tests/shared/browser/resource_util.h',
|
||||
'tests/shared/browser/resource_util.cc',
|
||||
'tests/shared/browser/resource_util.h',
|
||||
],
|
||||
'shared_sources_common': [
|
||||
'tests/shared/common/client_app.cc',
|
||||
'tests/shared/common/client_app.h',
|
||||
'tests/shared/common/client_app_other.cc',
|
||||
'tests/shared/common/client_app_other.h',
|
||||
'tests/shared/common/client_switches.cc',
|
||||
'tests/shared/common/client_switches.h',
|
||||
],
|
||||
'shared_sources_renderer': [
|
||||
'tests/shared/renderer/client_app_renderer.cc',
|
||||
'tests/shared/renderer/client_app_renderer.h',
|
||||
],
|
||||
'shared_sources_resources': [
|
||||
'tests/shared/resources/osr_test.html',
|
||||
'tests/shared/resources/pdf.html',
|
||||
'tests/shared/resources/pdf.pdf',
|
||||
'tests/shared/resources/window_icon.1x.png',
|
||||
'tests/shared/resources/window_icon.2x.png',
|
||||
],
|
||||
'shared_sources_linux': [
|
||||
'tests/shared/browser/main_message_loop_external_pump_linux.cc',
|
||||
'tests/shared/browser/resource_util_posix.cc',
|
||||
],
|
||||
'shared_sources_mac': [
|
||||
'tests/shared/browser/main_message_loop_external_pump_mac.mm',
|
||||
'tests/shared/browser/resource_util_mac.mm',
|
||||
'tests/shared/browser/resource_util_posix.cc',
|
||||
],
|
||||
'shared_sources_mac_helper': [
|
||||
'tests/shared/process_helper_mac.cc',
|
||||
],
|
||||
'shared_sources_win': [
|
||||
'tests/shared/browser/main_message_loop_external_pump_win.cc',
|
||||
'tests/shared/browser/resource_util_win.cc',
|
||||
'tests/shared/browser/util_win.cc',
|
||||
'tests/shared/browser/util_win.h',
|
||||
'<@(autogen_client_side)',
|
||||
],
|
||||
'cefclient_sources_browser': [
|
||||
'tests/cefclient/browser/binding_test.cc',
|
||||
@@ -192,9 +146,9 @@
|
||||
'tests/cefclient/browser/browser_window.h',
|
||||
'tests/cefclient/browser/bytes_write_handler.cc',
|
||||
'tests/cefclient/browser/bytes_write_handler.h',
|
||||
'tests/cefclient/browser/client_app_browser.cc',
|
||||
'tests/cefclient/browser/client_app_browser.h',
|
||||
'tests/cefclient/browser/client_app_delegates_browser.cc',
|
||||
'tests/cefclient/browser/client_browser.cc',
|
||||
'tests/cefclient/browser/client_browser.h',
|
||||
'tests/cefclient/browser/client_handler.cc',
|
||||
'tests/cefclient/browser/client_handler.h',
|
||||
'tests/cefclient/browser/client_handler_osr.cc',
|
||||
@@ -204,23 +158,27 @@
|
||||
'tests/cefclient/browser/client_types.h',
|
||||
'tests/cefclient/browser/dialog_test.cc',
|
||||
'tests/cefclient/browser/dialog_test.h',
|
||||
'tests/cefclient/browser/drm_test.cc',
|
||||
'tests/cefclient/browser/drm_test.h',
|
||||
'tests/cefclient/browser/geometry_util.cc',
|
||||
'tests/cefclient/browser/geometry_util.h',
|
||||
'tests/cefclient/browser/main_context.cc',
|
||||
'tests/cefclient/browser/main_context.h',
|
||||
'tests/cefclient/browser/main_context_impl.cc',
|
||||
'tests/cefclient/browser/main_context_impl.h',
|
||||
'tests/cefclient/browser/main_message_loop.h',
|
||||
'tests/cefclient/browser/main_message_loop.cc',
|
||||
'tests/cefclient/browser/main_message_loop_std.h',
|
||||
'tests/cefclient/browser/main_message_loop_std.cc',
|
||||
'tests/cefclient/browser/osr_dragdrop_events.h',
|
||||
'tests/cefclient/browser/osr_renderer.h',
|
||||
'tests/cefclient/browser/osr_renderer.cc',
|
||||
'tests/cefclient/browser/preferences_test.cc',
|
||||
'tests/cefclient/browser/preferences_test.h',
|
||||
'tests/cefclient/browser/resource.h',
|
||||
'tests/cefclient/browser/resource_util.h',
|
||||
'tests/cefclient/browser/response_filter_test.cc',
|
||||
'tests/cefclient/browser/response_filter_test.h',
|
||||
'tests/cefclient/browser/root_window.cc',
|
||||
'tests/cefclient/browser/root_window.h',
|
||||
'tests/cefclient/browser/root_window_create.cc',
|
||||
'tests/cefclient/browser/root_window_manager.cc',
|
||||
'tests/cefclient/browser/root_window_manager.h',
|
||||
'tests/cefclient/browser/scheme_test.cc',
|
||||
@@ -232,16 +190,22 @@
|
||||
'tests/cefclient/browser/urlrequest_test.h',
|
||||
'tests/cefclient/browser/window_test.cc',
|
||||
'tests/cefclient/browser/window_test.h',
|
||||
'tests/cefclient/browser/window_test_runner.cc',
|
||||
'tests/cefclient/browser/window_test_runner.h',
|
||||
],
|
||||
'cefclient_sources_common': [
|
||||
'tests/cefclient/common/client_app.cc',
|
||||
'tests/cefclient/common/client_app.h',
|
||||
'tests/cefclient/common/client_app_delegates_common.cc',
|
||||
'tests/cefclient/common/client_app_other.cc',
|
||||
'tests/cefclient/common/client_app_other.h',
|
||||
'tests/cefclient/common/client_switches.cc',
|
||||
'tests/cefclient/common/client_switches.h',
|
||||
'tests/cefclient/common/scheme_test_common.cc',
|
||||
'tests/cefclient/common/scheme_test_common.h',
|
||||
],
|
||||
'cefclient_sources_renderer': [
|
||||
'tests/cefclient/renderer/client_app_delegates_renderer.cc',
|
||||
'tests/cefclient/renderer/client_app_renderer.cc',
|
||||
'tests/cefclient/renderer/client_app_renderer.h',
|
||||
'tests/cefclient/renderer/client_renderer.cc',
|
||||
'tests/cefclient/renderer/client_renderer.h',
|
||||
'tests/cefclient/renderer/performance_test.cc',
|
||||
@@ -252,13 +216,12 @@
|
||||
'cefclient_sources_resources': [
|
||||
'tests/cefclient/resources/binding.html',
|
||||
'tests/cefclient/resources/dialogs.html',
|
||||
'tests/cefclient/resources/draggable.html',
|
||||
'tests/cefclient/resources/drm.html',
|
||||
'tests/cefclient/resources/localstorage.html',
|
||||
'tests/cefclient/resources/logo.png',
|
||||
'tests/cefclient/resources/menu_icon.1x.png',
|
||||
'tests/cefclient/resources/menu_icon.2x.png',
|
||||
'tests/cefclient/resources/osr_test.html',
|
||||
'tests/cefclient/resources/other_tests.html',
|
||||
'tests/cefclient/resources/pdf.html',
|
||||
'tests/cefclient/resources/pdf.pdf',
|
||||
'tests/cefclient/resources/performance.html',
|
||||
'tests/cefclient/resources/performance2.html',
|
||||
'tests/cefclient/resources/preferences.html',
|
||||
@@ -278,28 +241,25 @@
|
||||
'tests/cefclient/browser/main_message_loop_multithreaded_win.h',
|
||||
'tests/cefclient/browser/osr_dragdrop_win.cc',
|
||||
'tests/cefclient/browser/osr_dragdrop_win.h',
|
||||
'tests/cefclient/browser/osr_ime_handler_win.cc',
|
||||
'tests/cefclient/browser/osr_ime_handler_win.h',
|
||||
'tests/cefclient/browser/osr_window_win.cc',
|
||||
'tests/cefclient/browser/osr_window_win.h',
|
||||
'tests/cefclient/browser/resource_util_win_idmap.cc',
|
||||
'tests/cefclient/browser/root_window_views.cc',
|
||||
'tests/cefclient/browser/root_window_views.h',
|
||||
'tests/cefclient/browser/resource_util_win.cc',
|
||||
'tests/cefclient/browser/root_window_win.cc',
|
||||
'tests/cefclient/browser/root_window_win.h',
|
||||
'tests/cefclient/browser/temp_window_win.cc',
|
||||
'tests/cefclient/browser/temp_window_win.h',
|
||||
'tests/cefclient/browser/views_window.cc',
|
||||
'tests/cefclient/browser/views_window.h',
|
||||
'tests/cefclient/browser/window_test_runner_views.cc',
|
||||
'tests/cefclient/browser/window_test_runner_views.h',
|
||||
'tests/cefclient/browser/window_test_runner_win.cc',
|
||||
'tests/cefclient/browser/window_test_runner_win.h',
|
||||
'tests/cefclient/browser/util_win.cc',
|
||||
'tests/cefclient/browser/util_win.h',
|
||||
'tests/cefclient/browser/window_test_win.cc',
|
||||
'tests/cefclient/cefclient_win.cc',
|
||||
'tests/cefclient/resources/win/cefclient.exe.manifest',
|
||||
'tests/cefclient/resources/win/cefclient.ico',
|
||||
'tests/cefclient/resources/win/cefclient.rc',
|
||||
'tests/cefclient/resources/win/small.ico',
|
||||
'<@(cefclient_sources_browser)',
|
||||
'<@(cefclient_sources_common)',
|
||||
'<@(cefclient_sources_renderer)',
|
||||
'<@(cefclient_sources_resources)',
|
||||
],
|
||||
'cefclient_sources_mac': [
|
||||
'tests/cefclient/browser/browser_window_osr_mac.h',
|
||||
@@ -307,21 +267,28 @@
|
||||
'tests/cefclient/browser/browser_window_std_mac.h',
|
||||
'tests/cefclient/browser/browser_window_std_mac.mm',
|
||||
'tests/cefclient/browser/main_context_impl_posix.cc',
|
||||
'tests/cefclient/browser/resource_util_mac.mm',
|
||||
'tests/cefclient/browser/resource_util_posix.cc',
|
||||
'tests/cefclient/browser/root_window_mac.h',
|
||||
'tests/cefclient/browser/root_window_mac.mm',
|
||||
'tests/cefclient/browser/temp_window_mac.h',
|
||||
'tests/cefclient/browser/temp_window_mac.mm',
|
||||
'tests/cefclient/browser/text_input_client_osr_mac.h',
|
||||
'tests/cefclient/browser/text_input_client_osr_mac.mm',
|
||||
'tests/cefclient/browser/window_test_runner_mac.h',
|
||||
'tests/cefclient/browser/window_test_runner_mac.mm',
|
||||
'tests/cefclient/browser/window_test_mac.mm',
|
||||
'tests/cefclient/cefclient_mac.mm',
|
||||
'<@(cefclient_sources_browser)',
|
||||
'<@(cefclient_sources_common)',
|
||||
],
|
||||
'cefclient_sources_mac_helper': [
|
||||
'tests/cefclient/process_helper_mac.cc',
|
||||
'<@(cefclient_sources_common)',
|
||||
'<@(cefclient_sources_renderer)',
|
||||
],
|
||||
'cefclient_bundle_resources_mac': [
|
||||
'tests/cefclient/resources/mac/cefclient.icns',
|
||||
'tests/cefclient/resources/mac/English.lproj/InfoPlist.strings',
|
||||
'tests/cefclient/resources/mac/English.lproj/MainMenu.xib',
|
||||
'tests/cefclient/resources/mac/Info.plist',
|
||||
'<@(cefclient_sources_resources)',
|
||||
],
|
||||
'cefclient_sources_linux': [
|
||||
'tests/cefclient/browser/browser_window_osr_gtk.cc',
|
||||
@@ -334,19 +301,19 @@
|
||||
'tests/cefclient/browser/print_handler_gtk.cc',
|
||||
'tests/cefclient/browser/print_handler_gtk.h',
|
||||
'tests/cefclient/browser/resource_util_linux.cc',
|
||||
'tests/cefclient/browser/resource_util_posix.cc',
|
||||
'tests/cefclient/browser/root_window_gtk.cc',
|
||||
'tests/cefclient/browser/root_window_gtk.h',
|
||||
'tests/cefclient/browser/root_window_views.cc',
|
||||
'tests/cefclient/browser/root_window_views.h',
|
||||
'tests/cefclient/browser/temp_window_x11.cc',
|
||||
'tests/cefclient/browser/temp_window_x11.h',
|
||||
'tests/cefclient/browser/views_window.cc',
|
||||
'tests/cefclient/browser/views_window.h',
|
||||
'tests/cefclient/browser/window_test_runner_gtk.cc',
|
||||
'tests/cefclient/browser/window_test_runner_gtk.h',
|
||||
'tests/cefclient/browser/window_test_runner_views.cc',
|
||||
'tests/cefclient/browser/window_test_runner_views.h',
|
||||
'tests/cefclient/browser/window_test_gtk.cc',
|
||||
'tests/cefclient/cefclient_gtk.cc',
|
||||
'<@(cefclient_sources_browser)',
|
||||
'<@(cefclient_sources_common)',
|
||||
'<@(cefclient_sources_renderer)',
|
||||
],
|
||||
'cefclient_bundle_resources_linux': [
|
||||
'<@(cefclient_sources_resources)',
|
||||
],
|
||||
'cefsimple_sources_common': [
|
||||
'tests/cefsimple/simple_app.cc',
|
||||
@@ -380,131 +347,5 @@
|
||||
'tests/cefsimple/cefsimple_linux.cc',
|
||||
'tests/cefsimple/simple_handler_linux.cc',
|
||||
],
|
||||
'ceftests_sources_common': [
|
||||
'tests/ceftests/browser_info_map_unittest.cc',
|
||||
'tests/ceftests/command_line_unittest.cc',
|
||||
'tests/ceftests/cookie_unittest.cc',
|
||||
'tests/ceftests/dialog_unittest.cc',
|
||||
'tests/ceftests/display_unittest.cc',
|
||||
'tests/ceftests/dom_unittest.cc',
|
||||
'tests/ceftests/download_unittest.cc',
|
||||
'tests/ceftests/draggable_regions_unittest.cc',
|
||||
'tests/ceftests/file_util.cc',
|
||||
'tests/ceftests/file_util.h',
|
||||
'tests/ceftests/file_util_unittest.cc',
|
||||
'tests/ceftests/frame_unittest.cc',
|
||||
'tests/ceftests/geolocation_unittest.cc',
|
||||
'tests/ceftests/image_unittest.cc',
|
||||
'tests/ceftests/image_util.cc',
|
||||
'tests/ceftests/image_util.h',
|
||||
'tests/ceftests/jsdialog_unittest.cc',
|
||||
'tests/ceftests/life_span_unittest.cc',
|
||||
'tests/ceftests/message_router_unittest.cc',
|
||||
'tests/ceftests/navigation_unittest.cc',
|
||||
'tests/ceftests/os_rendering_unittest.cc',
|
||||
'tests/ceftests/parser_unittest.cc',
|
||||
'tests/ceftests/plugin_unittest.cc',
|
||||
'tests/ceftests/preference_unittest.cc',
|
||||
'tests/ceftests/print_unittest.cc',
|
||||
'tests/ceftests/process_message_unittest.cc',
|
||||
'tests/ceftests/request_context_unittest.cc',
|
||||
'tests/ceftests/request_handler_unittest.cc',
|
||||
'tests/ceftests/request_unittest.cc',
|
||||
'tests/ceftests/resource.h',
|
||||
'tests/ceftests/resource_manager_unittest.cc',
|
||||
'tests/ceftests/routing_test_handler.cc',
|
||||
'tests/ceftests/routing_test_handler.h',
|
||||
'tests/ceftests/run_all_unittests.cc',
|
||||
'tests/ceftests/scheme_handler_unittest.cc',
|
||||
'tests/ceftests/scoped_temp_dir_unittest.cc',
|
||||
'tests/ceftests/stream_unittest.cc',
|
||||
'tests/ceftests/stream_resource_handler_unittest.cc',
|
||||
'tests/ceftests/string_unittest.cc',
|
||||
'tests/ceftests/client_app_delegates.cc',
|
||||
'tests/ceftests/task_unittest.cc',
|
||||
'tests/ceftests/test_handler.cc',
|
||||
'tests/ceftests/test_handler.h',
|
||||
'tests/ceftests/test_suite.cc',
|
||||
'tests/ceftests/test_suite.h',
|
||||
'tests/ceftests/test_util.cc',
|
||||
'tests/ceftests/test_util.h',
|
||||
'tests/ceftests/thread_helper.cc',
|
||||
'tests/ceftests/thread_helper.h',
|
||||
'tests/ceftests/thread_unittest.cc',
|
||||
'tests/ceftests/tracing_unittest.cc',
|
||||
'tests/ceftests/translator_unittest.cc',
|
||||
'tests/ceftests/urlrequest_unittest.cc',
|
||||
'tests/ceftests/v8_unittest.cc',
|
||||
'tests/ceftests/values_unittest.cc',
|
||||
'tests/ceftests/version_unittest.cc',
|
||||
'tests/ceftests/waitable_event_unittest.cc',
|
||||
'tests/ceftests/webui_unittest.cc',
|
||||
'tests/ceftests/xml_reader_unittest.cc',
|
||||
'tests/ceftests/zip_reader_unittest.cc',
|
||||
],
|
||||
'ceftests_sources_views': [
|
||||
'tests/ceftests/views/button_unittest.cc',
|
||||
'tests/ceftests/views/panel_unittest.cc',
|
||||
'tests/ceftests/views/scroll_view_unittest.cc',
|
||||
'tests/ceftests/views/test_window_delegate.cc',
|
||||
'tests/ceftests/views/test_window_delegate.h',
|
||||
'tests/ceftests/views/textfield_unittest.cc',
|
||||
'tests/ceftests/views/window_unittest.cc',
|
||||
],
|
||||
'ceftests_sources_win': [
|
||||
'tests/ceftests/resource_util_win_idmap.cc',
|
||||
'tests/ceftests/resources/win/ceftests.exe.manifest',
|
||||
'tests/ceftests/resources/win/ceftests.ico',
|
||||
'tests/ceftests/resources/win/ceftests.rc',
|
||||
'tests/ceftests/resources/win/small.ico',
|
||||
],
|
||||
'ceftests_sources_mac': [
|
||||
'tests/ceftests/os_rendering_unittest_mac.h',
|
||||
'tests/ceftests/os_rendering_unittest_mac.mm',
|
||||
'tests/ceftests/run_all_unittests_mac.mm',
|
||||
],
|
||||
'ceftests_sources_mac_helper': [
|
||||
'tests/shared/browser/resource_util.cc',
|
||||
'tests/shared/browser/resource_util.h',
|
||||
'tests/shared/browser/resource_util_mac.mm',
|
||||
'tests/shared/browser/resource_util_posix.cc',
|
||||
'tests/ceftests/client_app_delegates.cc',
|
||||
'tests/ceftests/cookie_unittest.cc',
|
||||
'tests/ceftests/dom_unittest.cc',
|
||||
'tests/ceftests/file_util.cc',
|
||||
'tests/ceftests/file_util.h',
|
||||
'tests/ceftests/frame_unittest.cc',
|
||||
'tests/ceftests/message_router_unittest.cc',
|
||||
'tests/ceftests/navigation_unittest.cc',
|
||||
'tests/ceftests/plugin_unittest.cc',
|
||||
'tests/ceftests/preference_unittest.cc',
|
||||
'tests/ceftests/process_message_unittest.cc',
|
||||
'tests/ceftests/request_handler_unittest.cc',
|
||||
'tests/ceftests/request_unittest.cc',
|
||||
'tests/ceftests/routing_test_handler.cc',
|
||||
'tests/ceftests/routing_test_handler.h',
|
||||
'tests/ceftests/scheme_handler_unittest.cc',
|
||||
'tests/ceftests/urlrequest_unittest.cc',
|
||||
'tests/ceftests/test_handler.cc',
|
||||
'tests/ceftests/test_handler.h',
|
||||
'tests/ceftests/test_suite.cc',
|
||||
'tests/ceftests/test_suite.h',
|
||||
'tests/ceftests/test_util.cc',
|
||||
'tests/ceftests/test_util.h',
|
||||
'tests/ceftests/thread_helper.cc',
|
||||
'tests/ceftests/thread_helper.h',
|
||||
'tests/ceftests/thread_unittest.cc',
|
||||
'tests/ceftests/tracing_unittest.cc',
|
||||
'tests/ceftests/v8_unittest.cc',
|
||||
],
|
||||
'ceftests_bundle_resources_mac': [
|
||||
'tests/ceftests/resources/mac/ceftests.icns',
|
||||
'tests/ceftests/resources/mac/English.lproj/InfoPlist.strings',
|
||||
'tests/ceftests/resources/mac/English.lproj/MainMenu.xib',
|
||||
'tests/ceftests/resources/mac/Info.plist',
|
||||
],
|
||||
'ceftests_sources_linux': [
|
||||
'tests/ceftests/resource_util_linux.cc',
|
||||
],
|
||||
},
|
||||
}
|
||||
|
@@ -1,130 +0,0 @@
|
||||
# Copyright 2016 The Chromium Embedded Framework Authors. Portions copyright
|
||||
# 2014 the Chromium Authors. All rights reserved. Use of this source code is
|
||||
# governed by a BSD-style license that can be found in the LICENSE file.
|
||||
#
|
||||
# This is a copy of src/chrome/chrome_repack_locales.gni with the necessary
|
||||
# modifications to meet CEF's requirements.
|
||||
|
||||
import("//build/config/chrome_build.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/config/ui.gni")
|
||||
import("//tools/grit/repack.gni")
|
||||
|
||||
# Arguments:
|
||||
#
|
||||
# locale
|
||||
# Internal name of locale. e.g. "pt-BR"
|
||||
#
|
||||
# output
|
||||
# Output file name.
|
||||
#
|
||||
# visibility
|
||||
# Normal meaning.
|
||||
template("_repack_one_locale") {
|
||||
locale = invoker.locale
|
||||
|
||||
repack(target_name) {
|
||||
visibility = invoker.visibility
|
||||
|
||||
# Each input pak file should also have a deps line for completeness.
|
||||
# Add associated .h files in the make_pack_header("strings") target.
|
||||
sources = [
|
||||
"${root_gen_dir}/cef/cef_strings_${locale}.pak",
|
||||
"${root_gen_dir}/chrome/chromium_strings_${locale}.pak",
|
||||
"${root_gen_dir}/chrome/generated_resources_${locale}.pak",
|
||||
"${root_gen_dir}/chrome/locale_settings_${locale}.pak",
|
||||
"${root_gen_dir}/chrome/platform_locale_settings_${locale}.pak",
|
||||
"${root_gen_dir}/components/strings/components_locale_settings_${locale}.pak",
|
||||
"${root_gen_dir}/components/strings/components_strings_${locale}.pak",
|
||||
"${root_gen_dir}/content/app/strings/content_strings_${locale}.pak",
|
||||
"${root_gen_dir}/extensions/strings/extensions_strings_${locale}.pak",
|
||||
"${root_gen_dir}/ui/strings/app_locale_settings_${locale}.pak",
|
||||
"${root_gen_dir}/ui/strings/ui_strings_${locale}.pak",
|
||||
]
|
||||
|
||||
# Use public_deps so that generated grit headers are discoverable from
|
||||
# the libcef_static target. Grit deps that generate .cc files must be
|
||||
# listed both here and in the libcef_static target.
|
||||
public_deps = [
|
||||
":cef_strings",
|
||||
"//chrome/app:chromium_strings",
|
||||
"//chrome/app:generated_resources",
|
||||
"//chrome/app/resources:locale_settings",
|
||||
"//chrome/app/resources:platform_locale_settings",
|
||||
"//components/strings:components_locale_settings",
|
||||
"//components/strings:components_strings",
|
||||
"//content/app/strings",
|
||||
"//extensions/strings",
|
||||
"//ui/strings:app_locale_settings",
|
||||
"//ui/strings:ui_strings",
|
||||
]
|
||||
|
||||
output = invoker.output
|
||||
}
|
||||
}
|
||||
|
||||
# Creates an action to call the repack_locales script.
|
||||
#
|
||||
# The GYP version generates the locales in the "gen" directory and then copies
|
||||
# it to the root build directory. This isn't easy to express in a GN copy
|
||||
# rule since the files on Mac have a complex structure. So we generate the
|
||||
# files into the final place and skip the "gen" directory.
|
||||
#
|
||||
# This template uses GN's looping constructs to avoid the complex call to
|
||||
# chrome/tools/build/repack_locales.py which wraps the repack commands in the
|
||||
# GYP build.
|
||||
#
|
||||
# Arguments
|
||||
#
|
||||
# input_locales
|
||||
# List of locale names to use as inputs.
|
||||
#
|
||||
# output_locales
|
||||
# A list containing the corresponding output names for each of the
|
||||
# input names. Mac uses different names in some cases.
|
||||
#
|
||||
# visibility
|
||||
template("cef_repack_locales") {
|
||||
# This is the name of the group below that will collect all the invidual
|
||||
# locale targets. External targets will depend on this.
|
||||
group_target_name = target_name
|
||||
|
||||
# GN's subscript is too stupid to do invoker.output_locales[foo] so we need
|
||||
# to make a copy and do output_locales[foo].
|
||||
output_locales = invoker.output_locales
|
||||
|
||||
# Collects all targets the loop generates.
|
||||
locale_targets = []
|
||||
|
||||
# This loop iterates over the input locales and also keeps a counter so it
|
||||
# can simultaneously iterate over the output locales (using GN's very
|
||||
# limited looping capabilities).
|
||||
current_index = 0
|
||||
foreach(input_locale, invoker.input_locales) {
|
||||
output_locale = output_locales[current_index]
|
||||
|
||||
# Compute the name of the target for the current file. Save it for the deps.
|
||||
current_name = "${target_name}_${input_locale}"
|
||||
locale_targets += [ ":$current_name" ]
|
||||
|
||||
_repack_one_locale(current_name) {
|
||||
visibility = [ ":$group_target_name" ]
|
||||
locale = input_locale
|
||||
|
||||
# Compute the output name. Mac uses a different location.
|
||||
if (is_mac || is_ios) {
|
||||
output = "${root_gen_dir}/repack/locales/${output_locale}.pak"
|
||||
} else {
|
||||
output = "${root_out_dir}/locales/${output_locale}.pak"
|
||||
}
|
||||
}
|
||||
|
||||
current_index = current_index + 1
|
||||
}
|
||||
|
||||
# The group that external targets depend on which collects all deps.
|
||||
group(group_target_name) {
|
||||
forward_variables_from(invoker, [ "visibility" ])
|
||||
public_deps = locale_targets
|
||||
}
|
||||
}
|
@@ -1,39 +0,0 @@
|
||||
# Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
# reserved. Use of this source code is governed by a BSD-style license that
|
||||
# can be found in the LICENSE file.
|
||||
|
||||
#
|
||||
# This file is the CEF CMake configuration entry point and should be loaded
|
||||
# using `find_package(CEF REQUIRED)`. See the top-level CMakeLists.txt file
|
||||
# included with the CEF binary distribution for usage information.
|
||||
#
|
||||
|
||||
# Find the CEF binary distribution root directory.
|
||||
set(_CEF_ROOT "")
|
||||
if(CEF_ROOT AND IS_DIRECTORY "${CEF_ROOT}")
|
||||
set(_CEF_ROOT "${CEF_ROOT}")
|
||||
set(_CEF_ROOT_EXPLICIT 1)
|
||||
else()
|
||||
set(_ENV_CEF_ROOT "")
|
||||
if(DEFINED ENV{CEF_ROOT})
|
||||
file(TO_CMAKE_PATH "$ENV{CEF_ROOT}" _ENV_CEF_ROOT)
|
||||
endif()
|
||||
if(_ENV_CEF_ROOT AND IS_DIRECTORY "${_ENV_CEF_ROOT}")
|
||||
set(_CEF_ROOT "${_ENV_CEF_ROOT}")
|
||||
set(_CEF_ROOT_EXPLICIT 1)
|
||||
endif()
|
||||
unset(_ENV_CEF_ROOT)
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED _CEF_ROOT_EXPLICIT)
|
||||
message(FATAL_ERROR "Must specify a CEF_ROOT value via CMake or environment variable.")
|
||||
endif()
|
||||
|
||||
if(NOT IS_DIRECTORY "${_CEF_ROOT}/cmake")
|
||||
message(FATAL_ERROR "No CMake bootstrap found for CEF binary distribution at: ${CEF_ROOT}.")
|
||||
endif()
|
||||
|
||||
# Execute additional cmake files from the CEF binary distribution.
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${_CEF_ROOT}/cmake")
|
||||
include("cef_variables")
|
||||
include("cef_macros")
|
@@ -1,370 +0,0 @@
|
||||
# Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
# reserved. Use of this source code is governed by a BSD-style license that
|
||||
# can be found in the LICENSE file.
|
||||
|
||||
# Must be loaded via FindCEF.cmake.
|
||||
if(NOT DEFINED _CEF_ROOT_EXPLICIT)
|
||||
message(FATAL_ERROR "Use find_package(CEF) to load this file.")
|
||||
endif()
|
||||
|
||||
|
||||
#
|
||||
# Shared macros.
|
||||
#
|
||||
|
||||
# Print the current CEF configuration.
|
||||
macro(PRINT_CEF_CONFIG)
|
||||
message(STATUS "*** CEF CONFIGURATION SETTINGS ***")
|
||||
message(STATUS "Generator: ${CMAKE_GENERATOR}")
|
||||
message(STATUS "Platform: ${CMAKE_SYSTEM_NAME}")
|
||||
message(STATUS "Project architecture: ${PROJECT_ARCH}")
|
||||
|
||||
if(${CMAKE_GENERATOR} STREQUAL "Ninja" OR ${CMAKE_GENERATOR} STREQUAL "Unix Makefiles")
|
||||
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
|
||||
endif()
|
||||
|
||||
message(STATUS "Binary distribution root: ${_CEF_ROOT}")
|
||||
|
||||
if(OS_MACOSX)
|
||||
message(STATUS "Base SDK: ${CMAKE_OSX_SYSROOT}")
|
||||
message(STATUS "Target SDK: ${CEF_TARGET_SDK}")
|
||||
endif()
|
||||
|
||||
if(OS_WINDOWS)
|
||||
message(STATUS "CEF Windows sandbox: ${USE_SANDBOX}")
|
||||
message(STATUS "Visual Studio ATL support: ${USE_ATL}")
|
||||
endif()
|
||||
|
||||
set(_libraries ${CEF_STANDARD_LIBS})
|
||||
if(OS_WINDOWS AND USE_SANDBOX)
|
||||
list(APPEND _libraries ${CEF_SANDBOX_STANDARD_LIBS})
|
||||
endif()
|
||||
message(STATUS "Standard libraries: ${_libraries}")
|
||||
|
||||
message(STATUS "Compile defines: ${CEF_COMPILER_DEFINES}")
|
||||
message(STATUS "Compile defines (Debug): ${CEF_COMPILER_DEFINES_DEBUG}")
|
||||
message(STATUS "Compile defines (Release): ${CEF_COMPILER_DEFINES_RELEASE}")
|
||||
message(STATUS "C compile flags: ${CEF_COMPILER_FLAGS} ${CEF_C_COMPILER_FLAGS}")
|
||||
message(STATUS "C compile flags (Debug): ${CEF_COMPILER_FLAGS_DEBUG} ${CEF_C_COMPILER_FLAGS_DEBUG}")
|
||||
message(STATUS "C compile flags (Release): ${CEF_COMPILER_FLAGS_RELEASE} ${CEF_C_COMPILER_FLAGS_RELEASE}")
|
||||
message(STATUS "C++ compile flags: ${CEF_COMPILER_FLAGS} ${CEF_CXX_COMPILER_FLAGS}")
|
||||
message(STATUS "C++ compile flags (Debug): ${CEF_COMPILER_FLAGS_DEBUG} ${CEF_CXX_COMPILER_FLAGS_DEBUG}")
|
||||
message(STATUS "C++ compile flags (Release): ${CEF_COMPILER_FLAGS_RELEASE} ${CEF_CXX_COMPILER_FLAGS_RELEASE}")
|
||||
message(STATUS "Exe link flags: ${CEF_LINKER_FLAGS} ${CEF_EXE_LINKER_FLAGS}")
|
||||
message(STATUS "Exe link flags (Debug): ${CEF_LINKER_FLAGS_DEBUG} ${CEF_EXE_LINKER_FLAGS_DEBUG}")
|
||||
message(STATUS "Exe link flags (Release): ${CEF_LINKER_FLAGS_RELEASE} ${CEF_EXE_LINKER_FLAGS_RELEASE}")
|
||||
message(STATUS "Shared link flags: ${CEF_LINKER_FLAGS} ${CEF_SHARED_LINKER_FLAGS}")
|
||||
message(STATUS "Shared link flags (Debug): ${CEF_LINKER_FLAGS_DEBUG} ${CEF_SHARED_LINKER_FLAGS_DEBUG}")
|
||||
message(STATUS "Shared link flags (Release): ${CEF_LINKER_FLAGS_RELEASE} ${CEF_SHARED_LINKER_FLAGS_RELEASE}")
|
||||
|
||||
if(OS_LINUX OR OS_WINDOWS)
|
||||
message(STATUS "CEF Binary files: ${CEF_BINARY_FILES}")
|
||||
message(STATUS "CEF Resource files: ${CEF_RESOURCE_FILES}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Append platform specific sources to a list of sources.
|
||||
macro(APPEND_PLATFORM_SOURCES name_of_list)
|
||||
if(OS_LINUX AND ${name_of_list}_LINUX)
|
||||
list(APPEND ${name_of_list} ${${name_of_list}_LINUX})
|
||||
endif()
|
||||
if(OS_POSIX AND ${name_of_list}_POSIX)
|
||||
list(APPEND ${name_of_list} ${${name_of_list}_POSIX})
|
||||
endif()
|
||||
if(OS_WINDOWS AND ${name_of_list}_WINDOWS)
|
||||
list(APPEND ${name_of_list} ${${name_of_list}_WINDOWS})
|
||||
endif()
|
||||
if(OS_MACOSX AND ${name_of_list}_MACOSX)
|
||||
list(APPEND ${name_of_list} ${${name_of_list}_MACOSX})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Determine the target output directory based on platform and generator.
|
||||
macro(SET_CEF_TARGET_OUT_DIR)
|
||||
if(${CMAKE_GENERATOR} STREQUAL "Ninja" OR
|
||||
${CMAKE_GENERATOR} STREQUAL "Unix Makefiles")
|
||||
# By default Ninja and Make builds don't create a subdirectory named after
|
||||
# the configuration.
|
||||
set(CEF_TARGET_OUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}")
|
||||
|
||||
# Output binaries (executables, libraries) to the correct directory.
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CEF_TARGET_OUT_DIR})
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CEF_TARGET_OUT_DIR})
|
||||
else()
|
||||
set(CEF_TARGET_OUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Copy a list of files from one directory to another. Relative files paths are maintained.
|
||||
# The path component of the source |file_list| will be removed.
|
||||
macro(COPY_FILES target file_list source_dir target_dir)
|
||||
foreach(FILENAME ${file_list})
|
||||
set(source_file ${source_dir}/${FILENAME})
|
||||
get_filename_component(target_name ${FILENAME} NAME)
|
||||
set(target_file ${target_dir}/${target_name})
|
||||
if(IS_DIRECTORY ${source_file})
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory "${source_file}" "${target_file}"
|
||||
VERBATIM
|
||||
)
|
||||
else()
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${source_file}" "${target_file}"
|
||||
VERBATIM
|
||||
)
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
|
||||
#
|
||||
# Linux macros.
|
||||
#
|
||||
|
||||
if(OS_LINUX)
|
||||
|
||||
# Use pkg-config to find Linux libraries and update compiler/linker variables.
|
||||
macro(FIND_LINUX_LIBRARIES libraries)
|
||||
# Read pkg-config info into variables.
|
||||
execute_process(COMMAND pkg-config --cflags ${libraries} OUTPUT_VARIABLE FLL_CFLAGS)
|
||||
execute_process(COMMAND pkg-config --libs-only-L --libs-only-other ${libraries} OUTPUT_VARIABLE FLL_LDFLAGS)
|
||||
execute_process(COMMAND pkg-config --libs-only-l ${libraries} OUTPUT_VARIABLE FLL_LIBS)
|
||||
|
||||
# Strip leading and trailing whitepspace.
|
||||
STRING(STRIP "${FLL_CFLAGS}" FLL_CFLAGS)
|
||||
STRING(STRIP "${FLL_LDFLAGS}" FLL_LDFLAGS)
|
||||
STRING(STRIP "${FLL_LIBS}" FLL_LIBS)
|
||||
|
||||
# Convert to a list.
|
||||
separate_arguments(FLL_CFLAGS)
|
||||
separate_arguments(FLL_LDFLAGS)
|
||||
separate_arguments(FLL_LIBS)
|
||||
|
||||
# Update build variables.
|
||||
list(APPEND CEF_C_COMPILER_FLAGS ${FLL_CFLAGS})
|
||||
list(APPEND CEF_CXX_COMPILER_FLAGS ${FLL_CFLAGS})
|
||||
list(APPEND CEF_EXE_LINKER_FLAGS ${FLL_LDFLAGS})
|
||||
list(APPEND CEF_SHARED_LINKER_FLAGS ${FLL_LDFLAGS})
|
||||
list(APPEND CEF_STANDARD_LIBS ${FLL_LIBS})
|
||||
endmacro()
|
||||
|
||||
# Set SUID permissions on the specified executable.
|
||||
macro(SET_LINUX_SUID_PERMISSIONS target executable)
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E echo ""
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "*** Run the following command manually to set SUID permissions ***"
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "EXE=\"${executable}\" && sudo -- chown root:root $EXE && sudo -- chmod 4755 $EXE"
|
||||
COMMAND ${CMAKE_COMMAND} -E echo ""
|
||||
VERBATIM
|
||||
)
|
||||
endmacro()
|
||||
|
||||
endif(OS_LINUX)
|
||||
|
||||
|
||||
#
|
||||
# Mac OS X macros.
|
||||
#
|
||||
|
||||
if(OS_MACOSX)
|
||||
|
||||
# Fix the framework rpath in the helper executable.
|
||||
macro(FIX_MACOSX_HELPER_FRAMEWORK_RPATH target)
|
||||
# The helper is in $app_name.app/Contents/Frameworks/$app_name Helper.app/Contents/MacOS/
|
||||
# so set rpath up to Contents/ so that the loader can find Frameworks/.
|
||||
set_target_properties(${target} PROPERTIES INSTALL_RPATH "@executable_path/../../../..")
|
||||
set_target_properties(${target} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE)
|
||||
endmacro()
|
||||
|
||||
# Fix the framework rpath in the main executable.
|
||||
macro(FIX_MACOSX_MAIN_FRAMEWORK_RPATH target)
|
||||
# The main app is at $app_name.app/Contents/MacOS/$app_name
|
||||
# so set rpath up to Contents/ so that the loader can find Frameworks/.
|
||||
set_target_properties(${target} PROPERTIES INSTALL_RPATH "@executable_path/..")
|
||||
set_target_properties(${target} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE)
|
||||
endmacro()
|
||||
|
||||
# Manually process and copy over resource files.
|
||||
macro(COPY_MACOSX_RESOURCES resource_list prefix_list target source_dir app_path)
|
||||
foreach(FILENAME ${resource_list})
|
||||
# Remove one or more prefixes from the source paths.
|
||||
set(TARGET_FILENAME "${FILENAME}")
|
||||
foreach(PREFIX ${prefix_list})
|
||||
string(REGEX REPLACE "^.*${PREFIX}" "" TARGET_FILENAME ${TARGET_FILENAME})
|
||||
endforeach()
|
||||
|
||||
# Determine the absolute source and target paths.
|
||||
set(TARGET_PATH "${app_path}/Contents/Resources/${TARGET_FILENAME}")
|
||||
if(IS_ABSOLUTE ${FILENAME})
|
||||
set(SOURCE_PATH ${FILENAME})
|
||||
else()
|
||||
set(SOURCE_PATH "${source_dir}/${FILENAME}")
|
||||
endif()
|
||||
|
||||
if(${FILENAME} MATCHES ".xib$")
|
||||
# Change the target file extension.
|
||||
string(REGEX REPLACE ".xib$" ".nib" TARGET_PATH ${TARGET_PATH})
|
||||
|
||||
get_filename_component(TARGET_DIRECTORY ${TARGET_PATH} PATH)
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
POST_BUILD
|
||||
# Create the target directory.
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${TARGET_DIRECTORY}"
|
||||
# Compile the XIB file to a NIB.
|
||||
COMMAND /usr/bin/ibtool --output-format binary1 --compile "${TARGET_PATH}" "${SOURCE_PATH}"
|
||||
VERBATIM
|
||||
)
|
||||
elseif(NOT ${TARGET_FILENAME} STREQUAL "Info.plist")
|
||||
# Copy the file as-is.
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${SOURCE_PATH}" "${TARGET_PATH}"
|
||||
VERBATIM
|
||||
)
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
endif(OS_MACOSX)
|
||||
|
||||
|
||||
#
|
||||
# Windows macros.
|
||||
#
|
||||
|
||||
if(OS_WINDOWS)
|
||||
|
||||
# Add custom manifest files to an executable target.
|
||||
macro(ADD_WINDOWS_MANIFEST manifest_path target extension)
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND "mt.exe" -nologo
|
||||
-manifest \"${manifest_path}/${target}.${extension}.manifest\" \"${manifest_path}/compatibility.manifest\"
|
||||
-outputresource:"${CEF_TARGET_OUT_DIR}/${target}.${extension}"\;\#1
|
||||
COMMENT "Adding manifest..."
|
||||
)
|
||||
endmacro()
|
||||
|
||||
endif(OS_WINDOWS)
|
||||
|
||||
|
||||
#
|
||||
# Target configuration macros.
|
||||
#
|
||||
|
||||
# Add a logical target that can be used to link the specified libraries into an
|
||||
# executable target.
|
||||
macro(ADD_LOGICAL_TARGET target debug_lib release_lib)
|
||||
add_library(${target} ${CEF_LIBTYPE} IMPORTED)
|
||||
set_target_properties(${target} PROPERTIES
|
||||
IMPORTED_LOCATION "${release_lib}"
|
||||
IMPORTED_LOCATION_DEBUG "${debug_lib}"
|
||||
IMPORTED_LOCATION_RELEASE "${release_lib}"
|
||||
)
|
||||
endmacro()
|
||||
|
||||
# Set common target properties. Use SET_LIBRARY_TARGET_PROPERTIES() or
|
||||
# SET_EXECUTABLE_TARGET_PROPERTIES() instead of calling this macro directly.
|
||||
macro(SET_COMMON_TARGET_PROPERTIES target)
|
||||
# Compile flags.
|
||||
target_compile_options(${target} PUBLIC ${CEF_COMPILER_FLAGS} ${CEF_CXX_COMPILER_FLAGS})
|
||||
target_compile_options(${target} PUBLIC $<$<CONFIG:Debug>:${CEF_COMPILER_FLAGS_DEBUG} ${CEF_CXX_COMPILER_FLAGS_DEBUG}>)
|
||||
target_compile_options(${target} PUBLIC $<$<CONFIG:Release>:${CEF_COMPILER_FLAGS_RELEASE} ${CEF_CXX_COMPILER_FLAGS_RELEASE}>)
|
||||
|
||||
# Compile definitions.
|
||||
target_compile_definitions(${target} PUBLIC ${CEF_COMPILER_DEFINES})
|
||||
target_compile_definitions(${target} PUBLIC $<$<CONFIG:Debug>:${CEF_COMPILER_DEFINES_DEBUG}>)
|
||||
target_compile_definitions(${target} PUBLIC $<$<CONFIG:Release>:${CEF_COMPILER_DEFINES_RELEASE}>)
|
||||
|
||||
# Include directories.
|
||||
target_include_directories(${target} PUBLIC ${CEF_INCLUDE_PATH})
|
||||
|
||||
# Linker flags.
|
||||
if(CEF_LINKER_FLAGS)
|
||||
string(REPLACE ";" " " _flags_str "${CEF_LINKER_FLAGS}")
|
||||
set_property(TARGET ${target} PROPERTY LINK_FLAGS ${_flags_str})
|
||||
endif()
|
||||
if(CEF_LINKER_FLAGS_DEBUG)
|
||||
string(REPLACE ";" " " _flags_str "${CEF_LINKER_FLAGS_DEBUG}")
|
||||
set_property(TARGET ${target} PROPERTY LINK_FLAGS_DEBUG ${_flags_str})
|
||||
endif()
|
||||
if(CEF_LINKER_FLAGS_RELEASE)
|
||||
string(REPLACE ";" " " _flags_str "${CEF_LINKER_FLAGS_RELEASE}")
|
||||
set_property(TARGET ${target} PROPERTY LINK_FLAGS_RELEASE ${_flags_str})
|
||||
endif()
|
||||
|
||||
if(OS_MACOSX)
|
||||
# Set Xcode target properties.
|
||||
set_target_properties(${target} PROPERTIES
|
||||
XCODE_ATTRIBUTE_ALWAYS_SEARCH_USER_PATHS NO
|
||||
XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "gnu++11" # -std=gnu++11
|
||||
XCODE_ATTRIBUTE_CLANG_LINK_OBJC_RUNTIME NO # -fno-objc-link-runtime
|
||||
XCODE_ATTRIBUTE_CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS YES # -Wobjc-missing-property-synthesis
|
||||
XCODE_ATTRIBUTE_COPY_PHASE_STRIP NO
|
||||
XCODE_ATTRIBUTE_DEAD_CODE_STRIPPING[variant=Release] YES # -Wl,-dead_strip
|
||||
XCODE_ATTRIBUTE_GCC_C_LANGUAGE_STANDARD "c99" # -std=c99
|
||||
XCODE_ATTRIBUTE_GCC_CW_ASM_SYNTAX NO # No -fasm-blocks
|
||||
XCODE_ATTRIBUTE_GCC_DYNAMIC_NO_PIC NO
|
||||
XCODE_ATTRIBUTE_GCC_ENABLE_CPP_EXCEPTIONS NO # -fno-exceptions
|
||||
XCODE_ATTRIBUTE_GCC_ENABLE_CPP_RTTI NO # -fno-rtti
|
||||
XCODE_ATTRIBUTE_GCC_ENABLE_PASCAL_STRINGS NO # No -mpascal-strings
|
||||
XCODE_ATTRIBUTE_GCC_INLINES_ARE_PRIVATE_EXTERN YES # -fvisibility-inlines-hidden
|
||||
XCODE_ATTRIBUTE_GCC_OBJC_CALL_CXX_CDTORS YES # -fobjc-call-cxx-cdtors
|
||||
XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN YES # -fvisibility=hidden
|
||||
XCODE_ATTRIBUTE_GCC_THREADSAFE_STATICS NO # -fno-threadsafe-statics
|
||||
XCODE_ATTRIBUTE_GCC_TREAT_WARNINGS_AS_ERRORS YES # -Werror
|
||||
XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0"
|
||||
XCODE_ATTRIBUTE_GCC_WARN_ABOUT_MISSING_NEWLINE YES # -Wnewline-eof
|
||||
XCODE_ATTRIBUTE_USE_HEADERMAP NO
|
||||
OSX_ARCHITECTURES_DEBUG "${CMAKE_OSX_ARCHITECTURES}"
|
||||
OSX_ARCHITECTURES_RELEASE "${CMAKE_OSX_ARCHITECTURES}"
|
||||
)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Set library-specific properties.
|
||||
macro(SET_LIBRARY_TARGET_PROPERTIES target)
|
||||
SET_COMMON_TARGET_PROPERTIES(${target})
|
||||
|
||||
# Shared library linker flags.
|
||||
if(CEF_SHARED_LINKER_FLAGS)
|
||||
string(REPLACE ";" " " _flags_str "${CEF_SHARED_LINKER_FLAGS}")
|
||||
set_property(TARGET ${target} PROPERTY LINK_FLAGS ${_flags_str})
|
||||
endif()
|
||||
if(CEF_SHARED_LINKER_FLAGS_DEBUG)
|
||||
string(REPLACE ";" " " _flags_str "${CEF_SHARED_LINKER_FLAGS_DEBUG}")
|
||||
set_property(TARGET ${target} PROPERTY LINK_FLAGS_DEBUG ${_flags_str})
|
||||
endif()
|
||||
if(CEF_SHARED_LINKER_FLAGS_RELEASE)
|
||||
string(REPLACE ";" " " _flags_str "${CEF_SHARED_LINKER_FLAGS_RELEASE}")
|
||||
set_property(TARGET ${target} PROPERTY LINK_FLAGS_RELEASE ${_flags_str})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Set executable-specific properties.
|
||||
macro(SET_EXECUTABLE_TARGET_PROPERTIES target)
|
||||
SET_COMMON_TARGET_PROPERTIES(${target})
|
||||
|
||||
# Executable linker flags.
|
||||
if(CEF_EXE_LINKER_FLAGS)
|
||||
string(REPLACE ";" " " _flags_str "${CEF_EXE_LINKER_FLAGS}")
|
||||
set_property(TARGET ${target} PROPERTY LINK_FLAGS ${_flags_str})
|
||||
endif()
|
||||
if(CEF_EXE_LINKER_FLAGS_DEBUG)
|
||||
string(REPLACE ";" " " _flags_str "${CEF_EXE_LINKER_FLAGS_DEBUG}")
|
||||
set_property(TARGET ${target} PROPERTY LINK_FLAGS_DEBUG ${_flags_str})
|
||||
endif()
|
||||
if(CEF_EXE_LINKER_FLAGS_RELEASE)
|
||||
string(REPLACE ";" " " _flags_str "${CEF_EXE_LINKER_FLAGS_RELEASE}")
|
||||
set_property(TARGET ${target} PROPERTY LINK_FLAGS_RELEASE ${_flags_str})
|
||||
endif()
|
||||
endmacro()
|
@@ -1,470 +0,0 @@
|
||||
# Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
# reserved. Use of this source code is governed by a BSD-style license that
|
||||
# can be found in the LICENSE file.
|
||||
|
||||
# Must be loaded via FindCEF.cmake.
|
||||
if(NOT DEFINED _CEF_ROOT_EXPLICIT)
|
||||
message(FATAL_ERROR "Use find_package(CEF) to load this file.")
|
||||
endif()
|
||||
|
||||
|
||||
#
|
||||
# Shared configuration.
|
||||
#
|
||||
|
||||
# Determine the platform.
|
||||
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
|
||||
set(OS_MACOSX 1)
|
||||
set(OS_POSIX 1)
|
||||
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
|
||||
set(OS_LINUX 1)
|
||||
set(OS_POSIX 1)
|
||||
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
|
||||
set(OS_WINDOWS 1)
|
||||
endif()
|
||||
|
||||
# Determine the project architecture.
|
||||
if(NOT DEFINED PROJECT_ARCH)
|
||||
if(CMAKE_SIZEOF_VOID_P MATCHES 8)
|
||||
set(PROJECT_ARCH "x86_64")
|
||||
else()
|
||||
set(PROJECT_ARCH "x86")
|
||||
endif()
|
||||
|
||||
if(OS_MACOSX)
|
||||
# PROJECT_ARCH should be specified on Mac OS X.
|
||||
message(WARNING "No PROJECT_ARCH value specified, using ${PROJECT_ARCH}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Determine the build type.
|
||||
if(NOT CMAKE_BUILD_TYPE AND
|
||||
(${CMAKE_GENERATOR} STREQUAL "Ninja" OR ${CMAKE_GENERATOR} STREQUAL "Unix Makefiles"))
|
||||
# CMAKE_BUILD_TYPE should be specified when using Ninja or Unix Makefiles.
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
message(WARNING "No CMAKE_BUILD_TYPE value selected, using ${CMAKE_BUILD_TYPE}")
|
||||
endif()
|
||||
|
||||
|
||||
# Path to the include directory.
|
||||
set(CEF_INCLUDE_PATH "${_CEF_ROOT}")
|
||||
|
||||
# Path to the libcef_dll_wrapper target.
|
||||
set(CEF_LIBCEF_DLL_WRAPPER_PATH "${_CEF_ROOT}/libcef_dll")
|
||||
|
||||
|
||||
# Shared compiler/linker flags.
|
||||
list(APPEND CEF_COMPILER_DEFINES
|
||||
# Allow C++ programs to use stdint.h macros specified in the C99 standard that aren't
|
||||
# in the C++ standard (e.g. UINT8_MAX, INT64_MIN, etc)
|
||||
__STDC_CONSTANT_MACROS __STDC_FORMAT_MACROS
|
||||
)
|
||||
|
||||
|
||||
#
|
||||
# Linux configuration.
|
||||
#
|
||||
|
||||
if(OS_LINUX)
|
||||
# Platform-specific compiler/linker flags.
|
||||
set(CEF_LIBTYPE SHARED)
|
||||
list(APPEND CEF_COMPILER_FLAGS
|
||||
-fno-strict-aliasing # Avoid assumptions regarding non-aliasing of objects of different types
|
||||
-fPIC # Generate position-independent code for shared libraries
|
||||
-fstack-protector # Protect some vulnerable functions from stack-smashing (security feature)
|
||||
-funwind-tables # Support stack unwinding for backtrace()
|
||||
-fvisibility=hidden # Give hidden visibility to declarations that are not explicitly marked as visible
|
||||
--param=ssp-buffer-size=4 # Set the minimum buffer size protected by SSP (security feature, related to stack-protector)
|
||||
-pipe # Use pipes rather than temporary files for communication between build stages
|
||||
-pthread # Use the pthread library
|
||||
-Wall # Enable all warnings
|
||||
-Werror # Treat warnings as errors
|
||||
-Wno-missing-field-initializers # Don't warn about missing field initializers
|
||||
-Wno-unused-parameter # Don't warn about unused parameters
|
||||
)
|
||||
list(APPEND CEF_C_COMPILER_FLAGS
|
||||
-std=c99 # Use the C99 language standard
|
||||
)
|
||||
list(APPEND CEF_CXX_COMPILER_FLAGS
|
||||
-fno-exceptions # Disable exceptions
|
||||
-fno-rtti # Disable real-time type information
|
||||
-fno-threadsafe-statics # Don't generate thread-safe statics
|
||||
-fvisibility-inlines-hidden # Give hidden visibility to inlined class member functions
|
||||
-std=gnu++11 # Use the C++11 language standard including GNU extensions
|
||||
-Wsign-compare # Warn about mixed signed/unsigned type comparisons
|
||||
)
|
||||
list(APPEND CEF_COMPILER_FLAGS_DEBUG
|
||||
-O0 # Disable optimizations
|
||||
-g # Generate debug information
|
||||
)
|
||||
list(APPEND CEF_COMPILER_FLAGS_RELEASE
|
||||
-O2 # Optimize for maximum speed
|
||||
-fdata-sections # Enable linker optimizations to improve locality of reference for data sections
|
||||
-ffunction-sections # Enable linker optimizations to improve locality of reference for function sections
|
||||
-fno-ident # Ignore the #ident directive
|
||||
-U_FORTIFY_SOURCE # Undefine _FORTIFY_SOURCE in case it was previously defined
|
||||
-D_FORTIFY_SOURCE=2 # Add memory and string function protection (security feature, related to stack-protector)
|
||||
)
|
||||
list(APPEND CEF_LINKER_FLAGS
|
||||
-fPIC # Generate position-independent code for shared libraries
|
||||
-pthread # Use the pthread library
|
||||
-Wl,--disable-new-dtags # Don't generate new-style dynamic tags in ELF
|
||||
-Wl,--fatal-warnings # Treat warnings as errors
|
||||
-Wl,-rpath,. # Set rpath so that libraries can be placed next to the executable
|
||||
-Wl,-z,noexecstack # Mark the stack as non-executable (security feature)
|
||||
-Wl,-z,now # Resolve symbols on program start instead of on first use (security feature)
|
||||
-Wl,-z,relro # Mark relocation sections as read-only (security feature)
|
||||
)
|
||||
list(APPEND CEF_LINKER_FLAGS_RELEASE
|
||||
-Wl,-O1 # Enable linker optimizations
|
||||
-Wl,--as-needed # Only link libraries that export symbols used by the binary
|
||||
-Wl,--gc-sections # Remove unused code resulting from -fdata-sections and -function-sections
|
||||
)
|
||||
list(APPEND CEF_COMPILER_DEFINES
|
||||
_FILE_OFFSET_BITS=64 # Allow the Large File Support (LFS) interface to replace the old interface
|
||||
)
|
||||
list(APPEND CEF_COMPILER_DEFINES_RELEASE
|
||||
NDEBUG # Not a debug build
|
||||
)
|
||||
|
||||
include(CheckCCompilerFlag)
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
CHECK_C_COMPILER_FLAG(-Wno-unused-local-typedefs COMPILER_SUPPORTS_NO_UNUSED_LOCAL_TYPEDEFS)
|
||||
if(COMPILER_SUPPORTS_NO_UNUSED_LOCAL_TYPEDEFS)
|
||||
list(APPEND CEF_C_COMPILER_FLAGS
|
||||
-Wno-unused-local-typedefs # Don't warn about unused local typedefs
|
||||
)
|
||||
endif()
|
||||
|
||||
CHECK_CXX_COMPILER_FLAG(-Wno-literal-suffix COMPILER_SUPPORTS_NO_LITERAL_SUFFIX)
|
||||
if(COMPILER_SUPPORTS_NO_LITERAL_SUFFIX)
|
||||
list(APPEND CEF_CXX_COMPILER_FLAGS
|
||||
-Wno-literal-suffix # Don't warn about invalid suffixes on literals
|
||||
)
|
||||
endif()
|
||||
|
||||
CHECK_CXX_COMPILER_FLAG(-Wno-narrowing COMPILER_SUPPORTS_NO_NARROWING)
|
||||
if(COMPILER_SUPPORTS_NO_NARROWING)
|
||||
list(APPEND CEF_CXX_COMPILER_FLAGS
|
||||
-Wno-narrowing # Don't warn about type narrowing
|
||||
)
|
||||
endif()
|
||||
|
||||
if(PROJECT_ARCH STREQUAL "x86_64")
|
||||
# 64-bit architecture.
|
||||
list(APPEND CEF_COMPILER_FLAGS
|
||||
-m64
|
||||
-march=x86-64
|
||||
)
|
||||
list(APPEND CEF_LINKER_FLAGS
|
||||
-m64
|
||||
)
|
||||
elseif(PROJECT_ARCH STREQUAL "x86")
|
||||
# 32-bit architecture.
|
||||
list(APPEND CEF_COMPILER_FLAGS
|
||||
-msse2
|
||||
-mfpmath=sse
|
||||
-mmmx
|
||||
-m32
|
||||
)
|
||||
list(APPEND CEF_LINKER_FLAGS
|
||||
-m32
|
||||
)
|
||||
endif()
|
||||
|
||||
# Standard libraries.
|
||||
set(CEF_STANDARD_LIBS
|
||||
X11
|
||||
)
|
||||
|
||||
# CEF directory paths.
|
||||
set(CEF_RESOURCE_DIR "${_CEF_ROOT}/Resources")
|
||||
set(CEF_BINARY_DIR "${_CEF_ROOT}/${CMAKE_BUILD_TYPE}")
|
||||
set(CEF_BINARY_DIR_DEBUG "${_CEF_ROOT}/Debug")
|
||||
set(CEF_BINARY_DIR_RELEASE "${_CEF_ROOT}/Release")
|
||||
|
||||
# CEF library paths.
|
||||
set(CEF_LIB_DEBUG "${CEF_BINARY_DIR_DEBUG}/libcef.so")
|
||||
set(CEF_LIB_RELEASE "${CEF_BINARY_DIR_RELEASE}/libcef.so")
|
||||
|
||||
# List of CEF binary files.
|
||||
set(CEF_BINARY_FILES
|
||||
chrome-sandbox
|
||||
libcef.so
|
||||
natives_blob.bin
|
||||
snapshot_blob.bin
|
||||
)
|
||||
|
||||
# List of CEF resource files.
|
||||
set(CEF_RESOURCE_FILES
|
||||
cef.pak
|
||||
cef_100_percent.pak
|
||||
cef_200_percent.pak
|
||||
cef_extensions.pak
|
||||
devtools_resources.pak
|
||||
icudtl.dat
|
||||
locales
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
#
|
||||
# Mac OS X configuration.
|
||||
#
|
||||
|
||||
if(OS_MACOSX)
|
||||
# Platform-specific compiler/linker flags.
|
||||
# See also Xcode target properties in macros.cmake.
|
||||
set(CEF_LIBTYPE SHARED)
|
||||
list(APPEND CEF_COMPILER_FLAGS
|
||||
-fno-strict-aliasing # Avoid assumptions regarding non-aliasing of objects of different types
|
||||
-fstack-protector # Protect some vulnerable functions from stack-smashing (security feature)
|
||||
-funwind-tables # Support stack unwinding for backtrace()
|
||||
-fvisibility=hidden # Give hidden visibility to declarations that are not explicitly marked as visible
|
||||
-Wall # Enable all warnings
|
||||
-Werror # Treat warnings as errors
|
||||
-Wextra # Enable additional warnings
|
||||
-Wendif-labels # Warn whenever an #else or an #endif is followed by text
|
||||
-Wnewline-eof # Warn about no newline at end of file
|
||||
-Wno-missing-field-initializers # Don't warn about missing field initializers
|
||||
-Wno-unused-parameter # Don't warn about unused parameters
|
||||
)
|
||||
list(APPEND CEF_C_COMPILER_FLAGS
|
||||
-std=c99 # Use the C99 language standard
|
||||
)
|
||||
list(APPEND CEF_CXX_COMPILER_FLAGS
|
||||
-fno-exceptions # Disable exceptions
|
||||
-fno-rtti # Disable real-time type information
|
||||
-fno-threadsafe-statics # Don't generate thread-safe statics
|
||||
-fobjc-call-cxx-cdtors # Call the constructor/destructor of C++ instance variables in ObjC objects
|
||||
-fvisibility-inlines-hidden # Give hidden visibility to inlined class member functions
|
||||
-std=gnu++11 # Use the C++11 language standard including GNU extensions
|
||||
-Wno-narrowing # Don't warn about type narrowing
|
||||
-Wsign-compare # Warn about mixed signed/unsigned type comparisons
|
||||
)
|
||||
list(APPEND CEF_COMPILER_FLAGS_DEBUG
|
||||
-O0 # Disable optimizations
|
||||
-g # Generate debug information
|
||||
)
|
||||
list(APPEND CEF_COMPILER_FLAGS_RELEASE
|
||||
-O3 # Optimize for maximum speed plus a few extras
|
||||
)
|
||||
list(APPEND CEF_LINKER_FLAGS
|
||||
-Wl,-search_paths_first # Search for static or shared library versions in the same pass
|
||||
-Wl,-ObjC # Support creation of ObjC static libraries
|
||||
-Wl,-pie # Generate position-independent code suitable for executables only
|
||||
)
|
||||
list(APPEND CEF_LINKER_FLAGS_RELEASE
|
||||
-Wl,-dead_strip # Strip dead code
|
||||
)
|
||||
|
||||
# Standard libraries.
|
||||
set(CEF_STANDARD_LIBS
|
||||
-lpthread
|
||||
"-framework Cocoa"
|
||||
"-framework AppKit"
|
||||
)
|
||||
|
||||
# Find the newest available base SDK.
|
||||
execute_process(COMMAND xcode-select --print-path OUTPUT_VARIABLE XCODE_PATH OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
foreach(OS_VERSION 10.10 10.9 10.8 10.7)
|
||||
set(SDK "${XCODE_PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${OS_VERSION}.sdk")
|
||||
if(NOT "${CMAKE_OSX_SYSROOT}" AND EXISTS "${SDK}" AND IS_DIRECTORY "${SDK}")
|
||||
set(CMAKE_OSX_SYSROOT ${SDK})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Target SDK.
|
||||
set(CEF_TARGET_SDK "10.7")
|
||||
list(APPEND CEF_COMPILER_FLAGS
|
||||
-mmacosx-version-min=${CEF_TARGET_SDK}
|
||||
)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET ${CEF_TARGET_SDK})
|
||||
|
||||
# Target architecture.
|
||||
if(PROJECT_ARCH STREQUAL "x86_64")
|
||||
set(CMAKE_OSX_ARCHITECTURES "x86_64")
|
||||
else()
|
||||
set(CMAKE_OSX_ARCHITECTURES "i386")
|
||||
endif()
|
||||
|
||||
# CEF directory paths.
|
||||
set(CEF_BINARY_DIR "${_CEF_ROOT}/$<CONFIGURATION>")
|
||||
set(CEF_BINARY_DIR_DEBUG "${_CEF_ROOT}/Debug")
|
||||
set(CEF_BINARY_DIR_RELEASE "${_CEF_ROOT}/Release")
|
||||
|
||||
# CEF library paths.
|
||||
set(CEF_LIB_DEBUG "${CEF_BINARY_DIR_DEBUG}/Chromium Embedded Framework.framework/Chromium Embedded Framework")
|
||||
set(CEF_LIB_RELEASE "${CEF_BINARY_DIR_RELEASE}/Chromium Embedded Framework.framework/Chromium Embedded Framework")
|
||||
endif()
|
||||
|
||||
|
||||
#
|
||||
# Windows configuration.
|
||||
#
|
||||
|
||||
if(OS_WINDOWS)
|
||||
# Configure use of the sandbox.
|
||||
option(USE_SANDBOX "Enable or disable use of the sandbox." ON)
|
||||
if(USE_SANDBOX AND NOT MSVC_VERSION EQUAL 1900)
|
||||
# The cef_sandbox.lib static library is currently built with VS2015. It will
|
||||
# not link successfully with other VS versions.
|
||||
set(USE_SANDBOX OFF)
|
||||
endif()
|
||||
|
||||
# Configure use of official build compiler settings.
|
||||
# When using an official build the "Debug" build is actually a Release build
|
||||
# with DCHECKs enabled. In order to link the sandbox the Debug build must
|
||||
# be configured with some Release-related compiler settings.
|
||||
option(USE_OFFICIAL_BUILD_SANDBOX "Enable or disable use of an official build sandbox." ON)
|
||||
if(NOT USE_SANDBOX)
|
||||
# Don't need official build settings when the sandbox is off.
|
||||
set(USE_OFFICIAL_BUILD_SANDBOX OFF)
|
||||
endif()
|
||||
|
||||
# Consumers who run into LNK4099 warnings can pass /Z7 instead (see issue #385).
|
||||
set(CEF_DEBUG_INFO_FLAG "/Zi" CACHE STRING "Optional flag specifying specific /Z flag to use")
|
||||
|
||||
# Platform-specific compiler/linker flags.
|
||||
set(CEF_LIBTYPE STATIC)
|
||||
list(APPEND CEF_COMPILER_FLAGS
|
||||
/MP # Multiprocess compilation
|
||||
/Gy # Enable function-level linking
|
||||
/GR- # Disable run-time type information
|
||||
/W4 # Warning level 4
|
||||
/WX # Treat warnings as errors
|
||||
/wd4100 # Ignore "unreferenced formal parameter" warning
|
||||
/wd4127 # Ignore "conditional expression is constant" warning
|
||||
/wd4244 # Ignore "conversion possible loss of data" warning
|
||||
/wd4481 # Ignore "nonstandard extension used: override" warning
|
||||
/wd4512 # Ignore "assignment operator could not be generated" warning
|
||||
/wd4701 # Ignore "potentially uninitialized local variable" warning
|
||||
/wd4702 # Ignore "unreachable code" warning
|
||||
/wd4996 # Ignore "function or variable may be unsafe" warning
|
||||
${CEF_DEBUG_INFO_FLAG}
|
||||
)
|
||||
if(USE_OFFICIAL_BUILD_SANDBOX)
|
||||
# CMake adds /RTC1, /D"_DEBUG" and a few other values by default for Debug
|
||||
# builds. We can't link the sandbox with those values so clear the CMake
|
||||
# defaults here.
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "")
|
||||
|
||||
list(APPEND CEF_COMPILER_FLAGS_DEBUG
|
||||
/MT # Multithreaded release runtime
|
||||
)
|
||||
else()
|
||||
list(APPEND CEF_COMPILER_FLAGS_DEBUG
|
||||
/MTd # Multithreaded debug runtime
|
||||
/RTC1 # Disable optimizations
|
||||
/Od # Enable basic run-time checks
|
||||
)
|
||||
endif()
|
||||
list(APPEND CEF_COMPILER_FLAGS_RELEASE
|
||||
/MT # Multithreaded release runtime
|
||||
/O2 # Optimize for maximum speed
|
||||
/Ob2 # Inline any suitable function
|
||||
/GF # Enable string pooling
|
||||
)
|
||||
list(APPEND CEF_LINKER_FLAGS_DEBUG
|
||||
/DEBUG # Generate debug information
|
||||
)
|
||||
list(APPEND CEF_EXE_LINKER_FLAGS
|
||||
/MANIFEST:NO # No default manifest (see ADD_WINDOWS_MANIFEST macro usage)
|
||||
/LARGEADDRESSAWARE # Allow 32-bit processes to access 3GB of RAM
|
||||
)
|
||||
list(APPEND CEF_COMPILER_DEFINES
|
||||
WIN32 _WIN32 _WINDOWS # Windows platform
|
||||
UNICODE _UNICODE # Unicode build
|
||||
WINVER=0x0602 _WIN32_WINNT=0x602 # Targeting Windows 8
|
||||
NOMINMAX # Use the standard's templated min/max
|
||||
WIN32_LEAN_AND_MEAN # Exclude less common API declarations
|
||||
_HAS_EXCEPTIONS=0 # Disable exceptions
|
||||
)
|
||||
if(USE_OFFICIAL_BUILD_SANDBOX)
|
||||
list(APPEND CEF_COMPILER_DEFINES_DEBUG
|
||||
NDEBUG _NDEBUG # Not a debug build
|
||||
DCHECK_ALWAYS_ON=1 # DCHECKs are enabled
|
||||
)
|
||||
endif()
|
||||
list(APPEND CEF_COMPILER_DEFINES_RELEASE
|
||||
NDEBUG _NDEBUG # Not a debug build
|
||||
)
|
||||
|
||||
# Standard libraries.
|
||||
set(CEF_STANDARD_LIBS
|
||||
comctl32.lib
|
||||
rpcrt4.lib
|
||||
shlwapi.lib
|
||||
ws2_32.lib
|
||||
)
|
||||
|
||||
# CEF directory paths.
|
||||
set(CEF_RESOURCE_DIR "${_CEF_ROOT}/Resources")
|
||||
set(CEF_BINARY_DIR "${_CEF_ROOT}/$<CONFIGURATION>")
|
||||
set(CEF_BINARY_DIR_DEBUG "${_CEF_ROOT}/Debug")
|
||||
set(CEF_BINARY_DIR_RELEASE "${_CEF_ROOT}/Release")
|
||||
|
||||
# CEF library paths.
|
||||
set(CEF_LIB_DEBUG "${CEF_BINARY_DIR_DEBUG}/libcef.lib")
|
||||
set(CEF_LIB_RELEASE "${CEF_BINARY_DIR_RELEASE}/libcef.lib")
|
||||
|
||||
# List of CEF binary files.
|
||||
set(CEF_BINARY_FILES
|
||||
chrome_elf.dll
|
||||
d3dcompiler_43.dll
|
||||
d3dcompiler_47.dll
|
||||
libcef.dll
|
||||
libEGL.dll
|
||||
libGLESv2.dll
|
||||
natives_blob.bin
|
||||
snapshot_blob.bin
|
||||
)
|
||||
|
||||
# List of CEF resource files.
|
||||
set(CEF_RESOURCE_FILES
|
||||
cef.pak
|
||||
cef_100_percent.pak
|
||||
cef_200_percent.pak
|
||||
cef_extensions.pak
|
||||
devtools_resources.pak
|
||||
icudtl.dat
|
||||
locales
|
||||
)
|
||||
|
||||
if(USE_SANDBOX)
|
||||
list(APPEND CEF_COMPILER_DEFINES
|
||||
PSAPI_VERSION=1 # Required by cef_sandbox.lib
|
||||
CEF_USE_SANDBOX # Used by apps to test if the sandbox is enabled
|
||||
)
|
||||
|
||||
# Libraries required by cef_sandbox.lib.
|
||||
set(CEF_SANDBOX_STANDARD_LIBS
|
||||
dbghelp.lib
|
||||
psapi.lib
|
||||
version.lib
|
||||
winmm.lib
|
||||
)
|
||||
|
||||
# CEF sandbox library paths.
|
||||
set(CEF_SANDBOX_LIB_DEBUG "${CEF_BINARY_DIR_DEBUG}/cef_sandbox.lib")
|
||||
set(CEF_SANDBOX_LIB_RELEASE "${CEF_BINARY_DIR_RELEASE}/cef_sandbox.lib")
|
||||
endif()
|
||||
|
||||
# Configure use of ATL.
|
||||
option(USE_ATL "Enable or disable use of ATL." ON)
|
||||
if(USE_ATL)
|
||||
# Determine if the Visual Studio install supports ATL.
|
||||
get_filename_component(VC_BIN_DIR ${CMAKE_CXX_COMPILER} DIRECTORY)
|
||||
get_filename_component(VC_DIR ${VC_BIN_DIR} DIRECTORY)
|
||||
if(NOT IS_DIRECTORY "${VC_DIR}/atlmfc")
|
||||
set(USE_ATL OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(USE_ATL)
|
||||
list(APPEND CEF_COMPILER_DEFINES
|
||||
CEF_USE_ATL # Used by apps to test if ATL support is enabled
|
||||
)
|
||||
endif()
|
||||
endif()
|
@@ -44,10 +44,10 @@
|
||||
// This can happen in cases where Chromium code is used directly by the
|
||||
// client application. When using Chromium code directly always include
|
||||
// the Chromium header first to avoid type conflicts.
|
||||
#elif defined(USING_CHROMIUM_INCLUDES)
|
||||
#elif defined(BUILDING_CEF_SHARED)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/atomic_ref_count.h"
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
#else // !BUILDING_CEF_SHARED
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
@@ -121,6 +121,6 @@ inline bool AtomicRefCountIsZero(volatile AtomicRefCount *ptr) {
|
||||
|
||||
} // namespace base
|
||||
|
||||
#endif // !USING_CHROMIUM_INCLUDES
|
||||
#endif // !BUILDING_CEF_SHARED
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_CEF_ATOMIC_REF_COUNT_H_
|
||||
|
@@ -59,10 +59,10 @@
|
||||
// This can happen in cases where Chromium code is used directly by the
|
||||
// client application. When using Chromium code directly always include
|
||||
// the Chromium header first to avoid type conflicts.
|
||||
#elif defined(USING_CHROMIUM_INCLUDES)
|
||||
#elif defined(BUILDING_CEF_SHARED)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/atomicops.h"
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
#else // !BUILDING_CEF_SHARED
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
@@ -183,8 +183,6 @@ Atomic64 Release_Load(volatile const Atomic64* ptr);
|
||||
#include "include/base/internal/cef_atomicops_mac.h"
|
||||
#elif defined(COMPILER_GCC) && defined(ARCH_CPU_X86_FAMILY)
|
||||
#include "include/base/internal/cef_atomicops_x86_gcc.h"
|
||||
#elif defined(COMPILER_GCC) && defined(__ARM_ARCH)
|
||||
#include "include/base/internal/cef_atomicops_arm_gcc.h"
|
||||
#else
|
||||
#error "Atomic operations are not supported on your platform"
|
||||
#endif
|
||||
@@ -195,6 +193,6 @@ Atomic64 Release_Load(volatile const Atomic64* ptr);
|
||||
#include "include/base/internal/cef_atomicops_atomicword_compat.h"
|
||||
#endif
|
||||
|
||||
#endif // !USING_CHROMIUM_INCLUDES
|
||||
#endif // !BUILDING_CEF_SHARED
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_CEF_ATOMICOPS_H_
|
||||
|
@@ -32,6 +32,14 @@
|
||||
#define CEF_INCLUDE_BASE_CEF_BASICTYPES_H_
|
||||
#pragma once
|
||||
|
||||
#if defined(BUILDING_CEF_SHARED)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/basictypes.h"
|
||||
#else // !BUILDING_CEF_SHARED
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
|
||||
#include <limits.h> // For UINT_MAX
|
||||
#include <stddef.h> // For size_t
|
||||
|
||||
@@ -64,6 +72,8 @@ typedef int int32;
|
||||
typedef unsigned int uint32;
|
||||
#endif
|
||||
|
||||
#endif // !BUILDING_CEF_SHARED
|
||||
|
||||
// UTF-16 character type.
|
||||
// This should be kept synchronized with base/strings/string16.h
|
||||
#ifndef char16
|
||||
|
@@ -37,10 +37,10 @@
|
||||
// This can happen in cases where Chromium code is used directly by the
|
||||
// client application. When using Chromium code directly always include
|
||||
// the Chromium header first to avoid type conflicts.
|
||||
#elif defined(USING_CHROMIUM_INCLUDES)
|
||||
#elif defined(BUILDING_CEF_SHARED)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/bind.h"
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
#else // !BUILDING_CEF_SHARED
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
@@ -543,6 +543,6 @@ Bind(Functor functor, const P1& p1, const P2& p2, const P3& p3, const P4& p4,
|
||||
|
||||
} // namespace base
|
||||
|
||||
#endif // !USING_CHROMIUM_INCLUDES
|
||||
#endif // !BUILDING_CEF_SHARED
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_CEF_BIND_H_
|
||||
|
@@ -175,10 +175,10 @@
|
||||
// This can happen in cases where Chromium code is used directly by the
|
||||
// client application. When using Chromium code directly always include
|
||||
// the Chromium header first to avoid type conflicts.
|
||||
#elif defined(USING_CHROMIUM_INCLUDES)
|
||||
#elif defined(BUILDING_CEF_SHARED)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/bind_helpers.h"
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
#else // !BUILDING_CEF_SHARED
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
@@ -581,6 +581,6 @@ void DeletePointer(T* obj) {
|
||||
|
||||
} // namespace base
|
||||
|
||||
#endif // !USING_CHROMIUM_INCLUDES
|
||||
#endif // !BUILDING_CEF_SHARED
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_CEF_BIND_HELPERS_H_
|
||||
|
@@ -32,10 +32,10 @@
|
||||
#define CEF_INCLUDE_BASE_CEF_BUILD_H_
|
||||
#pragma once
|
||||
|
||||
#if defined(USING_CHROMIUM_INCLUDES)
|
||||
#if defined(BUILDING_CEF_SHARED)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/compiler_specific.h"
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
#else // !BUILDING_CEF_SHARED
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
@@ -135,7 +135,7 @@
|
||||
// Annotate a function indicating the caller must examine the return value.
|
||||
// Use like:
|
||||
// int foo() WARN_UNUSED_RESULT;
|
||||
// To explicitly ignore a result, see |ignore_result()| in <base/macros.h>.
|
||||
// To explicitly ignore a result, see |ignore_result()| in <base/basictypes.h>.
|
||||
#ifndef WARN_UNUSED_RESULT
|
||||
#if defined(COMPILER_GCC)
|
||||
#define WARN_UNUSED_RESULT __attribute__((warn_unused_result))
|
||||
@@ -165,7 +165,7 @@
|
||||
#define ALLOW_UNUSED_LOCAL(x) false ? (void)x : (void)0
|
||||
#endif
|
||||
|
||||
#endif // !USING_CHROMIUM_INCLUDES
|
||||
#endif // !BUILDING_CEF_SHARED
|
||||
|
||||
// Annotate a virtual method indicating it must be overriding a virtual method
|
||||
// in the parent class.
|
||||
|
@@ -37,10 +37,10 @@
|
||||
// This can happen in cases where Chromium code is used directly by the
|
||||
// client application. When using Chromium code directly always include
|
||||
// the Chromium header first to avoid type conflicts.
|
||||
#elif defined(USING_CHROMIUM_INCLUDES)
|
||||
#elif defined(BUILDING_CEF_SHARED)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/callback.h"
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
#else // !BUILDING_CEF_SHARED
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
@@ -802,6 +802,6 @@ typedef Callback<void(void)> Closure;
|
||||
|
||||
} // namespace base
|
||||
|
||||
#endif // !USING_CHROMIUM_INCLUDES
|
||||
#endif // !BUILDING_CEF_SHARED
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_CEF_CALLBACK_H_
|
||||
|
@@ -37,10 +37,10 @@
|
||||
// This can happen in cases where Chromium code is used directly by the
|
||||
// client application. When using Chromium code directly always include
|
||||
// the Chromium header first to avoid type conflicts.
|
||||
#elif defined(USING_CHROMIUM_INCLUDES)
|
||||
#elif defined(BUILDING_CEF_SHARED)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/callback_forward.h"
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
#else // !BUILDING_CEF_SHARED
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
@@ -54,6 +54,6 @@ typedef Callback<void(void)> Closure;
|
||||
|
||||
} // namespace base
|
||||
|
||||
#endif // !!USING_CHROMIUM_INCLUDES
|
||||
#endif // !!BUILDING_CEF_SHARED
|
||||
|
||||
#endif // INCLUDE_BASE_CEF_CALLBACK_FORWARD_H_
|
||||
|
@@ -46,10 +46,10 @@
|
||||
// This can happen in cases where Chromium code is used directly by the
|
||||
// client application. When using Chromium code directly always include
|
||||
// the Chromium header first to avoid type conflicts.
|
||||
#elif defined(USING_CHROMIUM_INCLUDES)
|
||||
#elif defined(BUILDING_CEF_SHARED)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/callback_helpers.h"
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
#else // !BUILDING_CEF_SHARED
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
@@ -88,6 +88,6 @@ class ScopedClosureRunner {
|
||||
|
||||
} // namespace base
|
||||
|
||||
#endif // !USING_CHROMIUM_INCLUDES
|
||||
#endif // !BUILDING_CEF_SHARED
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_CEF_CALLBACK_HELPERS_H_
|
||||
|
@@ -37,10 +37,10 @@
|
||||
// This can happen in cases where Chromium code is used directly by the
|
||||
// client application. When using Chromium code directly always include
|
||||
// the Chromium header first to avoid type conflicts.
|
||||
#elif defined(USING_CHROMIUM_INCLUDES)
|
||||
#elif defined(BUILDING_CEF_SHARED)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/callback_list.h"
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
#else // !BUILDING_CEF_SHARED
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
@@ -439,6 +439,6 @@ class CallbackList<void(A1, A2, A3, A4, A5, A6, A7)>
|
||||
|
||||
} // namespace base
|
||||
|
||||
#endif // !USING_CHROMIUM_INCLUDES
|
||||
#endif // !BUILDING_CEF_SHARED
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_CEF_CALLBACK_LIST_H_
|
||||
|
@@ -74,10 +74,10 @@
|
||||
// This can happen in cases where Chromium code is used directly by the
|
||||
// client application. When using Chromium code directly always include
|
||||
// the Chromium header first to avoid type conflicts.
|
||||
#elif defined(USING_CHROMIUM_INCLUDES)
|
||||
#elif defined(BUILDING_CEF_SHARED)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/cancelable_callback.h"
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
#else // !BUILDING_CEF_SHARED
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
@@ -309,6 +309,6 @@ typedef CancelableCallback<void(void)> CancelableClosure;
|
||||
|
||||
} // namespace base
|
||||
|
||||
#endif // !USING_CHROMIUM_INCLUDES
|
||||
#endif // !BUILDING_CEF_SHARED
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_CEF_CANCELABLE_CALLBACK_H_
|
||||
|
@@ -37,28 +37,26 @@
|
||||
// This can happen in cases where Chromium code is used directly by the
|
||||
// client application. When using Chromium code directly always include
|
||||
// the Chromium header first to avoid type conflicts.
|
||||
#elif defined(USING_CHROMIUM_INCLUDES)
|
||||
#elif defined(BUILDING_CEF_SHARED)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/synchronization/lock.h"
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
#else // !BUILDING_CEF_SHARED
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
|
||||
#include "include/base/cef_logging.h"
|
||||
#include "include/base/cef_macros.h"
|
||||
#include "include/base/cef_platform_thread.h"
|
||||
#include "include/base/internal/cef_lock_impl.h"
|
||||
|
||||
namespace base {
|
||||
namespace cef_internal {
|
||||
|
||||
// A convenient wrapper for an OS specific critical section. The only real
|
||||
// intelligence in this class is in debug mode for the support for the
|
||||
// AssertAcquired() method.
|
||||
class Lock {
|
||||
public:
|
||||
#if !DCHECK_IS_ON() // Optimized wrapper implementation
|
||||
#if defined(NDEBUG) // Optimized wrapper implementation
|
||||
Lock() : lock_() {}
|
||||
~Lock() {}
|
||||
void Acquire() { lock_.Lock(); }
|
||||
@@ -97,10 +95,10 @@ class Lock {
|
||||
}
|
||||
|
||||
void AssertAcquired() const;
|
||||
#endif // !DCHECK_IS_ON()
|
||||
#endif // NDEBUG
|
||||
|
||||
private:
|
||||
#if DCHECK_IS_ON()
|
||||
#if !defined(NDEBUG)
|
||||
// Members and routines taking care of locks assertions.
|
||||
// Note that this checks for recursive locks and allows them
|
||||
// if the variable is set. This is allowed by the underlying implementation
|
||||
@@ -112,10 +110,10 @@ class Lock {
|
||||
// All private data is implicitly protected by lock_.
|
||||
// Be VERY careful to only access members under that lock.
|
||||
base::PlatformThreadRef owning_thread_ref_;
|
||||
#endif // DCHECK_IS_ON()
|
||||
#endif // NDEBUG
|
||||
|
||||
// Platform specific underlying lock implementation.
|
||||
LockImpl lock_;
|
||||
cef_internal::LockImpl lock_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(Lock);
|
||||
};
|
||||
@@ -162,17 +160,8 @@ class AutoUnlock {
|
||||
DISALLOW_COPY_AND_ASSIGN(AutoUnlock);
|
||||
};
|
||||
|
||||
} // namespace cef_internal
|
||||
|
||||
// Implement classes in the cef_internal namespace and then expose them to the
|
||||
// base namespace. This avoids conflicts with the base.lib implementation when
|
||||
// linking sandbox support on Windows.
|
||||
using cef_internal::Lock;
|
||||
using cef_internal::AutoLock;
|
||||
using cef_internal::AutoUnlock;
|
||||
|
||||
} // namespace base
|
||||
|
||||
#endif // !USING_CHROMIUM_INCLUDES
|
||||
#endif // !BUILDING_CEF_SHARED
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_CEF_LOCK_H_
|
||||
|
@@ -149,10 +149,10 @@
|
||||
#define DCHECK_IS_ON() 1
|
||||
#endif
|
||||
|
||||
#elif defined(USING_CHROMIUM_INCLUDES)
|
||||
#elif defined(BUILDING_CEF_SHARED)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/logging.h"
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
#else // !BUILDING_CEF_SHARED
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
@@ -747,6 +747,6 @@ inline std::ostream& operator<<(std::ostream& out, const std::wstring& wstr) {
|
||||
EAT_STREAM_PARAMETERS
|
||||
#endif
|
||||
|
||||
#endif // !USING_CHROMIUM_INCLUDES
|
||||
#endif // !BUILDING_CEF_SHARED
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_CEF_LOGGING_H_
|
||||
|
@@ -32,11 +32,10 @@
|
||||
#define CEF_INCLUDE_BASE_CEF_MACROS_H_
|
||||
#pragma once
|
||||
|
||||
#if defined(USING_CHROMIUM_INCLUDES)
|
||||
#if defined(BUILDING_CEF_SHARED)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/macros.h"
|
||||
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
#else // !BUILDING_CEF_SHARED
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
@@ -44,6 +43,41 @@
|
||||
#include <stddef.h> // For size_t.
|
||||
#include "include/base/cef_build.h" // For COMPILER_MSVC
|
||||
|
||||
#if !defined(ALLOW_THIS_IN_INITIALIZER_LIST)
|
||||
#if defined(COMPILER_MSVC)
|
||||
|
||||
// MSVC_PUSH_DISABLE_WARNING pushes |n| onto a stack of warnings to be disabled.
|
||||
// The warning remains disabled until popped by MSVC_POP_WARNING.
|
||||
#define MSVC_PUSH_DISABLE_WARNING(n) __pragma(warning(push)) \
|
||||
__pragma(warning(disable:n))
|
||||
|
||||
// MSVC_PUSH_WARNING_LEVEL pushes |n| as the global warning level. The level
|
||||
// remains in effect until popped by MSVC_POP_WARNING(). Use 0 to disable all
|
||||
// warnings.
|
||||
#define MSVC_PUSH_WARNING_LEVEL(n) __pragma(warning(push, n))
|
||||
|
||||
// Pop effects of innermost MSVC_PUSH_* macro.
|
||||
#define MSVC_POP_WARNING() __pragma(warning(pop))
|
||||
|
||||
// Allows |this| to be passed as an argument in constructor initializer lists.
|
||||
// This uses push/pop instead of the seemingly simpler suppress feature to avoid
|
||||
// having the warning be disabled for more than just |code|.
|
||||
//
|
||||
// Example usage:
|
||||
// Foo::Foo() : x(NULL), ALLOW_THIS_IN_INITIALIZER_LIST(y(this)), z(3) {}
|
||||
//
|
||||
// Compiler warning C4355: 'this': used in base member initializer list:
|
||||
// http://msdn.microsoft.com/en-us/library/3c594ae3(VS.80).aspx
|
||||
#define ALLOW_THIS_IN_INITIALIZER_LIST(code) MSVC_PUSH_DISABLE_WARNING(4355) \
|
||||
code \
|
||||
MSVC_POP_WARNING()
|
||||
#else // !COMPILER_MSVC
|
||||
|
||||
#define ALLOW_THIS_IN_INITIALIZER_LIST(code) code
|
||||
|
||||
#endif // !COMPILER_MSVC
|
||||
#endif // !ALLOW_THIS_IN_INITIALIZER_LIST
|
||||
|
||||
#if !defined(arraysize)
|
||||
|
||||
// The arraysize(arr) macro returns the # of elements in an array arr.
|
||||
@@ -180,41 +214,6 @@ struct CompileAssert {
|
||||
|
||||
#endif // !defined(COMPILE_ASSERT)
|
||||
|
||||
#endif // !USING_CHROMIUM_INCLUDES
|
||||
|
||||
#if !defined(ALLOW_THIS_IN_INITIALIZER_LIST)
|
||||
#if defined(COMPILER_MSVC)
|
||||
|
||||
// MSVC_PUSH_DISABLE_WARNING pushes |n| onto a stack of warnings to be disabled.
|
||||
// The warning remains disabled until popped by MSVC_POP_WARNING.
|
||||
#define MSVC_PUSH_DISABLE_WARNING(n) __pragma(warning(push)) \
|
||||
__pragma(warning(disable:n))
|
||||
|
||||
// MSVC_PUSH_WARNING_LEVEL pushes |n| as the global warning level. The level
|
||||
// remains in effect until popped by MSVC_POP_WARNING(). Use 0 to disable all
|
||||
// warnings.
|
||||
#define MSVC_PUSH_WARNING_LEVEL(n) __pragma(warning(push, n))
|
||||
|
||||
// Pop effects of innermost MSVC_PUSH_* macro.
|
||||
#define MSVC_POP_WARNING() __pragma(warning(pop))
|
||||
|
||||
// Allows |this| to be passed as an argument in constructor initializer lists.
|
||||
// This uses push/pop instead of the seemingly simpler suppress feature to avoid
|
||||
// having the warning be disabled for more than just |code|.
|
||||
//
|
||||
// Example usage:
|
||||
// Foo::Foo() : x(NULL), ALLOW_THIS_IN_INITIALIZER_LIST(y(this)), z(3) {}
|
||||
//
|
||||
// Compiler warning C4355: 'this': used in base member initializer list:
|
||||
// http://msdn.microsoft.com/en-us/library/3c594ae3(VS.80).aspx
|
||||
#define ALLOW_THIS_IN_INITIALIZER_LIST(code) MSVC_PUSH_DISABLE_WARNING(4355) \
|
||||
code \
|
||||
MSVC_POP_WARNING()
|
||||
#else // !COMPILER_MSVC
|
||||
|
||||
#define ALLOW_THIS_IN_INITIALIZER_LIST(code) code
|
||||
|
||||
#endif // !COMPILER_MSVC
|
||||
#endif // !ALLOW_THIS_IN_INITIALIZER_LIST
|
||||
#endif // !BUILDING_CEF_SHARED
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_CEF_MACROS_H_
|
||||
|
@@ -36,10 +36,10 @@
|
||||
// This can happen in cases where Chromium code is used directly by the
|
||||
// client application. When using Chromium code directly always include
|
||||
// the Chromium header first to avoid type conflicts.
|
||||
#elif defined(USING_CHROMIUM_INCLUDES)
|
||||
#elif defined(BUILDING_CEF_SHARED)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/move.h"
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
#else // !BUILDING_CEF_SHARED
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
@@ -254,6 +254,6 @@
|
||||
typedef void MoveOnlyTypeForCPP03; \
|
||||
private:
|
||||
|
||||
#endif // !USING_CHROMIUM_INCLUDES
|
||||
#endif // !BUILDING_CEF_SHARED
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_CEF_MOVE_H_
|
||||
|
@@ -40,10 +40,10 @@
|
||||
// This can happen in cases where Chromium code is used directly by the
|
||||
// client application. When using Chromium code directly always include
|
||||
// the Chromium header first to avoid type conflicts.
|
||||
#elif defined(USING_CHROMIUM_INCLUDES)
|
||||
#elif defined(BUILDING_CEF_SHARED)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/threading/platform_thread.h"
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
#else // !BUILDING_CEF_SHARED
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
@@ -108,6 +108,6 @@ inline PlatformThreadRef CurrentRef() {
|
||||
|
||||
} // namespace base
|
||||
|
||||
#endif // !USING_CHROMIUM_INCLUDES
|
||||
#endif // !BUILDING_CEF_SHARED
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_PLATFORM_THREAD_H_
|
||||
|
@@ -38,10 +38,10 @@
|
||||
// This can happen in cases where Chromium code is used directly by the
|
||||
// client application. When using Chromium code directly always include
|
||||
// the Chromium header first to avoid type conflicts.
|
||||
#elif defined(USING_CHROMIUM_INCLUDES)
|
||||
#elif defined(BUILDING_CEF_SHARED)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/memory/ref_counted.h"
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
#else // !BUILDING_CEF_SHARED
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
@@ -50,7 +50,9 @@
|
||||
|
||||
#include "include/base/cef_atomic_ref_count.h"
|
||||
#include "include/base/cef_build.h"
|
||||
#ifndef NDEBUG
|
||||
#include "include/base/cef_logging.h"
|
||||
#endif
|
||||
#include "include/base/cef_thread_collision_warner.h"
|
||||
|
||||
namespace base {
|
||||
@@ -64,14 +66,14 @@ class RefCountedBase {
|
||||
protected:
|
||||
RefCountedBase()
|
||||
: ref_count_(0)
|
||||
#if DCHECK_IS_ON()
|
||||
#ifndef NDEBUG
|
||||
, in_dtor_(false)
|
||||
#endif
|
||||
{
|
||||
}
|
||||
|
||||
~RefCountedBase() {
|
||||
#if DCHECK_IS_ON()
|
||||
#ifndef NDEBUG
|
||||
DCHECK(in_dtor_) << "RefCounted object deleted without calling Release()";
|
||||
#endif
|
||||
}
|
||||
@@ -82,7 +84,7 @@ class RefCountedBase {
|
||||
// Current thread books the critical section "AddRelease"
|
||||
// without release it.
|
||||
// DFAKE_SCOPED_LOCK_THREAD_LOCKED(add_release_);
|
||||
#if DCHECK_IS_ON()
|
||||
#ifndef NDEBUG
|
||||
DCHECK(!in_dtor_);
|
||||
#endif
|
||||
++ref_count_;
|
||||
@@ -94,11 +96,11 @@ class RefCountedBase {
|
||||
// Current thread books the critical section "AddRelease"
|
||||
// without release it.
|
||||
// DFAKE_SCOPED_LOCK_THREAD_LOCKED(add_release_);
|
||||
#if DCHECK_IS_ON()
|
||||
#ifndef NDEBUG
|
||||
DCHECK(!in_dtor_);
|
||||
#endif
|
||||
if (--ref_count_ == 0) {
|
||||
#if DCHECK_IS_ON()
|
||||
#ifndef NDEBUG
|
||||
in_dtor_ = true;
|
||||
#endif
|
||||
return true;
|
||||
@@ -108,7 +110,7 @@ class RefCountedBase {
|
||||
|
||||
private:
|
||||
mutable int ref_count_;
|
||||
#if DCHECK_IS_ON()
|
||||
#ifndef NDEBUG
|
||||
mutable bool in_dtor_;
|
||||
#endif
|
||||
|
||||
@@ -132,7 +134,7 @@ class RefCountedThreadSafeBase {
|
||||
|
||||
private:
|
||||
mutable AtomicRefCount ref_count_;
|
||||
#if DCHECK_IS_ON()
|
||||
#ifndef NDEBUG
|
||||
mutable bool in_dtor_;
|
||||
#endif
|
||||
|
||||
@@ -379,6 +381,6 @@ scoped_refptr<T> make_scoped_refptr(T* t) {
|
||||
return scoped_refptr<T>(t);
|
||||
}
|
||||
|
||||
#endif // !USING_CHROMIUM_INCLUDES
|
||||
#endif // !BUILDING_CEF_SHARED
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_CEF_REF_COUNTED_H_
|
||||
|
@@ -119,9 +119,10 @@
|
||||
// This can happen in cases where Chromium code is used directly by the
|
||||
// client application. When using Chromium code directly always include
|
||||
// the Chromium header first to avoid type conflicts.
|
||||
#elif defined(USING_CHROMIUM_INCLUDES)
|
||||
// Do nothing when building CEF.
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
#elif defined(BUILDING_CEF_SHARED)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#else // !BUILDING_CEF_SHARED
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
@@ -618,6 +619,6 @@ scoped_ptr<T> make_scoped_ptr(T* ptr) {
|
||||
return scoped_ptr<T>(ptr);
|
||||
}
|
||||
|
||||
#endif // !USING_CHROMIUM_INCLUDES
|
||||
#endif // !BUILDING_CEF_SHARED
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_CEF_MEMORY_SCOPED_PTR_H_
|
||||
|
@@ -37,10 +37,10 @@
|
||||
// This can happen in cases where Chromium code is used directly by the
|
||||
// client application. When using Chromium code directly always include
|
||||
// the Chromium header first to avoid type conflicts.
|
||||
#elif defined(USING_CHROMIUM_INCLUDES)
|
||||
#elif defined(BUILDING_CEF_SHARED)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/strings/string16.h"
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
#else // !BUILDING_CEF_SHARED
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
@@ -222,6 +222,6 @@ class std::basic_string<base::char16, base::string16_char_traits>;
|
||||
|
||||
#endif // WCHAR_T_IS_UTF32
|
||||
|
||||
#endif // !USING_CHROMIUM_INCLUDES
|
||||
#endif // !BUILDING_CEF_SHARED
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_CEF_STRING16_H_
|
||||
|
@@ -37,10 +37,10 @@
|
||||
// This can happen in cases where Chromium code is used directly by the
|
||||
// client application. When using Chromium code directly always include
|
||||
// the Chromium header first to avoid type conflicts.
|
||||
#elif defined(USING_CHROMIUM_INCLUDES)
|
||||
#elif defined(BUILDING_CEF_SHARED)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/template_util.h"
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
#else // !BUILDING_CEF_SHARED
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
@@ -187,6 +187,6 @@ struct enable_if<true, T> { typedef T type; };
|
||||
|
||||
} // namespace base
|
||||
|
||||
#endif // !USING_CHROMIUM_INCLUDES
|
||||
#endif // !BUILDING_CEF_SHARED
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_CEF_TEMPLATE_UTIL_H_
|
||||
|
@@ -37,10 +37,10 @@
|
||||
// This can happen in cases where Chromium code is used directly by the
|
||||
// client application. When using Chromium code directly always include
|
||||
// the Chromium header first to avoid type conflicts.
|
||||
#elif defined(USING_CHROMIUM_INCLUDES)
|
||||
#elif defined(BUILDING_CEF_SHARED)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/threading/thread_checker.h"
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
#else // !BUILDING_CEF_SHARED
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
@@ -121,6 +121,6 @@ class ThreadChecker : public cef_internal::ThreadCheckerDoNothing {
|
||||
|
||||
} // namespace base
|
||||
|
||||
#endif // !USING_CHROMIUM_INCLUDES
|
||||
#endif // !BUILDING_CEF_SHARED
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_THREAD_CHECKER_H_
|
||||
|
@@ -37,10 +37,10 @@
|
||||
// This can happen in cases where Chromium code is used directly by the
|
||||
// client application. When using Chromium code directly always include
|
||||
// the Chromium header first to avoid type conflicts.
|
||||
#elif defined(USING_CHROMIUM_INCLUDES)
|
||||
#elif defined(BUILDING_CEF_SHARED)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/threading/thread_collision_warner.h"
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
#else // !BUILDING_CEF_SHARED
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
@@ -50,7 +50,6 @@
|
||||
#include "include/base/cef_atomicops.h"
|
||||
#include "include/base/cef_basictypes.h"
|
||||
#include "include/base/cef_build.h"
|
||||
#include "include/base/cef_logging.h"
|
||||
#include "include/base/cef_macros.h"
|
||||
|
||||
// A helper class alongside macros to be used to verify assumptions about thread
|
||||
@@ -140,7 +139,7 @@
|
||||
// };
|
||||
|
||||
|
||||
#if DCHECK_IS_ON()
|
||||
#if !defined(NDEBUG)
|
||||
|
||||
// Defines a class member that acts like a mutex. It is used only as a
|
||||
// verification tool.
|
||||
@@ -283,6 +282,6 @@ class ThreadCollisionWarner {
|
||||
|
||||
} // namespace base
|
||||
|
||||
#endif // !USING_CHROMIUM_INCLUDES
|
||||
#endif // !BUILDING_CEF_SHARED
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_CEF_THREAD_COLLISION_WARNER_H_
|
||||
|
@@ -145,10 +145,10 @@
|
||||
// This can happen in cases where Chromium code is used directly by the
|
||||
// client application. When using Chromium code directly always include
|
||||
// the Chromium header first to avoid type conflicts.
|
||||
#elif defined(USING_CHROMIUM_INCLUDES)
|
||||
#elif defined(BUILDING_CEF_SHARED)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/trace_event/trace_event.h"
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
#include "base/debug/trace_event.h"
|
||||
#else // !BUILDING_CEF_SHARED
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
@@ -422,6 +422,6 @@ class CefTraceEndOnScopeClose {
|
||||
|
||||
} // cef_trace_event
|
||||
|
||||
#endif // !USING_CHROMIUM_INCLUDES
|
||||
#endif // !BUILDING_CEF_SHARED
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_CEF_TRACE_EVENT_H_
|
||||
|
@@ -57,14 +57,84 @@
|
||||
#pragma once
|
||||
|
||||
#if defined(BASE_TUPLE_H_)
|
||||
// Do nothing if the Chromium header has already been included.
|
||||
// The Chromium header has already been included.
|
||||
// This can happen in cases where Chromium code is used directly by the
|
||||
// client application. When using Chromium code directly always include
|
||||
// the Chromium header first to avoid type conflicts.
|
||||
#elif defined(USING_CHROMIUM_INCLUDES)
|
||||
|
||||
// For legacy compatibility, we name the first 8 tuple elements "a", "b", ...
|
||||
// TODO(cef): Remove this code when cef_runnable.h is deleted.
|
||||
|
||||
namespace base {
|
||||
|
||||
#define DEFINE_TUPLE_LEAF(N, x) \
|
||||
template <typename T> \
|
||||
struct TupleLeaf<N, T> { \
|
||||
TupleLeaf() {} \
|
||||
explicit TupleLeaf(typename TupleTraits<T>::ParamType x) : x(x) {} \
|
||||
\
|
||||
T& get() { return x; } \
|
||||
const T& get() const { return x; } \
|
||||
\
|
||||
T x; \
|
||||
}
|
||||
|
||||
DEFINE_TUPLE_LEAF(0, a);
|
||||
DEFINE_TUPLE_LEAF(1, b);
|
||||
DEFINE_TUPLE_LEAF(2, c);
|
||||
DEFINE_TUPLE_LEAF(3, d);
|
||||
DEFINE_TUPLE_LEAF(4, e);
|
||||
DEFINE_TUPLE_LEAF(5, f);
|
||||
DEFINE_TUPLE_LEAF(6, g);
|
||||
DEFINE_TUPLE_LEAF(7, h);
|
||||
|
||||
#undef DEFINE_TUPLE_LEAF
|
||||
|
||||
// Deprecated compat aliases
|
||||
// TODO(cef): Remove this code when cef_runnable.h is deleted.
|
||||
|
||||
using Tuple0 = Tuple<>;
|
||||
template <typename A>
|
||||
using Tuple1 = Tuple<A>;
|
||||
template <typename A, typename B>
|
||||
using Tuple2 = Tuple<A, B>;
|
||||
template <typename A, typename B, typename C>
|
||||
using Tuple3 = Tuple<A, B, C>;
|
||||
template <typename A, typename B, typename C, typename D>
|
||||
using Tuple4 = Tuple<A, B, C, D>;
|
||||
template <typename A, typename B, typename C, typename D, typename E>
|
||||
using Tuple5 = Tuple<A, B, C, D, E>;
|
||||
template <typename A,
|
||||
typename B,
|
||||
typename C,
|
||||
typename D,
|
||||
typename E,
|
||||
typename F>
|
||||
using Tuple6 = Tuple<A, B, C, D, E, F>;
|
||||
template <typename A,
|
||||
typename B,
|
||||
typename C,
|
||||
typename D,
|
||||
typename E,
|
||||
typename F,
|
||||
typename G>
|
||||
using Tuple7 = Tuple<A, B, C, D, E, F, G>;
|
||||
template <typename A,
|
||||
typename B,
|
||||
typename C,
|
||||
typename D,
|
||||
typename E,
|
||||
typename F,
|
||||
typename G,
|
||||
typename H>
|
||||
using Tuple8 = Tuple<A, B, C, D, E, F, G, H>;
|
||||
|
||||
} // namespace base
|
||||
|
||||
#elif defined(BUILDING_CEF_SHARED)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/tuple.h"
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
#else // !BUILDING_CEF_SHARED
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
@@ -1332,6 +1402,6 @@ inline void DispatchToMethod(ObjT* obj, Method method,
|
||||
|
||||
} // namespace base
|
||||
|
||||
#endif // !USING_CHROMIUM_INCLUDES
|
||||
#endif // !BUILDING_CEF_SHARED
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_CEF_TUPLE_H_
|
||||
|
@@ -101,10 +101,10 @@
|
||||
// This can happen in cases where Chromium code is used directly by the
|
||||
// client application. When using Chromium code directly always include
|
||||
// the Chromium header first to avoid type conflicts.
|
||||
#elif defined(USING_CHROMIUM_INCLUDES)
|
||||
#elif defined(BUILDING_CEF_SHARED)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
#else // !BUILDING_CEF_SHARED
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
@@ -383,6 +383,6 @@ WeakPtr<Derived> AsWeakPtr(Derived* t) {
|
||||
|
||||
} // namespace base
|
||||
|
||||
#endif // !USING_CHROMIUM_INCLUDES
|
||||
#endif // !BUILDING_CEF_SHARED
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_CEF_WEAK_PTR_H_
|
||||
|
@@ -1,320 +0,0 @@
|
||||
// Copyright (c) 2013 Google Inc. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Do not include this header file directly. Use base/cef_atomicops.h
|
||||
// instead.
|
||||
//
|
||||
// LinuxKernelCmpxchg and Barrier_AtomicIncrement are from Google Gears.
|
||||
|
||||
#ifndef CEF_INCLUDE_BASE_INTERNAL_CEF_ATOMICOPS_ARM_GCC_H_
|
||||
#define CEF_INCLUDE_BASE_INTERNAL_CEF_ATOMICOPS_ARM_GCC_H_
|
||||
|
||||
#if defined(OS_QNX)
|
||||
#include <sys/cpuinline.h>
|
||||
#endif
|
||||
|
||||
namespace base {
|
||||
namespace subtle {
|
||||
|
||||
// Memory barriers on ARM are funky, but the kernel is here to help:
|
||||
//
|
||||
// * ARMv5 didn't support SMP, there is no memory barrier instruction at
|
||||
// all on this architecture, or when targeting its machine code.
|
||||
//
|
||||
// * Some ARMv6 CPUs support SMP. A full memory barrier can be produced by
|
||||
// writing a random value to a very specific coprocessor register.
|
||||
//
|
||||
// * On ARMv7, the "dmb" instruction is used to perform a full memory
|
||||
// barrier (though writing to the co-processor will still work).
|
||||
// However, on single core devices (e.g. Nexus One, or Nexus S),
|
||||
// this instruction will take up to 200 ns, which is huge, even though
|
||||
// it's completely un-needed on these devices.
|
||||
//
|
||||
// * There is no easy way to determine at runtime if the device is
|
||||
// single or multi-core. However, the kernel provides a useful helper
|
||||
// function at a fixed memory address (0xffff0fa0), which will always
|
||||
// perform a memory barrier in the most efficient way. I.e. on single
|
||||
// core devices, this is an empty function that exits immediately.
|
||||
// On multi-core devices, it implements a full memory barrier.
|
||||
//
|
||||
// * This source could be compiled to ARMv5 machine code that runs on a
|
||||
// multi-core ARMv6 or ARMv7 device. In this case, memory barriers
|
||||
// are needed for correct execution. Always call the kernel helper, even
|
||||
// when targeting ARMv5TE.
|
||||
//
|
||||
|
||||
inline void MemoryBarrier() {
|
||||
#if defined(OS_LINUX) || defined(OS_ANDROID)
|
||||
// Note: This is a function call, which is also an implicit compiler barrier.
|
||||
typedef void (*KernelMemoryBarrierFunc)();
|
||||
((KernelMemoryBarrierFunc)0xffff0fa0)();
|
||||
#elif defined(OS_QNX)
|
||||
__cpu_membarrier();
|
||||
#else
|
||||
#error MemoryBarrier() is not implemented on this platform.
|
||||
#endif
|
||||
}
|
||||
|
||||
// An ARM toolchain would only define one of these depending on which
|
||||
// variant of the target architecture is being used. This tests against
|
||||
// any known ARMv6 or ARMv7 variant, where it is possible to directly
|
||||
// use ldrex/strex instructions to implement fast atomic operations.
|
||||
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || \
|
||||
defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || \
|
||||
defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || \
|
||||
defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || \
|
||||
defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__)
|
||||
|
||||
inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
|
||||
Atomic32 old_value,
|
||||
Atomic32 new_value) {
|
||||
Atomic32 prev_value;
|
||||
int reloop;
|
||||
do {
|
||||
// The following is equivalent to:
|
||||
//
|
||||
// prev_value = LDREX(ptr)
|
||||
// reloop = 0
|
||||
// if (prev_value != old_value)
|
||||
// reloop = STREX(ptr, new_value)
|
||||
__asm__ __volatile__(" ldrex %0, [%3]\n"
|
||||
" mov %1, #0\n"
|
||||
" cmp %0, %4\n"
|
||||
#ifdef __thumb2__
|
||||
" it eq\n"
|
||||
#endif
|
||||
" strexeq %1, %5, [%3]\n"
|
||||
: "=&r"(prev_value), "=&r"(reloop), "+m"(*ptr)
|
||||
: "r"(ptr), "r"(old_value), "r"(new_value)
|
||||
: "cc", "memory");
|
||||
} while (reloop != 0);
|
||||
return prev_value;
|
||||
}
|
||||
|
||||
inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
|
||||
Atomic32 old_value,
|
||||
Atomic32 new_value) {
|
||||
Atomic32 result = NoBarrier_CompareAndSwap(ptr, old_value, new_value);
|
||||
MemoryBarrier();
|
||||
return result;
|
||||
}
|
||||
|
||||
inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr,
|
||||
Atomic32 old_value,
|
||||
Atomic32 new_value) {
|
||||
MemoryBarrier();
|
||||
return NoBarrier_CompareAndSwap(ptr, old_value, new_value);
|
||||
}
|
||||
|
||||
inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
|
||||
Atomic32 increment) {
|
||||
Atomic32 value;
|
||||
int reloop;
|
||||
do {
|
||||
// Equivalent to:
|
||||
//
|
||||
// value = LDREX(ptr)
|
||||
// value += increment
|
||||
// reloop = STREX(ptr, value)
|
||||
//
|
||||
__asm__ __volatile__(" ldrex %0, [%3]\n"
|
||||
" add %0, %0, %4\n"
|
||||
" strex %1, %0, [%3]\n"
|
||||
: "=&r"(value), "=&r"(reloop), "+m"(*ptr)
|
||||
: "r"(ptr), "r"(increment)
|
||||
: "cc", "memory");
|
||||
} while (reloop);
|
||||
return value;
|
||||
}
|
||||
|
||||
inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
|
||||
Atomic32 increment) {
|
||||
// TODO(digit): Investigate if it's possible to implement this with
|
||||
// a single MemoryBarrier() operation between the LDREX and STREX.
|
||||
// See http://crbug.com/246514
|
||||
MemoryBarrier();
|
||||
Atomic32 result = NoBarrier_AtomicIncrement(ptr, increment);
|
||||
MemoryBarrier();
|
||||
return result;
|
||||
}
|
||||
|
||||
inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr,
|
||||
Atomic32 new_value) {
|
||||
Atomic32 old_value;
|
||||
int reloop;
|
||||
do {
|
||||
// old_value = LDREX(ptr)
|
||||
// reloop = STREX(ptr, new_value)
|
||||
__asm__ __volatile__(" ldrex %0, [%3]\n"
|
||||
" strex %1, %4, [%3]\n"
|
||||
: "=&r"(old_value), "=&r"(reloop), "+m"(*ptr)
|
||||
: "r"(ptr), "r"(new_value)
|
||||
: "cc", "memory");
|
||||
} while (reloop != 0);
|
||||
return old_value;
|
||||
}
|
||||
|
||||
// This tests against any known ARMv5 variant.
|
||||
#elif defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || \
|
||||
defined(__ARM_ARCH_5TE__) || defined(__ARM_ARCH_5TEJ__)
|
||||
|
||||
// The kernel also provides a helper function to perform an atomic
|
||||
// compare-and-swap operation at the hard-wired address 0xffff0fc0.
|
||||
// On ARMv5, this is implemented by a special code path that the kernel
|
||||
// detects and treats specially when thread pre-emption happens.
|
||||
// On ARMv6 and higher, it uses LDREX/STREX instructions instead.
|
||||
//
|
||||
// Note that this always perform a full memory barrier, there is no
|
||||
// need to add calls MemoryBarrier() before or after it. It also
|
||||
// returns 0 on success, and 1 on exit.
|
||||
//
|
||||
// Available and reliable since Linux 2.6.24. Both Android and ChromeOS
|
||||
// use newer kernel revisions, so this should not be a concern.
|
||||
namespace {
|
||||
|
||||
inline int LinuxKernelCmpxchg(Atomic32 old_value,
|
||||
Atomic32 new_value,
|
||||
volatile Atomic32* ptr) {
|
||||
typedef int (*KernelCmpxchgFunc)(Atomic32, Atomic32, volatile Atomic32*);
|
||||
return ((KernelCmpxchgFunc)0xffff0fc0)(old_value, new_value, ptr);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
|
||||
Atomic32 old_value,
|
||||
Atomic32 new_value) {
|
||||
Atomic32 prev_value;
|
||||
for (;;) {
|
||||
prev_value = *ptr;
|
||||
if (prev_value != old_value)
|
||||
return prev_value;
|
||||
if (!LinuxKernelCmpxchg(old_value, new_value, ptr))
|
||||
return old_value;
|
||||
}
|
||||
}
|
||||
|
||||
inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr,
|
||||
Atomic32 new_value) {
|
||||
Atomic32 old_value;
|
||||
do {
|
||||
old_value = *ptr;
|
||||
} while (LinuxKernelCmpxchg(old_value, new_value, ptr));
|
||||
return old_value;
|
||||
}
|
||||
|
||||
inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
|
||||
Atomic32 increment) {
|
||||
return Barrier_AtomicIncrement(ptr, increment);
|
||||
}
|
||||
|
||||
inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
|
||||
Atomic32 increment) {
|
||||
for (;;) {
|
||||
// Atomic exchange the old value with an incremented one.
|
||||
Atomic32 old_value = *ptr;
|
||||
Atomic32 new_value = old_value + increment;
|
||||
if (!LinuxKernelCmpxchg(old_value, new_value, ptr)) {
|
||||
// The exchange took place as expected.
|
||||
return new_value;
|
||||
}
|
||||
// Otherwise, *ptr changed mid-loop and we need to retry.
|
||||
}
|
||||
}
|
||||
|
||||
inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
|
||||
Atomic32 old_value,
|
||||
Atomic32 new_value) {
|
||||
Atomic32 prev_value;
|
||||
for (;;) {
|
||||
prev_value = *ptr;
|
||||
if (prev_value != old_value) {
|
||||
// Always ensure acquire semantics.
|
||||
MemoryBarrier();
|
||||
return prev_value;
|
||||
}
|
||||
if (!LinuxKernelCmpxchg(old_value, new_value, ptr))
|
||||
return old_value;
|
||||
}
|
||||
}
|
||||
|
||||
inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr,
|
||||
Atomic32 old_value,
|
||||
Atomic32 new_value) {
|
||||
// This could be implemented as:
|
||||
// MemoryBarrier();
|
||||
// return NoBarrier_CompareAndSwap();
|
||||
//
|
||||
// But would use 3 barriers per succesful CAS. To save performance,
|
||||
// use Acquire_CompareAndSwap(). Its implementation guarantees that:
|
||||
// - A succesful swap uses only 2 barriers (in the kernel helper).
|
||||
// - An early return due to (prev_value != old_value) performs
|
||||
// a memory barrier with no store, which is equivalent to the
|
||||
// generic implementation above.
|
||||
return Acquire_CompareAndSwap(ptr, old_value, new_value);
|
||||
}
|
||||
|
||||
#else
|
||||
# error "Your CPU's ARM architecture is not supported yet"
|
||||
#endif
|
||||
|
||||
// NOTE: Atomicity of the following load and store operations is only
|
||||
// guaranteed in case of 32-bit alignement of |ptr| values.
|
||||
|
||||
inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
|
||||
*ptr = value;
|
||||
}
|
||||
|
||||
inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
|
||||
*ptr = value;
|
||||
MemoryBarrier();
|
||||
}
|
||||
|
||||
inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) {
|
||||
MemoryBarrier();
|
||||
*ptr = value;
|
||||
}
|
||||
|
||||
inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) { return *ptr; }
|
||||
|
||||
inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
|
||||
Atomic32 value = *ptr;
|
||||
MemoryBarrier();
|
||||
return value;
|
||||
}
|
||||
|
||||
inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
|
||||
MemoryBarrier();
|
||||
return *ptr;
|
||||
}
|
||||
|
||||
} // namespace base::subtle
|
||||
} // namespace base
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_INTERNAL_CEF_ATOMICOPS_ARM_GCC_H_
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -144,18 +144,11 @@ CEF_EXPORT void cef_shutdown();
|
||||
|
||||
///
|
||||
// Perform a single iteration of CEF message loop processing. This function is
|
||||
// provided for cases where the CEF message loop must be integrated into an
|
||||
// existing application message loop. Use of this function is not recommended
|
||||
// for most users; use either the cef_run_message_loop() function or
|
||||
// CefSettings.multi_threaded_message_loop if possible. When using this function
|
||||
// care must be taken to balance performance against excessive CPU usage. It is
|
||||
// recommended to enable the CefSettings.external_message_pump option when using
|
||||
// this function so that
|
||||
// cef_browser_process_handler_t::on_schedule_message_pump_work() callbacks can
|
||||
// facilitate the scheduling process. This function should only be called on the
|
||||
// main application thread and only if cef_initialize() is called with a
|
||||
// CefSettings.multi_threaded_message_loop value of false (0). This function
|
||||
// will not block.
|
||||
// used to integrate the CEF message loop into an existing application message
|
||||
// loop. Care must be taken to balance performance against excessive CPU usage.
|
||||
// This function should only be called on the main application thread and only
|
||||
// if cef_initialize() is called with a CefSettings.multi_threaded_message_loop
|
||||
// value of false (0). This function will not block.
|
||||
///
|
||||
CEF_EXPORT void cef_do_message_loop_work();
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -41,7 +41,6 @@
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
#include "include/capi/cef_drag_data_capi.h"
|
||||
#include "include/capi/cef_frame_capi.h"
|
||||
#include "include/capi/cef_image_capi.h"
|
||||
#include "include/capi/cef_navigation_entry_capi.h"
|
||||
#include "include/capi/cef_process_message_capi.h"
|
||||
#include "include/capi/cef_request_context_capi.h"
|
||||
@@ -175,7 +174,7 @@ typedef struct _cef_browser_t {
|
||||
void (CEF_CALLBACK *get_frame_names)(struct _cef_browser_t* self,
|
||||
cef_string_list_t names);
|
||||
|
||||
///
|
||||
//
|
||||
// Send a message to the specified |target_process|. Returns true (1) if the
|
||||
// message was sent successfully.
|
||||
///
|
||||
@@ -252,29 +251,6 @@ typedef struct _cef_pdf_print_callback_t {
|
||||
} cef_pdf_print_callback_t;
|
||||
|
||||
|
||||
///
|
||||
// Callback structure for cef_browser_host_t::DownloadImage. The functions of
|
||||
// this structure will be called on the browser process UI thread.
|
||||
///
|
||||
typedef struct _cef_download_image_callback_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Method that will be executed when the image download has completed.
|
||||
// |image_url| is the URL that was downloaded and |http_status_code| is the
|
||||
// resulting HTTP status code. |image| is the resulting image, possibly at
|
||||
// multiple scale factors, or NULL if the download failed.
|
||||
///
|
||||
void (CEF_CALLBACK *on_download_image_finished)(
|
||||
struct _cef_download_image_callback_t* self,
|
||||
const cef_string_t* image_url, int http_status_code,
|
||||
struct _cef_image_t* image);
|
||||
} cef_download_image_callback_t;
|
||||
|
||||
|
||||
///
|
||||
// Structure used to represent the browser process aspects of a browser window.
|
||||
// The functions of this structure can only be called in the browser process.
|
||||
@@ -306,43 +282,32 @@ typedef struct _cef_browser_host_t {
|
||||
void (CEF_CALLBACK *close_browser)(struct _cef_browser_host_t* self,
|
||||
int force_close);
|
||||
|
||||
///
|
||||
// Helper for closing a browser. Call this function from the top-level window
|
||||
// close handler. Internally this calls CloseBrowser(false (0)) if the close
|
||||
// has not yet been initiated. This function returns false (0) while the close
|
||||
// is pending and true (1) after the close has completed. See close_browser()
|
||||
// and cef_life_span_handler_t::do_close() documentation for additional usage
|
||||
// information. This function must be called on the browser process UI thread.
|
||||
///
|
||||
int (CEF_CALLBACK *try_close_browser)(struct _cef_browser_host_t* self);
|
||||
|
||||
///
|
||||
// Set whether the browser is focused.
|
||||
///
|
||||
void (CEF_CALLBACK *set_focus)(struct _cef_browser_host_t* self, int focus);
|
||||
|
||||
///
|
||||
// Retrieve the window handle for this browser. If this browser is wrapped in
|
||||
// a cef_browser_view_t this function should be called on the browser process
|
||||
// UI thread and it will return the handle for the top-level native window.
|
||||
// Set whether the window containing the browser is visible
|
||||
// (minimized/unminimized, app hidden/unhidden, etc). Only used on Mac OS X.
|
||||
///
|
||||
void (CEF_CALLBACK *set_window_visibility)(struct _cef_browser_host_t* self,
|
||||
int visible);
|
||||
|
||||
///
|
||||
// Retrieve the window handle for this browser.
|
||||
///
|
||||
cef_window_handle_t (CEF_CALLBACK *get_window_handle)(
|
||||
struct _cef_browser_host_t* self);
|
||||
|
||||
///
|
||||
// Retrieve the window handle of the browser that opened this browser. Will
|
||||
// return NULL for non-popup windows or if this browser is wrapped in a
|
||||
// cef_browser_view_t. This function can be used in combination with custom
|
||||
// handling of modal windows.
|
||||
// return NULL for non-popup windows. This function can be used in combination
|
||||
// with custom handling of modal windows.
|
||||
///
|
||||
cef_window_handle_t (CEF_CALLBACK *get_opener_window_handle)(
|
||||
struct _cef_browser_host_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if this browser is wrapped in a cef_browser_view_t.
|
||||
///
|
||||
int (CEF_CALLBACK *has_view)(struct _cef_browser_host_t* self);
|
||||
|
||||
///
|
||||
// Returns the client for this browser.
|
||||
///
|
||||
@@ -397,22 +362,6 @@ typedef struct _cef_browser_host_t {
|
||||
void (CEF_CALLBACK *start_download)(struct _cef_browser_host_t* self,
|
||||
const cef_string_t* url);
|
||||
|
||||
///
|
||||
// Download |image_url| and execute |callback| on completion with the images
|
||||
// received from the renderer. If |is_favicon| is true (1) then cookies are
|
||||
// not sent and not accepted during download. Images with density independent
|
||||
// pixel (DIP) sizes larger than |max_image_size| are filtered out from the
|
||||
// image results. Versions of the image at different scale factors may be
|
||||
// downloaded up to the maximum scale factor supported by the system. If there
|
||||
// are no image results <= |max_image_size| then the smallest image is resized
|
||||
// to |max_image_size| and is the only result. A |max_image_size| of 0 means
|
||||
// unlimited. If |bypass_cache| is true (1) then |image_url| is requested from
|
||||
// the server even if it is present in the browser cache.
|
||||
///
|
||||
void (CEF_CALLBACK *download_image)(struct _cef_browser_host_t* self,
|
||||
const cef_string_t* image_url, int is_favicon, uint32 max_image_size,
|
||||
int bypass_cache, struct _cef_download_image_callback_t* callback);
|
||||
|
||||
///
|
||||
// Print the current browser contents.
|
||||
///
|
||||
@@ -448,13 +397,8 @@ typedef struct _cef_browser_host_t {
|
||||
int clearSelection);
|
||||
|
||||
///
|
||||
// Open developer tools (DevTools) in its own browser. The DevTools browser
|
||||
// will remain associated with this browser. If the DevTools browser is
|
||||
// already open then it will be focused, in which case the |windowInfo|,
|
||||
// |client| and |settings| parameters will be ignored. If |inspect_element_at|
|
||||
// is non-NULL then the element at the specified (x,y) location will be
|
||||
// inspected. The |windowInfo| parameter will be ignored if this browser is
|
||||
// wrapped in a cef_browser_view_t.
|
||||
// Open developer tools in its own window. If |inspect_element_at| is non-
|
||||
// NULL the element at the specified (x,y) location will be inspected.
|
||||
///
|
||||
void (CEF_CALLBACK *show_dev_tools)(struct _cef_browser_host_t* self,
|
||||
const struct _cef_window_info_t* windowInfo,
|
||||
@@ -463,22 +407,18 @@ typedef struct _cef_browser_host_t {
|
||||
const cef_point_t* inspect_element_at);
|
||||
|
||||
///
|
||||
// Explicitly close the associated DevTools browser, if any.
|
||||
// Explicitly close the developer tools window if one exists for this browser
|
||||
// instance.
|
||||
///
|
||||
void (CEF_CALLBACK *close_dev_tools)(struct _cef_browser_host_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if this browser currently has an associated DevTools
|
||||
// browser. Must be called on the browser process UI thread.
|
||||
///
|
||||
int (CEF_CALLBACK *has_dev_tools)(struct _cef_browser_host_t* self);
|
||||
|
||||
///
|
||||
// Retrieve a snapshot of current navigation entries as values sent to the
|
||||
// specified visitor. If |current_only| is true (1) only the current
|
||||
// navigation entry will be sent, otherwise all navigation entries will be
|
||||
// sent.
|
||||
///
|
||||
///
|
||||
void (CEF_CALLBACK *get_navigation_entries)(struct _cef_browser_host_t* self,
|
||||
struct _cef_navigation_entry_visitor_t* visitor, int current_only);
|
||||
|
||||
@@ -618,62 +558,24 @@ typedef struct _cef_browser_host_t {
|
||||
struct _cef_browser_host_t* self, int frame_rate);
|
||||
|
||||
///
|
||||
// Begins a new composition or updates the existing composition. Blink has a
|
||||
// special node (a composition node) that allows the input function to change
|
||||
// text without affecting other DOM nodes. |text| is the optional text that
|
||||
// will be inserted into the composition node. |underlines| is an optional set
|
||||
// of ranges that will be underlined in the resulting text.
|
||||
// |replacement_range| is an optional range of the existing text that will be
|
||||
// replaced. |selection_range| is an optional range of the resulting text that
|
||||
// will be selected after insertion or replacement. The |replacement_range|
|
||||
// value is only used on OS X.
|
||||
//
|
||||
// This function may be called multiple times as the composition changes. When
|
||||
// the client is done making changes the composition should either be canceled
|
||||
// or completed. To cancel the composition call ImeCancelComposition. To
|
||||
// complete the composition call either ImeCommitText or
|
||||
// ImeFinishComposingText. Completion is usually signaled when:
|
||||
// A. The client receives a WM_IME_COMPOSITION message with a GCS_RESULTSTR
|
||||
// flag (on Windows), or;
|
||||
// B. The client receives a "commit" signal of GtkIMContext (on Linux), or;
|
||||
// C. insertText of NSTextInput is called (on Mac).
|
||||
//
|
||||
// This function is only used when window rendering is disabled.
|
||||
// Get the NSTextInputContext implementation for enabling IME on Mac when
|
||||
// window rendering is disabled.
|
||||
///
|
||||
void (CEF_CALLBACK *ime_set_composition)(struct _cef_browser_host_t* self,
|
||||
const cef_string_t* text, size_t underlinesCount,
|
||||
cef_composition_underline_t const* underlines,
|
||||
const cef_range_t* replacement_range,
|
||||
const cef_range_t* selection_range);
|
||||
cef_text_input_context_t (CEF_CALLBACK *get_nstext_input_context)(
|
||||
struct _cef_browser_host_t* self);
|
||||
|
||||
///
|
||||
// Completes the existing composition by optionally inserting the specified
|
||||
// |text| into the composition node. |replacement_range| is an optional range
|
||||
// of the existing text that will be replaced. |relative_cursor_pos| is where
|
||||
// the cursor will be positioned relative to the current cursor position. See
|
||||
// comments on ImeSetComposition for usage. The |replacement_range| and
|
||||
// |relative_cursor_pos| values are only used on OS X. This function is only
|
||||
// used when window rendering is disabled.
|
||||
// Handles a keyDown event prior to passing it through the NSTextInputClient
|
||||
// machinery.
|
||||
///
|
||||
void (CEF_CALLBACK *ime_commit_text)(struct _cef_browser_host_t* self,
|
||||
const cef_string_t* text, const cef_range_t* replacement_range,
|
||||
int relative_cursor_pos);
|
||||
void (CEF_CALLBACK *handle_key_event_before_text_input_client)(
|
||||
struct _cef_browser_host_t* self, cef_event_handle_t keyEvent);
|
||||
|
||||
///
|
||||
// Completes the existing composition by applying the current composition node
|
||||
// contents. If |keep_selection| is false (0) the current selection, if any,
|
||||
// will be discarded. See comments on ImeSetComposition for usage. This
|
||||
// function is only used when window rendering is disabled.
|
||||
// Performs any additional actions after NSTextInputClient handles the event.
|
||||
///
|
||||
void (CEF_CALLBACK *ime_finish_composing_text)(
|
||||
struct _cef_browser_host_t* self, int keep_selection);
|
||||
|
||||
///
|
||||
// Cancels the existing composition and discards the composition node contents
|
||||
// without applying them. See comments on ImeSetComposition for usage. This
|
||||
// function is only used when window rendering is disabled.
|
||||
///
|
||||
void (CEF_CALLBACK *ime_cancel_composition)(struct _cef_browser_host_t* self);
|
||||
void (CEF_CALLBACK *handle_key_event_after_text_input_client)(
|
||||
struct _cef_browser_host_t* self, cef_event_handle_t keyEvent);
|
||||
|
||||
///
|
||||
// Call this function when the user drags the mouse into the web view (before
|
||||
@@ -738,13 +640,6 @@ typedef struct _cef_browser_host_t {
|
||||
///
|
||||
void (CEF_CALLBACK *drag_source_system_drag_ended)(
|
||||
struct _cef_browser_host_t* self);
|
||||
|
||||
///
|
||||
// Returns the current visible navigation entry for this browser. This
|
||||
// function can only be called on the UI thread.
|
||||
///
|
||||
struct _cef_navigation_entry_t* (CEF_CALLBACK *get_visible_navigation_entry)(
|
||||
struct _cef_browser_host_t* self);
|
||||
} cef_browser_host_t;
|
||||
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -94,22 +94,6 @@ typedef struct _cef_browser_process_handler_t {
|
||||
///
|
||||
struct _cef_print_handler_t* (CEF_CALLBACK *get_print_handler)(
|
||||
struct _cef_browser_process_handler_t* self);
|
||||
|
||||
///
|
||||
// Called from any thread when work has been scheduled for the browser process
|
||||
// main (UI) thread. This callback is used in combination with CefSettings.
|
||||
// external_message_pump and cef_do_message_loop_work() in cases where the CEF
|
||||
// message loop must be integrated into an existing application message loop
|
||||
// (see additional comments and warnings on CefDoMessageLoopWork). This
|
||||
// callback should schedule a cef_do_message_loop_work() call to happen on the
|
||||
// main (UI) thread. |delay_ms| is the requested delay in milliseconds. If
|
||||
// |delay_ms| is <= 0 then the call should happen reasonably soon. If
|
||||
// |delay_ms| is > 0 then the call should be scheduled to happen after the
|
||||
// specified delay and any currently pending scheduled call should be
|
||||
// cancelled.
|
||||
///
|
||||
void (CEF_CALLBACK *on_schedule_message_pump_work)(
|
||||
struct _cef_browser_process_handler_t* self, int64 delay_ms);
|
||||
} cef_browser_process_handler_t;
|
||||
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -192,14 +192,6 @@ typedef struct _cef_context_menu_params_t {
|
||||
int (CEF_CALLBACK *has_image_contents)(
|
||||
struct _cef_context_menu_params_t* self);
|
||||
|
||||
///
|
||||
// Returns the title text or the alt text if the context menu was invoked on
|
||||
// an image.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_title_text)(
|
||||
struct _cef_context_menu_params_t* self);
|
||||
|
||||
///
|
||||
// Returns the URL of the top level page that the context menu was invoked on.
|
||||
///
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,143 +0,0 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_CRASH_UTIL_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_CRASH_UTIL_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
///
|
||||
// Crash reporting is configured using an INI-style config file named
|
||||
// "crash_reporter.cfg". On Windows and Linux this file must be placed next to
|
||||
// the main application executable. On macOS this file must be placed in the
|
||||
// top-level app bundle Resources directory (e.g.
|
||||
// "<appname>.app/Contents/Resources"). File contents are as follows:
|
||||
//
|
||||
// # Comments start with a hash character and must be on their own line.
|
||||
//
|
||||
// [Config]
|
||||
// ProductName=<Value of the "prod" crash key; defaults to "cef">
|
||||
// ProductVersion=<Value of the "ver" crash key; defaults to the CEF version>
|
||||
// AppName=<Windows only; App-specific folder name component for storing crash
|
||||
// information; default to "CEF">
|
||||
// ExternalHandler=<Windows only; Name of the external handler exe to use
|
||||
// instead of re-launching the main exe; default to empty>
|
||||
// ServerURL=<crash server URL; default to empty>
|
||||
// RateLimitEnabled=<True if uploads should be rate limited; default to true>
|
||||
// MaxUploadsPerDay=<Max uploads per 24 hours, used if rate limit is enabled;
|
||||
// default to 5>
|
||||
// MaxDatabaseSizeInMb=<Total crash report disk usage greater than this value
|
||||
// will cause older reports to be deleted; default to 20>
|
||||
// MaxDatabaseAgeInDays=<Crash reports older than this value will be deleted;
|
||||
// default to 5>
|
||||
//
|
||||
// [CrashKeys]
|
||||
// my_key1=<small|medium|large>
|
||||
// my_key2=<small|medium|large>
|
||||
//
|
||||
// Config section:
|
||||
//
|
||||
// If "ProductName" and/or "ProductVersion" are set then the specified values
|
||||
// will be included in the crash dump metadata. On macOS if these values are set
|
||||
// to NULL then they will be retrieved from the Info.plist file using the
|
||||
// "CFBundleName" and "CFBundleShortVersionString" keys respectively.
|
||||
//
|
||||
// If "AppName" is set on Windows then crash report information (metrics,
|
||||
// database and dumps) will be stored locally on disk under the
|
||||
// "C:\Users\[CurrentUser]\AppData\Local\[AppName]\User Data" folder. On other
|
||||
// platforms the CefSettings.user_data_path value will be used.
|
||||
//
|
||||
// If "ExternalHandler" is set on Windows then the specified exe will be
|
||||
// launched as the crashpad-handler instead of re-launching the main process
|
||||
// exe. The value can be an absolute path or a path relative to the main exe
|
||||
// directory. On Linux the CefSettings.browser_subprocess_path value will be
|
||||
// used. On macOS the existing subprocess app bundle will be used.
|
||||
//
|
||||
// If "ServerURL" is set then crashes will be uploaded as a multi-part POST
|
||||
// request to the specified URL. Otherwise, reports will only be stored locally
|
||||
// on disk.
|
||||
//
|
||||
// If "RateLimitEnabled" is set to true (1) then crash report uploads will be
|
||||
// rate limited as follows:
|
||||
// 1. If "MaxUploadsPerDay" is set to a positive value then at most the
|
||||
// specified number of crashes will be uploaded in each 24 hour period.
|
||||
// 2. If crash upload fails due to a network or server error then an
|
||||
// incremental backoff delay up to a maximum of 24 hours will be applied for
|
||||
// retries.
|
||||
// 3. If a backoff delay is applied and "MaxUploadsPerDay" is > 1 then the
|
||||
// "MaxUploadsPerDay" value will be reduced to 1 until the client is
|
||||
// restarted. This helps to avoid an upload flood when the network or
|
||||
// server error is resolved.
|
||||
// Rate limiting is not supported on Linux.
|
||||
//
|
||||
// If "MaxDatabaseSizeInMb" is set to a positive value then crash report storage
|
||||
// on disk will be limited to that size in megabytes. For example, on Windows
|
||||
// each dump is about 600KB so a "MaxDatabaseSizeInMb" value of 20 equates to
|
||||
// about 34 crash reports stored on disk. Not supported on Linux.
|
||||
//
|
||||
// If "MaxDatabaseAgeInDays" is set to a positive value then crash reports older
|
||||
// than the specified age in days will be deleted. Not supported on Linux.
|
||||
//
|
||||
// CrashKeys section:
|
||||
//
|
||||
// Any number of crash keys can be specified for use by the application. Crash
|
||||
// key values will be truncated based on the specified size (small = 63 bytes,
|
||||
// medium = 252 bytes, large = 1008 bytes). The value of crash keys can be set
|
||||
// from any thread or process using the CefSetCrashKeyValue function. These
|
||||
// key/value pairs will be sent to the crash server along with the crash dump
|
||||
// file. Medium and large values will be chunked for submission. For example, if
|
||||
// your key is named "mykey" then the value will be broken into ordered chunks
|
||||
// and submitted using keys named "mykey-1", "mykey-2", etc.
|
||||
///
|
||||
CEF_EXPORT int cef_crash_reporting_enabled();
|
||||
|
||||
///
|
||||
// Sets or clears a specific key-value pair from the crash metadata.
|
||||
///
|
||||
CEF_EXPORT void cef_set_crash_key_value(const cef_string_t* key,
|
||||
const cef_string_t* value);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_CRASH_UTIL_CAPI_H_
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -331,11 +331,6 @@ typedef struct _cef_domnode_t {
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_element_inner_text)(
|
||||
struct _cef_domnode_t* self);
|
||||
|
||||
///
|
||||
// Returns the bounds of the element.
|
||||
///
|
||||
cef_rect_t (CEF_CALLBACK *get_element_bounds)(struct _cef_domnode_t* self);
|
||||
} cef_domnode_t;
|
||||
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,118 +0,0 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_FILE_UTIL_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_FILE_UTIL_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
///
|
||||
// Creates a directory and all parent directories if they don't already exist.
|
||||
// Returns true (1) on successful creation or if the directory already exists.
|
||||
// The directory is only readable by the current user. Calling this function on
|
||||
// the browser process UI or IO threads is not allowed.
|
||||
///
|
||||
CEF_EXPORT int cef_create_directory(const cef_string_t* full_path);
|
||||
|
||||
///
|
||||
// Get the temporary directory provided by the system.
|
||||
//
|
||||
// WARNING: In general, you should use the temp directory variants below instead
|
||||
// of this function. Those variants will ensure that the proper permissions are
|
||||
// set so that other users on the system can't edit them while they're open
|
||||
// (which could lead to security issues).
|
||||
///
|
||||
CEF_EXPORT int cef_get_temp_directory(cef_string_t* temp_dir);
|
||||
|
||||
///
|
||||
// Creates a new directory. On Windows if |prefix| is provided the new directory
|
||||
// name is in the format of "prefixyyyy". Returns true (1) on success and sets
|
||||
// |new_temp_path| to the full path of the directory that was created. The
|
||||
// directory is only readable by the current user. Calling this function on the
|
||||
// browser process UI or IO threads is not allowed.
|
||||
///
|
||||
CEF_EXPORT int cef_create_new_temp_directory(const cef_string_t* prefix,
|
||||
cef_string_t* new_temp_path);
|
||||
|
||||
///
|
||||
// Creates a directory within another directory. Extra characters will be
|
||||
// appended to |prefix| to ensure that the new directory does not have the same
|
||||
// name as an existing directory. Returns true (1) on success and sets |new_dir|
|
||||
// to the full path of the directory that was created. The directory is only
|
||||
// readable by the current user. Calling this function on the browser process UI
|
||||
// or IO threads is not allowed.
|
||||
///
|
||||
CEF_EXPORT int cef_create_temp_directory_in_directory(
|
||||
const cef_string_t* base_dir, const cef_string_t* prefix,
|
||||
cef_string_t* new_dir);
|
||||
|
||||
///
|
||||
// Returns true (1) if the given path exists and is a directory. Calling this
|
||||
// function on the browser process UI or IO threads is not allowed.
|
||||
///
|
||||
CEF_EXPORT int cef_directory_exists(const cef_string_t* path);
|
||||
|
||||
///
|
||||
// Deletes the given path whether it's a file or a directory. If |path| is a
|
||||
// directory all contents will be deleted. If |recursive| is true (1) any sub-
|
||||
// directories and their contents will also be deleted (equivalent to executing
|
||||
// "rm -rf", so use with caution). On POSIX environments if |path| is a symbolic
|
||||
// link then only the symlink will be deleted. Returns true (1) on successful
|
||||
// deletion or if |path| does not exist. Calling this function on the browser
|
||||
// process UI or IO threads is not allowed.
|
||||
///
|
||||
CEF_EXPORT int cef_delete_file(const cef_string_t* path, int recursive);
|
||||
|
||||
///
|
||||
// Writes the contents of |src_dir| into a zip archive at |dest_file|. If
|
||||
// |include_hidden_files| is true (1) files starting with "." will be included.
|
||||
// Returns true (1) on success. Calling this function on the browser process UI
|
||||
// or IO threads is not allowed.
|
||||
///
|
||||
CEF_EXPORT int cef_zip_directory(const cef_string_t* src_dir,
|
||||
const cef_string_t* dest_file, int include_hidden_files);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_FILE_UTIL_CAPI_H_
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -89,12 +89,13 @@ typedef struct _cef_geolocation_handler_t {
|
||||
struct _cef_geolocation_callback_t* callback);
|
||||
|
||||
///
|
||||
// Called when a geolocation access request is canceled. |request_id| is the
|
||||
// unique ID for the permission request.
|
||||
// Called when a geolocation access request is canceled. |requesting_url| is
|
||||
// the URL that originally requested permission and |request_id| is the unique
|
||||
// ID for the permission request.
|
||||
///
|
||||
void (CEF_CALLBACK *on_cancel_geolocation_permission)(
|
||||
struct _cef_geolocation_handler_t* self, struct _cef_browser_t* browser,
|
||||
int request_id);
|
||||
const cef_string_t* requesting_url, int request_id);
|
||||
} cef_geolocation_handler_t;
|
||||
|
||||
|
||||
|
@@ -1,187 +0,0 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_IMAGE_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_IMAGE_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
#include "include/capi/cef_values_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
///
|
||||
// Container for a single image represented at different scale factors. All
|
||||
// image representations should be the same size in density independent pixel
|
||||
// (DIP) units. For example, if the image at scale factor 1.0 is 100x100 pixels
|
||||
// then the image at scale factor 2.0 should be 200x200 pixels -- both images
|
||||
// will display with a DIP size of 100x100 units. The functions of this
|
||||
// structure must be called on the browser process UI thread.
|
||||
///
|
||||
typedef struct _cef_image_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Returns true (1) if this Image is NULL.
|
||||
///
|
||||
int (CEF_CALLBACK *is_empty)(struct _cef_image_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if this Image and |that| Image share the same underlying
|
||||
// storage. Will also return true (1) if both images are NULL.
|
||||
///
|
||||
int (CEF_CALLBACK *is_same)(struct _cef_image_t* self,
|
||||
struct _cef_image_t* that);
|
||||
|
||||
///
|
||||
// Add a bitmap image representation for |scale_factor|. Only 32-bit RGBA/BGRA
|
||||
// formats are supported. |pixel_width| and |pixel_height| are the bitmap
|
||||
// representation size in pixel coordinates. |pixel_data| is the array of
|
||||
// pixel data and should be |pixel_width| x |pixel_height| x 4 bytes in size.
|
||||
// |color_type| and |alpha_type| values specify the pixel format.
|
||||
///
|
||||
int (CEF_CALLBACK *add_bitmap)(struct _cef_image_t* self, float scale_factor,
|
||||
int pixel_width, int pixel_height, cef_color_type_t color_type,
|
||||
cef_alpha_type_t alpha_type, const void* pixel_data,
|
||||
size_t pixel_data_size);
|
||||
|
||||
///
|
||||
// Add a PNG image representation for |scale_factor|. |png_data| is the image
|
||||
// data of size |png_data_size|. Any alpha transparency in the PNG data will
|
||||
// be maintained.
|
||||
///
|
||||
int (CEF_CALLBACK *add_png)(struct _cef_image_t* self, float scale_factor,
|
||||
const void* png_data, size_t png_data_size);
|
||||
|
||||
///
|
||||
// Create a JPEG image representation for |scale_factor|. |jpeg_data| is the
|
||||
// image data of size |jpeg_data_size|. The JPEG format does not support
|
||||
// transparency so the alpha byte will be set to 0xFF for all pixels.
|
||||
///
|
||||
int (CEF_CALLBACK *add_jpeg)(struct _cef_image_t* self, float scale_factor,
|
||||
const void* jpeg_data, size_t jpeg_data_size);
|
||||
|
||||
///
|
||||
// Returns the image width in density independent pixel (DIP) units.
|
||||
///
|
||||
size_t (CEF_CALLBACK *get_width)(struct _cef_image_t* self);
|
||||
|
||||
///
|
||||
// Returns the image height in density independent pixel (DIP) units.
|
||||
///
|
||||
size_t (CEF_CALLBACK *get_height)(struct _cef_image_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if this image contains a representation for
|
||||
// |scale_factor|.
|
||||
///
|
||||
int (CEF_CALLBACK *has_representation)(struct _cef_image_t* self,
|
||||
float scale_factor);
|
||||
|
||||
///
|
||||
// Removes the representation for |scale_factor|. Returns true (1) on success.
|
||||
///
|
||||
int (CEF_CALLBACK *remove_representation)(struct _cef_image_t* self,
|
||||
float scale_factor);
|
||||
|
||||
///
|
||||
// Returns information for the representation that most closely matches
|
||||
// |scale_factor|. |actual_scale_factor| is the actual scale factor for the
|
||||
// representation. |pixel_width| and |pixel_height| are the representation
|
||||
// size in pixel coordinates. Returns true (1) on success.
|
||||
///
|
||||
int (CEF_CALLBACK *get_representation_info)(struct _cef_image_t* self,
|
||||
float scale_factor, float* actual_scale_factor, int* pixel_width,
|
||||
int* pixel_height);
|
||||
|
||||
///
|
||||
// Returns the bitmap representation that most closely matches |scale_factor|.
|
||||
// Only 32-bit RGBA/BGRA formats are supported. |color_type| and |alpha_type|
|
||||
// values specify the desired output pixel format. |pixel_width| and
|
||||
// |pixel_height| are the output representation size in pixel coordinates.
|
||||
// Returns a cef_binary_value_t containing the pixel data on success or NULL
|
||||
// on failure.
|
||||
///
|
||||
struct _cef_binary_value_t* (CEF_CALLBACK *get_as_bitmap)(
|
||||
struct _cef_image_t* self, float scale_factor,
|
||||
cef_color_type_t color_type, cef_alpha_type_t alpha_type,
|
||||
int* pixel_width, int* pixel_height);
|
||||
|
||||
///
|
||||
// Returns the PNG representation that most closely matches |scale_factor|. If
|
||||
// |with_transparency| is true (1) any alpha transparency in the image will be
|
||||
// represented in the resulting PNG data. |pixel_width| and |pixel_height| are
|
||||
// the output representation size in pixel coordinates. Returns a
|
||||
// cef_binary_value_t containing the PNG image data on success or NULL on
|
||||
// failure.
|
||||
///
|
||||
struct _cef_binary_value_t* (CEF_CALLBACK *get_as_png)(
|
||||
struct _cef_image_t* self, float scale_factor, int with_transparency,
|
||||
int* pixel_width, int* pixel_height);
|
||||
|
||||
///
|
||||
// Returns the JPEG representation that most closely matches |scale_factor|.
|
||||
// |quality| determines the compression level with 0 == lowest and 100 ==
|
||||
// highest. The JPEG format does not support alpha transparency and the alpha
|
||||
// channel, if any, will be discarded. |pixel_width| and |pixel_height| are
|
||||
// the output representation size in pixel coordinates. Returns a
|
||||
// cef_binary_value_t containing the JPEG image data on success or NULL on
|
||||
// failure.
|
||||
///
|
||||
struct _cef_binary_value_t* (CEF_CALLBACK *get_as_jpeg)(
|
||||
struct _cef_image_t* self, float scale_factor, int quality,
|
||||
int* pixel_width, int* pixel_height);
|
||||
} cef_image_t;
|
||||
|
||||
|
||||
///
|
||||
// Create a new cef_image_t. It will initially be NULL. Use the Add*() functions
|
||||
// to add representations at different scale factors.
|
||||
///
|
||||
CEF_EXPORT cef_image_t* cef_image_create();
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_IMAGE_CAPI_H_
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -76,25 +76,26 @@ typedef struct _cef_jsdialog_handler_t {
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Called to run a JavaScript dialog. If |origin_url| is non-NULL it can be
|
||||
// passed to the CefFormatUrlForSecurityDisplay function to retrieve a secure
|
||||
// and user-friendly display string. The |default_prompt_text| value will be
|
||||
// specified for prompt dialogs only. Set |suppress_message| to true (1) and
|
||||
// return false (0) to suppress the message (suppressing messages is
|
||||
// preferable to immediately executing the callback as this is used to detect
|
||||
// presumably malicious behavior like spamming alert messages in
|
||||
// onbeforeunload). Set |suppress_message| to false (0) and return false (0)
|
||||
// to use the default implementation (the default implementation will show one
|
||||
// modal dialog at a time and suppress any additional dialog requests until
|
||||
// the displayed dialog is dismissed). Return true (1) if the application will
|
||||
// use a custom dialog or if the callback has been executed immediately.
|
||||
// Custom dialogs may be either modal or modeless. If a custom dialog is used
|
||||
// the application must execute |callback| once the custom dialog is
|
||||
// dismissed.
|
||||
// Called to run a JavaScript dialog. If |origin_url| and |accept_lang| are
|
||||
// non-NULL they can be passed to the CefFormatUrlForSecurityDisplay function
|
||||
// to retrieve a secure and user-friendly display string. The
|
||||
// |default_prompt_text| value will be specified for prompt dialogs only. Set
|
||||
// |suppress_message| to true (1) and return false (0) to suppress the message
|
||||
// (suppressing messages is preferable to immediately executing the callback
|
||||
// as this is used to detect presumably malicious behavior like spamming alert
|
||||
// messages in onbeforeunload). Set |suppress_message| to false (0) and return
|
||||
// false (0) to use the default implementation (the default implementation
|
||||
// will show one modal dialog at a time and suppress any additional dialog
|
||||
// requests until the displayed dialog is dismissed). Return true (1) if the
|
||||
// application will use a custom dialog or if the callback has been executed
|
||||
// immediately. Custom dialogs may be either modal or modeless. If a custom
|
||||
// dialog is used the application must execute |callback| once the custom
|
||||
// dialog is dismissed.
|
||||
///
|
||||
int (CEF_CALLBACK *on_jsdialog)(struct _cef_jsdialog_handler_t* self,
|
||||
struct _cef_browser_t* browser, const cef_string_t* origin_url,
|
||||
cef_jsdialog_type_t dialog_type, const cef_string_t* message_text,
|
||||
const cef_string_t* accept_lang, cef_jsdialog_type_t dialog_type,
|
||||
const cef_string_t* message_text,
|
||||
const cef_string_t* default_prompt_text,
|
||||
struct _cef_jsdialog_callback_t* callback, int* suppress_message);
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -56,13 +56,11 @@ typedef struct _cef_keyboard_handler_t {
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Called before a keyboard event is sent to the renderer. |event| contains
|
||||
// information about the keyboard event. |os_event| is the operating system
|
||||
// event message, if any. Return true (1) if the event was handled or false
|
||||
// (0) otherwise. If the event will be handled in on_key_event() as a keyboard
|
||||
// shortcut set |is_keyboard_shortcut| to true (1) and return false (0).
|
||||
///
|
||||
int (CEF_CALLBACK *on_pre_key_event)(struct _cef_keyboard_handler_t* self,
|
||||
struct _cef_browser_t* browser, const struct _cef_key_event_t* event,
|
||||
cef_event_handle_t os_event, int* is_keyboard_shortcut);
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -74,10 +74,7 @@ typedef struct _cef_life_span_handler_t {
|
||||
// popup browser return true (1). The |client| and |settings| values will
|
||||
// default to the source browser's values. If the |no_javascript_access| value
|
||||
// is set to false (0) the new browser will not be scriptable and may not be
|
||||
// hosted in the same renderer process as the source browser. Any
|
||||
// modifications to |windowInfo| will be ignored if the parent browser is
|
||||
// wrapped in a cef_browser_view_t.
|
||||
///
|
||||
// hosted in the same renderer process as the source browser.
|
||||
int (CEF_CALLBACK *on_before_popup)(struct _cef_life_span_handler_t* self,
|
||||
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
|
||||
const cef_string_t* target_url, const cef_string_t* target_frame_name,
|
||||
@@ -87,81 +84,56 @@ typedef struct _cef_life_span_handler_t {
|
||||
struct _cef_browser_settings_t* settings, int* no_javascript_access);
|
||||
|
||||
///
|
||||
// Called after a new browser is created. This callback will be the first
|
||||
// notification that references |browser|.
|
||||
// Called after a new browser is created.
|
||||
///
|
||||
void (CEF_CALLBACK *on_after_created)(struct _cef_life_span_handler_t* self,
|
||||
struct _cef_browser_t* browser);
|
||||
|
||||
///
|
||||
// Called when a modal window is about to display and the modal loop should
|
||||
// begin running. Return false (0) to use the default modal loop
|
||||
// implementation or true (1) to use a custom implementation.
|
||||
///
|
||||
int (CEF_CALLBACK *run_modal)(struct _cef_life_span_handler_t* self,
|
||||
struct _cef_browser_t* browser);
|
||||
|
||||
///
|
||||
// Called when a browser has recieved a request to close. This may result
|
||||
// directly from a call to cef_browser_host_t::*close_browser() or indirectly
|
||||
// if the browser is parented to a top-level window created by CEF and the
|
||||
// user attempts to close that window (by clicking the 'X', for example). The
|
||||
// do_close() function will be called after the JavaScript 'onunload' event
|
||||
// has been fired.
|
||||
// directly from a call to cef_browser_host_t::close_browser() or indirectly
|
||||
// if the browser is a top-level OS window created by CEF and the user
|
||||
// attempts to close the window. This function will be called after the
|
||||
// JavaScript 'onunload' event has been fired. It will not be called for
|
||||
// browsers after the associated OS window has been destroyed (for those
|
||||
// browsers it is no longer possible to cancel the close).
|
||||
//
|
||||
// An application should handle top-level owner window close notifications by
|
||||
// calling cef_browser_host_t::try_close_browser() or
|
||||
// cef_browser_host_t::CloseBrowser(false (0)) instead of allowing the window
|
||||
// to close immediately (see the examples below). This gives CEF an
|
||||
// If CEF created an OS window for the browser returning false (0) will send
|
||||
// an OS close notification to the browser window's top-level owner (e.g.
|
||||
// WM_CLOSE on Windows, performClose: on OS-X and "delete_event" on Linux). If
|
||||
// no OS window exists (window rendering disabled) returning false (0) will
|
||||
// cause the browser object to be destroyed immediately. Return true (1) if
|
||||
// the browser is parented to another window and that other window needs to
|
||||
// receive close notification via some non-standard technique.
|
||||
//
|
||||
// If an application provides its own top-level window it should handle OS
|
||||
// close notifications by calling cef_browser_host_t::CloseBrowser(false (0))
|
||||
// instead of immediately closing (see the example below). This gives CEF an
|
||||
// opportunity to process the 'onbeforeunload' event and optionally cancel the
|
||||
// close before do_close() is called.
|
||||
//
|
||||
// When windowed rendering is enabled CEF will internally create a window or
|
||||
// view to host the browser. In that case returning false (0) from do_close()
|
||||
// will send the standard close notification to the browser's top-level owner
|
||||
// window (e.g. WM_CLOSE on Windows, performClose: on OS X, "delete_event" on
|
||||
// Linux or cef_window_delegate_t::can_close() callback from Views). If the
|
||||
// browser's host window/view has already been destroyed (via view hierarchy
|
||||
// tear-down, for example) then do_close() will not be called for that browser
|
||||
// since is no longer possible to cancel the close.
|
||||
//
|
||||
// When windowed rendering is disabled returning false (0) from do_close()
|
||||
// will cause the browser object to be destroyed immediately.
|
||||
//
|
||||
// If the browser's top-level owner window requires a non-standard close
|
||||
// notification then send that notification from do_close() and return true
|
||||
// (1).
|
||||
//
|
||||
// The cef_life_span_handler_t::on_before_close() function will be called
|
||||
// after do_close() (if do_close() is called) and immediately before the
|
||||
// browser object is destroyed. The application should only exit after
|
||||
// on_before_close() has been called for all existing browsers.
|
||||
// immediately before the browser object is destroyed. The application should
|
||||
// only exit after on_before_close() has been called for all existing
|
||||
// browsers.
|
||||
//
|
||||
// The below examples describe what should happen during window close when the
|
||||
// browser is parented to an application-provided top-level window.
|
||||
// If the browser represents a modal window and a custom modal loop
|
||||
// implementation was provided in cef_life_span_handler_t::run_modal() this
|
||||
// callback should be used to restore the opener window to a usable state.
|
||||
//
|
||||
// Example 1: Using cef_browser_host_t::try_close_browser(). This is
|
||||
// recommended for clients using standard close handling and windows created
|
||||
// on the browser process UI thread. 1. User clicks the window close button
|
||||
// which sends a close notification to
|
||||
// the application's top-level window.
|
||||
// 2. Application's top-level window receives the close notification and
|
||||
// calls TryCloseBrowser() (which internally calls CloseBrowser(false)).
|
||||
// TryCloseBrowser() returns false so the client cancels the window close.
|
||||
// 3. JavaScript 'onbeforeunload' handler executes and shows the close
|
||||
// confirmation dialog (which can be overridden via
|
||||
// CefJSDialogHandler::OnBeforeUnloadDialog()).
|
||||
// 4. User approves the close. 5. JavaScript 'onunload' handler executes. 6.
|
||||
// CEF sends a close notification to the application's top-level window
|
||||
// (because DoClose() returned false by default).
|
||||
// 7. Application's top-level window receives the close notification and
|
||||
// calls TryCloseBrowser(). TryCloseBrowser() returns true so the client
|
||||
// allows the window close.
|
||||
// 8. Application's top-level window is destroyed. 9. Application's
|
||||
// on_before_close() handler is called and the browser object
|
||||
// is destroyed.
|
||||
// 10. Application exits by calling cef_quit_message_loop() if no other
|
||||
// browsers
|
||||
// exist.
|
||||
//
|
||||
// Example 2: Using cef_browser_host_t::CloseBrowser(false (0)) and
|
||||
// implementing the do_close() callback. This is recommended for clients using
|
||||
// non-standard close handling or windows that were not created on the browser
|
||||
// process UI thread. 1. User clicks the window close button which sends a
|
||||
// close notification to
|
||||
// the application's top-level window.
|
||||
// By way of example consider what should happen during window close when the
|
||||
// browser is parented to an application-provided top-level OS window. 1.
|
||||
// User clicks the window close button which sends an OS close
|
||||
// notification (e.g. WM_CLOSE on Windows, performClose: on OS-X and
|
||||
// "delete_event" on Linux).
|
||||
// 2. Application's top-level window receives the close notification and:
|
||||
// A. Calls CefBrowserHost::CloseBrowser(false).
|
||||
// B. Cancels the window close.
|
||||
@@ -172,12 +144,12 @@ typedef struct _cef_life_span_handler_t {
|
||||
// Application's do_close() handler is called. Application will:
|
||||
// A. Set a flag to indicate that the next close attempt will be allowed.
|
||||
// B. Return false.
|
||||
// 7. CEF sends an close notification to the application's top-level window.
|
||||
// 8. Application's top-level window receives the close notification and
|
||||
// 7. CEF sends an OS close notification. 8. Application's top-level window
|
||||
// receives the OS close notification and
|
||||
// allows the window to close based on the flag from #6B.
|
||||
// 9. Application's top-level window is destroyed. 10. Application's
|
||||
// on_before_close() handler is called and the browser object
|
||||
// is destroyed.
|
||||
// 9. Browser OS window is destroyed. 10. Application's
|
||||
// cef_life_span_handler_t::on_before_close() handler is called and
|
||||
// the browser object is destroyed.
|
||||
// 11. Application exits by calling cef_quit_message_loop() if no other
|
||||
// browsers
|
||||
// exist.
|
||||
@@ -188,8 +160,9 @@ typedef struct _cef_life_span_handler_t {
|
||||
///
|
||||
// Called just before a browser is destroyed. Release all references to the
|
||||
// browser object and do not attempt to execute any functions on the browser
|
||||
// object after this callback returns. This callback will be the last
|
||||
// notification that references |browser|. See do_close() documentation for
|
||||
// object after this callback returns. If this is a modal window and a custom
|
||||
// modal loop implementation was provided in run_modal() this callback should
|
||||
// be used to exit the custom modal loop. See do_close() documentation for
|
||||
// additional usage information.
|
||||
///
|
||||
void (CEF_CALLBACK *on_before_close)(struct _cef_life_span_handler_t* self,
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -62,8 +62,7 @@ typedef struct _cef_load_handler_t {
|
||||
// Called when the loading state has changed. This callback will be executed
|
||||
// twice -- once when loading is initiated either programmatically or by user
|
||||
// action, and once when loading is terminated due to completion, cancellation
|
||||
// of failure. It will be called before any calls to OnLoadStart and after all
|
||||
// calls to OnLoadError and/or OnLoadEnd.
|
||||
// of failure.
|
||||
///
|
||||
void (CEF_CALLBACK *on_loading_state_change)(struct _cef_load_handler_t* self,
|
||||
struct _cef_browser_t* browser, int isLoading, int canGoBack,
|
||||
@@ -72,17 +71,14 @@ typedef struct _cef_load_handler_t {
|
||||
///
|
||||
// Called when the browser begins loading a frame. The |frame| value will
|
||||
// never be NULL -- call the is_main() function to check if this frame is the
|
||||
// main frame. |transition_type| provides information about the source of the
|
||||
// navigation and an accurate value is only available in the browser process.
|
||||
// Multiple frames may be loading at the same time. Sub-frames may start or
|
||||
// continue loading after the main frame load has ended. This function will
|
||||
// always be called for all frames irrespective of whether the request
|
||||
// completes successfully. For notification of overall browser load status use
|
||||
// main frame. Multiple frames may be loading at the same time. Sub-frames may
|
||||
// start or continue loading after the main frame load has ended. This
|
||||
// function may not be called for a particular frame if the load request for
|
||||
// that frame fails. For notification of overall browser load status use
|
||||
// OnLoadingStateChange instead.
|
||||
///
|
||||
void (CEF_CALLBACK *on_load_start)(struct _cef_load_handler_t* self,
|
||||
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
|
||||
cef_transition_type_t transition_type);
|
||||
struct _cef_browser_t* browser, struct _cef_frame_t* frame);
|
||||
|
||||
///
|
||||
// Called when the browser is done loading a frame. The |frame| value will
|
||||
@@ -90,8 +86,7 @@ typedef struct _cef_load_handler_t {
|
||||
// main frame. Multiple frames may be loading at the same time. Sub-frames may
|
||||
// start or continue loading after the main frame load has ended. This
|
||||
// function will always be called for all frames irrespective of whether the
|
||||
// request completes successfully. For notification of overall browser load
|
||||
// status use OnLoadingStateChange instead.
|
||||
// request completes successfully.
|
||||
///
|
||||
void (CEF_CALLBACK *on_load_end)(struct _cef_load_handler_t* self,
|
||||
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -39,7 +39,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
#include "include/capi/cef_menu_model_delegate_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -68,59 +67,59 @@ typedef struct _cef_menu_model_t {
|
||||
///
|
||||
int (CEF_CALLBACK *get_count)(struct _cef_menu_model_t* self);
|
||||
|
||||
///
|
||||
//
|
||||
// Add a separator to the menu. Returns true (1) on success.
|
||||
///
|
||||
int (CEF_CALLBACK *add_separator)(struct _cef_menu_model_t* self);
|
||||
|
||||
///
|
||||
//
|
||||
// Add an item to the menu. Returns true (1) on success.
|
||||
///
|
||||
int (CEF_CALLBACK *add_item)(struct _cef_menu_model_t* self, int command_id,
|
||||
const cef_string_t* label);
|
||||
|
||||
///
|
||||
//
|
||||
// Add a check item to the menu. Returns true (1) on success.
|
||||
///
|
||||
int (CEF_CALLBACK *add_check_item)(struct _cef_menu_model_t* self,
|
||||
int command_id, const cef_string_t* label);
|
||||
|
||||
///
|
||||
//
|
||||
// Add a radio item to the menu. Only a single item with the specified
|
||||
// |group_id| can be checked at a time. Returns true (1) on success.
|
||||
///
|
||||
int (CEF_CALLBACK *add_radio_item)(struct _cef_menu_model_t* self,
|
||||
int command_id, const cef_string_t* label, int group_id);
|
||||
|
||||
///
|
||||
//
|
||||
// Add a sub-menu to the menu. The new sub-menu is returned.
|
||||
///
|
||||
struct _cef_menu_model_t* (CEF_CALLBACK *add_sub_menu)(
|
||||
struct _cef_menu_model_t* self, int command_id,
|
||||
const cef_string_t* label);
|
||||
|
||||
///
|
||||
//
|
||||
// Insert a separator in the menu at the specified |index|. Returns true (1)
|
||||
// on success.
|
||||
///
|
||||
int (CEF_CALLBACK *insert_separator_at)(struct _cef_menu_model_t* self,
|
||||
int index);
|
||||
|
||||
///
|
||||
//
|
||||
// Insert an item in the menu at the specified |index|. Returns true (1) on
|
||||
// success.
|
||||
///
|
||||
int (CEF_CALLBACK *insert_item_at)(struct _cef_menu_model_t* self, int index,
|
||||
int command_id, const cef_string_t* label);
|
||||
|
||||
///
|
||||
//
|
||||
// Insert a check item in the menu at the specified |index|. Returns true (1)
|
||||
// on success.
|
||||
///
|
||||
int (CEF_CALLBACK *insert_check_item_at)(struct _cef_menu_model_t* self,
|
||||
int index, int command_id, const cef_string_t* label);
|
||||
|
||||
///
|
||||
//
|
||||
// Insert a radio item in the menu at the specified |index|. Only a single
|
||||
// item with the specified |group_id| can be checked at a time. Returns true
|
||||
// (1) on success.
|
||||
@@ -128,7 +127,7 @@ typedef struct _cef_menu_model_t {
|
||||
int (CEF_CALLBACK *insert_radio_item_at)(struct _cef_menu_model_t* self,
|
||||
int index, int command_id, const cef_string_t* label, int group_id);
|
||||
|
||||
///
|
||||
//
|
||||
// Insert a sub-menu in the menu at the specified |index|. The new sub-menu is
|
||||
// returned.
|
||||
///
|
||||
@@ -243,98 +242,98 @@ typedef struct _cef_menu_model_t {
|
||||
struct _cef_menu_model_t* (CEF_CALLBACK *get_sub_menu_at)(
|
||||
struct _cef_menu_model_t* self, int index);
|
||||
|
||||
///
|
||||
//
|
||||
// Returns true (1) if the specified |command_id| is visible.
|
||||
///
|
||||
int (CEF_CALLBACK *is_visible)(struct _cef_menu_model_t* self,
|
||||
int command_id);
|
||||
|
||||
///
|
||||
//
|
||||
// Returns true (1) if the specified |index| is visible.
|
||||
///
|
||||
int (CEF_CALLBACK *is_visible_at)(struct _cef_menu_model_t* self, int index);
|
||||
|
||||
///
|
||||
//
|
||||
// Change the visibility of the specified |command_id|. Returns true (1) on
|
||||
// success.
|
||||
///
|
||||
int (CEF_CALLBACK *set_visible)(struct _cef_menu_model_t* self,
|
||||
int command_id, int visible);
|
||||
|
||||
///
|
||||
//
|
||||
// Change the visibility at the specified |index|. Returns true (1) on
|
||||
// success.
|
||||
///
|
||||
int (CEF_CALLBACK *set_visible_at)(struct _cef_menu_model_t* self, int index,
|
||||
int visible);
|
||||
|
||||
///
|
||||
//
|
||||
// Returns true (1) if the specified |command_id| is enabled.
|
||||
///
|
||||
int (CEF_CALLBACK *is_enabled)(struct _cef_menu_model_t* self,
|
||||
int command_id);
|
||||
|
||||
///
|
||||
//
|
||||
// Returns true (1) if the specified |index| is enabled.
|
||||
///
|
||||
int (CEF_CALLBACK *is_enabled_at)(struct _cef_menu_model_t* self, int index);
|
||||
|
||||
///
|
||||
//
|
||||
// Change the enabled status of the specified |command_id|. Returns true (1)
|
||||
// on success.
|
||||
///
|
||||
int (CEF_CALLBACK *set_enabled)(struct _cef_menu_model_t* self,
|
||||
int command_id, int enabled);
|
||||
|
||||
///
|
||||
//
|
||||
// Change the enabled status at the specified |index|. Returns true (1) on
|
||||
// success.
|
||||
///
|
||||
int (CEF_CALLBACK *set_enabled_at)(struct _cef_menu_model_t* self, int index,
|
||||
int enabled);
|
||||
|
||||
///
|
||||
//
|
||||
// Returns true (1) if the specified |command_id| is checked. Only applies to
|
||||
// check and radio items.
|
||||
///
|
||||
int (CEF_CALLBACK *is_checked)(struct _cef_menu_model_t* self,
|
||||
int command_id);
|
||||
|
||||
///
|
||||
//
|
||||
// Returns true (1) if the specified |index| is checked. Only applies to check
|
||||
// and radio items.
|
||||
///
|
||||
int (CEF_CALLBACK *is_checked_at)(struct _cef_menu_model_t* self, int index);
|
||||
|
||||
///
|
||||
//
|
||||
// Check the specified |command_id|. Only applies to check and radio items.
|
||||
// Returns true (1) on success.
|
||||
///
|
||||
int (CEF_CALLBACK *set_checked)(struct _cef_menu_model_t* self,
|
||||
int command_id, int checked);
|
||||
|
||||
///
|
||||
//
|
||||
// Check the specified |index|. Only applies to check and radio items. Returns
|
||||
// true (1) on success.
|
||||
///
|
||||
int (CEF_CALLBACK *set_checked_at)(struct _cef_menu_model_t* self, int index,
|
||||
int checked);
|
||||
|
||||
///
|
||||
//
|
||||
// Returns true (1) if the specified |command_id| has a keyboard accelerator
|
||||
// assigned.
|
||||
///
|
||||
int (CEF_CALLBACK *has_accelerator)(struct _cef_menu_model_t* self,
|
||||
int command_id);
|
||||
|
||||
///
|
||||
//
|
||||
// Returns true (1) if the specified |index| has a keyboard accelerator
|
||||
// assigned.
|
||||
///
|
||||
int (CEF_CALLBACK *has_accelerator_at)(struct _cef_menu_model_t* self,
|
||||
int index);
|
||||
|
||||
///
|
||||
//
|
||||
// Set the keyboard accelerator for the specified |command_id|. |key_code| can
|
||||
// be any virtual key or character value. Returns true (1) on success.
|
||||
///
|
||||
@@ -342,7 +341,7 @@ typedef struct _cef_menu_model_t {
|
||||
int command_id, int key_code, int shift_pressed, int ctrl_pressed,
|
||||
int alt_pressed);
|
||||
|
||||
///
|
||||
//
|
||||
// Set the keyboard accelerator at the specified |index|. |key_code| can be
|
||||
// any virtual key or character value. Returns true (1) on success.
|
||||
///
|
||||
@@ -350,21 +349,21 @@ typedef struct _cef_menu_model_t {
|
||||
int index, int key_code, int shift_pressed, int ctrl_pressed,
|
||||
int alt_pressed);
|
||||
|
||||
///
|
||||
//
|
||||
// Remove the keyboard accelerator for the specified |command_id|. Returns
|
||||
// true (1) on success.
|
||||
///
|
||||
int (CEF_CALLBACK *remove_accelerator)(struct _cef_menu_model_t* self,
|
||||
int command_id);
|
||||
|
||||
///
|
||||
//
|
||||
// Remove the keyboard accelerator at the specified |index|. Returns true (1)
|
||||
// on success.
|
||||
///
|
||||
int (CEF_CALLBACK *remove_accelerator_at)(struct _cef_menu_model_t* self,
|
||||
int index);
|
||||
|
||||
///
|
||||
//
|
||||
// Retrieves the keyboard accelerator for the specified |command_id|. Returns
|
||||
// true (1) on success.
|
||||
///
|
||||
@@ -372,7 +371,7 @@ typedef struct _cef_menu_model_t {
|
||||
int command_id, int* key_code, int* shift_pressed, int* ctrl_pressed,
|
||||
int* alt_pressed);
|
||||
|
||||
///
|
||||
//
|
||||
// Retrieves the keyboard accelerator for the specified |index|. Returns true
|
||||
// (1) on success.
|
||||
///
|
||||
@@ -382,13 +381,6 @@ typedef struct _cef_menu_model_t {
|
||||
} cef_menu_model_t;
|
||||
|
||||
|
||||
///
|
||||
// Create a new MenuModel with the specified |delegate|.
|
||||
///
|
||||
CEF_EXPORT cef_menu_model_t* cef_menu_model_create(
|
||||
struct _cef_menu_model_delegate_t* delegate);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -1,93 +0,0 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_MENU_MODEL_DELEGATE_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_MENU_MODEL_DELEGATE_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct _cef_menu_model_t;
|
||||
|
||||
///
|
||||
// Implement this structure to handle menu model events. The functions of this
|
||||
// structure will be called on the browser process UI thread unless otherwise
|
||||
// indicated.
|
||||
///
|
||||
typedef struct _cef_menu_model_delegate_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Perform the action associated with the specified |command_id| and optional
|
||||
// |event_flags|.
|
||||
///
|
||||
void (CEF_CALLBACK *execute_command)(struct _cef_menu_model_delegate_t* self,
|
||||
struct _cef_menu_model_t* menu_model, int command_id,
|
||||
cef_event_flags_t event_flags);
|
||||
|
||||
///
|
||||
// The menu is about to show.
|
||||
///
|
||||
void (CEF_CALLBACK *menu_will_show)(struct _cef_menu_model_delegate_t* self,
|
||||
struct _cef_menu_model_t* menu_model);
|
||||
|
||||
///
|
||||
// The menu has closed.
|
||||
///
|
||||
void (CEF_CALLBACK *menu_closed)(struct _cef_menu_model_delegate_t* self,
|
||||
struct _cef_menu_model_t* menu_model);
|
||||
|
||||
///
|
||||
// Optionally modify a menu item label. Return true (1) if |label| was
|
||||
// modified.
|
||||
///
|
||||
int (CEF_CALLBACK *format_label)(struct _cef_menu_model_delegate_t* self,
|
||||
struct _cef_menu_model_t* menu_model, cef_string_t* label);
|
||||
} cef_menu_model_delegate_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_MENU_MODEL_DELEGATE_CAPI_H_
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -39,7 +39,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
#include "include/capi/cef_ssl_status_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -117,12 +116,6 @@ typedef struct _cef_navigation_entry_t {
|
||||
///
|
||||
int (CEF_CALLBACK *get_http_status_code)(
|
||||
struct _cef_navigation_entry_t* self);
|
||||
|
||||
///
|
||||
// Returns the SSL information for this navigation entry.
|
||||
///
|
||||
struct _cef_sslstatus_t* (CEF_CALLBACK *get_sslstatus)(
|
||||
struct _cef_navigation_entry_t* self);
|
||||
} cef_navigation_entry_t;
|
||||
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -65,14 +65,14 @@ CEF_EXPORT int cef_create_url(const struct _cef_urlparts_t* parts,
|
||||
// friendly way to help users make security-related decisions (or in other
|
||||
// circumstances when people need to distinguish sites, origins, or otherwise-
|
||||
// simplified URLs from each other). Internationalized domain names (IDN) may be
|
||||
// presented in Unicode if the conversion is considered safe. The returned value
|
||||
// will (a) omit the path for standard schemes, excepting file and filesystem,
|
||||
// and (b) omit the port if it is the default for the scheme. Do not use this
|
||||
// for URLs which will be parsed or sent to other applications.
|
||||
// presented in Unicode if |languages| accepts the Unicode representation. The
|
||||
// returned value will (a) omit the path for standard schemes, excepting file
|
||||
// and filesystem, and (b) omit the port if it is the default for the scheme. Do
|
||||
// not use this for URLs which will be parsed or sent to other applications.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
CEF_EXPORT cef_string_userfree_t cef_format_url_for_security_display(
|
||||
const cef_string_t* origin_url);
|
||||
const cef_string_t* origin_url, const cef_string_t* languages);
|
||||
|
||||
///
|
||||
// Returns the mime type for the specified file extension or an NULL string if
|
||||
@@ -82,12 +82,10 @@ CEF_EXPORT cef_string_userfree_t cef_format_url_for_security_display(
|
||||
CEF_EXPORT cef_string_userfree_t cef_get_mime_type(
|
||||
const cef_string_t* extension);
|
||||
|
||||
///
|
||||
// Get the extensions associated with the given mime type. This should be passed
|
||||
// in lower case. There could be multiple extensions for a given mime type, like
|
||||
// "html,htm" for "text/html", or "txt,text,html,..." for "text/*". Any existing
|
||||
// elements in the provided vector will not be erased.
|
||||
///
|
||||
CEF_EXPORT void cef_get_extensions_for_mime_type(const cef_string_t* mime_type,
|
||||
cef_string_list_t extensions);
|
||||
|
||||
@@ -130,27 +128,30 @@ CEF_EXPORT cef_string_userfree_t cef_uridecode(const cef_string_t* text,
|
||||
int convert_to_utf8, cef_uri_unescape_rule_t unescape_rule);
|
||||
|
||||
///
|
||||
// Parses |string| which represents a CSS color value. If |strict| is true (1)
|
||||
// strict parsing rules will be applied. Returns true (1) on success or false
|
||||
// (0) on error. If parsing succeeds |color| will be set to the color value
|
||||
// otherwise |color| will remain unchanged.
|
||||
///
|
||||
CEF_EXPORT int cef_parse_csscolor(const cef_string_t* string, int strict,
|
||||
cef_color_t* color);
|
||||
|
||||
// Parses the specified |json_string| and returns a dictionary or list
|
||||
// representation. If JSON parsing fails this function returns NULL.
|
||||
///
|
||||
CEF_EXPORT struct _cef_value_t* cef_parse_json(const cef_string_t* json_string,
|
||||
cef_json_parser_options_t options);
|
||||
|
||||
///
|
||||
// Parses the specified |json_string| and returns a dictionary or list
|
||||
// representation. If JSON parsing fails this function returns NULL and
|
||||
// populates |error_code_out| and |error_msg_out| with an error code and a
|
||||
// formatted error message respectively.
|
||||
///
|
||||
CEF_EXPORT struct _cef_value_t* cef_parse_jsonand_return_error(
|
||||
const cef_string_t* json_string, cef_json_parser_options_t options,
|
||||
cef_json_parser_error_t* error_code_out, cef_string_t* error_msg_out);
|
||||
|
||||
///
|
||||
// Generates a JSON string from the specified root |node| which should be a
|
||||
// dictionary or list value. Returns an NULL string on failure. This function
|
||||
// requires exclusive access to |node| including any underlying data.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
CEF_EXPORT cef_string_userfree_t cef_write_json(struct _cef_value_t* node,
|
||||
cef_json_writer_options_t options);
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -121,7 +121,7 @@ typedef struct _cef_print_settings_t {
|
||||
// Set the page ranges.
|
||||
///
|
||||
void (CEF_CALLBACK *set_page_ranges)(struct _cef_print_settings_t* self,
|
||||
size_t rangesCount, cef_range_t const* ranges);
|
||||
size_t rangesCount, cef_page_range_t const* ranges);
|
||||
|
||||
///
|
||||
// Returns the number of page ranges that currently exist.
|
||||
@@ -133,7 +133,7 @@ typedef struct _cef_print_settings_t {
|
||||
// Retrieve the page ranges.
|
||||
///
|
||||
void (CEF_CALLBACK *get_page_ranges)(struct _cef_print_settings_t* self,
|
||||
size_t* rangesCount, cef_range_t* ranges);
|
||||
size_t* rangesCount, cef_page_range_t* ranges);
|
||||
|
||||
///
|
||||
// Set whether only the selection will be printed.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -161,16 +161,6 @@ typedef struct _cef_render_handler_t {
|
||||
void (CEF_CALLBACK *on_scroll_offset_changed)(
|
||||
struct _cef_render_handler_t* self, struct _cef_browser_t* browser,
|
||||
double x, double y);
|
||||
|
||||
///
|
||||
// Called when the IME composition range has changed. |selected_range| is the
|
||||
// range of characters that have been selected. |character_bounds| is the
|
||||
// bounds of each character in view coordinates.
|
||||
///
|
||||
void (CEF_CALLBACK *on_ime_composition_range_changed)(
|
||||
struct _cef_render_handler_t* self, struct _cef_browser_t* browser,
|
||||
const cef_range_t* selected_range, size_t character_boundsCount,
|
||||
cef_rect_t const* character_bounds);
|
||||
} cef_render_handler_t;
|
||||
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -38,7 +38,6 @@
|
||||
#define CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_callback_capi.h"
|
||||
#include "include/capi/cef_cookie_capi.h"
|
||||
#include "include/capi/cef_request_context_handler_capi.h"
|
||||
#include "include/capi/cef_values_capi.h"
|
||||
@@ -49,26 +48,6 @@ extern "C" {
|
||||
|
||||
struct _cef_scheme_handler_factory_t;
|
||||
|
||||
///
|
||||
// Callback structure for cef_request_tContext::ResolveHost.
|
||||
///
|
||||
typedef struct _cef_resolve_callback_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Called after the ResolveHost request has completed. |result| will be the
|
||||
// result code. |resolved_ips| will be the list of resolved IP addresses or
|
||||
// NULL if the resolution failed.
|
||||
///
|
||||
void (CEF_CALLBACK *on_resolve_completed)(
|
||||
struct _cef_resolve_callback_t* self, cef_errorcode_t result,
|
||||
cef_string_list_t resolved_ips);
|
||||
} cef_resolve_callback_t;
|
||||
|
||||
|
||||
///
|
||||
// A request context provides request handling for a set of related browser or
|
||||
// URL request objects. A request context can be specified when creating a new
|
||||
@@ -220,45 +199,6 @@ typedef struct _cef_request_context_t {
|
||||
int (CEF_CALLBACK *set_preference)(struct _cef_request_context_t* self,
|
||||
const cef_string_t* name, struct _cef_value_t* value,
|
||||
cef_string_t* error);
|
||||
|
||||
///
|
||||
// Clears all certificate exceptions that were added as part of handling
|
||||
// cef_request_tHandler::on_certificate_error(). If you call this it is
|
||||
// recommended that you also call close_all_connections() or you risk not
|
||||
// being prompted again for server certificates if you reconnect quickly. If
|
||||
// |callback| is non-NULL it will be executed on the UI thread after
|
||||
// completion.
|
||||
///
|
||||
void (CEF_CALLBACK *clear_certificate_exceptions)(
|
||||
struct _cef_request_context_t* self,
|
||||
struct _cef_completion_callback_t* callback);
|
||||
|
||||
///
|
||||
// Clears all active and idle connections that Chromium currently has. This is
|
||||
// only recommended if you have released all other CEF objects but don't yet
|
||||
// want to call cef_shutdown(). If |callback| is non-NULL it will be executed
|
||||
// on the UI thread after completion.
|
||||
///
|
||||
void (CEF_CALLBACK *close_all_connections)(
|
||||
struct _cef_request_context_t* self,
|
||||
struct _cef_completion_callback_t* callback);
|
||||
|
||||
///
|
||||
// Attempts to resolve |origin| to a list of associated IP addresses.
|
||||
// |callback| will be executed on the UI thread after completion.
|
||||
///
|
||||
void (CEF_CALLBACK *resolve_host)(struct _cef_request_context_t* self,
|
||||
const cef_string_t* origin, struct _cef_resolve_callback_t* callback);
|
||||
|
||||
///
|
||||
// Attempts to resolve |origin| to a list of associated IP addresses using
|
||||
// cached data. |resolved_ips| will be populated with the list of resolved IP
|
||||
// addresses or NULL if no cached data is available. Returns ERR_NONE on
|
||||
// success. This function must be called on the browser process IO thread.
|
||||
///
|
||||
cef_errorcode_t (CEF_CALLBACK *resolve_host_cached)(
|
||||
struct _cef_request_context_t* self, const cef_string_t* origin,
|
||||
cef_string_list_t resolved_ips);
|
||||
} cef_request_context_t;
|
||||
|
||||
|
||||
@@ -279,7 +219,7 @@ CEF_EXPORT cef_request_context_t* cef_request_context_create_context(
|
||||
// Creates a new context object that shares storage with |other| and uses an
|
||||
// optional |handler|.
|
||||
///
|
||||
CEF_EXPORT cef_request_context_t* cef_create_context_shared(
|
||||
CEF_EXPORT cef_request_context_t* create_context_shared(
|
||||
cef_request_context_t* other,
|
||||
struct _cef_request_context_handler_t* handler);
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -70,25 +70,23 @@ typedef struct _cef_request_context_handler_t {
|
||||
// Called on multiple browser process threads before a plugin instance is
|
||||
// loaded. |mime_type| is the mime type of the plugin that will be loaded.
|
||||
// |plugin_url| is the content URL that the plugin will load and may be NULL.
|
||||
// |is_main_frame| will be true (1) if the plugin is being loaded in the main
|
||||
// (top-level) frame, |top_origin_url| is the URL for the top-level frame that
|
||||
// contains the plugin when loading a specific plugin instance or NULL when
|
||||
// building the initial list of enabled plugins for 'navigator.plugins'
|
||||
// JavaScript state. |plugin_info| includes additional information about the
|
||||
// plugin that will be loaded. |plugin_policy| is the recommended policy.
|
||||
// Modify |plugin_policy| and return true (1) to change the policy. Return
|
||||
// false (0) to use the recommended policy. The default plugin policy can be
|
||||
// set at runtime using the `--plugin-policy=[allow|detect|block]` command-
|
||||
// line flag. Decisions to mark a plugin as disabled by setting
|
||||
// |plugin_policy| to PLUGIN_POLICY_DISABLED may be cached when
|
||||
// |top_origin_url| is NULL. To purge the plugin list cache and potentially
|
||||
// trigger new calls to this function call
|
||||
// cef_request_tContext::PurgePluginListCache.
|
||||
// |top_origin_url| is the URL for the top-level frame that contains the
|
||||
// plugin when loading a specific plugin instance or NULL when building the
|
||||
// initial list of enabled plugins for 'navigator.plugins' JavaScript state.
|
||||
// |plugin_info| includes additional information about the plugin that will be
|
||||
// loaded. |plugin_policy| is the recommended policy. Modify |plugin_policy|
|
||||
// and return true (1) to change the policy. Return false (0) to use the
|
||||
// recommended policy. The default plugin policy can be set at runtime using
|
||||
// the `--plugin-policy=[allow|detect|block]` command-line flag. Decisions to
|
||||
// mark a plugin as disabled by setting |plugin_policy| to
|
||||
// PLUGIN_POLICY_DISABLED may be cached when |top_origin_url| is NULL. To
|
||||
// purge the plugin list cache and potentially trigger new calls to this
|
||||
// function call cef_request_tContext::PurgePluginListCache.
|
||||
///
|
||||
int (CEF_CALLBACK *on_before_plugin_load)(
|
||||
struct _cef_request_context_handler_t* self,
|
||||
const cef_string_t* mime_type, const cef_string_t* plugin_url,
|
||||
int is_main_frame, const cef_string_t* top_origin_url,
|
||||
const cef_string_t* top_origin_url,
|
||||
struct _cef_web_plugin_info_t* plugin_info,
|
||||
cef_plugin_policy_t* plugin_policy);
|
||||
} cef_request_context_handler_t;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -47,7 +47,6 @@
|
||||
#include "include/capi/cef_response_capi.h"
|
||||
#include "include/capi/cef_response_filter_capi.h"
|
||||
#include "include/capi/cef_ssl_info_capi.h"
|
||||
#include "include/capi/cef_x509_certificate_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -76,25 +75,6 @@ typedef struct _cef_request_callback_t {
|
||||
} cef_request_callback_t;
|
||||
|
||||
|
||||
///
|
||||
// Callback structure used to select a client certificate for authentication.
|
||||
///
|
||||
typedef struct _cef_select_client_certificate_callback_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Chooses the specified certificate for client certificate authentication.
|
||||
// NULL value means that no client certificate should be used.
|
||||
///
|
||||
void (CEF_CALLBACK *select)(
|
||||
struct _cef_select_client_certificate_callback_t* self,
|
||||
struct _cef_x509certificate_t* cert);
|
||||
} cef_select_client_certificate_callback_t;
|
||||
|
||||
|
||||
///
|
||||
// Implement this structure to handle events related to browser requests. The
|
||||
// functions of this structure will be called on the thread indicated.
|
||||
@@ -166,15 +146,12 @@ typedef struct _cef_request_handler_t {
|
||||
///
|
||||
// Called on the IO thread when a resource load is redirected. The |request|
|
||||
// parameter will contain the old URL and other request-related information.
|
||||
// The |response| parameter will contain the response that resulted in the
|
||||
// redirect. The |new_url| parameter will contain the new URL and can be
|
||||
// changed if desired. The |request| object cannot be modified in this
|
||||
// callback.
|
||||
// The |new_url| parameter will contain the new URL and can be changed if
|
||||
// desired. The |request| object cannot be modified in this callback.
|
||||
///
|
||||
void (CEF_CALLBACK *on_resource_redirect)(struct _cef_request_handler_t* self,
|
||||
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
|
||||
struct _cef_request_t* request, struct _cef_response_t* response,
|
||||
cef_string_t* new_url);
|
||||
struct _cef_request_t* request, cef_string_t* new_url);
|
||||
|
||||
///
|
||||
// Called on the IO thread when a resource response is received. To allow the
|
||||
@@ -261,26 +238,6 @@ typedef struct _cef_request_handler_t {
|
||||
const cef_string_t* request_url, struct _cef_sslinfo_t* ssl_info,
|
||||
struct _cef_request_callback_t* callback);
|
||||
|
||||
///
|
||||
// Called on the UI thread when a client certificate is being requested for
|
||||
// authentication. Return false (0) to use the default behavior and
|
||||
// automatically select the first certificate available. Return true (1) and
|
||||
// call cef_select_client_certificate_callback_t::Select either in this
|
||||
// function or at a later time to select a certificate. Do not call Select or
|
||||
// call it with NULL to continue without using any certificate. |isProxy|
|
||||
// indicates whether the host is an HTTPS proxy or the origin server. |host|
|
||||
// and |port| contains the hostname and port of the SSL server. |certificates|
|
||||
// is the list of certificates to choose from; this list has already been
|
||||
// pruned by Chromium so that it only contains certificates from issuers that
|
||||
// the server trusts.
|
||||
///
|
||||
int (CEF_CALLBACK *on_select_client_certificate)(
|
||||
struct _cef_request_handler_t* self, struct _cef_browser_t* browser,
|
||||
int isProxy, const cef_string_t* host, int port,
|
||||
size_t certificatesCount,
|
||||
struct _cef_x509certificate_t* const* certificates,
|
||||
struct _cef_select_client_certificate_callback_t* callback);
|
||||
|
||||
///
|
||||
// Called on the browser process UI thread when a plugin has crashed.
|
||||
// |plugin_path| is the path of the plugin that crashed.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -78,8 +78,7 @@ typedef struct _cef_resource_handler_t {
|
||||
// (0) or the specified number of bytes have been read. Use the |response|
|
||||
// object to set the mime type, http status code and other optional header
|
||||
// values. To redirect the request to a new URL set |redirectUrl| to the new
|
||||
// URL. If an error occured while setting up the request you can call
|
||||
// set_error() on |response| to indicate the error condition.
|
||||
// URL.
|
||||
///
|
||||
void (CEF_CALLBACK *get_response_headers)(
|
||||
struct _cef_resource_handler_t* self, struct _cef_response_t* response,
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -60,18 +60,6 @@ typedef struct _cef_response_t {
|
||||
///
|
||||
int (CEF_CALLBACK *is_read_only)(struct _cef_response_t* self);
|
||||
|
||||
///
|
||||
// Get the response error code. Returns ERR_NONE if there was no error.
|
||||
///
|
||||
cef_errorcode_t (CEF_CALLBACK *get_error)(struct _cef_response_t* self);
|
||||
|
||||
///
|
||||
// Set the response error code. This can be used by custom scheme handlers to
|
||||
// return errors during initial request processing.
|
||||
///
|
||||
void (CEF_CALLBACK *set_error)(struct _cef_response_t* self,
|
||||
cef_errorcode_t error);
|
||||
|
||||
///
|
||||
// Get the response status code.
|
||||
///
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -61,7 +61,6 @@ typedef struct _cef_response_filter_t {
|
||||
///
|
||||
int (CEF_CALLBACK *init_filter)(struct _cef_response_filter_t* self);
|
||||
|
||||
///
|
||||
// Called to filter a chunk of data. |data_in| is the input buffer containing
|
||||
// |data_in_size| bytes of pre-filter data (|data_in| will be NULL if
|
||||
// |data_in_size| is zero). |data_out| is the output buffer that can accept up
|
||||
@@ -78,7 +77,6 @@ typedef struct _cef_response_filter_t {
|
||||
// matches |data_in_size| (all available pre-filter bytes have been read), and
|
||||
// the function returns RESPONSE_FILTER_DONE or RESPONSE_FILTER_ERROR. Do not
|
||||
// keep a reference to the buffers passed to this function.
|
||||
///
|
||||
cef_response_filter_status_t (CEF_CALLBACK *filter)(
|
||||
struct _cef_response_filter_t* self, void* data_in, size_t data_in_size,
|
||||
size_t* data_in_read, void* data_out, size_t data_out_size,
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -40,13 +40,83 @@
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
#include "include/capi/cef_values_capi.h"
|
||||
#include "include/capi/cef_x509_certificate_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
///
|
||||
// Structure representing the issuer or subject field of an X.509 certificate.
|
||||
///
|
||||
typedef struct _cef_sslcert_principal_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Returns a name that can be used to represent the issuer. It tries in this
|
||||
// order: CN, O and OU and returns the first non-NULL one found.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_display_name)(
|
||||
struct _cef_sslcert_principal_t* self);
|
||||
|
||||
///
|
||||
// Returns the common name.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_common_name)(
|
||||
struct _cef_sslcert_principal_t* self);
|
||||
|
||||
///
|
||||
// Returns the locality name.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_locality_name)(
|
||||
struct _cef_sslcert_principal_t* self);
|
||||
|
||||
///
|
||||
// Returns the state or province name.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_state_or_province_name)(
|
||||
struct _cef_sslcert_principal_t* self);
|
||||
|
||||
///
|
||||
// Returns the country name.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_country_name)(
|
||||
struct _cef_sslcert_principal_t* self);
|
||||
|
||||
///
|
||||
// Retrieve the list of street addresses.
|
||||
///
|
||||
void (CEF_CALLBACK *get_street_addresses)(
|
||||
struct _cef_sslcert_principal_t* self, cef_string_list_t addresses);
|
||||
|
||||
///
|
||||
// Retrieve the list of organization names.
|
||||
///
|
||||
void (CEF_CALLBACK *get_organization_names)(
|
||||
struct _cef_sslcert_principal_t* self, cef_string_list_t names);
|
||||
|
||||
///
|
||||
// Retrieve the list of organization unit names.
|
||||
///
|
||||
void (CEF_CALLBACK *get_organization_unit_names)(
|
||||
struct _cef_sslcert_principal_t* self, cef_string_list_t names);
|
||||
|
||||
///
|
||||
// Retrieve the list of domain components.
|
||||
///
|
||||
void (CEF_CALLBACK *get_domain_components)(
|
||||
struct _cef_sslcert_principal_t* self, cef_string_list_t components);
|
||||
} cef_sslcert_principal_t;
|
||||
|
||||
|
||||
///
|
||||
// Structure representing SSL information.
|
||||
///
|
||||
@@ -64,24 +134,85 @@ typedef struct _cef_sslinfo_t {
|
||||
struct _cef_sslinfo_t* self);
|
||||
|
||||
///
|
||||
// Returns the X.509 certificate.
|
||||
// Returns true (1) if the certificate status has any error, major or minor.
|
||||
///
|
||||
struct _cef_x509certificate_t* (CEF_CALLBACK *get_x509certificate)(
|
||||
int (CEF_CALLBACK *is_cert_status_error)(struct _cef_sslinfo_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the certificate status represents only minor errors
|
||||
// (e.g. failure to verify certificate revocation).
|
||||
///
|
||||
int (CEF_CALLBACK *is_cert_status_minor_error)(struct _cef_sslinfo_t* self);
|
||||
|
||||
///
|
||||
// Returns the subject of the X.509 certificate. For HTTPS server certificates
|
||||
// this represents the web server. The common name of the subject should
|
||||
// match the host name of the web server.
|
||||
///
|
||||
struct _cef_sslcert_principal_t* (CEF_CALLBACK *get_subject)(
|
||||
struct _cef_sslinfo_t* self);
|
||||
|
||||
///
|
||||
// Returns the issuer of the X.509 certificate.
|
||||
///
|
||||
struct _cef_sslcert_principal_t* (CEF_CALLBACK *get_issuer)(
|
||||
struct _cef_sslinfo_t* self);
|
||||
|
||||
///
|
||||
// Returns the DER encoded serial number for the X.509 certificate. The value
|
||||
// possibly includes a leading 00 byte.
|
||||
///
|
||||
struct _cef_binary_value_t* (CEF_CALLBACK *get_serial_number)(
|
||||
struct _cef_sslinfo_t* self);
|
||||
|
||||
///
|
||||
// Returns the date before which the X.509 certificate is invalid.
|
||||
// CefTime.GetTimeT() will return 0 if no date was specified.
|
||||
///
|
||||
cef_time_t (CEF_CALLBACK *get_valid_start)(struct _cef_sslinfo_t* self);
|
||||
|
||||
///
|
||||
// Returns the date after which the X.509 certificate is invalid.
|
||||
// CefTime.GetTimeT() will return 0 if no date was specified.
|
||||
///
|
||||
cef_time_t (CEF_CALLBACK *get_valid_expiry)(struct _cef_sslinfo_t* self);
|
||||
|
||||
///
|
||||
// Returns the DER encoded data for the X.509 certificate.
|
||||
///
|
||||
struct _cef_binary_value_t* (CEF_CALLBACK *get_derencoded)(
|
||||
struct _cef_sslinfo_t* self);
|
||||
|
||||
///
|
||||
// Returns the PEM encoded data for the X.509 certificate.
|
||||
///
|
||||
struct _cef_binary_value_t* (CEF_CALLBACK *get_pemencoded)(
|
||||
struct _cef_sslinfo_t* self);
|
||||
|
||||
///
|
||||
// Returns the number of certificates in the issuer chain. If 0, the
|
||||
// certificate is self-signed.
|
||||
///
|
||||
size_t (CEF_CALLBACK *get_issuer_chain_size)(struct _cef_sslinfo_t* self);
|
||||
|
||||
///
|
||||
// Returns the DER encoded data for the certificate issuer chain. If we failed
|
||||
// to encode a certificate in the chain it is still present in the array but
|
||||
// is an NULL string.
|
||||
///
|
||||
void (CEF_CALLBACK *get_derencoded_issuer_chain)(struct _cef_sslinfo_t* self,
|
||||
size_t* chainCount, struct _cef_binary_value_t** chain);
|
||||
|
||||
///
|
||||
// Returns the PEM encoded data for the certificate issuer chain. If we failed
|
||||
// to encode a certificate in the chain it is still present in the array but
|
||||
// is an NULL string.
|
||||
///
|
||||
void (CEF_CALLBACK *get_pemencoded_issuer_chain)(struct _cef_sslinfo_t* self,
|
||||
size_t* chainCount, struct _cef_binary_value_t** chain);
|
||||
} cef_sslinfo_t;
|
||||
|
||||
|
||||
///
|
||||
// Returns true (1) if the certificate status has any error, major or minor.
|
||||
///
|
||||
CEF_EXPORT int cef_is_cert_status_error(cef_cert_status_t status);
|
||||
|
||||
///
|
||||
// Returns true (1) if the certificate status represents only minor errors (e.g.
|
||||
// failure to verify certificate revocation).
|
||||
///
|
||||
CEF_EXPORT int cef_is_cert_status_minor_error(cef_cert_status_t status);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -1,95 +0,0 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_SSL_STATUS_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_SSL_STATUS_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
#include "include/capi/cef_values_capi.h"
|
||||
#include "include/capi/cef_x509_certificate_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
///
|
||||
// Structure representing the SSL information for a navigation entry.
|
||||
///
|
||||
typedef struct _cef_sslstatus_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Returns true (1) if the status is related to a secure SSL/TLS connection.
|
||||
///
|
||||
int (CEF_CALLBACK *is_secure_connection)(struct _cef_sslstatus_t* self);
|
||||
|
||||
///
|
||||
// Returns a bitmask containing any and all problems verifying the server
|
||||
// certificate.
|
||||
///
|
||||
cef_cert_status_t (CEF_CALLBACK *get_cert_status)(
|
||||
struct _cef_sslstatus_t* self);
|
||||
|
||||
///
|
||||
// Returns the SSL version used for the SSL connection.
|
||||
///
|
||||
cef_ssl_version_t (CEF_CALLBACK *get_sslversion)(
|
||||
struct _cef_sslstatus_t* self);
|
||||
|
||||
///
|
||||
// Returns a bitmask containing the page security content status.
|
||||
///
|
||||
cef_ssl_content_status_t (CEF_CALLBACK *get_content_status)(
|
||||
struct _cef_sslstatus_t* self);
|
||||
|
||||
///
|
||||
// Returns the X.509 certificate.
|
||||
///
|
||||
struct _cef_x509certificate_t* (CEF_CALLBACK *get_x509certificate)(
|
||||
struct _cef_sslstatus_t* self);
|
||||
} cef_sslstatus_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_SSL_STATUS_CAPI_H_
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,115 +0,0 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_THREAD_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_THREAD_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_task_capi.h"
|
||||
#include "include/internal/cef_thread_internal.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
///
|
||||
// A simple thread abstraction that establishes a message loop on a new thread.
|
||||
// The consumer uses cef_task_tRunner to execute code on the thread's message
|
||||
// loop. The thread is terminated when the cef_thread_t object is destroyed or
|
||||
// stop() is called. All pending tasks queued on the thread's message loop will
|
||||
// run to completion before the thread is terminated. cef_thread_create() can be
|
||||
// called on any valid CEF thread in either the browser or render process. This
|
||||
// structure should only be used for tasks that require a dedicated thread. In
|
||||
// most cases you can post tasks to an existing CEF thread instead of creating a
|
||||
// new one; see cef_task.h for details.
|
||||
///
|
||||
typedef struct _cef_thread_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Returns the cef_task_tRunner that will execute code on this thread's
|
||||
// message loop. This function is safe to call from any thread.
|
||||
///
|
||||
struct _cef_task_runner_t* (CEF_CALLBACK *get_task_runner)(
|
||||
struct _cef_thread_t* self);
|
||||
|
||||
///
|
||||
// Returns the platform thread ID. It will return the same value after stop()
|
||||
// is called. This function is safe to call from any thread.
|
||||
///
|
||||
cef_platform_thread_id_t (CEF_CALLBACK *get_platform_thread_id)(
|
||||
struct _cef_thread_t* self);
|
||||
|
||||
///
|
||||
// Stop and join the thread. This function must be called from the same thread
|
||||
// that called cef_thread_create(). Do not call this function if
|
||||
// cef_thread_create() was called with a |stoppable| value of false (0).
|
||||
///
|
||||
void (CEF_CALLBACK *stop)(struct _cef_thread_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the thread is currently running. This function must be
|
||||
// called from the same thread that called cef_thread_create().
|
||||
///
|
||||
int (CEF_CALLBACK *is_running)(struct _cef_thread_t* self);
|
||||
} cef_thread_t;
|
||||
|
||||
|
||||
///
|
||||
// Create and start a new thread. This function does not block waiting for the
|
||||
// thread to run initialization. |display_name| is the name that will be used to
|
||||
// identify the thread. |priority| is the thread execution priority.
|
||||
// |message_loop_type| indicates the set of asynchronous events that the thread
|
||||
// can process. If |stoppable| is true (1) the thread will stopped and joined on
|
||||
// destruction or when stop() is called; otherwise, the the thread cannot be
|
||||
// stopped and will be leaked on shutdown. On Windows the |com_init_mode| value
|
||||
// specifies how COM will be initialized for the thread. If |com_init_mode| is
|
||||
// set to COM_INIT_MODE_STA then |message_loop_type| must be set to ML_TYPE_UI.
|
||||
///
|
||||
CEF_EXPORT cef_thread_t* cef_thread_create(const cef_string_t* display_name,
|
||||
cef_thread_priority_t priority, cef_message_loop_type_t message_loop_type,
|
||||
int stoppable, cef_com_init_mode_t com_init_mode);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_THREAD_CAPI_H_
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -123,16 +123,14 @@ typedef struct _cef_v8context_t {
|
||||
struct _cef_v8context_t* that);
|
||||
|
||||
///
|
||||
// Execute a string of JavaScript code in this V8 context. The |script_url|
|
||||
// parameter is the URL where the script in question can be found, if any. The
|
||||
// |start_line| parameter is the base line number to use for error reporting.
|
||||
// Evaluates the specified JavaScript code using this context's global object.
|
||||
// On success |retval| will be set to the return value, if any, and the
|
||||
// function will return true (1). On failure |exception| will be set to the
|
||||
// exception, if any, and the function will return false (0).
|
||||
///
|
||||
int (CEF_CALLBACK *eval)(struct _cef_v8context_t* self,
|
||||
const cef_string_t* code, const cef_string_t* script_url, int start_line,
|
||||
struct _cef_v8value_t** retval, struct _cef_v8exception_t** exception);
|
||||
const cef_string_t* code, struct _cef_v8value_t** retval,
|
||||
struct _cef_v8exception_t** exception);
|
||||
} cef_v8context_t;
|
||||
|
||||
|
||||
@@ -213,70 +211,6 @@ typedef struct _cef_v8accessor_t {
|
||||
} cef_v8accessor_t;
|
||||
|
||||
|
||||
///
|
||||
// Structure that should be implemented to handle V8 interceptor calls. The
|
||||
// functions of this structure will be called on the thread associated with the
|
||||
// V8 interceptor. Interceptor's named property handlers (with first argument of
|
||||
// type CefString) are called when object is indexed by string. Indexed property
|
||||
// handlers (with first argument of type int) are called when object is indexed
|
||||
// by integer.
|
||||
///
|
||||
typedef struct _cef_v8interceptor_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Handle retrieval of the interceptor value identified by |name|. |object| is
|
||||
// the receiver ('this' object) of the interceptor. If retrieval succeeds, set
|
||||
// |retval| to the return value. If the requested value does not exist, don't
|
||||
// set either |retval| or |exception|. If retrieval fails, set |exception| to
|
||||
// the exception that will be thrown. If the property has an associated
|
||||
// accessor, it will be called only if you don't set |retval|. Return true (1)
|
||||
// if interceptor retrieval was handled, false (0) otherwise.
|
||||
///
|
||||
int (CEF_CALLBACK *get_byname)(struct _cef_v8interceptor_t* self,
|
||||
const cef_string_t* name, struct _cef_v8value_t* object,
|
||||
struct _cef_v8value_t** retval, cef_string_t* exception);
|
||||
|
||||
///
|
||||
// Handle retrieval of the interceptor value identified by |index|. |object|
|
||||
// is the receiver ('this' object) of the interceptor. If retrieval succeeds,
|
||||
// set |retval| to the return value. If the requested value does not exist,
|
||||
// don't set either |retval| or |exception|. If retrieval fails, set
|
||||
// |exception| to the exception that will be thrown. Return true (1) if
|
||||
// interceptor retrieval was handled, false (0) otherwise.
|
||||
///
|
||||
int (CEF_CALLBACK *get_byindex)(struct _cef_v8interceptor_t* self, int index,
|
||||
struct _cef_v8value_t* object, struct _cef_v8value_t** retval,
|
||||
cef_string_t* exception);
|
||||
|
||||
///
|
||||
// Handle assignment of the interceptor value identified by |name|. |object|
|
||||
// is the receiver ('this' object) of the interceptor. |value| is the new
|
||||
// value being assigned to the interceptor. If assignment fails, set
|
||||
// |exception| to the exception that will be thrown. This setter will always
|
||||
// be called, even when the property has an associated accessor. Return true
|
||||
// (1) if interceptor assignment was handled, false (0) otherwise.
|
||||
///
|
||||
int (CEF_CALLBACK *set_byname)(struct _cef_v8interceptor_t* self,
|
||||
const cef_string_t* name, struct _cef_v8value_t* object,
|
||||
struct _cef_v8value_t* value, cef_string_t* exception);
|
||||
|
||||
///
|
||||
// Handle assignment of the interceptor value identified by |index|. |object|
|
||||
// is the receiver ('this' object) of the interceptor. |value| is the new
|
||||
// value being assigned to the interceptor. If assignment fails, set
|
||||
// |exception| to the exception that will be thrown. Return true (1) if
|
||||
// interceptor assignment was handled, false (0) otherwise.
|
||||
///
|
||||
int (CEF_CALLBACK *set_byindex)(struct _cef_v8interceptor_t* self, int index,
|
||||
struct _cef_v8value_t* object, struct _cef_v8value_t* value,
|
||||
cef_string_t* exception);
|
||||
} cef_v8interceptor_t;
|
||||
|
||||
|
||||
///
|
||||
// Structure representing a V8 exception. The functions of this structure may be
|
||||
// called on any render process thread.
|
||||
@@ -424,32 +358,38 @@ typedef struct _cef_v8value_t {
|
||||
struct _cef_v8value_t* that);
|
||||
|
||||
///
|
||||
// Return a bool value.
|
||||
// Return a bool value. The underlying data will be converted to if
|
||||
// necessary.
|
||||
///
|
||||
int (CEF_CALLBACK *get_bool_value)(struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// Return an int value.
|
||||
// Return an int value. The underlying data will be converted to if
|
||||
// necessary.
|
||||
///
|
||||
int32 (CEF_CALLBACK *get_int_value)(struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// Return an unsigned int value.
|
||||
// Return an unisgned int value. The underlying data will be converted to if
|
||||
// necessary.
|
||||
///
|
||||
uint32 (CEF_CALLBACK *get_uint_value)(struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// Return a double value.
|
||||
// Return a double value. The underlying data will be converted to if
|
||||
// necessary.
|
||||
///
|
||||
double (CEF_CALLBACK *get_double_value)(struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// Return a Date value.
|
||||
// Return a Date value. The underlying data will be converted to if
|
||||
// necessary.
|
||||
///
|
||||
cef_time_t (CEF_CALLBACK *get_date_value)(struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// Return a string value.
|
||||
// Return a string value. The underlying data will be converted to if
|
||||
// necessary.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_string_value)(
|
||||
@@ -712,14 +652,13 @@ CEF_EXPORT cef_v8value_t* cef_v8value_create_date(const cef_time_t* date);
|
||||
CEF_EXPORT cef_v8value_t* cef_v8value_create_string(const cef_string_t* value);
|
||||
|
||||
///
|
||||
// Create a new cef_v8value_t object of type object with optional accessor
|
||||
// and/or interceptor. This function should only be called from within the scope
|
||||
// of a cef_render_process_handler_t, cef_v8handler_t or cef_v8accessor_t
|
||||
// callback, or in combination with calling enter() and exit() on a stored
|
||||
// cef_v8context_t reference.
|
||||
// Create a new cef_v8value_t object of type object with optional accessor. This
|
||||
// function should only be called from within the scope of a
|
||||
// cef_render_process_handler_t, cef_v8handler_t or cef_v8accessor_t callback,
|
||||
// or in combination with calling enter() and exit() on a stored cef_v8context_t
|
||||
// reference.
|
||||
///
|
||||
CEF_EXPORT cef_v8value_t* cef_v8value_create_object(cef_v8accessor_t* accessor,
|
||||
cef_v8interceptor_t* interceptor);
|
||||
CEF_EXPORT cef_v8value_t* cef_v8value_create_object(cef_v8accessor_t* accessor);
|
||||
|
||||
///
|
||||
// Create a new cef_v8value_t object of type array with the specified |length|.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -581,13 +581,13 @@ typedef struct _cef_list_value_t {
|
||||
///
|
||||
// Removes the value at the specified index.
|
||||
///
|
||||
int (CEF_CALLBACK *remove)(struct _cef_list_value_t* self, size_t index);
|
||||
int (CEF_CALLBACK *remove)(struct _cef_list_value_t* self, int index);
|
||||
|
||||
///
|
||||
// Returns the value type at the specified index.
|
||||
///
|
||||
cef_value_type_t (CEF_CALLBACK *get_type)(struct _cef_list_value_t* self,
|
||||
size_t index);
|
||||
int index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index. For simple types the returned
|
||||
@@ -597,37 +597,36 @@ typedef struct _cef_list_value_t {
|
||||
// will modify this object.
|
||||
///
|
||||
struct _cef_value_t* (CEF_CALLBACK *get_value)(struct _cef_list_value_t* self,
|
||||
size_t index);
|
||||
int index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type bool.
|
||||
///
|
||||
int (CEF_CALLBACK *get_bool)(struct _cef_list_value_t* self, size_t index);
|
||||
int (CEF_CALLBACK *get_bool)(struct _cef_list_value_t* self, int index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type int.
|
||||
///
|
||||
int (CEF_CALLBACK *get_int)(struct _cef_list_value_t* self, size_t index);
|
||||
int (CEF_CALLBACK *get_int)(struct _cef_list_value_t* self, int index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type double.
|
||||
///
|
||||
double (CEF_CALLBACK *get_double)(struct _cef_list_value_t* self,
|
||||
size_t index);
|
||||
double (CEF_CALLBACK *get_double)(struct _cef_list_value_t* self, int index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type string.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_string)(
|
||||
struct _cef_list_value_t* self, size_t index);
|
||||
struct _cef_list_value_t* self, int index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type binary. The returned value
|
||||
// will reference existing data.
|
||||
///
|
||||
struct _cef_binary_value_t* (CEF_CALLBACK *get_binary)(
|
||||
struct _cef_list_value_t* self, size_t index);
|
||||
struct _cef_list_value_t* self, int index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type dictionary. The returned
|
||||
@@ -635,7 +634,7 @@ typedef struct _cef_list_value_t {
|
||||
// modify this object.
|
||||
///
|
||||
struct _cef_dictionary_value_t* (CEF_CALLBACK *get_dictionary)(
|
||||
struct _cef_list_value_t* self, size_t index);
|
||||
struct _cef_list_value_t* self, int index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type list. The returned value
|
||||
@@ -643,7 +642,7 @@ typedef struct _cef_list_value_t {
|
||||
// this object.
|
||||
///
|
||||
struct _cef_list_value_t* (CEF_CALLBACK *get_list)(
|
||||
struct _cef_list_value_t* self, size_t index);
|
||||
struct _cef_list_value_t* self, int index);
|
||||
|
||||
///
|
||||
// Sets the value at the specified index. Returns true (1) if the value was
|
||||
@@ -653,41 +652,41 @@ typedef struct _cef_list_value_t {
|
||||
// then the underlying data will be referenced and modifications to |value|
|
||||
// will modify this object.
|
||||
///
|
||||
int (CEF_CALLBACK *set_value)(struct _cef_list_value_t* self, size_t index,
|
||||
int (CEF_CALLBACK *set_value)(struct _cef_list_value_t* self, int index,
|
||||
struct _cef_value_t* value);
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type null. Returns true (1) if the
|
||||
// value was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *set_null)(struct _cef_list_value_t* self, size_t index);
|
||||
int (CEF_CALLBACK *set_null)(struct _cef_list_value_t* self, int index);
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type bool. Returns true (1) if the
|
||||
// value was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *set_bool)(struct _cef_list_value_t* self, size_t index,
|
||||
int (CEF_CALLBACK *set_bool)(struct _cef_list_value_t* self, int index,
|
||||
int value);
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type int. Returns true (1) if the
|
||||
// value was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *set_int)(struct _cef_list_value_t* self, size_t index,
|
||||
int (CEF_CALLBACK *set_int)(struct _cef_list_value_t* self, int index,
|
||||
int value);
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type double. Returns true (1) if
|
||||
// the value was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *set_double)(struct _cef_list_value_t* self, size_t index,
|
||||
int (CEF_CALLBACK *set_double)(struct _cef_list_value_t* self, int index,
|
||||
double value);
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type string. Returns true (1) if
|
||||
// the value was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *set_string)(struct _cef_list_value_t* self, size_t index,
|
||||
int (CEF_CALLBACK *set_string)(struct _cef_list_value_t* self, int index,
|
||||
const cef_string_t* value);
|
||||
|
||||
///
|
||||
@@ -697,7 +696,7 @@ typedef struct _cef_list_value_t {
|
||||
// change. Otherwise, ownership will be transferred to this object and the
|
||||
// |value| reference will be invalidated.
|
||||
///
|
||||
int (CEF_CALLBACK *set_binary)(struct _cef_list_value_t* self, size_t index,
|
||||
int (CEF_CALLBACK *set_binary)(struct _cef_list_value_t* self, int index,
|
||||
struct _cef_binary_value_t* value);
|
||||
|
||||
///
|
||||
@@ -707,8 +706,8 @@ typedef struct _cef_list_value_t {
|
||||
// Otherwise, ownership will be transferred to this object and the |value|
|
||||
// reference will be invalidated.
|
||||
///
|
||||
int (CEF_CALLBACK *set_dictionary)(struct _cef_list_value_t* self,
|
||||
size_t index, struct _cef_dictionary_value_t* value);
|
||||
int (CEF_CALLBACK *set_dictionary)(struct _cef_list_value_t* self, int index,
|
||||
struct _cef_dictionary_value_t* value);
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type list. Returns true (1) if the
|
||||
@@ -717,7 +716,7 @@ typedef struct _cef_list_value_t {
|
||||
// Otherwise, ownership will be transferred to this object and the |value|
|
||||
// reference will be invalidated.
|
||||
///
|
||||
int (CEF_CALLBACK *set_list)(struct _cef_list_value_t* self, size_t index,
|
||||
int (CEF_CALLBACK *set_list)(struct _cef_list_value_t* self, int index,
|
||||
struct _cef_list_value_t* value);
|
||||
} cef_list_value_t;
|
||||
|
||||
|
@@ -1,117 +0,0 @@
|
||||
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_WAITABLE_EVENT_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_WAITABLE_EVENT_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
///
|
||||
// WaitableEvent is a thread synchronization tool that allows one thread to wait
|
||||
// for another thread to finish some work. This is equivalent to using a
|
||||
// Lock+ConditionVariable to protect a simple boolean value. However, using
|
||||
// WaitableEvent in conjunction with a Lock to wait for a more complex state
|
||||
// change (e.g., for an item to be added to a queue) is not recommended. In that
|
||||
// case consider using a ConditionVariable instead of a WaitableEvent. It is
|
||||
// safe to create and/or signal a WaitableEvent from any thread. Blocking on a
|
||||
// WaitableEvent by calling the *wait() functions is not allowed on the browser
|
||||
// process UI or IO threads.
|
||||
///
|
||||
typedef struct _cef_waitable_event_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Put the event in the un-signaled state.
|
||||
///
|
||||
void (CEF_CALLBACK *reset)(struct _cef_waitable_event_t* self);
|
||||
|
||||
///
|
||||
// Put the event in the signaled state. This causes any thread blocked on Wait
|
||||
// to be woken up.
|
||||
///
|
||||
void (CEF_CALLBACK *signal)(struct _cef_waitable_event_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the event is in the signaled state, else false (0). If
|
||||
// the event was created with |automatic_reset| set to true (1) then calling
|
||||
// this function will also cause a reset.
|
||||
///
|
||||
int (CEF_CALLBACK *is_signaled)(struct _cef_waitable_event_t* self);
|
||||
|
||||
///
|
||||
// Wait indefinitely for the event to be signaled. This function will not
|
||||
// return until after the call to signal() has completed. This function cannot
|
||||
// be called on the browser process UI or IO threads.
|
||||
///
|
||||
void (CEF_CALLBACK *wait)(struct _cef_waitable_event_t* self);
|
||||
|
||||
///
|
||||
// Wait up to |max_ms| milliseconds for the event to be signaled. Returns true
|
||||
// (1) if the event was signaled. A return value of false (0) does not
|
||||
// necessarily mean that |max_ms| was exceeded. This function will not return
|
||||
// until after the call to signal() has completed. This function cannot be
|
||||
// called on the browser process UI or IO threads.
|
||||
///
|
||||
int (CEF_CALLBACK *timed_wait)(struct _cef_waitable_event_t* self,
|
||||
int64 max_ms);
|
||||
} cef_waitable_event_t;
|
||||
|
||||
|
||||
///
|
||||
// Create a new waitable event. If |automatic_reset| is true (1) then the event
|
||||
// state is automatically reset to un-signaled after a single waiting thread has
|
||||
// been released; otherwise, the state remains signaled until reset() is called
|
||||
// manually. If |initially_signaled| is true (1) then the event will start in
|
||||
// the signaled state.
|
||||
///
|
||||
CEF_EXPORT cef_waitable_event_t* cef_waitable_event_create(int automatic_reset,
|
||||
int initially_signaled);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_WAITABLE_EVENT_CAPI_H_
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user