mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Compare commits
20 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
b90a3be186 | ||
|
5b27df39b2 | ||
|
64e2fe1d2b | ||
|
93f810339f | ||
|
af139d7761 | ||
|
0451528779 | ||
|
3034273cb9 | ||
|
2a6491bf8d | ||
|
9e0fda80bd | ||
|
c59d47ad9e | ||
|
fc96ca576f | ||
|
44fcb48baa | ||
|
483cb2ea69 | ||
|
969ebf0ca9 | ||
|
820e629774 | ||
|
3c1f28b051 | ||
|
ce1e9e65fd | ||
|
cd7e8a0558 | ||
|
912e94bf61 | ||
|
d300dc43d9 |
@@ -7,5 +7,5 @@
|
||||
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
|
||||
|
||||
{
|
||||
'chromium_checkout': 'refs/tags/51.0.2704.103',
|
||||
'chromium_checkout': 'refs/tags/49.0.2623.110',
|
||||
}
|
||||
|
@@ -24,14 +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.
|
||||
# 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
|
||||
#
|
||||
@@ -41,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
|
||||
#
|
||||
@@ -76,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" ..
|
||||
@@ -86,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)
|
||||
@@ -117,91 +127,458 @@ 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.
|
||||
# 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"4481" = Ignore "nonstandard extension used: override" 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\"4481\" /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" "ws2_32.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()
|
||||
|
230
cef.gyp
230
cef.gyp
@@ -29,6 +29,9 @@
|
||||
'dependencies': [
|
||||
'libcef_dll_wrapper',
|
||||
],
|
||||
'defines': [
|
||||
'USING_CEF_SHARED',
|
||||
],
|
||||
'include_dirs': [
|
||||
'.',
|
||||
# cefclient includes are relative to the tests directory to make
|
||||
@@ -200,6 +203,9 @@
|
||||
'dependencies': [
|
||||
'libcef_dll_wrapper',
|
||||
],
|
||||
'defines': [
|
||||
'USING_CEF_SHARED',
|
||||
],
|
||||
'include_dirs': [
|
||||
'.',
|
||||
# cefsimple includes are relative to the tests directory to make
|
||||
@@ -360,12 +366,11 @@
|
||||
'<(DEPTH)/third_party/icu/icu.gyp:icuuc',
|
||||
'<(DEPTH)/third_party/zlib/google/zip.gyp:zip',
|
||||
'<(DEPTH)/ui/base/ui_base.gyp:ui_base',
|
||||
'libcef_dll_wrapper_unittests',
|
||||
'libcef_dll_wrapper',
|
||||
],
|
||||
'sources': [
|
||||
'tests/cefclient/browser/client_app_browser.cc',
|
||||
'tests/cefclient/browser/client_app_browser.h',
|
||||
'tests/cefclient/browser/resource_util.cc',
|
||||
'tests/cefclient/browser/resource_util.h',
|
||||
'tests/cefclient/common/client_app.cc',
|
||||
'tests/cefclient/common/client_app.h',
|
||||
@@ -378,8 +383,6 @@
|
||||
'tests/cefclient/resources/osr_test.html',
|
||||
'tests/cefclient/resources/pdf.html',
|
||||
'tests/cefclient/resources/pdf.pdf',
|
||||
'tests/cefclient/resources/window_icon.1x.png',
|
||||
'tests/cefclient/resources/window_icon.1x.png',
|
||||
'tests/unittests/browser_info_map_unittest.cc',
|
||||
'tests/unittests/command_line_unittest.cc',
|
||||
'tests/unittests/cookie_unittest.cc',
|
||||
@@ -390,9 +393,6 @@
|
||||
'tests/unittests/draggable_regions_unittest.cc',
|
||||
'tests/unittests/frame_unittest.cc',
|
||||
'tests/unittests/geolocation_unittest.cc',
|
||||
'tests/unittests/image_unittest.cc',
|
||||
'tests/unittests/image_util.cc',
|
||||
'tests/unittests/image_util.h',
|
||||
'tests/unittests/jsdialog_unittest.cc',
|
||||
'tests/unittests/life_span_unittest.cc',
|
||||
'tests/unittests/message_router_unittest.cc',
|
||||
@@ -422,8 +422,6 @@
|
||||
'tests/unittests/test_suite.h',
|
||||
'tests/unittests/test_util.cc',
|
||||
'tests/unittests/test_util.h',
|
||||
'tests/unittests/thread_helper.cc',
|
||||
'tests/unittests/thread_helper.h',
|
||||
'tests/unittests/tracing_unittest.cc',
|
||||
'tests/unittests/translator_unittest.cc',
|
||||
'tests/unittests/urlrequest_unittest.cc',
|
||||
@@ -437,8 +435,6 @@
|
||||
'tests/cefclient/resources/osr_test.html',
|
||||
'tests/cefclient/resources/pdf.html',
|
||||
'tests/cefclient/resources/pdf.pdf',
|
||||
'tests/cefclient/resources/window_icon.1x.png',
|
||||
'tests/cefclient/resources/window_icon.2x.png',
|
||||
'tests/unittests/mac/unittests.icns',
|
||||
'tests/unittests/mac/English.lproj/InfoPlist.strings',
|
||||
'tests/unittests/mac/English.lproj/MainMenu.xib',
|
||||
@@ -563,8 +559,6 @@
|
||||
'tests/cefclient/resources/osr_test.html',
|
||||
'tests/cefclient/resources/pdf.html',
|
||||
'tests/cefclient/resources/pdf.pdf',
|
||||
'tests/cefclient/resources/window_icon.1x.png',
|
||||
'tests/cefclient/resources/window_icon.2x.png',
|
||||
],
|
||||
},
|
||||
],
|
||||
@@ -573,74 +567,18 @@
|
||||
'-Wl,--detect-odr-violations',
|
||||
],
|
||||
}],
|
||||
['use_aura==1', {
|
||||
'sources': [
|
||||
'tests/unittests/views/button_unittest.cc',
|
||||
'tests/unittests/views/panel_unittest.cc',
|
||||
'tests/unittests/views/scroll_view_unittest.cc',
|
||||
'tests/unittests/views/test_window_delegate.cc',
|
||||
'tests/unittests/views/test_window_delegate.h',
|
||||
'tests/unittests/views/textfield_unittest.cc',
|
||||
'tests/unittests/views/window_unittest.cc',
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'libcef_dll_wrapper',
|
||||
'type': 'static_library',
|
||||
'msvs_guid': 'A9D6DC71-C0DC-4549-AEA0-3B15B44E86A9',
|
||||
'all_dependent_settings': {
|
||||
'defines': [
|
||||
'USING_CEF_SHARED',
|
||||
],
|
||||
},
|
||||
'defines': [
|
||||
'USING_CEF_SHARED',
|
||||
],
|
||||
'include_dirs': [
|
||||
'.',
|
||||
],
|
||||
'sources': [
|
||||
'<@(includes_common)',
|
||||
'<@(includes_capi)',
|
||||
'<@(includes_wrapper)',
|
||||
'<@(libcef_dll_wrapper_sources_base)',
|
||||
'<@(libcef_dll_wrapper_sources_common)',
|
||||
],
|
||||
'conditions': [
|
||||
[ 'OS=="mac"', {
|
||||
'dependencies': [
|
||||
'cef_framework',
|
||||
],
|
||||
}, { # OS!="mac"
|
||||
'dependencies': [
|
||||
'libcef',
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
{
|
||||
# Like the libcef_dll_wrapper target but using Chromium base/ includes
|
||||
# instead of CEF base/ includes. A separate target is necessary to resolve
|
||||
# cef_unittests linker errors as the Chromium base/ implementation
|
||||
# diverges from the CEF implementation.
|
||||
'target_name': 'libcef_dll_wrapper_unittests',
|
||||
'type': 'static_library',
|
||||
'msvs_guid': 'A9D6DC71-C0DC-4549-AEA0-3B15B44E86A9',
|
||||
'all_dependent_settings': {
|
||||
'defines': [
|
||||
'USING_CEF_SHARED',
|
||||
'USING_CHROMIUM_INCLUDES',
|
||||
],
|
||||
},
|
||||
'defines': [
|
||||
'USING_CEF_SHARED',
|
||||
'USING_CHROMIUM_INCLUDES',
|
||||
],
|
||||
'include_dirs': [
|
||||
'.',
|
||||
],
|
||||
'sources': [
|
||||
'<@(includes_common)',
|
||||
'<@(includes_capi)',
|
||||
@@ -914,7 +852,6 @@
|
||||
'msvs_guid': 'FA39524D-3067-4141-888D-28A86C66F2B9',
|
||||
'defines': [
|
||||
'BUILDING_CEF_SHARED',
|
||||
'USING_CHROMIUM_INCLUDES',
|
||||
],
|
||||
'include_dirs': [
|
||||
'.',
|
||||
@@ -931,6 +868,7 @@
|
||||
],
|
||||
'dependencies': [
|
||||
'<(DEPTH)/base/base.gyp:base',
|
||||
'<(DEPTH)/base/base.gyp:base_prefs',
|
||||
'<(DEPTH)/base/base.gyp:base_static',
|
||||
'<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
|
||||
'<(DEPTH)/cc/blink/cc_blink.gyp:cc_blink',
|
||||
@@ -953,7 +891,6 @@
|
||||
'<(DEPTH)/components/components.gyp:data_use_measurement_core',
|
||||
'<(DEPTH)/components/components.gyp:devtools_discovery',
|
||||
'<(DEPTH)/components/components.gyp:devtools_http_handler',
|
||||
'<(DEPTH)/components/components.gyp:google_core_browser',
|
||||
'<(DEPTH)/components/components.gyp:keyed_service_content',
|
||||
'<(DEPTH)/components/components.gyp:keyed_service_core',
|
||||
'<(DEPTH)/components/components.gyp:navigation_interception',
|
||||
@@ -973,12 +910,12 @@
|
||||
'<(DEPTH)/components/components.gyp:visitedlink_common',
|
||||
'<(DEPTH)/components/components.gyp:visitedlink_renderer',
|
||||
'<(DEPTH)/components/components.gyp:web_cache_renderer',
|
||||
'<(DEPTH)/components/prefs/prefs.gyp:prefs',
|
||||
'<(DEPTH)/components/url_formatter/url_formatter.gyp:url_formatter',
|
||||
'<(DEPTH)/content/content.gyp:content_app_both',
|
||||
'<(DEPTH)/content/content.gyp:content_browser',
|
||||
'<(DEPTH)/content/content.gyp:content_common',
|
||||
'<(DEPTH)/content/content.gyp:content_gpu',
|
||||
'<(DEPTH)/content/content.gyp:content_plugin',
|
||||
'<(DEPTH)/content/content.gyp:content_ppapi_plugin',
|
||||
'<(DEPTH)/content/content.gyp:content_renderer',
|
||||
'<(DEPTH)/content/content.gyp:content_resources',
|
||||
@@ -1045,8 +982,6 @@
|
||||
'libcef/browser/browser_platform_delegate_create.cc',
|
||||
'libcef/browser/browser_urlrequest_impl.cc',
|
||||
'libcef/browser/browser_urlrequest_impl.h',
|
||||
'libcef/browser/browser_util.cc',
|
||||
'libcef/browser/browser_util.h',
|
||||
'libcef/browser/chrome_browser_process_stub.cc',
|
||||
'libcef/browser/chrome_browser_process_stub.h',
|
||||
'libcef/browser/chrome_profile_stub.cc',
|
||||
@@ -1103,8 +1038,6 @@
|
||||
'libcef/browser/frame_host_impl.cc',
|
||||
'libcef/browser/frame_host_impl.h',
|
||||
'libcef/browser/geolocation_impl.cc',
|
||||
'libcef/browser/image_impl.cc',
|
||||
'libcef/browser/image_impl.h',
|
||||
'libcef/browser/javascript_dialog_runner.h',
|
||||
'libcef/browser/javascript_dialog_manager.cc',
|
||||
'libcef/browser/javascript_dialog_manager.h',
|
||||
@@ -1462,6 +1395,8 @@
|
||||
'<(DEPTH)/components/nacl/common/nacl_constants.cc',
|
||||
'<(DEPTH)/components/nacl/common/nacl_constants.h',
|
||||
# Include sources for preferences support.
|
||||
'<(DEPTH)/base/prefs/testing_pref_store.cc',
|
||||
'<(DEPTH)/base/prefs/testing_pref_store.h',
|
||||
'<(DEPTH)/chrome/browser/accessibility/animation_policy_prefs.cc',
|
||||
'<(DEPTH)/chrome/browser/accessibility/animation_policy_prefs.h',
|
||||
'<(DEPTH)/chrome/browser/character_encoding.cc',
|
||||
@@ -1485,14 +1420,9 @@
|
||||
'<(DEPTH)/chrome/common/pref_names.h',
|
||||
'<(DEPTH)/chrome/common/pref_names_util.cc',
|
||||
'<(DEPTH)/chrome/common/pref_names_util.h',
|
||||
'<(DEPTH)/components/prefs/testing_pref_store.cc',
|
||||
'<(DEPTH)/components/prefs/testing_pref_store.h',
|
||||
# Include sources for permissions support.
|
||||
'<(DEPTH)/chrome/browser/permissions/permission_request_id.h',
|
||||
'<(DEPTH)/chrome/browser/permissions/permission_request_id.cc',
|
||||
# Include sources for SafeSearch support.
|
||||
'<(DEPTH)/chrome/browser/net/safe_search_util.cc',
|
||||
'<(DEPTH)/chrome/browser/net/safe_search_util.h',
|
||||
],
|
||||
'conditions': [
|
||||
['OS=="win"', {
|
||||
@@ -1521,6 +1451,9 @@
|
||||
'<(DEPTH)/chrome/browser/printing/pdf_to_emf_converter.cc',
|
||||
'<(DEPTH)/chrome/browser/printing/pdf_to_emf_converter.h',
|
||||
'<(DEPTH)/chrome/common/chrome_utility_printing_messages.h',
|
||||
# Include sources for font cache.
|
||||
'<(DEPTH)/chrome/utility/font_cache_handler_win.cc',
|
||||
'<(DEPTH)/chrome/utility/font_cache_handler_win.h',
|
||||
],
|
||||
}],
|
||||
[ 'OS=="mac"', {
|
||||
@@ -1587,96 +1520,10 @@
|
||||
'sources': [
|
||||
'libcef/browser/native/window_delegate_view.cc',
|
||||
'libcef/browser/native/window_delegate_view.h',
|
||||
'libcef/browser/views/basic_label_button_impl.cc',
|
||||
'libcef/browser/views/basic_label_button_impl.h',
|
||||
'libcef/browser/views/basic_label_button_view.cc',
|
||||
'libcef/browser/views/basic_label_button_view.h',
|
||||
'libcef/browser/views/basic_panel_impl.cc',
|
||||
'libcef/browser/views/basic_panel_impl.h',
|
||||
'libcef/browser/views/basic_panel_view.cc',
|
||||
'libcef/browser/views/basic_panel_view.h',
|
||||
'libcef/browser/views/box_layout_impl.cc',
|
||||
'libcef/browser/views/box_layout_impl.h',
|
||||
'libcef/browser/views/browser_platform_delegate_views.cc',
|
||||
'libcef/browser/views/browser_platform_delegate_views.h',
|
||||
'libcef/browser/views/browser_view_impl.cc',
|
||||
'libcef/browser/views/browser_view_impl.h',
|
||||
'libcef/browser/views/browser_view_view.cc',
|
||||
'libcef/browser/views/browser_view_view.h',
|
||||
'libcef/browser/views/button_impl.h',
|
||||
'libcef/browser/views/button_view.h',
|
||||
'libcef/browser/views/display_impl.cc',
|
||||
'libcef/browser/views/display_impl.h',
|
||||
'libcef/browser/views/fill_layout_impl.cc',
|
||||
'libcef/browser/views/fill_layout_impl.h',
|
||||
'libcef/browser/views/label_button_impl.h',
|
||||
'libcef/browser/views/label_button_view.h',
|
||||
'libcef/browser/views/layout_impl.h',
|
||||
'libcef/browser/views/layout_adapter.cc',
|
||||
'libcef/browser/views/layout_adapter.h',
|
||||
'libcef/browser/views/layout_util.cc',
|
||||
'libcef/browser/views/layout_util.h',
|
||||
'libcef/browser/views/menu_button_impl.cc',
|
||||
'libcef/browser/views/menu_button_impl.h',
|
||||
'libcef/browser/views/menu_button_view.cc',
|
||||
'libcef/browser/views/menu_button_view.h',
|
||||
'libcef/browser/views/menu_runner_views.cc',
|
||||
'libcef/browser/views/menu_runner_views.h',
|
||||
'libcef/browser/views/panel_impl.h',
|
||||
'libcef/browser/views/panel_view.h',
|
||||
'libcef/browser/views/scroll_view_impl.cc',
|
||||
'libcef/browser/views/scroll_view_impl.h',
|
||||
'libcef/browser/views/scroll_view_view.cc',
|
||||
'libcef/browser/views/scroll_view_view.h',
|
||||
'libcef/browser/views/textfield_impl.cc',
|
||||
'libcef/browser/views/textfield_impl.h',
|
||||
'libcef/browser/views/textfield_view.cc',
|
||||
'libcef/browser/views/textfield_view.h',
|
||||
'libcef/browser/views/view_adapter.cc',
|
||||
'libcef/browser/views/view_adapter.h',
|
||||
'libcef/browser/views/view_impl.h',
|
||||
'libcef/browser/views/view_util.cc',
|
||||
'libcef/browser/views/view_util.h',
|
||||
'libcef/browser/views/view_view.h',
|
||||
'libcef/browser/views/window_impl.cc',
|
||||
'libcef/browser/views/window_impl.h',
|
||||
'libcef/browser/views/window_view.cc',
|
||||
'libcef/browser/views/window_view.h',
|
||||
'<(DEPTH)/ui/views/test/desktop_test_views_delegate.h',
|
||||
'<(DEPTH)/ui/views/test/desktop_test_views_delegate_aura.cc',
|
||||
'<(DEPTH)/ui/views/test/test_views_delegate.h',
|
||||
'<(DEPTH)/ui/views/test/test_views_delegate_aura.cc',
|
||||
# Support for UI input events.
|
||||
'<(DEPTH)/ui/base/test/ui_controls.h',
|
||||
'<(DEPTH)/ui/base/test/ui_controls_aura.cc',
|
||||
'<(DEPTH)/ui/aura/test/ui_controls_factory_aura.h',
|
||||
],
|
||||
}, { # use_aura!=1
|
||||
'sources': [
|
||||
# Provides stub implementations for the views static methods.
|
||||
'libcef_dll/views_stub.cc',
|
||||
],
|
||||
}],
|
||||
['use_aura==1 and OS=="win"', {
|
||||
'sources': [
|
||||
# Support for UI input events.
|
||||
'<(DEPTH)/ui/aura/test/ui_controls_factory_aurawin.cc',
|
||||
'<(DEPTH)/ui/base/test/ui_controls_internal_win.cc',
|
||||
'<(DEPTH)/ui/base/test/ui_controls_internal_win.h',
|
||||
],
|
||||
}],
|
||||
['use_aura==1 and (OS=="linux" or OS=="freebsd" or OS=="openbsd")', {
|
||||
'sources': [
|
||||
# Support for UI input events.
|
||||
'<(DEPTH)/ui/aura/test/aura_test_utils.cc',
|
||||
'<(DEPTH)/ui/aura/test/aura_test_utils.h',
|
||||
'<(DEPTH)/ui/aura/test/ui_controls_factory_aurax11.cc',
|
||||
'<(DEPTH)/ui/aura/test/x11_event_sender.cc',
|
||||
'<(DEPTH)/ui/aura/test/x11_event_sender.h',
|
||||
'<(DEPTH)/ui/events/test/platform_event_waiter.cc',
|
||||
'<(DEPTH)/ui/events/test/platform_event_waiter.h',
|
||||
'<(DEPTH)/ui/views/test/ui_controls_factory_desktop_aurax11.cc',
|
||||
'<(DEPTH)/ui/views/test/ui_controls_factory_desktop_aurax11.h',
|
||||
],
|
||||
}],
|
||||
],
|
||||
@@ -1728,14 +1575,13 @@
|
||||
'DYLIB_CURRENT_VERSION': '<(version_mac_dylib)',
|
||||
'INFOPLIST_FILE': 'libcef/resources/framework-Info.plist',
|
||||
},
|
||||
'defines': [
|
||||
'BUILDING_CEF_SHARED',
|
||||
'USING_CHROMIUM_INCLUDES',
|
||||
],
|
||||
'dependencies': [
|
||||
'cef_pak',
|
||||
'libcef_static',
|
||||
],
|
||||
'defines': [
|
||||
'BUILDING_CEF_SHARED',
|
||||
],
|
||||
'include_dirs': [
|
||||
'.',
|
||||
],
|
||||
@@ -1783,6 +1629,9 @@
|
||||
'cef_framework',
|
||||
'libcef_dll_wrapper',
|
||||
],
|
||||
'defines': [
|
||||
'USING_CEF_SHARED',
|
||||
],
|
||||
'include_dirs': [
|
||||
'.',
|
||||
# cefclient includes are relative to the tests directory to make
|
||||
@@ -1854,6 +1703,9 @@
|
||||
'cef_framework',
|
||||
'libcef_dll_wrapper',
|
||||
],
|
||||
'defines': [
|
||||
'USING_CEF_SHARED',
|
||||
],
|
||||
'include_dirs': [
|
||||
'.',
|
||||
# cefsimple includes are relative to the tests directory to make
|
||||
@@ -1928,7 +1780,10 @@
|
||||
'<(DEPTH)/third_party/icu/icu.gyp:icui18n',
|
||||
'<(DEPTH)/third_party/icu/icu.gyp:icuuc',
|
||||
'cef_framework',
|
||||
'libcef_dll_wrapper_unittests',
|
||||
'libcef_dll_wrapper',
|
||||
],
|
||||
'defines': [
|
||||
'USING_CEF_SHARED',
|
||||
],
|
||||
'include_dirs': [
|
||||
'.',
|
||||
@@ -1938,7 +1793,6 @@
|
||||
'sources': [
|
||||
'tests/cefclient/browser/client_app_browser.cc',
|
||||
'tests/cefclient/browser/client_app_browser.h',
|
||||
'tests/cefclient/browser/resource_util.cc',
|
||||
'tests/cefclient/browser/resource_util.h',
|
||||
'tests/cefclient/browser/resource_util_mac.mm',
|
||||
'tests/cefclient/browser/resource_util_posix.cc',
|
||||
@@ -1972,8 +1826,6 @@
|
||||
'tests/unittests/test_suite.h',
|
||||
'tests/unittests/test_util.cc',
|
||||
'tests/unittests/test_util.h',
|
||||
'tests/unittests/thread_helper.cc',
|
||||
'tests/unittests/thread_helper.h',
|
||||
'tests/unittests/tracing_unittest.cc',
|
||||
'tests/unittests/v8_unittest.cc',
|
||||
],
|
||||
@@ -2031,13 +1883,12 @@
|
||||
'target_name': 'libcef',
|
||||
'type': 'shared_library',
|
||||
'msvs_guid': 'C13650D5-CF1A-4259-BE45-B1EBA6280E47',
|
||||
'defines': [
|
||||
'BUILDING_CEF_SHARED',
|
||||
'USING_CHROMIUM_INCLUDES',
|
||||
],
|
||||
'dependencies': [
|
||||
'libcef_static',
|
||||
],
|
||||
'defines': [
|
||||
'BUILDING_CEF_SHARED',
|
||||
],
|
||||
'include_dirs': [
|
||||
'.',
|
||||
],
|
||||
@@ -2047,6 +1898,11 @@
|
||||
'<@(libcef_sources_common)',
|
||||
],
|
||||
'conditions': [
|
||||
['OS=="win" and win_use_allocator_shim==1', {
|
||||
'dependencies': [
|
||||
'<(DEPTH)/base/allocator/allocator.gyp:allocator',
|
||||
],
|
||||
}],
|
||||
['OS=="win"', {
|
||||
'configurations': {
|
||||
'Debug_Base': {
|
||||
@@ -2081,18 +1937,10 @@
|
||||
},
|
||||
},
|
||||
}],
|
||||
[ '(OS=="linux" or OS=="freebsd" or OS=="openbsd") and asan==0 and use_allocator=="none"', {
|
||||
'link_settings': {
|
||||
'configurations': {
|
||||
'Release': {
|
||||
'ldflags': [
|
||||
# Only export necessary symbols from libcef.so.
|
||||
# Don't do this in Debug builds because it causes the resulting application to crash.
|
||||
'-Wl,--version-script=<!(cd <(DEPTH) && pwd -P)/cef/libcef_dll/libcef.lst',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
[ '(OS=="linux" or OS=="freebsd" or OS=="openbsd") and use_allocator!="none"', {
|
||||
'dependencies':[
|
||||
'<(DEPTH)/base/allocator/allocator.gyp:allocator',
|
||||
],
|
||||
}],
|
||||
],
|
||||
}],
|
||||
|
8
cef.gypi
8
cef.gypi
@@ -30,5 +30,11 @@
|
||||
'enable_themes': 0,
|
||||
}]
|
||||
]
|
||||
}
|
||||
}, 'conditions': [
|
||||
['os_posix==1 and OS!="mac" and OS!="android"', {
|
||||
'target_defaults': {
|
||||
'cflags_cc': ['-Wno-deprecated-declarations'],
|
||||
},
|
||||
}]
|
||||
],
|
||||
}
|
||||
|
136
cef_paths.gypi
136
cef_paths.gypi
@@ -33,13 +33,11 @@
|
||||
'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',
|
||||
@@ -72,26 +70,6 @@
|
||||
'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',
|
||||
@@ -115,13 +93,11 @@
|
||||
'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',
|
||||
@@ -154,26 +130,6 @@
|
||||
'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',
|
||||
@@ -184,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',
|
||||
@@ -228,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',
|
||||
@@ -248,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',
|
||||
@@ -262,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',
|
||||
@@ -352,8 +276,6 @@
|
||||
'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/ctocpp/set_cookie_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/set_cookie_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/stream_reader_cpptoc.cc',
|
||||
@@ -366,10 +288,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/test/translator_test_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/test/translator_test_cpptoc.h',
|
||||
'libcef_dll/ctocpp/test/translator_test_handler_ctocpp.cc',
|
||||
@@ -402,20 +320,12 @@
|
||||
'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/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/xml_reader_cpptoc.cc',
|
||||
@@ -432,22 +342,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',
|
||||
@@ -476,14 +376,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',
|
||||
@@ -496,8 +392,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',
|
||||
@@ -510,40 +404,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',
|
||||
@@ -600,8 +478,6 @@
|
||||
'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/cpptoc/set_cookie_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/set_cookie_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/stream_reader_ctocpp.cc',
|
||||
@@ -614,10 +490,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/test/translator_test_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/test/translator_test_ctocpp.h',
|
||||
'libcef_dll/cpptoc/test/translator_test_handler_cpptoc.cc',
|
||||
@@ -650,20 +522,12 @@
|
||||
'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/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/xml_reader_ctocpp.cc',
|
||||
|
@@ -42,6 +42,7 @@
|
||||
'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',
|
||||
@@ -106,7 +107,7 @@
|
||||
'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',
|
||||
@@ -119,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',
|
||||
@@ -175,13 +174,11 @@
|
||||
'tests/cefclient/browser/preferences_test.cc',
|
||||
'tests/cefclient/browser/preferences_test.h',
|
||||
'tests/cefclient/browser/resource.h',
|
||||
'tests/cefclient/browser/resource_util.cc',
|
||||
'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',
|
||||
@@ -193,8 +190,6 @@
|
||||
'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',
|
||||
@@ -221,11 +216,8 @@
|
||||
'cefclient_sources_resources': [
|
||||
'tests/cefclient/resources/binding.html',
|
||||
'tests/cefclient/resources/dialogs.html',
|
||||
'tests/cefclient/resources/draggable.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',
|
||||
@@ -237,8 +229,6 @@
|
||||
'tests/cefclient/resources/transparency.html',
|
||||
'tests/cefclient/resources/urlrequest.html',
|
||||
'tests/cefclient/resources/window.html',
|
||||
'tests/cefclient/resources/window_icon.1x.png',
|
||||
'tests/cefclient/resources/window_icon.2x.png',
|
||||
'tests/cefclient/resources/xmlhttprequest.html',
|
||||
],
|
||||
'cefclient_sources_win': [
|
||||
@@ -254,20 +244,13 @@
|
||||
'tests/cefclient/browser/osr_window_win.cc',
|
||||
'tests/cefclient/browser/osr_window_win.h',
|
||||
'tests/cefclient/browser/resource_util_win.cc',
|
||||
'tests/cefclient/browser/root_window_views.cc',
|
||||
'tests/cefclient/browser/root_window_views.h',
|
||||
'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/util_win.cc',
|
||||
'tests/cefclient/browser/util_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/window_test_win.cc',
|
||||
'tests/cefclient/cefclient_win.cc',
|
||||
'tests/cefclient/resources/win/cefclient.exe.manifest',
|
||||
'tests/cefclient/resources/win/cefclient.ico',
|
||||
@@ -290,8 +273,7 @@
|
||||
'tests/cefclient/browser/root_window_mac.mm',
|
||||
'tests/cefclient/browser/temp_window_mac.h',
|
||||
'tests/cefclient/browser/temp_window_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)',
|
||||
@@ -322,16 +304,9 @@
|
||||
'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)',
|
||||
|
@@ -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,387 +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.
|
||||
macro(COPY_FILES target file_list source_dir target_dir)
|
||||
foreach(FILENAME ${file_list})
|
||||
set(source_file ${source_dir}/${FILENAME})
|
||||
set(target_file ${target_dir}/${FILENAME})
|
||||
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()
|
||||
|
||||
# Rename a directory replacing the target if it already exists.
|
||||
macro(RENAME_DIRECTORY target source_dir target_dir)
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
POST_BUILD
|
||||
# Remove the target directory if it already exists.
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory "${target_dir}"
|
||||
# Rename the source directory to target directory.
|
||||
COMMAND ${CMAKE_COMMAND} -E rename "${source_dir}" "${target_dir}"
|
||||
VERBATIM
|
||||
)
|
||||
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 link in the helper executable.
|
||||
macro(FIX_MACOSX_HELPER_FRAMEWORK_LINK target app_path)
|
||||
add_custom_command(TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND install_name_tool -change "@executable_path/Chromium Embedded Framework"
|
||||
"@executable_path/../../../../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework"
|
||||
"${app_path}/Contents/MacOS/${target}"
|
||||
VERBATIM
|
||||
)
|
||||
endmacro()
|
||||
|
||||
# Fix the framework link in the main executable.
|
||||
macro(FIX_MACOSX_MAIN_FRAMEWORK_LINK target app_path)
|
||||
add_custom_command(TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND install_name_tool -change "@executable_path/Chromium Embedded Framework"
|
||||
"@executable_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework"
|
||||
"${app_path}/Contents/MacOS/${target}"
|
||||
VERBATIM
|
||||
)
|
||||
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,441 +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)
|
||||
# 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}
|
||||
)
|
||||
list(APPEND CEF_COMPILER_FLAGS_DEBUG
|
||||
/MTd # Multithreaded debug runtime
|
||||
/RTC1 # Disable optimizations
|
||||
/Od # Enable basic run-time checks
|
||||
)
|
||||
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)
|
||||
)
|
||||
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
|
||||
)
|
||||
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
|
||||
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
|
||||
)
|
||||
|
||||
# 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()
|
||||
|
||||
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.
|
||||
@@ -193,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_
|
||||
|
@@ -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.
|
||||
@@ -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,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/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.
|
||||
@@ -162,6 +162,6 @@ class 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,14 +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"
|
||||
|
||||
// Chromium uses movable types.
|
||||
#define MOVE_SCOPED_PTR(var) std::move(var)
|
||||
|
||||
#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.
|
||||
@@ -47,8 +43,40 @@
|
||||
#include <stddef.h> // For size_t.
|
||||
#include "include/base/cef_build.h" // For COMPILER_MSVC
|
||||
|
||||
// CEF does not use movable types.
|
||||
#define MOVE_SCOPED_PTR(var) var.Pass()
|
||||
#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)
|
||||
|
||||
@@ -186,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.
|
||||
@@ -381,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,10 +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)
|
||||
#elif defined(BUILDING_CEF_SHARED)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/memory/scoped_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.
|
||||
@@ -619,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.
|
||||
@@ -282,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_
|
||||
|
@@ -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"
|
||||
@@ -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,16 +407,11 @@ 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
|
||||
|
@@ -1,187 +0,0 @@
|
||||
// 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
|
||||
// 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_
|
@@ -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);
|
||||
|
||||
|
@@ -74,9 +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,
|
||||
@@ -87,81 +85,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::Tryclose_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::Tryclose_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 +145,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 +161,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,
|
||||
|
@@ -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" {
|
||||
@@ -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,80 +0,0 @@
|
||||
// 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
|
||||
// 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);
|
||||
} cef_menu_model_delegate_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_MENU_MODEL_DELEGATE_CAPI_H_
|
@@ -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
|
||||
@@ -129,6 +129,15 @@ CEF_EXPORT cef_string_userfree_t cef_uriencode(const cef_string_t* text,
|
||||
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.
|
||||
|
@@ -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.
|
||||
|
@@ -279,7 +279,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);
|
||||
|
||||
|
@@ -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,
|
||||
|
@@ -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.
|
||||
///
|
||||
|
@@ -141,6 +141,27 @@ CEF_EXPORT void cef_visit_web_plugin_info(
|
||||
///
|
||||
CEF_EXPORT void cef_refresh_web_plugins();
|
||||
|
||||
///
|
||||
// Add a plugin path (directory + file). This change may not take affect until
|
||||
// after cef_refresh_web_plugins() is called. Can be called on any thread in the
|
||||
// browser process.
|
||||
///
|
||||
CEF_EXPORT void cef_add_web_plugin_path(const cef_string_t* path);
|
||||
|
||||
///
|
||||
// Add a plugin directory. This change may not take affect until after
|
||||
// cef_refresh_web_plugins() is called. Can be called on any thread in the
|
||||
// browser process.
|
||||
///
|
||||
CEF_EXPORT void cef_add_web_plugin_directory(const cef_string_t* dir);
|
||||
|
||||
///
|
||||
// Remove a plugin path (directory + file). This change may not take affect
|
||||
// until after cef_refresh_web_plugins() is called. Can be called on any thread
|
||||
// in the browser process.
|
||||
///
|
||||
CEF_EXPORT void cef_remove_web_plugin_path(const cef_string_t* path);
|
||||
|
||||
///
|
||||
// Unregister an internal plugin. This may be undone the next time
|
||||
// cef_refresh_web_plugins() is called. Can be called on any thread in the
|
||||
@@ -148,6 +169,12 @@ CEF_EXPORT void cef_refresh_web_plugins();
|
||||
///
|
||||
CEF_EXPORT void cef_unregister_internal_web_plugin(const cef_string_t* path);
|
||||
|
||||
///
|
||||
// Force a plugin to shutdown. Can be called on any thread in the browser
|
||||
// process but will be executed on the IO thread.
|
||||
///
|
||||
CEF_EXPORT void cef_force_web_plugin_shutdown(const cef_string_t* path);
|
||||
|
||||
///
|
||||
// Register a plugin crash. Can be called on any thread in the browser process
|
||||
// but will be executed on the IO thread.
|
||||
|
@@ -1,86 +0,0 @@
|
||||
// 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
|
||||
// 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_VIEWS_CEF_BOX_LAYOUT_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_VIEWS_CEF_BOX_LAYOUT_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/views/cef_layout_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct _cef_view_t;
|
||||
|
||||
///
|
||||
// A Layout manager that arranges child views vertically or horizontally in a
|
||||
// side-by-side fashion with spacing around and between the child views. The
|
||||
// child views are always sized according to their preferred size. If the host's
|
||||
// bounds provide insufficient space, child views will be clamped. Excess space
|
||||
// will not be distributed. Methods must be called on the browser process UI
|
||||
// thread unless otherwise indicated.
|
||||
///
|
||||
typedef struct _cef_box_layout_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_layout_t base;
|
||||
|
||||
///
|
||||
// Set the flex weight for the given |view|. Using the preferred size as the
|
||||
// basis, free space along the main axis is distributed to views in the ratio
|
||||
// of their flex weights. Similarly, if the views will overflow the parent,
|
||||
// space is subtracted in these ratios. A flex of 0 means this view is not
|
||||
// resized. Flex values must not be negative.
|
||||
///
|
||||
void (CEF_CALLBACK *set_flex_for_view)(struct _cef_box_layout_t* self,
|
||||
struct _cef_view_t* view, int flex);
|
||||
|
||||
///
|
||||
// Clears the flex for the given |view|, causing it to use the default flex
|
||||
// specified via cef_box_layout_tSettings.default_flex.
|
||||
///
|
||||
void (CEF_CALLBACK *clear_flex_for_view)(struct _cef_box_layout_t* self,
|
||||
struct _cef_view_t* view);
|
||||
} cef_box_layout_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_VIEWS_CEF_BOX_LAYOUT_CAPI_H_
|
@@ -1,90 +0,0 @@
|
||||
// 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
|
||||
// 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_VIEWS_CEF_BROWSER_VIEW_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_VIEWS_CEF_BROWSER_VIEW_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_browser_capi.h"
|
||||
#include "include/capi/views/cef_browser_view_delegate_capi.h"
|
||||
#include "include/capi/views/cef_view_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
///
|
||||
// A View hosting a cef_browser_t instance. Methods must be called on the
|
||||
// browser process UI thread unless otherwise indicated.
|
||||
///
|
||||
typedef struct _cef_browser_view_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_view_t base;
|
||||
|
||||
///
|
||||
// Returns the cef_browser_t hosted by this BrowserView. Will return NULL if
|
||||
// the browser has not yet been created or has already been destroyed.
|
||||
///
|
||||
struct _cef_browser_t* (CEF_CALLBACK *get_browser)(
|
||||
struct _cef_browser_view_t* self);
|
||||
} cef_browser_view_t;
|
||||
|
||||
|
||||
///
|
||||
// Create a new BrowserView. The underlying cef_browser_t will not be created
|
||||
// until this view is added to the views hierarchy.
|
||||
///
|
||||
CEF_EXPORT cef_browser_view_t* cef_browser_view_create(
|
||||
struct _cef_client_t* client, const cef_string_t* url,
|
||||
const struct _cef_browser_settings_t* settings,
|
||||
struct _cef_request_context_t* request_context,
|
||||
struct _cef_browser_view_delegate_t* delegate);
|
||||
|
||||
///
|
||||
// Returns the BrowserView associated with |browser|.
|
||||
///
|
||||
CEF_EXPORT cef_browser_view_t* cef_browser_view_get_for_browser(
|
||||
struct _cef_browser_t* browser);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_VIEWS_CEF_BROWSER_VIEW_CAPI_H_
|
@@ -1,118 +0,0 @@
|
||||
// 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
|
||||
// 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_VIEWS_CEF_BROWSER_VIEW_DELEGATE_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_VIEWS_CEF_BROWSER_VIEW_DELEGATE_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_client_capi.h"
|
||||
#include "include/capi/views/cef_view_delegate_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct _cef_browser_t;
|
||||
struct _cef_browser_view_t;
|
||||
|
||||
///
|
||||
// Implement this structure to handle BrowserView events. The functions of this
|
||||
// structure will be called on the browser process UI thread unless otherwise
|
||||
// indicated.
|
||||
///
|
||||
typedef struct _cef_browser_view_delegate_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_view_delegate_t base;
|
||||
|
||||
///
|
||||
// Called when |browser| associated with |browser_view| is created. This
|
||||
// function will be called after cef_life_span_handler_t::on_after_created()
|
||||
// is called for |browser| and before on_popup_browser_view_created() is
|
||||
// called for |browser|'s parent delegate if |browser| is a popup.
|
||||
///
|
||||
void (CEF_CALLBACK *on_browser_created)(
|
||||
struct _cef_browser_view_delegate_t* self,
|
||||
struct _cef_browser_view_t* browser_view,
|
||||
struct _cef_browser_t* browser);
|
||||
|
||||
///
|
||||
// Called when |browser| associated with |browser_view| is destroyed. Release
|
||||
// all references to |browser| and do not attempt to execute any functions on
|
||||
// |browser| after this callback returns. This function will be called before
|
||||
// cef_life_span_handler_t::on_before_close() is called for |browser|.
|
||||
///
|
||||
void (CEF_CALLBACK *on_browser_destroyed)(
|
||||
struct _cef_browser_view_delegate_t* self,
|
||||
struct _cef_browser_view_t* browser_view,
|
||||
struct _cef_browser_t* browser);
|
||||
|
||||
///
|
||||
// Called before a new popup BrowserView is created. The popup originated from
|
||||
// |browser_view|. |settings| and |client| are the values returned from
|
||||
// cef_life_span_handler_t::on_before_popup(). |is_devtools| will be true (1)
|
||||
// if the popup will be a DevTools browser. Return the delegate that will be
|
||||
// used for the new popup BrowserView.
|
||||
///
|
||||
struct _cef_browser_view_delegate_t* (
|
||||
CEF_CALLBACK *get_delegate_for_popup_browser_view)(
|
||||
struct _cef_browser_view_delegate_t* self,
|
||||
struct _cef_browser_view_t* browser_view,
|
||||
const struct _cef_browser_settings_t* settings,
|
||||
struct _cef_client_t* client, int is_devtools);
|
||||
|
||||
///
|
||||
// Called after |popup_browser_view| is created. This function will be called
|
||||
// after cef_life_span_handler_t::on_after_created() and on_browser_created()
|
||||
// are called for the new popup browser. The popup originated from
|
||||
// |browser_view|. |is_devtools| will be true (1) if the popup is a DevTools
|
||||
// browser. Optionally add |popup_browser_view| to the views hierarchy
|
||||
// yourself and return true (1). Otherwise return false (0) and a default
|
||||
// cef_window_t will be created for the popup.
|
||||
///
|
||||
int (CEF_CALLBACK *on_popup_browser_view_created)(
|
||||
struct _cef_browser_view_delegate_t* self,
|
||||
struct _cef_browser_view_t* browser_view,
|
||||
struct _cef_browser_view_t* popup_browser_view, int is_devtools);
|
||||
} cef_browser_view_delegate_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_VIEWS_CEF_BROWSER_VIEW_DELEGATE_CAPI_H_
|
@@ -1,96 +0,0 @@
|
||||
// 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
|
||||
// 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_VIEWS_CEF_BUTTON_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_VIEWS_CEF_BUTTON_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/views/cef_view_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct _cef_label_button_t;
|
||||
|
||||
///
|
||||
// A View representing a button. Depending on the specific type, the button
|
||||
// could be implemented by a native control or custom rendered. Methods must be
|
||||
// called on the browser process UI thread unless otherwise indicated.
|
||||
///
|
||||
typedef struct _cef_button_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_view_t base;
|
||||
|
||||
///
|
||||
// Returns this Button as a LabelButton or NULL if this is not a LabelButton.
|
||||
///
|
||||
struct _cef_label_button_t* (CEF_CALLBACK *as_label_button)(
|
||||
struct _cef_button_t* self);
|
||||
|
||||
///
|
||||
// Sets the current display state of the Button.
|
||||
///
|
||||
void (CEF_CALLBACK *set_state)(struct _cef_button_t* self,
|
||||
cef_button_state_t state);
|
||||
|
||||
///
|
||||
// Returns the current display state of the Button.
|
||||
///
|
||||
cef_button_state_t (CEF_CALLBACK *get_state)(struct _cef_button_t* self);
|
||||
|
||||
///
|
||||
// Sets the tooltip text that will be displayed when the user hovers the mouse
|
||||
// cursor over the Button.
|
||||
///
|
||||
void (CEF_CALLBACK *set_tooltip_text)(struct _cef_button_t* self,
|
||||
const cef_string_t* tooltip_text);
|
||||
|
||||
///
|
||||
// Sets the accessible name that will be exposed to assistive technology (AT).
|
||||
///
|
||||
void (CEF_CALLBACK *set_accessible_name)(struct _cef_button_t* self,
|
||||
const cef_string_t* name);
|
||||
} cef_button_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_VIEWS_CEF_BUTTON_CAPI_H_
|
@@ -1,72 +0,0 @@
|
||||
// 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
|
||||
// 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_VIEWS_CEF_BUTTON_DELEGATE_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_VIEWS_CEF_BUTTON_DELEGATE_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/views/cef_view_delegate_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct _cef_button_t;
|
||||
|
||||
///
|
||||
// Implement this structure to handle Button events. The functions of this
|
||||
// structure will be called on the browser process UI thread unless otherwise
|
||||
// indicated.
|
||||
///
|
||||
typedef struct _cef_button_delegate_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_view_delegate_t base;
|
||||
|
||||
///
|
||||
// Called when |button| is pressed.
|
||||
///
|
||||
void (CEF_CALLBACK *on_button_pressed)(struct _cef_button_delegate_t* self,
|
||||
struct _cef_button_t* button);
|
||||
} cef_button_delegate_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_VIEWS_CEF_BUTTON_DELEGATE_CAPI_H_
|
@@ -1,145 +0,0 @@
|
||||
// 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
|
||||
// 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_VIEWS_CEF_DISPLAY_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_VIEWS_CEF_DISPLAY_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
///
|
||||
// This structure typically, but not always, corresponds to a physical display
|
||||
// connected to the system. A fake Display may exist on a headless system, or a
|
||||
// Display may correspond to a remote, virtual display. All size and position
|
||||
// values are in density independent pixels (DIP) unless otherwise indicated.
|
||||
// Methods must be called on the browser process UI thread unless otherwise
|
||||
// indicated.
|
||||
///
|
||||
typedef struct _cef_display_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Returns the unique identifier for this Display.
|
||||
///
|
||||
int64 (CEF_CALLBACK *get_id)(struct _cef_display_t* self);
|
||||
|
||||
///
|
||||
// Returns this Display's device pixel scale factor. This specifies how much
|
||||
// the UI should be scaled when the actual output has more pixels than
|
||||
// standard displays (which is around 100~120dpi). The potential return values
|
||||
// differ by platform.
|
||||
///
|
||||
float (CEF_CALLBACK *get_device_scale_factor)(struct _cef_display_t* self);
|
||||
|
||||
///
|
||||
// Convert |point| from density independent pixels (DIP) to pixel coordinates
|
||||
// using this Display's device scale factor.
|
||||
///
|
||||
void (CEF_CALLBACK *convert_point_to_pixels)(struct _cef_display_t* self,
|
||||
cef_point_t* point);
|
||||
|
||||
///
|
||||
// Convert |point| from pixel coordinates to density independent pixels (DIP)
|
||||
// using this Display's device scale factor.
|
||||
///
|
||||
void (CEF_CALLBACK *convert_point_from_pixels)(struct _cef_display_t* self,
|
||||
cef_point_t* point);
|
||||
|
||||
///
|
||||
// Returns this Display's bounds. This is the full size of the display.
|
||||
///
|
||||
cef_rect_t (CEF_CALLBACK *get_bounds)(struct _cef_display_t* self);
|
||||
|
||||
///
|
||||
// Returns this Display's work area. This excludes areas of the display that
|
||||
// are occupied for window manager toolbars, etc.
|
||||
///
|
||||
cef_rect_t (CEF_CALLBACK *get_work_area)(struct _cef_display_t* self);
|
||||
|
||||
///
|
||||
// Returns this Display's rotation in degrees.
|
||||
///
|
||||
int (CEF_CALLBACK *get_rotation)(struct _cef_display_t* self);
|
||||
} cef_display_t;
|
||||
|
||||
|
||||
///
|
||||
// Returns the primary Display.
|
||||
///
|
||||
CEF_EXPORT cef_display_t* cef_display_get_primary();
|
||||
|
||||
///
|
||||
// Returns the Display nearest |point|. Set |input_pixel_coords| to true (1) if
|
||||
// |point| is in pixel coordinates instead of density independent pixels (DIP).
|
||||
///
|
||||
CEF_EXPORT cef_display_t* cef_display_get_nearest_point(
|
||||
const cef_point_t* point, int input_pixel_coords);
|
||||
|
||||
///
|
||||
// Returns the Display that most closely intersects |bounds|. Set
|
||||
// |input_pixel_coords| to true (1) if |bounds| is in pixel coordinates instead
|
||||
// of density independent pixels (DIP).
|
||||
///
|
||||
CEF_EXPORT cef_display_t* cef_display_get_matching_bounds(
|
||||
const cef_rect_t* bounds, int input_pixel_coords);
|
||||
|
||||
///
|
||||
// Returns the total number of Displays. Mirrored displays are excluded; this
|
||||
// function is intended to return the number of distinct, usable displays.
|
||||
///
|
||||
CEF_EXPORT size_t cef_display_get_count();
|
||||
|
||||
///
|
||||
// Returns all Displays. Mirrored displays are excluded; this function is
|
||||
// intended to return distinct, usable displays.
|
||||
///
|
||||
CEF_EXPORT void cef_display_get_alls(size_t* displaysCount,
|
||||
cef_display_t** displays);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_VIEWS_CEF_DISPLAY_CAPI_H_
|
@@ -1,65 +0,0 @@
|
||||
// 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
|
||||
// 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_VIEWS_CEF_FILL_LAYOUT_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_VIEWS_CEF_FILL_LAYOUT_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/views/cef_layout_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
///
|
||||
// A simple Layout that causes the associated Panel's one child to be sized to
|
||||
// match the bounds of its parent. Methods must be called on the browser process
|
||||
// UI thread unless otherwise indicated.
|
||||
///
|
||||
typedef struct _cef_fill_layout_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_layout_t base;
|
||||
} cef_fill_layout_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_VIEWS_CEF_FILL_LAYOUT_CAPI_H_
|
@@ -1,161 +0,0 @@
|
||||
// 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
|
||||
// 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_VIEWS_CEF_LABEL_BUTTON_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_VIEWS_CEF_LABEL_BUTTON_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_image_capi.h"
|
||||
#include "include/capi/views/cef_button_capi.h"
|
||||
#include "include/capi/views/cef_button_delegate_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct _cef_menu_button_t;
|
||||
|
||||
///
|
||||
// LabelButton is a button with optional text and/or icon. Methods must be
|
||||
// called on the browser process UI thread unless otherwise indicated.
|
||||
///
|
||||
typedef struct _cef_label_button_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_button_t base;
|
||||
|
||||
///
|
||||
// Returns this LabelButton as a MenuButton or NULL if this is not a
|
||||
// MenuButton.
|
||||
///
|
||||
struct _cef_menu_button_t* (CEF_CALLBACK *as_menu_button)(
|
||||
struct _cef_label_button_t* self);
|
||||
|
||||
///
|
||||
// Sets the text shown on the LabelButton. By default |text| will also be used
|
||||
// as the accessible name.
|
||||
///
|
||||
void (CEF_CALLBACK *set_text)(struct _cef_label_button_t* self,
|
||||
const cef_string_t* text);
|
||||
|
||||
///
|
||||
// Returns the text shown on the LabelButton.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_text)(
|
||||
struct _cef_label_button_t* self);
|
||||
|
||||
///
|
||||
// Sets the image shown for |button_state|. When this Button is drawn if no
|
||||
// image exists for the current state then the image for
|
||||
// CEF_BUTTON_STATE_NORMAL, if any, will be shown.
|
||||
///
|
||||
void (CEF_CALLBACK *set_image)(struct _cef_label_button_t* self,
|
||||
cef_button_state_t button_state, struct _cef_image_t* image);
|
||||
|
||||
///
|
||||
// Returns the image shown for |button_state|. If no image exists for that
|
||||
// state then the image for CEF_BUTTON_STATE_NORMAL will be returned.
|
||||
///
|
||||
struct _cef_image_t* (CEF_CALLBACK *get_image)(
|
||||
struct _cef_label_button_t* self, cef_button_state_t button_state);
|
||||
|
||||
///
|
||||
// Sets the text color shown for the specified button |for_state| to |color|.
|
||||
///
|
||||
void (CEF_CALLBACK *set_text_color)(struct _cef_label_button_t* self,
|
||||
cef_button_state_t for_state, cef_color_t color);
|
||||
|
||||
///
|
||||
// Sets the text colors shown for the non-disabled states to |color|.
|
||||
///
|
||||
void (CEF_CALLBACK *set_enabled_text_colors)(struct _cef_label_button_t* self,
|
||||
cef_color_t color);
|
||||
|
||||
///
|
||||
// Sets the font list. The format is "<FONT_FAMILY_LIST>,[STYLES] <SIZE>",
|
||||
// where: - FONT_FAMILY_LIST is a comma-separated list of font family names, -
|
||||
// STYLES is an optional space-separated list of style names (case-sensitive
|
||||
// "Bold" and "Italic" are supported), and
|
||||
// - SIZE is an integer font size in pixels with the suffix "px".
|
||||
//
|
||||
// Here are examples of valid font description strings: - "Arial, Helvetica,
|
||||
// Bold Italic 14px" - "Arial, 14px"
|
||||
///
|
||||
void (CEF_CALLBACK *set_font_list)(struct _cef_label_button_t* self,
|
||||
const cef_string_t* font_list);
|
||||
|
||||
///
|
||||
// Sets the horizontal alignment; reversed in RTL. Default is
|
||||
// CEF_HORIZONTAL_ALIGNMENT_CENTER.
|
||||
///
|
||||
void (CEF_CALLBACK *set_horizontal_alignment)(
|
||||
struct _cef_label_button_t* self, cef_horizontal_alignment_t alignment);
|
||||
|
||||
///
|
||||
// Reset the minimum size of this LabelButton to |size|.
|
||||
///
|
||||
void (CEF_CALLBACK *set_minimum_size)(struct _cef_label_button_t* self,
|
||||
const cef_size_t* size);
|
||||
|
||||
///
|
||||
// Reset the maximum size of this LabelButton to |size|.
|
||||
///
|
||||
void (CEF_CALLBACK *set_maximum_size)(struct _cef_label_button_t* self,
|
||||
const cef_size_t* size);
|
||||
} cef_label_button_t;
|
||||
|
||||
|
||||
///
|
||||
// Create a new LabelButton. A |delegate| must be provided to handle the button
|
||||
// click. |text| will be shown on the LabelButton and used as the default
|
||||
// accessible name. If |with_frame| is true (1) the button will have a visible
|
||||
// frame at all times, center alignment, additional padding and a default
|
||||
// minimum size of 70x33 DIP. If |with_frame| is false (0) the button will only
|
||||
// have a visible frame on hover/press, left alignment, less padding and no
|
||||
// default minimum size.
|
||||
///
|
||||
CEF_EXPORT cef_label_button_t* cef_label_button_create(
|
||||
struct _cef_button_delegate_t* delegate, const cef_string_t* text,
|
||||
int with_frame);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_VIEWS_CEF_LABEL_BUTTON_CAPI_H_
|
@@ -1,84 +0,0 @@
|
||||
// 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
|
||||
// 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_VIEWS_CEF_LAYOUT_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_VIEWS_CEF_LAYOUT_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct _cef_box_layout_t;
|
||||
struct _cef_fill_layout_t;
|
||||
|
||||
///
|
||||
// A Layout handles the sizing of the children of a Panel according to
|
||||
// implementation-specific heuristics. Methods must be called on the browser
|
||||
// process UI thread unless otherwise indicated.
|
||||
///
|
||||
typedef struct _cef_layout_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Returns this Layout as a BoxLayout or NULL if this is not a BoxLayout.
|
||||
///
|
||||
struct _cef_box_layout_t* (CEF_CALLBACK *as_box_layout)(
|
||||
struct _cef_layout_t* self);
|
||||
|
||||
///
|
||||
// Returns this Layout as a FillLayout or NULL if this is not a FillLayout.
|
||||
///
|
||||
struct _cef_fill_layout_t* (CEF_CALLBACK *as_fill_layout)(
|
||||
struct _cef_layout_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if this Layout is valid.
|
||||
///
|
||||
int (CEF_CALLBACK *is_valid)(struct _cef_layout_t* self);
|
||||
} cef_layout_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_VIEWS_CEF_LAYOUT_CAPI_H_
|
@@ -1,93 +0,0 @@
|
||||
// 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
|
||||
// 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_VIEWS_CEF_MENU_BUTTON_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_VIEWS_CEF_MENU_BUTTON_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_menu_model_capi.h"
|
||||
#include "include/capi/views/cef_label_button_capi.h"
|
||||
#include "include/capi/views/cef_menu_button_delegate_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
///
|
||||
// MenuButton is a button with optional text, icon and/or menu marker that shows
|
||||
// a menu when clicked with the left mouse button. All size and position values
|
||||
// are in density independent pixels (DIP) unless otherwise indicated. Methods
|
||||
// must be called on the browser process UI thread unless otherwise indicated.
|
||||
///
|
||||
typedef struct _cef_menu_button_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_label_button_t base;
|
||||
|
||||
///
|
||||
// Show a menu with contents |menu_model|. |screen_point| specifies the menu
|
||||
// position in screen coordinates. |anchor_position| specifies how the menu
|
||||
// will be anchored relative to |screen_point|. This function should be called
|
||||
// from cef_menu_button_delegate_t::on_menu_button_pressed().
|
||||
///
|
||||
void (CEF_CALLBACK *show_menu)(struct _cef_menu_button_t* self,
|
||||
struct _cef_menu_model_t* menu_model, const cef_point_t* screen_point,
|
||||
cef_menu_anchor_position_t anchor_position);
|
||||
} cef_menu_button_t;
|
||||
|
||||
|
||||
///
|
||||
// Create a new MenuButton. A |delegate| must be provided to call show_menu()
|
||||
// when the button is clicked. |text| will be shown on the MenuButton and used
|
||||
// as the default accessible name. If |with_frame| is true (1) the button will
|
||||
// have a visible frame at all times, center alignment, additional padding and a
|
||||
// default minimum size of 70x33 DIP. If |with_frame| is false (0) the button
|
||||
// will only have a visible frame on hover/press, left alignment, less padding
|
||||
// and no default minimum size. If |with_menu_marker| is true (1) a menu marker
|
||||
// will be added to the button.
|
||||
///
|
||||
CEF_EXPORT cef_menu_button_t* cef_menu_button_create(
|
||||
struct _cef_menu_button_delegate_t* delegate, const cef_string_t* text,
|
||||
int with_frame, int with_menu_marker);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_VIEWS_CEF_MENU_BUTTON_CAPI_H_
|
@@ -1,75 +0,0 @@
|
||||
// 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
|
||||
// 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_VIEWS_CEF_MENU_BUTTON_DELEGATE_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_VIEWS_CEF_MENU_BUTTON_DELEGATE_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/views/cef_button_delegate_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct _cef_menu_button_t;
|
||||
|
||||
///
|
||||
// Implement this structure to handle MenuButton events. The functions of this
|
||||
// structure will be called on the browser process UI thread unless otherwise
|
||||
// indicated.
|
||||
///
|
||||
typedef struct _cef_menu_button_delegate_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_button_delegate_t base;
|
||||
|
||||
///
|
||||
// Called when |button| is pressed. Call cef_menu_button_t::show_menu() to
|
||||
// show the resulting menu at |screen_point|.
|
||||
///
|
||||
void (CEF_CALLBACK *on_menu_button_pressed)(
|
||||
struct _cef_menu_button_delegate_t* self,
|
||||
struct _cef_menu_button_t* menu_button,
|
||||
const cef_point_t* screen_point);
|
||||
} cef_menu_button_delegate_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_VIEWS_CEF_MENU_BUTTON_DELEGATE_CAPI_H_
|
@@ -1,149 +0,0 @@
|
||||
// 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
|
||||
// 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_VIEWS_CEF_PANEL_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_VIEWS_CEF_PANEL_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/views/cef_panel_delegate_capi.h"
|
||||
#include "include/capi/views/cef_view_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct _cef_box_layout_t;
|
||||
struct _cef_fill_layout_t;
|
||||
struct _cef_layout_t;
|
||||
struct _cef_window_t;
|
||||
|
||||
///
|
||||
// A Panel is a container in the views hierarchy that can contain other Views as
|
||||
// children. Methods must be called on the browser process UI thread unless
|
||||
// otherwise indicated.
|
||||
///
|
||||
typedef struct _cef_panel_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_view_t base;
|
||||
|
||||
///
|
||||
// Returns this Panel as a Window or NULL if this is not a Window.
|
||||
///
|
||||
struct _cef_window_t* (CEF_CALLBACK *as_window)(struct _cef_panel_t* self);
|
||||
|
||||
///
|
||||
// Set this Panel's Layout to FillLayout and return the FillLayout object.
|
||||
///
|
||||
struct _cef_fill_layout_t* (CEF_CALLBACK *set_to_fill_layout)(
|
||||
struct _cef_panel_t* self);
|
||||
|
||||
///
|
||||
// Set this Panel's Layout to BoxLayout and return the BoxLayout object.
|
||||
///
|
||||
struct _cef_box_layout_t* (CEF_CALLBACK *set_to_box_layout)(
|
||||
struct _cef_panel_t* self,
|
||||
const struct _cef_box_layout_settings_t* settings);
|
||||
|
||||
///
|
||||
// Get the Layout.
|
||||
///
|
||||
struct _cef_layout_t* (CEF_CALLBACK *get_layout)(struct _cef_panel_t* self);
|
||||
|
||||
///
|
||||
// Lay out the child Views (set their bounds based on sizing heuristics
|
||||
// specific to the current Layout).
|
||||
///
|
||||
void (CEF_CALLBACK *layout)(struct _cef_panel_t* self);
|
||||
|
||||
///
|
||||
// Add a child View.
|
||||
///
|
||||
void (CEF_CALLBACK *add_child_view)(struct _cef_panel_t* self,
|
||||
struct _cef_view_t* view);
|
||||
|
||||
///
|
||||
// Add a child View at the specified |index|. If |index| matches the result of
|
||||
// GetChildCount() then the View will be added at the end.
|
||||
///
|
||||
void (CEF_CALLBACK *add_child_view_at)(struct _cef_panel_t* self,
|
||||
struct _cef_view_t* view, int index);
|
||||
|
||||
///
|
||||
// Move the child View to the specified |index|. A negative value for |index|
|
||||
// will move the View to the end.
|
||||
///
|
||||
void (CEF_CALLBACK *reorder_child_view)(struct _cef_panel_t* self,
|
||||
struct _cef_view_t* view, int index);
|
||||
|
||||
///
|
||||
// Remove a child View. The View can then be added to another Panel.
|
||||
///
|
||||
void (CEF_CALLBACK *remove_child_view)(struct _cef_panel_t* self,
|
||||
struct _cef_view_t* view);
|
||||
|
||||
///
|
||||
// Remove all child Views. The removed Views will be deleted if the client
|
||||
// holds no references to them.
|
||||
///
|
||||
void (CEF_CALLBACK *remove_all_child_views)(struct _cef_panel_t* self);
|
||||
|
||||
///
|
||||
// Returns the number of child Views.
|
||||
///
|
||||
size_t (CEF_CALLBACK *get_child_view_count)(struct _cef_panel_t* self);
|
||||
|
||||
///
|
||||
// Returns the child View at the specified |index|.
|
||||
///
|
||||
struct _cef_view_t* (CEF_CALLBACK *get_child_view_at)(
|
||||
struct _cef_panel_t* self, int index);
|
||||
} cef_panel_t;
|
||||
|
||||
|
||||
///
|
||||
// Create a new Panel.
|
||||
///
|
||||
CEF_EXPORT cef_panel_t* cef_panel_create(
|
||||
struct _cef_panel_delegate_t* delegate);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_VIEWS_CEF_PANEL_CAPI_H_
|
@@ -1,65 +0,0 @@
|
||||
// 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
|
||||
// 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_VIEWS_CEF_PANEL_DELEGATE_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_VIEWS_CEF_PANEL_DELEGATE_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/views/cef_view_delegate_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
///
|
||||
// Implement this structure to handle Panel events. The functions of this
|
||||
// structure will be called on the browser process UI thread unless otherwise
|
||||
// indicated.
|
||||
///
|
||||
typedef struct _cef_panel_delegate_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_view_delegate_t base;
|
||||
} cef_panel_delegate_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_VIEWS_CEF_PANEL_DELEGATE_CAPI_H_
|
@@ -1,113 +0,0 @@
|
||||
// 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
|
||||
// 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_VIEWS_CEF_SCROLL_VIEW_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_VIEWS_CEF_SCROLL_VIEW_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/views/cef_view_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
///
|
||||
// A ScrollView will show horizontal and/or vertical scrollbars when necessary
|
||||
// based on the size of the attached content view. Methods must be called on the
|
||||
// browser process UI thread unless otherwise indicated.
|
||||
///
|
||||
typedef struct _cef_scroll_view_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_view_t base;
|
||||
|
||||
///
|
||||
// Set the content View. The content View must have a specified size (e.g. via
|
||||
// cef_view_t::SetBounds or cef_view_tDelegate::GetPreferredSize).
|
||||
///
|
||||
void (CEF_CALLBACK *set_content_view)(struct _cef_scroll_view_t* self,
|
||||
struct _cef_view_t* view);
|
||||
|
||||
///
|
||||
// Returns the content View.
|
||||
///
|
||||
struct _cef_view_t* (CEF_CALLBACK *get_content_view)(
|
||||
struct _cef_scroll_view_t* self);
|
||||
|
||||
///
|
||||
// Returns the visible region of the content View.
|
||||
///
|
||||
cef_rect_t (CEF_CALLBACK *get_visible_content_rect)(
|
||||
struct _cef_scroll_view_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the horizontal scrollbar is currently showing.
|
||||
///
|
||||
int (CEF_CALLBACK *has_horizontal_scrollbar)(struct _cef_scroll_view_t* self);
|
||||
|
||||
///
|
||||
// Returns the height of the horizontal scrollbar.
|
||||
///
|
||||
int (CEF_CALLBACK *get_horizontal_scrollbar_height)(
|
||||
struct _cef_scroll_view_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the vertical scrollbar is currently showing.
|
||||
///
|
||||
int (CEF_CALLBACK *has_vertical_scrollbar)(struct _cef_scroll_view_t* self);
|
||||
|
||||
///
|
||||
// Returns the width of the vertical scrollbar.
|
||||
///
|
||||
int (CEF_CALLBACK *get_vertical_scrollbar_width)(
|
||||
struct _cef_scroll_view_t* self);
|
||||
} cef_scroll_view_t;
|
||||
|
||||
|
||||
///
|
||||
// Create a new ScrollView.
|
||||
///
|
||||
CEF_EXPORT cef_scroll_view_t* cef_scroll_view_create(
|
||||
struct _cef_view_delegate_t* delegate);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_VIEWS_CEF_SCROLL_VIEW_CAPI_H_
|
@@ -1,279 +0,0 @@
|
||||
// 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
|
||||
// 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_VIEWS_CEF_TEXTFIELD_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_VIEWS_CEF_TEXTFIELD_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/views/cef_textfield_delegate_capi.h"
|
||||
#include "include/capi/views/cef_view_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
///
|
||||
// A Textfield supports editing of text. This control is custom rendered with no
|
||||
// platform-specific code. Methods must be called on the browser process UI
|
||||
// thread unless otherwise indicated.
|
||||
///
|
||||
typedef struct _cef_textfield_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_view_t base;
|
||||
|
||||
///
|
||||
// Sets whether the text will be displayed as asterisks.
|
||||
///
|
||||
void (CEF_CALLBACK *set_password_input)(struct _cef_textfield_t* self,
|
||||
int password_input);
|
||||
|
||||
///
|
||||
// Returns true (1) if the text will be displayed as asterisks.
|
||||
///
|
||||
int (CEF_CALLBACK *is_password_input)(struct _cef_textfield_t* self);
|
||||
|
||||
///
|
||||
// Sets whether the text will read-only.
|
||||
///
|
||||
void (CEF_CALLBACK *set_read_only)(struct _cef_textfield_t* self,
|
||||
int read_only);
|
||||
|
||||
///
|
||||
// Returns true (1) if the text is read-only.
|
||||
///
|
||||
int (CEF_CALLBACK *is_read_only)(struct _cef_textfield_t* self);
|
||||
|
||||
///
|
||||
// Returns the currently displayed text.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_text)(struct _cef_textfield_t* self);
|
||||
|
||||
///
|
||||
// Sets the contents to |text|. The cursor will be moved to end of the text if
|
||||
// the current position is outside of the text range.
|
||||
///
|
||||
void (CEF_CALLBACK *set_text)(struct _cef_textfield_t* self,
|
||||
const cef_string_t* text);
|
||||
|
||||
///
|
||||
// Appends |text| to the previously-existing text.
|
||||
///
|
||||
void (CEF_CALLBACK *append_text)(struct _cef_textfield_t* self,
|
||||
const cef_string_t* text);
|
||||
|
||||
///
|
||||
// Inserts |text| at the current cursor position replacing any selected text.
|
||||
///
|
||||
void (CEF_CALLBACK *insert_or_replace_text)(struct _cef_textfield_t* self,
|
||||
const cef_string_t* text);
|
||||
|
||||
///
|
||||
// Returns true (1) if there is any selected text.
|
||||
///
|
||||
int (CEF_CALLBACK *has_selection)(struct _cef_textfield_t* self);
|
||||
|
||||
///
|
||||
// Returns the currently selected text.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_selected_text)(
|
||||
struct _cef_textfield_t* self);
|
||||
|
||||
///
|
||||
// Selects all text. If |reversed| is true (1) the range will end at the
|
||||
// logical beginning of the text; this generally shows the leading portion of
|
||||
// text that overflows its display area.
|
||||
///
|
||||
void (CEF_CALLBACK *select_all)(struct _cef_textfield_t* self, int reversed);
|
||||
|
||||
///
|
||||
// Clears the text selection and sets the caret to the end.
|
||||
///
|
||||
void (CEF_CALLBACK *clear_selection)(struct _cef_textfield_t* self);
|
||||
|
||||
///
|
||||
// Returns the selected logical text range.
|
||||
///
|
||||
cef_range_t (CEF_CALLBACK *get_selected_range)(struct _cef_textfield_t* self);
|
||||
|
||||
///
|
||||
// Selects the specified logical text range.
|
||||
///
|
||||
void (CEF_CALLBACK *select_range)(struct _cef_textfield_t* self,
|
||||
const cef_range_t* range);
|
||||
|
||||
///
|
||||
// Returns the current cursor position.
|
||||
///
|
||||
size_t (CEF_CALLBACK *get_cursor_position)(struct _cef_textfield_t* self);
|
||||
|
||||
///
|
||||
// Sets the text color.
|
||||
///
|
||||
void (CEF_CALLBACK *set_text_color)(struct _cef_textfield_t* self,
|
||||
cef_color_t color);
|
||||
|
||||
///
|
||||
// Returns the text color.
|
||||
///
|
||||
cef_color_t (CEF_CALLBACK *get_text_color)(struct _cef_textfield_t* self);
|
||||
|
||||
///
|
||||
// Sets the selection text color.
|
||||
///
|
||||
void (CEF_CALLBACK *set_selection_text_color)(struct _cef_textfield_t* self,
|
||||
cef_color_t color);
|
||||
|
||||
///
|
||||
// Returns the selection text color.
|
||||
///
|
||||
cef_color_t (CEF_CALLBACK *get_selection_text_color)(
|
||||
struct _cef_textfield_t* self);
|
||||
|
||||
///
|
||||
// Sets the selection background color.
|
||||
///
|
||||
void (CEF_CALLBACK *set_selection_background_color)(
|
||||
struct _cef_textfield_t* self, cef_color_t color);
|
||||
|
||||
///
|
||||
// Returns the selection background color.
|
||||
///
|
||||
cef_color_t (CEF_CALLBACK *get_selection_background_color)(
|
||||
struct _cef_textfield_t* self);
|
||||
|
||||
///
|
||||
// Sets the font list. The format is "<FONT_FAMILY_LIST>,[STYLES] <SIZE>",
|
||||
// where: - FONT_FAMILY_LIST is a comma-separated list of font family names, -
|
||||
// STYLES is an optional space-separated list of style names (case-sensitive
|
||||
// "Bold" and "Italic" are supported), and
|
||||
// - SIZE is an integer font size in pixels with the suffix "px".
|
||||
//
|
||||
// Here are examples of valid font description strings: - "Arial, Helvetica,
|
||||
// Bold Italic 14px" - "Arial, 14px"
|
||||
///
|
||||
void (CEF_CALLBACK *set_font_list)(struct _cef_textfield_t* self,
|
||||
const cef_string_t* font_list);
|
||||
|
||||
///
|
||||
// Applies |color| to the specified |range| without changing the default
|
||||
// color. If |range| is NULL the color will be set on the complete text
|
||||
// contents.
|
||||
///
|
||||
void (CEF_CALLBACK *apply_text_color)(struct _cef_textfield_t* self,
|
||||
cef_color_t color, const cef_range_t* range);
|
||||
|
||||
///
|
||||
// Applies |style| to the specified |range| without changing the default
|
||||
// style. If |add| is true (1) the style will be added, otherwise the style
|
||||
// will be removed. If |range| is NULL the style will be set on the complete
|
||||
// text contents.
|
||||
///
|
||||
void (CEF_CALLBACK *apply_text_style)(struct _cef_textfield_t* self,
|
||||
cef_text_style_t style, int add, const cef_range_t* range);
|
||||
|
||||
///
|
||||
// Returns true (1) if the action associated with the specified command id is
|
||||
// enabled. See additional comments on execute_command().
|
||||
///
|
||||
int (CEF_CALLBACK *is_command_enabled)(struct _cef_textfield_t* self,
|
||||
int command_id);
|
||||
|
||||
///
|
||||
// Performs the action associated with the specified command id. Valid values
|
||||
// include IDS_APP_UNDO, IDS_APP_REDO, IDS_APP_CUT, IDS_APP_COPY,
|
||||
// IDS_APP_PASTE, IDS_APP_DELETE, IDS_APP_SELECT_ALL, IDS_DELETE_* and
|
||||
// IDS_MOVE_*. See include/cef_pack_strings.h for definitions.
|
||||
///
|
||||
void (CEF_CALLBACK *execute_command)(struct _cef_textfield_t* self,
|
||||
int command_id);
|
||||
|
||||
///
|
||||
// Clears Edit history.
|
||||
///
|
||||
void (CEF_CALLBACK *clear_edit_history)(struct _cef_textfield_t* self);
|
||||
|
||||
///
|
||||
// Sets the placeholder text that will be displayed when the Textfield is
|
||||
// NULL.
|
||||
///
|
||||
void (CEF_CALLBACK *set_placeholder_text)(struct _cef_textfield_t* self,
|
||||
const cef_string_t* text);
|
||||
|
||||
///
|
||||
// Returns the placeholder text that will be displayed when the Textfield is
|
||||
// NULL.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_placeholder_text)(
|
||||
struct _cef_textfield_t* self);
|
||||
|
||||
///
|
||||
// Sets the placeholder text color.
|
||||
///
|
||||
void (CEF_CALLBACK *set_placeholder_text_color)(struct _cef_textfield_t* self,
|
||||
cef_color_t color);
|
||||
|
||||
///
|
||||
// Returns the placeholder text color.
|
||||
///
|
||||
cef_color_t (CEF_CALLBACK *get_placeholder_text_color)(
|
||||
struct _cef_textfield_t* self);
|
||||
|
||||
///
|
||||
// Set the accessible name that will be exposed to assistive technology (AT).
|
||||
///
|
||||
void (CEF_CALLBACK *set_accessible_name)(struct _cef_textfield_t* self,
|
||||
const cef_string_t* name);
|
||||
} cef_textfield_t;
|
||||
|
||||
|
||||
///
|
||||
// Create a new Textfield.
|
||||
///
|
||||
CEF_EXPORT cef_textfield_t* cef_textfield_create(
|
||||
struct _cef_textfield_delegate_t* delegate);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_VIEWS_CEF_TEXTFIELD_CAPI_H_
|
@@ -1,82 +0,0 @@
|
||||
// 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
|
||||
// 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_VIEWS_CEF_TEXTFIELD_DELEGATE_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_VIEWS_CEF_TEXTFIELD_DELEGATE_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/views/cef_view_delegate_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct _cef_textfield_t;
|
||||
|
||||
///
|
||||
// Implement this structure to handle Textfield events. The functions of this
|
||||
// structure will be called on the browser process UI thread unless otherwise
|
||||
// indicated.
|
||||
///
|
||||
typedef struct _cef_textfield_delegate_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_view_delegate_t base;
|
||||
|
||||
///
|
||||
// Called when |textfield| recieves a keyboard event. |event| contains
|
||||
// information about the keyboard event. Return true (1) if the keyboard event
|
||||
// was handled or false (0) otherwise for default handling.
|
||||
///
|
||||
int (CEF_CALLBACK *on_key_event)(struct _cef_textfield_delegate_t* self,
|
||||
struct _cef_textfield_t* textfield,
|
||||
const struct _cef_key_event_t* event);
|
||||
|
||||
///
|
||||
// Called after performing a user action that may change |textfield|.
|
||||
///
|
||||
void (CEF_CALLBACK *on_after_user_action)(
|
||||
struct _cef_textfield_delegate_t* self,
|
||||
struct _cef_textfield_t* textfield);
|
||||
} cef_textfield_delegate_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_VIEWS_CEF_TEXTFIELD_DELEGATE_CAPI_H_
|
@@ -1,374 +0,0 @@
|
||||
// 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
|
||||
// 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_VIEWS_CEF_VIEW_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_VIEWS_CEF_VIEW_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/views/cef_view_delegate_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct _cef_browser_view_t;
|
||||
struct _cef_button_t;
|
||||
struct _cef_panel_t;
|
||||
struct _cef_scroll_view_t;
|
||||
struct _cef_textfield_t;
|
||||
struct _cef_window_t;
|
||||
|
||||
///
|
||||
// A View is a rectangle within the views View hierarchy. It is the base
|
||||
// structure for all Views. All size and position values are in density
|
||||
// independent pixels (DIP) unless otherwise indicated. Methods must be called
|
||||
// on the browser process UI thread unless otherwise indicated.
|
||||
///
|
||||
typedef struct _cef_view_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Returns this View as a BrowserView or NULL if this is not a BrowserView.
|
||||
///
|
||||
struct _cef_browser_view_t* (CEF_CALLBACK *as_browser_view)(
|
||||
struct _cef_view_t* self);
|
||||
|
||||
///
|
||||
// Returns this View as a Button or NULL if this is not a Button.
|
||||
///
|
||||
struct _cef_button_t* (CEF_CALLBACK *as_button)(struct _cef_view_t* self);
|
||||
|
||||
///
|
||||
// Returns this View as a Panel or NULL if this is not a Panel.
|
||||
///
|
||||
struct _cef_panel_t* (CEF_CALLBACK *as_panel)(struct _cef_view_t* self);
|
||||
|
||||
///
|
||||
// Returns this View as a ScrollView or NULL if this is not a ScrollView.
|
||||
///
|
||||
struct _cef_scroll_view_t* (CEF_CALLBACK *as_scroll_view)(
|
||||
struct _cef_view_t* self);
|
||||
|
||||
///
|
||||
// Returns this View as a Textfield or NULL if this is not a Textfield.
|
||||
///
|
||||
struct _cef_textfield_t* (CEF_CALLBACK *as_textfield)(
|
||||
struct _cef_view_t* self);
|
||||
|
||||
///
|
||||
// Returns the type of this View as a string. Used primarily for testing
|
||||
// purposes.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_type_string)(
|
||||
struct _cef_view_t* self);
|
||||
|
||||
///
|
||||
// Returns a string representation of this View which includes the type and
|
||||
// various type-specific identifying attributes. If |include_children| is true
|
||||
// (1) any child Views will also be included. Used primarily for testing
|
||||
// purposes.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *to_string)(struct _cef_view_t* self,
|
||||
int include_children);
|
||||
|
||||
///
|
||||
// Returns true (1) if this View is valid.
|
||||
///
|
||||
int (CEF_CALLBACK *is_valid)(struct _cef_view_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if this View is currently attached to another View. A View
|
||||
// can only be attached to one View at a time.
|
||||
///
|
||||
int (CEF_CALLBACK *is_attached)(struct _cef_view_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if this View is the same as |that| View.
|
||||
///
|
||||
int (CEF_CALLBACK *is_same)(struct _cef_view_t* self,
|
||||
struct _cef_view_t* that);
|
||||
|
||||
///
|
||||
// Returns the delegate associated with this View, if any.
|
||||
///
|
||||
struct _cef_view_delegate_t* (CEF_CALLBACK *get_delegate)(
|
||||
struct _cef_view_t* self);
|
||||
|
||||
///
|
||||
// Returns the top-level Window hosting this View, if any.
|
||||
///
|
||||
struct _cef_window_t* (CEF_CALLBACK *get_window)(struct _cef_view_t* self);
|
||||
|
||||
///
|
||||
// Returns the ID for this View.
|
||||
///
|
||||
int (CEF_CALLBACK *get_id)(struct _cef_view_t* self);
|
||||
|
||||
///
|
||||
// Sets the ID for this View. ID should be unique within the subtree that you
|
||||
// intend to search for it. 0 is the default ID for views.
|
||||
///
|
||||
void (CEF_CALLBACK *set_id)(struct _cef_view_t* self, int id);
|
||||
|
||||
///
|
||||
// Returns the View that contains this View, if any.
|
||||
///
|
||||
struct _cef_view_t* (CEF_CALLBACK *get_parent_view)(struct _cef_view_t* self);
|
||||
|
||||
///
|
||||
// Recursively descends the view tree starting at this View, and returns the
|
||||
// first child that it encounters with the given ID. Returns NULL if no
|
||||
// matching child view is found.
|
||||
///
|
||||
struct _cef_view_t* (CEF_CALLBACK *get_view_for_id)(struct _cef_view_t* self,
|
||||
int id);
|
||||
|
||||
///
|
||||
// Sets the bounds (size and position) of this View. Position is in parent
|
||||
// coordinates.
|
||||
///
|
||||
void (CEF_CALLBACK *set_bounds)(struct _cef_view_t* self,
|
||||
const cef_rect_t* bounds);
|
||||
|
||||
///
|
||||
// Returns the bounds (size and position) of this View. Position is in parent
|
||||
// coordinates.
|
||||
///
|
||||
cef_rect_t (CEF_CALLBACK *get_bounds)(struct _cef_view_t* self);
|
||||
|
||||
///
|
||||
// Returns the bounds (size and position) of this View. Position is in screen
|
||||
// coordinates.
|
||||
///
|
||||
cef_rect_t (CEF_CALLBACK *get_bounds_in_screen)(struct _cef_view_t* self);
|
||||
|
||||
///
|
||||
// Sets the size of this View without changing the position.
|
||||
///
|
||||
void (CEF_CALLBACK *set_size)(struct _cef_view_t* self,
|
||||
const cef_size_t* size);
|
||||
|
||||
///
|
||||
// Returns the size of this View.
|
||||
///
|
||||
cef_size_t (CEF_CALLBACK *get_size)(struct _cef_view_t* self);
|
||||
|
||||
///
|
||||
// Sets the position of this View without changing the size. |position| is in
|
||||
// parent coordinates.
|
||||
///
|
||||
void (CEF_CALLBACK *set_position)(struct _cef_view_t* self,
|
||||
const cef_point_t* position);
|
||||
|
||||
///
|
||||
// Returns the position of this View. Position is in parent coordinates.
|
||||
///
|
||||
cef_point_t (CEF_CALLBACK *get_position)(struct _cef_view_t* self);
|
||||
|
||||
///
|
||||
// Returns the size this View would like to be if enough space is available.
|
||||
///
|
||||
cef_size_t (CEF_CALLBACK *get_preferred_size)(struct _cef_view_t* self);
|
||||
|
||||
///
|
||||
// Size this View to its preferred size.
|
||||
///
|
||||
void (CEF_CALLBACK *size_to_preferred_size)(struct _cef_view_t* self);
|
||||
|
||||
///
|
||||
// Returns the minimum size for this View.
|
||||
///
|
||||
cef_size_t (CEF_CALLBACK *get_minimum_size)(struct _cef_view_t* self);
|
||||
|
||||
///
|
||||
// Returns the maximum size for this View.
|
||||
///
|
||||
cef_size_t (CEF_CALLBACK *get_maximum_size)(struct _cef_view_t* self);
|
||||
|
||||
///
|
||||
// Returns the height necessary to display this View with the provided width.
|
||||
///
|
||||
int (CEF_CALLBACK *get_height_for_width)(struct _cef_view_t* self, int width);
|
||||
|
||||
///
|
||||
// Indicate that this View and all parent Views require a re-layout. This
|
||||
// ensures the next call to layout() will propagate to this View even if the
|
||||
// bounds of parent Views do not change.
|
||||
///
|
||||
void (CEF_CALLBACK *invalidate_layout)(struct _cef_view_t* self);
|
||||
|
||||
///
|
||||
// Sets whether this View is visible. Windows are hidden by default and other
|
||||
// views are visible by default. This View and any parent views must be set as
|
||||
// visible for this View to be drawn in a Window. If this View is set as
|
||||
// hidden then it and any child views will not be drawn and, if any of those
|
||||
// views currently have focus, then focus will also be cleared. Painting is
|
||||
// scheduled as needed. If this View is a Window then calling this function is
|
||||
// equivalent to calling the Window show() and hide() functions.
|
||||
///
|
||||
void (CEF_CALLBACK *set_visible)(struct _cef_view_t* self, int visible);
|
||||
|
||||
///
|
||||
// Returns whether this View is visible. A view may be visible but still not
|
||||
// drawn in a Window if any parent views are hidden. If this View is a Window
|
||||
// then a return value of true (1) indicates that this Window is currently
|
||||
// visible to the user on-screen. If this View is not a Window then call
|
||||
// is_drawn() to determine whether this View and all parent views are visible
|
||||
// and will be drawn.
|
||||
///
|
||||
int (CEF_CALLBACK *is_visible)(struct _cef_view_t* self);
|
||||
|
||||
///
|
||||
// Returns whether this View is visible and drawn in a Window. A view is drawn
|
||||
// if it and all parent views are visible. If this View is a Window then
|
||||
// calling this function is equivalent to calling is_visible(). Otherwise, to
|
||||
// determine if the containing Window is visible to the user on-screen call
|
||||
// is_visible() on the Window.
|
||||
///
|
||||
int (CEF_CALLBACK *is_drawn)(struct _cef_view_t* self);
|
||||
|
||||
///
|
||||
// Set whether this View is enabled. A disabled View does not receive keyboard
|
||||
// or mouse inputs. If |enabled| differs from the current value the View will
|
||||
// be repainted. Also, clears focus if the focused View is disabled.
|
||||
///
|
||||
void (CEF_CALLBACK *set_enabled)(struct _cef_view_t* self, int enabled);
|
||||
|
||||
///
|
||||
// Returns whether this View is enabled.
|
||||
///
|
||||
int (CEF_CALLBACK *is_enabled)(struct _cef_view_t* self);
|
||||
|
||||
///
|
||||
// Sets whether this View is capable of taking focus. It will clear focus if
|
||||
// the focused View is set to be non-focusable. This is false (0) by default
|
||||
// so that a View used as a container does not get the focus.
|
||||
///
|
||||
void (CEF_CALLBACK *set_focusable)(struct _cef_view_t* self, int focusable);
|
||||
|
||||
///
|
||||
// Returns true (1) if this View is focusable, enabled and drawn.
|
||||
///
|
||||
int (CEF_CALLBACK *is_focusable)(struct _cef_view_t* self);
|
||||
|
||||
///
|
||||
// Return whether this View is focusable when the user requires full keyboard
|
||||
// access, even though it may not be normally focusable.
|
||||
///
|
||||
int (CEF_CALLBACK *is_accessibility_focusable)(struct _cef_view_t* self);
|
||||
|
||||
///
|
||||
// Request keyboard focus. If this View is focusable it will become the
|
||||
// focused View.
|
||||
///
|
||||
void (CEF_CALLBACK *request_focus)(struct _cef_view_t* self);
|
||||
|
||||
///
|
||||
// Sets the background color for this View.
|
||||
///
|
||||
void (CEF_CALLBACK *set_background_color)(struct _cef_view_t* self,
|
||||
cef_color_t color);
|
||||
|
||||
///
|
||||
// Returns the background color for this View.
|
||||
///
|
||||
cef_color_t (CEF_CALLBACK *get_background_color)(struct _cef_view_t* self);
|
||||
|
||||
///
|
||||
// Convert |point| from this View's coordinate system to that of the screen.
|
||||
// This View must belong to a Window when calling this function. Returns true
|
||||
// (1) if the conversion is successful or false (0) otherwise. Use
|
||||
// cef_display_t::convert_point_to_pixels() after calling this function if
|
||||
// further conversion to display-specific pixel coordinates is desired.
|
||||
///
|
||||
int (CEF_CALLBACK *convert_point_to_screen)(struct _cef_view_t* self,
|
||||
cef_point_t* point);
|
||||
|
||||
///
|
||||
// Convert |point| to this View's coordinate system from that of the screen.
|
||||
// This View must belong to a Window when calling this function. Returns true
|
||||
// (1) if the conversion is successful or false (0) otherwise. Use
|
||||
// cef_display_t::convert_point_from_pixels() before calling this function if
|
||||
// conversion from display-specific pixel coordinates is necessary.
|
||||
///
|
||||
int (CEF_CALLBACK *convert_point_from_screen)(struct _cef_view_t* self,
|
||||
cef_point_t* point);
|
||||
|
||||
///
|
||||
// Convert |point| from this View's coordinate system to that of the Window.
|
||||
// This View must belong to a Window when calling this function. Returns true
|
||||
// (1) if the conversion is successful or false (0) otherwise.
|
||||
///
|
||||
int (CEF_CALLBACK *convert_point_to_window)(struct _cef_view_t* self,
|
||||
cef_point_t* point);
|
||||
|
||||
///
|
||||
// Convert |point| to this View's coordinate system from that of the Window.
|
||||
// This View must belong to a Window when calling this function. Returns true
|
||||
// (1) if the conversion is successful or false (0) otherwise.
|
||||
///
|
||||
int (CEF_CALLBACK *convert_point_from_window)(struct _cef_view_t* self,
|
||||
cef_point_t* point);
|
||||
|
||||
///
|
||||
// Convert |point| from this View's coordinate system to that of |view|.
|
||||
// |view| needs to be in the same Window but not necessarily the same view
|
||||
// hierarchy. Returns true (1) if the conversion is successful or false (0)
|
||||
// otherwise.
|
||||
///
|
||||
int (CEF_CALLBACK *convert_point_to_view)(struct _cef_view_t* self,
|
||||
struct _cef_view_t* view, cef_point_t* point);
|
||||
|
||||
///
|
||||
// Convert |point| to this View's coordinate system from that |view|. |view|
|
||||
// needs to be in the same Window but not necessarily the same view hierarchy.
|
||||
// Returns true (1) if the conversion is successful or false (0) otherwise.
|
||||
///
|
||||
int (CEF_CALLBACK *convert_point_from_view)(struct _cef_view_t* self,
|
||||
struct _cef_view_t* view, cef_point_t* point);
|
||||
} cef_view_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_VIEWS_CEF_VIEW_CAPI_H_
|
@@ -1,115 +0,0 @@
|
||||
// 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
|
||||
// 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_VIEWS_CEF_VIEW_DELEGATE_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_VIEWS_CEF_VIEW_DELEGATE_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct _cef_view_t;
|
||||
|
||||
///
|
||||
// Implement this structure to handle view events. The functions of this
|
||||
// structure will be called on the browser process UI thread unless otherwise
|
||||
// indicated.
|
||||
///
|
||||
typedef struct _cef_view_delegate_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Return the preferred size for |view|. The Layout will use this information
|
||||
// to determine the display size.
|
||||
///
|
||||
cef_size_t (CEF_CALLBACK *get_preferred_size)(
|
||||
struct _cef_view_delegate_t* self, struct _cef_view_t* view);
|
||||
|
||||
///
|
||||
// Return the minimum size for |view|.
|
||||
///
|
||||
cef_size_t (CEF_CALLBACK *get_minimum_size)(struct _cef_view_delegate_t* self,
|
||||
struct _cef_view_t* view);
|
||||
|
||||
///
|
||||
// Return the maximum size for |view|.
|
||||
///
|
||||
cef_size_t (CEF_CALLBACK *get_maximum_size)(struct _cef_view_delegate_t* self,
|
||||
struct _cef_view_t* view);
|
||||
|
||||
///
|
||||
// Return the height necessary to display |view| with the provided |width|. If
|
||||
// not specified the result of get_preferred_size().height will be used by
|
||||
// default. Override if |view|'s preferred height depends upon the width (for
|
||||
// example, with Labels).
|
||||
///
|
||||
int (CEF_CALLBACK *get_height_for_width)(struct _cef_view_delegate_t* self,
|
||||
struct _cef_view_t* view, int width);
|
||||
|
||||
///
|
||||
// Called when the parent of |view| has changed. If |view| is being added to
|
||||
// |parent| then |added| will be true (1). If |view| is being removed from
|
||||
// |parent| then |added| will be false (0). If |view| is being reparented the
|
||||
// remove notification will be sent before the add notification. Do not modify
|
||||
// the view hierarchy in this callback.
|
||||
///
|
||||
void (CEF_CALLBACK *on_parent_view_changed)(struct _cef_view_delegate_t* self,
|
||||
struct _cef_view_t* view, int added, struct _cef_view_t* parent);
|
||||
|
||||
///
|
||||
// Called when a child of |view| has changed. If |child| is being added to
|
||||
// |view| then |added| will be true (1). If |child| is being removed from
|
||||
// |view| then |added| will be false (0). If |child| is being reparented the
|
||||
// remove notification will be sent to the old parent before the add
|
||||
// notification is sent to the new parent. Do not modify the view hierarchy in
|
||||
// this callback.
|
||||
///
|
||||
void (CEF_CALLBACK *on_child_view_changed)(struct _cef_view_delegate_t* self,
|
||||
struct _cef_view_t* view, int added, struct _cef_view_t* child);
|
||||
} cef_view_delegate_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_VIEWS_CEF_VIEW_DELEGATE_CAPI_H_
|
@@ -1,286 +0,0 @@
|
||||
// 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
|
||||
// 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_VIEWS_CEF_WINDOW_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_VIEWS_CEF_WINDOW_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_image_capi.h"
|
||||
#include "include/capi/cef_menu_model_capi.h"
|
||||
#include "include/capi/views/cef_display_capi.h"
|
||||
#include "include/capi/views/cef_panel_capi.h"
|
||||
#include "include/capi/views/cef_window_delegate_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
///
|
||||
// A Window is a top-level Window/widget in the Views hierarchy. By default it
|
||||
// will have a non-client area with title bar, icon and buttons that supports
|
||||
// moving and resizing. All size and position values are in density independent
|
||||
// pixels (DIP) unless otherwise indicated. Methods must be called on the
|
||||
// browser process UI thread unless otherwise indicated.
|
||||
///
|
||||
typedef struct _cef_window_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_panel_t base;
|
||||
|
||||
///
|
||||
// Show the Window.
|
||||
///
|
||||
void (CEF_CALLBACK *show)(struct _cef_window_t* self);
|
||||
|
||||
///
|
||||
// Hide the Window.
|
||||
///
|
||||
void (CEF_CALLBACK *hide)(struct _cef_window_t* self);
|
||||
|
||||
///
|
||||
// Sizes the Window to |size| and centers it in the current display.
|
||||
///
|
||||
void (CEF_CALLBACK *center_window)(struct _cef_window_t* self,
|
||||
const cef_size_t* size);
|
||||
|
||||
///
|
||||
// Close the Window.
|
||||
///
|
||||
void (CEF_CALLBACK *close)(struct _cef_window_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the Window has been closed.
|
||||
///
|
||||
int (CEF_CALLBACK *is_closed)(struct _cef_window_t* self);
|
||||
|
||||
///
|
||||
// Activate the Window, assuming it already exists and is visible.
|
||||
///
|
||||
void (CEF_CALLBACK *activate)(struct _cef_window_t* self);
|
||||
|
||||
///
|
||||
// Deactivate the Window, making the next Window in the Z order the active
|
||||
// Window.
|
||||
///
|
||||
void (CEF_CALLBACK *deactivate)(struct _cef_window_t* self);
|
||||
|
||||
///
|
||||
// Returns whether the Window is the currently active Window.
|
||||
///
|
||||
int (CEF_CALLBACK *is_active)(struct _cef_window_t* self);
|
||||
|
||||
///
|
||||
// Bring this Window to the top of other Windows in the Windowing system.
|
||||
///
|
||||
void (CEF_CALLBACK *bring_to_top)(struct _cef_window_t* self);
|
||||
|
||||
///
|
||||
// Set the Window to be on top of other Windows in the Windowing system.
|
||||
///
|
||||
void (CEF_CALLBACK *set_always_on_top)(struct _cef_window_t* self,
|
||||
int on_top);
|
||||
|
||||
///
|
||||
// Returns whether the Window has been set to be on top of other Windows in
|
||||
// the Windowing system.
|
||||
///
|
||||
int (CEF_CALLBACK *is_always_on_top)(struct _cef_window_t* self);
|
||||
|
||||
///
|
||||
// Maximize the Window.
|
||||
///
|
||||
void (CEF_CALLBACK *maximize)(struct _cef_window_t* self);
|
||||
|
||||
///
|
||||
// Minimize the Window.
|
||||
///
|
||||
void (CEF_CALLBACK *minimize)(struct _cef_window_t* self);
|
||||
|
||||
///
|
||||
// Restore the Window.
|
||||
///
|
||||
void (CEF_CALLBACK *restore)(struct _cef_window_t* self);
|
||||
|
||||
///
|
||||
// Set fullscreen Window state.
|
||||
///
|
||||
void (CEF_CALLBACK *set_fullscreen)(struct _cef_window_t* self,
|
||||
int fullscreen);
|
||||
|
||||
///
|
||||
// Returns true (1) if the Window is maximized.
|
||||
///
|
||||
int (CEF_CALLBACK *is_maximized)(struct _cef_window_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the Window is minimized.
|
||||
///
|
||||
int (CEF_CALLBACK *is_minimized)(struct _cef_window_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the Window is fullscreen.
|
||||
///
|
||||
int (CEF_CALLBACK *is_fullscreen)(struct _cef_window_t* self);
|
||||
|
||||
///
|
||||
// Set the Window title.
|
||||
///
|
||||
void (CEF_CALLBACK *set_title)(struct _cef_window_t* self,
|
||||
const cef_string_t* title);
|
||||
|
||||
///
|
||||
// Get the Window title.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_title)(struct _cef_window_t* self);
|
||||
|
||||
///
|
||||
// Set the Window icon. This should be a 16x16 icon suitable for use in the
|
||||
// Windows's title bar.
|
||||
///
|
||||
void (CEF_CALLBACK *set_window_icon)(struct _cef_window_t* self,
|
||||
struct _cef_image_t* image);
|
||||
|
||||
///
|
||||
// Get the Window icon.
|
||||
///
|
||||
struct _cef_image_t* (CEF_CALLBACK *get_window_icon)(
|
||||
struct _cef_window_t* self);
|
||||
|
||||
///
|
||||
// Set the Window App icon. This should be a larger icon for use in the host
|
||||
// environment app switching UI. On Windows, this is the ICON_BIG used in Alt-
|
||||
// Tab list and Windows taskbar. The Window icon will be used by default if no
|
||||
// Window App icon is specified.
|
||||
///
|
||||
void (CEF_CALLBACK *set_window_app_icon)(struct _cef_window_t* self,
|
||||
struct _cef_image_t* image);
|
||||
|
||||
///
|
||||
// Get the Window App icon.
|
||||
///
|
||||
struct _cef_image_t* (CEF_CALLBACK *get_window_app_icon)(
|
||||
struct _cef_window_t* self);
|
||||
|
||||
///
|
||||
// Show a menu with contents |menu_model|. |screen_point| specifies the menu
|
||||
// position in screen coordinates. |anchor_position| specifies how the menu
|
||||
// will be anchored relative to |screen_point|.
|
||||
///
|
||||
void (CEF_CALLBACK *show_menu)(struct _cef_window_t* self,
|
||||
struct _cef_menu_model_t* menu_model, const cef_point_t* screen_point,
|
||||
cef_menu_anchor_position_t anchor_position);
|
||||
|
||||
///
|
||||
// Cancel the menu that is currently showing, if any.
|
||||
///
|
||||
void (CEF_CALLBACK *cancel_menu)(struct _cef_window_t* self);
|
||||
|
||||
///
|
||||
// Returns the Display that most closely intersects the bounds of this Window.
|
||||
// May return NULL if this Window is not currently displayed.
|
||||
///
|
||||
struct _cef_display_t* (CEF_CALLBACK *get_display)(
|
||||
struct _cef_window_t* self);
|
||||
|
||||
///
|
||||
// Returns the bounds (size and position) of this Window's client area.
|
||||
// Position is in screen coordinates.
|
||||
///
|
||||
cef_rect_t (CEF_CALLBACK *get_client_area_bounds_in_screen)(
|
||||
struct _cef_window_t* self);
|
||||
|
||||
///
|
||||
// Set the regions where mouse events will be intercepted by this Window to
|
||||
// support drag operations. Call this function with an NULL vector to clear
|
||||
// the draggable regions. The draggable region bounds should be in window
|
||||
// coordinates.
|
||||
///
|
||||
void (CEF_CALLBACK *set_draggable_regions)(struct _cef_window_t* self,
|
||||
size_t regionsCount, cef_draggable_region_t const* regions);
|
||||
|
||||
///
|
||||
// Retrieve the platform window handle for this Window.
|
||||
///
|
||||
cef_window_handle_t (CEF_CALLBACK *get_window_handle)(
|
||||
struct _cef_window_t* self);
|
||||
|
||||
///
|
||||
// Simulate a key press. |key_code| is the VKEY_* value from Chromium's
|
||||
// ui/events/keycodes/keyboard_codes.h header (VK_* values on Windows).
|
||||
// |event_flags| is some combination of EVENTFLAG_SHIFT_DOWN,
|
||||
// EVENTFLAG_CONTROL_DOWN and/or EVENTFLAG_ALT_DOWN. This function is exposed
|
||||
// primarily for testing purposes.
|
||||
///
|
||||
void (CEF_CALLBACK *send_key_press)(struct _cef_window_t* self, int key_code,
|
||||
uint32 event_flags);
|
||||
|
||||
///
|
||||
// Simulate a mouse move. The mouse cursor will be moved to the specified
|
||||
// (screen_x, screen_y) position. This function is exposed primarily for
|
||||
// testing purposes.
|
||||
///
|
||||
void (CEF_CALLBACK *send_mouse_move)(struct _cef_window_t* self, int screen_x,
|
||||
int screen_y);
|
||||
|
||||
///
|
||||
// Simulate mouse down and/or mouse up events. |button| is the mouse button
|
||||
// type. If |mouse_down| is true (1) a mouse down event will be sent. If
|
||||
// |mouse_up| is true (1) a mouse up event will be sent. If both are true (1)
|
||||
// a mouse down event will be sent followed by a mouse up event (equivalent to
|
||||
// clicking the mouse button). The events will be sent using the current
|
||||
// cursor position so make sure to call send_mouse_move() first to position
|
||||
// the mouse. This function is exposed primarily for testing purposes.
|
||||
///
|
||||
void (CEF_CALLBACK *send_mouse_events)(struct _cef_window_t* self,
|
||||
cef_mouse_button_type_t button, int mouse_down, int mouse_up);
|
||||
} cef_window_t;
|
||||
|
||||
|
||||
///
|
||||
// Create a new Window.
|
||||
///
|
||||
CEF_EXPORT cef_window_t* cef_window_create_top_level(
|
||||
struct _cef_window_delegate_t* delegate);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_VIEWS_CEF_WINDOW_CAPI_H_
|
@@ -1,113 +0,0 @@
|
||||
// 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
|
||||
// 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_VIEWS_CEF_WINDOW_DELEGATE_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_VIEWS_CEF_WINDOW_DELEGATE_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/views/cef_panel_delegate_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct _cef_window_t;
|
||||
|
||||
///
|
||||
// Implement this structure to handle window events. The functions of this
|
||||
// structure will be called on the browser process UI thread unless otherwise
|
||||
// indicated.
|
||||
///
|
||||
typedef struct _cef_window_delegate_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_panel_delegate_t base;
|
||||
|
||||
///
|
||||
// Called when |window| is created.
|
||||
///
|
||||
void (CEF_CALLBACK *on_window_created)(struct _cef_window_delegate_t* self,
|
||||
struct _cef_window_t* window);
|
||||
|
||||
///
|
||||
// Called when |window| is destroyed. Release all references to |window| and
|
||||
// do not attempt to execute any functions on |window| after this callback
|
||||
// returns.
|
||||
///
|
||||
void (CEF_CALLBACK *on_window_destroyed)(struct _cef_window_delegate_t* self,
|
||||
struct _cef_window_t* window);
|
||||
|
||||
///
|
||||
// Return true (1) if |window| should be created without a frame or title bar.
|
||||
// The window will be resizable if can_resize() returns true (1). Use
|
||||
// cef_window_t::set_draggable_regions() to specify draggable regions.
|
||||
///
|
||||
int (CEF_CALLBACK *is_frameless)(struct _cef_window_delegate_t* self,
|
||||
struct _cef_window_t* window);
|
||||
|
||||
///
|
||||
// Return true (1) if |window| can be resized.
|
||||
///
|
||||
int (CEF_CALLBACK *can_resize)(struct _cef_window_delegate_t* self,
|
||||
struct _cef_window_t* window);
|
||||
|
||||
///
|
||||
// Return true (1) if |window| can be maximized.
|
||||
///
|
||||
int (CEF_CALLBACK *can_maximize)(struct _cef_window_delegate_t* self,
|
||||
struct _cef_window_t* window);
|
||||
|
||||
///
|
||||
// Return true (1) if |window| can be minimized.
|
||||
///
|
||||
int (CEF_CALLBACK *can_minimize)(struct _cef_window_delegate_t* self,
|
||||
struct _cef_window_t* window);
|
||||
|
||||
///
|
||||
// Return true (1) if |window| can be closed. This will be called for user-
|
||||
// initiated window close actions and when cef_window_t::close() is called.
|
||||
///
|
||||
int (CEF_CALLBACK *can_close)(struct _cef_window_delegate_t* self,
|
||||
struct _cef_window_t* window);
|
||||
} cef_window_delegate_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_VIEWS_CEF_WINDOW_DELEGATE_CAPI_H_
|
@@ -35,7 +35,7 @@
|
||||
|
||||
#if defined(OS_MACOSX) && defined(__OBJC__)
|
||||
|
||||
#ifdef USING_CHROMIUM_INCLUDES
|
||||
#ifdef BUILDING_CEF_SHARED
|
||||
|
||||
// Use the existing CrAppControlProtocol definition.
|
||||
#import "base/mac/scoped_sending_event.h"
|
||||
@@ -52,7 +52,7 @@
|
||||
// Use the existing empty protocol definitions.
|
||||
#import "base/mac/sdk_forward_declarations.h"
|
||||
|
||||
#else // USING_CHROMIUM_INCLUDES
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
#import <Cocoa/Cocoa.h>
|
||||
@@ -75,7 +75,101 @@
|
||||
@interface UnderlayOpenGLHostingWindow : NSWindow
|
||||
@end
|
||||
|
||||
#endif // USING_CHROMIUM_INCLUDES
|
||||
// Copy of definitions from base/mac/sdk_forward_declarations.h.
|
||||
// Forward declarations for APIs that are part of the 10.7 SDK. This will allow
|
||||
// using them when building with the 10.6 SDK.
|
||||
|
||||
#if !defined(MAC_OS_X_VERSION_10_7) || \
|
||||
MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
|
||||
|
||||
enum {
|
||||
NSEventPhaseNone = 0, // event not associated with a phase.
|
||||
NSEventPhaseBegan = 0x1 << 0,
|
||||
NSEventPhaseStationary = 0x1 << 1,
|
||||
NSEventPhaseChanged = 0x1 << 2,
|
||||
NSEventPhaseEnded = 0x1 << 3,
|
||||
NSEventPhaseCancelled = 0x1 << 4,
|
||||
};
|
||||
typedef NSUInteger NSEventPhase;
|
||||
|
||||
@interface NSEvent (LionSDK)
|
||||
+ (BOOL)isSwipeTrackingFromScrollEventsEnabled;
|
||||
|
||||
- (NSEventPhase)phase;
|
||||
- (CGFloat)scrollingDeltaX;
|
||||
- (CGFloat)scrollingDeltaY;
|
||||
- (BOOL)isDirectionInvertedFromDevice;
|
||||
@end
|
||||
|
||||
@interface NSScreen (LionSDK)
|
||||
- (CGFloat)backingScaleFactor;
|
||||
- (NSRect)convertRectToBacking:(NSRect)aRect;
|
||||
@end
|
||||
|
||||
@interface NSWindow (LionSDK)
|
||||
- (CGFloat)backingScaleFactor;
|
||||
@end
|
||||
|
||||
#endif // MAC_OS_X_VERSION_10_7
|
||||
|
||||
// The Mac OS X 10.6 SDK introduced new protocols used for delegates. These
|
||||
// protocol defintions were not present in earlier releases of the Mac OS X
|
||||
// SDK. In order to support building against the new SDK, which requires
|
||||
// delegates to conform to these protocols, and earlier SDKs, which do not
|
||||
// define these protocols at all, this file will provide empty protocol
|
||||
// definitions when used with earlier SDK versions.
|
||||
|
||||
#if !defined(MAC_OS_X_VERSION_10_6) || \
|
||||
MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
|
||||
|
||||
#define DEFINE_EMPTY_PROTOCOL(p) \
|
||||
@protocol p \
|
||||
@end
|
||||
|
||||
DEFINE_EMPTY_PROTOCOL(NSAlertDelegate)
|
||||
DEFINE_EMPTY_PROTOCOL(NSApplicationDelegate)
|
||||
DEFINE_EMPTY_PROTOCOL(NSControlTextEditingDelegate)
|
||||
DEFINE_EMPTY_PROTOCOL(NSMatrixDelegate)
|
||||
DEFINE_EMPTY_PROTOCOL(NSMenuDelegate)
|
||||
DEFINE_EMPTY_PROTOCOL(NSOpenSavePanelDelegate)
|
||||
DEFINE_EMPTY_PROTOCOL(NSOutlineViewDataSource)
|
||||
DEFINE_EMPTY_PROTOCOL(NSOutlineViewDelegate)
|
||||
DEFINE_EMPTY_PROTOCOL(NSSpeechSynthesizerDelegate)
|
||||
DEFINE_EMPTY_PROTOCOL(NSSplitViewDelegate)
|
||||
DEFINE_EMPTY_PROTOCOL(NSTableViewDataSource)
|
||||
DEFINE_EMPTY_PROTOCOL(NSTableViewDelegate)
|
||||
DEFINE_EMPTY_PROTOCOL(NSTextFieldDelegate)
|
||||
DEFINE_EMPTY_PROTOCOL(NSTextViewDelegate)
|
||||
DEFINE_EMPTY_PROTOCOL(NSWindowDelegate)
|
||||
|
||||
#undef DEFINE_EMPTY_PROTOCOL
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
|
||||
// Forward declarations for APIs that are part of the 10.7 SDK. This will allow
|
||||
// using them when building with the 10.6 SDK.
|
||||
|
||||
#if !defined(MAC_OS_X_VERSION_10_7) || \
|
||||
MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
|
||||
|
||||
@interface NSView (NSOpenGLSurfaceResolutionLionAPI)
|
||||
- (void)setWantsBestResolutionOpenGLSurface:(BOOL)flag;
|
||||
@end
|
||||
|
||||
@interface NSView (LionAPI)
|
||||
- (NSSize)convertSizeToBacking:(NSSize)aSize;
|
||||
- (NSRect)convertRectToBacking:(NSRect)aRect;
|
||||
- (NSRect)convertRectFromBacking:(NSRect)aRect;
|
||||
@end
|
||||
|
||||
static NSString* const NSWindowDidChangeBackingPropertiesNotification =
|
||||
@"NSWindowDidChangeBackingPropertiesNotification";
|
||||
static NSString* const NSBackingPropertyOldScaleFactorKey =
|
||||
@"NSBackingPropertyOldScaleFactorKey";
|
||||
|
||||
#endif // MAC_OS_X_VERSION_10_7
|
||||
|
||||
// All CEF client applications must subclass NSApplication and implement this
|
||||
// protocol.
|
||||
|
@@ -41,7 +41,6 @@
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_drag_data.h"
|
||||
#include "include/cef_frame.h"
|
||||
#include "include/cef_image.h"
|
||||
#include "include/cef_navigation_entry.h"
|
||||
#include "include/cef_process_message.h"
|
||||
#include "include/cef_request_context.h"
|
||||
@@ -252,27 +251,6 @@ class CefPdfPrintCallback : public virtual CefBase {
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
// Callback interface for CefBrowserHost::DownloadImage. The methods of this
|
||||
// class will be called on the browser process UI thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefDownloadImageCallback : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// 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 empty if the download failed.
|
||||
///
|
||||
/*--cef(optional_param=image)--*/
|
||||
virtual void OnDownloadImageFinished(
|
||||
const CefString& image_url,
|
||||
int http_status_code,
|
||||
CefRefPtr<CefImage> image) =0;
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
// Class used to represent the browser process aspects of a browser window. The
|
||||
// methods of this class can only be called in the browser process. They may be
|
||||
@@ -336,17 +314,6 @@ class CefBrowserHost : public virtual CefBase {
|
||||
/*--cef()--*/
|
||||
virtual void CloseBrowser(bool force_close) =0;
|
||||
|
||||
///
|
||||
// Helper for closing a browser. Call this method from the top-level window
|
||||
// close handler. Internally this calls CloseBrowser(false) if the close has
|
||||
// not yet been initiated. This method returns false while the close is
|
||||
// pending and true after the close has completed. See CloseBrowser() and
|
||||
// CefLifeSpanHandler::DoClose() documentation for additional usage
|
||||
// information. This method must be called on the browser process UI thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool TryCloseBrowser() =0;
|
||||
|
||||
///
|
||||
// Set whether the browser is focused.
|
||||
///
|
||||
@@ -354,28 +321,26 @@ class CefBrowserHost : public virtual CefBase {
|
||||
virtual void SetFocus(bool focus) =0;
|
||||
|
||||
///
|
||||
// Retrieve the window handle for this browser. If this browser is wrapped in
|
||||
// a CefBrowserView this method 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.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetWindowVisibility(bool visible) =0;
|
||||
|
||||
///
|
||||
// Retrieve the window handle for this browser.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefWindowHandle GetWindowHandle() =0;
|
||||
|
||||
///
|
||||
// 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
|
||||
// CefBrowserView. This method can be used in combination with custom handling
|
||||
// of modal windows.
|
||||
// return NULL for non-popup windows. This method can be used in combination
|
||||
// with custom handling of modal windows.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefWindowHandle GetOpenerWindowHandle() =0;
|
||||
|
||||
///
|
||||
// Returns true if this browser is wrapped in a CefBrowserView.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool HasView() =0;
|
||||
|
||||
///
|
||||
// Returns the client for this browser.
|
||||
///
|
||||
@@ -435,25 +400,6 @@ class CefBrowserHost : public virtual CefBase {
|
||||
/*--cef()--*/
|
||||
virtual void StartDownload(const CefString& url) =0;
|
||||
|
||||
///
|
||||
// Download |image_url| and execute |callback| on completion with the images
|
||||
// received from the renderer. If |is_favicon| is true 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 then |image_url| is requested from the
|
||||
// server even if it is present in the browser cache.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void DownloadImage(const CefString& image_url,
|
||||
bool is_favicon,
|
||||
uint32 max_image_size,
|
||||
bool bypass_cache,
|
||||
CefRefPtr<CefDownloadImageCallback> callback) =0;
|
||||
|
||||
///
|
||||
// Print the current browser contents.
|
||||
///
|
||||
@@ -490,34 +436,22 @@ class CefBrowserHost : public virtual CefBase {
|
||||
virtual void StopFinding(bool clearSelection) =0;
|
||||
|
||||
///
|
||||
// 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-empty 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 CefBrowserView.
|
||||
// Open developer tools in its own window. If |inspect_element_at| is non-
|
||||
// empty the element at the specified (x,y) location will be inspected.
|
||||
///
|
||||
/*--cef(optional_param=windowInfo,optional_param=client,
|
||||
optional_param=settings,optional_param=inspect_element_at)--*/
|
||||
/*--cef(optional_param=inspect_element_at)--*/
|
||||
virtual void ShowDevTools(const CefWindowInfo& windowInfo,
|
||||
CefRefPtr<CefClient> client,
|
||||
const CefBrowserSettings& settings,
|
||||
const CefPoint& inspect_element_at) =0;
|
||||
|
||||
///
|
||||
// Explicitly close the associated DevTools browser, if any.
|
||||
// Explicitly close the developer tools window if one exists for this browser
|
||||
// instance.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void CloseDevTools() =0;
|
||||
|
||||
///
|
||||
// Returns true if this browser currently has an associated DevTools browser.
|
||||
// Must be called on the browser process UI thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool HasDevTools() =0;
|
||||
|
||||
///
|
||||
// Retrieve a snapshot of current navigation entries as values sent to the
|
||||
// specified visitor. If |current_only| is true only the current navigation
|
||||
|
@@ -1,191 +0,0 @@
|
||||
// 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
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_IMAGE_H_
|
||||
#define CEF_INCLUDE_CEF_IMAGE_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_values.h"
|
||||
|
||||
///
|
||||
// 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 methods of this class must
|
||||
// be called on the browser process UI thread.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefImage : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Create a new CefImage. It will initially be empty. Use the Add*() methods
|
||||
// to add representations at different scale factors.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefImage> CreateImage();
|
||||
|
||||
///
|
||||
// Returns true if this Image is empty.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsEmpty() =0;
|
||||
|
||||
///
|
||||
// Returns true if this Image and |that| Image share the same underlying
|
||||
// storage. Will also return true if both images are empty.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsSame(CefRefPtr<CefImage> that) =0;
|
||||
|
||||
///
|
||||
// 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.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool AddBitmap(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) =0;
|
||||
|
||||
///
|
||||
// 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.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool AddPNG(float scale_factor,
|
||||
const void* png_data,
|
||||
size_t png_data_size) =0;
|
||||
|
||||
///
|
||||
// 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.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool AddJPEG(float scale_factor,
|
||||
const void* jpeg_data,
|
||||
size_t jpeg_data_size) =0;
|
||||
|
||||
///
|
||||
// Returns the image width in density independent pixel (DIP) units.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual size_t GetWidth() =0;
|
||||
|
||||
///
|
||||
// Returns the image height in density independent pixel (DIP) units.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual size_t GetHeight() =0;
|
||||
|
||||
///
|
||||
// Returns true if this image contains a representation for |scale_factor|.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool HasRepresentation(float scale_factor) =0;
|
||||
|
||||
///
|
||||
// Removes the representation for |scale_factor|. Returns true on success.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool RemoveRepresentation(float scale_factor) =0;
|
||||
|
||||
///
|
||||
// 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 on success.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool GetRepresentationInfo(float scale_factor,
|
||||
float& actual_scale_factor,
|
||||
int& pixel_width,
|
||||
int& pixel_height) =0;
|
||||
|
||||
///
|
||||
// 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 CefBinaryValue containing the pixel data on success or NULL on
|
||||
// failure.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefBinaryValue> GetAsBitmap(float scale_factor,
|
||||
cef_color_type_t color_type,
|
||||
cef_alpha_type_t alpha_type,
|
||||
int& pixel_width,
|
||||
int& pixel_height) =0;
|
||||
|
||||
///
|
||||
// Returns the PNG representation that most closely matches |scale_factor|. If
|
||||
// |with_transparency| is true 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
|
||||
// CefBinaryValue containing the PNG image data on success or NULL on failure.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefBinaryValue> GetAsPNG(float scale_factor,
|
||||
bool with_transparency,
|
||||
int& pixel_width,
|
||||
int& pixel_height) =0;
|
||||
|
||||
///
|
||||
// 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
|
||||
// CefBinaryValue containing the JPEG image data on success or NULL on
|
||||
// failure.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefBinaryValue> GetAsJPEG(float scale_factor,
|
||||
int quality,
|
||||
int& pixel_width,
|
||||
int& pixel_height) =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_IMAGE_H_
|
@@ -68,25 +68,27 @@ class CefJSDialogHandler : public virtual CefBase {
|
||||
typedef cef_jsdialog_type_t JSDialogType;
|
||||
|
||||
///
|
||||
// Called to run a JavaScript dialog. If |origin_url| is non-empty 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 and
|
||||
// return false 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 and return false 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 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-empty 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 and return false 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 and return
|
||||
// false 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 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.
|
||||
///
|
||||
/*--cef(optional_param=origin_url,optional_param=accept_lang,
|
||||
optional_param=message_text,optional_param=default_prompt_text)--*/
|
||||
virtual bool OnJSDialog(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& origin_url,
|
||||
const CefString& accept_lang,
|
||||
JSDialogType dialog_type,
|
||||
const CefString& message_text,
|
||||
const CefString& default_prompt_text,
|
||||
|
@@ -69,9 +69,7 @@ class CefLifeSpanHandler : public virtual CefBase {
|
||||
// browser return true. The |client| and |settings| values will default to the
|
||||
// source browser's values. If the |no_javascript_access| value is set to
|
||||
// false 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
|
||||
// CefBrowserView.
|
||||
// same renderer process as the source browser.
|
||||
///
|
||||
/*--cef(optional_param=target_url,optional_param=target_frame_name)--*/
|
||||
virtual bool OnBeforePopup(CefRefPtr<CefBrowser> browser,
|
||||
@@ -89,80 +87,55 @@ class CefLifeSpanHandler : public virtual CefBase {
|
||||
}
|
||||
|
||||
///
|
||||
// Called after a new browser is created. This callback will be the first
|
||||
// notification that references |browser|.
|
||||
// Called after a new browser is created.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnAfterCreated(CefRefPtr<CefBrowser> browser) {}
|
||||
|
||||
///
|
||||
// Called when a modal window is about to display and the modal loop should
|
||||
// begin running. Return false to use the default modal loop implementation or
|
||||
// true to use a custom implementation.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool RunModal(CefRefPtr<CefBrowser> browser) { return false; }
|
||||
|
||||
///
|
||||
// Called when a browser has recieved a request to close. This may result
|
||||
// directly from a call to CefBrowserHost::*CloseBrowser() 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
|
||||
// DoClose() method will be called after the JavaScript 'onunload' event has
|
||||
// been fired.
|
||||
// directly from a call to CefBrowserHost::CloseBrowser() or indirectly if the
|
||||
// browser is a top-level OS window created by CEF and the user attempts to
|
||||
// close the window. This method 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 CefBrowserHost::TryCloseBrowser() or
|
||||
// CefBrowserHost::CloseBrowser(false) instead of allowing the window to close
|
||||
// immediately (see the examples below). This gives CEF an opportunity to
|
||||
// process the 'onbeforeunload' event and optionally cancel the close before
|
||||
// DoClose() is called.
|
||||
// If CEF created an OS window for the browser returning false 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 will cause the
|
||||
// browser object to be destroyed immediately. Return true if the browser is
|
||||
// parented to another window and that other window needs to receive close
|
||||
// notification via some non-standard technique.
|
||||
//
|
||||
// When windowed rendering is enabled CEF will internally create a window or
|
||||
// view to host the browser. In that case returning false from DoClose() 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 CefWindowDelegate::CanClose() callback from Views). If the
|
||||
// browser's host window/view has already been destroyed (via view hierarchy
|
||||
// tear-down, for example) then DoClose() will not be called for that browser
|
||||
// since is no longer possible to cancel the close.
|
||||
// If an application provides its own top-level window it should handle OS
|
||||
// close notifications by calling CefBrowserHost::CloseBrowser(false) instead
|
||||
// of immediately closing (see the example below). This gives CEF an
|
||||
// opportunity to process the 'onbeforeunload' event and optionally cancel the
|
||||
// close before DoClose() is called.
|
||||
//
|
||||
// When windowed rendering is disabled returning false from DoClose() will
|
||||
// cause the browser object to be destroyed immediately.
|
||||
// The CefLifeSpanHandler::OnBeforeClose() method will be called immediately
|
||||
// before the browser object is destroyed. The application should only exit
|
||||
// after OnBeforeClose() has been called for all existing browsers.
|
||||
//
|
||||
// If the browser's top-level owner window requires a non-standard close
|
||||
// notification then send that notification from DoClose() and return true.
|
||||
// If the browser represents a modal window and a custom modal loop
|
||||
// implementation was provided in CefLifeSpanHandler::RunModal() this callback
|
||||
// should be used to restore the opener window to a usable state.
|
||||
//
|
||||
// The CefLifeSpanHandler::OnBeforeClose() method will be called after
|
||||
// DoClose() (if DoClose() is called) and immediately before the browser
|
||||
// object is destroyed. The application should only exit after OnBeforeClose()
|
||||
// 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.
|
||||
//
|
||||
// Example 1: Using CefBrowserHost::TryCloseBrowser(). 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 OnBeforeClose() handler is called and the browser object
|
||||
// is destroyed.
|
||||
// 10. Application exits by calling CefQuitMessageLoop() if no other browsers
|
||||
// exist.
|
||||
//
|
||||
// Example 2: Using CefBrowserHost::CloseBrowser(false) and implementing the
|
||||
// DoClose() 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.
|
||||
@@ -174,12 +147,12 @@ class CefLifeSpanHandler : public virtual CefBase {
|
||||
// 6. Application's DoClose() 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 OnBeforeClose() handler is called and the browser object
|
||||
// is destroyed.
|
||||
// 9. Browser OS window is destroyed.
|
||||
// 10. Application's CefLifeSpanHandler::OnBeforeClose() handler is called and
|
||||
// the browser object is destroyed.
|
||||
// 11. Application exits by calling CefQuitMessageLoop() if no other browsers
|
||||
// exist.
|
||||
///
|
||||
@@ -189,8 +162,9 @@ class CefLifeSpanHandler : public virtual CefBase {
|
||||
///
|
||||
// Called just before a browser is destroyed. Release all references to the
|
||||
// browser object and do not attempt to execute any methods on the browser
|
||||
// object after this callback returns. This callback will be the last
|
||||
// notification that references |browser|. See DoClose() documentation for
|
||||
// object after this callback returns. If this is a modal window and a custom
|
||||
// modal loop implementation was provided in RunModal() this callback should
|
||||
// be used to exit the custom modal loop. See DoClose() documentation for
|
||||
// additional usage information.
|
||||
///
|
||||
/*--cef()--*/
|
||||
|
@@ -39,7 +39,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_menu_model_delegate.h"
|
||||
|
||||
///
|
||||
// Supports creation and modification of menus. See cef_menu_id_t for the
|
||||
@@ -52,13 +51,6 @@ class CefMenuModel : public virtual CefBase {
|
||||
public:
|
||||
typedef cef_menu_item_type_t MenuItemType;
|
||||
|
||||
///
|
||||
// Create a new MenuModel with the specified |delegate|.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefMenuModel> CreateMenuModel(
|
||||
CefRefPtr<CefMenuModelDelegate> delegate);
|
||||
|
||||
///
|
||||
// Clears the menu. Returns true on success.
|
||||
///
|
||||
|
@@ -1,82 +0,0 @@
|
||||
// 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
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_VIEWS_CEF_MENU_MODEL_DELEGATE_H_
|
||||
#define CEF_INCLUDE_VIEWS_CEF_MENU_MODEL_DELEGATE_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
|
||||
class CefMenuModel;
|
||||
|
||||
///
|
||||
// Implement this interface to handle menu model events. The methods of this
|
||||
// class will be called on the browser process UI thread unless otherwise
|
||||
// indicated.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefMenuModelDelegate : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Perform the action associated with the specified |command_id| and
|
||||
// optional |event_flags|.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void ExecuteCommand(CefRefPtr<CefMenuModel> menu_model,
|
||||
int command_id,
|
||||
cef_event_flags_t event_flags) =0;
|
||||
|
||||
///
|
||||
// The menu is about to show.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void MenuWillShow(CefRefPtr<CefMenuModel> menu_model) {};
|
||||
|
||||
///
|
||||
// The menu has closed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void MenuClosed(CefRefPtr<CefMenuModel> menu_model) {};
|
||||
|
||||
///
|
||||
// Optionally modify a menu item label. Return true if |label| was modified.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool FormatLabel(CefRefPtr<CefMenuModel> menu_model,
|
||||
CefString& label) { return false; };
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_VIEWS_CEF_MENU_MODEL_DELEGATE_H_
|
@@ -65,13 +65,14 @@ bool CefCreateURL(const CefURLParts& 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.
|
||||
///
|
||||
/*--cef(optional_param=languages)--*/
|
||||
CefString CefFormatUrlForSecurityDisplay(const CefString& origin_url);
|
||||
CefString CefFormatUrlForSecurityDisplay(const CefString& origin_url,
|
||||
const CefString& languages);
|
||||
|
||||
///
|
||||
// Returns the mime type for the specified file extension or an empty string if
|
||||
@@ -127,6 +128,17 @@ CefString CefURIDecode(const CefString& text,
|
||||
bool convert_to_utf8,
|
||||
cef_uri_unescape_rule_t unescape_rule);
|
||||
|
||||
///
|
||||
// Parses |string| which represents a CSS color value. If |strict| is true
|
||||
// strict parsing rules will be applied. Returns true on success or false on
|
||||
// error. If parsing succeeds |color| will be set to the color value otherwise
|
||||
// |color| will remain unchanged.
|
||||
///
|
||||
/*--cef()--*/
|
||||
bool CefParseCSSColor(const CefString& string,
|
||||
bool strict,
|
||||
cef_color_t& color);
|
||||
|
||||
///
|
||||
// Parses the specified |json_string| and returns a dictionary or list
|
||||
// representation. If JSON parsing fails this method returns NULL.
|
||||
|
@@ -50,7 +50,7 @@ class CefPrintSettings : public virtual CefBase {
|
||||
public:
|
||||
typedef cef_color_model_t ColorModel;
|
||||
typedef cef_duplex_mode_t DuplexMode;
|
||||
typedef std::vector<CefRange> PageRangeList;
|
||||
typedef std::vector<CefPageRange> PageRangeList;
|
||||
|
||||
///
|
||||
// Create a new CefPrintSettings object.
|
||||
|
@@ -104,7 +104,7 @@ class CefRequestContext : public virtual CefBase {
|
||||
// Creates a new context object that shares storage with |other| and uses an
|
||||
// optional |handler|.
|
||||
///
|
||||
/*--cef(capi_name=cef_create_context_shared,optional_param=handler)--*/
|
||||
/*--cef(capi_name=create_context_shared,optional_param=handler)--*/
|
||||
static CefRefPtr<CefRequestContext> CreateContext(
|
||||
CefRefPtr<CefRequestContext> other,
|
||||
CefRefPtr<CefRequestContextHandler> handler);
|
||||
|
@@ -71,8 +71,7 @@ class CefResourceHandler : public virtual CefBase {
|
||||
// false 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
|
||||
// SetError() on |response| to indicate the error condition.
|
||||
// URL.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void GetResponseHeaders(CefRefPtr<CefResponse> response,
|
||||
|
@@ -62,19 +62,6 @@ class CefResponse : public virtual CefBase {
|
||||
/*--cef()--*/
|
||||
virtual bool IsReadOnly() =0;
|
||||
|
||||
///
|
||||
// Get the response error code. Returns ERR_NONE if there was no error.
|
||||
///
|
||||
/*--cef(default_retval=ERR_NONE)--*/
|
||||
virtual cef_errorcode_t GetError() = 0;
|
||||
|
||||
///
|
||||
// Set the response error code. This can be used by custom scheme handlers
|
||||
// to return errors during initial request processing.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetError(cef_errorcode_t error) = 0;
|
||||
|
||||
///
|
||||
// Get the response status code.
|
||||
///
|
||||
|
333
include/cef_runnable.h
Normal file
333
include/cef_runnable.h
Normal file
@@ -0,0 +1,333 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. Portions Copyright (c)
|
||||
// 2006-2011 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.
|
||||
//
|
||||
// The contents of this file are a modified extract of base/task.h
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_RUNNABLE_H_
|
||||
#define CEF_INCLUDE_CEF_RUNNABLE_H_
|
||||
#pragma once
|
||||
|
||||
#if defined(BUILDING_CEF_SHARED)
|
||||
// The implementation of cef_runnable.h depends on an obsolete version of
|
||||
// base/tuple.h that is implemented by cef_tuple.h for client applications but
|
||||
// is not compatible with the version used when building Chromium/CEF.
|
||||
#error This header cannot be used when building Chromium/CEF.
|
||||
#endif
|
||||
|
||||
#include "include/base/cef_tuple.h"
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_task.h"
|
||||
|
||||
// CefRunnableMethodTraits -----------------------------------------------------
|
||||
//
|
||||
// This traits-class is used by CefRunnableMethod to manage the lifetime of the
|
||||
// callee object. By default, it is assumed that the callee supports AddRef
|
||||
// and Release methods. A particular class can specialize this template to
|
||||
// define other lifetime management. For example, if the callee is known to
|
||||
// live longer than the CefRunnableMethod object, then a CefRunnableMethodTraits
|
||||
// struct could be defined with empty RetainCallee and ReleaseCallee methods.
|
||||
//
|
||||
// The DISABLE_RUNNABLE_METHOD_REFCOUNT macro is provided as a convenient way
|
||||
// for declaring a CefRunnableMethodTraits that disables refcounting.
|
||||
|
||||
template <class T>
|
||||
struct CefRunnableMethodTraits {
|
||||
CefRunnableMethodTraits() {
|
||||
}
|
||||
|
||||
~CefRunnableMethodTraits() {
|
||||
}
|
||||
|
||||
void RetainCallee(T* obj) {
|
||||
#ifndef NDEBUG
|
||||
// Catch NewCefRunnableMethod being called in an object's constructor.
|
||||
// This isn't safe since the method can be invoked before the constructor
|
||||
// completes, causing the object to be deleted.
|
||||
obj->AddRef();
|
||||
obj->Release();
|
||||
#endif
|
||||
obj->AddRef();
|
||||
}
|
||||
|
||||
void ReleaseCallee(T* obj) {
|
||||
obj->Release();
|
||||
}
|
||||
};
|
||||
|
||||
// Convenience macro for declaring a CefRunnableMethodTraits that disables
|
||||
// refcounting of a class. This is useful if you know that the callee
|
||||
// will outlive the CefRunnableMethod object and thus do not need the ref
|
||||
// counts.
|
||||
//
|
||||
// The invocation of DISABLE_RUNNABLE_METHOD_REFCOUNT should be done at the
|
||||
// global namespace scope. Example:
|
||||
//
|
||||
// namespace foo {
|
||||
// class Bar {
|
||||
// ...
|
||||
// };
|
||||
// } // namespace foo
|
||||
//
|
||||
// DISABLE_RUNNABLE_METHOD_REFCOUNT(foo::Bar);
|
||||
//
|
||||
// This is different from DISALLOW_COPY_AND_ASSIGN which is declared inside the
|
||||
// class.
|
||||
#define DISABLE_RUNNABLE_METHOD_REFCOUNT(TypeName) \
|
||||
template <> \
|
||||
struct CefRunnableMethodTraits<TypeName> { \
|
||||
void RetainCallee(TypeName* manager) {} \
|
||||
void ReleaseCallee(TypeName* manager) {} \
|
||||
}
|
||||
|
||||
// CefRunnableMethod and CefRunnableFunction ----------------------------------
|
||||
//
|
||||
// CefRunnable methods are a type of task that call a function on an object
|
||||
// when they are run. We implement both an object and a set of
|
||||
// NewCefRunnableMethod and NewCefRunnableFunction functions for convenience.
|
||||
// These functions are overloaded and will infer the template types,
|
||||
// simplifying calling code.
|
||||
//
|
||||
// The template definitions all use the following names:
|
||||
// T - the class type of the object you're supplying
|
||||
// this is not needed for the Static version of the call
|
||||
// Method/Function - the signature of a pointer to the method or function you
|
||||
// want to call
|
||||
// Param - the parameter(s) to the method, possibly packed as a Tuple
|
||||
// A - the first parameter (if any) to the method
|
||||
// B - the second parameter (if any) to the method
|
||||
//
|
||||
// Put these all together and you get an object that can call a method whose
|
||||
// signature is:
|
||||
// R T::MyFunction([A[, B]])
|
||||
//
|
||||
// Usage:
|
||||
// CefPostTask(TID_UI, NewCefRunnableMethod(object, &Object::method[, a[, b]])
|
||||
// CefPostTask(TID_UI, NewCefRunnableFunction(&function[, a[, b]])
|
||||
|
||||
// CefRunnableMethod and NewCefRunnableMethod implementation ------------------
|
||||
|
||||
template <class T, class Method, class Params>
|
||||
class CefRunnableMethod : public CefTask {
|
||||
public:
|
||||
CefRunnableMethod(T* obj, Method meth, const Params& params)
|
||||
: obj_(obj), meth_(meth), params_(params) {
|
||||
traits_.RetainCallee(obj_);
|
||||
}
|
||||
|
||||
~CefRunnableMethod() {
|
||||
T* obj = obj_;
|
||||
obj_ = NULL;
|
||||
if (obj)
|
||||
traits_.ReleaseCallee(obj);
|
||||
}
|
||||
|
||||
void Execute() OVERRIDE {
|
||||
if (obj_)
|
||||
DispatchToMethod(obj_, meth_, params_);
|
||||
}
|
||||
|
||||
private:
|
||||
T* obj_;
|
||||
Method meth_;
|
||||
Params params_;
|
||||
CefRunnableMethodTraits<T> traits_;
|
||||
|
||||
IMPLEMENT_REFCOUNTING(CefRunnableMethod);
|
||||
};
|
||||
|
||||
template <class T, class Method>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableMethod(T* object, Method method) {
|
||||
return new CefRunnableMethod<T, Method, base::Tuple0>(
|
||||
object, method, base::MakeTuple());
|
||||
}
|
||||
|
||||
template <class T, class Method, class A>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableMethod(T* object, Method method,
|
||||
const A& a) {
|
||||
return new CefRunnableMethod<T, Method, base::Tuple1<A> >(
|
||||
object, method, base::MakeTuple(a));
|
||||
}
|
||||
|
||||
template <class T, class Method, class A, class B>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableMethod(T* object, Method method,
|
||||
const A& a, const B& b) {
|
||||
return new CefRunnableMethod<T, Method, base::Tuple2<A, B> >(
|
||||
object, method, base::MakeTuple(a, b));
|
||||
}
|
||||
|
||||
template <class T, class Method, class A, class B, class C>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableMethod(T* object, Method method,
|
||||
const A& a, const B& b,
|
||||
const C& c) {
|
||||
return new CefRunnableMethod<T, Method, base::Tuple3<A, B, C> >(
|
||||
object, method, base::MakeTuple(a, b, c));
|
||||
}
|
||||
|
||||
template <class T, class Method, class A, class B, class C, class D>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableMethod(T* object, Method method,
|
||||
const A& a, const B& b,
|
||||
const C& c, const D& d) {
|
||||
return new CefRunnableMethod<T, Method, base::Tuple4<A, B, C, D> >(
|
||||
object, method, base::MakeTuple(a, b, c, d));
|
||||
}
|
||||
|
||||
template <class T, class Method, class A, class B, class C, class D, class E>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableMethod(T* object, Method method,
|
||||
const A& a, const B& b,
|
||||
const C& c, const D& d,
|
||||
const E& e) {
|
||||
return new CefRunnableMethod<T, Method, base::Tuple5<A, B, C, D, E> >(
|
||||
object, method, base::MakeTuple(a, b, c, d, e));
|
||||
}
|
||||
|
||||
template <class T, class Method, class A, class B, class C, class D, class E,
|
||||
class F>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableMethod(T* object, Method method,
|
||||
const A& a, const B& b,
|
||||
const C& c, const D& d,
|
||||
const E& e, const F& f) {
|
||||
return new CefRunnableMethod<T, Method, base::Tuple6<A, B, C, D, E, F> >(
|
||||
object, method, base::MakeTuple(a, b, c, d, e, f));
|
||||
}
|
||||
|
||||
template <class T, class Method, class A, class B, class C, class D, class E,
|
||||
class F, class G>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableMethod(T* object, Method method,
|
||||
const A& a, const B& b,
|
||||
const C& c, const D& d,
|
||||
const E& e, const F& f,
|
||||
const G& g) {
|
||||
return new CefRunnableMethod<T, Method, base::Tuple7<A, B, C, D, E, F, G> >(
|
||||
object, method, base::MakeTuple(a, b, c, d, e, f, g));
|
||||
}
|
||||
|
||||
// CefRunnableFunction and NewCefRunnableFunction implementation --------------
|
||||
|
||||
template <class Function, class Params>
|
||||
class CefRunnableFunction : public CefTask {
|
||||
public:
|
||||
CefRunnableFunction(Function function, const Params& params)
|
||||
: function_(function), params_(params) {
|
||||
}
|
||||
|
||||
~CefRunnableFunction() {
|
||||
}
|
||||
|
||||
void Execute() OVERRIDE {
|
||||
if (function_)
|
||||
DispatchToFunction(function_, params_);
|
||||
}
|
||||
|
||||
private:
|
||||
Function function_;
|
||||
Params params_;
|
||||
|
||||
IMPLEMENT_REFCOUNTING(CefRunnableFunction);
|
||||
};
|
||||
|
||||
template <class Function>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableFunction(Function function) {
|
||||
return new CefRunnableFunction<Function, base::Tuple0>(
|
||||
function, base::MakeTuple());
|
||||
}
|
||||
|
||||
template <class Function, class A>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableFunction(Function function,
|
||||
const A& a) {
|
||||
return new CefRunnableFunction<Function, base::Tuple1<A> >(
|
||||
function, base::MakeTuple(a));
|
||||
}
|
||||
|
||||
template <class Function, class A, class B>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableFunction(Function function,
|
||||
const A& a, const B& b) {
|
||||
return new CefRunnableFunction<Function, base::Tuple2<A, B> >(
|
||||
function, base::MakeTuple(a, b));
|
||||
}
|
||||
|
||||
template <class Function, class A, class B, class C>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableFunction(Function function,
|
||||
const A& a, const B& b,
|
||||
const C& c) {
|
||||
return new CefRunnableFunction<Function, base::Tuple3<A, B, C> >(
|
||||
function, base::MakeTuple(a, b, c));
|
||||
}
|
||||
|
||||
template <class Function, class A, class B, class C, class D>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableFunction(Function function,
|
||||
const A& a, const B& b,
|
||||
const C& c, const D& d) {
|
||||
return new CefRunnableFunction<Function, base::Tuple4<A, B, C, D> >(
|
||||
function, base::MakeTuple(a, b, c, d));
|
||||
}
|
||||
|
||||
template <class Function, class A, class B, class C, class D, class E>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableFunction(Function function,
|
||||
const A& a, const B& b,
|
||||
const C& c, const D& d,
|
||||
const E& e) {
|
||||
return new CefRunnableFunction<Function, base::Tuple5<A, B, C, D, E> >(
|
||||
function, base::MakeTuple(a, b, c, d, e));
|
||||
}
|
||||
|
||||
template <class Function, class A, class B, class C, class D, class E,
|
||||
class F>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableFunction(Function function,
|
||||
const A& a, const B& b,
|
||||
const C& c, const D& d,
|
||||
const E& e, const F& f) {
|
||||
return new CefRunnableFunction<Function, base::Tuple6<A, B, C, D, E, F> >(
|
||||
function, base::MakeTuple(a, b, c, d, e, f));
|
||||
}
|
||||
|
||||
template <class Function, class A, class B, class C, class D, class E,
|
||||
class F, class G>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableFunction(Function function,
|
||||
const A& a, const B& b,
|
||||
const C& c, const D& d,
|
||||
const E& e, const F& f,
|
||||
const G& g) {
|
||||
return new CefRunnableFunction<Function, base::Tuple7<A, B, C, D, E, F, G> >(
|
||||
function, base::MakeTuple(a, b, c, d, e, f, g));
|
||||
}
|
||||
|
||||
template <class Function, class A, class B, class C, class D, class E,
|
||||
class F, class G, class H>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableFunction(Function function,
|
||||
const A& a, const B& b,
|
||||
const C& c, const D& d,
|
||||
const E& e, const F& f,
|
||||
const G& g, const H& h) {
|
||||
return new CefRunnableFunction<Function,
|
||||
base::Tuple8<A, B, C, D, E, F, G, H> >(
|
||||
function, base::MakeTuple(a, b, c, d, e, f, g, h));
|
||||
}
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_RUNNABLE_H_
|
@@ -104,6 +104,30 @@ void CefVisitWebPluginInfo(CefRefPtr<CefWebPluginInfoVisitor> visitor);
|
||||
/*--cef()--*/
|
||||
void CefRefreshWebPlugins();
|
||||
|
||||
///
|
||||
// Add a plugin path (directory + file). This change may not take affect until
|
||||
// after CefRefreshWebPlugins() is called. Can be called on any thread in the
|
||||
// browser process.
|
||||
///
|
||||
/*--cef()--*/
|
||||
void CefAddWebPluginPath(const CefString& path);
|
||||
|
||||
///
|
||||
// Add a plugin directory. This change may not take affect until after
|
||||
// CefRefreshWebPlugins() is called. Can be called on any thread in the browser
|
||||
// process.
|
||||
///
|
||||
/*--cef()--*/
|
||||
void CefAddWebPluginDirectory(const CefString& dir);
|
||||
|
||||
///
|
||||
// Remove a plugin path (directory + file). This change may not take affect
|
||||
// until after CefRefreshWebPlugins() is called. Can be called on any thread in
|
||||
// the browser process.
|
||||
///
|
||||
/*--cef()--*/
|
||||
void CefRemoveWebPluginPath(const CefString& path);
|
||||
|
||||
///
|
||||
// Unregister an internal plugin. This may be undone the next time
|
||||
// CefRefreshWebPlugins() is called. Can be called on any thread in the browser
|
||||
@@ -112,6 +136,13 @@ void CefRefreshWebPlugins();
|
||||
/*--cef()--*/
|
||||
void CefUnregisterInternalWebPlugin(const CefString& path);
|
||||
|
||||
///
|
||||
// Force a plugin to shutdown. Can be called on any thread in the browser
|
||||
// process but will be executed on the IO thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
void CefForceWebPluginShutdown(const CefString& path);
|
||||
|
||||
///
|
||||
// Register a plugin crash. Can be called on any thread in the browser process
|
||||
// but will be executed on the IO thread.
|
||||
|
@@ -37,7 +37,7 @@
|
||||
#include "include/base/cef_string16.h"
|
||||
#include "include/internal/cef_string_types.h"
|
||||
|
||||
#if defined(USING_CHROMIUM_INCLUDES)
|
||||
#if defined(BUILDING_CEF_SHARED)
|
||||
#include "base/files/file_path.h"
|
||||
#endif
|
||||
|
||||
@@ -696,7 +696,7 @@ class CefStringBase {
|
||||
return *this;
|
||||
}
|
||||
#endif // WCHAR_T_IS_UTF32
|
||||
#if defined(USING_CHROMIUM_INCLUDES)
|
||||
#if defined(BUILDING_CEF_SHARED)
|
||||
// The base::FilePath constructor is marked as explicit so provide the
|
||||
// conversion here for convenience.
|
||||
operator base::FilePath() const {
|
||||
@@ -706,7 +706,7 @@ class CefStringBase {
|
||||
return base::FilePath(ToString());
|
||||
#endif
|
||||
}
|
||||
#endif // USING_CHROMIUM_INCLUDES
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
|
||||
private:
|
||||
// Allocate the string structure if it doesn't already exist.
|
||||
|
@@ -1284,24 +1284,6 @@ typedef struct _cef_size_t {
|
||||
int height;
|
||||
} cef_size_t;
|
||||
|
||||
///
|
||||
// Structure representing a range.
|
||||
///
|
||||
typedef struct _cef_range_t {
|
||||
int from;
|
||||
int to;
|
||||
} cef_range_t;
|
||||
|
||||
///
|
||||
// Structure representing insets.
|
||||
///
|
||||
typedef struct _cef_insets_t {
|
||||
int top;
|
||||
int left;
|
||||
int bottom;
|
||||
int right;
|
||||
} cef_insets_t;
|
||||
|
||||
///
|
||||
// Structure representing a draggable region.
|
||||
///
|
||||
@@ -2051,6 +2033,14 @@ typedef enum {
|
||||
DUPLEX_MODE_SHORT_EDGE,
|
||||
} cef_duplex_mode_t;
|
||||
|
||||
///
|
||||
// Structure representing a print job page range.
|
||||
///
|
||||
typedef struct _cef_page_range_t {
|
||||
int from;
|
||||
int to;
|
||||
} cef_page_range_t;
|
||||
|
||||
///
|
||||
// Cursor type values.
|
||||
///
|
||||
@@ -2129,7 +2119,7 @@ typedef enum {
|
||||
// addition to their special meaning. Things like escaped letters, digits,
|
||||
// and most symbols will get unescaped with this mode.
|
||||
///
|
||||
UU_NORMAL = 1 << 0,
|
||||
UU_NORMAL = 1,
|
||||
|
||||
///
|
||||
// Convert %20 to spaces. In some places where we're showing URLs, we may
|
||||
@@ -2137,42 +2127,31 @@ typedef enum {
|
||||
// you wouldn't want this since it might not be interpreted in one piece
|
||||
// by other applications.
|
||||
///
|
||||
UU_SPACES = 1 << 1,
|
||||
|
||||
///
|
||||
// Unescapes '/' and '\\'. If these characters were unescaped, the resulting
|
||||
// URL won't be the same as the source one. Moreover, they are dangerous to
|
||||
// unescape in strings that will be used as file paths or names. This value
|
||||
// should only be used when slashes don't have special meaning, like data
|
||||
// URLs.
|
||||
///
|
||||
UU_PATH_SEPARATORS = 1 << 2,
|
||||
UU_SPACES = 2,
|
||||
|
||||
///
|
||||
// Unescapes various characters that will change the meaning of URLs,
|
||||
// including '%', '+', '&', '#'. Does not unescape path separators.
|
||||
// If these characters were unescaped, the resulting URL won't be the same
|
||||
// as the source one. This flag is used when generating final output like
|
||||
// filenames for URLs where we won't be interpreting as a URL and want to do
|
||||
// as much unescaping as possible.
|
||||
// including '%', '+', '&', '/', '#'. If we unescaped these characters, the
|
||||
// resulting URL won't be the same as the source one. This flag is used when
|
||||
// generating final output like filenames for URLs where we won't be
|
||||
// interpreting as a URL and want to do as much unescaping as possible.
|
||||
///
|
||||
UU_URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS = 1 << 3,
|
||||
UU_URL_SPECIAL_CHARS = 4,
|
||||
|
||||
///
|
||||
// Unescapes characters that can be used in spoofing attempts (such as LOCK)
|
||||
// and control characters (such as BiDi control characters and %01). This
|
||||
// INCLUDES NULLs. This is used for rare cases such as data: URL decoding
|
||||
// where the result is binary data.
|
||||
// Unescapes control characters such as %01. This INCLUDES NULLs. This is
|
||||
// used for rare cases such as data: URL decoding where the result is binary
|
||||
// data. This flag also unescapes BiDi control characters.
|
||||
//
|
||||
// DO NOT use UU_SPOOFING_AND_CONTROL_CHARS if the URL is going to be
|
||||
// displayed in the UI for security reasons.
|
||||
// DO NOT use CONTROL_CHARS if the URL is going to be displayed in the UI
|
||||
// for security reasons.
|
||||
///
|
||||
UU_SPOOFING_AND_CONTROL_CHARS = 1 << 4,
|
||||
UU_CONTROL_CHARS = 8,
|
||||
|
||||
///
|
||||
// URL queries use "+" for space. This flag controls that replacement.
|
||||
///
|
||||
UU_REPLACE_PLUS_WITH_SPACE = 1 << 5,
|
||||
UU_REPLACE_PLUS_WITH_SPACE = 16,
|
||||
} cef_uri_unescape_rule_t;
|
||||
|
||||
///
|
||||
@@ -2433,196 +2412,6 @@ typedef enum {
|
||||
RESPONSE_FILTER_ERROR
|
||||
} cef_response_filter_status_t;
|
||||
|
||||
///
|
||||
// Describes how to interpret the components of a pixel.
|
||||
///
|
||||
typedef enum {
|
||||
///
|
||||
// RGBA with 8 bits per pixel (32bits total).
|
||||
///
|
||||
CEF_COLOR_TYPE_RGBA_8888,
|
||||
|
||||
///
|
||||
// BGRA with 8 bits per pixel (32bits total).
|
||||
///
|
||||
CEF_COLOR_TYPE_BGRA_8888,
|
||||
} cef_color_type_t;
|
||||
|
||||
///
|
||||
// Describes how to interpret the alpha component of a pixel.
|
||||
///
|
||||
typedef enum {
|
||||
///
|
||||
// No transparency. The alpha component is ignored.
|
||||
///
|
||||
CEF_ALPHA_TYPE_OPAQUE,
|
||||
|
||||
///
|
||||
// Transparency with pre-multiplied alpha component.
|
||||
///
|
||||
CEF_ALPHA_TYPE_PREMULTIPLIED,
|
||||
|
||||
///
|
||||
// Transparency with post-multiplied alpha component.
|
||||
///
|
||||
CEF_ALPHA_TYPE_POSTMULTIPLIED,
|
||||
} cef_alpha_type_t;
|
||||
|
||||
///
|
||||
// Text style types. Should be kepy in sync with gfx::TextStyle.
|
||||
///
|
||||
typedef enum {
|
||||
CEF_TEXT_STYLE_BOLD,
|
||||
CEF_TEXT_STYLE_ITALIC,
|
||||
CEF_TEXT_STYLE_STRIKE,
|
||||
CEF_TEXT_STYLE_DIAGONAL_STRIKE,
|
||||
CEF_TEXT_STYLE_UNDERLINE,
|
||||
} cef_text_style_t;
|
||||
|
||||
///
|
||||
// Specifies where along the main axis the CefBoxLayout child views should be
|
||||
// laid out.
|
||||
///
|
||||
typedef enum {
|
||||
///
|
||||
// Child views will be left-aligned.
|
||||
///
|
||||
CEF_MAIN_AXIS_ALIGNMENT_START,
|
||||
|
||||
///
|
||||
// Child views will be center-aligned.
|
||||
///
|
||||
CEF_MAIN_AXIS_ALIGNMENT_CENTER,
|
||||
|
||||
///
|
||||
// Child views will be right-aligned.
|
||||
///
|
||||
CEF_MAIN_AXIS_ALIGNMENT_END,
|
||||
} cef_main_axis_alignment_t;
|
||||
|
||||
///
|
||||
// Specifies where along the cross axis the CefBoxLayout child views should be
|
||||
// laid out.
|
||||
///
|
||||
typedef enum {
|
||||
///
|
||||
// Child views will be stretched to fit.
|
||||
///
|
||||
CEF_CROSS_AXIS_ALIGNMENT_STRETCH,
|
||||
|
||||
///
|
||||
// Child views will be left-aligned.
|
||||
///
|
||||
CEF_CROSS_AXIS_ALIGNMENT_START,
|
||||
|
||||
///
|
||||
// Child views will be center-aligned.
|
||||
///
|
||||
CEF_CROSS_AXIS_ALIGNMENT_CENTER,
|
||||
|
||||
///
|
||||
// Child views will be right-aligned.
|
||||
///
|
||||
CEF_CROSS_AXIS_ALIGNMENT_END,
|
||||
} cef_cross_axis_alignment_t;
|
||||
|
||||
///
|
||||
// Settings used when initializing a CefBoxLayout.
|
||||
///
|
||||
typedef struct _cef_box_layout_settings_t {
|
||||
///
|
||||
// If true (1) the layout will be horizontal, otherwise the layout will be
|
||||
// vertical.
|
||||
///
|
||||
int horizontal;
|
||||
|
||||
///
|
||||
// Adds additional horizontal space between the child view area and the host
|
||||
// view border.
|
||||
///
|
||||
int inside_border_horizontal_spacing;
|
||||
|
||||
///
|
||||
// Adds additional vertical space between the child view area and the host
|
||||
// view border.
|
||||
///
|
||||
int inside_border_vertical_spacing;
|
||||
|
||||
///
|
||||
// Adds additional space around the child view area.
|
||||
///
|
||||
cef_insets_t inside_border_insets;
|
||||
|
||||
///
|
||||
// Adds additional space between child views.
|
||||
///
|
||||
int between_child_spacing;
|
||||
|
||||
///
|
||||
// Specifies where along the main axis the child views should be laid out.
|
||||
///
|
||||
cef_main_axis_alignment_t main_axis_alignment;
|
||||
|
||||
///
|
||||
// Specifies where along the cross axis the child views should be laid out.
|
||||
///
|
||||
cef_cross_axis_alignment_t cross_axis_alignment;
|
||||
|
||||
///
|
||||
// Minimum cross axis size.
|
||||
///
|
||||
int minimum_cross_axis_size;
|
||||
|
||||
///
|
||||
// Default flex for views when none is specified via CefBoxLayout methods.
|
||||
// Using the preferred size as the basis, free space along the main axis is
|
||||
// distributed to views in the ratio of their flex weights. Similarly, if the
|
||||
// views will overflow the parent, space is subtracted in these ratios. A flex
|
||||
// of 0 means this view is not resized. Flex values must not be negative.
|
||||
///
|
||||
int default_flex;
|
||||
} cef_box_layout_settings_t;
|
||||
|
||||
///
|
||||
// Specifies the button display state.
|
||||
///
|
||||
typedef enum {
|
||||
CEF_BUTTON_STATE_NORMAL,
|
||||
CEF_BUTTON_STATE_HOVERED,
|
||||
CEF_BUTTON_STATE_PRESSED,
|
||||
CEF_BUTTON_STATE_DISABLED,
|
||||
} cef_button_state_t;
|
||||
|
||||
///
|
||||
// Specifies the horizontal text alignment mode.
|
||||
///
|
||||
typedef enum {
|
||||
///
|
||||
// Align the text's left edge with that of its display area.
|
||||
///
|
||||
CEF_HORIZONTAL_ALIGNMENT_LEFT,
|
||||
|
||||
///
|
||||
// Align the text's center with that of its display area.
|
||||
///
|
||||
CEF_HORIZONTAL_ALIGNMENT_CENTER,
|
||||
|
||||
///
|
||||
// Align the text's right edge with that of its display area.
|
||||
///
|
||||
CEF_HORIZONTAL_ALIGNMENT_RIGHT,
|
||||
} cef_horizontal_alignment_t;
|
||||
|
||||
///
|
||||
// Specifies how a menu will be anchored for non-RTL languages. The opposite
|
||||
// position will be used for RTL languages.
|
||||
///
|
||||
typedef enum {
|
||||
CEF_MENU_ANCHOR_TOPLEFT,
|
||||
CEF_MENU_ANCHOR_TOPRIGHT,
|
||||
CEF_MENU_ANCHOR_BOTTOMCENTER,
|
||||
} cef_menu_anchor_position_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -205,17 +205,6 @@ class CefRect : public CefStructBase<CefRectTraits> {
|
||||
void Set(int x_val, int y_val, int width_val, int height_val) {
|
||||
x = x_val, y = y_val, width = width_val, height = height_val;
|
||||
}
|
||||
|
||||
// Returns true if the point identified by point_x and point_y falls inside
|
||||
// this rectangle. The point (x, y) is inside the rectangle, but the
|
||||
// point (x + width, y + height) is not.
|
||||
bool Contains(int point_x, int point_y) const {
|
||||
return (point_x >= x) && (point_x < x + width) && (point_y >= y) &&
|
||||
(point_y < y + height);
|
||||
}
|
||||
bool Contains(const CefPoint& point) const {
|
||||
return Contains(point.x, point.y);
|
||||
}
|
||||
};
|
||||
|
||||
inline bool operator==(const CefRect& a, const CefRect& b) {
|
||||
@@ -268,89 +257,6 @@ inline bool operator!=(const CefSize& a, const CefSize& b) {
|
||||
}
|
||||
|
||||
|
||||
struct CefRangeTraits {
|
||||
typedef cef_range_t struct_type;
|
||||
|
||||
static inline void init(struct_type* s) {}
|
||||
static inline void clear(struct_type* s) {}
|
||||
|
||||
static inline void set(const struct_type* src, struct_type* target,
|
||||
bool copy) {
|
||||
*target = *src;
|
||||
}
|
||||
};
|
||||
|
||||
///
|
||||
// Class representing a range.
|
||||
///
|
||||
class CefRange : public CefStructBase<CefRangeTraits> {
|
||||
public:
|
||||
typedef CefStructBase<CefRangeTraits> parent;
|
||||
|
||||
CefRange() : parent() {}
|
||||
CefRange(const cef_range_t& r) // NOLINT(runtime/explicit)
|
||||
: parent(r) {}
|
||||
CefRange(const CefRange& r) // NOLINT(runtime/explicit)
|
||||
: parent(r) {}
|
||||
CefRange(int from, int to) : parent() {
|
||||
Set(from, to);
|
||||
}
|
||||
|
||||
void Set(int from_val, int to_val) {
|
||||
from = from_val, to = to_val;
|
||||
}
|
||||
};
|
||||
|
||||
inline bool operator==(const CefRange& a, const CefRange& b) {
|
||||
return a.from == b.from && a.to == b.to;
|
||||
}
|
||||
|
||||
inline bool operator!=(const CefRange& a, const CefRange& b) {
|
||||
return !(a == b);
|
||||
}
|
||||
|
||||
|
||||
struct CefInsetsTraits {
|
||||
typedef cef_insets_t struct_type;
|
||||
|
||||
static inline void init(struct_type* s) {}
|
||||
static inline void clear(struct_type* s) {}
|
||||
|
||||
static inline void set(const struct_type* src, struct_type* target,
|
||||
bool copy) {
|
||||
*target = *src;
|
||||
}
|
||||
};
|
||||
|
||||
///
|
||||
// Class representing insets.
|
||||
///
|
||||
class CefInsets : public CefStructBase<CefInsetsTraits> {
|
||||
public:
|
||||
typedef CefStructBase<CefInsetsTraits> parent;
|
||||
|
||||
CefInsets() : parent() {}
|
||||
CefInsets(const cef_insets_t& r) : parent(r) {} // NOLINT(runtime/explicit)
|
||||
CefInsets(const CefInsets& r) : parent(r) {} // NOLINT(runtime/explicit)
|
||||
CefInsets(int top, int left, int bottom, int right) : parent() {
|
||||
Set(top, left, bottom, right);
|
||||
}
|
||||
|
||||
void Set(int top_val, int left_val, int bottom_val, int right_val) {
|
||||
top = top_val, left = left_val, bottom = bottom_val, right = right_val;
|
||||
}
|
||||
};
|
||||
|
||||
inline bool operator==(const CefInsets& a, const CefInsets& b) {
|
||||
return a.top == b.top && a.left == b.left && a.bottom == b.bottom &&
|
||||
a.right == b.right;
|
||||
}
|
||||
|
||||
inline bool operator!=(const CefInsets& a, const CefInsets& b) {
|
||||
return !(a == b);
|
||||
}
|
||||
|
||||
|
||||
struct CefDraggableRegionTraits {
|
||||
typedef cef_draggable_region_t struct_type;
|
||||
|
||||
@@ -894,6 +800,48 @@ struct CefGeopositionTraits {
|
||||
typedef CefStructBase<CefGeopositionTraits> CefGeoposition;
|
||||
|
||||
|
||||
struct CefPageRangeTraits {
|
||||
typedef cef_page_range_t struct_type;
|
||||
|
||||
static inline void init(struct_type* s) {}
|
||||
static inline void clear(struct_type* s) {}
|
||||
|
||||
static inline void set(const struct_type* src, struct_type* target,
|
||||
bool copy) {
|
||||
*target = *src;
|
||||
}
|
||||
};
|
||||
|
||||
///
|
||||
// Class representing a print job page range.
|
||||
///
|
||||
class CefPageRange : public CefStructBase<CefPageRangeTraits> {
|
||||
public:
|
||||
typedef CefStructBase<CefPageRangeTraits> parent;
|
||||
|
||||
CefPageRange() : parent() {}
|
||||
CefPageRange(const cef_page_range_t& r) // NOLINT(runtime/explicit)
|
||||
: parent(r) {}
|
||||
CefPageRange(const CefPageRange& r) // NOLINT(runtime/explicit)
|
||||
: parent(r) {}
|
||||
CefPageRange(int from, int to) : parent() {
|
||||
Set(from, to);
|
||||
}
|
||||
|
||||
void Set(int from_val, int to_val) {
|
||||
from = from_val, to = to_val;
|
||||
}
|
||||
};
|
||||
|
||||
inline bool operator==(const CefPageRange& a, const CefPageRange& b) {
|
||||
return a.from == b.from && a.to == b.to;
|
||||
}
|
||||
|
||||
inline bool operator!=(const CefPageRange& a, const CefPageRange& b) {
|
||||
return !(a == b);
|
||||
}
|
||||
|
||||
|
||||
struct CefCursorInfoTraits {
|
||||
typedef cef_cursor_info_t struct_type;
|
||||
|
||||
@@ -955,23 +903,4 @@ struct CefPdfPrintSettingsTraits {
|
||||
///
|
||||
typedef CefStructBase<CefPdfPrintSettingsTraits> CefPdfPrintSettings;
|
||||
|
||||
|
||||
struct CefBoxLayoutSettingsTraits {
|
||||
typedef cef_box_layout_settings_t struct_type;
|
||||
|
||||
static inline void init(struct_type* s) {}
|
||||
|
||||
static inline void clear(struct_type* s) {}
|
||||
|
||||
static inline void set(const struct_type* src, struct_type* target,
|
||||
bool copy) {
|
||||
*target = *src;
|
||||
}
|
||||
};
|
||||
|
||||
///
|
||||
// Class representing CefBoxLayout settings.
|
||||
///
|
||||
typedef CefStructBase<CefBoxLayoutSettingsTraits> CefBoxLayoutSettings;
|
||||
|
||||
#endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_WRAPPERS_H_
|
||||
|
@@ -1,74 +0,0 @@
|
||||
// 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
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_VIEWS_CEF_BOX_LAYOUT_H_
|
||||
#define CEF_INCLUDE_VIEWS_CEF_BOX_LAYOUT_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/views/cef_layout.h"
|
||||
|
||||
class CefView;
|
||||
|
||||
///
|
||||
// A Layout manager that arranges child views vertically or horizontally in a
|
||||
// side-by-side fashion with spacing around and between the child views. The
|
||||
// child views are always sized according to their preferred size. If the
|
||||
// host's bounds provide insufficient space, child views will be clamped.
|
||||
// Excess space will not be distributed. Methods must be called on the browser
|
||||
// process UI thread unless otherwise indicated.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefBoxLayout : public CefLayout {
|
||||
public:
|
||||
///
|
||||
// Set the flex weight for the given |view|. Using the preferred size as
|
||||
// the basis, free space along the main axis is distributed to views in the
|
||||
// ratio of their flex weights. Similarly, if the views will overflow the
|
||||
// parent, space is subtracted in these ratios. A flex of 0 means this view is
|
||||
// not resized. Flex values must not be negative.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetFlexForView(CefRefPtr<CefView> view, int flex) =0;
|
||||
|
||||
///
|
||||
// Clears the flex for the given |view|, causing it to use the default flex
|
||||
// specified via CefBoxLayoutSettings.default_flex.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void ClearFlexForView(CefRefPtr<CefView> view) =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_VIEWS_CEF_BOX_LAYOUT_H_
|
@@ -1,79 +0,0 @@
|
||||
// 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
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_VIEWS_CEF_BROWSER_VIEW_H_
|
||||
#define CEF_INCLUDE_VIEWS_CEF_BROWSER_VIEW_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_browser.h"
|
||||
#include "include/views/cef_browser_view_delegate.h"
|
||||
#include "include/views/cef_view.h"
|
||||
|
||||
///
|
||||
// A View hosting a CefBrowser instance. Methods must be called on the browser
|
||||
// process UI thread unless otherwise indicated.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefBrowserView : public CefView {
|
||||
public:
|
||||
///
|
||||
// Create a new BrowserView. The underlying CefBrowser will not be created
|
||||
// until this view is added to the views hierarchy.
|
||||
///
|
||||
/*--cef(optional_param=client,optional_param=url,
|
||||
optional_param=request_context,optional_param=delegate)--*/
|
||||
static CefRefPtr<CefBrowserView> CreateBrowserView(
|
||||
CefRefPtr<CefClient> client,
|
||||
const CefString& url,
|
||||
const CefBrowserSettings& settings,
|
||||
CefRefPtr<CefRequestContext> request_context,
|
||||
CefRefPtr<CefBrowserViewDelegate> delegate);
|
||||
|
||||
///
|
||||
// Returns the BrowserView associated with |browser|.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefBrowserView> GetForBrowser(CefRefPtr<CefBrowser> browser);
|
||||
|
||||
///
|
||||
// Returns the CefBrowser hosted by this BrowserView. Will return NULL if the
|
||||
// browser has not yet been created or has already been destroyed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefBrowser> GetBrowser() =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_VIEWS_CEF_BROWSER_VIEW_H_
|
@@ -1,109 +0,0 @@
|
||||
// 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
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_VIEWS_CEF_BROWSER_VIEW_DELEGATE_H_
|
||||
#define CEF_INCLUDE_VIEWS_CEF_BROWSER_VIEW_DELEGATE_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_client.h"
|
||||
#include "include/views/cef_view_delegate.h"
|
||||
|
||||
class CefBrowser;
|
||||
class CefBrowserView;
|
||||
|
||||
///
|
||||
// Implement this interface to handle BrowserView events. The methods of this
|
||||
// class will be called on the browser process UI thread unless otherwise
|
||||
// indicated.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefBrowserViewDelegate : public CefViewDelegate {
|
||||
public:
|
||||
///
|
||||
// Called when |browser| associated with |browser_view| is created. This
|
||||
// method will be called after CefLifeSpanHandler::OnAfterCreated() is called
|
||||
// for |browser| and before OnPopupBrowserViewCreated() is called for
|
||||
// |browser|'s parent delegate if |browser| is a popup.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnBrowserCreated(CefRefPtr<CefBrowserView> browser_view,
|
||||
CefRefPtr<CefBrowser> browser) {}
|
||||
|
||||
///
|
||||
// Called when |browser| associated with |browser_view| is destroyed. Release
|
||||
// all references to |browser| and do not attempt to execute any methods on
|
||||
// |browser| after this callback returns. This method will be called before
|
||||
// CefLifeSpanHandler::OnBeforeClose() is called for |browser|.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnBrowserDestroyed(CefRefPtr<CefBrowserView> browser_view,
|
||||
CefRefPtr<CefBrowser> browser) {}
|
||||
|
||||
///
|
||||
// Called before a new popup BrowserView is created. The popup originated
|
||||
// from |browser_view|. |settings| and |client| are the values returned from
|
||||
// CefLifeSpanHandler::OnBeforePopup(). |is_devtools| will be true if the
|
||||
// popup will be a DevTools browser. Return the delegate that will be used for
|
||||
// the new popup BrowserView.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefBrowserViewDelegate> GetDelegateForPopupBrowserView(
|
||||
CefRefPtr<CefBrowserView> browser_view,
|
||||
const CefBrowserSettings& settings,
|
||||
CefRefPtr<CefClient> client,
|
||||
bool is_devtools) {
|
||||
return this;
|
||||
}
|
||||
|
||||
///
|
||||
// Called after |popup_browser_view| is created. This method will be called
|
||||
// after CefLifeSpanHandler::OnAfterCreated() and OnBrowserCreated() are
|
||||
// called for the new popup browser. The popup originated from |browser_view|.
|
||||
// |is_devtools| will be true if the popup is a DevTools browser. Optionally
|
||||
// add |popup_browser_view| to the views hierarchy yourself and return true.
|
||||
// Otherwise return false and a default CefWindow will be created for the
|
||||
// popup.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool OnPopupBrowserViewCreated(
|
||||
CefRefPtr<CefBrowserView> browser_view,
|
||||
CefRefPtr<CefBrowserView> popup_browser_view,
|
||||
bool is_devtools) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_VIEWS_CEF_BROWSER_VIEW_DELEGATE_H_
|
@@ -1,85 +0,0 @@
|
||||
// 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
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_VIEWS_CEF_BUTTON_H_
|
||||
#define CEF_INCLUDE_VIEWS_CEF_BUTTON_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/views/cef_view.h"
|
||||
|
||||
class CefLabelButton;
|
||||
|
||||
///
|
||||
// A View representing a button. Depending on the specific type, the button
|
||||
// could be implemented by a native control or custom rendered. Methods must be
|
||||
// called on the browser process UI thread unless otherwise indicated.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefButton : public CefView {
|
||||
public:
|
||||
///
|
||||
// Returns this Button as a LabelButton or NULL if this is not a LabelButton.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefLabelButton> AsLabelButton() =0;
|
||||
|
||||
///
|
||||
// Sets the current display state of the Button.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetState(cef_button_state_t state) =0;
|
||||
|
||||
///
|
||||
// Returns the current display state of the Button.
|
||||
///
|
||||
/*--cef(default_retval=CEF_BUTTON_STATE_NORMAL)--*/
|
||||
virtual cef_button_state_t GetState() =0;
|
||||
|
||||
///
|
||||
// Sets the tooltip text that will be displayed when the user hovers the mouse
|
||||
// cursor over the Button.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetTooltipText(const CefString& tooltip_text) =0;
|
||||
|
||||
///
|
||||
// Sets the accessible name that will be exposed to assistive technology (AT).
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetAccessibleName(const CefString& name) =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_VIEWS_CEF_BUTTON_H_
|
@@ -1,59 +0,0 @@
|
||||
// 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
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_VIEWS_CEF_BUTTON_DELEGATE_H_
|
||||
#define CEF_INCLUDE_VIEWS_CEF_BUTTON_DELEGATE_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/views/cef_view_delegate.h"
|
||||
|
||||
class CefButton;
|
||||
|
||||
///
|
||||
// Implement this interface to handle Button events. The methods of this class
|
||||
// will be called on the browser process UI thread unless otherwise indicated.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefButtonDelegate : public CefViewDelegate {
|
||||
public:
|
||||
///
|
||||
// Called when |button| is pressed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnButtonPressed(CefRefPtr<CefButton> button) =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_VIEWS_CEF_BUTTON_DELEGATE_H_
|
@@ -1,144 +0,0 @@
|
||||
// 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
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_VIEWS_CEF_DISPLAY_H_
|
||||
#define CEF_INCLUDE_VIEWS_CEF_DISPLAY_H_
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "include/cef_base.h"
|
||||
|
||||
///
|
||||
// This class typically, but not always, corresponds to a physical display
|
||||
// connected to the system. A fake Display may exist on a headless system, or a
|
||||
// Display may correspond to a remote, virtual display. All size and position
|
||||
// values are in density independent pixels (DIP) unless otherwise indicated.
|
||||
// Methods must be called on the browser process UI thread unless otherwise
|
||||
// indicated.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefDisplay : public CefBase {
|
||||
public:
|
||||
///
|
||||
// Returns the primary Display.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefDisplay> GetPrimaryDisplay();
|
||||
|
||||
///
|
||||
// Returns the Display nearest |point|. Set |input_pixel_coords| to true if
|
||||
// |point| is in pixel coordinates instead of density independent pixels
|
||||
// (DIP).
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefDisplay> GetDisplayNearestPoint(const CefPoint& point,
|
||||
bool input_pixel_coords);
|
||||
|
||||
///
|
||||
// Returns the Display that most closely intersects |bounds|. Set
|
||||
// |input_pixel_coords| to true if |bounds| is in pixel coordinates instead of
|
||||
// density independent pixels (DIP).
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefDisplay> GetDisplayMatchingBounds(
|
||||
const CefRect& bounds,
|
||||
bool input_pixel_coords);
|
||||
|
||||
///
|
||||
// Returns the total number of Displays. Mirrored displays are excluded; this
|
||||
// method is intended to return the number of distinct, usable displays.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static size_t GetDisplayCount();
|
||||
|
||||
///
|
||||
// Returns all Displays. Mirrored displays are excluded; this method is
|
||||
// intended to return distinct, usable displays.
|
||||
///
|
||||
/*--cef(count_func=displays:GetDisplayCount)--*/
|
||||
static void GetAllDisplays(std::vector<CefRefPtr<CefDisplay> >& displays);
|
||||
|
||||
///
|
||||
// Returns the unique identifier for this Display.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int64 GetID() =0;
|
||||
|
||||
///
|
||||
// Returns this Display's device pixel scale factor. This specifies how much
|
||||
// the UI should be scaled when the actual output has more pixels than
|
||||
// standard displays (which is around 100~120dpi). The potential return values
|
||||
// differ by platform.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual float GetDeviceScaleFactor() =0;
|
||||
|
||||
///
|
||||
// Convert |point| from density independent pixels (DIP) to pixel coordinates
|
||||
// using this Display's device scale factor.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void ConvertPointToPixels(CefPoint& point) =0;
|
||||
|
||||
///
|
||||
// Convert |point| from pixel coordinates to density independent pixels (DIP)
|
||||
// using this Display's device scale factor.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void ConvertPointFromPixels(CefPoint& point) =0;
|
||||
|
||||
///
|
||||
// Returns this Display's bounds. This is the full size of the display.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRect GetBounds() =0;
|
||||
|
||||
///
|
||||
// Returns this Display's work area. This excludes areas of the display that
|
||||
// are occupied for window manager toolbars, etc.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRect GetWorkArea() =0;
|
||||
|
||||
///
|
||||
// Returns this Display's rotation in degrees.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetRotation() =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_VIEWS_CEF_DISPLAY_H_
|
@@ -1,52 +0,0 @@
|
||||
// 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
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_VIEWS_CEF_FILL_LAYOUT_H_
|
||||
#define CEF_INCLUDE_VIEWS_CEF_FILL_LAYOUT_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/views/cef_layout.h"
|
||||
|
||||
///
|
||||
// A simple Layout that causes the associated Panel's one child to be sized to
|
||||
// match the bounds of its parent. Methods must be called on the browser process
|
||||
// UI thread unless otherwise indicated.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefFillLayout : public CefLayout {
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_VIEWS_CEF_FILL_LAYOUT_H_
|
@@ -1,152 +0,0 @@
|
||||
// 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
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_VIEWS_CEF_LABEL_BUTTON_H_
|
||||
#define CEF_INCLUDE_VIEWS_CEF_LABEL_BUTTON_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_image.h"
|
||||
#include "include/views/cef_button.h"
|
||||
#include "include/views/cef_button_delegate.h"
|
||||
|
||||
class CefMenuButton;
|
||||
|
||||
///
|
||||
// LabelButton is a button with optional text and/or icon. Methods must be
|
||||
// called on the browser process UI thread unless otherwise indicated.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefLabelButton : public CefButton {
|
||||
public:
|
||||
///
|
||||
// Create a new LabelButton. A |delegate| must be provided to handle the
|
||||
// button click. |text| will be shown on the LabelButton and used as the
|
||||
// default accessible name. If |with_frame| is true the button will have a
|
||||
// visible frame at all times, center alignment, additional padding and a
|
||||
// default minimum size of 70x33 DIP. If |with_frame| is false the button will
|
||||
// only have a visible frame on hover/press, left alignment, less padding and
|
||||
// no default minimum size.
|
||||
///
|
||||
/*--cef(optional_param=text)--*/
|
||||
static CefRefPtr<CefLabelButton> CreateLabelButton(
|
||||
CefRefPtr<CefButtonDelegate> delegate,
|
||||
const CefString& text,
|
||||
bool with_frame);
|
||||
|
||||
///
|
||||
// Returns this LabelButton as a MenuButton or NULL if this is not a
|
||||
// MenuButton.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefMenuButton> AsMenuButton() =0;
|
||||
|
||||
///
|
||||
// Sets the text shown on the LabelButton. By default |text| will also be used
|
||||
// as the accessible name.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetText(const CefString& text) =0;
|
||||
|
||||
///
|
||||
// Returns the text shown on the LabelButton.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetText() =0;
|
||||
|
||||
///
|
||||
// Sets the image shown for |button_state|. When this Button is drawn if no
|
||||
// image exists for the current state then the image for
|
||||
// CEF_BUTTON_STATE_NORMAL, if any, will be shown.
|
||||
///
|
||||
/*--cef(optional_param=image)--*/
|
||||
virtual void SetImage(cef_button_state_t button_state,
|
||||
CefRefPtr<CefImage> image) =0;
|
||||
|
||||
///
|
||||
// Returns the image shown for |button_state|. If no image exists for that
|
||||
// state then the image for CEF_BUTTON_STATE_NORMAL will be returned.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefImage> GetImage(cef_button_state_t button_state) =0;
|
||||
|
||||
///
|
||||
// Sets the text color shown for the specified button |for_state| to |color|.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetTextColor(cef_button_state_t for_state, cef_color_t color) =0;
|
||||
|
||||
///
|
||||
// Sets the text colors shown for the non-disabled states to |color|.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetEnabledTextColors(cef_color_t color) =0;
|
||||
|
||||
///
|
||||
// Sets the font list. The format is "<FONT_FAMILY_LIST>,[STYLES] <SIZE>",
|
||||
// where:
|
||||
// - FONT_FAMILY_LIST is a comma-separated list of font family names,
|
||||
// - STYLES is an optional space-separated list of style names (case-sensitive
|
||||
// "Bold" and "Italic" are supported), and
|
||||
// - SIZE is an integer font size in pixels with the suffix "px".
|
||||
//
|
||||
// Here are examples of valid font description strings:
|
||||
// - "Arial, Helvetica, Bold Italic 14px"
|
||||
// - "Arial, 14px"
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetFontList(const CefString& font_list) =0;
|
||||
|
||||
///
|
||||
// Sets the horizontal alignment; reversed in RTL. Default is
|
||||
// CEF_HORIZONTAL_ALIGNMENT_CENTER.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetHorizontalAlignment(cef_horizontal_alignment_t alignment) =0;
|
||||
|
||||
///
|
||||
// Reset the minimum size of this LabelButton to |size|.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetMinimumSize(const CefSize& size) =0;
|
||||
|
||||
///
|
||||
// Reset the maximum size of this LabelButton to |size|.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetMaximumSize(const CefSize& size) =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_VIEWS_CEF_LABEL_BUTTON_H_
|
@@ -1,73 +0,0 @@
|
||||
// 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
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_VIEWS_CEF_LAYOUT_H_
|
||||
#define CEF_INCLUDE_VIEWS_CEF_LAYOUT_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
|
||||
class CefBoxLayout;
|
||||
class CefFillLayout;
|
||||
|
||||
///
|
||||
// A Layout handles the sizing of the children of a Panel according to
|
||||
// implementation-specific heuristics. Methods must be called on the browser
|
||||
// process UI thread unless otherwise indicated.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefLayout : public CefBase {
|
||||
public:
|
||||
///
|
||||
// Returns this Layout as a BoxLayout or NULL if this is not a BoxLayout.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefBoxLayout> AsBoxLayout() =0;
|
||||
|
||||
///
|
||||
// Returns this Layout as a FillLayout or NULL if this is not a FillLayout.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefFillLayout> AsFillLayout() =0;
|
||||
|
||||
///
|
||||
// Returns true if this Layout is valid.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsValid() =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_VIEWS_CEF_LAYOUT_H_
|
@@ -1,83 +0,0 @@
|
||||
// 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
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_VIEWS_CEF_MENU_BUTTON_H_
|
||||
#define CEF_INCLUDE_VIEWS_CEF_MENU_BUTTON_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_menu_model.h"
|
||||
#include "include/views/cef_label_button.h"
|
||||
#include "include/views/cef_menu_button_delegate.h"
|
||||
|
||||
///
|
||||
// MenuButton is a button with optional text, icon and/or menu marker that shows
|
||||
// a menu when clicked with the left mouse button. All size and position values
|
||||
// are in density independent pixels (DIP) unless otherwise indicated. Methods
|
||||
// must be called on the browser process UI thread unless otherwise indicated.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefMenuButton : public CefLabelButton {
|
||||
public:
|
||||
///
|
||||
// Create a new MenuButton. A |delegate| must be provided to call ShowMenu()
|
||||
// when the button is clicked. |text| will be shown on the MenuButton and used
|
||||
// as the default accessible name. If |with_frame| is true the button will
|
||||
// have a visible frame at all times, center alignment, additional padding and
|
||||
// a default minimum size of 70x33 DIP. If |with_frame| is false the button
|
||||
// will only have a visible frame on hover/press, left alignment, less padding
|
||||
// and no default minimum size. If |with_menu_marker| is true a menu marker
|
||||
// will be added to the button.
|
||||
///
|
||||
/*--cef(optional_param=text)--*/
|
||||
static CefRefPtr<CefMenuButton> CreateMenuButton(
|
||||
CefRefPtr<CefMenuButtonDelegate> delegate,
|
||||
const CefString& text,
|
||||
bool with_frame,
|
||||
bool with_menu_marker);
|
||||
|
||||
///
|
||||
// Show a menu with contents |menu_model|. |screen_point| specifies the menu
|
||||
// position in screen coordinates. |anchor_position| specifies how the menu
|
||||
// will be anchored relative to |screen_point|. This method should be called
|
||||
// from CefMenuButtonDelegate::OnMenuButtonPressed().
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void ShowMenu(CefRefPtr<CefMenuModel> menu_model,
|
||||
const CefPoint& screen_point,
|
||||
cef_menu_anchor_position_t anchor_position) =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_VIEWS_CEF_MENU_BUTTON_H_
|
@@ -1,62 +0,0 @@
|
||||
// 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
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_VIEWS_CEF_MENU_BUTTON_DELEGATE_H_
|
||||
#define CEF_INCLUDE_VIEWS_CEF_MENU_BUTTON_DELEGATE_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/views/cef_button_delegate.h"
|
||||
|
||||
class CefMenuButton;
|
||||
|
||||
///
|
||||
// Implement this interface to handle MenuButton events. The methods of this
|
||||
// class will be called on the browser process UI thread unless otherwise
|
||||
// indicated.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefMenuButtonDelegate : public CefButtonDelegate {
|
||||
public:
|
||||
///
|
||||
// Called when |button| is pressed. Call CefMenuButton::ShowMenu() to show the
|
||||
// resulting menu at |screen_point|.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnMenuButtonPressed(CefRefPtr<CefMenuButton> menu_button,
|
||||
const CefPoint& screen_point) =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_VIEWS_CEF_MENU_BUTTON_DELEGATE_H_
|
@@ -1,143 +0,0 @@
|
||||
// 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
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_VIEWS_CEF_PANEL_H_
|
||||
#define CEF_INCLUDE_VIEWS_CEF_PANEL_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/views/cef_view.h"
|
||||
#include "include/views/cef_panel_delegate.h"
|
||||
|
||||
class CefBoxLayout;
|
||||
class CefFillLayout;
|
||||
class CefLayout;
|
||||
class CefWindow;
|
||||
|
||||
///
|
||||
// A Panel is a container in the views hierarchy that can contain other Views
|
||||
// as children. Methods must be called on the browser process UI thread unless
|
||||
// otherwise indicated.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefPanel : public CefView {
|
||||
public:
|
||||
///
|
||||
// Create a new Panel.
|
||||
///
|
||||
/*--cef(optional_param=delegate)--*/
|
||||
static CefRefPtr<CefPanel> CreatePanel(CefRefPtr<CefPanelDelegate> delegate);
|
||||
|
||||
///
|
||||
// Returns this Panel as a Window or NULL if this is not a Window.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefWindow> AsWindow() =0;
|
||||
|
||||
///
|
||||
// Set this Panel's Layout to FillLayout and return the FillLayout object.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefFillLayout> SetToFillLayout() =0;
|
||||
|
||||
///
|
||||
// Set this Panel's Layout to BoxLayout and return the BoxLayout object.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefBoxLayout> SetToBoxLayout(
|
||||
const CefBoxLayoutSettings& settings) =0;
|
||||
|
||||
///
|
||||
// Get the Layout.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefLayout> GetLayout() =0;
|
||||
|
||||
///
|
||||
// Lay out the child Views (set their bounds based on sizing heuristics
|
||||
// specific to the current Layout).
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void Layout() =0;
|
||||
|
||||
///
|
||||
// Add a child View.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void AddChildView(CefRefPtr<CefView> view) =0;
|
||||
|
||||
///
|
||||
// Add a child View at the specified |index|. If |index| matches the result of
|
||||
// GetChildCount() then the View will be added at the end.
|
||||
///
|
||||
/*--cef(index_param=index)--*/
|
||||
virtual void AddChildViewAt(CefRefPtr<CefView> view,
|
||||
int index) =0;
|
||||
|
||||
///
|
||||
// Move the child View to the specified |index|. A negative value for |index|
|
||||
// will move the View to the end.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void ReorderChildView(CefRefPtr<CefView> view,
|
||||
int index) =0;
|
||||
|
||||
///
|
||||
// Remove a child View. The View can then be added to another Panel.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void RemoveChildView(CefRefPtr<CefView> view) =0;
|
||||
|
||||
///
|
||||
// Remove all child Views. The removed Views will be deleted if the client
|
||||
// holds no references to them.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void RemoveAllChildViews() =0;
|
||||
|
||||
///
|
||||
// Returns the number of child Views.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual size_t GetChildViewCount() =0;
|
||||
|
||||
///
|
||||
// Returns the child View at the specified |index|.
|
||||
///
|
||||
/*--cef(index_param=index)--*/
|
||||
virtual CefRefPtr<CefView> GetChildViewAt(int index) =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_VIEWS_CEF_PANEL_H_
|
@@ -1,51 +0,0 @@
|
||||
// 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
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_VIEWS_CEF_PANEL_DELEGATE_H_
|
||||
#define CEF_INCLUDE_VIEWS_CEF_PANEL_DELEGATE_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/views/cef_view_delegate.h"
|
||||
|
||||
///
|
||||
// Implement this interface to handle Panel events. The methods of this class
|
||||
// will be called on the browser process UI thread unless otherwise indicated.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefPanelDelegate : public CefViewDelegate {
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_VIEWS_CEF_PANEL_DELEGATE_H_
|
@@ -1,102 +0,0 @@
|
||||
// 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
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_VIEWS_CEF_SCROLL_VIEW_H_
|
||||
#define CEF_INCLUDE_VIEWS_CEF_SCROLL_VIEW_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/views/cef_view.h"
|
||||
|
||||
///
|
||||
// A ScrollView will show horizontal and/or vertical scrollbars when necessary
|
||||
// based on the size of the attached content view. Methods must be called on the
|
||||
// browser process UI thread unless otherwise indicated.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefScrollView : public CefView {
|
||||
public:
|
||||
///
|
||||
// Create a new ScrollView.
|
||||
///
|
||||
/*--cef(optional_param=delegate)--*/
|
||||
static CefRefPtr<CefScrollView> CreateScrollView(
|
||||
CefRefPtr<CefViewDelegate> delegate);
|
||||
|
||||
///
|
||||
// Set the content View. The content View must have a specified size (e.g.
|
||||
// via CefView::SetBounds or CefViewDelegate::GetPreferredSize).
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetContentView(CefRefPtr<CefView> view) =0;
|
||||
|
||||
///
|
||||
// Returns the content View.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefView> GetContentView() =0;
|
||||
|
||||
///
|
||||
// Returns the visible region of the content View.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRect GetVisibleContentRect() =0;
|
||||
|
||||
///
|
||||
// Returns true if the horizontal scrollbar is currently showing.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool HasHorizontalScrollbar() =0;
|
||||
|
||||
///
|
||||
// Returns the height of the horizontal scrollbar.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetHorizontalScrollbarHeight() =0;
|
||||
|
||||
///
|
||||
// Returns true if the vertical scrollbar is currently showing.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool HasVerticalScrollbar() =0;
|
||||
|
||||
///
|
||||
// Returns the width of the vertical scrollbar.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetVerticalScrollbarWidth() =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_VIEWS_CEF_SCROLL_VIEW_H_
|
@@ -1,278 +0,0 @@
|
||||
// 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
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_VIEWS_CEF_TEXTFIELD_H_
|
||||
#define CEF_INCLUDE_VIEWS_CEF_TEXTFIELD_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/views/cef_view.h"
|
||||
#include "include/views/cef_textfield_delegate.h"
|
||||
|
||||
///
|
||||
// A Textfield supports editing of text. This control is custom rendered with no
|
||||
// platform-specific code. Methods must be called on the browser process UI
|
||||
// thread unless otherwise indicated.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefTextfield : public CefView {
|
||||
public:
|
||||
///
|
||||
// Create a new Textfield.
|
||||
///
|
||||
/*--cef(optional_param=delegate)--*/
|
||||
static CefRefPtr<CefTextfield> CreateTextfield(
|
||||
CefRefPtr<CefTextfieldDelegate> delegate);
|
||||
|
||||
///
|
||||
// Sets whether the text will be displayed as asterisks.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetPasswordInput(bool password_input) =0;
|
||||
|
||||
///
|
||||
// Returns true if the text will be displayed as asterisks.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsPasswordInput() =0;
|
||||
|
||||
///
|
||||
// Sets whether the text will read-only.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetReadOnly(bool read_only) =0;
|
||||
|
||||
///
|
||||
// Returns true if the text is read-only.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsReadOnly() =0;
|
||||
|
||||
///
|
||||
// Returns the currently displayed text.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetText() =0;
|
||||
|
||||
///
|
||||
// Sets the contents to |text|. The cursor will be moved to end of the text if
|
||||
// the current position is outside of the text range.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetText(const CefString& text) =0;
|
||||
|
||||
///
|
||||
// Appends |text| to the previously-existing text.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void AppendText(const CefString& text) =0;
|
||||
|
||||
///
|
||||
// Inserts |text| at the current cursor position replacing any selected text.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void InsertOrReplaceText(const CefString& text) =0;
|
||||
|
||||
///
|
||||
// Returns true if there is any selected text.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool HasSelection() =0;
|
||||
|
||||
///
|
||||
// Returns the currently selected text.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetSelectedText() =0;
|
||||
|
||||
///
|
||||
// Selects all text. If |reversed| is true the range will end at the logical
|
||||
// beginning of the text; this generally shows the leading portion of text
|
||||
// that overflows its display area.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SelectAll(bool reversed) =0;
|
||||
|
||||
///
|
||||
// Clears the text selection and sets the caret to the end.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void ClearSelection() =0;
|
||||
|
||||
///
|
||||
// Returns the selected logical text range.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRange GetSelectedRange() =0;
|
||||
|
||||
///
|
||||
// Selects the specified logical text range.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SelectRange(const CefRange& range) =0;
|
||||
|
||||
///
|
||||
// Returns the current cursor position.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual size_t GetCursorPosition() =0;
|
||||
|
||||
///
|
||||
// Sets the text color.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetTextColor(cef_color_t color) =0;
|
||||
|
||||
///
|
||||
// Returns the text color.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual cef_color_t GetTextColor() =0;
|
||||
|
||||
///
|
||||
// Sets the selection text color.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetSelectionTextColor(cef_color_t color) =0;
|
||||
|
||||
///
|
||||
// Returns the selection text color.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual cef_color_t GetSelectionTextColor() =0;
|
||||
|
||||
///
|
||||
// Sets the selection background color.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetSelectionBackgroundColor(cef_color_t color) =0;
|
||||
|
||||
///
|
||||
// Returns the selection background color.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual cef_color_t GetSelectionBackgroundColor() =0;
|
||||
|
||||
///
|
||||
// Sets the font list. The format is "<FONT_FAMILY_LIST>,[STYLES] <SIZE>",
|
||||
// where:
|
||||
// - FONT_FAMILY_LIST is a comma-separated list of font family names,
|
||||
// - STYLES is an optional space-separated list of style names (case-sensitive
|
||||
// "Bold" and "Italic" are supported), and
|
||||
// - SIZE is an integer font size in pixels with the suffix "px".
|
||||
//
|
||||
// Here are examples of valid font description strings:
|
||||
// - "Arial, Helvetica, Bold Italic 14px"
|
||||
// - "Arial, 14px"
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetFontList(const CefString& font_list) =0;
|
||||
|
||||
///
|
||||
// Applies |color| to the specified |range| without changing the default
|
||||
// color. If |range| is empty the color will be set on the complete text
|
||||
// contents.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void ApplyTextColor(cef_color_t color,
|
||||
const CefRange& range) =0;
|
||||
|
||||
///
|
||||
// Applies |style| to the specified |range| without changing the default
|
||||
// style. If |add| is true the style will be added, otherwise the style will
|
||||
// be removed. If |range| is empty the style will be set on the complete text
|
||||
// contents.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void ApplyTextStyle(cef_text_style_t style,
|
||||
bool add,
|
||||
const CefRange& range) =0;
|
||||
|
||||
///
|
||||
// Returns true if the action associated with the specified command id is
|
||||
// enabled. See additional comments on ExecuteCommand().
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsCommandEnabled(int command_id) =0;
|
||||
|
||||
///
|
||||
// Performs the action associated with the specified command id. Valid values
|
||||
// include IDS_APP_UNDO, IDS_APP_REDO, IDS_APP_CUT, IDS_APP_COPY,
|
||||
// IDS_APP_PASTE, IDS_APP_DELETE, IDS_APP_SELECT_ALL, IDS_DELETE_* and
|
||||
// IDS_MOVE_*. See include/cef_pack_strings.h for definitions.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void ExecuteCommand(int command_id) =0;
|
||||
|
||||
///
|
||||
// Clears Edit history.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void ClearEditHistory() =0;
|
||||
|
||||
///
|
||||
// Sets the placeholder text that will be displayed when the Textfield is
|
||||
// empty.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetPlaceholderText(const CefString& text) =0;
|
||||
|
||||
///
|
||||
// Returns the placeholder text that will be displayed when the Textfield is
|
||||
// empty.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetPlaceholderText() =0;
|
||||
|
||||
///
|
||||
// Sets the placeholder text color.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetPlaceholderTextColor(cef_color_t color) =0;
|
||||
|
||||
///
|
||||
// Returns the placeholder text color.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual cef_color_t GetPlaceholderTextColor() =0;
|
||||
|
||||
///
|
||||
// Set the accessible name that will be exposed to assistive technology (AT).
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetAccessibleName(const CefString& name) =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_VIEWS_CEF_TEXTFIELD_H_
|
@@ -1,69 +0,0 @@
|
||||
// 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
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_VIEWS_CEF_TEXTFIELD_DELEGATE_H_
|
||||
#define CEF_INCLUDE_VIEWS_CEF_TEXTFIELD_DELEGATE_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/views/cef_view_delegate.h"
|
||||
|
||||
class CefTextfield;
|
||||
|
||||
///
|
||||
// Implement this interface to handle Textfield events. The methods of this
|
||||
// class will be called on the browser process UI thread unless otherwise
|
||||
// indicated.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefTextfieldDelegate : public CefViewDelegate {
|
||||
public:
|
||||
///
|
||||
// Called when |textfield| recieves a keyboard event. |event| contains
|
||||
// information about the keyboard event. Return true if the keyboard event was
|
||||
// handled or false otherwise for default handling.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool OnKeyEvent(CefRefPtr<CefTextfield> textfield,
|
||||
const CefKeyEvent& event) { return false; }
|
||||
|
||||
///
|
||||
// Called after performing a user action that may change |textfield|.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnAfterUserAction(CefRefPtr<CefTextfield> textfield) {}
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_VIEWS_CEF_TEXTFIELD_DELEGATE_H_
|
@@ -1,388 +0,0 @@
|
||||
// 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
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_VIEWS_CEF_VIEW_H_
|
||||
#define CEF_INCLUDE_VIEWS_CEF_VIEW_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/views/cef_view_delegate.h"
|
||||
|
||||
class CefBrowserView;
|
||||
class CefButton;
|
||||
class CefPanel;
|
||||
class CefScrollView;
|
||||
class CefTextfield;
|
||||
class CefWindow;
|
||||
|
||||
///
|
||||
// A View is a rectangle within the views View hierarchy. It is the base class
|
||||
// for all Views. All size and position values are in density independent pixels
|
||||
// (DIP) unless otherwise indicated. Methods must be called on the browser
|
||||
// process UI thread unless otherwise indicated.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefView : public CefBase {
|
||||
public:
|
||||
///
|
||||
// Returns this View as a BrowserView or NULL if this is not a BrowserView.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefBrowserView> AsBrowserView() =0;
|
||||
|
||||
///
|
||||
// Returns this View as a Button or NULL if this is not a Button.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefButton> AsButton() =0;
|
||||
|
||||
///
|
||||
// Returns this View as a Panel or NULL if this is not a Panel.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefPanel> AsPanel() =0;
|
||||
|
||||
///
|
||||
// Returns this View as a ScrollView or NULL if this is not a ScrollView.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefScrollView> AsScrollView() =0;
|
||||
|
||||
///
|
||||
// Returns this View as a Textfield or NULL if this is not a Textfield.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefTextfield> AsTextfield() =0;
|
||||
|
||||
///
|
||||
// Returns the type of this View as a string. Used primarily for testing
|
||||
// purposes.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetTypeString() =0;
|
||||
|
||||
///
|
||||
// Returns a string representation of this View which includes the type and
|
||||
// various type-specific identifying attributes. If |include_children| is true
|
||||
// any child Views will also be included. Used primarily for testing purposes.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString ToString(bool include_children) =0;
|
||||
|
||||
///
|
||||
// Returns true if this View is valid.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsValid() =0;
|
||||
|
||||
///
|
||||
// Returns true if this View is currently attached to another View. A View can
|
||||
// only be attached to one View at a time.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsAttached() =0;
|
||||
|
||||
///
|
||||
// Returns true if this View is the same as |that| View.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsSame(CefRefPtr<CefView> that) =0;
|
||||
|
||||
///
|
||||
// Returns the delegate associated with this View, if any.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefViewDelegate> GetDelegate() =0;
|
||||
|
||||
///
|
||||
// Returns the top-level Window hosting this View, if any.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefWindow> GetWindow() =0;
|
||||
|
||||
///
|
||||
// Returns the ID for this View.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetID() =0;
|
||||
|
||||
///
|
||||
// Sets the ID for this View. ID should be unique within the subtree that you
|
||||
// intend to search for it. 0 is the default ID for views.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetID(int id) =0;
|
||||
|
||||
///
|
||||
// Returns the View that contains this View, if any.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefView> GetParentView() =0;
|
||||
|
||||
///
|
||||
// Recursively descends the view tree starting at this View, and returns the
|
||||
// first child that it encounters with the given ID. Returns NULL if no
|
||||
// matching child view is found.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefView> GetViewForID(int id) =0;
|
||||
|
||||
///
|
||||
// Sets the bounds (size and position) of this View. Position is in parent
|
||||
// coordinates.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetBounds(const CefRect& bounds) =0;
|
||||
|
||||
///
|
||||
// Returns the bounds (size and position) of this View. Position is in parent
|
||||
// coordinates.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRect GetBounds() =0;
|
||||
|
||||
///
|
||||
// Returns the bounds (size and position) of this View. Position is in screen
|
||||
// coordinates.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRect GetBoundsInScreen() =0;
|
||||
|
||||
///
|
||||
// Sets the size of this View without changing the position.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetSize(const CefSize& size) =0;
|
||||
|
||||
///
|
||||
// Returns the size of this View.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefSize GetSize() =0;
|
||||
|
||||
///
|
||||
// Sets the position of this View without changing the size. |position| is in
|
||||
// parent coordinates.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetPosition(const CefPoint& position) =0;
|
||||
|
||||
///
|
||||
// Returns the position of this View. Position is in parent coordinates.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefPoint GetPosition() =0;
|
||||
|
||||
///
|
||||
// Returns the size this View would like to be if enough space is available.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefSize GetPreferredSize() =0;
|
||||
|
||||
///
|
||||
// Size this View to its preferred size.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SizeToPreferredSize() =0;
|
||||
|
||||
///
|
||||
// Returns the minimum size for this View.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefSize GetMinimumSize() =0;
|
||||
|
||||
///
|
||||
// Returns the maximum size for this View.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefSize GetMaximumSize() =0;
|
||||
|
||||
///
|
||||
// Returns the height necessary to display this View with the provided width.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetHeightForWidth(int width) =0;
|
||||
|
||||
///
|
||||
// Indicate that this View and all parent Views require a re-layout. This
|
||||
// ensures the next call to Layout() will propagate to this View even if the
|
||||
// bounds of parent Views do not change.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void InvalidateLayout() =0;
|
||||
|
||||
///
|
||||
// Sets whether this View is visible. Windows are hidden by default and other
|
||||
// views are visible by default. This View and any parent views must be set as
|
||||
// visible for this View to be drawn in a Window. If this View is set as
|
||||
// hidden then it and any child views will not be drawn and, if any of those
|
||||
// views currently have focus, then focus will also be cleared. Painting is
|
||||
// scheduled as needed. If this View is a Window then calling this method is
|
||||
// equivalent to calling the Window Show() and Hide() methods.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetVisible(bool visible) =0;
|
||||
|
||||
///
|
||||
// Returns whether this View is visible. A view may be visible but still not
|
||||
// drawn in a Window if any parent views are hidden. If this View is a Window
|
||||
// then a return value of true indicates that this Window is currently visible
|
||||
// to the user on-screen. If this View is not a Window then call IsDrawn() to
|
||||
// determine whether this View and all parent views are visible and will be
|
||||
// drawn.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsVisible() =0;
|
||||
|
||||
///
|
||||
// Returns whether this View is visible and drawn in a Window. A view is drawn
|
||||
// if it and all parent views are visible. If this View is a Window then
|
||||
// calling this method is equivalent to calling IsVisible(). Otherwise, to
|
||||
// determine if the containing Window is visible to the user on-screen call
|
||||
// IsVisible() on the Window.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsDrawn() =0;
|
||||
|
||||
///
|
||||
// Set whether this View is enabled. A disabled View does not receive keyboard
|
||||
// or mouse inputs. If |enabled| differs from the current value the View will
|
||||
// be repainted. Also, clears focus if the focused View is disabled.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetEnabled(bool enabled) =0;
|
||||
|
||||
///
|
||||
// Returns whether this View is enabled.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsEnabled() =0;
|
||||
|
||||
///
|
||||
// Sets whether this View is capable of taking focus. It will clear focus if
|
||||
// the focused View is set to be non-focusable. This is false by default so
|
||||
// that a View used as a container does not get the focus.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetFocusable(bool focusable) =0;
|
||||
|
||||
///
|
||||
// Returns true if this View is focusable, enabled and drawn.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsFocusable() =0;
|
||||
|
||||
///
|
||||
// Return whether this View is focusable when the user requires full keyboard
|
||||
// access, even though it may not be normally focusable.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsAccessibilityFocusable() =0;
|
||||
|
||||
///
|
||||
// Request keyboard focus. If this View is focusable it will become the
|
||||
// focused View.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void RequestFocus() =0;
|
||||
|
||||
///
|
||||
// Sets the background color for this View.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetBackgroundColor(cef_color_t color) =0;
|
||||
|
||||
///
|
||||
// Returns the background color for this View.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual cef_color_t GetBackgroundColor() =0;
|
||||
|
||||
///
|
||||
// Convert |point| from this View's coordinate system to that of the screen.
|
||||
// This View must belong to a Window when calling this method. Returns true
|
||||
// if the conversion is successful or false otherwise. Use
|
||||
// CefDisplay::ConvertPointToPixels() after calling this method if further
|
||||
// conversion to display-specific pixel coordinates is desired.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool ConvertPointToScreen(CefPoint& point) =0;
|
||||
|
||||
///
|
||||
// Convert |point| to this View's coordinate system from that of the screen.
|
||||
// This View must belong to a Window when calling this method. Returns true if
|
||||
// the conversion is successful or false otherwise. Use
|
||||
// CefDisplay::ConvertPointFromPixels() before calling this method if
|
||||
// conversion from display-specific pixel coordinates is necessary.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool ConvertPointFromScreen(CefPoint& point) =0;
|
||||
|
||||
///
|
||||
// Convert |point| from this View's coordinate system to that of the Window.
|
||||
// This View must belong to a Window when calling this method. Returns true if
|
||||
// the conversion is successful or false otherwise.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool ConvertPointToWindow(CefPoint& point) =0;
|
||||
|
||||
///
|
||||
// Convert |point| to this View's coordinate system from that of the Window.
|
||||
// This View must belong to a Window when calling this method. Returns true if
|
||||
// the conversion is successful or false otherwise.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool ConvertPointFromWindow(CefPoint& point) =0;
|
||||
|
||||
///
|
||||
// Convert |point| from this View's coordinate system to that of |view|.
|
||||
// |view| needs to be in the same Window but not necessarily the same view
|
||||
// hierarchy. Returns true if the conversion is successful or false otherwise.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool ConvertPointToView(CefRefPtr<CefView> view,
|
||||
CefPoint& point) =0;
|
||||
|
||||
///
|
||||
// Convert |point| to this View's coordinate system from that |view|. |view|
|
||||
// needs to be in the same Window but not necessarily the same view hierarchy.
|
||||
// Returns true if the conversion is successful or false otherwise.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool ConvertPointFromView(CefRefPtr<CefView> view,
|
||||
CefPoint& point) =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_VIEWS_CEF_VIEW_H_
|
@@ -1,113 +0,0 @@
|
||||
// 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
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_VIEWS_CEF_VIEW_DELEGATE_H_
|
||||
#define CEF_INCLUDE_VIEWS_CEF_VIEW_DELEGATE_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
|
||||
class CefView;
|
||||
|
||||
///
|
||||
// Implement this interface to handle view events. The methods of this class
|
||||
// will be called on the browser process UI thread unless otherwise indicated.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefViewDelegate : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Return the preferred size for |view|. The Layout will use this information
|
||||
// to determine the display size.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefSize GetPreferredSize(CefRefPtr<CefView> view) {
|
||||
return CefSize();
|
||||
}
|
||||
|
||||
///
|
||||
// Return the minimum size for |view|.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefSize GetMinimumSize(CefRefPtr<CefView> view) {
|
||||
return CefSize();
|
||||
}
|
||||
|
||||
///
|
||||
// Return the maximum size for |view|.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefSize GetMaximumSize(CefRefPtr<CefView> view) {
|
||||
return CefSize();
|
||||
}
|
||||
|
||||
///
|
||||
// Return the height necessary to display |view| with the provided |width|.
|
||||
// If not specified the result of GetPreferredSize().height will be used by
|
||||
// default. Override if |view|'s preferred height depends upon the width
|
||||
// (for example, with Labels).
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetHeightForWidth(CefRefPtr<CefView> view, int width) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
///
|
||||
// Called when the parent of |view| has changed. If |view| is being added to
|
||||
// |parent| then |added| will be true. If |view| is being removed from
|
||||
// |parent| then |added| will be false. If |view| is being reparented the
|
||||
// remove notification will be sent before the add notification. Do not modify
|
||||
// the view hierarchy in this callback.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnParentViewChanged(CefRefPtr<CefView> view,
|
||||
bool added,
|
||||
CefRefPtr<CefView> parent) {}
|
||||
|
||||
///
|
||||
// Called when a child of |view| has changed. If |child| is being added to
|
||||
// |view| then |added| will be true. If |child| is being removed from |view|
|
||||
// then |added| will be false. If |child| is being reparented the remove
|
||||
// notification will be sent to the old parent before the add notification is
|
||||
// sent to the new parent. Do not modify the view hierarchy in this callback.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnChildViewChanged(CefRefPtr<CefView> view,
|
||||
bool added,
|
||||
CefRefPtr<CefView> child) {}
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_VIEWS_CEF_WINDOW_DELEGATE_H_
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user