diff --git a/.cmake/conan.cmake b/.cmake/conan.cmake new file mode 100644 index 00000000..74de4ea4 --- /dev/null +++ b/.cmake/conan.cmake @@ -0,0 +1,1026 @@ +# The MIT License (MIT) + +# Copyright (c) 2018 JFrog + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + + + +# This file comes from: https://github.com/conan-io/cmake-conan. Please refer +# to this repository for issues and documentation. + +# Its purpose is to wrap and launch Conan C/C++ Package Manager when cmake is called. +# It will take CMake current settings (os, compiler, compiler version, architecture) +# and translate them to conan settings for installing and retrieving dependencies. + +# It is intended to facilitate developers building projects that have conan dependencies, +# but it is only necessary on the end-user side. It is not necessary to create conan +# packages, in fact it shouldn't be use for that. Check the project documentation. + +# version: 0.18.1 + +include(CMakeParseArguments) + +function(_get_msvc_ide_version result) + set(${result} "" PARENT_SCOPE) + if(NOT MSVC_VERSION VERSION_LESS 1400 AND MSVC_VERSION VERSION_LESS 1500) + set(${result} 8 PARENT_SCOPE) + elseif(NOT MSVC_VERSION VERSION_LESS 1500 AND MSVC_VERSION VERSION_LESS 1600) + set(${result} 9 PARENT_SCOPE) + elseif(NOT MSVC_VERSION VERSION_LESS 1600 AND MSVC_VERSION VERSION_LESS 1700) + set(${result} 10 PARENT_SCOPE) + elseif(NOT MSVC_VERSION VERSION_LESS 1700 AND MSVC_VERSION VERSION_LESS 1800) + set(${result} 11 PARENT_SCOPE) + elseif(NOT MSVC_VERSION VERSION_LESS 1800 AND MSVC_VERSION VERSION_LESS 1900) + set(${result} 12 PARENT_SCOPE) + elseif(NOT MSVC_VERSION VERSION_LESS 1900 AND MSVC_VERSION VERSION_LESS 1910) + set(${result} 14 PARENT_SCOPE) + elseif(NOT MSVC_VERSION VERSION_LESS 1910 AND MSVC_VERSION VERSION_LESS 1920) + set(${result} 15 PARENT_SCOPE) + elseif(NOT MSVC_VERSION VERSION_LESS 1920 AND MSVC_VERSION VERSION_LESS 1930) + set(${result} 16 PARENT_SCOPE) + elseif(NOT MSVC_VERSION VERSION_LESS 1930 AND MSVC_VERSION VERSION_LESS 1942) + set(${result} 17 PARENT_SCOPE) + else() + message(FATAL_ERROR "Conan: Unknown MSVC compiler version [${MSVC_VERSION}]") + endif() +endfunction() + +macro(_conan_detect_build_type) + conan_parse_arguments(${ARGV}) + + if(ARGUMENTS_BUILD_TYPE) + set(_CONAN_SETTING_BUILD_TYPE ${ARGUMENTS_BUILD_TYPE}) + elseif(CMAKE_BUILD_TYPE) + set(_CONAN_SETTING_BUILD_TYPE ${CMAKE_BUILD_TYPE}) + else() + message(FATAL_ERROR "Please specify in command line CMAKE_BUILD_TYPE (-DCMAKE_BUILD_TYPE=Release)") + endif() + + string(TOUPPER ${_CONAN_SETTING_BUILD_TYPE} _CONAN_SETTING_BUILD_TYPE_UPPER) + if (_CONAN_SETTING_BUILD_TYPE_UPPER STREQUAL "DEBUG") + set(_CONAN_SETTING_BUILD_TYPE "Debug") + elseif(_CONAN_SETTING_BUILD_TYPE_UPPER STREQUAL "RELEASE") + set(_CONAN_SETTING_BUILD_TYPE "Release") + elseif(_CONAN_SETTING_BUILD_TYPE_UPPER STREQUAL "RELWITHDEBINFO") + set(_CONAN_SETTING_BUILD_TYPE "RelWithDebInfo") + elseif(_CONAN_SETTING_BUILD_TYPE_UPPER STREQUAL "MINSIZEREL") + set(_CONAN_SETTING_BUILD_TYPE "MinSizeRel") + endif() +endmacro() + +macro(_conan_check_system_name) + #handle -s os setting + if(CMAKE_SYSTEM_NAME AND NOT CMAKE_SYSTEM_NAME STREQUAL "Generic") + #use default conan os setting if CMAKE_SYSTEM_NAME is not defined + set(CONAN_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}) + if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + set(CONAN_SYSTEM_NAME Macos) + endif() + if(${CMAKE_SYSTEM_NAME} STREQUAL "QNX") + set(CONAN_SYSTEM_NAME Neutrino) + endif() + set(CONAN_SUPPORTED_PLATFORMS Windows Linux Macos Android iOS FreeBSD WindowsStore WindowsCE watchOS tvOS FreeBSD SunOS AIX Arduino Emscripten Neutrino) + list (FIND CONAN_SUPPORTED_PLATFORMS "${CONAN_SYSTEM_NAME}" _index) + if (${_index} GREATER -1) + #check if the cmake system is a conan supported one + set(_CONAN_SETTING_OS ${CONAN_SYSTEM_NAME}) + else() + message(FATAL_ERROR "cmake system ${CONAN_SYSTEM_NAME} is not supported by conan. Use one of ${CONAN_SUPPORTED_PLATFORMS}") + endif() + endif() +endmacro() + +macro(_conan_check_language) + get_property(_languages GLOBAL PROPERTY ENABLED_LANGUAGES) + if (";${_languages};" MATCHES ";CXX;") + set(LANGUAGE CXX) + set(USING_CXX 1) + elseif (";${_languages};" MATCHES ";C;") + set(LANGUAGE C) + set(USING_CXX 0) + else () + message(FATAL_ERROR "Conan: Neither C or C++ was detected as a language for the project. Unabled to detect compiler version.") + endif() +endmacro() + +macro(_conan_detect_compiler) + + conan_parse_arguments(${ARGV}) + + if(ARGUMENTS_ARCH) + set(_CONAN_SETTING_ARCH ${ARGUMENTS_ARCH}) + endif() + + if(USING_CXX) + set(_CONAN_SETTING_COMPILER_CPPSTD ${CMAKE_CXX_STANDARD}) + endif() + + if (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL GNU) + # using GCC + # TODO: Handle other params + string(REPLACE "." ";" VERSION_LIST ${CMAKE_${LANGUAGE}_COMPILER_VERSION}) + list(GET VERSION_LIST 0 MAJOR) + list(GET VERSION_LIST 1 MINOR) + set(COMPILER_VERSION ${MAJOR}.${MINOR}) + if(${MAJOR} GREATER 4) + set(COMPILER_VERSION ${MAJOR}) + endif() + set(_CONAN_SETTING_COMPILER gcc) + set(_CONAN_SETTING_COMPILER_VERSION ${COMPILER_VERSION}) + if (USING_CXX) + conan_cmake_detect_unix_libcxx(_LIBCXX) + set(_CONAN_SETTING_COMPILER_LIBCXX ${_LIBCXX}) + endif () + elseif (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL Intel) + string(REPLACE "." ";" VERSION_LIST ${CMAKE_${LANGUAGE}_COMPILER_VERSION}) + list(GET VERSION_LIST 0 MAJOR) + list(GET VERSION_LIST 1 MINOR) + set(COMPILER_VERSION ${MAJOR}.${MINOR}) + set(_CONAN_SETTING_COMPILER intel) + set(_CONAN_SETTING_COMPILER_VERSION ${COMPILER_VERSION}) + if (USING_CXX) + conan_cmake_detect_unix_libcxx(_LIBCXX) + set(_CONAN_SETTING_COMPILER_LIBCXX ${_LIBCXX}) + endif () + elseif (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL AppleClang) + # using AppleClang + string(REPLACE "." ";" VERSION_LIST ${CMAKE_${LANGUAGE}_COMPILER_VERSION}) + list(GET VERSION_LIST 0 MAJOR) + list(GET VERSION_LIST 1 MINOR) + set(_CONAN_SETTING_COMPILER apple-clang) + set(_CONAN_SETTING_COMPILER_VERSION ${MAJOR}.${MINOR}) + if (USING_CXX) + conan_cmake_detect_unix_libcxx(_LIBCXX) + set(_CONAN_SETTING_COMPILER_LIBCXX ${_LIBCXX}) + endif () + elseif (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL Clang + AND NOT "${CMAKE_${LANGUAGE}_COMPILER_FRONTEND_VARIANT}" STREQUAL "MSVC" + AND NOT "${CMAKE_${LANGUAGE}_SIMULATE_ID}" STREQUAL "MSVC") + + string(REPLACE "." ";" VERSION_LIST ${CMAKE_${LANGUAGE}_COMPILER_VERSION}) + list(GET VERSION_LIST 0 MAJOR) + list(GET VERSION_LIST 1 MINOR) + set(_CONAN_SETTING_COMPILER clang) + set(_CONAN_SETTING_COMPILER_VERSION ${MAJOR}.${MINOR}) + if(APPLE) + cmake_policy(GET CMP0025 APPLE_CLANG_POLICY) + if(NOT APPLE_CLANG_POLICY STREQUAL NEW) + message(STATUS "Conan: APPLE and Clang detected. Assuming apple-clang compiler. Set CMP0025 to avoid it") + set(_CONAN_SETTING_COMPILER apple-clang) + endif() + endif() + if(${_CONAN_SETTING_COMPILER} STREQUAL clang AND ${MAJOR} GREATER 7) + set(_CONAN_SETTING_COMPILER_VERSION ${MAJOR}) + endif() + if (USING_CXX) + conan_cmake_detect_unix_libcxx(_LIBCXX) + set(_CONAN_SETTING_COMPILER_LIBCXX ${_LIBCXX}) + endif () + elseif(${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL MSVC + OR (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL Clang + AND "${CMAKE_${LANGUAGE}_COMPILER_FRONTEND_VARIANT}" STREQUAL "MSVC" + AND "${CMAKE_${LANGUAGE}_SIMULATE_ID}" STREQUAL "MSVC")) + + set(_VISUAL "Visual Studio") + _get_msvc_ide_version(_VISUAL_VERSION) + if("${_VISUAL_VERSION}" STREQUAL "") + message(FATAL_ERROR "Conan: Visual Studio not recognized") + else() + set(_CONAN_SETTING_COMPILER ${_VISUAL}) + set(_CONAN_SETTING_COMPILER_VERSION ${_VISUAL_VERSION}) + endif() + + if(NOT _CONAN_SETTING_ARCH) + if (MSVC_${LANGUAGE}_ARCHITECTURE_ID MATCHES "64") + set(_CONAN_SETTING_ARCH x86_64) + elseif (MSVC_${LANGUAGE}_ARCHITECTURE_ID MATCHES "^ARM") + message(STATUS "Conan: Using default ARM architecture from MSVC") + set(_CONAN_SETTING_ARCH armv6) + elseif (MSVC_${LANGUAGE}_ARCHITECTURE_ID MATCHES "86") + set(_CONAN_SETTING_ARCH x86) + else () + message(FATAL_ERROR "Conan: Unknown MSVC architecture [${MSVC_${LANGUAGE}_ARCHITECTURE_ID}]") + endif() + endif() + + conan_cmake_detect_vs_runtime(_vs_runtime ${ARGV}) + message(STATUS "Conan: Detected VS runtime: ${_vs_runtime}") + set(_CONAN_SETTING_COMPILER_RUNTIME ${_vs_runtime}) + + if (CMAKE_GENERATOR_TOOLSET) + set(_CONAN_SETTING_COMPILER_TOOLSET ${CMAKE_VS_PLATFORM_TOOLSET}) + elseif(CMAKE_VS_PLATFORM_TOOLSET AND (CMAKE_GENERATOR STREQUAL "Ninja")) + set(_CONAN_SETTING_COMPILER_TOOLSET ${CMAKE_VS_PLATFORM_TOOLSET}) + endif() + else() + message(FATAL_ERROR "Conan: compiler setup not recognized") + endif() + +endmacro() + +function(conan_cmake_settings result) + #message(STATUS "COMPILER " ${CMAKE_CXX_COMPILER}) + #message(STATUS "COMPILER " ${CMAKE_CXX_COMPILER_ID}) + #message(STATUS "VERSION " ${CMAKE_CXX_COMPILER_VERSION}) + #message(STATUS "FLAGS " ${CMAKE_LANG_FLAGS}) + #message(STATUS "LIB ARCH " ${CMAKE_CXX_LIBRARY_ARCHITECTURE}) + #message(STATUS "BUILD TYPE " ${CMAKE_BUILD_TYPE}) + #message(STATUS "GENERATOR " ${CMAKE_GENERATOR}) + #message(STATUS "GENERATOR WIN64 " ${CMAKE_CL_64}) + + message(STATUS "Conan: Automatic detection of conan settings from cmake") + + conan_parse_arguments(${ARGV}) + + _conan_detect_build_type(${ARGV}) + + _conan_check_system_name() + + _conan_check_language() + + _conan_detect_compiler(${ARGV}) + + # If profile is defined it is used + if(CMAKE_BUILD_TYPE STREQUAL "Debug" AND ARGUMENTS_DEBUG_PROFILE) + set(_APPLIED_PROFILES ${ARGUMENTS_DEBUG_PROFILE}) + elseif(CMAKE_BUILD_TYPE STREQUAL "Release" AND ARGUMENTS_RELEASE_PROFILE) + set(_APPLIED_PROFILES ${ARGUMENTS_RELEASE_PROFILE}) + elseif(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" AND ARGUMENTS_RELWITHDEBINFO_PROFILE) + set(_APPLIED_PROFILES ${ARGUMENTS_RELWITHDEBINFO_PROFILE}) + elseif(CMAKE_BUILD_TYPE STREQUAL "MinSizeRel" AND ARGUMENTS_MINSIZEREL_PROFILE) + set(_APPLIED_PROFILES ${ARGUMENTS_MINSIZEREL_PROFILE}) + elseif(ARGUMENTS_PROFILE) + set(_APPLIED_PROFILES ${ARGUMENTS_PROFILE}) + endif() + + foreach(ARG ${_APPLIED_PROFILES}) + set(_SETTINGS ${_SETTINGS} -pr=${ARG}) + endforeach() + foreach(ARG ${ARGUMENTS_PROFILE_BUILD}) + conan_check(VERSION 1.24.0 REQUIRED DETECT_QUIET) + set(_SETTINGS ${_SETTINGS} -pr:b=${ARG}) + endforeach() + + if(NOT _SETTINGS OR ARGUMENTS_PROFILE_AUTO STREQUAL "ALL") + set(ARGUMENTS_PROFILE_AUTO arch build_type compiler compiler.version + compiler.runtime compiler.libcxx compiler.toolset) + endif() + + # remove any manually specified settings from the autodetected settings + foreach(ARG ${ARGUMENTS_SETTINGS}) + string(REGEX MATCH "[^=]*" MANUAL_SETTING "${ARG}") + message(STATUS "Conan: ${MANUAL_SETTING} was added as an argument. Not using the autodetected one.") + list(REMOVE_ITEM ARGUMENTS_PROFILE_AUTO "${MANUAL_SETTING}") + endforeach() + + # Automatic from CMake + foreach(ARG ${ARGUMENTS_PROFILE_AUTO}) + string(TOUPPER ${ARG} _arg_name) + string(REPLACE "." "_" _arg_name ${_arg_name}) + if(_CONAN_SETTING_${_arg_name}) + set(_SETTINGS ${_SETTINGS} -s ${ARG}=${_CONAN_SETTING_${_arg_name}}) + endif() + endforeach() + + foreach(ARG ${ARGUMENTS_SETTINGS}) + set(_SETTINGS ${_SETTINGS} -s ${ARG}) + endforeach() + + message(STATUS "Conan: Settings= ${_SETTINGS}") + + set(${result} ${_SETTINGS} PARENT_SCOPE) +endfunction() + + +function(conan_cmake_detect_unix_libcxx result) + # Take into account any -stdlib in compile options + get_directory_property(compile_options DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMPILE_OPTIONS) + string(GENEX_STRIP "${compile_options}" compile_options) + + # Take into account any _GLIBCXX_USE_CXX11_ABI in compile definitions + get_directory_property(defines DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMPILE_DEFINITIONS) + string(GENEX_STRIP "${defines}" defines) + + foreach(define ${defines}) + if(define MATCHES "_GLIBCXX_USE_CXX11_ABI") + if(define MATCHES "^-D") + set(compile_options ${compile_options} "${define}") + else() + set(compile_options ${compile_options} "-D${define}") + endif() + endif() + endforeach() + + # add additional compiler options ala cmRulePlaceholderExpander::ExpandRuleVariable + set(EXPAND_CXX_COMPILER ${CMAKE_CXX_COMPILER}) + if(CMAKE_CXX_COMPILER_ARG1) + # CMake splits CXX="foo bar baz" into CMAKE_CXX_COMPILER="foo", CMAKE_CXX_COMPILER_ARG1="bar baz" + # without this, ccache, winegcc, or other wrappers might lose all their arguments + separate_arguments(SPLIT_CXX_COMPILER_ARG1 NATIVE_COMMAND ${CMAKE_CXX_COMPILER_ARG1}) + list(APPEND EXPAND_CXX_COMPILER ${SPLIT_CXX_COMPILER_ARG1}) + endif() + + if(CMAKE_CXX_COMPILE_OPTIONS_TARGET AND CMAKE_CXX_COMPILER_TARGET) + # without --target= we may be calling the wrong underlying GCC + list(APPEND EXPAND_CXX_COMPILER "${CMAKE_CXX_COMPILE_OPTIONS_TARGET}${CMAKE_CXX_COMPILER_TARGET}") + endif() + + if(CMAKE_CXX_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN AND CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN) + list(APPEND EXPAND_CXX_COMPILER "${CMAKE_CXX_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN}${CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN}") + endif() + + if(CMAKE_CXX_COMPILE_OPTIONS_SYSROOT) + # without --sysroot= we may find the wrong #include + if(CMAKE_SYSROOT_COMPILE) + list(APPEND EXPAND_CXX_COMPILER "${CMAKE_CXX_COMPILE_OPTIONS_SYSROOT}${CMAKE_SYSROOT_COMPILE}") + elseif(CMAKE_SYSROOT) + list(APPEND EXPAND_CXX_COMPILER "${CMAKE_CXX_COMPILE_OPTIONS_SYSROOT}${CMAKE_SYSROOT}") + endif() + endif() + + separate_arguments(SPLIT_CXX_FLAGS NATIVE_COMMAND ${CMAKE_CXX_FLAGS}) + + if(CMAKE_OSX_SYSROOT) + set(xcode_sysroot_option "--sysroot=${CMAKE_OSX_SYSROOT}") + endif() + + execute_process( + COMMAND ${CMAKE_COMMAND} -E echo "#include " + COMMAND ${EXPAND_CXX_COMPILER} ${SPLIT_CXX_FLAGS} -x c++ ${xcode_sysroot_option} ${compile_options} -E -dM - + OUTPUT_VARIABLE string_defines + ) + + if(string_defines MATCHES "#define __GLIBCXX__") + # Allow -D_GLIBCXX_USE_CXX11_ABI=ON/OFF as argument to cmake + if(DEFINED _GLIBCXX_USE_CXX11_ABI) + if(_GLIBCXX_USE_CXX11_ABI) + set(${result} libstdc++11 PARENT_SCOPE) + return() + else() + set(${result} libstdc++ PARENT_SCOPE) + return() + endif() + endif() + + if(string_defines MATCHES "#define _GLIBCXX_USE_CXX11_ABI 1\n") + set(${result} libstdc++11 PARENT_SCOPE) + else() + # Either the compiler is missing the define because it is old, and so + # it can't use the new abi, or the compiler was configured to use the + # old abi by the user or distro (e.g. devtoolset on RHEL/CentOS) + set(${result} libstdc++ PARENT_SCOPE) + endif() + else() + set(${result} libc++ PARENT_SCOPE) + endif() +endfunction() + +function(conan_cmake_detect_vs_runtime result) + + conan_parse_arguments(${ARGV}) + if(ARGUMENTS_BUILD_TYPE) + set(build_type "${ARGUMENTS_BUILD_TYPE}") + elseif(CMAKE_BUILD_TYPE) + set(build_type "${CMAKE_BUILD_TYPE}") + else() + message(FATAL_ERROR "Please specify in command line CMAKE_BUILD_TYPE (-DCMAKE_BUILD_TYPE=Release)") + endif() + + if(build_type) + string(TOUPPER "${build_type}" build_type) + endif() + set(variables CMAKE_CXX_FLAGS_${build_type} CMAKE_C_FLAGS_${build_type} CMAKE_CXX_FLAGS CMAKE_C_FLAGS) + foreach(variable ${variables}) + if(NOT "${${variable}}" STREQUAL "") + string(REPLACE " " ";" flags "${${variable}}") + foreach (flag ${flags}) + if("${flag}" STREQUAL "/MD" OR "${flag}" STREQUAL "/MDd" OR "${flag}" STREQUAL "/MT" OR "${flag}" STREQUAL "/MTd") + string(SUBSTRING "${flag}" 1 -1 runtime) + set(${result} "${runtime}" PARENT_SCOPE) + return() + endif() + endforeach() + endif() + endforeach() + if("${build_type}" STREQUAL "DEBUG") + set(${result} "MDd" PARENT_SCOPE) + else() + set(${result} "MD" PARENT_SCOPE) + endif() +endfunction() + +function(_collect_settings result) + set(ARGUMENTS_PROFILE_AUTO arch build_type compiler compiler.version + compiler.runtime compiler.libcxx compiler.toolset + compiler.cppstd) + foreach(ARG ${ARGUMENTS_PROFILE_AUTO}) + string(TOUPPER ${ARG} _arg_name) + string(REPLACE "." "_" _arg_name ${_arg_name}) + if(_CONAN_SETTING_${_arg_name}) + set(detected_setings ${detected_setings} ${ARG}=${_CONAN_SETTING_${_arg_name}}) + endif() + endforeach() + set(${result} ${detected_setings} PARENT_SCOPE) +endfunction() + +function(conan_cmake_autodetect detected_settings) + _conan_detect_build_type(${ARGV}) + _conan_check_system_name() + _conan_check_language() + _conan_detect_compiler(${ARGV}) + _collect_settings(collected_settings) + set(${detected_settings} ${collected_settings} PARENT_SCOPE) +endfunction() + +macro(conan_parse_arguments) + set(options BASIC_SETUP CMAKE_TARGETS UPDATE KEEP_RPATHS NO_LOAD NO_OUTPUT_DIRS OUTPUT_QUIET NO_IMPORTS SKIP_STD) + set(oneValueArgs CONANFILE ARCH BUILD_TYPE INSTALL_FOLDER OUTPUT_FOLDER CONAN_COMMAND) + set(multiValueArgs DEBUG_PROFILE RELEASE_PROFILE RELWITHDEBINFO_PROFILE MINSIZEREL_PROFILE + PROFILE REQUIRES OPTIONS IMPORTS SETTINGS BUILD ENV GENERATORS PROFILE_AUTO + INSTALL_ARGS CONFIGURATION_TYPES PROFILE_BUILD BUILD_REQUIRES) + cmake_parse_arguments(ARGUMENTS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) +endmacro() + +function(old_conan_cmake_install) + # Calls "conan install" + # Argument BUILD is equivalant to --build={missing, PkgName,...} or + # --build when argument is 'BUILD all' (which builds all packages from source) + # Argument CONAN_COMMAND, to specify the conan path, e.g. in case of running from source + # cmake does not identify conan as command, even if it is +x and it is in the path + conan_parse_arguments(${ARGV}) + + if(CONAN_CMAKE_MULTI) + set(ARGUMENTS_GENERATORS ${ARGUMENTS_GENERATORS} cmake_multi) + else() + set(ARGUMENTS_GENERATORS ${ARGUMENTS_GENERATORS} cmake) + endif() + + set(CONAN_BUILD_POLICY "") + foreach(ARG ${ARGUMENTS_BUILD}) + if(${ARG} STREQUAL "all") + set(CONAN_BUILD_POLICY ${CONAN_BUILD_POLICY} --build) + break() + else() + set(CONAN_BUILD_POLICY ${CONAN_BUILD_POLICY} --build=${ARG}) + endif() + endforeach() + if(ARGUMENTS_CONAN_COMMAND) + set(CONAN_CMD ${ARGUMENTS_CONAN_COMMAND}) + else() + conan_check(REQUIRED) + endif() + set(CONAN_OPTIONS "") + if(ARGUMENTS_CONANFILE) + if(IS_ABSOLUTE ${ARGUMENTS_CONANFILE}) + set(CONANFILE ${ARGUMENTS_CONANFILE}) + else() + set(CONANFILE ${CMAKE_CURRENT_SOURCE_DIR}/${ARGUMENTS_CONANFILE}) + endif() + else() + set(CONANFILE ".") + endif() + foreach(ARG ${ARGUMENTS_OPTIONS}) + set(CONAN_OPTIONS ${CONAN_OPTIONS} -o=${ARG}) + endforeach() + if(ARGUMENTS_UPDATE) + set(CONAN_INSTALL_UPDATE --update) + endif() + if(ARGUMENTS_NO_IMPORTS) + set(CONAN_INSTALL_NO_IMPORTS --no-imports) + endif() + set(CONAN_INSTALL_FOLDER "") + if(ARGUMENTS_INSTALL_FOLDER) + set(CONAN_INSTALL_FOLDER -if=${ARGUMENTS_INSTALL_FOLDER}) + endif() + set(CONAN_OUTPUT_FOLDER "") + if(ARGUMENTS_OUTPUT_FOLDER) + set(CONAN_OUTPUT_FOLDER -of=${ARGUMENTS_OUTPUT_FOLDER}) + endif() + foreach(ARG ${ARGUMENTS_GENERATORS}) + set(CONAN_GENERATORS ${CONAN_GENERATORS} -g=${ARG}) + endforeach() + foreach(ARG ${ARGUMENTS_ENV}) + set(CONAN_ENV_VARS ${CONAN_ENV_VARS} -e=${ARG}) + endforeach() + set(conan_args install ${CONANFILE} ${settings} ${CONAN_ENV_VARS} ${CONAN_GENERATORS} ${CONAN_BUILD_POLICY} ${CONAN_INSTALL_UPDATE} ${CONAN_INSTALL_NO_IMPORTS} ${CONAN_OPTIONS} ${CONAN_INSTALL_FOLDER} ${ARGUMENTS_INSTALL_ARGS}) + + string (REPLACE ";" " " _conan_args "${conan_args}") + message(STATUS "Conan executing: ${CONAN_CMD} ${_conan_args}") + + if(ARGUMENTS_OUTPUT_QUIET) + execute_process(COMMAND ${CONAN_CMD} ${conan_args} + RESULT_VARIABLE return_code + OUTPUT_VARIABLE conan_output + ERROR_VARIABLE conan_output + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + else() + execute_process(COMMAND ${CONAN_CMD} ${conan_args} + RESULT_VARIABLE return_code + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + endif() + + if(NOT "${return_code}" STREQUAL "0") + message(FATAL_ERROR "Conan install failed='${return_code}'") + endif() + +endfunction() + +function(conan_cmake_install) + if(DEFINED CONAN_COMMAND) + set(CONAN_CMD ${CONAN_COMMAND}) + else() + conan_check(REQUIRED) + endif() + + set(installOptions UPDATE NO_IMPORTS OUTPUT_QUIET ERROR_QUIET) + set(installOneValueArgs PATH_OR_REFERENCE REFERENCE REMOTE LOCKFILE LOCKFILE_OUT LOCKFILE_NODE_ID INSTALL_FOLDER OUTPUT_FOLDER) + set(installMultiValueArgs GENERATOR BUILD ENV ENV_HOST ENV_BUILD OPTIONS_HOST OPTIONS OPTIONS_BUILD PROFILE + PROFILE_HOST PROFILE_BUILD SETTINGS SETTINGS_HOST SETTINGS_BUILD) + cmake_parse_arguments(ARGS "${installOptions}" "${installOneValueArgs}" "${installMultiValueArgs}" ${ARGN}) + foreach(arg ${installOptions}) + if(ARGS_${arg}) + set(${arg} ${${arg}} ${ARGS_${arg}}) + endif() + endforeach() + foreach(arg ${installOneValueArgs}) + if(DEFINED ARGS_${arg}) + if("${arg}" STREQUAL "REMOTE") + set(flag "--remote") + elseif("${arg}" STREQUAL "LOCKFILE") + set(flag "--lockfile") + elseif("${arg}" STREQUAL "LOCKFILE_OUT") + set(flag "--lockfile-out") + elseif("${arg}" STREQUAL "LOCKFILE_NODE_ID") + set(flag "--lockfile-node-id") + elseif("${arg}" STREQUAL "INSTALL_FOLDER") + set(flag "--install-folder") + elseif("${arg}" STREQUAL "OUTPUT_FOLDER") + set(flag "--output-folder") + endif() + set(${arg} ${${arg}} ${flag} ${ARGS_${arg}}) + endif() + endforeach() + foreach(arg ${installMultiValueArgs}) + if(DEFINED ARGS_${arg}) + if("${arg}" STREQUAL "GENERATOR") + set(flag "--generator") + elseif("${arg}" STREQUAL "BUILD") + set(flag "--build") + elseif("${arg}" STREQUAL "ENV") + set(flag "--env") + elseif("${arg}" STREQUAL "ENV_HOST") + set(flag "--env:host") + elseif("${arg}" STREQUAL "ENV_BUILD") + set(flag "--env:build") + elseif("${arg}" STREQUAL "OPTIONS") + set(flag "--options") + elseif("${arg}" STREQUAL "OPTIONS_HOST") + set(flag "--options:host") + elseif("${arg}" STREQUAL "OPTIONS_BUILD") + set(flag "--options:build") + elseif("${arg}" STREQUAL "PROFILE") + set(flag "--profile") + elseif("${arg}" STREQUAL "PROFILE_HOST") + set(flag "--profile:host") + elseif("${arg}" STREQUAL "PROFILE_BUILD") + set(flag "--profile:build") + elseif("${arg}" STREQUAL "SETTINGS") + set(flag "--settings") + elseif("${arg}" STREQUAL "SETTINGS_HOST") + set(flag "--settings:host") + elseif("${arg}" STREQUAL "SETTINGS_BUILD") + set(flag "--settings:build") + endif() + list(LENGTH ARGS_${arg} numargs) + foreach(item ${ARGS_${arg}}) + if(${item} STREQUAL "all" AND ${arg} STREQUAL "BUILD") + set(${arg} "--build") + break() + endif() + set(${arg} ${${arg}} ${flag} ${item}) + endforeach() + endif() + endforeach() + if(DEFINED UPDATE) + set(UPDATE --update) + endif() + if(DEFINED NO_IMPORTS) + set(NO_IMPORTS --no-imports) + endif() + set(install_args install ${PATH_OR_REFERENCE} ${REFERENCE} ${UPDATE} ${NO_IMPORTS} ${REMOTE} ${LOCKFILE} ${LOCKFILE_OUT} ${LOCKFILE_NODE_ID} ${INSTALL_FOLDER} ${OUTPUT_FOLDER} + ${GENERATOR} ${BUILD} ${ENV} ${ENV_HOST} ${ENV_BUILD} ${OPTIONS} ${OPTIONS_HOST} ${OPTIONS_BUILD} + ${PROFILE} ${PROFILE_HOST} ${PROFILE_BUILD} ${SETTINGS} ${SETTINGS_HOST} ${SETTINGS_BUILD}) + + string(REPLACE ";" " " _install_args "${install_args}") + message(STATUS "Conan executing: ${CONAN_CMD} ${_install_args}") + + if(ARGS_OUTPUT_QUIET) + set(OUTPUT_OPT OUTPUT_QUIET) + endif() + if(ARGS_ERROR_QUIET) + set(ERROR_OPT ERROR_QUIET) + endif() + + execute_process(COMMAND ${CONAN_CMD} ${install_args} + RESULT_VARIABLE return_code + ${OUTPUT_OPT} + ${ERROR_OPT} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + + if(NOT "${return_code}" STREQUAL "0") + if (ARGS_ERROR_QUIET) + message(WARNING "Conan install failed='${return_code}'") + else() + message(FATAL_ERROR "Conan install failed='${return_code}'") + endif() + endif() + +endfunction() + +function(conan_cmake_lock_create) + if(DEFINED CONAN_COMMAND) + set(CONAN_CMD ${CONAN_COMMAND}) + else() + conan_check(REQUIRED) + endif() + + set(lockCreateOptions UPDATE BASE OUTPUT_QUIET ERROR_QUIET) + set(lockCreateOneValueArgs PATH REFERENCE REMOTE LOCKFILE LOCKFILE_OUT) + set(lockCreateMultiValueArgs BUILD ENV ENV_HOST ENV_BUILD OPTIONS_HOST OPTIONS OPTIONS_BUILD PROFILE + PROFILE_HOST PROFILE_BUILD SETTINGS SETTINGS_HOST SETTINGS_BUILD) + cmake_parse_arguments(ARGS "${lockCreateOptions}" "${lockCreateOneValueArgs}" "${lockCreateMultiValueArgs}" ${ARGN}) + foreach(arg ${lockCreateOptions}) + if(ARGS_${arg}) + set(${arg} ${${arg}} ${ARGS_${arg}}) + endif() + endforeach() + foreach(arg ${lockCreateOneValueArgs}) + if(DEFINED ARGS_${arg}) + if("${arg}" STREQUAL "REMOTE") + set(flag "--remote") + elseif("${arg}" STREQUAL "LOCKFILE") + set(flag "--lockfile") + elseif("${arg}" STREQUAL "LOCKFILE_OUT") + set(flag "--lockfile-out") + endif() + set(${arg} ${${arg}} ${flag} ${ARGS_${arg}}) + endif() + endforeach() + foreach(arg ${lockCreateMultiValueArgs}) + if(DEFINED ARGS_${arg}) + if("${arg}" STREQUAL "BUILD") + set(flag "--build") + elseif("${arg}" STREQUAL "ENV") + set(flag "--env") + elseif("${arg}" STREQUAL "ENV_HOST") + set(flag "--env:host") + elseif("${arg}" STREQUAL "ENV_BUILD") + set(flag "--env:build") + elseif("${arg}" STREQUAL "OPTIONS") + set(flag "--options") + elseif("${arg}" STREQUAL "OPTIONS_HOST") + set(flag "--options:host") + elseif("${arg}" STREQUAL "OPTIONS_BUILD") + set(flag "--options:build") + elseif("${arg}" STREQUAL "PROFILE") + set(flag "--profile") + elseif("${arg}" STREQUAL "PROFILE_HOST") + set(flag "--profile:host") + elseif("${arg}" STREQUAL "PROFILE_BUILD") + set(flag "--profile:build") + elseif("${arg}" STREQUAL "SETTINGS") + set(flag "--settings") + elseif("${arg}" STREQUAL "SETTINGS_HOST") + set(flag "--settings:host") + elseif("${arg}" STREQUAL "SETTINGS_BUILD") + set(flag "--settings:build") + endif() + list(LENGTH ARGS_${arg} numargs) + foreach(item ${ARGS_${arg}}) + if(${item} STREQUAL "all" AND ${arg} STREQUAL "BUILD") + set(${arg} "--build") + break() + endif() + set(${arg} ${${arg}} ${flag} ${item}) + endforeach() + endif() + endforeach() + if(DEFINED UPDATE) + set(UPDATE --update) + endif() + if(DEFINED BASE) + set(BASE --base) + endif() + set(lock_create_Args lock create ${PATH} ${REFERENCE} ${UPDATE} ${BASE} ${REMOTE} ${LOCKFILE} ${LOCKFILE_OUT} ${LOCKFILE_NODE_ID} ${INSTALL_FOLDER} + ${GENERATOR} ${BUILD} ${ENV} ${ENV_HOST} ${ENV_BUILD} ${OPTIONS} ${OPTIONS_HOST} ${OPTIONS_BUILD} + ${PROFILE} ${PROFILE_HOST} ${PROFILE_BUILD} ${SETTINGS} ${SETTINGS_HOST} ${SETTINGS_BUILD}) + + string(REPLACE ";" " " _lock_create_Args "${lock_create_Args}") + message(STATUS "Conan executing: ${CONAN_CMD} ${_lock_create_Args}") + + if(ARGS_OUTPUT_QUIET) + set(OUTPUT_OPT OUTPUT_QUIET) + endif() + if(ARGS_ERROR_QUIET) + set(ERROR_OPT ERROR_QUIET) + endif() + + execute_process(COMMAND ${CONAN_CMD} ${lock_create_Args} + RESULT_VARIABLE return_code + ${OUTPUT_OPT} + ${ERROR_OPT} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + + if(NOT "${return_code}" STREQUAL "0") + if (ARGS_ERROR_QUIET) + message(WARNING "Conan lock create failed='${return_code}'") + else() + message(FATAL_ERROR "Conan lock create failed='${return_code}'") + endif() + endif() +endfunction() + +function(conan_cmake_setup_conanfile) + conan_parse_arguments(${ARGV}) + if(ARGUMENTS_CONANFILE) + get_filename_component(_CONANFILE_NAME ${ARGUMENTS_CONANFILE} NAME) + # configure_file will make sure cmake re-runs when conanfile is updated + configure_file(${ARGUMENTS_CONANFILE} ${CMAKE_CURRENT_BINARY_DIR}/${_CONANFILE_NAME}.junk COPYONLY) + file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/${_CONANFILE_NAME}.junk) + else() + conan_cmake_generate_conanfile(ON ${ARGV}) + endif() +endfunction() + +function(conan_cmake_configure) + conan_cmake_generate_conanfile(OFF ${ARGV}) +endfunction() + +# Generate, writing in disk a conanfile.txt with the requires, options, and imports +# specified as arguments +# This will be considered as temporary file, generated in CMAKE_CURRENT_BINARY_DIR) +function(conan_cmake_generate_conanfile DEFAULT_GENERATOR) + + conan_parse_arguments(${ARGV}) + + set(_FN "${CMAKE_CURRENT_BINARY_DIR}/conanfile.txt") + file(WRITE ${_FN} "") + + if(DEFINED ARGUMENTS_REQUIRES) + file(APPEND ${_FN} "[requires]\n") + foreach(REQUIRE ${ARGUMENTS_REQUIRES}) + file(APPEND ${_FN} ${REQUIRE} "\n") + endforeach() + endif() + + if (DEFAULT_GENERATOR OR DEFINED ARGUMENTS_GENERATORS) + file(APPEND ${_FN} "[generators]\n") + if (DEFAULT_GENERATOR) + file(APPEND ${_FN} "cmake\n") + endif() + if (DEFINED ARGUMENTS_GENERATORS) + foreach(GENERATOR ${ARGUMENTS_GENERATORS}) + file(APPEND ${_FN} ${GENERATOR} "\n") + endforeach() + endif() + endif() + + if(DEFINED ARGUMENTS_BUILD_REQUIRES) + file(APPEND ${_FN} "[build_requires]\n") + foreach(BUILD_REQUIRE ${ARGUMENTS_BUILD_REQUIRES}) + file(APPEND ${_FN} ${BUILD_REQUIRE} "\n") + endforeach() + endif() + + if(DEFINED ARGUMENTS_IMPORTS) + file(APPEND ${_FN} "[imports]\n") + foreach(IMPORTS ${ARGUMENTS_IMPORTS}) + file(APPEND ${_FN} ${IMPORTS} "\n") + endforeach() + endif() + + if(DEFINED ARGUMENTS_OPTIONS) + file(APPEND ${_FN} "[options]\n") + foreach(OPTION ${ARGUMENTS_OPTIONS}) + file(APPEND ${_FN} ${OPTION} "\n") + endforeach() + endif() + +endfunction() + + +macro(conan_load_buildinfo) + if(CONAN_CMAKE_MULTI) + set(_CONANBUILDINFO conanbuildinfo_multi.cmake) + else() + set(_CONANBUILDINFO conanbuildinfo.cmake) + endif() + if(ARGUMENTS_INSTALL_FOLDER) + set(_CONANBUILDINFOFOLDER ${ARGUMENTS_INSTALL_FOLDER}) + else() + set(_CONANBUILDINFOFOLDER ${CMAKE_CURRENT_BINARY_DIR}) + endif() + # Checks for the existence of conanbuildinfo.cmake, and loads it + # important that it is macro, so variables defined at parent scope + if(EXISTS "${_CONANBUILDINFOFOLDER}/${_CONANBUILDINFO}") + message(STATUS "Conan: Loading ${_CONANBUILDINFO}") + include(${_CONANBUILDINFOFOLDER}/${_CONANBUILDINFO}) + else() + message(FATAL_ERROR "${_CONANBUILDINFO} doesn't exist in ${CMAKE_CURRENT_BINARY_DIR}") + endif() +endmacro() + + +macro(conan_cmake_run) + conan_parse_arguments(${ARGV}) + + if(ARGUMENTS_CONFIGURATION_TYPES AND NOT CMAKE_CONFIGURATION_TYPES) + message(WARNING "CONFIGURATION_TYPES should only be specified for multi-configuration generators") + elseif(ARGUMENTS_CONFIGURATION_TYPES AND ARGUMENTS_BUILD_TYPE) + message(WARNING "CONFIGURATION_TYPES and BUILD_TYPE arguments should not be defined at the same time.") + endif() + + if(CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE AND NOT CONAN_EXPORTED + AND NOT ARGUMENTS_BUILD_TYPE) + set(CONAN_CMAKE_MULTI ON) + if (NOT ARGUMENTS_CONFIGURATION_TYPES) + set(ARGUMENTS_CONFIGURATION_TYPES "Release;Debug") + endif() + message(STATUS "Conan: Using cmake-multi generator") + else() + set(CONAN_CMAKE_MULTI OFF) + endif() + + if(NOT CONAN_EXPORTED) + conan_cmake_setup_conanfile(${ARGV}) + if(CONAN_CMAKE_MULTI) + foreach(CMAKE_BUILD_TYPE ${ARGUMENTS_CONFIGURATION_TYPES}) + set(ENV{CONAN_IMPORT_PATH} ${CMAKE_BUILD_TYPE}) + conan_cmake_settings(settings ${ARGV}) + old_conan_cmake_install(SETTINGS ${settings} ${ARGV}) + endforeach() + set(CMAKE_BUILD_TYPE) + else() + conan_cmake_settings(settings ${ARGV}) + old_conan_cmake_install(SETTINGS ${settings} ${ARGV}) + endif() + endif() + + if (NOT ARGUMENTS_NO_LOAD) + conan_load_buildinfo() + endif() + + if(ARGUMENTS_BASIC_SETUP) + foreach(_option CMAKE_TARGETS KEEP_RPATHS NO_OUTPUT_DIRS SKIP_STD) + if(ARGUMENTS_${_option}) + if(${_option} STREQUAL "CMAKE_TARGETS") + list(APPEND _setup_options "TARGETS") + else() + list(APPEND _setup_options ${_option}) + endif() + endif() + endforeach() + conan_basic_setup(${_setup_options}) + endif() +endmacro() + +macro(conan_check) + # Checks conan availability in PATH + # Arguments REQUIRED, DETECT_QUIET and VERSION are optional + # Example usage: + # conan_check(VERSION 1.0.0 REQUIRED) + set(options REQUIRED DETECT_QUIET) + set(oneValueArgs VERSION) + cmake_parse_arguments(CONAN "${options}" "${oneValueArgs}" "" ${ARGN}) + if(NOT CONAN_DETECT_QUIET) + message(STATUS "Conan: checking conan executable") + endif() + + find_program(CONAN_CMD conan) + if(NOT CONAN_CMD AND CONAN_REQUIRED) + message(FATAL_ERROR "Conan executable not found! Please install conan.") + endif() + if(NOT CONAN_DETECT_QUIET) + message(STATUS "Conan: Found program ${CONAN_CMD}") + endif() + execute_process(COMMAND ${CONAN_CMD} --version + RESULT_VARIABLE return_code + OUTPUT_VARIABLE CONAN_VERSION_OUTPUT + ERROR_VARIABLE CONAN_VERSION_OUTPUT) + + if(NOT "${return_code}" STREQUAL "0") + message(FATAL_ERROR "Conan --version failed='${return_code}'") + endif() + + if(NOT CONAN_DETECT_QUIET) + string(STRIP "${CONAN_VERSION_OUTPUT}" _CONAN_VERSION_OUTPUT) + message(STATUS "Conan: Version found ${_CONAN_VERSION_OUTPUT}") + endif() + + if(DEFINED CONAN_VERSION) + string(REGEX MATCH ".*Conan version ([0-9]+\\.[0-9]+\\.[0-9]+)" FOO + "${CONAN_VERSION_OUTPUT}") + if(${CMAKE_MATCH_1} VERSION_LESS ${CONAN_VERSION}) + message(FATAL_ERROR "Conan outdated. Installed: ${CMAKE_MATCH_1}, \ + required: ${CONAN_VERSION}. Consider updating via 'pip \ + install conan==${CONAN_VERSION}'.") + endif() + endif() +endmacro() + +function(conan_add_remote) + # Adds a remote + # Arguments URL and NAME are required, INDEX, COMMAND and VERIFY_SSL are optional + # Example usage: + # conan_add_remote(NAME bincrafters INDEX 1 + # URL https://api.bintray.com/conan/bincrafters/public-conan + # VERIFY_SSL True) + set(oneValueArgs URL NAME INDEX COMMAND VERIFY_SSL) + cmake_parse_arguments(CONAN "" "${oneValueArgs}" "" ${ARGN}) + + if(DEFINED CONAN_INDEX) + set(CONAN_INDEX_ARG "-i ${CONAN_INDEX}") + endif() + if(DEFINED CONAN_COMMAND) + set(CONAN_CMD ${CONAN_COMMAND}) + else() + conan_check(REQUIRED DETECT_QUIET) + endif() + set(CONAN_VERIFY_SSL_ARG "True") + if(DEFINED CONAN_VERIFY_SSL) + set(CONAN_VERIFY_SSL_ARG ${CONAN_VERIFY_SSL}) + endif() + message(STATUS "Conan: Adding ${CONAN_NAME} remote repository (${CONAN_URL}) verify ssl (${CONAN_VERIFY_SSL_ARG})") + execute_process(COMMAND ${CONAN_CMD} remote add ${CONAN_NAME} ${CONAN_INDEX_ARG} -f ${CONAN_URL} ${CONAN_VERIFY_SSL_ARG} + RESULT_VARIABLE return_code) + if(NOT "${return_code}" STREQUAL "0") + message(FATAL_ERROR "Conan remote failed='${return_code}'") + endif() +endfunction() + +macro(conan_config_install) + # install a full configuration from a local or remote zip file + # Argument ITEM is required, arguments TYPE, SOURCE, TARGET and VERIFY_SSL are optional + # Example usage: + # conan_config_install(ITEM https://github.com/conan-io/cmake-conan.git + # TYPE git SOURCE source-folder TARGET target-folder VERIFY_SSL false) + set(oneValueArgs ITEM TYPE SOURCE TARGET VERIFY_SSL) + set(multiValueArgs ARGS) + cmake_parse_arguments(CONAN "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + + if(DEFINED CONAN_COMMAND) + set(CONAN_CMD ${CONAN_COMMAND}) + else() + conan_check(REQUIRED) + endif() + + if(DEFINED CONAN_VERIFY_SSL) + set(CONAN_VERIFY_SSL_ARG "--verify-ssl=${CONAN_VERIFY_SSL}") + endif() + + if(DEFINED CONAN_TYPE) + set(CONAN_TYPE_ARG "--type=${CONAN_TYPE}") + endif() + + if(DEFINED CONAN_ARGS) + set(CONAN_ARGS_ARGS "--args=\"${CONAN_ARGS}\"") + endif() + + if(DEFINED CONAN_SOURCE) + set(CONAN_SOURCE_ARGS "--source-folder=${CONAN_SOURCE}") + endif() + + if(DEFINED CONAN_TARGET) + set(CONAN_TARGET_ARGS "--target-folder=${CONAN_TARGET}") + endif() + + set (CONAN_CONFIG_INSTALL_ARGS ${CONAN_VERIFY_SSL_ARG} + ${CONAN_TYPE_ARG} + ${CONAN_ARGS_ARGS} + ${CONAN_SOURCE_ARGS} + ${CONAN_TARGET_ARGS}) + + message(STATUS "Conan: Installing config from ${CONAN_ITEM}") + execute_process(COMMAND ${CONAN_CMD} config install ${CONAN_ITEM} ${CONAN_CONFIG_INSTALL_ARGS} + RESULT_VARIABLE return_code) + if(NOT "${return_code}" STREQUAL "0") + message(FATAL_ERROR "Conan config failed='${return_code}'") + endif() +endmacro() diff --git a/.cmake/conan_provider.cmake b/.cmake/conan_provider.cmake new file mode 100644 index 00000000..0d2be004 --- /dev/null +++ b/.cmake/conan_provider.cmake @@ -0,0 +1,676 @@ +# The MIT License (MIT) +# +# Copyright (c) 2024 JFrog +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +set(CONAN_MINIMUM_VERSION 2.0.5) + +# Create a new policy scope and set the minimum required cmake version so the +# features behind a policy setting like if(... IN_LIST ...) behaves as expected +# even if the parent project does not specify a minimum cmake version or a minimum +# version less than this module requires (e.g. 3.0) before the first project() call. +# (see: https://cmake.org/cmake/help/latest/variable/CMAKE_PROJECT_TOP_LEVEL_INCLUDES.html) +# +# The policy-affecting calls like cmake_policy(SET...) or `cmake_minimum_required` only +# affects the current policy scope, i.e. between the PUSH and POP in this case. +# +# https://cmake.org/cmake/help/book/mastering-cmake/chapter/Policies.html#the-policy-stack +cmake_policy(PUSH) +cmake_minimum_required(VERSION 3.24) + + +function(detect_os os os_api_level os_sdk os_subsystem os_version) + # it could be cross compilation + message(STATUS "CMake-Conan: cmake_system_name=${CMAKE_SYSTEM_NAME}") + if(CMAKE_SYSTEM_NAME AND NOT CMAKE_SYSTEM_NAME STREQUAL "Generic") + if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set(${os} Macos PARENT_SCOPE) + elseif(CMAKE_SYSTEM_NAME STREQUAL "QNX") + set(${os} Neutrino PARENT_SCOPE) + elseif(CMAKE_SYSTEM_NAME STREQUAL "CYGWIN") + set(${os} Windows PARENT_SCOPE) + set(${os_subsystem} cygwin PARENT_SCOPE) + elseif(CMAKE_SYSTEM_NAME MATCHES "^MSYS") + set(${os} Windows PARENT_SCOPE) + set(${os_subsystem} msys2 PARENT_SCOPE) + else() + set(${os} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE) + endif() + if(CMAKE_SYSTEM_NAME STREQUAL "Android") + if(DEFINED ANDROID_PLATFORM) + string(REGEX MATCH "[0-9]+" _os_api_level ${ANDROID_PLATFORM}) + elseif(DEFINED CMAKE_SYSTEM_VERSION) + set(_os_api_level ${CMAKE_SYSTEM_VERSION}) + endif() + message(STATUS "CMake-Conan: android api level=${_os_api_level}") + set(${os_api_level} ${_os_api_level} PARENT_SCOPE) + endif() + if(CMAKE_SYSTEM_NAME MATCHES "Darwin|iOS|tvOS|watchOS") + # CMAKE_OSX_SYSROOT contains the full path to the SDK for MakeFile/Ninja + # generators, but just has the original input string for Xcode. + if(NOT IS_DIRECTORY ${CMAKE_OSX_SYSROOT}) + set(_os_sdk ${CMAKE_OSX_SYSROOT}) + else() + if(CMAKE_OSX_SYSROOT MATCHES Simulator) + set(apple_platform_suffix simulator) + else() + set(apple_platform_suffix os) + endif() + if(CMAKE_OSX_SYSROOT MATCHES AppleTV) + set(_os_sdk "appletv${apple_platform_suffix}") + elseif(CMAKE_OSX_SYSROOT MATCHES iPhone) + set(_os_sdk "iphone${apple_platform_suffix}") + elseif(CMAKE_OSX_SYSROOT MATCHES Watch) + set(_os_sdk "watch${apple_platform_suffix}") + endif() + endif() + if(DEFINED os_sdk) + message(STATUS "CMake-Conan: cmake_osx_sysroot=${CMAKE_OSX_SYSROOT}") + set(${os_sdk} ${_os_sdk} PARENT_SCOPE) + endif() + if(DEFINED CMAKE_OSX_DEPLOYMENT_TARGET) + message(STATUS "CMake-Conan: cmake_osx_deployment_target=${CMAKE_OSX_DEPLOYMENT_TARGET}") + set(${os_version} ${CMAKE_OSX_DEPLOYMENT_TARGET} PARENT_SCOPE) + endif() + endif() + endif() +endfunction() + + +function(detect_arch arch) + # CMAKE_OSX_ARCHITECTURES can contain multiple architectures, but Conan only supports one. + # Therefore this code only finds one. If the recipes support multiple architectures, the + # build will work. Otherwise, there will be a linker error for the missing architecture(s). + if(DEFINED CMAKE_OSX_ARCHITECTURES) + string(REPLACE " " ";" apple_arch_list "${CMAKE_OSX_ARCHITECTURES}") + list(LENGTH apple_arch_list apple_arch_count) + if(apple_arch_count GREATER 1) + message(WARNING "CMake-Conan: Multiple architectures detected, this will only work if Conan recipe(s) produce fat binaries.") + endif() + endif() + if(CMAKE_SYSTEM_NAME MATCHES "Darwin|iOS|tvOS|watchOS" AND NOT CMAKE_OSX_ARCHITECTURES STREQUAL "") + set(host_arch ${CMAKE_OSX_ARCHITECTURES}) + elseif(MSVC) + set(host_arch ${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}) + else() + set(host_arch ${CMAKE_SYSTEM_PROCESSOR}) + endif() + if(host_arch MATCHES "aarch64|arm64|ARM64") + set(_arch armv8) + elseif(host_arch MATCHES "armv7|armv7-a|armv7l|ARMV7") + set(_arch armv7) + elseif(host_arch MATCHES armv7s) + set(_arch armv7s) + elseif(host_arch MATCHES "i686|i386|X86") + set(_arch x86) + elseif(host_arch MATCHES "AMD64|amd64|x86_64|x64") + set(_arch x86_64) + endif() + message(STATUS "CMake-Conan: cmake_system_processor=${_arch}") + set(${arch} ${_arch} PARENT_SCOPE) +endfunction() + + +function(detect_cxx_standard cxx_standard) + set(${cxx_standard} ${CMAKE_CXX_STANDARD} PARENT_SCOPE) + if(CMAKE_CXX_EXTENSIONS) + set(${cxx_standard} "gnu${CMAKE_CXX_STANDARD}" PARENT_SCOPE) + endif() +endfunction() + + +macro(detect_gnu_libstdcxx) + # _conan_is_gnu_libstdcxx true if GNU libstdc++ + check_cxx_source_compiles(" + #include + #if !defined(__GLIBCXX__) && !defined(__GLIBCPP__) + static_assert(false); + #endif + int main(){}" _conan_is_gnu_libstdcxx) + + # _conan_gnu_libstdcxx_is_cxx11_abi true if C++11 ABI + check_cxx_source_compiles(" + #include + static_assert(sizeof(std::string) != sizeof(void*), \"using libstdc++\"); + int main () {}" _conan_gnu_libstdcxx_is_cxx11_abi) + + set(_conan_gnu_libstdcxx_suffix "") + if(_conan_gnu_libstdcxx_is_cxx11_abi) + set(_conan_gnu_libstdcxx_suffix "11") + endif() + unset (_conan_gnu_libstdcxx_is_cxx11_abi) +endmacro() + + +macro(detect_libcxx) + # _conan_is_libcxx true if LLVM libc++ + check_cxx_source_compiles(" + #include + #if !defined(_LIBCPP_VERSION) + static_assert(false); + #endif + int main(){}" _conan_is_libcxx) +endmacro() + + +function(detect_lib_cxx lib_cxx) + if(CMAKE_SYSTEM_NAME STREQUAL "Android") + message(STATUS "CMake-Conan: android_stl=${CMAKE_ANDROID_STL_TYPE}") + set(${lib_cxx} ${CMAKE_ANDROID_STL_TYPE} PARENT_SCOPE) + return() + endif() + + include(CheckCXXSourceCompiles) + + if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") + detect_gnu_libstdcxx() + set(${lib_cxx} "libstdc++${_conan_gnu_libstdcxx_suffix}" PARENT_SCOPE) + elseif(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang") + set(${lib_cxx} "libc++" PARENT_SCOPE) + elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT CMAKE_SYSTEM_NAME MATCHES "Windows") + # Check for libc++ + detect_libcxx() + if(_conan_is_libcxx) + set(${lib_cxx} "libc++" PARENT_SCOPE) + return() + endif() + + # Check for libstdc++ + detect_gnu_libstdcxx() + if(_conan_is_gnu_libstdcxx) + set(${lib_cxx} "libstdc++${_conan_gnu_libstdcxx_suffix}" PARENT_SCOPE) + return() + endif() + + # TODO: it would be an error if we reach this point + elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + # Do nothing - compiler.runtime and compiler.runtime_type + # should be handled separately: https://github.com/conan-io/cmake-conan/pull/516 + return() + else() + # TODO: unable to determine, ask user to provide a full profile file instead + endif() +endfunction() + + +function(detect_compiler compiler compiler_version compiler_runtime compiler_runtime_type) + if(DEFINED CMAKE_CXX_COMPILER_ID) + set(_compiler ${CMAKE_CXX_COMPILER_ID}) + set(_compiler_version ${CMAKE_CXX_COMPILER_VERSION}) + else() + if(NOT DEFINED CMAKE_C_COMPILER_ID) + message(FATAL_ERROR "C or C++ compiler not defined") + endif() + set(_compiler ${CMAKE_C_COMPILER_ID}) + set(_compiler_version ${CMAKE_C_COMPILER_VERSION}) + endif() + + message(STATUS "CMake-Conan: CMake compiler=${_compiler}") + message(STATUS "CMake-Conan: CMake compiler version=${_compiler_version}") + + if(_compiler MATCHES MSVC) + set(_compiler "msvc") + string(SUBSTRING ${MSVC_VERSION} 0 3 _compiler_version) + # Configure compiler.runtime and compiler.runtime_type settings for MSVC + if(CMAKE_MSVC_RUNTIME_LIBRARY) + set(_msvc_runtime_library ${CMAKE_MSVC_RUNTIME_LIBRARY}) + else() + set(_msvc_runtime_library MultiThreaded$<$:Debug>DLL) # default value documented by CMake + endif() + + set(_KNOWN_MSVC_RUNTIME_VALUES "") + list(APPEND _KNOWN_MSVC_RUNTIME_VALUES MultiThreaded MultiThreadedDLL) + list(APPEND _KNOWN_MSVC_RUNTIME_VALUES MultiThreadedDebug MultiThreadedDebugDLL) + list(APPEND _KNOWN_MSVC_RUNTIME_VALUES MultiThreaded$<$:Debug> MultiThreaded$<$:Debug>DLL) + + # only accept the 6 possible values, otherwise we don't don't know to map this + if(NOT _msvc_runtime_library IN_LIST _KNOWN_MSVC_RUNTIME_VALUES) + message(FATAL_ERROR "CMake-Conan: unable to map MSVC runtime: ${_msvc_runtime_library} to Conan settings") + endif() + + # Runtime is "dynamic" in all cases if it ends in DLL + if(_msvc_runtime_library MATCHES ".*DLL$") + set(_compiler_runtime "dynamic") + else() + set(_compiler_runtime "static") + endif() + message(STATUS "CMake-Conan: CMake compiler.runtime=${_compiler_runtime}") + + # Only define compiler.runtime_type when explicitly requested + # If a generator expression is used, let Conan handle it conditional on build_type + if(NOT _msvc_runtime_library MATCHES ":Debug>") + if(_msvc_runtime_library MATCHES "Debug") + set(_compiler_runtime_type "Debug") + else() + set(_compiler_runtime_type "Release") + endif() + message(STATUS "CMake-Conan: CMake compiler.runtime_type=${_compiler_runtime_type}") + endif() + + unset(_KNOWN_MSVC_RUNTIME_VALUES) + + elseif(_compiler MATCHES AppleClang) + set(_compiler "apple-clang") + string(REPLACE "." ";" VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION}) + list(GET VERSION_LIST 0 _compiler_version) + elseif(_compiler MATCHES Clang) + set(_compiler "clang") + string(REPLACE "." ";" VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION}) + list(GET VERSION_LIST 0 _compiler_version) + elseif(_compiler MATCHES GNU) + set(_compiler "gcc") + string(REPLACE "." ";" VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION}) + list(GET VERSION_LIST 0 _compiler_version) + endif() + + message(STATUS "CMake-Conan: [settings] compiler=${_compiler}") + message(STATUS "CMake-Conan: [settings] compiler.version=${_compiler_version}") + if (_compiler_runtime) + message(STATUS "CMake-Conan: [settings] compiler.runtime=${_compiler_runtime}") + endif() + if (_compiler_runtime_type) + message(STATUS "CMake-Conan: [settings] compiler.runtime_type=${_compiler_runtime_type}") + endif() + + set(${compiler} ${_compiler} PARENT_SCOPE) + set(${compiler_version} ${_compiler_version} PARENT_SCOPE) + set(${compiler_runtime} ${_compiler_runtime} PARENT_SCOPE) + set(${compiler_runtime_type} ${_compiler_runtime_type} PARENT_SCOPE) +endfunction() + + +function(detect_build_type build_type) + get_property(multiconfig_generator GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(NOT multiconfig_generator) + # Only set when we know we are in a single-configuration generator + # Note: we may want to fail early if `CMAKE_BUILD_TYPE` is not defined + set(${build_type} ${CMAKE_BUILD_TYPE} PARENT_SCOPE) + endif() +endfunction() + + +macro(set_conan_compiler_if_appleclang lang command output_variable) + if(CMAKE_${lang}_COMPILER_ID STREQUAL "AppleClang") + execute_process(COMMAND xcrun --find ${command} + OUTPUT_VARIABLE _xcrun_out OUTPUT_STRIP_TRAILING_WHITESPACE) + cmake_path(GET _xcrun_out PARENT_PATH _xcrun_toolchain_path) + cmake_path(GET CMAKE_${lang}_COMPILER PARENT_PATH _compiler_parent_path) + if ("${_xcrun_toolchain_path}" STREQUAL "${_compiler_parent_path}") + set(${output_variable} "") + endif() + unset(_xcrun_out) + unset(_xcrun_toolchain_path) + unset(_compiler_parent_path) + endif() +endmacro() + + +macro(append_compiler_executables_configuration) + set(_conan_c_compiler "") + set(_conan_cpp_compiler "") + set(_conan_rc_compiler "") + set(_conan_compilers_list "") + if(CMAKE_C_COMPILER) + set(_conan_c_compiler "\"c\":\"${CMAKE_C_COMPILER}\"") + set_conan_compiler_if_appleclang(C cc _conan_c_compiler) + list(APPEND _conan_compilers_list ${_conan_c_compiler}) + else() + message(WARNING "CMake-Conan: The C compiler is not defined. " + "Please define CMAKE_C_COMPILER or enable the C language.") + endif() + if(CMAKE_CXX_COMPILER) + set(_conan_cpp_compiler "\"cpp\":\"${CMAKE_CXX_COMPILER}\"") + set_conan_compiler_if_appleclang(CXX c++ _conan_cpp_compiler) + list(APPEND _conan_compilers_list ${_conan_cpp_compiler}) + else() + message(WARNING "CMake-Conan: The C++ compiler is not defined. " + "Please define CMAKE_CXX_COMPILER or enable the C++ language.") + endif() + if(CMAKE_RC_COMPILER) + set(_conan_rc_compiler "\"rc\":\"${CMAKE_RC_COMPILER}\"") + list(APPEND _conan_compilers_list ${_conan_rc_compiler}) + # Not necessary to warn if RC not defined + endif() + if(NOT "x${_conan_compilers_list}" STREQUAL "x") + string(REPLACE ";" "," _conan_compilers_list "${_conan_compilers_list}") + string(APPEND profile "tools.build:compiler_executables={${_conan_compilers_list}}\n") + endif() + unset(_conan_c_compiler) + unset(_conan_cpp_compiler) + unset(_conan_rc_compiler) + unset(_conan_compilers_list) +endmacro() + + +function(detect_host_profile output_file) + detect_os(os os_api_level os_sdk os_subsystem os_version) + detect_arch(arch) + detect_compiler(compiler compiler_version compiler_runtime compiler_runtime_type) + detect_cxx_standard(compiler_cppstd) + detect_lib_cxx(compiler_libcxx) + detect_build_type(build_type) + + set(profile "") + string(APPEND profile "[settings]\n") + if(arch) + string(APPEND profile arch=${arch} "\n") + endif() + if(os) + string(APPEND profile os=${os} "\n") + endif() + if(os_api_level) + string(APPEND profile os.api_level=${os_api_level} "\n") + endif() + if(os_version) + string(APPEND profile os.version=${os_version} "\n") + endif() + if(os_sdk) + string(APPEND profile os.sdk=${os_sdk} "\n") + endif() + if(os_subsystem) + string(APPEND profile os.subsystem=${os_subsystem} "\n") + endif() + if(compiler) + string(APPEND profile compiler=${compiler} "\n") + endif() + if(compiler_version) + string(APPEND profile compiler.version=${compiler_version} "\n") + endif() + if(compiler_runtime) + string(APPEND profile compiler.runtime=${compiler_runtime} "\n") + endif() + if(compiler_runtime_type) + string(APPEND profile compiler.runtime_type=${compiler_runtime_type} "\n") + endif() + if(compiler_cppstd) + string(APPEND profile compiler.cppstd=${compiler_cppstd} "\n") + endif() + if(compiler_libcxx) + string(APPEND profile compiler.libcxx=${compiler_libcxx} "\n") + endif() + if(build_type) + string(APPEND profile "build_type=${build_type}\n") + endif() + + if(NOT DEFINED output_file) + set(file_name "${CMAKE_BINARY_DIR}/profile") + else() + set(file_name ${output_file}) + endif() + + string(APPEND profile "[conf]\n") + string(APPEND profile "tools.cmake.cmaketoolchain:generator=${CMAKE_GENERATOR}\n") + + # propagate compilers via profile + append_compiler_executables_configuration() + + if(os STREQUAL "Android") + string(APPEND profile "tools.android:ndk_path=${CMAKE_ANDROID_NDK}\n") + endif() + + message(STATUS "CMake-Conan: Creating profile ${file_name}") + file(WRITE ${file_name} ${profile}) + message(STATUS "CMake-Conan: Profile: \n${profile}") +endfunction() + + +function(conan_profile_detect_default) + message(STATUS "CMake-Conan: Checking if a default profile exists") + execute_process(COMMAND ${CONAN_COMMAND} profile path default + RESULT_VARIABLE return_code + OUTPUT_VARIABLE conan_stdout + ERROR_VARIABLE conan_stderr + ECHO_ERROR_VARIABLE # show the text output regardless + ECHO_OUTPUT_VARIABLE + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + if(NOT ${return_code} EQUAL "0") + message(STATUS "CMake-Conan: The default profile doesn't exist, detecting it.") + execute_process(COMMAND ${CONAN_COMMAND} profile detect + RESULT_VARIABLE return_code + OUTPUT_VARIABLE conan_stdout + ERROR_VARIABLE conan_stderr + ECHO_ERROR_VARIABLE # show the text output regardless + ECHO_OUTPUT_VARIABLE + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + endif() +endfunction() + + +function(conan_install) + cmake_parse_arguments(ARGS conan_args ${ARGN}) + set(conan_output_folder ${CMAKE_BINARY_DIR}/conan) + # Invoke "conan install" with the provided arguments + set(conan_args ${conan_args} -of=${conan_output_folder}) + message(STATUS "CMake-Conan: conan install ${CMAKE_SOURCE_DIR} ${conan_args} ${ARGN}") + + + # In case there was not a valid cmake executable in the PATH, we inject the + # same we used to invoke the provider to the PATH + if(DEFINED PATH_TO_CMAKE_BIN) + set(old_path $ENV{PATH}) + set(ENV{PATH} "$ENV{PATH}:${PATH_TO_CMAKE_BIN}") + endif() + + execute_process(COMMAND ${CONAN_COMMAND} install ${CMAKE_SOURCE_DIR} ${conan_args} ${ARGN} --format=json + RESULT_VARIABLE return_code + OUTPUT_VARIABLE conan_stdout + ERROR_VARIABLE conan_stderr + ECHO_ERROR_VARIABLE # show the text output regardless + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + + if(DEFINED PATH_TO_CMAKE_BIN) + set(ENV{PATH} "${old_path}") + endif() + + if(NOT "${return_code}" STREQUAL "0") + message(FATAL_ERROR "Conan install failed='${return_code}'") + endif() + + # the files are generated in a folder that depends on the layout used, if + # one is specified, but we don't know a priori where this is. + # TODO: this can be made more robust if Conan can provide this in the json output + string(JSON conan_generators_folder GET "${conan_stdout}" graph nodes 0 generators_folder) + cmake_path(CONVERT ${conan_generators_folder} TO_CMAKE_PATH_LIST conan_generators_folder) + + message(STATUS "CMake-Conan: CONAN_GENERATORS_FOLDER=${conan_generators_folder}") + set_property(GLOBAL PROPERTY CONAN_GENERATORS_FOLDER "${conan_generators_folder}") + # reconfigure on conanfile changes + string(JSON conanfile GET "${conan_stdout}" graph nodes 0 label) + message(STATUS "CMake-Conan: CONANFILE=${CMAKE_SOURCE_DIR}/${conanfile}") + set_property(DIRECTORY ${CMAKE_SOURCE_DIR} APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${CMAKE_SOURCE_DIR}/${conanfile}") + # success + set_property(GLOBAL PROPERTY CONAN_INSTALL_SUCCESS TRUE) + +endfunction() + + +function(conan_get_version conan_command conan_current_version) + execute_process( + COMMAND ${conan_command} --version + OUTPUT_VARIABLE conan_output + RESULT_VARIABLE conan_result + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + if(conan_result) + message(FATAL_ERROR "CMake-Conan: Error when trying to run Conan") + endif() + + string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" conan_version ${conan_output}) + set(${conan_current_version} ${conan_version} PARENT_SCOPE) +endfunction() + + +function(conan_version_check) + set(options ) + set(one_value_args MINIMUM CURRENT) + set(multi_value_args ) + cmake_parse_arguments(conan_version_check + "${options}" "${one_value_args}" "${multi_value_args}" ${ARGN}) + + if(NOT conan_version_check_MINIMUM) + message(FATAL_ERROR "CMake-Conan: Required parameter MINIMUM not set!") + endif() + if(NOT conan_version_check_CURRENT) + message(FATAL_ERROR "CMake-Conan: Required parameter CURRENT not set!") + endif() + + if(conan_version_check_CURRENT VERSION_LESS conan_version_check_MINIMUM) + message(FATAL_ERROR "CMake-Conan: Conan version must be ${conan_version_check_MINIMUM} or later") + endif() +endfunction() + + +macro(construct_profile_argument argument_variable profile_list) + set(${argument_variable} "") + if("${profile_list}" STREQUAL "CONAN_HOST_PROFILE") + set(_arg_flag "--profile:host=") + elseif("${profile_list}" STREQUAL "CONAN_BUILD_PROFILE") + set(_arg_flag "--profile:build=") + endif() + + set(_profile_list "${${profile_list}}") + list(TRANSFORM _profile_list REPLACE "auto-cmake" "${CMAKE_BINARY_DIR}/conan_host_profile") + list(TRANSFORM _profile_list PREPEND ${_arg_flag}) + set(${argument_variable} ${_profile_list}) + + unset(_arg_flag) + unset(_profile_list) +endmacro() + + +macro(conan_provide_dependency method package_name) + set_property(GLOBAL PROPERTY CONAN_PROVIDE_DEPENDENCY_INVOKED TRUE) + get_property(_conan_install_success GLOBAL PROPERTY CONAN_INSTALL_SUCCESS) + if(NOT _conan_install_success) + find_program(CONAN_COMMAND "conan" REQUIRED) + conan_get_version(${CONAN_COMMAND} CONAN_CURRENT_VERSION) + conan_version_check(MINIMUM ${CONAN_MINIMUM_VERSION} CURRENT ${CONAN_CURRENT_VERSION}) + message(STATUS "CMake-Conan: first find_package() found. Installing dependencies with Conan") + if("default" IN_LIST CONAN_HOST_PROFILE OR "default" IN_LIST CONAN_BUILD_PROFILE) + conan_profile_detect_default() + endif() + if("auto-cmake" IN_LIST CONAN_HOST_PROFILE) + detect_host_profile(${CMAKE_BINARY_DIR}/conan_host_profile) + endif() + construct_profile_argument(_host_profile_flags CONAN_HOST_PROFILE) + construct_profile_argument(_build_profile_flags CONAN_BUILD_PROFILE) + if(EXISTS "${CMAKE_SOURCE_DIR}/conanfile.py") + file(READ "${CMAKE_SOURCE_DIR}/conanfile.py" outfile) + if(NOT "${outfile}" MATCHES ".*CMakeDeps.*") + message(WARNING "Cmake-conan: CMakeDeps generator was not defined in the conanfile") + endif() + set(generator "") + elseif (EXISTS "${CMAKE_SOURCE_DIR}/conanfile.txt") + file(READ "${CMAKE_SOURCE_DIR}/conanfile.txt" outfile) + if(NOT "${outfile}" MATCHES ".*CMakeDeps.*") + message(WARNING "Cmake-conan: CMakeDeps generator was not defined in the conanfile. " + "Please define the generator as it will be mandatory in the future") + endif() + set(generator "-g;CMakeDeps") + endif() + get_property(_multiconfig_generator GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(NOT _multiconfig_generator) + message(STATUS "CMake-Conan: Installing single configuration ${CMAKE_BUILD_TYPE}") + conan_install(${_host_profile_flags} ${_build_profile_flags} ${CONAN_INSTALL_ARGS} ${generator}) + else() + message(STATUS "CMake-Conan: Installing both Debug and Release") + conan_install(${_host_profile_flags} ${_build_profile_flags} -s build_type=Release ${CONAN_INSTALL_ARGS} ${generator}) + conan_install(${_host_profile_flags} ${_build_profile_flags} -s build_type=Debug ${CONAN_INSTALL_ARGS} ${generator}) + endif() + unset(_host_profile_flags) + unset(_build_profile_flags) + unset(_multiconfig_generator) + unset(_conan_install_success) + else() + message(STATUS "CMake-Conan: find_package(${ARGV1}) found, 'conan install' already ran") + unset(_conan_install_success) + endif() + + get_property(_conan_generators_folder GLOBAL PROPERTY CONAN_GENERATORS_FOLDER) + + # Ensure that we consider Conan-provided packages ahead of any other, + # irrespective of other settings that modify the search order or search paths + # This follows the guidelines from the find_package documentation + # (https://cmake.org/cmake/help/latest/command/find_package.html): + # find_package ( PATHS paths... NO_DEFAULT_PATH) + # find_package () + + # Filter out `REQUIRED` from the argument list, as the first call may fail + set(_find_args_${package_name} "${ARGN}") + list(REMOVE_ITEM _find_args_${package_name} "REQUIRED") + if(NOT "MODULE" IN_LIST _find_args_${package_name}) + find_package(${package_name} ${_find_args_${package_name}} BYPASS_PROVIDER PATHS "${_conan_generators_folder}" NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) + unset(_find_args_${package_name}) + endif() + + # Invoke find_package a second time - if the first call succeeded, + # this will simply reuse the result. If not, fall back to CMake default search + # behaviour, also allowing modules to be searched. + if(NOT ${package_name}_FOUND) + list(FIND CMAKE_MODULE_PATH "${_conan_generators_folder}" _index) + if(_index EQUAL -1) + list(PREPEND CMAKE_MODULE_PATH "${_conan_generators_folder}") + endif() + unset(_index) + find_package(${package_name} ${ARGN} BYPASS_PROVIDER) + list(REMOVE_ITEM CMAKE_MODULE_PATH "${_conan_generators_folder}") + endif() +endmacro() + + +cmake_language( + SET_DEPENDENCY_PROVIDER conan_provide_dependency + SUPPORTED_METHODS FIND_PACKAGE +) + + +macro(conan_provide_dependency_check) + set(_conan_provide_dependency_invoked FALSE) + get_property(_conan_provide_dependency_invoked GLOBAL PROPERTY CONAN_PROVIDE_DEPENDENCY_INVOKED) + if(NOT _conan_provide_dependency_invoked) + message(WARNING "Conan is correctly configured as dependency provider, " + "but Conan has not been invoked. Please add at least one " + "call to `find_package()`.") + if(DEFINED CONAN_COMMAND) + # supress warning in case `CONAN_COMMAND` was specified but unused. + set(_conan_command ${CONAN_COMMAND}) + unset(_conan_command) + endif() + endif() + unset(_conan_provide_dependency_invoked) +endmacro() + + +# Add a deferred call at the end of processing the top-level directory +# to check if the dependency provider was invoked at all. +cmake_language(DEFER DIRECTORY "${CMAKE_SOURCE_DIR}" CALL conan_provide_dependency_check) + +# Configurable variables for Conan profiles +set(CONAN_HOST_PROFILE "default;auto-cmake" CACHE STRING "Conan host profile") +set(CONAN_BUILD_PROFILE "default" CACHE STRING "Conan build profile") +set(CONAN_INSTALL_ARGS "--build=missing" CACHE STRING "Command line arguments for conan install") + +find_program(_cmake_program NAMES cmake NO_PACKAGE_ROOT_PATH NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH) +if(NOT _cmake_program) + get_filename_component(PATH_TO_CMAKE_BIN "${CMAKE_COMMAND}" DIRECTORY) + set(PATH_TO_CMAKE_BIN "${PATH_TO_CMAKE_BIN}" CACHE INTERNAL "Path where the CMake executable is") +endif() + +cmake_policy(POP) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7abdf291..ff902133 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.10) -MESSAGE("############# nim_win_demo ##############") - -SET(CMAKE_CXX_STANDARD 11) +SET(CMAKE_CXX_STANDARD 14) IF (NOT CMAKE_BUILD_TYPE) SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build." FORCE) @@ -10,20 +8,12 @@ IF (NOT CMAKE_BUILD_TYPE) ENDIF () SET(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_LIST_DIR} CACHE PATH "default install prefix" FORCE) -SET(BUILD_WITH_CONAN OFF CACHE BOOL "Build project with conan") -SET(BUILD_WITH_NERTC_G2 OFF CACHE BOOL "Build project with NeRTC G2") -set(INSTALL_CPP_WRAPPER OFF CACHE BOOL "Exports headers of C++ wrapper when called --target INSTALL" FORCE) - -IF (CMAKE_BUILD_TYPE MATCHES "Release") - ADD_DEFINITIONS(-DNDEBUG) -ENDIF () IF (CMAKE_CL_64) ELSE () ADD_DEFINITIONS(-DSUPPORTLOCALPLAYER) ENDIF () -SET(CONAN_DISABLE_CHECK_COMPILER ON) SET(CMAKE_INCLUDE_CURRENT_DIR ON) SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON) SET_PROPERTY(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "cmake") @@ -33,79 +23,77 @@ SET(GROUP_UI_COMPONENTS "ui_components") SET(RELEASE_OUTPUT_7Z_FILE "${CMAKE_BINARY_DIR}/release.7z") STRING(REPLACE "/" "\\\\" RELEASE_OUTPUT_7Z_FILE_WIN ${RELEASE_OUTPUT_7Z_FILE}) -SET(NIM_CROSS_PLATFORM_SDK_FILE_NAME "nim-win32-ia32-9-9-0-383-build-1750145.tar.gz") -SET(DEBUG_THIRD_PARTY_LIBS "http://yx-web.nos.netease.com/package/1619605746/NIM_Windows_Demo_Build_Binaries_Debug.zip") -SET(RELEASE_THIRD_PARTY_LIBS "http://yx-web.nos.netease.com/package/1619605768/NIM_Windows_Demo_Build_Binaries_Release.zip") -SET(NIM_CROSS_PLATFORM_SDK_URL "https://yx-web-nosdn.netease.im/package/${NIM_CROSS_PLATFORM_SDK_FILE_NAME}") -SET(NERTC_SDK_URL "http://yx-web.nos.netease.com/package/1618217725/NERtc_Windows_SDK_v4.1.1.zip") +# SET(NIM_CROSS_PLATFORM_SDK_FILE_NAME "nim-win32-ia32-9-9-0-383-build-1750145.tar.gz") +# SET(DEBUG_THIRD_PARTY_LIBS "http://yx-web.nos.netease.com/package/1619605746/NIM_Windows_Demo_Build_Binaries_Debug.zip") +# SET(RELEASE_THIRD_PARTY_LIBS "http://yx-web.nos.netease.com/package/1619605768/NIM_Windows_Demo_Build_Binaries_Release.zip") +# SET(NIM_CROSS_PLATFORM_SDK_URL "https://yx-web-nosdn.netease.im/package/1725941048477/nim-win32-ia32-release-10-5-0-3214-build-2690765.tar.gz") +# SET(NERTC_SDK_URL "http://yx-web.nos.netease.com/package/1618217725/NERtc_Windows_SDK_v4.1.1.zip") PROJECT(nim_win_demo) # Build project with conan -IF (BUILD_WITH_CONAN) - # https://github.com/conan-io/cmake-conan - # Download automatically, you can also just copy the conan.cmake file - IF (NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake") - MESSAGE(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan") - FILE(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/master/conan.cmake" "${CMAKE_BINARY_DIR}/conan.cmake") - ENDIF() - INCLUDE(${CMAKE_BINARY_DIR}/conan.cmake) - conan_cmake_autodetect(settings) - conan_cmake_install(PATH_OR_REFERENCE .. BUILD missing SETTINGS ${settings}) - INCLUDE(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) - conan_basic_setup() -ENDIF () - -# Remove bin lib and include folder -file(REMOVE_RECURSE ${CMAKE_CURRENT_LIST_DIR}/bin) -file(REMOVE_RECURSE ${CMAKE_CURRENT_LIST_DIR}/lib) -file(REMOVE_RECURSE ${CMAKE_CURRENT_LIST_DIR}/include) +# https://github.com/conan-io/cmake-conan +# Download automatically, you can also just copy the conan.cmake file +IF (NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/.cmake/conan.cmake") + MESSAGE(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan") + FILE(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/master/conan.cmake" "${CMAKE_CURRENT_LIST_DIR}/.cmake/conan.cmake") +ENDIF() +INCLUDE(${CMAKE_CURRENT_LIST_DIR}/.cmake/conan.cmake) +conan_cmake_autodetect(settings) +conan_cmake_install(PATH_OR_REFERENCE .. BUILD missing SETTINGS ${settings}) +INCLUDE(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +# # Remove bin lib and include folder +# file(REMOVE_RECURSE ${CMAKE_CURRENT_LIST_DIR}/bin) +# file(REMOVE_RECURSE ${CMAKE_CURRENT_LIST_DIR}/lib) +# file(REMOVE_RECURSE ${CMAKE_CURRENT_LIST_DIR}/include) # Download third parties -IF (CMAKE_BUILD_TYPE MATCHES Debug AND NOT BUILD_WITH_CONAN) - IF (NOT EXISTS "${CMAKE_BINARY_DIR}/nim_demo_build_libraries_x86_debug.zip") - MESSAGE(STATUS "Downloading third party libraries from ${DEBUG_THIRD_PARTY_LIBS}") - FILE(DOWNLOAD ${DEBUG_THIRD_PARTY_LIBS} "${CMAKE_BINARY_DIR}/nim_demo_build_libraries_x86_debug.zip") - ENDIF () - EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E tar -xf "${CMAKE_BINARY_DIR}/nim_demo_build_libraries_x86_debug.zip" WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) -ENDIF () -IF (CMAKE_BUILD_TYPE MATCHES Release AND NOT BUILD_WITH_CONAN) - IF (NOT EXISTS "${CMAKE_BINARY_DIR}/nim_demo_build_libraries_x86_release.zip") - MESSAGE(STATUS "Downloading third party libraries from ${RELEASE_THIRD_PARTY_LIBS}") - FILE(DOWNLOAD "${RELEASE_THIRD_PARTY_LIBS}" "${CMAKE_BINARY_DIR}/nim_demo_build_libraries_x86_release.zip") - ENDIF () - EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E tar -xf "${CMAKE_BINARY_DIR}/nim_demo_build_libraries_x86_release.zip" WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) -ENDIF () +# IF (CMAKE_BUILD_TYPE MATCHES Debug AND NOT BUILD_WITH_CONAN) +# IF (NOT EXISTS "${CMAKE_BINARY_DIR}/nim_demo_build_libraries_x86_debug.zip") +# MESSAGE(STATUS "Downloading third party libraries from ${DEBUG_THIRD_PARTY_LIBS}") +# FILE(DOWNLOAD ${DEBUG_THIRD_PARTY_LIBS} "${CMAKE_BINARY_DIR}/nim_demo_build_libraries_x86_debug.zip") +# ENDIF () +# EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E tar -xf "${CMAKE_BINARY_DIR}/nim_demo_build_libraries_x86_debug.zip" WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) +# ENDIF () +# IF (CMAKE_BUILD_TYPE MATCHES Release AND NOT BUILD_WITH_CONAN) +# IF (NOT EXISTS "${CMAKE_BINARY_DIR}/nim_demo_build_libraries_x86_release.zip") +# MESSAGE(STATUS "Downloading third party libraries from ${RELEASE_THIRD_PARTY_LIBS}") +# FILE(DOWNLOAD "${RELEASE_THIRD_PARTY_LIBS}" "${CMAKE_BINARY_DIR}/nim_demo_build_libraries_x86_release.zip") +# ENDIF () +# EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E tar -xf "${CMAKE_BINARY_DIR}/nim_demo_build_libraries_x86_release.zip" WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) +# ENDIF () # Downlaod NeRTC G2 SDK -IF (NOT EXISTS "${CMAKE_BINARY_DIR}/nertc-SDK.zip" AND NOT BUILD_WITH_CONAN) - MESSAGE(STATUS "Downloading NeRTC-SDK from ${NERTC_SDK_URL}") - FILE(DOWNLOAD ${NERTC_SDK_URL} ${CMAKE_BINARY_DIR}/nertc-SDK.zip) -ENDIF () -EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E tar -xf "${CMAKE_BINARY_DIR}/nertc-SDK.zip" WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) -FILE(GLOB_RECURSE NERTC_HEADER_FIELS ${CMAKE_BINARY_DIR}/nertc_sdk_windows*/*.h) -FILE(GLOB_RECURSE NERTC_LIB_FIELS ${CMAKE_BINARY_DIR}/nertc_sdk_windows*/lib/x86/*.lib) -FILE(GLOB_RECURSE NERTC_BINARY_FIELS ${CMAKE_BINARY_DIR}/nertc_sdk_windows*/dll/x86/*.dll) - -FILE(COPY ${NERTC_HEADER_FIELS} DESTINATION ${CMAKE_CURRENT_LIST_DIR}/include) -FILE(COPY ${NERTC_LIB_FIELS} DESTINATION ${CMAKE_CURRENT_LIST_DIR}/lib) -FILE(COPY ${NERTC_BINARY_FIELS} DESTINATION ${CMAKE_CURRENT_LIST_DIR}/bin) +# IF (NOT EXISTS "${CMAKE_BINARY_DIR}/nertc-SDK.zip" AND NOT BUILD_WITH_CONAN) +# MESSAGE(STATUS "Downloading NeRTC-SDK from ${NERTC_SDK_URL}") +# FILE(DOWNLOAD ${NERTC_SDK_URL} ${CMAKE_BINARY_DIR}/nertc-SDK.zip) +# ENDIF () +# EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E tar -xf "${CMAKE_BINARY_DIR}/nertc-SDK.zip" WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) +# FILE(GLOB_RECURSE NERTC_HEADER_FIELS ${CMAKE_BINARY_DIR}/nertc_sdk_windows*/*.h) +# FILE(GLOB_RECURSE NERTC_LIB_FIELS ${CMAKE_BINARY_DIR}/nertc_sdk_windows*/lib/x86/*.lib) +# FILE(GLOB_RECURSE NERTC_BINARY_FIELS ${CMAKE_BINARY_DIR}/nertc_sdk_windows*/dll/x86/*.dll) + +# FILE(COPY ${NERTC_HEADER_FIELS} DESTINATION ${CMAKE_CURRENT_LIST_DIR}/include) +# FILE(COPY ${NERTC_LIB_FIELS} DESTINATION ${CMAKE_CURRENT_LIST_DIR}/lib) +# FILE(COPY ${NERTC_BINARY_FIELS} DESTINATION ${CMAKE_CURRENT_LIST_DIR}/bin) # Copy Resources -execute_process( COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_LIST_DIR}/resource ${CMAKE_CURRENT_LIST_DIR}/bin) +# execute_process( COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_LIST_DIR}/resource ${CMAKE_CURRENT_LIST_DIR}/bin) # Download NeIM SDK -IF (NOT EXISTS "${CMAKE_BINARY_DIR}/nim-cross-platform-SDK.zip" AND NOT BUILD_WITH_CONAN) - MESSAGE(STATUS "Downloading NIM cross-platform SDK from ${NIM_CROSS_PLATFORM_SDK_URL}") - FILE(DOWNLOAD ${NIM_CROSS_PLATFORM_SDK_URL} ${CMAKE_BINARY_DIR}/${NIM_CROSS_PLATFORM_SDK_FILE_NAME}) -ENDIF () -EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E tar -xf ${CMAKE_BINARY_DIR}/${NIM_CROSS_PLATFORM_SDK_FILE_NAME} WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) -# EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E tar -xf ${CMAKE_BINARY_DIR}/nim-win32-ia32-refs-tags-9.4.0.1554-build.166.tar.gz WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) -IF (NOT BUILD_WITH_CONAN) - ADD_SUBDIRECTORY(wrapper) - INCLUDE_DIRECTORIES(wrapper) - LINK_DIRECTORIES(${CMAKE_CURRENT_LIST_DIR}/wrapper) -ENDIF () +# IF (NOT EXISTS "${CMAKE_BINARY_DIR}/nim-cross-platform-SDK.zip" AND NOT BUILD_WITH_CONAN) +# MESSAGE(STATUS "Downloading NIM cross-platform SDK from ${NIM_CROSS_PLATFORM_SDK_URL}") +# FILE(DOWNLOAD ${NIM_CROSS_PLATFORM_SDK_URL} ${CMAKE_BINARY_DIR}/${NIM_CROSS_PLATFORM_SDK_FILE_NAME}) +# ENDIF () +# EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E tar -xf ${CMAKE_BINARY_DIR}/${NIM_CROSS_PLATFORM_SDK_FILE_NAME} WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) +# # EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E tar -xf ${CMAKE_BINARY_DIR}/nim-win32-ia32-refs-tags-9.4.0.1554-build.166.tar.gz WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) +# IF (NOT BUILD_WITH_CONAN) +# ADD_SUBDIRECTORY(wrapper) +# INCLUDE_DIRECTORIES(wrapper) +# LINK_DIRECTORIES(${CMAKE_CURRENT_LIST_DIR}/wrapper) +# ENDIF () ADD_DEFINITIONS( -DUNICODE @@ -114,9 +102,7 @@ ADD_DEFINITIONS( -DBUILD_WITH_XML_UTIL ) -IF (BUILD_WITH_NERTC_G2) - ADD_DEFINITIONS(-DUSING_RTC_G2) -ENDIF () +ADD_DEFINITIONS(-DUSING_RTC_G2) # Git information LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/.cmake/") @@ -161,10 +147,8 @@ ADD_SUBDIRECTORY(tool_kits/ui_component/nim_service) ADD_SUBDIRECTORY(tool_kits/ui_component/ui_kit) ADD_SUBDIRECTORY(tool_kits/cef/cef_module) ADD_SUBDIRECTORY(tool_kits/cef/cef_render) -ADD_SUBDIRECTORY(tool_kits/cef/cef_wrapper) ADD_SUBDIRECTORY(app_sdk) ADD_SUBDIRECTORY(nim_win_demo) -# uninstall ADD_SUBDIRECTORY(tool_kits/uninstall) SET_PROPERTY(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT nim_demo) diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 00000000..375f2038 --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,68 @@ +{ + "version": 3, + "cmakeMinimumRequired": { + "major": 3, + "minor": 19, + "patch": 0 + }, + "configurePresets": [ + { + "name": "windows", + "hidden": true, + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Windows" + }, + "warnings": { + "dev": true, + "deprecated": true + }, + "architecture": { + "value": "Win32", + "strategy": "set" + }, + "cacheVariables": { + "CMAKE_INSTALL_PREFIX": "${sourceDir}" + } + }, + { + "name": "Debug-Win32", + "inherits": "windows", + "displayName": "Windows (Debug)", + "description": "Conan v2 with CMake example for Windows - Debug Configuration", + "binaryDir": "${sourceDir}/build", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "CMAKE_DEBUG_POSTFIX": "d" + } + }, + { + "name": "Release-Win32", + "inherits": "windows", + "displayName": "Windows (Release)", + "description": "Conan v2 with CMake example for Windows - Release Configuration", + "binaryDir": "${sourceDir}/build", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release", + "CMAKE_INSTALL_PREFIX": "${sourceDir}/win32-release" + } + } + ], + "buildPresets": [ + { + "name": "Debug-Win32", + "configurePreset": "Debug-Win32", + "displayName": "Windows Local Compilation (Debug)", + "description": "Conan v2 with CMake example for Windows - Debug Configuration", + "configuration": "Debug" + }, + { + "name": "Release-Win32", + "configurePreset": "Release-Win32", + "displayName": "Windows Local Compilation (Release)", + "description": "Conan v2 with CMake example for Windows - Release Configuration", + "configuration": "Release" + } + ] +} \ No newline at end of file diff --git a/README.md b/README.md index 635d9d66..8e652e5e 100644 --- a/README.md +++ b/README.md @@ -37,27 +37,8 @@ cmake -Bbuild -G"Visual Studio 15 2017" -T"v141_xp" -DCMAKE_BUILD_TYPE=Debug 执行如上命令后,会自动下载依赖的三方库文件并解压到工程目录下,如执行无误您将看到如下信息: ```bash -############# nim_win_demo ############## -- Downloading third party libraries from http://yx-web.nos.netease.com/package/1619524144/nim_demo_build_libraries_x86_debug.zip -- Current git tag: 8.4.0, commit count: 772, describe: 8.4.0-2-gbe6c7fea -############# core ############# -############# base ############# -############# duilib ############# -############# shared ############# -############# db ############# -############# transfer file P2P ############# -############# av_kit ############# -############# rtc_kit ############# -############# capture_image ############# -############# image_view ############# -############# nim_service ############# -############# ui_kit ############# -############# cef_module ############# -############# cef_render ############# -############# libcef_dll_wrapper ############# -############# app_sdk ############# -############# nim_demo ############# -############# nim demo uninstaller ############# -- Configuring done -- Generating done -- Build files have been written to: C:/Code/nim_demo/build diff --git a/app_sdk/CMakeLists.txt b/app_sdk/CMakeLists.txt index f227aba1..c6009554 100644 --- a/app_sdk/CMakeLists.txt +++ b/app_sdk/CMakeLists.txt @@ -1,5 +1,3 @@ -MESSAGE("############# app_sdk #############") - SET(TARGET_NAME app_sdk) PROJECT(${TARGET_NAME}) diff --git a/chatroom/CMakeLists.txt b/chatroom/CMakeLists.txt index f2b5fd85..c4ae200b 100644 --- a/chatroom/CMakeLists.txt +++ b/chatroom/CMakeLists.txt @@ -1,5 +1,3 @@ -MESSAGE("############# core #############") - SET(TARGET_NAME chatroom) PROJECT(${TARGET_NAME}) diff --git a/conanfile.py b/conanfile.py index aa86f5f8..e8a66477 100644 --- a/conanfile.py +++ b/conanfile.py @@ -1,35 +1,35 @@ -from conans import ConanFile, tools -import platform +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import get, copy, collect_libs +from conan.tools.scm import Git +from conan.tools.build import check_min_cppstd +import os +import re -class ModuleConan(ConanFile): +class NebaseConan(ConanFile): + name = "nim_demo" + author = "Dylan <2894220@gmail.com>" + url = "https://github.com/netease-kit/NIM_PC_Demo.git" + description = "nim_demo" settings = "os", "compiler", "build_type", "arch" - build_requires = ( - # "sqlcipher/4.4.2", - "openssl/1.1.1k", - "tinyxml/2.6.2", - "jsoncpp/1.9.4", - "libuv/1.41.0", - "libyuv/cci.20201106", - "sqlite3/3.35.3", - "cef_2623_binaries/1.0.0-3-ge03c0ce@yunxin/testing", - "nls_play/1.0.0-1-g3f1fcc3@yunxin/testing", - "nim_p2p_sdk/1.0.0-3-g6a6cedb@yunxin/testing", - "nim_cpp_wrapper/8.5.0@yunxin/testing", - "nertc/4.1.1-2-g0dc7953@yunxin/testing" - ) - generators = "cmake" - build_policy = "missing" + options = {"shared": [True, False], "fPIC": [True, False]} + default_options = {"shared": False, "fPIC": True} + generators = "CMakeDeps", "cmake_paths", "cmake_find_package", "cmake" + exports_sources = "*", "!build" - def imports(self): - self.copy("*.dll", "bin", "bin", keep_path=True) - self.copy("*.pak", "bin", "bin", keep_path=True) - self.copy("*.dat", "bin", "bin", keep_path=True) - self.copy("cef*.pak", src="bin", dst="bin") - self.copy("*.txt", "bin", "bin", keep_path=True) - self.copy("*.bin", "bin", "bin", keep_path=True) - self.copy("wow_helper.exe", "bin", "bin", keep_path=True) - self.copy("*.html", "bin", "bin", keep_path=True) - self.copy("*.dylib", "lib", "lib") - self.copy("*.lib", "lib", "lib") - self.copy("*.h", "include", "include", keep_path=True) + def requirements(self): + self.requires("libjpeg/9e") + self.requires("openssl/3.3.2") + self.requires("jsoncpp/1.9.5") + self.requires("libuv/1.49.0") + self.requires("libyuv/1892") + self.requires("sqlite3/3.46.1") + self.requires("tinyxml/2.6.2") + self.requires("nim/10.5.0@yunxin/stable") + self.requires("nertc/4.1.1@yunxin/stable") + self.requires("cef/2623@yunxin/stable") + self.requires("ne_live_player/1.1.1@yunxin/stable") + self.requires("image_ole/4.2.0@yunxin/stable") + self.requires("ne_transfer/0.1.0@yunxin/stable") diff --git a/nim_win_demo/CMakeLists.txt b/nim_win_demo/CMakeLists.txt index ddf9acfb..186f1c80 100644 --- a/nim_win_demo/CMakeLists.txt +++ b/nim_win_demo/CMakeLists.txt @@ -1,5 +1,3 @@ -MESSAGE("############# nim_demo #############") - SET(TARGET_NAME nim_demo) PROJECT(${TARGET_NAME} DESCRIPTION "NetEase IM Demo") diff --git a/tool_kits/CMakeLists.txt b/tool_kits/CMakeLists.txt index ce646ea1..57a6c40a 100644 --- a/tool_kits/CMakeLists.txt +++ b/tool_kits/CMakeLists.txt @@ -1,7 +1,5 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.10) -MESSAGE("############# nim demo installer #############") - SET(CMAKE_CXX_STANDARD 11) SET(TARGET_NAME installer) diff --git a/tool_kits/base/CMakeLists.txt b/tool_kits/base/CMakeLists.txt index cc8f6445..2f29b770 100644 --- a/tool_kits/base/CMakeLists.txt +++ b/tool_kits/base/CMakeLists.txt @@ -1,5 +1,3 @@ -MESSAGE("############# base #############") - SET(TARGET_NAME base) PROJECT(${TARGET_NAME}) diff --git a/tool_kits/cef/cef_module/CMakeLists.txt b/tool_kits/cef/cef_module/CMakeLists.txt index 3a5d689d..44f40cc6 100644 --- a/tool_kits/cef/cef_module/CMakeLists.txt +++ b/tool_kits/cef/cef_module/CMakeLists.txt @@ -1,5 +1,3 @@ -MESSAGE("############# cef_module #############") - SET(TARGET_NAME cef_module) PROJECT(${TARGET_NAME}) diff --git a/tool_kits/cef/cef_render/CMakeLists.txt b/tool_kits/cef/cef_render/CMakeLists.txt index 4a010536..20316dd8 100644 --- a/tool_kits/cef/cef_render/CMakeLists.txt +++ b/tool_kits/cef/cef_render/CMakeLists.txt @@ -1,5 +1,3 @@ -MESSAGE("############# cef_render #############") - SET(TARGET_NAME render) PROJECT(${TARGET_NAME} DESCRIPTION "NetEase IM Demo CEF Render Process") diff --git a/tool_kits/cef/cef_wrapper/CMakeLists.txt b/tool_kits/cef/cef_wrapper/CMakeLists.txt deleted file mode 100644 index 00a7ea50..00000000 --- a/tool_kits/cef/cef_wrapper/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -MESSAGE("############# libcef_dll_wrapper #############") - -SET(TARGET_NAME libcef_dll_wrapper) - -PROJECT(${TARGET_NAME}) - -ADD_DEFINITIONS( - -DUSING_CEF_SHARED - -DNOMINMAX -) - -INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/..) - -FILE(GLOB_RECURSE LIBCEF_DLL_WRAPPER_SOURCE *.cc *.h *.cpp *.c) - -ADD_LIBRARY(${TARGET_NAME} STATIC ${LIBCEF_DLL_WRAPPER_SOURCE}) - -SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES FOLDER ${GROUP_UI_COMPONENTS}) diff --git a/tool_kits/cef/cef_wrapper/include/base/cef_atomic_ref_count.h b/tool_kits/cef/cef_wrapper/include/base/cef_atomic_ref_count.h deleted file mode 100644 index cd9b648b..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/cef_atomic_ref_count.h +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 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. - -// This is a low level implementation of atomic semantics for reference -// counting. Please use cef_ref_counted.h directly instead. -// -// The Chromium implementation includes annotations to avoid some false -// positives when using data race detection tools. Annotations are not -// currently supported by the CEF implementation. - -#ifndef CEF_INCLUDE_BASE_CEF_ATOMIC_REF_COUNT_H_ -#define CEF_INCLUDE_BASE_CEF_ATOMIC_REF_COUNT_H_ -#pragma once - -#if defined(BASE_ATOMIC_REF_COUNT_H_) -// Do nothing if 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(BUILDING_CEF_SHARED) -// When building CEF include the Chromium header directly. -#include "base/atomic_ref_count.h" -#else // !BUILDING_CEF_SHARED -// The following is substantially similar to the Chromium implementation. -// If the Chromium implementation diverges the below implementation should be -// updated to match. - -#include "include/base/cef_atomicops.h" - -// Annotations are not currently supported. -#define ANNOTATE_HAPPENS_BEFORE(obj) /* empty */ -#define ANNOTATE_HAPPENS_AFTER(obj) /* empty */ - -namespace base { - -typedef subtle::Atomic32 AtomicRefCount; - -// Increment a reference count by "increment", which must exceed 0. -inline void AtomicRefCountIncN(volatile AtomicRefCount *ptr, - AtomicRefCount increment) { - subtle::NoBarrier_AtomicIncrement(ptr, increment); -} - -// Decrement a reference count by "decrement", which must exceed 0, -// and return whether the result is non-zero. -// Insert barriers to ensure that state written before the reference count -// became zero will be visible to a thread that has just made the count zero. -inline bool AtomicRefCountDecN(volatile AtomicRefCount *ptr, - AtomicRefCount decrement) { - ANNOTATE_HAPPENS_BEFORE(ptr); - bool res = (subtle::Barrier_AtomicIncrement(ptr, -decrement) != 0); - if (!res) { - ANNOTATE_HAPPENS_AFTER(ptr); - } - return res; -} - -// Increment a reference count by 1. -inline void AtomicRefCountInc(volatile AtomicRefCount *ptr) { - base::AtomicRefCountIncN(ptr, 1); -} - -// Decrement a reference count by 1 and return whether the result is non-zero. -// Insert barriers to ensure that state written before the reference count -// became zero will be visible to a thread that has just made the count zero. -inline bool AtomicRefCountDec(volatile AtomicRefCount *ptr) { - return base::AtomicRefCountDecN(ptr, 1); -} - -// Return whether the reference count is one. If the reference count is used -// in the conventional way, a refrerence count of 1 implies that the current -// thread owns the reference and no other thread shares it. This call performs -// the test for a reference count of one, and performs the memory barrier -// needed for the owning thread to act on the object, knowing that it has -// exclusive access to the object. -inline bool AtomicRefCountIsOne(volatile AtomicRefCount *ptr) { - bool res = (subtle::Acquire_Load(ptr) == 1); - if (res) { - ANNOTATE_HAPPENS_AFTER(ptr); - } - return res; -} - -// Return whether the reference count is zero. With conventional object -// referencing counting, the object will be destroyed, so the reference count -// should never be zero. Hence this is generally used for a debug check. -inline bool AtomicRefCountIsZero(volatile AtomicRefCount *ptr) { - bool res = (subtle::Acquire_Load(ptr) == 0); - if (res) { - ANNOTATE_HAPPENS_AFTER(ptr); - } - return res; -} - -} // namespace base - -#endif // !BUILDING_CEF_SHARED - -#endif // CEF_INCLUDE_BASE_CEF_ATOMIC_REF_COUNT_H_ diff --git a/tool_kits/cef/cef_wrapper/include/base/cef_atomicops.h b/tool_kits/cef/cef_wrapper/include/base/cef_atomicops.h deleted file mode 100644 index cd83115c..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/cef_atomicops.h +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012 -// 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. - -// For atomic operations on reference counts, see cef_atomic_ref_count.h. - -// The routines exported by this module are subtle. If you use them, even if -// you get the code right, it will depend on careful reasoning about atomicity -// and memory ordering; it will be less readable, and harder to maintain. If -// you plan to use these routines, you should have a good reason, such as solid -// evidence that performance would otherwise suffer, or there being no -// alternative. You should assume only properties explicitly guaranteed by the -// specifications in this file. You are almost certainly _not_ writing code -// just for the x86; if you assume x86 semantics, x86 hardware bugs and -// implementations on other archtectures will cause your code to break. If you -// do not know what you are doing, avoid these routines, and use a Mutex. -// -// It is incorrect to make direct assignments to/from an atomic variable. -// You should use one of the Load or Store routines. The NoBarrier -// versions are provided when no barriers are needed: -// NoBarrier_Store() -// NoBarrier_Load() -// Although there are currently no compiler enforcement, you are encouraged -// to use these. -// - -#ifndef CEF_INCLUDE_BASE_CEF_ATOMICOPS_H_ -#define CEF_INCLUDE_BASE_CEF_ATOMICOPS_H_ -#pragma once - -#if defined(BASE_ATOMICOPS_H_) -// Do nothing if 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(BUILDING_CEF_SHARED) -// When building CEF include the Chromium header directly. -#include "base/atomicops.h" -#else // !BUILDING_CEF_SHARED -// The following is substantially similar to the Chromium implementation. -// If the Chromium implementation diverges the below implementation should be -// updated to match. - -#include - -#include "include/base/cef_build.h" - -#if defined(OS_WIN) && defined(ARCH_CPU_64_BITS) -// windows.h #defines this (only on x64). This causes problems because the -// public API also uses MemoryBarrier at the public name for this fence. So, on -// X64, undef it, and call its documented -// (http://msdn.microsoft.com/en-us/library/windows/desktop/ms684208.aspx) -// implementation directly. -#undef MemoryBarrier -#endif - -namespace base { -namespace subtle { - -typedef int32_t Atomic32; -#ifdef ARCH_CPU_64_BITS -// We need to be able to go between Atomic64 and AtomicWord implicitly. This -// means Atomic64 and AtomicWord should be the same type on 64-bit. -#if defined(__ILP32__) || defined(OS_NACL) -// NaCl's intptr_t is not actually 64-bits on 64-bit! -// http://code.google.com/p/nativeclient/issues/detail?id=1162 -typedef int64_t Atomic64; -#else -typedef intptr_t Atomic64; -#endif -#endif - -// Use AtomicWord for a machine-sized pointer. It will use the Atomic32 or -// Atomic64 routines below, depending on your architecture. -typedef intptr_t AtomicWord; - -// Atomically execute: -// result = *ptr; -// if (*ptr == old_value) -// *ptr = new_value; -// return result; -// -// I.e., replace "*ptr" with "new_value" if "*ptr" used to be "old_value". -// Always return the old value of "*ptr" -// -// This routine implies no memory barriers. -Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr, - Atomic32 old_value, - Atomic32 new_value); - -// Atomically store new_value into *ptr, returning the previous value held in -// *ptr. This routine implies no memory barriers. -Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr, Atomic32 new_value); - -// Atomically increment *ptr by "increment". Returns the new value of -// *ptr with the increment applied. This routine implies no memory barriers. -Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr, Atomic32 increment); - -Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr, - Atomic32 increment); - -// These following lower-level operations are typically useful only to people -// implementing higher-level synchronization operations like spinlocks, -// mutexes, and condition-variables. They combine CompareAndSwap(), a load, or -// a store with appropriate memory-ordering instructions. "Acquire" operations -// ensure that no later memory access can be reordered ahead of the operation. -// "Release" operations ensure that no previous memory access can be reordered -// after the operation. "Barrier" operations have both "Acquire" and "Release" -// semantics. A MemoryBarrier() has "Barrier" semantics, but does no memory -// access. -Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr, - Atomic32 old_value, - Atomic32 new_value); -Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr, - Atomic32 old_value, - Atomic32 new_value); - -void MemoryBarrier(); -void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value); -void Acquire_Store(volatile Atomic32* ptr, Atomic32 value); -void Release_Store(volatile Atomic32* ptr, Atomic32 value); - -Atomic32 NoBarrier_Load(volatile const Atomic32* ptr); -Atomic32 Acquire_Load(volatile const Atomic32* ptr); -Atomic32 Release_Load(volatile const Atomic32* ptr); - -// 64-bit atomic operations (only available on 64-bit processors). -#ifdef ARCH_CPU_64_BITS -Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr, - Atomic64 old_value, - Atomic64 new_value); -Atomic64 NoBarrier_AtomicExchange(volatile Atomic64* ptr, Atomic64 new_value); -Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr, Atomic64 increment); -Atomic64 Barrier_AtomicIncrement(volatile Atomic64* ptr, Atomic64 increment); - -Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr, - Atomic64 old_value, - Atomic64 new_value); -Atomic64 Release_CompareAndSwap(volatile Atomic64* ptr, - Atomic64 old_value, - Atomic64 new_value); -void NoBarrier_Store(volatile Atomic64* ptr, Atomic64 value); -void Acquire_Store(volatile Atomic64* ptr, Atomic64 value); -void Release_Store(volatile Atomic64* ptr, Atomic64 value); -Atomic64 NoBarrier_Load(volatile const Atomic64* ptr); -Atomic64 Acquire_Load(volatile const Atomic64* ptr); -Atomic64 Release_Load(volatile const Atomic64* ptr); -#endif // ARCH_CPU_64_BITS - -} // namespace subtle -} // namespace base - -// Include our platform specific implementation. -#if defined(OS_WIN) && defined(COMPILER_MSVC) && defined(ARCH_CPU_X86_FAMILY) -#include "include/base/internal/cef_atomicops_x86_msvc.h" -#elif defined(OS_MACOSX) -#include "include/base/internal/cef_atomicops_mac.h" -#elif defined(COMPILER_GCC) && defined(ARCH_CPU_X86_FAMILY) -#include "include/base/internal/cef_atomicops_x86_gcc.h" -#else -#error "Atomic operations are not supported on your platform" -#endif - -// On some platforms we need additional declarations to make -// AtomicWord compatible with our other Atomic* types. -#if defined(OS_MACOSX) || defined(OS_OPENBSD) -#include "include/base/internal/cef_atomicops_atomicword_compat.h" -#endif - -#endif // !BUILDING_CEF_SHARED - -#endif // CEF_INCLUDE_BASE_CEF_ATOMICOPS_H_ diff --git a/tool_kits/cef/cef_wrapper/include/base/cef_basictypes.h b/tool_kits/cef/cef_wrapper/include/base/cef_basictypes.h deleted file mode 100644 index 193e910f..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/cef_basictypes.h +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012 -// 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. - -#ifndef CEF_INCLUDE_BASE_CEF_BASICTYPES_H_ -#define CEF_INCLUDE_BASE_CEF_BASICTYPES_H_ -#pragma once - -#include // For UINT_MAX -#include // For size_t - -#include "include/base/cef_build.h" - -// The NSPR system headers define 64-bit as |long| when possible, except on -// Mac OS X. In order to not have typedef mismatches, we do the same on LP64. -// -// On Mac OS X, |long long| is used for 64-bit types for compatibility with -// format macros even in the LP64 model. -#if defined(__LP64__) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) -typedef long int64; // NOLINT(runtime/int) -typedef unsigned long uint64; // NOLINT(runtime/int) -#else -typedef long long int64; // NOLINT(runtime/int) -typedef unsigned long long uint64; // NOLINT(runtime/int) -#endif - -// TODO: Remove these type guards. These are to avoid conflicts with -// obsolete/protypes.h in the Gecko SDK. -#ifndef _INT32 -#define _INT32 -typedef int int32; -#endif - -// TODO: Remove these type guards. These are to avoid conflicts with -// obsolete/protypes.h in the Gecko SDK. -#ifndef _UINT32 -#define _UINT32 -typedef unsigned int uint32; -#endif - -// UTF-16 character type. -// This should be kept synchronized with base/strings/string16.h -#ifndef char16 -#if defined(WCHAR_T_IS_UTF16) -typedef wchar_t char16; -#elif defined(WCHAR_T_IS_UTF32) -typedef unsigned short char16; -#endif -#endif - -#endif // CEF_INCLUDE_BASE_CEF_BASICTYPES_H_ diff --git a/tool_kits/cef/cef_wrapper/include/base/cef_bind.h b/tool_kits/cef/cef_wrapper/include/base/cef_bind.h deleted file mode 100644 index dcf86ac7..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/cef_bind.h +++ /dev/null @@ -1,548 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 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. - -#ifndef CEF_INCLUDE_BASE_CEF_BIND_H_ -#define CEF_INCLUDE_BASE_CEF_BIND_H_ -#pragma once - -#if defined(BASE_BIND_H_) -// Do nothing if 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(BUILDING_CEF_SHARED) -// When building CEF include the Chromium header directly. -#include "base/bind.h" -#else // !BUILDING_CEF_SHARED -// The following is substantially similar to the Chromium implementation. -// If the Chromium implementation diverges the below implementation should be -// updated to match. - -#include "include/base/internal/cef_bind_internal.h" -#include "include/base/internal/cef_callback_internal.h" - -// ----------------------------------------------------------------------------- -// Usage documentation -// ----------------------------------------------------------------------------- -// -// See base/cef_callback.h for documentation. -// -// -// ----------------------------------------------------------------------------- -// Implementation notes -// ----------------------------------------------------------------------------- -// -// If you're reading the implementation, before proceeding further, you should -// read the top comment of base/bind_internal.h for a definition of common -// terms and concepts. -// -// RETURN TYPES -// -// Though Bind()'s result is meant to be stored in a Callback<> type, it -// cannot actually return the exact type without requiring a large amount -// of extra template specializations. The problem is that in order to -// discern the correct specialization of Callback<>, Bind would need to -// unwrap the function signature to determine the signature's arity, and -// whether or not it is a method. -// -// Each unique combination of (arity, function_type, num_prebound) where -// function_type is one of {function, method, const_method} would require -// one specialization. We eventually have to do a similar number of -// specializations anyways in the implementation (see the Invoker<>, -// classes). However, it is avoidable in Bind if we return the result -// via an indirection like we do below. -// -// TODO(ajwong): We might be able to avoid this now, but need to test. -// -// It is possible to move most of the COMPILE_ASSERT asserts into BindState<>, -// but it feels a little nicer to have the asserts here so people do not -// need to crack open bind_internal.h. On the other hand, it makes Bind() -// harder to read. - -namespace base { - -template -base::Callback< - typename cef_internal::BindState< - typename cef_internal::FunctorTraits::RunnableType, - typename cef_internal::FunctorTraits::RunType, - void()> - ::UnboundRunType> -Bind(Functor functor) { - // Typedefs for how to store and run the functor. - typedef typename cef_internal::FunctorTraits::RunnableType RunnableType; - typedef typename cef_internal::FunctorTraits::RunType RunType; - - typedef cef_internal::BindState BindState; - - - return Callback( - new BindState(cef_internal::MakeRunnable(functor))); -} - -template -base::Callback< - typename cef_internal::BindState< - typename cef_internal::FunctorTraits::RunnableType, - typename cef_internal::FunctorTraits::RunType, - void(typename cef_internal::CallbackParamTraits::StorageType)> - ::UnboundRunType> -Bind(Functor functor, const P1& p1) { - // Typedefs for how to store and run the functor. - typedef typename cef_internal::FunctorTraits::RunnableType RunnableType; - typedef typename cef_internal::FunctorTraits::RunType RunType; - - // Use RunnableType::RunType instead of RunType above because our - // checks should below for bound references need to know what the actual - // functor is going to interpret the argument as. - typedef cef_internal::FunctionTraits - BoundFunctorTraits; - - // Do not allow binding a non-const reference parameter. Non-const reference - // parameters are disallowed by the Google style guide. Also, binding a - // non-const reference parameter can make for subtle bugs because the - // invoked function will receive a reference to the stored copy of the - // argument and not the original. - COMPILE_ASSERT( - !(is_non_const_reference::value ), - do_not_bind_functions_with_nonconst_ref); - - // For methods, we need to be careful for parameter 1. We do not require - // a scoped_refptr because BindState<> itself takes care of AddRef() for - // methods. We also disallow binding of an array as the method's target - // object. - COMPILE_ASSERT( - cef_internal::HasIsMethodTag::value || - !cef_internal::NeedsScopedRefptrButGetsRawPtr::value, - p1_is_refcounted_type_and_needs_scoped_refptr); - COMPILE_ASSERT(!cef_internal::HasIsMethodTag::value || - !is_array::value, - first_bound_argument_to_method_cannot_be_array); - typedef cef_internal::BindState::StorageType)> BindState; - - - return Callback( - new BindState(cef_internal::MakeRunnable(functor), p1)); -} - -template -base::Callback< - typename cef_internal::BindState< - typename cef_internal::FunctorTraits::RunnableType, - typename cef_internal::FunctorTraits::RunType, - void(typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType)> - ::UnboundRunType> -Bind(Functor functor, const P1& p1, const P2& p2) { - // Typedefs for how to store and run the functor. - typedef typename cef_internal::FunctorTraits::RunnableType RunnableType; - typedef typename cef_internal::FunctorTraits::RunType RunType; - - // Use RunnableType::RunType instead of RunType above because our - // checks should below for bound references need to know what the actual - // functor is going to interpret the argument as. - typedef cef_internal::FunctionTraits - BoundFunctorTraits; - - // Do not allow binding a non-const reference parameter. Non-const reference - // parameters are disallowed by the Google style guide. Also, binding a - // non-const reference parameter can make for subtle bugs because the - // invoked function will receive a reference to the stored copy of the - // argument and not the original. - COMPILE_ASSERT( - !(is_non_const_reference::value || - is_non_const_reference::value ), - do_not_bind_functions_with_nonconst_ref); - - // For methods, we need to be careful for parameter 1. We do not require - // a scoped_refptr because BindState<> itself takes care of AddRef() for - // methods. We also disallow binding of an array as the method's target - // object. - COMPILE_ASSERT( - cef_internal::HasIsMethodTag::value || - !cef_internal::NeedsScopedRefptrButGetsRawPtr::value, - p1_is_refcounted_type_and_needs_scoped_refptr); - COMPILE_ASSERT(!cef_internal::HasIsMethodTag::value || - !is_array::value, - first_bound_argument_to_method_cannot_be_array); - COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr::value, - p2_is_refcounted_type_and_needs_scoped_refptr); - typedef cef_internal::BindState::StorageType, - typename cef_internal::CallbackParamTraits::StorageType)> BindState; - - - return Callback( - new BindState(cef_internal::MakeRunnable(functor), p1, p2)); -} - -template -base::Callback< - typename cef_internal::BindState< - typename cef_internal::FunctorTraits::RunnableType, - typename cef_internal::FunctorTraits::RunType, - void(typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType)> - ::UnboundRunType> -Bind(Functor functor, const P1& p1, const P2& p2, const P3& p3) { - // Typedefs for how to store and run the functor. - typedef typename cef_internal::FunctorTraits::RunnableType RunnableType; - typedef typename cef_internal::FunctorTraits::RunType RunType; - - // Use RunnableType::RunType instead of RunType above because our - // checks should below for bound references need to know what the actual - // functor is going to interpret the argument as. - typedef cef_internal::FunctionTraits - BoundFunctorTraits; - - // Do not allow binding a non-const reference parameter. Non-const reference - // parameters are disallowed by the Google style guide. Also, binding a - // non-const reference parameter can make for subtle bugs because the - // invoked function will receive a reference to the stored copy of the - // argument and not the original. - COMPILE_ASSERT( - !(is_non_const_reference::value || - is_non_const_reference::value || - is_non_const_reference::value ), - do_not_bind_functions_with_nonconst_ref); - - // For methods, we need to be careful for parameter 1. We do not require - // a scoped_refptr because BindState<> itself takes care of AddRef() for - // methods. We also disallow binding of an array as the method's target - // object. - COMPILE_ASSERT( - cef_internal::HasIsMethodTag::value || - !cef_internal::NeedsScopedRefptrButGetsRawPtr::value, - p1_is_refcounted_type_and_needs_scoped_refptr); - COMPILE_ASSERT(!cef_internal::HasIsMethodTag::value || - !is_array::value, - first_bound_argument_to_method_cannot_be_array); - COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr::value, - p2_is_refcounted_type_and_needs_scoped_refptr); - COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr::value, - p3_is_refcounted_type_and_needs_scoped_refptr); - typedef cef_internal::BindState::StorageType, - typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType)> BindState; - - - return Callback( - new BindState(cef_internal::MakeRunnable(functor), p1, p2, p3)); -} - -template -base::Callback< - typename cef_internal::BindState< - typename cef_internal::FunctorTraits::RunnableType, - typename cef_internal::FunctorTraits::RunType, - void(typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType)> - ::UnboundRunType> -Bind(Functor functor, const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - // Typedefs for how to store and run the functor. - typedef typename cef_internal::FunctorTraits::RunnableType RunnableType; - typedef typename cef_internal::FunctorTraits::RunType RunType; - - // Use RunnableType::RunType instead of RunType above because our - // checks should below for bound references need to know what the actual - // functor is going to interpret the argument as. - typedef cef_internal::FunctionTraits - BoundFunctorTraits; - - // Do not allow binding a non-const reference parameter. Non-const reference - // parameters are disallowed by the Google style guide. Also, binding a - // non-const reference parameter can make for subtle bugs because the - // invoked function will receive a reference to the stored copy of the - // argument and not the original. - COMPILE_ASSERT( - !(is_non_const_reference::value || - is_non_const_reference::value || - is_non_const_reference::value || - is_non_const_reference::value ), - do_not_bind_functions_with_nonconst_ref); - - // For methods, we need to be careful for parameter 1. We do not require - // a scoped_refptr because BindState<> itself takes care of AddRef() for - // methods. We also disallow binding of an array as the method's target - // object. - COMPILE_ASSERT( - cef_internal::HasIsMethodTag::value || - !cef_internal::NeedsScopedRefptrButGetsRawPtr::value, - p1_is_refcounted_type_and_needs_scoped_refptr); - COMPILE_ASSERT(!cef_internal::HasIsMethodTag::value || - !is_array::value, - first_bound_argument_to_method_cannot_be_array); - COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr::value, - p2_is_refcounted_type_and_needs_scoped_refptr); - COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr::value, - p3_is_refcounted_type_and_needs_scoped_refptr); - COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr::value, - p4_is_refcounted_type_and_needs_scoped_refptr); - typedef cef_internal::BindState::StorageType, - typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType)> BindState; - - - return Callback( - new BindState(cef_internal::MakeRunnable(functor), p1, p2, p3, p4)); -} - -template -base::Callback< - typename cef_internal::BindState< - typename cef_internal::FunctorTraits::RunnableType, - typename cef_internal::FunctorTraits::RunType, - void(typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType)> - ::UnboundRunType> -Bind(Functor functor, const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5) { - // Typedefs for how to store and run the functor. - typedef typename cef_internal::FunctorTraits::RunnableType RunnableType; - typedef typename cef_internal::FunctorTraits::RunType RunType; - - // Use RunnableType::RunType instead of RunType above because our - // checks should below for bound references need to know what the actual - // functor is going to interpret the argument as. - typedef cef_internal::FunctionTraits - BoundFunctorTraits; - - // Do not allow binding a non-const reference parameter. Non-const reference - // parameters are disallowed by the Google style guide. Also, binding a - // non-const reference parameter can make for subtle bugs because the - // invoked function will receive a reference to the stored copy of the - // argument and not the original. - COMPILE_ASSERT( - !(is_non_const_reference::value || - is_non_const_reference::value || - is_non_const_reference::value || - is_non_const_reference::value || - is_non_const_reference::value ), - do_not_bind_functions_with_nonconst_ref); - - // For methods, we need to be careful for parameter 1. We do not require - // a scoped_refptr because BindState<> itself takes care of AddRef() for - // methods. We also disallow binding of an array as the method's target - // object. - COMPILE_ASSERT( - cef_internal::HasIsMethodTag::value || - !cef_internal::NeedsScopedRefptrButGetsRawPtr::value, - p1_is_refcounted_type_and_needs_scoped_refptr); - COMPILE_ASSERT(!cef_internal::HasIsMethodTag::value || - !is_array::value, - first_bound_argument_to_method_cannot_be_array); - COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr::value, - p2_is_refcounted_type_and_needs_scoped_refptr); - COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr::value, - p3_is_refcounted_type_and_needs_scoped_refptr); - COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr::value, - p4_is_refcounted_type_and_needs_scoped_refptr); - COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr::value, - p5_is_refcounted_type_and_needs_scoped_refptr); - typedef cef_internal::BindState::StorageType, - typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType)> BindState; - - - return Callback( - new BindState(cef_internal::MakeRunnable(functor), p1, p2, p3, p4, p5)); -} - -template -base::Callback< - typename cef_internal::BindState< - typename cef_internal::FunctorTraits::RunnableType, - typename cef_internal::FunctorTraits::RunType, - void(typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType)> - ::UnboundRunType> -Bind(Functor functor, const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5, const P6& p6) { - // Typedefs for how to store and run the functor. - typedef typename cef_internal::FunctorTraits::RunnableType RunnableType; - typedef typename cef_internal::FunctorTraits::RunType RunType; - - // Use RunnableType::RunType instead of RunType above because our - // checks should below for bound references need to know what the actual - // functor is going to interpret the argument as. - typedef cef_internal::FunctionTraits - BoundFunctorTraits; - - // Do not allow binding a non-const reference parameter. Non-const reference - // parameters are disallowed by the Google style guide. Also, binding a - // non-const reference parameter can make for subtle bugs because the - // invoked function will receive a reference to the stored copy of the - // argument and not the original. - COMPILE_ASSERT( - !(is_non_const_reference::value || - is_non_const_reference::value || - is_non_const_reference::value || - is_non_const_reference::value || - is_non_const_reference::value || - is_non_const_reference::value ), - do_not_bind_functions_with_nonconst_ref); - - // For methods, we need to be careful for parameter 1. We do not require - // a scoped_refptr because BindState<> itself takes care of AddRef() for - // methods. We also disallow binding of an array as the method's target - // object. - COMPILE_ASSERT( - cef_internal::HasIsMethodTag::value || - !cef_internal::NeedsScopedRefptrButGetsRawPtr::value, - p1_is_refcounted_type_and_needs_scoped_refptr); - COMPILE_ASSERT(!cef_internal::HasIsMethodTag::value || - !is_array::value, - first_bound_argument_to_method_cannot_be_array); - COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr::value, - p2_is_refcounted_type_and_needs_scoped_refptr); - COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr::value, - p3_is_refcounted_type_and_needs_scoped_refptr); - COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr::value, - p4_is_refcounted_type_and_needs_scoped_refptr); - COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr::value, - p5_is_refcounted_type_and_needs_scoped_refptr); - COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr::value, - p6_is_refcounted_type_and_needs_scoped_refptr); - typedef cef_internal::BindState::StorageType, - typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType)> BindState; - - - return Callback( - new BindState(cef_internal::MakeRunnable(functor), p1, p2, p3, p4, p5, p6)); -} - -template -base::Callback< - typename cef_internal::BindState< - typename cef_internal::FunctorTraits::RunnableType, - typename cef_internal::FunctorTraits::RunType, - void(typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType)> - ::UnboundRunType> -Bind(Functor functor, const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5, const P6& p6, const P7& p7) { - // Typedefs for how to store and run the functor. - typedef typename cef_internal::FunctorTraits::RunnableType RunnableType; - typedef typename cef_internal::FunctorTraits::RunType RunType; - - // Use RunnableType::RunType instead of RunType above because our - // checks should below for bound references need to know what the actual - // functor is going to interpret the argument as. - typedef cef_internal::FunctionTraits - BoundFunctorTraits; - - // Do not allow binding a non-const reference parameter. Non-const reference - // parameters are disallowed by the Google style guide. Also, binding a - // non-const reference parameter can make for subtle bugs because the - // invoked function will receive a reference to the stored copy of the - // argument and not the original. - COMPILE_ASSERT( - !(is_non_const_reference::value || - is_non_const_reference::value || - is_non_const_reference::value || - is_non_const_reference::value || - is_non_const_reference::value || - is_non_const_reference::value || - is_non_const_reference::value ), - do_not_bind_functions_with_nonconst_ref); - - // For methods, we need to be careful for parameter 1. We do not require - // a scoped_refptr because BindState<> itself takes care of AddRef() for - // methods. We also disallow binding of an array as the method's target - // object. - COMPILE_ASSERT( - cef_internal::HasIsMethodTag::value || - !cef_internal::NeedsScopedRefptrButGetsRawPtr::value, - p1_is_refcounted_type_and_needs_scoped_refptr); - COMPILE_ASSERT(!cef_internal::HasIsMethodTag::value || - !is_array::value, - first_bound_argument_to_method_cannot_be_array); - COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr::value, - p2_is_refcounted_type_and_needs_scoped_refptr); - COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr::value, - p3_is_refcounted_type_and_needs_scoped_refptr); - COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr::value, - p4_is_refcounted_type_and_needs_scoped_refptr); - COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr::value, - p5_is_refcounted_type_and_needs_scoped_refptr); - COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr::value, - p6_is_refcounted_type_and_needs_scoped_refptr); - COMPILE_ASSERT(!cef_internal::NeedsScopedRefptrButGetsRawPtr::value, - p7_is_refcounted_type_and_needs_scoped_refptr); - typedef cef_internal::BindState::StorageType, - typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType, - typename cef_internal::CallbackParamTraits::StorageType)> BindState; - - - return Callback( - new BindState(cef_internal::MakeRunnable(functor), p1, p2, p3, p4, p5, p6, - p7)); -} - -} // namespace base - -#endif // !BUILDING_CEF_SHARED - -#endif // CEF_INCLUDE_BASE_CEF_BIND_H_ diff --git a/tool_kits/cef/cef_wrapper/include/base/cef_bind_helpers.h b/tool_kits/cef/cef_wrapper/include/base/cef_bind_helpers.h deleted file mode 100644 index e8c4cffd..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/cef_bind_helpers.h +++ /dev/null @@ -1,586 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 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. - -// This defines a set of argument wrappers and related factory methods that -// can be used specify the refcounting and reference semantics of arguments -// that are bound by the Bind() function in base/bind.h. -// -// It also defines a set of simple functions and utilities that people want -// when using Callback<> and Bind(). -// -// -// ARGUMENT BINDING WRAPPERS -// -// The wrapper functions are base::Unretained(), base::Owned(), base::Passed(), -// base::ConstRef(), and base::IgnoreResult(). -// -// Unretained() allows Bind() to bind a non-refcounted class, and to disable -// refcounting on arguments that are refcounted objects. -// -// Owned() transfers ownership of an object to the Callback resulting from -// bind; the object will be deleted when the Callback is deleted. -// -// Passed() is for transferring movable-but-not-copyable types (eg. scoped_ptr) -// through a Callback. Logically, this signifies a destructive transfer of -// the state of the argument into the target function. Invoking -// Callback::Run() twice on a Callback that was created with a Passed() -// argument will CHECK() because the first invocation would have already -// transferred ownership to the target function. -// -// ConstRef() allows binding a constant reference to an argument rather -// than a copy. -// -// IgnoreResult() is used to adapt a function or Callback with a return type to -// one with a void return. This is most useful if you have a function with, -// say, a pesky ignorable bool return that you want to use with PostTask or -// something else that expect a Callback with a void return. -// -// EXAMPLE OF Unretained(): -// -// class Foo { -// public: -// void func() { cout << "Foo:f" << endl; } -// }; -// -// // In some function somewhere. -// Foo foo; -// Closure foo_callback = -// Bind(&Foo::func, Unretained(&foo)); -// foo_callback.Run(); // Prints "Foo:f". -// -// Without the Unretained() wrapper on |&foo|, the above call would fail -// to compile because Foo does not support the AddRef() and Release() methods. -// -// -// EXAMPLE OF Owned(): -// -// void foo(int* arg) { cout << *arg << endl } -// -// int* pn = new int(1); -// Closure foo_callback = Bind(&foo, Owned(pn)); -// -// foo_callback.Run(); // Prints "1" -// foo_callback.Run(); // Prints "1" -// *n = 2; -// foo_callback.Run(); // Prints "2" -// -// foo_callback.Reset(); // |pn| is deleted. Also will happen when -// // |foo_callback| goes out of scope. -// -// Without Owned(), someone would have to know to delete |pn| when the last -// reference to the Callback is deleted. -// -// -// EXAMPLE OF ConstRef(): -// -// void foo(int arg) { cout << arg << endl } -// -// int n = 1; -// Closure no_ref = Bind(&foo, n); -// Closure has_ref = Bind(&foo, ConstRef(n)); -// -// no_ref.Run(); // Prints "1" -// has_ref.Run(); // Prints "1" -// -// n = 2; -// no_ref.Run(); // Prints "1" -// has_ref.Run(); // Prints "2" -// -// Note that because ConstRef() takes a reference on |n|, |n| must outlive all -// its bound callbacks. -// -// -// EXAMPLE OF IgnoreResult(): -// -// int DoSomething(int arg) { cout << arg << endl; } -// -// // Assign to a Callback with a void return type. -// Callback cb = Bind(IgnoreResult(&DoSomething)); -// cb->Run(1); // Prints "1". -// -// // Prints "1" on |ml|. -// ml->PostTask(FROM_HERE, Bind(IgnoreResult(&DoSomething), 1); -// -// -// EXAMPLE OF Passed(): -// -// void TakesOwnership(scoped_ptr arg) { } -// scoped_ptr CreateFoo() { return scoped_ptr(new Foo()); } -// -// scoped_ptr f(new Foo()); -// -// // |cb| is given ownership of Foo(). |f| is now NULL. -// // You can use f.Pass() in place of &f, but it's more verbose. -// Closure cb = Bind(&TakesOwnership, Passed(&f)); -// -// // Run was never called so |cb| still owns Foo() and deletes -// // it on Reset(). -// cb.Reset(); -// -// // |cb| is given a new Foo created by CreateFoo(). -// cb = Bind(&TakesOwnership, Passed(CreateFoo())); -// -// // |arg| in TakesOwnership() is given ownership of Foo(). |cb| -// // no longer owns Foo() and, if reset, would not delete Foo(). -// cb.Run(); // Foo() is now transferred to |arg| and deleted. -// cb.Run(); // This CHECK()s since Foo() already been used once. -// -// Passed() is particularly useful with PostTask() when you are transferring -// ownership of an argument into a task, but don't necessarily know if the -// task will always be executed. This can happen if the task is cancellable -// or if it is posted to a MessageLoopProxy. -// -// -// SIMPLE FUNCTIONS AND UTILITIES. -// -// DoNothing() - Useful for creating a Closure that does nothing when called. -// DeletePointer() - Useful for creating a Closure that will delete a -// pointer when invoked. Only use this when necessary. -// In most cases MessageLoop::DeleteSoon() is a better -// fit. - -#ifndef CEF_INCLUDE_BASE_CEF_BIND_HELPERS_H_ -#define CEF_INCLUDE_BASE_CEF_BIND_HELPERS_H_ -#pragma once - -#if defined(BASE_BIND_HELPERS_H_) -// Do nothing if 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(BUILDING_CEF_SHARED) -// When building CEF include the Chromium header directly. -#include "base/bind_helpers.h" -#else // !BUILDING_CEF_SHARED -// The following is substantially similar to the Chromium implementation. -// If the Chromium implementation diverges the below implementation should be -// updated to match. - -#include "include/base/cef_basictypes.h" -#include "include/base/cef_callback.h" -#include "include/base/cef_template_util.h" -#include "include/base/cef_weak_ptr.h" - -namespace base { -namespace cef_internal { - -// Use the Substitution Failure Is Not An Error (SFINAE) trick to inspect T -// for the existence of AddRef() and Release() functions of the correct -// signature. -// -// http://en.wikipedia.org/wiki/Substitution_failure_is_not_an_error -// http://stackoverflow.com/questions/257288/is-it-possible-to-write-a-c-template-to-check-for-a-functions-existence -// http://stackoverflow.com/questions/4358584/sfinae-approach-comparison -// http://stackoverflow.com/questions/1966362/sfinae-to-check-for-inherited-member-functions -// -// The last link in particular show the method used below. -// -// For SFINAE to work with inherited methods, we need to pull some extra tricks -// with multiple inheritance. In the more standard formulation, the overloads -// of Check would be: -// -// template -// Yes NotTheCheckWeWant(Helper<&C::TargetFunc>*); -// -// template -// No NotTheCheckWeWant(...); -// -// static const bool value = sizeof(NotTheCheckWeWant(0)) == sizeof(Yes); -// -// The problem here is that template resolution will not match -// C::TargetFunc if TargetFunc does not exist directly in C. That is, if -// TargetFunc in inherited from an ancestor, &C::TargetFunc will not match, -// |value| will be false. This formulation only checks for whether or -// not TargetFunc exist directly in the class being introspected. -// -// To get around this, we play a dirty trick with multiple inheritance. -// First, We create a class BaseMixin that declares each function that we -// want to probe for. Then we create a class Base that inherits from both T -// (the class we wish to probe) and BaseMixin. Note that the function -// signature in BaseMixin does not need to match the signature of the function -// we are probing for; thus it's easiest to just use void(void). -// -// Now, if TargetFunc exists somewhere in T, then &Base::TargetFunc has an -// ambiguous resolution between BaseMixin and T. This lets us write the -// following: -// -// template -// No GoodCheck(Helper<&C::TargetFunc>*); -// -// template -// Yes GoodCheck(...); -// -// static const bool value = sizeof(GoodCheck(0)) == sizeof(Yes); -// -// Notice here that the variadic version of GoodCheck() returns Yes here -// instead of No like the previous one. Also notice that we calculate |value| -// by specializing GoodCheck() on Base instead of T. -// -// We've reversed the roles of the variadic, and Helper overloads. -// GoodCheck(Helper<&C::TargetFunc>*), when C = Base, fails to be a valid -// substitution if T::TargetFunc exists. Thus GoodCheck(0) will resolve -// to the variadic version if T has TargetFunc. If T::TargetFunc does not -// exist, then &C::TargetFunc is not ambiguous, and the overload resolution -// will prefer GoodCheck(Helper<&C::TargetFunc>*). -// -// This method of SFINAE will correctly probe for inherited names, but it cannot -// typecheck those names. It's still a good enough sanity check though. -// -// Works on gcc-4.2, gcc-4.4, and Visual Studio 2008. -// -// TODO(ajwong): Move to ref_counted.h or template_util.h when we've vetted -// this works well. -// -// TODO(ajwong): Make this check for Release() as well. -// See http://crbug.com/82038. -template -class SupportsAddRefAndRelease { - typedef char Yes[1]; - typedef char No[2]; - - struct BaseMixin { - void AddRef(); - }; - -// MSVC warns when you try to use Base if T has a private destructor, the -// common pattern for refcounted types. It does this even though no attempt to -// instantiate Base is made. We disable the warning for this definition. -#if defined(OS_WIN) -#pragma warning(push) -#pragma warning(disable:4624) -#endif - struct Base : public T, public BaseMixin { - }; -#if defined(OS_WIN) -#pragma warning(pop) -#endif - - template struct Helper {}; - - template - static No& Check(Helper<&C::AddRef>*); - - template - static Yes& Check(...); - - public: - static const bool value = sizeof(Check(0)) == sizeof(Yes); -}; - -// Helpers to assert that arguments of a recounted type are bound with a -// scoped_refptr. -template -struct UnsafeBindtoRefCountedArgHelper : false_type { -}; - -template -struct UnsafeBindtoRefCountedArgHelper - : integral_constant::value> { -}; - -template -struct UnsafeBindtoRefCountedArg : false_type { -}; - -template -struct UnsafeBindtoRefCountedArg - : UnsafeBindtoRefCountedArgHelper::value, T> { -}; - -template -class HasIsMethodTag { - typedef char Yes[1]; - typedef char No[2]; - - template - static Yes& Check(typename U::IsMethod*); - - template - static No& Check(...); - - public: - static const bool value = sizeof(Check(0)) == sizeof(Yes); -}; - -template -class UnretainedWrapper { - public: - explicit UnretainedWrapper(T* o) : ptr_(o) {} - T* get() const { return ptr_; } - private: - T* ptr_; -}; - -template -class ConstRefWrapper { - public: - explicit ConstRefWrapper(const T& o) : ptr_(&o) {} - const T& get() const { return *ptr_; } - private: - const T* ptr_; -}; - -template -struct IgnoreResultHelper { - explicit IgnoreResultHelper(T functor) : functor_(functor) {} - - T functor_; -}; - -template -struct IgnoreResultHelper > { - explicit IgnoreResultHelper(const Callback& functor) : functor_(functor) {} - - const Callback& functor_; -}; - -// An alternate implementation is to avoid the destructive copy, and instead -// specialize ParamTraits<> for OwnedWrapper<> to change the StorageType to -// a class that is essentially a scoped_ptr<>. -// -// The current implementation has the benefit though of leaving ParamTraits<> -// fully in callback_internal.h as well as avoiding type conversions during -// storage. -template -class OwnedWrapper { - public: - explicit OwnedWrapper(T* o) : ptr_(o) {} - ~OwnedWrapper() { delete ptr_; } - T* get() const { return ptr_; } - OwnedWrapper(const OwnedWrapper& other) { - ptr_ = other.ptr_; - other.ptr_ = NULL; - } - - private: - mutable T* ptr_; -}; - -// PassedWrapper is a copyable adapter for a scoper that ignores const. -// -// It is needed to get around the fact that Bind() takes a const reference to -// all its arguments. Because Bind() takes a const reference to avoid -// unnecessary copies, it is incompatible with movable-but-not-copyable -// types; doing a destructive "move" of the type into Bind() would violate -// the const correctness. -// -// This conundrum cannot be solved without either C++11 rvalue references or -// a O(2^n) blowup of Bind() templates to handle each combination of regular -// types and movable-but-not-copyable types. Thus we introduce a wrapper type -// that is copyable to transmit the correct type information down into -// BindState<>. Ignoring const in this type makes sense because it is only -// created when we are explicitly trying to do a destructive move. -// -// Two notes: -// 1) PassedWrapper supports any type that has a "Pass()" function. -// This is intentional. The whitelisting of which specific types we -// support is maintained by CallbackParamTraits<>. -// 2) is_valid_ is distinct from NULL because it is valid to bind a "NULL" -// scoper to a Callback and allow the Callback to execute once. -template -class PassedWrapper { - public: - explicit PassedWrapper(T scoper) : is_valid_(true), scoper_(scoper.Pass()) {} - PassedWrapper(const PassedWrapper& other) - : is_valid_(other.is_valid_), scoper_(other.scoper_.Pass()) { - } - T Pass() const { - CHECK(is_valid_); - is_valid_ = false; - return scoper_.Pass(); - } - - private: - mutable bool is_valid_; - mutable T scoper_; -}; - -// Unwrap the stored parameters for the wrappers above. -template -struct UnwrapTraits { - typedef const T& ForwardType; - static ForwardType Unwrap(const T& o) { return o; } -}; - -template -struct UnwrapTraits > { - typedef T* ForwardType; - static ForwardType Unwrap(UnretainedWrapper unretained) { - return unretained.get(); - } -}; - -template -struct UnwrapTraits > { - typedef const T& ForwardType; - static ForwardType Unwrap(ConstRefWrapper const_ref) { - return const_ref.get(); - } -}; - -template -struct UnwrapTraits > { - typedef T* ForwardType; - static ForwardType Unwrap(const scoped_refptr& o) { return o.get(); } -}; - -template -struct UnwrapTraits > { - typedef const WeakPtr& ForwardType; - static ForwardType Unwrap(const WeakPtr& o) { return o; } -}; - -template -struct UnwrapTraits > { - typedef T* ForwardType; - static ForwardType Unwrap(const OwnedWrapper& o) { - return o.get(); - } -}; - -template -struct UnwrapTraits > { - typedef T ForwardType; - static T Unwrap(PassedWrapper& o) { - return o.Pass(); - } -}; - -// Utility for handling different refcounting semantics in the Bind() -// function. -template -struct MaybeRefcount; - -template -struct MaybeRefcount { - static void AddRef(const T&) {} - static void Release(const T&) {} -}; - -template -struct MaybeRefcount { - static void AddRef(const T*) {} - static void Release(const T*) {} -}; - -template -struct MaybeRefcount { - static void AddRef(const T&) {} - static void Release(const T&) {} -}; - -template -struct MaybeRefcount { - static void AddRef(T* o) { o->AddRef(); } - static void Release(T* o) { o->Release(); } -}; - -// No need to additionally AddRef() and Release() since we are storing a -// scoped_refptr<> inside the storage object already. -template -struct MaybeRefcount > { - static void AddRef(const scoped_refptr& o) {} - static void Release(const scoped_refptr& o) {} -}; - -template -struct MaybeRefcount { - static void AddRef(const T* o) { o->AddRef(); } - static void Release(const T* o) { o->Release(); } -}; - -// IsWeakMethod is a helper that determine if we are binding a WeakPtr<> to a -// method. It is used internally by Bind() to select the correct -// InvokeHelper that will no-op itself in the event the WeakPtr<> for -// the target object is invalidated. -// -// P1 should be the type of the object that will be received of the method. -template -struct IsWeakMethod : public false_type {}; - -template -struct IsWeakMethod > : public true_type {}; - -template -struct IsWeakMethod > > : public true_type {}; - -} // namespace cef_internal - -template -static inline cef_internal::UnretainedWrapper Unretained(T* o) { - return cef_internal::UnretainedWrapper(o); -} - -template -static inline cef_internal::ConstRefWrapper ConstRef(const T& o) { - return cef_internal::ConstRefWrapper(o); -} - -template -static inline cef_internal::OwnedWrapper Owned(T* o) { - return cef_internal::OwnedWrapper(o); -} - -// We offer 2 syntaxes for calling Passed(). The first takes a temporary and -// is best suited for use with the return value of a function. The second -// takes a pointer to the scoper and is just syntactic sugar to avoid having -// to write Passed(scoper.Pass()). -template -static inline cef_internal::PassedWrapper Passed(T scoper) { - return cef_internal::PassedWrapper(scoper.Pass()); -} -template -static inline cef_internal::PassedWrapper Passed(T* scoper) { - return cef_internal::PassedWrapper(scoper->Pass()); -} - -template -static inline cef_internal::IgnoreResultHelper IgnoreResult(T data) { - return cef_internal::IgnoreResultHelper(data); -} - -template -static inline cef_internal::IgnoreResultHelper > -IgnoreResult(const Callback& data) { - return cef_internal::IgnoreResultHelper >(data); -} - -void DoNothing(); - -template -void DeletePointer(T* obj) { - delete obj; -} - -} // namespace base - -#endif // !BUILDING_CEF_SHARED - -#endif // CEF_INCLUDE_BASE_CEF_BIND_HELPERS_H_ diff --git a/tool_kits/cef/cef_wrapper/include/base/cef_build.h b/tool_kits/cef/cef_wrapper/include/base/cef_build.h deleted file mode 100644 index 0451913b..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/cef_build.h +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -#ifndef CEF_INCLUDE_BASE_CEF_BUILD_H_ -#define CEF_INCLUDE_BASE_CEF_BUILD_H_ -#pragma once - -#if defined(BUILDING_CEF_SHARED) -// When building CEF include the Chromium header directly. -#include "base/compiler_specific.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. - -#if defined(_WIN32) -#ifndef OS_WIN -#define OS_WIN 1 -#endif -#elif defined(__APPLE__) -#ifndef OS_MACOSX -#define OS_MACOSX 1 -#endif -#elif defined(__linux__) -#ifndef OS_LINUX -#define OS_LINUX 1 -#endif -#else -#error Please add support for your platform in cef_build.h -#endif - -// For access to standard POSIXish features, use OS_POSIX instead of a -// more specific macro. -#if defined(OS_MACOSX) || defined(OS_LINUX) -#ifndef OS_POSIX -#define OS_POSIX 1 -#endif -#endif - -// Compiler detection. -#if defined(__GNUC__) -#ifndef COMPILER_GCC -#define COMPILER_GCC 1 -#endif -#elif defined(_MSC_VER) -#ifndef COMPILER_MSVC -#define COMPILER_MSVC 1 -#endif -#else -#error Please add support for your compiler in cef_build.h -#endif - -// Processor architecture detection. For more info on what's defined, see: -// http://msdn.microsoft.com/en-us/library/b0084kay.aspx -// http://www.agner.org/optimize/calling_conventions.pdf -// or with gcc, run: "echo | gcc -E -dM -" -#if defined(_M_X64) || defined(__x86_64__) -#define ARCH_CPU_X86_FAMILY 1 -#define ARCH_CPU_X86_64 1 -#define ARCH_CPU_64_BITS 1 -#define ARCH_CPU_LITTLE_ENDIAN 1 -#elif defined(_M_IX86) || defined(__i386__) -#define ARCH_CPU_X86_FAMILY 1 -#define ARCH_CPU_X86 1 -#define ARCH_CPU_32_BITS 1 -#define ARCH_CPU_LITTLE_ENDIAN 1 -#elif defined(__ARMEL__) -#define ARCH_CPU_ARM_FAMILY 1 -#define ARCH_CPU_ARMEL 1 -#define ARCH_CPU_32_BITS 1 -#define ARCH_CPU_LITTLE_ENDIAN 1 -#elif defined(__aarch64__) -#define ARCH_CPU_ARM_FAMILY 1 -#define ARCH_CPU_ARM64 1 -#define ARCH_CPU_64_BITS 1 -#define ARCH_CPU_LITTLE_ENDIAN 1 -#elif defined(__pnacl__) -#define ARCH_CPU_32_BITS 1 -#define ARCH_CPU_LITTLE_ENDIAN 1 -#elif defined(__MIPSEL__) -#define ARCH_CPU_MIPS_FAMILY 1 -#define ARCH_CPU_MIPSEL 1 -#define ARCH_CPU_32_BITS 1 -#define ARCH_CPU_LITTLE_ENDIAN 1 -#else -#error Please add support for your architecture in cef_build.h -#endif - -// Type detection for wchar_t. -#if defined(OS_WIN) -#define WCHAR_T_IS_UTF16 -#elif defined(OS_POSIX) && defined(COMPILER_GCC) && \ - defined(__WCHAR_MAX__) && \ - (__WCHAR_MAX__ == 0x7fffffff || __WCHAR_MAX__ == 0xffffffff) -#define WCHAR_T_IS_UTF32 -#elif defined(OS_POSIX) && defined(COMPILER_GCC) && \ - defined(__WCHAR_MAX__) && \ - (__WCHAR_MAX__ == 0x7fff || __WCHAR_MAX__ == 0xffff) -// On Posix, we'll detect short wchar_t, but projects aren't guaranteed to -// compile in this mode (in particular, Chrome doesn't). This is intended for -// other projects using base who manage their own dependencies and make sure -// short wchar works for them. -#define WCHAR_T_IS_UTF16 -#else -#error Please add support for your compiler in cef_build.h -#endif - -// Annotate a function indicating the caller must examine the return value. -// Use like: -// int foo() WARN_UNUSED_RESULT; -// To explicitly ignore a result, see |ignore_result()| in . -#ifndef WARN_UNUSED_RESULT -#if defined(COMPILER_GCC) -#define WARN_UNUSED_RESULT __attribute__((warn_unused_result)) -#else -#define WARN_UNUSED_RESULT -#endif -#endif // WARN_UNUSED_RESULT - -// Annotate a typedef or function indicating it's ok if it's not used. -// Use like: -// typedef Foo Bar ALLOW_UNUSED_TYPE; -#ifndef ALLOW_UNUSED_TYPE -#if defined(COMPILER_GCC) -#define ALLOW_UNUSED_TYPE __attribute__((unused)) -#else -#define ALLOW_UNUSED_TYPE -#endif -#endif // ALLOW_UNUSED_TYPE - -// Annotate a variable indicating it's ok if the variable is not used. -// (Typically used to silence a compiler warning when the assignment -// is important for some other reason.) -// Use like: -// int x = ...; -// ALLOW_UNUSED_LOCAL(x); -#ifndef ALLOW_UNUSED_LOCAL -#define ALLOW_UNUSED_LOCAL(x) false ? (void)x : (void)0 -#endif - -#endif // !BUILDING_CEF_SHARED - -// Annotate a virtual method indicating it must be overriding a virtual method -// in the parent class. -// Use like: -// void foo() OVERRIDE; -// NOTE: This define should only be used in classes exposed to the client since -// C++11 support may not be enabled in client applications. CEF internal classes -// should use the `override` keyword directly. -#ifndef OVERRIDE -#if defined(__clang__) -#define OVERRIDE override -#elif defined(COMPILER_MSVC) && _MSC_VER >= 1600 -// Visual Studio 2010 and later support override. -#define OVERRIDE override -#elif defined(COMPILER_GCC) && __cplusplus >= 201103 && \ - (__GNUC__ * 10000 + __GNUC_MINOR__ * 100) >= 40700 -// GCC 4.7 supports explicit virtual overrides when C++11 support is enabled. -#define OVERRIDE override -#else -#define OVERRIDE -#endif -#endif // OVERRIDE - -#endif // CEF_INCLUDE_BASE_CEF_BUILD_H_ diff --git a/tool_kits/cef/cef_wrapper/include/base/cef_callback.h b/tool_kits/cef/cef_wrapper/include/base/cef_callback.h deleted file mode 100644 index 75783271..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/cef_callback.h +++ /dev/null @@ -1,807 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012 -// 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. - -#ifndef CEF_INCLUDE_BASE_CEF_CALLBACK_H_ -#define CEF_INCLUDE_BASE_CEF_CALLBACK_H_ -#pragma once - -#if defined(BASE_CALLBACK_H_) -// Do nothing if 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(BUILDING_CEF_SHARED) -// When building CEF include the Chromium header directly. -#include "base/callback.h" -#else // !BUILDING_CEF_SHARED -// The following is substantially similar to the Chromium implementation. -// If the Chromium implementation diverges the below implementation should be -// updated to match. - -#include "include/base/internal/cef_callback_internal.h" -#include "include/base/cef_callback_forward.h" -#include "include/base/cef_template_util.h" - -// NOTE: Header files that do not require the full definition of Callback or -// Closure should #include "base/cef_callback_forward.h" instead of this file. - -// ----------------------------------------------------------------------------- -// Introduction -// ----------------------------------------------------------------------------- -// -// The templated Callback class is a generalized function object. Together -// with the Bind() function in bind.h, they provide a type-safe method for -// performing partial application of functions. -// -// Partial application (or "currying") is the process of binding a subset of -// a function's arguments to produce another function that takes fewer -// arguments. This can be used to pass around a unit of delayed execution, -// much like lexical closures are used in other languages. For example, it -// is used in Chromium code to schedule tasks on different MessageLoops. -// -// A callback with no unbound input parameters (base::Callback) -// is called a base::Closure. Note that this is NOT the same as what other -// languages refer to as a closure -- it does not retain a reference to its -// enclosing environment. -// -// MEMORY MANAGEMENT AND PASSING -// -// The Callback objects themselves should be passed by const-reference, and -// stored by copy. They internally store their state via a refcounted class -// and thus do not need to be deleted. -// -// The reason to pass via a const-reference is to avoid unnecessary -// AddRef/Release pairs to the internal state. -// -// -// ----------------------------------------------------------------------------- -// Quick reference for basic stuff -// ----------------------------------------------------------------------------- -// -// BINDING A BARE FUNCTION -// -// int Return5() { return 5; } -// base::Callback func_cb = base::Bind(&Return5); -// LOG(INFO) << func_cb.Run(); // Prints 5. -// -// BINDING A CLASS METHOD -// -// The first argument to bind is the member function to call, the second is -// the object on which to call it. -// -// class Ref : public base::RefCountedThreadSafe { -// public: -// int Foo() { return 3; } -// void PrintBye() { LOG(INFO) << "bye."; } -// }; -// scoped_refptr ref = new Ref(); -// base::Callback ref_cb = base::Bind(&Ref::Foo, ref); -// LOG(INFO) << ref_cb.Run(); // Prints out 3. -// -// By default the object must support RefCounted or you will get a compiler -// error. If you're passing between threads, be sure it's -// RefCountedThreadSafe! See "Advanced binding of member functions" below if -// you don't want to use reference counting. -// -// RUNNING A CALLBACK -// -// Callbacks can be run with their "Run" method, which has the same -// signature as the template argument to the callback. -// -// void DoSomething(const base::Callback& callback) { -// callback.Run(5, "hello"); -// } -// -// Callbacks can be run more than once (they don't get deleted or marked when -// run). However, this precludes using base::Passed (see below). -// -// void DoSomething(const base::Callback& callback) { -// double myresult = callback.Run(3.14159); -// myresult += callback.Run(2.71828); -// } -// -// PASSING UNBOUND INPUT PARAMETERS -// -// Unbound parameters are specified at the time a callback is Run(). They are -// specified in the Callback template type: -// -// void MyFunc(int i, const std::string& str) {} -// base::Callback cb = base::Bind(&MyFunc); -// cb.Run(23, "hello, world"); -// -// PASSING BOUND INPUT PARAMETERS -// -// Bound parameters are specified when you create thee callback as arguments -// to Bind(). They will be passed to the function and the Run()ner of the -// callback doesn't see those values or even know that the function it's -// calling. -// -// void MyFunc(int i, const std::string& str) {} -// base::Callback cb = base::Bind(&MyFunc, 23, "hello world"); -// cb.Run(); -// -// A callback with no unbound input parameters (base::Callback) -// is called a base::Closure. So we could have also written: -// -// base::Closure cb = base::Bind(&MyFunc, 23, "hello world"); -// -// When calling member functions, bound parameters just go after the object -// pointer. -// -// base::Closure cb = base::Bind(&MyClass::MyFunc, this, 23, "hello world"); -// -// PARTIAL BINDING OF PARAMETERS -// -// You can specify some parameters when you create the callback, and specify -// the rest when you execute the callback. -// -// void MyFunc(int i, const std::string& str) {} -// base::Callback cb = base::Bind(&MyFunc, 23); -// cb.Run("hello world"); -// -// When calling a function bound parameters are first, followed by unbound -// parameters. -// -// -// ----------------------------------------------------------------------------- -// Quick reference for advanced binding -// ----------------------------------------------------------------------------- -// -// BINDING A CLASS METHOD WITH WEAK POINTERS -// -// base::Bind(&MyClass::Foo, GetWeakPtr()); -// -// The callback will not be run if the object has already been destroyed. -// DANGER: weak pointers are not threadsafe, so don't use this -// when passing between threads! -// -// BINDING A CLASS METHOD WITH MANUAL LIFETIME MANAGEMENT -// -// base::Bind(&MyClass::Foo, base::Unretained(this)); -// -// This disables all lifetime management on the object. You're responsible -// for making sure the object is alive at the time of the call. You break it, -// you own it! -// -// BINDING A CLASS METHOD AND HAVING THE CALLBACK OWN THE CLASS -// -// MyClass* myclass = new MyClass; -// base::Bind(&MyClass::Foo, base::Owned(myclass)); -// -// The object will be deleted when the callback is destroyed, even if it's -// not run (like if you post a task during shutdown). Potentially useful for -// "fire and forget" cases. -// -// IGNORING RETURN VALUES -// -// Sometimes you want to call a function that returns a value in a callback -// that doesn't expect a return value. -// -// int DoSomething(int arg) { cout << arg << endl; } -// base::Callback) cb = -// base::Bind(base::IgnoreResult(&DoSomething)); -// -// -// ----------------------------------------------------------------------------- -// Quick reference for binding parameters to Bind() -// ----------------------------------------------------------------------------- -// -// Bound parameters are specified as arguments to Bind() and are passed to the -// function. A callback with no parameters or no unbound parameters is called a -// Closure (base::Callback and base::Closure are the same thing). -// -// PASSING PARAMETERS OWNED BY THE CALLBACK -// -// void Foo(int* arg) { cout << *arg << endl; } -// int* pn = new int(1); -// base::Closure foo_callback = base::Bind(&foo, base::Owned(pn)); -// -// The parameter will be deleted when the callback is destroyed, even if it's -// not run (like if you post a task during shutdown). -// -// PASSING PARAMETERS AS A scoped_ptr -// -// void TakesOwnership(scoped_ptr arg) {} -// scoped_ptr f(new Foo); -// // f becomes null during the following call. -// base::Closure cb = base::Bind(&TakesOwnership, base::Passed(&f)); -// -// Ownership of the parameter will be with the callback until the it is run, -// when ownership is passed to the callback function. This means the callback -// can only be run once. If the callback is never run, it will delete the -// object when it's destroyed. -// -// PASSING PARAMETERS AS A scoped_refptr -// -// void TakesOneRef(scoped_refptr arg) {} -// scoped_refptr f(new Foo) -// base::Closure cb = base::Bind(&TakesOneRef, f); -// -// This should "just work." The closure will take a reference as long as it -// is alive, and another reference will be taken for the called function. -// -// PASSING PARAMETERS BY REFERENCE -// -// Const references are *copied* unless ConstRef is used. Example: -// -// void foo(const int& arg) { printf("%d %p\n", arg, &arg); } -// int n = 1; -// base::Closure has_copy = base::Bind(&foo, n); -// base::Closure has_ref = base::Bind(&foo, base::ConstRef(n)); -// n = 2; -// foo(n); // Prints "2 0xaaaaaaaaaaaa" -// has_copy.Run(); // Prints "1 0xbbbbbbbbbbbb" -// has_ref.Run(); // Prints "2 0xaaaaaaaaaaaa" -// -// Normally parameters are copied in the closure. DANGER: ConstRef stores a -// const reference instead, referencing the original parameter. This means -// that you must ensure the object outlives the callback! -// -// -// ----------------------------------------------------------------------------- -// Implementation notes -// ----------------------------------------------------------------------------- -// -// WHERE IS THIS DESIGN FROM: -// -// The design Callback and Bind is heavily influenced by C++'s -// tr1::function/tr1::bind, and by the "Google Callback" system used inside -// Google. -// -// -// HOW THE IMPLEMENTATION WORKS: -// -// There are three main components to the system: -// 1) The Callback classes. -// 2) The Bind() functions. -// 3) The arguments wrappers (e.g., Unretained() and ConstRef()). -// -// The Callback classes represent a generic function pointer. Internally, -// it stores a refcounted piece of state that represents the target function -// and all its bound parameters. Each Callback specialization has a templated -// constructor that takes an BindState<>*. In the context of the constructor, -// the static type of this BindState<> pointer uniquely identifies the -// function it is representing, all its bound parameters, and a Run() method -// that is capable of invoking the target. -// -// Callback's constructor takes the BindState<>* that has the full static type -// and erases the target function type as well as the types of the bound -// parameters. It does this by storing a pointer to the specific Run() -// function, and upcasting the state of BindState<>* to a -// BindStateBase*. This is safe as long as this BindStateBase pointer -// is only used with the stored Run() pointer. -// -// To BindState<> objects are created inside the Bind() functions. -// These functions, along with a set of internal templates, are responsible for -// -// - Unwrapping the function signature into return type, and parameters -// - Determining the number of parameters that are bound -// - Creating the BindState storing the bound parameters -// - Performing compile-time asserts to avoid error-prone behavior -// - Returning an Callback<> with an arity matching the number of unbound -// parameters and that knows the correct refcounting semantics for the -// target object if we are binding a method. -// -// The Bind functions do the above using type-inference, and template -// specializations. -// -// By default Bind() will store copies of all bound parameters, and attempt -// to refcount a target object if the function being bound is a class method. -// These copies are created even if the function takes parameters as const -// references. (Binding to non-const references is forbidden, see bind.h.) -// -// To change this behavior, we introduce a set of argument wrappers -// (e.g., Unretained(), and ConstRef()). These are simple container templates -// that are passed by value, and wrap a pointer to argument. See the -// file-level comment in base/bind_helpers.h for more info. -// -// These types are passed to the Unwrap() functions, and the MaybeRefcount() -// functions respectively to modify the behavior of Bind(). The Unwrap() -// and MaybeRefcount() functions change behavior by doing partial -// specialization based on whether or not a parameter is a wrapper type. -// -// ConstRef() is similar to tr1::cref. Unretained() is specific to Chromium. -// -// -// WHY NOT TR1 FUNCTION/BIND? -// -// Direct use of tr1::function and tr1::bind was considered, but ultimately -// rejected because of the number of copy constructors invocations involved -// in the binding of arguments during construction, and the forwarding of -// arguments during invocation. These copies will no longer be an issue in -// C++0x because C++0x will support rvalue reference allowing for the compiler -// to avoid these copies. However, waiting for C++0x is not an option. -// -// Measured with valgrind on gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5), the -// tr1::bind call itself will invoke a non-trivial copy constructor three times -// for each bound parameter. Also, each when passing a tr1::function, each -// bound argument will be copied again. -// -// In addition to the copies taken at binding and invocation, copying a -// tr1::function causes a copy to be made of all the bound parameters and -// state. -// -// Furthermore, in Chromium, it is desirable for the Callback to take a -// reference on a target object when representing a class method call. This -// is not supported by tr1. -// -// Lastly, tr1::function and tr1::bind has a more general and flexible API. -// This includes things like argument reordering by use of -// tr1::bind::placeholder, support for non-const reference parameters, and some -// limited amount of subtyping of the tr1::function object (e.g., -// tr1::function is convertible to tr1::function). -// -// These are not features that are required in Chromium. Some of them, such as -// allowing for reference parameters, and subtyping of functions, may actually -// become a source of errors. Removing support for these features actually -// allows for a simpler implementation, and a terser Currying API. -// -// -// WHY NOT GOOGLE CALLBACKS? -// -// The Google callback system also does not support refcounting. Furthermore, -// its implementation has a number of strange edge cases with respect to type -// conversion of its arguments. In particular, the argument's constness must -// at times match exactly the function signature, or the type-inference might -// break. Given the above, writing a custom solution was easier. -// -// -// MISSING FUNCTIONALITY -// - Invoking the return of Bind. Bind(&foo).Run() does not work; -// - Binding arrays to functions that take a non-const pointer. -// Example: -// void Foo(const char* ptr); -// void Bar(char* ptr); -// Bind(&Foo, "test"); -// Bind(&Bar, "test"); // This fails because ptr is not const. - -namespace base { - -// First, we forward declare the Callback class template. This informs the -// compiler that the template only has 1 type parameter which is the function -// signature that the Callback is representing. -// -// After this, create template specializations for 0-7 parameters. Note that -// even though the template typelist grows, the specialization still -// only has one type: the function signature. -// -// If you are thinking of forward declaring Callback in your own header file, -// please include "base/callback_forward.h" instead. -template -class Callback; - -namespace cef_internal { -template -struct BindState; -} // namespace cef_internal - -template -class Callback : public cef_internal::CallbackBase { - public: - typedef R(RunType)(); - - Callback() : CallbackBase(NULL) { } - - // Note that this constructor CANNOT be explicit, and that Bind() CANNOT - // return the exact Callback<> type. See base/bind.h for details. - template - Callback(cef_internal::BindState* bind_state) - : CallbackBase(bind_state) { - - // Force the assignment to a local variable of PolymorphicInvoke - // so the compiler will typecheck that the passed in Run() method has - // the correct type. - PolymorphicInvoke invoke_func = - &cef_internal::BindState - ::InvokerType::Run; - polymorphic_invoke_ = reinterpret_cast(invoke_func); - } - - bool Equals(const Callback& other) const { - return CallbackBase::Equals(other); - } - - R Run() const { - PolymorphicInvoke f = - reinterpret_cast(polymorphic_invoke_); - - return f(bind_state_.get()); - } - - private: - typedef R(*PolymorphicInvoke)( - cef_internal::BindStateBase*); - -}; - -template -class Callback : public cef_internal::CallbackBase { - public: - typedef R(RunType)(A1); - - Callback() : CallbackBase(NULL) { } - - // Note that this constructor CANNOT be explicit, and that Bind() CANNOT - // return the exact Callback<> type. See base/bind.h for details. - template - Callback(cef_internal::BindState* bind_state) - : CallbackBase(bind_state) { - - // Force the assignment to a local variable of PolymorphicInvoke - // so the compiler will typecheck that the passed in Run() method has - // the correct type. - PolymorphicInvoke invoke_func = - &cef_internal::BindState - ::InvokerType::Run; - polymorphic_invoke_ = reinterpret_cast(invoke_func); - } - - bool Equals(const Callback& other) const { - return CallbackBase::Equals(other); - } - - R Run(typename cef_internal::CallbackParamTraits::ForwardType a1) const { - PolymorphicInvoke f = - reinterpret_cast(polymorphic_invoke_); - - return f(bind_state_.get(), cef_internal::CallbackForward(a1)); - } - - private: - typedef R(*PolymorphicInvoke)( - cef_internal::BindStateBase*, - typename cef_internal::CallbackParamTraits::ForwardType); - -}; - -template -class Callback : public cef_internal::CallbackBase { - public: - typedef R(RunType)(A1, A2); - - Callback() : CallbackBase(NULL) { } - - // Note that this constructor CANNOT be explicit, and that Bind() CANNOT - // return the exact Callback<> type. See base/bind.h for details. - template - Callback(cef_internal::BindState* bind_state) - : CallbackBase(bind_state) { - - // Force the assignment to a local variable of PolymorphicInvoke - // so the compiler will typecheck that the passed in Run() method has - // the correct type. - PolymorphicInvoke invoke_func = - &cef_internal::BindState - ::InvokerType::Run; - polymorphic_invoke_ = reinterpret_cast(invoke_func); - } - - bool Equals(const Callback& other) const { - return CallbackBase::Equals(other); - } - - R Run(typename cef_internal::CallbackParamTraits::ForwardType a1, - typename cef_internal::CallbackParamTraits::ForwardType a2) const { - PolymorphicInvoke f = - reinterpret_cast(polymorphic_invoke_); - - return f(bind_state_.get(), cef_internal::CallbackForward(a1), - cef_internal::CallbackForward(a2)); - } - - private: - typedef R(*PolymorphicInvoke)( - cef_internal::BindStateBase*, - typename cef_internal::CallbackParamTraits::ForwardType, - typename cef_internal::CallbackParamTraits::ForwardType); - -}; - -template -class Callback : public cef_internal::CallbackBase { - public: - typedef R(RunType)(A1, A2, A3); - - Callback() : CallbackBase(NULL) { } - - // Note that this constructor CANNOT be explicit, and that Bind() CANNOT - // return the exact Callback<> type. See base/bind.h for details. - template - Callback(cef_internal::BindState* bind_state) - : CallbackBase(bind_state) { - - // Force the assignment to a local variable of PolymorphicInvoke - // so the compiler will typecheck that the passed in Run() method has - // the correct type. - PolymorphicInvoke invoke_func = - &cef_internal::BindState - ::InvokerType::Run; - polymorphic_invoke_ = reinterpret_cast(invoke_func); - } - - bool Equals(const Callback& other) const { - return CallbackBase::Equals(other); - } - - R Run(typename cef_internal::CallbackParamTraits::ForwardType a1, - typename cef_internal::CallbackParamTraits::ForwardType a2, - typename cef_internal::CallbackParamTraits::ForwardType a3) const { - PolymorphicInvoke f = - reinterpret_cast(polymorphic_invoke_); - - return f(bind_state_.get(), cef_internal::CallbackForward(a1), - cef_internal::CallbackForward(a2), - cef_internal::CallbackForward(a3)); - } - - private: - typedef R(*PolymorphicInvoke)( - cef_internal::BindStateBase*, - typename cef_internal::CallbackParamTraits::ForwardType, - typename cef_internal::CallbackParamTraits::ForwardType, - typename cef_internal::CallbackParamTraits::ForwardType); - -}; - -template -class Callback : public cef_internal::CallbackBase { - public: - typedef R(RunType)(A1, A2, A3, A4); - - Callback() : CallbackBase(NULL) { } - - // Note that this constructor CANNOT be explicit, and that Bind() CANNOT - // return the exact Callback<> type. See base/bind.h for details. - template - Callback(cef_internal::BindState* bind_state) - : CallbackBase(bind_state) { - - // Force the assignment to a local variable of PolymorphicInvoke - // so the compiler will typecheck that the passed in Run() method has - // the correct type. - PolymorphicInvoke invoke_func = - &cef_internal::BindState - ::InvokerType::Run; - polymorphic_invoke_ = reinterpret_cast(invoke_func); - } - - bool Equals(const Callback& other) const { - return CallbackBase::Equals(other); - } - - R Run(typename cef_internal::CallbackParamTraits::ForwardType a1, - typename cef_internal::CallbackParamTraits::ForwardType a2, - typename cef_internal::CallbackParamTraits::ForwardType a3, - typename cef_internal::CallbackParamTraits::ForwardType a4) const { - PolymorphicInvoke f = - reinterpret_cast(polymorphic_invoke_); - - return f(bind_state_.get(), cef_internal::CallbackForward(a1), - cef_internal::CallbackForward(a2), - cef_internal::CallbackForward(a3), - cef_internal::CallbackForward(a4)); - } - - private: - typedef R(*PolymorphicInvoke)( - cef_internal::BindStateBase*, - typename cef_internal::CallbackParamTraits::ForwardType, - typename cef_internal::CallbackParamTraits::ForwardType, - typename cef_internal::CallbackParamTraits::ForwardType, - typename cef_internal::CallbackParamTraits::ForwardType); - -}; - -template -class Callback : public cef_internal::CallbackBase { - public: - typedef R(RunType)(A1, A2, A3, A4, A5); - - Callback() : CallbackBase(NULL) { } - - // Note that this constructor CANNOT be explicit, and that Bind() CANNOT - // return the exact Callback<> type. See base/bind.h for details. - template - Callback(cef_internal::BindState* bind_state) - : CallbackBase(bind_state) { - - // Force the assignment to a local variable of PolymorphicInvoke - // so the compiler will typecheck that the passed in Run() method has - // the correct type. - PolymorphicInvoke invoke_func = - &cef_internal::BindState - ::InvokerType::Run; - polymorphic_invoke_ = reinterpret_cast(invoke_func); - } - - bool Equals(const Callback& other) const { - return CallbackBase::Equals(other); - } - - R Run(typename cef_internal::CallbackParamTraits::ForwardType a1, - typename cef_internal::CallbackParamTraits::ForwardType a2, - typename cef_internal::CallbackParamTraits::ForwardType a3, - typename cef_internal::CallbackParamTraits::ForwardType a4, - typename cef_internal::CallbackParamTraits::ForwardType a5) const { - PolymorphicInvoke f = - reinterpret_cast(polymorphic_invoke_); - - return f(bind_state_.get(), cef_internal::CallbackForward(a1), - cef_internal::CallbackForward(a2), - cef_internal::CallbackForward(a3), - cef_internal::CallbackForward(a4), - cef_internal::CallbackForward(a5)); - } - - private: - typedef R(*PolymorphicInvoke)( - cef_internal::BindStateBase*, - typename cef_internal::CallbackParamTraits::ForwardType, - typename cef_internal::CallbackParamTraits::ForwardType, - typename cef_internal::CallbackParamTraits::ForwardType, - typename cef_internal::CallbackParamTraits::ForwardType, - typename cef_internal::CallbackParamTraits::ForwardType); - -}; - -template -class Callback : public cef_internal::CallbackBase { - public: - typedef R(RunType)(A1, A2, A3, A4, A5, A6); - - Callback() : CallbackBase(NULL) { } - - // Note that this constructor CANNOT be explicit, and that Bind() CANNOT - // return the exact Callback<> type. See base/bind.h for details. - template - Callback(cef_internal::BindState* bind_state) - : CallbackBase(bind_state) { - - // Force the assignment to a local variable of PolymorphicInvoke - // so the compiler will typecheck that the passed in Run() method has - // the correct type. - PolymorphicInvoke invoke_func = - &cef_internal::BindState - ::InvokerType::Run; - polymorphic_invoke_ = reinterpret_cast(invoke_func); - } - - bool Equals(const Callback& other) const { - return CallbackBase::Equals(other); - } - - R Run(typename cef_internal::CallbackParamTraits::ForwardType a1, - typename cef_internal::CallbackParamTraits::ForwardType a2, - typename cef_internal::CallbackParamTraits::ForwardType a3, - typename cef_internal::CallbackParamTraits::ForwardType a4, - typename cef_internal::CallbackParamTraits::ForwardType a5, - typename cef_internal::CallbackParamTraits::ForwardType a6) const { - PolymorphicInvoke f = - reinterpret_cast(polymorphic_invoke_); - - return f(bind_state_.get(), cef_internal::CallbackForward(a1), - cef_internal::CallbackForward(a2), - cef_internal::CallbackForward(a3), - cef_internal::CallbackForward(a4), - cef_internal::CallbackForward(a5), - cef_internal::CallbackForward(a6)); - } - - private: - typedef R(*PolymorphicInvoke)( - cef_internal::BindStateBase*, - typename cef_internal::CallbackParamTraits::ForwardType, - typename cef_internal::CallbackParamTraits::ForwardType, - typename cef_internal::CallbackParamTraits::ForwardType, - typename cef_internal::CallbackParamTraits::ForwardType, - typename cef_internal::CallbackParamTraits::ForwardType, - typename cef_internal::CallbackParamTraits::ForwardType); - -}; - -template -class Callback : public cef_internal::CallbackBase { - public: - typedef R(RunType)(A1, A2, A3, A4, A5, A6, A7); - - Callback() : CallbackBase(NULL) { } - - // Note that this constructor CANNOT be explicit, and that Bind() CANNOT - // return the exact Callback<> type. See base/bind.h for details. - template - Callback(cef_internal::BindState* bind_state) - : CallbackBase(bind_state) { - - // Force the assignment to a local variable of PolymorphicInvoke - // so the compiler will typecheck that the passed in Run() method has - // the correct type. - PolymorphicInvoke invoke_func = - &cef_internal::BindState - ::InvokerType::Run; - polymorphic_invoke_ = reinterpret_cast(invoke_func); - } - - bool Equals(const Callback& other) const { - return CallbackBase::Equals(other); - } - - R Run(typename cef_internal::CallbackParamTraits::ForwardType a1, - typename cef_internal::CallbackParamTraits::ForwardType a2, - typename cef_internal::CallbackParamTraits::ForwardType a3, - typename cef_internal::CallbackParamTraits::ForwardType a4, - typename cef_internal::CallbackParamTraits::ForwardType a5, - typename cef_internal::CallbackParamTraits::ForwardType a6, - typename cef_internal::CallbackParamTraits::ForwardType a7) const { - PolymorphicInvoke f = - reinterpret_cast(polymorphic_invoke_); - - return f(bind_state_.get(), cef_internal::CallbackForward(a1), - cef_internal::CallbackForward(a2), - cef_internal::CallbackForward(a3), - cef_internal::CallbackForward(a4), - cef_internal::CallbackForward(a5), - cef_internal::CallbackForward(a6), - cef_internal::CallbackForward(a7)); - } - - private: - typedef R(*PolymorphicInvoke)( - cef_internal::BindStateBase*, - typename cef_internal::CallbackParamTraits::ForwardType, - typename cef_internal::CallbackParamTraits::ForwardType, - typename cef_internal::CallbackParamTraits::ForwardType, - typename cef_internal::CallbackParamTraits::ForwardType, - typename cef_internal::CallbackParamTraits::ForwardType, - typename cef_internal::CallbackParamTraits::ForwardType, - typename cef_internal::CallbackParamTraits::ForwardType); - -}; - - -// Syntactic sugar to make Callbacks easier to declare since it -// will be used in a lot of APIs with delayed execution. -typedef Callback Closure; - -} // namespace base - -#endif // !BUILDING_CEF_SHARED - -#endif // CEF_INCLUDE_BASE_CEF_CALLBACK_H_ diff --git a/tool_kits/cef/cef_wrapper/include/base/cef_callback_forward.h b/tool_kits/cef/cef_wrapper/include/base/cef_callback_forward.h deleted file mode 100644 index 4986b8f7..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/cef_callback_forward.h +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 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. - -#ifndef INCLUDE_BASE_CEF_CALLBACK_FORWARD_H_ -#define INCLUDE_BASE_CEF_CALLBACK_FORWARD_H_ -#pragma once - -#if defined(BASE_CALLBACK_FORWARD_H_) -// Do nothing if 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(BUILDING_CEF_SHARED) -// When building CEF include the Chromium header directly. -#include "base/callback_forward.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. - -namespace base { - -template -class Callback; - -typedef Callback Closure; - -} // namespace base - -#endif // !!BUILDING_CEF_SHARED - -#endif // INCLUDE_BASE_CEF_CALLBACK_FORWARD_H_ diff --git a/tool_kits/cef/cef_wrapper/include/base/cef_callback_helpers.h b/tool_kits/cef/cef_wrapper/include/base/cef_callback_helpers.h deleted file mode 100644 index 62a0c875..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/cef_callback_helpers.h +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012 -// 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. - -// This defines helpful methods for dealing with Callbacks. Because Callbacks -// are implemented using templates, with a class per callback signature, adding -// methods to Callback<> itself is unattractive (lots of extra code gets -// generated). Instead, consider adding methods here. -// -// ResetAndReturn(&cb) is like cb.Reset() but allows executing a callback (via a -// copy) after the original callback is Reset(). This can be handy if Run() -// reads/writes the variable holding the Callback. - -#ifndef CEF_INCLUDE_BASE_CEF_CALLBACK_HELPERS_H_ -#define CEF_INCLUDE_BASE_CEF_CALLBACK_HELPERS_H_ -#pragma once - -#if defined(BASE_CALLBACK_HELPERS_H_) -// Do nothing if 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(BUILDING_CEF_SHARED) -// When building CEF include the Chromium header directly. -#include "base/callback_helpers.h" -#else // !BUILDING_CEF_SHARED -// The following is substantially similar to the Chromium implementation. -// If the Chromium implementation diverges the below implementation should be -// updated to match. - -#include "include/base/cef_basictypes.h" -#include "include/base/cef_build.h" -#include "include/base/cef_callback.h" -#include "include/base/cef_macros.h" - -namespace base { - -template -base::Callback ResetAndReturn(base::Callback* cb) { - base::Callback ret(*cb); - cb->Reset(); - return ret; -} - -// ScopedClosureRunner is akin to scoped_ptr for Closures. It ensures that the -// Closure is executed and deleted no matter how the current scope exits. -class ScopedClosureRunner { - public: - ScopedClosureRunner(); - explicit ScopedClosureRunner(const Closure& closure); - ~ScopedClosureRunner(); - - void Reset(); - void Reset(const Closure& closure); - Closure Release() WARN_UNUSED_RESULT; - - private: - Closure closure_; - - DISALLOW_COPY_AND_ASSIGN(ScopedClosureRunner); -}; - -} // namespace base - -#endif // !BUILDING_CEF_SHARED - -#endif // CEF_INCLUDE_BASE_CEF_CALLBACK_HELPERS_H_ diff --git a/tool_kits/cef/cef_wrapper/include/base/cef_callback_list.h b/tool_kits/cef/cef_wrapper/include/base/cef_callback_list.h deleted file mode 100644 index 558b36f8..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/cef_callback_list.h +++ /dev/null @@ -1,444 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2013 -// Google Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CEF_INCLUDE_BASE_CEF_CALLBACK_LIST_H_ -#define CEF_INCLUDE_BASE_CEF_CALLBACK_LIST_H_ -#pragma once - -#if defined(BASE_CALLBACK_LIST_H_) -// Do nothing if 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(BUILDING_CEF_SHARED) -// When building CEF include the Chromium header directly. -#include "base/callback_list.h" -#else // !BUILDING_CEF_SHARED -// The following is substantially similar to the Chromium implementation. -// If the Chromium implementation diverges the below implementation should be -// updated to match. - -#include - -#include "include/base/cef_basictypes.h" -#include "include/base/cef_callback.h" -#include "include/base/internal/cef_callback_internal.h" -#include "include/base/cef_build.h" -#include "include/base/cef_logging.h" -#include "include/base/cef_macros.h" -#include "include/base/cef_scoped_ptr.h" - -// OVERVIEW: -// -// A container for a list of callbacks. Unlike a normal STL vector or list, -// this container can be modified during iteration without invalidating the -// iterator. It safely handles the case of a callback removing itself -// or another callback from the list while callbacks are being run. -// -// TYPICAL USAGE: -// -// class MyWidget { -// public: -// ... -// -// typedef base::Callback OnFooCallback; -// -// scoped_ptr::Subscription> -// RegisterCallback(const OnFooCallback& cb) { -// return callback_list_.Add(cb); -// } -// -// private: -// void NotifyFoo(const Foo& foo) { -// callback_list_.Notify(foo); -// } -// -// base::CallbackList callback_list_; -// -// DISALLOW_COPY_AND_ASSIGN(MyWidget); -// }; -// -// -// class MyWidgetListener { -// public: -// MyWidgetListener::MyWidgetListener() { -// foo_subscription_ = MyWidget::GetCurrent()->RegisterCallback( -// base::Bind(&MyWidgetListener::OnFoo, this))); -// } -// -// MyWidgetListener::~MyWidgetListener() { -// // Subscription gets deleted automatically and will deregister -// // the callback in the process. -// } -// -// private: -// void OnFoo(const Foo& foo) { -// // Do something. -// } -// -// scoped_ptr::Subscription> -// foo_subscription_; -// -// DISALLOW_COPY_AND_ASSIGN(MyWidgetListener); -// }; - -namespace base { - -namespace cef_internal { - -template -class CallbackListBase { - public: - class Subscription { - public: - Subscription(CallbackListBase* list, - typename std::list::iterator iter) - : list_(list), - iter_(iter) { - } - - ~Subscription() { - if (list_->active_iterator_count_) { - iter_->Reset(); - } else { - list_->callbacks_.erase(iter_); - if (!list_->removal_callback_.is_null()) - list_->removal_callback_.Run(); - } - } - - private: - CallbackListBase* list_; - typename std::list::iterator iter_; - - DISALLOW_COPY_AND_ASSIGN(Subscription); - }; - - // Add a callback to the list. The callback will remain registered until the - // returned Subscription is destroyed, which must occur before the - // CallbackList is destroyed. - scoped_ptr Add(const CallbackType& cb) WARN_UNUSED_RESULT { - DCHECK(!cb.is_null()); - return scoped_ptr( - new Subscription(this, callbacks_.insert(callbacks_.end(), cb))); - } - - // Sets a callback which will be run when a subscription list is changed. - void set_removal_callback(const Closure& callback) { - removal_callback_ = callback; - } - - // Returns true if there are no subscriptions. This is only valid to call when - // not looping through the list. - bool empty() { - DCHECK_EQ(0, active_iterator_count_); - return callbacks_.empty(); - } - - protected: - // An iterator class that can be used to access the list of callbacks. - class Iterator { - public: - explicit Iterator(CallbackListBase* list) - : list_(list), - list_iter_(list_->callbacks_.begin()) { - ++list_->active_iterator_count_; - } - - Iterator(const Iterator& iter) - : list_(iter.list_), - list_iter_(iter.list_iter_) { - ++list_->active_iterator_count_; - } - - ~Iterator() { - if (list_ && --list_->active_iterator_count_ == 0) { - list_->Compact(); - } - } - - CallbackType* GetNext() { - while ((list_iter_ != list_->callbacks_.end()) && list_iter_->is_null()) - ++list_iter_; - - CallbackType* cb = NULL; - if (list_iter_ != list_->callbacks_.end()) { - cb = &(*list_iter_); - ++list_iter_; - } - return cb; - } - - private: - CallbackListBase* list_; - typename std::list::iterator list_iter_; - }; - - CallbackListBase() : active_iterator_count_(0) {} - - ~CallbackListBase() { - DCHECK_EQ(0, active_iterator_count_); - DCHECK_EQ(0U, callbacks_.size()); - } - - // Returns an instance of a CallbackListBase::Iterator which can be used - // to run callbacks. - Iterator GetIterator() { - return Iterator(this); - } - - // Compact the list: remove any entries which were NULLed out during - // iteration. - void Compact() { - typename std::list::iterator it = callbacks_.begin(); - bool updated = false; - while (it != callbacks_.end()) { - if ((*it).is_null()) { - updated = true; - it = callbacks_.erase(it); - } else { - ++it; - } - - if (updated && !removal_callback_.is_null()) - removal_callback_.Run(); - } - } - - private: - std::list callbacks_; - int active_iterator_count_; - Closure removal_callback_; - - DISALLOW_COPY_AND_ASSIGN(CallbackListBase); -}; - -} // namespace cef_internal - -template class CallbackList; - -template <> -class CallbackList - : public cef_internal::CallbackListBase > { - public: - typedef Callback CallbackType; - - CallbackList() {} - - void Notify() { - cef_internal::CallbackListBase::Iterator it = - this->GetIterator(); - CallbackType* cb; - while ((cb = it.GetNext()) != NULL) { - cb->Run(); - } - } - - private: - DISALLOW_COPY_AND_ASSIGN(CallbackList); -}; - -template -class CallbackList - : public cef_internal::CallbackListBase > { - public: - typedef Callback CallbackType; - - CallbackList() {} - - void Notify(typename cef_internal::CallbackParamTraits::ForwardType a1) { - typename cef_internal::CallbackListBase::Iterator it = - this->GetIterator(); - CallbackType* cb; - while ((cb = it.GetNext()) != NULL) { - cb->Run(a1); - } - } - - private: - DISALLOW_COPY_AND_ASSIGN(CallbackList); -}; - -template -class CallbackList - : public cef_internal::CallbackListBase > { - public: - typedef Callback CallbackType; - - CallbackList() {} - - void Notify(typename cef_internal::CallbackParamTraits::ForwardType a1, - typename cef_internal::CallbackParamTraits::ForwardType a2) { - typename cef_internal::CallbackListBase::Iterator it = - this->GetIterator(); - CallbackType* cb; - while ((cb = it.GetNext()) != NULL) { - cb->Run(a1, a2); - } - } - - private: - DISALLOW_COPY_AND_ASSIGN(CallbackList); -}; - -template -class CallbackList - : public cef_internal::CallbackListBase > { - public: - typedef Callback CallbackType; - - CallbackList() {} - - void Notify(typename cef_internal::CallbackParamTraits::ForwardType a1, - typename cef_internal::CallbackParamTraits::ForwardType a2, - typename cef_internal::CallbackParamTraits::ForwardType a3) { - typename cef_internal::CallbackListBase::Iterator it = - this->GetIterator(); - CallbackType* cb; - while ((cb = it.GetNext()) != NULL) { - cb->Run(a1, a2, a3); - } - } - - private: - DISALLOW_COPY_AND_ASSIGN(CallbackList); -}; - -template -class CallbackList - : public cef_internal::CallbackListBase > { - public: - typedef Callback CallbackType; - - CallbackList() {} - - void Notify(typename cef_internal::CallbackParamTraits::ForwardType a1, - typename cef_internal::CallbackParamTraits::ForwardType a2, - typename cef_internal::CallbackParamTraits::ForwardType a3, - typename cef_internal::CallbackParamTraits::ForwardType a4) { - typename cef_internal::CallbackListBase::Iterator it = - this->GetIterator(); - CallbackType* cb; - while ((cb = it.GetNext()) != NULL) { - cb->Run(a1, a2, a3, a4); - } - } - - private: - DISALLOW_COPY_AND_ASSIGN(CallbackList); -}; - -template -class CallbackList - : public cef_internal::CallbackListBase > { - public: - typedef Callback CallbackType; - - CallbackList() {} - - void Notify(typename cef_internal::CallbackParamTraits::ForwardType a1, - typename cef_internal::CallbackParamTraits::ForwardType a2, - typename cef_internal::CallbackParamTraits::ForwardType a3, - typename cef_internal::CallbackParamTraits::ForwardType a4, - typename cef_internal::CallbackParamTraits::ForwardType a5) { - typename cef_internal::CallbackListBase::Iterator it = - this->GetIterator(); - CallbackType* cb; - while ((cb = it.GetNext()) != NULL) { - cb->Run(a1, a2, a3, a4, a5); - } - } - - private: - DISALLOW_COPY_AND_ASSIGN(CallbackList); -}; - -template -class CallbackList - : public cef_internal::CallbackListBase > { - public: - typedef Callback CallbackType; - - CallbackList() {} - - void Notify(typename cef_internal::CallbackParamTraits::ForwardType a1, - typename cef_internal::CallbackParamTraits::ForwardType a2, - typename cef_internal::CallbackParamTraits::ForwardType a3, - typename cef_internal::CallbackParamTraits::ForwardType a4, - typename cef_internal::CallbackParamTraits::ForwardType a5, - typename cef_internal::CallbackParamTraits::ForwardType a6) { - typename cef_internal::CallbackListBase::Iterator it = - this->GetIterator(); - CallbackType* cb; - while ((cb = it.GetNext()) != NULL) { - cb->Run(a1, a2, a3, a4, a5, a6); - } - } - - private: - DISALLOW_COPY_AND_ASSIGN(CallbackList); -}; - -template -class CallbackList - : public cef_internal::CallbackListBase > { - public: - typedef Callback CallbackType; - - CallbackList() {} - - void Notify(typename cef_internal::CallbackParamTraits::ForwardType a1, - typename cef_internal::CallbackParamTraits::ForwardType a2, - typename cef_internal::CallbackParamTraits::ForwardType a3, - typename cef_internal::CallbackParamTraits::ForwardType a4, - typename cef_internal::CallbackParamTraits::ForwardType a5, - typename cef_internal::CallbackParamTraits::ForwardType a6, - typename cef_internal::CallbackParamTraits::ForwardType a7) { - typename cef_internal::CallbackListBase::Iterator it = - this->GetIterator(); - CallbackType* cb; - while ((cb = it.GetNext()) != NULL) { - cb->Run(a1, a2, a3, a4, a5, a6, a7); - } - } - - private: - DISALLOW_COPY_AND_ASSIGN(CallbackList); -}; - -} // namespace base - -#endif // !BUILDING_CEF_SHARED - -#endif // CEF_INCLUDE_BASE_CEF_CALLBACK_LIST_H_ diff --git a/tool_kits/cef/cef_wrapper/include/base/cef_cancelable_callback.h b/tool_kits/cef/cef_wrapper/include/base/cef_cancelable_callback.h deleted file mode 100644 index 8ad3bf3b..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/cef_cancelable_callback.h +++ /dev/null @@ -1,314 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 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. -// -// CancelableCallback is a wrapper around base::Callback that allows -// cancellation of a callback. CancelableCallback takes a reference on the -// wrapped callback until this object is destroyed or Reset()/Cancel() are -// called. -// -// NOTE: -// -// Calling CancelableCallback::Cancel() brings the object back to its natural, -// default-constructed state, i.e., CancelableCallback::callback() will return -// a null callback. -// -// THREAD-SAFETY: -// -// CancelableCallback objects must be created on, posted to, cancelled on, and -// destroyed on the same thread. -// -// -// EXAMPLE USAGE: -// -// In the following example, the test is verifying that RunIntensiveTest() -// Quit()s the message loop within 4 seconds. The cancelable callback is posted -// to the message loop, the intensive test runs, the message loop is run, -// then the callback is cancelled. -// -// void TimeoutCallback(const std::string& timeout_message) { -// FAIL() << timeout_message; -// MessageLoop::current()->QuitWhenIdle(); -// } -// -// CancelableClosure timeout(base::Bind(&TimeoutCallback, "Test timed out.")); -// MessageLoop::current()->PostDelayedTask(FROM_HERE, timeout.callback(), -// 4000) // 4 seconds to run. -// RunIntensiveTest(); -// MessageLoop::current()->Run(); -// timeout.Cancel(); // Hopefully this is hit before the timeout callback runs. -// - -#ifndef CEF_INCLUDE_BASE_CEF_CANCELABLE_CALLBACK_H_ -#define CEF_INCLUDE_BASE_CEF_CANCELABLE_CALLBACK_H_ -#pragma once - -#if defined(BASE_CANCELABLE_CALLBACK_H_) -// Do nothing if 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(BUILDING_CEF_SHARED) -// When building CEF include the Chromium header directly. -#include "base/cancelable_callback.h" -#else // !BUILDING_CEF_SHARED -// The following is substantially similar to the Chromium implementation. -// If the Chromium implementation diverges the below implementation should be -// updated to match. - -#include "include/base/cef_bind.h" -#include "include/base/cef_callback.h" -#include "include/base/cef_build.h" -#include "include/base/cef_logging.h" -#include "include/base/cef_macros.h" -#include "include/base/cef_weak_ptr.h" -#include "include/base/internal/cef_callback_internal.h" - -namespace base { - -template -class CancelableCallback; - -template <> -class CancelableCallback { - public: - CancelableCallback() : weak_factory_(this) {} - - // |callback| must not be null. - explicit CancelableCallback(const base::Callback& callback) - : weak_factory_(this), - callback_(callback) { - DCHECK(!callback.is_null()); - InitializeForwarder(); - } - - ~CancelableCallback() {} - - // Cancels and drops the reference to the wrapped callback. - void Cancel() { - weak_factory_.InvalidateWeakPtrs(); - forwarder_.Reset(); - callback_.Reset(); - } - - // Returns true if the wrapped callback has been cancelled. - bool IsCancelled() const { - return callback_.is_null(); - } - - // Sets |callback| as the closure that may be cancelled. |callback| may not - // be null. Outstanding and any previously wrapped callbacks are cancelled. - void Reset(const base::Callback& callback) { - DCHECK(!callback.is_null()); - - // Outstanding tasks (e.g., posted to a message loop) must not be called. - Cancel(); - - // |forwarder_| is no longer valid after Cancel(), so re-bind. - InitializeForwarder(); - - callback_ = callback; - } - - // Returns a callback that can be disabled by calling Cancel(). - const base::Callback& callback() const { - return forwarder_; - } - - private: - void Forward() { - callback_.Run(); - } - - // Helper method to bind |forwarder_| using a weak pointer from - // |weak_factory_|. - void InitializeForwarder() { - forwarder_ = base::Bind(&CancelableCallback::Forward, - weak_factory_.GetWeakPtr()); - } - - // Used to ensure Forward() is not run when this object is destroyed. - base::WeakPtrFactory > weak_factory_; - - // The wrapper closure. - base::Callback forwarder_; - - // The stored closure that may be cancelled. - base::Callback callback_; - - DISALLOW_COPY_AND_ASSIGN(CancelableCallback); -}; - -template -class CancelableCallback { - public: - CancelableCallback() : weak_factory_(this) {} - - // |callback| must not be null. - explicit CancelableCallback(const base::Callback& callback) - : weak_factory_(this), - callback_(callback) { - DCHECK(!callback.is_null()); - InitializeForwarder(); - } - - ~CancelableCallback() {} - - // Cancels and drops the reference to the wrapped callback. - void Cancel() { - weak_factory_.InvalidateWeakPtrs(); - forwarder_.Reset(); - callback_.Reset(); - } - - // Returns true if the wrapped callback has been cancelled. - bool IsCancelled() const { - return callback_.is_null(); - } - - // Sets |callback| as the closure that may be cancelled. |callback| may not - // be null. Outstanding and any previously wrapped callbacks are cancelled. - void Reset(const base::Callback& callback) { - DCHECK(!callback.is_null()); - - // Outstanding tasks (e.g., posted to a message loop) must not be called. - Cancel(); - - // |forwarder_| is no longer valid after Cancel(), so re-bind. - InitializeForwarder(); - - callback_ = callback; - } - - // Returns a callback that can be disabled by calling Cancel(). - const base::Callback& callback() const { - return forwarder_; - } - - private: - void Forward(A1 a1) const { - callback_.Run(a1); - } - - // Helper method to bind |forwarder_| using a weak pointer from - // |weak_factory_|. - void InitializeForwarder() { - forwarder_ = base::Bind(&CancelableCallback::Forward, - weak_factory_.GetWeakPtr()); - } - - // Used to ensure Forward() is not run when this object is destroyed. - base::WeakPtrFactory > weak_factory_; - - // The wrapper closure. - base::Callback forwarder_; - - // The stored closure that may be cancelled. - base::Callback callback_; - - DISALLOW_COPY_AND_ASSIGN(CancelableCallback); -}; - -template -class CancelableCallback { - public: - CancelableCallback() : weak_factory_(this) {} - - // |callback| must not be null. - explicit CancelableCallback(const base::Callback& callback) - : weak_factory_(this), - callback_(callback) { - DCHECK(!callback.is_null()); - InitializeForwarder(); - } - - ~CancelableCallback() {} - - // Cancels and drops the reference to the wrapped callback. - void Cancel() { - weak_factory_.InvalidateWeakPtrs(); - forwarder_.Reset(); - callback_.Reset(); - } - - // Returns true if the wrapped callback has been cancelled. - bool IsCancelled() const { - return callback_.is_null(); - } - - // Sets |callback| as the closure that may be cancelled. |callback| may not - // be null. Outstanding and any previously wrapped callbacks are cancelled. - void Reset(const base::Callback& callback) { - DCHECK(!callback.is_null()); - - // Outstanding tasks (e.g., posted to a message loop) must not be called. - Cancel(); - - // |forwarder_| is no longer valid after Cancel(), so re-bind. - InitializeForwarder(); - - callback_ = callback; - } - - // Returns a callback that can be disabled by calling Cancel(). - const base::Callback& callback() const { - return forwarder_; - } - - private: - void Forward(A1 a1, A2 a2) const { - callback_.Run(a1, a2); - } - - // Helper method to bind |forwarder_| using a weak pointer from - // |weak_factory_|. - void InitializeForwarder() { - forwarder_ = base::Bind(&CancelableCallback::Forward, - weak_factory_.GetWeakPtr()); - } - - // Used to ensure Forward() is not run when this object is destroyed. - base::WeakPtrFactory > weak_factory_; - - // The wrapper closure. - base::Callback forwarder_; - - // The stored closure that may be cancelled. - base::Callback callback_; - - DISALLOW_COPY_AND_ASSIGN(CancelableCallback); -}; - -typedef CancelableCallback CancelableClosure; - -} // namespace base - -#endif // !BUILDING_CEF_SHARED - -#endif // CEF_INCLUDE_BASE_CEF_CANCELABLE_CALLBACK_H_ diff --git a/tool_kits/cef/cef_wrapper/include/base/cef_lock.h b/tool_kits/cef/cef_wrapper/include/base/cef_lock.h deleted file mode 100644 index febcc9a9..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/cef_lock.h +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 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. - -#ifndef CEF_INCLUDE_BASE_CEF_LOCK_H_ -#define CEF_INCLUDE_BASE_CEF_LOCK_H_ -#pragma once - -#if defined(BASE_SYNCHRONIZATION_LOCK_H_) -// Do nothing if 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(BUILDING_CEF_SHARED) -// When building CEF include the Chromium header directly. -#include "base/synchronization/lock.h" -#else // !BUILDING_CEF_SHARED -// The following is substantially similar to the Chromium implementation. -// If the Chromium implementation diverges the below implementation should be -// updated to match. - -#include "include/base/cef_macros.h" -#include "include/base/cef_platform_thread.h" -#include "include/base/internal/cef_lock_impl.h" - -namespace base { - -// A convenient wrapper for an OS specific critical section. The only real -// intelligence in this class is in debug mode for the support for the -// AssertAcquired() method. -class Lock { - public: -#if defined(NDEBUG) // Optimized wrapper implementation - Lock() : lock_() {} - ~Lock() {} - void Acquire() { lock_.Lock(); } - void Release() { lock_.Unlock(); } - - // If the lock is not held, take it and return true. If the lock is already - // held by another thread, immediately return false. This must not be called - // by a thread already holding the lock (what happens is undefined and an - // assertion may fail). - bool Try() { return lock_.Try(); } - - // Null implementation if not debug. - void AssertAcquired() const {} -#else - Lock(); - ~Lock(); - - // NOTE: Although windows critical sections support recursive locks, we do not - // allow this, and we will commonly fire a DCHECK() if a thread attempts to - // acquire the lock a second time (while already holding it). - void Acquire() { - lock_.Lock(); - CheckUnheldAndMark(); - } - void Release() { - CheckHeldAndUnmark(); - lock_.Unlock(); - } - - bool Try() { - bool rv = lock_.Try(); - if (rv) { - CheckUnheldAndMark(); - } - return rv; - } - - void AssertAcquired() const; -#endif // NDEBUG - - private: -#if !defined(NDEBUG) - // Members and routines taking care of locks assertions. - // Note that this checks for recursive locks and allows them - // if the variable is set. This is allowed by the underlying implementation - // on windows but not on Posix, so we're doing unneeded checks on Posix. - // It's worth it to share the code. - void CheckHeldAndUnmark(); - void CheckUnheldAndMark(); - - // All private data is implicitly protected by lock_. - // Be VERY careful to only access members under that lock. - base::PlatformThreadRef owning_thread_ref_; -#endif // NDEBUG - - // Platform specific underlying lock implementation. - cef_internal::LockImpl lock_; - - DISALLOW_COPY_AND_ASSIGN(Lock); -}; - -// A helper class that acquires the given Lock while the AutoLock is in scope. -class AutoLock { - public: - struct AlreadyAcquired {}; - - explicit AutoLock(Lock& lock) : lock_(lock) { - lock_.Acquire(); - } - - AutoLock(Lock& lock, const AlreadyAcquired&) : lock_(lock) { - lock_.AssertAcquired(); - } - - ~AutoLock() { - lock_.AssertAcquired(); - lock_.Release(); - } - - private: - Lock& lock_; - DISALLOW_COPY_AND_ASSIGN(AutoLock); -}; - -// AutoUnlock is a helper that will Release() the |lock| argument in the -// constructor, and re-Acquire() it in the destructor. -class AutoUnlock { - public: - explicit AutoUnlock(Lock& lock) : lock_(lock) { - // We require our caller to have the lock. - lock_.AssertAcquired(); - lock_.Release(); - } - - ~AutoUnlock() { - lock_.Acquire(); - } - - private: - Lock& lock_; - DISALLOW_COPY_AND_ASSIGN(AutoUnlock); -}; - -} // namespace base - -#endif // !BUILDING_CEF_SHARED - -#endif // CEF_INCLUDE_BASE_CEF_LOCK_H_ diff --git a/tool_kits/cef/cef_wrapper/include/base/cef_logging.h b/tool_kits/cef/cef_wrapper/include/base/cef_logging.h deleted file mode 100644 index 914855ef..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/cef_logging.h +++ /dev/null @@ -1,752 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012 -// 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 only available to applications that link -// against the libcef_dll_wrapper target. -// -// WARNING: Logging macros should not be used in the main/browser process before -// calling CefInitialize or in sub-processes before calling CefExecuteProcess. -// -// Instructions -// ------------ -// -// Make a bunch of macros for logging. The way to log things is to stream -// things to LOG(). E.g., -// -// LOG(INFO) << "Found " << num_cookies << " cookies"; -// -// You can also do conditional logging: -// -// LOG_IF(INFO, num_cookies > 10) << "Got lots of cookies"; -// -// The CHECK(condition) macro is active in both debug and release builds and -// effectively performs a LOG(FATAL) which terminates the process and -// generates a crashdump unless a debugger is attached. -// -// There are also "debug mode" logging macros like the ones above: -// -// DLOG(INFO) << "Found cookies"; -// -// DLOG_IF(INFO, num_cookies > 10) << "Got lots of cookies"; -// -// All "debug mode" logging is compiled away to nothing for non-debug mode -// compiles. LOG_IF and development flags also work well together -// because the code can be compiled away sometimes. -// -// We also have -// -// LOG_ASSERT(assertion); -// DLOG_ASSERT(assertion); -// -// which is syntactic sugar for {,D}LOG_IF(FATAL, assert fails) << assertion; -// -// There are "verbose level" logging macros. They look like -// -// VLOG(1) << "I'm printed when you run the program with --v=1 or more"; -// VLOG(2) << "I'm printed when you run the program with --v=2 or more"; -// -// These always log at the INFO log level (when they log at all). -// The verbose logging can also be turned on module-by-module. For instance, -// --vmodule=profile=2,icon_loader=1,browser_*=3,*/chromeos/*=4 --v=0 -// will cause: -// a. VLOG(2) and lower messages to be printed from profile.{h,cc} -// b. VLOG(1) and lower messages to be printed from icon_loader.{h,cc} -// c. VLOG(3) and lower messages to be printed from files prefixed with -// "browser" -// d. VLOG(4) and lower messages to be printed from files under a -// "chromeos" directory. -// e. VLOG(0) and lower messages to be printed from elsewhere -// -// The wildcarding functionality shown by (c) supports both '*' (match -// 0 or more characters) and '?' (match any single character) -// wildcards. Any pattern containing a forward or backward slash will -// be tested against the whole pathname and not just the module. -// E.g., "*/foo/bar/*=2" would change the logging level for all code -// in source files under a "foo/bar" directory. -// -// There's also VLOG_IS_ON(n) "verbose level" condition macro. To be used as -// -// if (VLOG_IS_ON(2)) { -// // do some logging preparation and logging -// // that can't be accomplished with just VLOG(2) << ...; -// } -// -// There is also a VLOG_IF "verbose level" condition macro for sample -// cases, when some extra computation and preparation for logs is not -// needed. -// -// VLOG_IF(1, (size > 1024)) -// << "I'm printed when size is more than 1024 and when you run the " -// "program with --v=1 or more"; -// -// We also override the standard 'assert' to use 'DLOG_ASSERT'. -// -// Lastly, there is: -// -// PLOG(ERROR) << "Couldn't do foo"; -// DPLOG(ERROR) << "Couldn't do foo"; -// PLOG_IF(ERROR, cond) << "Couldn't do foo"; -// DPLOG_IF(ERROR, cond) << "Couldn't do foo"; -// PCHECK(condition) << "Couldn't do foo"; -// DPCHECK(condition) << "Couldn't do foo"; -// -// which append the last system error to the message in string form (taken from -// GetLastError() on Windows and errno on POSIX). -// -// The supported severity levels for macros that allow you to specify one -// are (in increasing order of severity) INFO, WARNING, ERROR, and FATAL. -// -// Very important: logging a message at the FATAL severity level causes -// the program to terminate (after the message is logged). -// -// There is the special severity of DFATAL, which logs FATAL in debug mode, -// ERROR in normal mode. -// - -#ifndef CEF_INCLUDE_BASE_CEF_LOGGING_H_ -#define CEF_INCLUDE_BASE_CEF_LOGGING_H_ -#pragma once - -#if defined(DCHECK) -// Do nothing if the macros provided by this header already exist. -// 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. - -// Always define the DCHECK_IS_ON macro which is used from other CEF headers. -#if defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON) -#define DCHECK_IS_ON() 0 -#else -#define DCHECK_IS_ON() 1 -#endif - -#elif defined(BUILDING_CEF_SHARED) -// When building CEF include the Chromium header directly. -#include "base/logging.h" -#else // !BUILDING_CEF_SHARED -// The following is substantially similar to the Chromium implementation. -// If the Chromium implementation diverges the below implementation should be -// updated to match. - -#include -#include -#include -#include - -#include "include/base/cef_build.h" -#include "include/base/cef_macros.h" -#include "include/internal/cef_logging_internal.h" - -namespace cef { -namespace logging { - -// Gets the current log level. -inline int GetMinLogLevel() { - return cef_get_min_log_level(); -} - -// Gets the current vlog level for the given file (usually taken from -// __FILE__). Note that |N| is the size *with* the null terminator. -template -int GetVlogLevel(const char (&file)[N]) { - return cef_get_vlog_level(file, N); -} - -typedef int LogSeverity; -const LogSeverity LOG_VERBOSE = -1; // This is level 1 verbosity -// Note: the log severities are used to index into the array of names, -// see log_severity_names. -const LogSeverity LOG_INFO = 0; -const LogSeverity LOG_WARNING = 1; -const LogSeverity LOG_ERROR = 2; -const LogSeverity LOG_FATAL = 3; -const LogSeverity LOG_NUM_SEVERITIES = 4; - -// LOG_DFATAL is LOG_FATAL in debug mode, ERROR in normal mode -#ifdef NDEBUG -const LogSeverity LOG_DFATAL = LOG_ERROR; -#else -const LogSeverity LOG_DFATAL = LOG_FATAL; -#endif - -// A few definitions of macros that don't generate much code. These are used -// by LOG() and LOG_IF, etc. Since these are used all over our code, it's -// better to have compact code for these operations. -#define COMPACT_GOOGLE_LOG_EX_INFO(ClassName, ...) \ - cef::logging::ClassName(__FILE__, __LINE__, cef::logging::LOG_INFO , \ - ##__VA_ARGS__) -#define COMPACT_GOOGLE_LOG_EX_WARNING(ClassName, ...) \ - cef::logging::ClassName(__FILE__, __LINE__, cef::logging::LOG_WARNING , \ - ##__VA_ARGS__) -#define COMPACT_GOOGLE_LOG_EX_ERROR(ClassName, ...) \ - cef::logging::ClassName(__FILE__, __LINE__, cef::logging::LOG_ERROR , \ - ##__VA_ARGS__) -#define COMPACT_GOOGLE_LOG_EX_FATAL(ClassName, ...) \ - cef::logging::ClassName(__FILE__, __LINE__, cef::logging::LOG_FATAL , \ - ##__VA_ARGS__) -#define COMPACT_GOOGLE_LOG_EX_DFATAL(ClassName, ...) \ - cef::logging::ClassName(__FILE__, __LINE__, cef::logging::LOG_DFATAL , \ - ##__VA_ARGS__) - -#define COMPACT_GOOGLE_LOG_INFO \ - COMPACT_GOOGLE_LOG_EX_INFO(LogMessage) -#define COMPACT_GOOGLE_LOG_WARNING \ - COMPACT_GOOGLE_LOG_EX_WARNING(LogMessage) -#define COMPACT_GOOGLE_LOG_ERROR \ - COMPACT_GOOGLE_LOG_EX_ERROR(LogMessage) -#define COMPACT_GOOGLE_LOG_FATAL \ - COMPACT_GOOGLE_LOG_EX_FATAL(LogMessage) -#define COMPACT_GOOGLE_LOG_DFATAL \ - COMPACT_GOOGLE_LOG_EX_DFATAL(LogMessage) - -#if defined(OS_WIN) -// wingdi.h defines ERROR to be 0. When we call LOG(ERROR), it gets -// substituted with 0, and it expands to COMPACT_GOOGLE_LOG_0. To allow us -// to keep using this syntax, we define this macro to do the same thing -// as COMPACT_GOOGLE_LOG_ERROR, and also define ERROR the same way that -// the Windows SDK does for consistency. -#define ERROR 0 -#define COMPACT_GOOGLE_LOG_EX_0(ClassName, ...) \ - COMPACT_GOOGLE_LOG_EX_ERROR(ClassName , ##__VA_ARGS__) -#define COMPACT_GOOGLE_LOG_0 COMPACT_GOOGLE_LOG_ERROR -// Needed for LOG_IS_ON(ERROR). -const LogSeverity LOG_0 = LOG_ERROR; -#endif - -// As special cases, we can assume that LOG_IS_ON(FATAL) always holds. Also, -// LOG_IS_ON(DFATAL) always holds in debug mode. In particular, CHECK()s will -// always fire if they fail. -#define LOG_IS_ON(severity) \ - ((::cef::logging::LOG_ ## severity) >= ::cef::logging::GetMinLogLevel()) - -// We can't do any caching tricks with VLOG_IS_ON() like the -// google-glog version since it requires GCC extensions. This means -// that using the v-logging functions in conjunction with --vmodule -// may be slow. -#define VLOG_IS_ON(verboselevel) \ - ((verboselevel) <= ::cef::logging::GetVlogLevel(__FILE__)) - -// Helper macro which avoids evaluating the arguments to a stream if -// the condition doesn't hold. -#define LAZY_STREAM(stream, condition) \ - !(condition) ? (void) 0 : ::cef::logging::LogMessageVoidify() & (stream) - -// We use the preprocessor's merging operator, "##", so that, e.g., -// LOG(INFO) becomes the token COMPACT_GOOGLE_LOG_INFO. There's some funny -// subtle difference between ostream member streaming functions (e.g., -// ostream::operator<<(int) and ostream non-member streaming functions -// (e.g., ::operator<<(ostream&, string&): it turns out that it's -// impossible to stream something like a string directly to an unnamed -// ostream. We employ a neat hack by calling the stream() member -// function of LogMessage which seems to avoid the problem. -#define LOG_STREAM(severity) COMPACT_GOOGLE_LOG_ ## severity.stream() - -#define LOG(severity) LAZY_STREAM(LOG_STREAM(severity), LOG_IS_ON(severity)) -#define LOG_IF(severity, condition) \ - LAZY_STREAM(LOG_STREAM(severity), LOG_IS_ON(severity) && (condition)) - -#define SYSLOG(severity) LOG(severity) -#define SYSLOG_IF(severity, condition) LOG_IF(severity, condition) - -// The VLOG macros log with negative verbosities. -#define VLOG_STREAM(verbose_level) \ - cef::logging::LogMessage(__FILE__, __LINE__, -verbose_level).stream() - -#define VLOG(verbose_level) \ - LAZY_STREAM(VLOG_STREAM(verbose_level), VLOG_IS_ON(verbose_level)) - -#define VLOG_IF(verbose_level, condition) \ - LAZY_STREAM(VLOG_STREAM(verbose_level), \ - VLOG_IS_ON(verbose_level) && (condition)) - -#if defined (OS_WIN) -#define VPLOG_STREAM(verbose_level) \ - cef::logging::Win32ErrorLogMessage(__FILE__, __LINE__, -verbose_level, \ - ::cef::logging::GetLastSystemErrorCode()).stream() -#elif defined(OS_POSIX) -#define VPLOG_STREAM(verbose_level) \ - cef::logging::ErrnoLogMessage(__FILE__, __LINE__, -verbose_level, \ - ::cef::logging::GetLastSystemErrorCode()).stream() -#endif - -#define VPLOG(verbose_level) \ - LAZY_STREAM(VPLOG_STREAM(verbose_level), VLOG_IS_ON(verbose_level)) - -#define VPLOG_IF(verbose_level, condition) \ - LAZY_STREAM(VPLOG_STREAM(verbose_level), \ - VLOG_IS_ON(verbose_level) && (condition)) - -// TODO(akalin): Add more VLOG variants, e.g. VPLOG. - -#define LOG_ASSERT(condition) \ - LOG_IF(FATAL, !(condition)) << "Assert failed: " #condition ". " -#define SYSLOG_ASSERT(condition) \ - SYSLOG_IF(FATAL, !(condition)) << "Assert failed: " #condition ". " - -#if defined(OS_WIN) -#define PLOG_STREAM(severity) \ - COMPACT_GOOGLE_LOG_EX_ ## severity(Win32ErrorLogMessage, \ - ::cef::logging::GetLastSystemErrorCode()).stream() -#elif defined(OS_POSIX) -#define PLOG_STREAM(severity) \ - COMPACT_GOOGLE_LOG_EX_ ## severity(ErrnoLogMessage, \ - ::cef::logging::GetLastSystemErrorCode()).stream() -#endif - -#define PLOG(severity) \ - LAZY_STREAM(PLOG_STREAM(severity), LOG_IS_ON(severity)) - -#define PLOG_IF(severity, condition) \ - LAZY_STREAM(PLOG_STREAM(severity), LOG_IS_ON(severity) && (condition)) - -// The actual stream used isn't important. -#define EAT_STREAM_PARAMETERS \ - true ? (void) 0 : ::cef::logging::LogMessageVoidify() & LOG_STREAM(FATAL) - -// CHECK dies with a fatal error if condition is not true. It is *not* -// controlled by NDEBUG, so the check will be executed regardless of -// compilation mode. -// -// We make sure CHECK et al. always evaluates their arguments, as -// doing CHECK(FunctionWithSideEffect()) is a common idiom. - -#define CHECK(condition) \ - LAZY_STREAM(LOG_STREAM(FATAL), !(condition)) \ - << "Check failed: " #condition ". " - -#define PCHECK(condition) \ - LAZY_STREAM(PLOG_STREAM(FATAL), !(condition)) \ - << "Check failed: " #condition ". " - -// Helper macro for binary operators. -// Don't use this macro directly in your code, use CHECK_EQ et al below. -// -// TODO(akalin): Rewrite this so that constructs like if (...) -// CHECK_EQ(...) else { ... } work properly. -#define CHECK_OP(name, op, val1, val2) \ - if (std::string* _result = \ - cef::logging::Check##name##Impl((val1), (val2), \ - #val1 " " #op " " #val2)) \ - cef::logging::LogMessage(__FILE__, __LINE__, _result).stream() - -// Build the error message string. This is separate from the "Impl" -// function template because it is not performance critical and so can -// be out of line, while the "Impl" code should be inline. Caller -// takes ownership of the returned string. -template -std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) { - std::ostringstream ss; - ss << names << " (" << v1 << " vs. " << v2 << ")"; - std::string* msg = new std::string(ss.str()); - return msg; -} - -// MSVC doesn't like complex extern templates and DLLs. -#if !defined(COMPILER_MSVC) -// Commonly used instantiations of MakeCheckOpString<>. Explicitly instantiated -// in logging.cc. -extern template std::string* MakeCheckOpString( - const int&, const int&, const char* names); -extern template -std::string* MakeCheckOpString( - const unsigned long&, const unsigned long&, const char* names); -extern template -std::string* MakeCheckOpString( - const unsigned long&, const unsigned int&, const char* names); -extern template -std::string* MakeCheckOpString( - const unsigned int&, const unsigned long&, const char* names); -extern template -std::string* MakeCheckOpString( - const std::string&, const std::string&, const char* name); -#endif - -// Helper functions for CHECK_OP macro. -// The (int, int) specialization works around the issue that the compiler -// will not instantiate the template version of the function on values of -// unnamed enum type - see comment below. -#define DEFINE_CHECK_OP_IMPL(name, op) \ - template \ - inline std::string* Check##name##Impl(const t1& v1, const t2& v2, \ - const char* names) { \ - if (v1 op v2) return NULL; \ - else return MakeCheckOpString(v1, v2, names); \ - } \ - inline std::string* Check##name##Impl(int v1, int v2, const char* names) { \ - if (v1 op v2) return NULL; \ - else return MakeCheckOpString(v1, v2, names); \ - } -DEFINE_CHECK_OP_IMPL(EQ, ==) -DEFINE_CHECK_OP_IMPL(NE, !=) -DEFINE_CHECK_OP_IMPL(LE, <=) -DEFINE_CHECK_OP_IMPL(LT, < ) -DEFINE_CHECK_OP_IMPL(GE, >=) -DEFINE_CHECK_OP_IMPL(GT, > ) -#undef DEFINE_CHECK_OP_IMPL - -#define CHECK_EQ(val1, val2) CHECK_OP(EQ, ==, val1, val2) -#define CHECK_NE(val1, val2) CHECK_OP(NE, !=, val1, val2) -#define CHECK_LE(val1, val2) CHECK_OP(LE, <=, val1, val2) -#define CHECK_LT(val1, val2) CHECK_OP(LT, < , val1, val2) -#define CHECK_GE(val1, val2) CHECK_OP(GE, >=, val1, val2) -#define CHECK_GT(val1, val2) CHECK_OP(GT, > , val1, val2) - -#if defined(NDEBUG) -#define ENABLE_DLOG 0 -#else -#define ENABLE_DLOG 1 -#endif - -#if defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON) -#define DCHECK_IS_ON() 0 -#else -#define DCHECK_IS_ON() 1 -#endif - -// Definitions for DLOG et al. - -#if ENABLE_DLOG - -#define DLOG_IS_ON(severity) LOG_IS_ON(severity) -#define DLOG_IF(severity, condition) LOG_IF(severity, condition) -#define DLOG_ASSERT(condition) LOG_ASSERT(condition) -#define DPLOG_IF(severity, condition) PLOG_IF(severity, condition) -#define DVLOG_IF(verboselevel, condition) VLOG_IF(verboselevel, condition) -#define DVPLOG_IF(verboselevel, condition) VPLOG_IF(verboselevel, condition) - -#else // ENABLE_DLOG - -// If ENABLE_DLOG is off, we want to avoid emitting any references to -// |condition| (which may reference a variable defined only if NDEBUG -// is not defined). Contrast this with DCHECK et al., which has -// different behavior. - -#define DLOG_IS_ON(severity) false -#define DLOG_IF(severity, condition) EAT_STREAM_PARAMETERS -#define DLOG_ASSERT(condition) EAT_STREAM_PARAMETERS -#define DPLOG_IF(severity, condition) EAT_STREAM_PARAMETERS -#define DVLOG_IF(verboselevel, condition) EAT_STREAM_PARAMETERS -#define DVPLOG_IF(verboselevel, condition) EAT_STREAM_PARAMETERS - -#endif // ENABLE_DLOG - -// DEBUG_MODE is for uses like -// if (DEBUG_MODE) foo.CheckThatFoo(); -// instead of -// #ifndef NDEBUG -// foo.CheckThatFoo(); -// #endif -// -// We tie its state to ENABLE_DLOG. -enum { DEBUG_MODE = ENABLE_DLOG }; - -#undef ENABLE_DLOG - -#define DLOG(severity) \ - LAZY_STREAM(LOG_STREAM(severity), DLOG_IS_ON(severity)) - -#define DPLOG(severity) \ - LAZY_STREAM(PLOG_STREAM(severity), DLOG_IS_ON(severity)) - -#define DVLOG(verboselevel) DVLOG_IF(verboselevel, VLOG_IS_ON(verboselevel)) - -#define DVPLOG(verboselevel) DVPLOG_IF(verboselevel, VLOG_IS_ON(verboselevel)) - -// Definitions for DCHECK et al. - -#if DCHECK_IS_ON() - -#define COMPACT_GOOGLE_LOG_EX_DCHECK(ClassName, ...) \ - COMPACT_GOOGLE_LOG_EX_FATAL(ClassName , ##__VA_ARGS__) -#define COMPACT_GOOGLE_LOG_DCHECK COMPACT_GOOGLE_LOG_FATAL -const LogSeverity LOG_DCHECK = LOG_FATAL; - -#else // DCHECK_IS_ON() - -// These are just dummy values. -#define COMPACT_GOOGLE_LOG_EX_DCHECK(ClassName, ...) \ - COMPACT_GOOGLE_LOG_EX_INFO(ClassName , ##__VA_ARGS__) -#define COMPACT_GOOGLE_LOG_DCHECK COMPACT_GOOGLE_LOG_INFO -const LogSeverity LOG_DCHECK = LOG_INFO; - -#endif // DCHECK_IS_ON() - -// DCHECK et al. make sure to reference |condition| regardless of -// whether DCHECKs are enabled; this is so that we don't get unused -// variable warnings if the only use of a variable is in a DCHECK. -// This behavior is different from DLOG_IF et al. - -#define DCHECK(condition) \ - LAZY_STREAM(LOG_STREAM(DCHECK), DCHECK_IS_ON() && !(condition)) \ - << "Check failed: " #condition ". " - -#define DPCHECK(condition) \ - LAZY_STREAM(PLOG_STREAM(DCHECK), DCHECK_IS_ON() && !(condition)) \ - << "Check failed: " #condition ". " - -// Helper macro for binary operators. -// Don't use this macro directly in your code, use DCHECK_EQ et al below. -#define DCHECK_OP(name, op, val1, val2) \ - if (DCHECK_IS_ON()) \ - if (std::string* _result = cef::logging::Check##name##Impl( \ - (val1), (val2), #val1 " " #op " " #val2)) \ - cef::logging::LogMessage(__FILE__, __LINE__, \ - ::cef::logging::LOG_DCHECK, _result).stream() - -// Equality/Inequality checks - compare two values, and log a -// LOG_DCHECK message including the two values when the result is not -// as expected. The values must have operator<<(ostream, ...) -// defined. -// -// You may append to the error message like so: -// DCHECK_NE(1, 2) << ": The world must be ending!"; -// -// We are very careful to ensure that each argument is evaluated exactly -// once, and that anything which is legal to pass as a function argument is -// legal here. In particular, the arguments may be temporary expressions -// which will end up being destroyed at the end of the apparent statement, -// for example: -// DCHECK_EQ(string("abc")[1], 'b'); -// -// WARNING: These may not compile correctly if one of the arguments is a pointer -// and the other is NULL. To work around this, simply static_cast NULL to the -// type of the desired pointer. - -#define DCHECK_EQ(val1, val2) DCHECK_OP(EQ, ==, val1, val2) -#define DCHECK_NE(val1, val2) DCHECK_OP(NE, !=, val1, val2) -#define DCHECK_LE(val1, val2) DCHECK_OP(LE, <=, val1, val2) -#define DCHECK_LT(val1, val2) DCHECK_OP(LT, < , val1, val2) -#define DCHECK_GE(val1, val2) DCHECK_OP(GE, >=, val1, val2) -#define DCHECK_GT(val1, val2) DCHECK_OP(GT, > , val1, val2) - -#if defined(NDEBUG) && defined(OS_CHROMEOS) -#define NOTREACHED() LOG(ERROR) << "NOTREACHED() hit in " << \ - __FUNCTION__ << ". " -#else -#define NOTREACHED() DCHECK(false) -#endif - -// Redefine the standard assert to use our nice log files -#undef assert -#define assert(x) DLOG_ASSERT(x) - -// This class more or less represents a particular log message. You -// create an instance of LogMessage and then stream stuff to it. -// When you finish streaming to it, ~LogMessage is called and the -// full message gets streamed to the appropriate destination. -// -// You shouldn't actually use LogMessage's constructor to log things, -// though. You should use the LOG() macro (and variants thereof) -// above. -class LogMessage { - public: - // Used for LOG(severity). - LogMessage(const char* file, int line, LogSeverity severity); - - // Used for CHECK_EQ(), etc. Takes ownership of the given string. - // Implied severity = LOG_FATAL. - LogMessage(const char* file, int line, std::string* result); - - // Used for DCHECK_EQ(), etc. Takes ownership of the given string. - LogMessage(const char* file, int line, LogSeverity severity, - std::string* result); - - ~LogMessage(); - - std::ostream& stream() { return stream_; } - - private: - LogSeverity severity_; - std::ostringstream stream_; - - // The file and line information passed in to the constructor. - const char* file_; - const int line_; - -#if defined(OS_WIN) - // Stores the current value of GetLastError in the constructor and restores - // it in the destructor by calling SetLastError. - // This is useful since the LogMessage class uses a lot of Win32 calls - // that will lose the value of GLE and the code that called the log function - // will have lost the thread error value when the log call returns. - class SaveLastError { - public: - SaveLastError(); - ~SaveLastError(); - - unsigned long get_error() const { return last_error_; } - - protected: - unsigned long last_error_; - }; - - SaveLastError last_error_; -#endif - - DISALLOW_COPY_AND_ASSIGN(LogMessage); -}; - -// A non-macro interface to the log facility; (useful -// when the logging level is not a compile-time constant). -inline void LogAtLevel(int const log_level, std::string const &msg) { - LogMessage(__FILE__, __LINE__, log_level).stream() << msg; -} - -// This class is used to explicitly ignore values in the conditional -// logging macros. This avoids compiler warnings like "value computed -// is not used" and "statement has no effect". -class LogMessageVoidify { - public: - LogMessageVoidify() { } - // This has to be an operator with a precedence lower than << but - // higher than ?: - void operator&(std::ostream&) { } -}; - -#if defined(OS_WIN) -typedef unsigned long SystemErrorCode; -#elif defined(OS_POSIX) -typedef int SystemErrorCode; -#endif - -// Alias for ::GetLastError() on Windows and errno on POSIX. Avoids having to -// pull in windows.h just for GetLastError() and DWORD. -SystemErrorCode GetLastSystemErrorCode(); -std::string SystemErrorCodeToString(SystemErrorCode error_code); - -#if defined(OS_WIN) -// Appends a formatted system message of the GetLastError() type. -class Win32ErrorLogMessage { - public: - Win32ErrorLogMessage(const char* file, - int line, - LogSeverity severity, - SystemErrorCode err); - - // Appends the error message before destructing the encapsulated class. - ~Win32ErrorLogMessage(); - - std::ostream& stream() { return log_message_.stream(); } - - private: - SystemErrorCode err_; - LogMessage log_message_; - - DISALLOW_COPY_AND_ASSIGN(Win32ErrorLogMessage); -}; -#elif defined(OS_POSIX) -// Appends a formatted system message of the errno type -class ErrnoLogMessage { - public: - ErrnoLogMessage(const char* file, - int line, - LogSeverity severity, - SystemErrorCode err); - - // Appends the error message before destructing the encapsulated class. - ~ErrnoLogMessage(); - - std::ostream& stream() { return log_message_.stream(); } - - private: - SystemErrorCode err_; - LogMessage log_message_; - - DISALLOW_COPY_AND_ASSIGN(ErrnoLogMessage); -}; -#endif // OS_WIN - -} // namespace logging -} // namespace cef - -// These functions are provided as a convenience for logging, which is where we -// use streams (it is against Google style to use streams in other places). It -// is designed to allow you to emit non-ASCII Unicode strings to the log file, -// which is normally ASCII. It is relatively slow, so try not to use it for -// common cases. Non-ASCII characters will be converted to UTF-8 by these -// operators. -std::ostream& operator<<(std::ostream& out, const wchar_t* wstr); -inline std::ostream& operator<<(std::ostream& out, const std::wstring& wstr) { - return out << wstr.c_str(); -} - -// The NOTIMPLEMENTED() macro annotates codepaths which have -// not been implemented yet. -// -// The implementation of this macro is controlled by NOTIMPLEMENTED_POLICY: -// 0 -- Do nothing (stripped by compiler) -// 1 -- Warn at compile time -// 2 -- Fail at compile time -// 3 -- Fail at runtime (DCHECK) -// 4 -- [default] LOG(ERROR) at runtime -// 5 -- LOG(ERROR) at runtime, only once per call-site - -#ifndef NOTIMPLEMENTED_POLICY -#if defined(OS_ANDROID) && defined(OFFICIAL_BUILD) -#define NOTIMPLEMENTED_POLICY 0 -#else -// Select default policy: LOG(ERROR) -#define NOTIMPLEMENTED_POLICY 4 -#endif -#endif - -#if defined(COMPILER_GCC) -// On Linux, with GCC, we can use __PRETTY_FUNCTION__ to get the demangled name -// of the current function in the NOTIMPLEMENTED message. -#define NOTIMPLEMENTED_MSG "Not implemented reached in " << __PRETTY_FUNCTION__ -#else -#define NOTIMPLEMENTED_MSG "NOT IMPLEMENTED" -#endif - -#if NOTIMPLEMENTED_POLICY == 0 -#define NOTIMPLEMENTED() EAT_STREAM_PARAMETERS -#elif NOTIMPLEMENTED_POLICY == 1 -// TODO, figure out how to generate a warning -#define NOTIMPLEMENTED() COMPILE_ASSERT(false, NOT_IMPLEMENTED) -#elif NOTIMPLEMENTED_POLICY == 2 -#define NOTIMPLEMENTED() COMPILE_ASSERT(false, NOT_IMPLEMENTED) -#elif NOTIMPLEMENTED_POLICY == 3 -#define NOTIMPLEMENTED() NOTREACHED() -#elif NOTIMPLEMENTED_POLICY == 4 -#define NOTIMPLEMENTED() LOG(ERROR) << NOTIMPLEMENTED_MSG -#elif NOTIMPLEMENTED_POLICY == 5 -#define NOTIMPLEMENTED() do {\ - static bool logged_once = false;\ - LOG_IF(ERROR, !logged_once) << NOTIMPLEMENTED_MSG;\ - logged_once = true;\ -} while(0);\ -EAT_STREAM_PARAMETERS -#endif - -#endif // !BUILDING_CEF_SHARED - -#endif // CEF_INCLUDE_BASE_CEF_LOGGING_H_ diff --git a/tool_kits/cef/cef_wrapper/include/base/cef_macros.h b/tool_kits/cef/cef_wrapper/include/base/cef_macros.h deleted file mode 100644 index 67c42e14..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/cef_macros.h +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012 -// 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. - -#ifndef CEF_INCLUDE_BASE_CEF_MACROS_H_ -#define CEF_INCLUDE_BASE_CEF_MACROS_H_ -#pragma once - -#if defined(BUILDING_CEF_SHARED) -// When building CEF include the Chromium header directly. -#include "base/macros.h" -#else // !BUILDING_CEF_SHARED -// The following is substantially similar to the Chromium implementation. -// If the Chromium implementation diverges the below implementation should be -// updated to match. - -#include // For size_t. -#include "include/base/cef_build.h" // For COMPILER_MSVC - -#if !defined(ALLOW_THIS_IN_INITIALIZER_LIST) -#if defined(COMPILER_MSVC) - -// MSVC_PUSH_DISABLE_WARNING pushes |n| onto a stack of warnings to be disabled. -// The warning remains disabled until popped by MSVC_POP_WARNING. -#define MSVC_PUSH_DISABLE_WARNING(n) __pragma(warning(push)) \ - __pragma(warning(disable:n)) - -// MSVC_PUSH_WARNING_LEVEL pushes |n| as the global warning level. The level -// remains in effect until popped by MSVC_POP_WARNING(). Use 0 to disable all -// warnings. -#define MSVC_PUSH_WARNING_LEVEL(n) __pragma(warning(push, n)) - -// Pop effects of innermost MSVC_PUSH_* macro. -#define MSVC_POP_WARNING() __pragma(warning(pop)) - -// Allows |this| to be passed as an argument in constructor initializer lists. -// This uses push/pop instead of the seemingly simpler suppress feature to avoid -// having the warning be disabled for more than just |code|. -// -// Example usage: -// Foo::Foo() : x(NULL), ALLOW_THIS_IN_INITIALIZER_LIST(y(this)), z(3) {} -// -// Compiler warning C4355: 'this': used in base member initializer list: -// http://msdn.microsoft.com/en-us/library/3c594ae3(VS.80).aspx -#define ALLOW_THIS_IN_INITIALIZER_LIST(code) MSVC_PUSH_DISABLE_WARNING(4355) \ - code \ - MSVC_POP_WARNING() -#else // !COMPILER_MSVC - -#define ALLOW_THIS_IN_INITIALIZER_LIST(code) code - -#endif // !COMPILER_MSVC -#endif // !ALLOW_THIS_IN_INITIALIZER_LIST - -#if !defined(arraysize) - -// The arraysize(arr) macro returns the # of elements in an array arr. -// The expression is a compile-time constant, and therefore can be -// used in defining new arrays, for example. If you use arraysize on -// a pointer by mistake, you will get a compile-time error. -// -// One caveat is that arraysize() doesn't accept any array of an -// anonymous type or a type defined inside a function. In these rare -// cases, you have to use the unsafe ARRAYSIZE_UNSAFE() macro below. This is -// due to a limitation in C++'s template system. The limitation might -// eventually be removed, but it hasn't happened yet. - -// This template function declaration is used in defining arraysize. -// Note that the function doesn't need an implementation, as we only -// use its type. -template -char (&ArraySizeHelper(T (&array)[N]))[N]; - -// That gcc wants both of these prototypes seems mysterious. VC, for -// its part, can't decide which to use (another mystery). Matching of -// template overloads: the final frontier. -#ifndef _MSC_VER -template -char (&ArraySizeHelper(const T (&array)[N]))[N]; -#endif - -#define arraysize(array) (sizeof(ArraySizeHelper(array))) - -#endif // !arraysize - -#if !defined(DISALLOW_COPY_AND_ASSIGN) - -// A macro to disallow the copy constructor and operator= functions -// This should be used in the private: declarations for a class -#define DISALLOW_COPY_AND_ASSIGN(TypeName) \ - TypeName(const TypeName&); \ - void operator=(const TypeName&) - -#endif // !DISALLOW_COPY_AND_ASSIGN - -#if !defined(DISALLOW_IMPLICIT_CONSTRUCTORS) - -// A macro to disallow all the implicit constructors, namely the -// default constructor, copy constructor and operator= functions. -// -// This should be used in the private: declarations for a class -// that wants to prevent anyone from instantiating it. This is -// especially useful for classes containing only static methods. -#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \ - TypeName(); \ - DISALLOW_COPY_AND_ASSIGN(TypeName) - -#endif // !DISALLOW_IMPLICIT_CONSTRUCTORS - -#if !defined(COMPILE_ASSERT) - -// The COMPILE_ASSERT macro can be used to verify that a compile time -// expression is true. For example, you could use it to verify the -// size of a static array: -// -// COMPILE_ASSERT(ARRAYSIZE_UNSAFE(content_type_names) == CONTENT_NUM_TYPES, -// content_type_names_incorrect_size); -// -// or to make sure a struct is smaller than a certain size: -// -// COMPILE_ASSERT(sizeof(foo) < 128, foo_too_large); -// -// The second argument to the macro is the name of the variable. If -// the expression is false, most compilers will issue a warning/error -// containing the name of the variable. - -#if __cplusplus >= 201103L - -// Under C++11, just use static_assert. -#define COMPILE_ASSERT(expr, msg) static_assert(expr, #msg) - -#else - -namespace cef { - -template -struct CompileAssert { -}; - -} // namespace cef - -#define COMPILE_ASSERT(expr, msg) \ - typedef cef::CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1] \ - ALLOW_UNUSED_TYPE - -// Implementation details of COMPILE_ASSERT: -// -// - COMPILE_ASSERT works by defining an array type that has -1 -// elements (and thus is invalid) when the expression is false. -// -// - The simpler definition -// -// #define COMPILE_ASSERT(expr, msg) typedef char msg[(expr) ? 1 : -1] -// -// does not work, as gcc supports variable-length arrays whose sizes -// are determined at run-time (this is gcc's extension and not part -// of the C++ standard). As a result, gcc fails to reject the -// following code with the simple definition: -// -// int foo; -// COMPILE_ASSERT(foo, msg); // not supposed to compile as foo is -// // not a compile-time constant. -// -// - By using the type CompileAssert<(bool(expr))>, we ensures that -// expr is a compile-time constant. (Template arguments must be -// determined at compile-time.) -// -// - The outer parentheses in CompileAssert<(bool(expr))> are necessary -// to work around a bug in gcc 3.4.4 and 4.0.1. If we had written -// -// CompileAssert -// -// instead, these compilers will refuse to compile -// -// COMPILE_ASSERT(5 > 0, some_message); -// -// (They seem to think the ">" in "5 > 0" marks the end of the -// template argument list.) -// -// - The array size is (bool(expr) ? 1 : -1), instead of simply -// -// ((expr) ? 1 : -1). -// -// This is to avoid running into a bug in MS VC 7.1, which -// causes ((0.0) ? 1 : -1) to incorrectly evaluate to 1. - -#endif // !(__cplusplus >= 201103L) - -#endif // !defined(COMPILE_ASSERT) - -#endif // !BUILDING_CEF_SHARED - -#endif // CEF_INCLUDE_BASE_CEF_MACROS_H_ diff --git a/tool_kits/cef/cef_wrapper/include/base/cef_move.h b/tool_kits/cef/cef_wrapper/include/base/cef_move.h deleted file mode 100644 index 91069297..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/cef_move.h +++ /dev/null @@ -1,259 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012 -// 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. - -#ifndef CEF_INCLUDE_BASE_CEF_MOVE_H_ -#define CEF_INCLUDE_BASE_CEF_MOVE_H_ - -#if defined(MOVE_ONLY_TYPE_FOR_CPP_03) -// Do nothing if the macro in this header has already been defined. -// 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(BUILDING_CEF_SHARED) -// When building CEF include the Chromium header directly. -#include "base/move.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. - -// Macro with the boilerplate that makes a type move-only in C++03. -// -// USAGE -// -// This macro should be used instead of DISALLOW_COPY_AND_ASSIGN to create -// a "move-only" type. Unlike DISALLOW_COPY_AND_ASSIGN, this macro should be -// the first line in a class declaration. -// -// A class using this macro must call .Pass() (or somehow be an r-value already) -// before it can be: -// -// * Passed as a function argument -// * Used as the right-hand side of an assignment -// * Returned from a function -// -// Each class will still need to define their own "move constructor" and "move -// operator=" to make this useful. Here's an example of the macro, the move -// constructor, and the move operator= from the scoped_ptr class: -// -// template -// class scoped_ptr { -// MOVE_ONLY_TYPE_FOR_CPP_03(scoped_ptr, RValue) -// public: -// scoped_ptr(RValue& other) : ptr_(other.release()) { } -// scoped_ptr& operator=(RValue& other) { -// swap(other); -// return *this; -// } -// }; -// -// Note that the constructor must NOT be marked explicit. -// -// For consistency, the second parameter to the macro should always be RValue -// unless you have a strong reason to do otherwise. It is only exposed as a -// macro parameter so that the move constructor and move operator= don't look -// like they're using a phantom type. -// -// -// HOW THIS WORKS -// -// For a thorough explanation of this technique, see: -// -// http://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Move_Constructor -// -// The summary is that we take advantage of 2 properties: -// -// 1) non-const references will not bind to r-values. -// 2) C++ can apply one user-defined conversion when initializing a -// variable. -// -// The first lets us disable the copy constructor and assignment operator -// by declaring private version of them with a non-const reference parameter. -// -// For l-values, direct initialization still fails like in -// DISALLOW_COPY_AND_ASSIGN because the copy constructor and assignment -// operators are private. -// -// For r-values, the situation is different. The copy constructor and -// assignment operator are not viable due to (1), so we are trying to call -// a non-existent constructor and non-existing operator= rather than a private -// one. Since we have not committed an error quite yet, we can provide an -// alternate conversion sequence and a constructor. We add -// -// * a private struct named "RValue" -// * a user-defined conversion "operator RValue()" -// * a "move constructor" and "move operator=" that take the RValue& as -// their sole parameter. -// -// Only r-values will trigger this sequence and execute our "move constructor" -// or "move operator=." L-values will match the private copy constructor and -// operator= first giving a "private in this context" error. This combination -// gives us a move-only type. -// -// For signaling a destructive transfer of data from an l-value, we provide a -// method named Pass() which creates an r-value for the current instance -// triggering the move constructor or move operator=. -// -// Other ways to get r-values is to use the result of an expression like a -// function call. -// -// Here's an example with comments explaining what gets triggered where: -// -// class Foo { -// MOVE_ONLY_TYPE_FOR_CPP_03(Foo, RValue); -// -// public: -// ... API ... -// Foo(RValue other); // Move constructor. -// Foo& operator=(RValue rhs); // Move operator= -// }; -// -// Foo MakeFoo(); // Function that returns a Foo. -// -// Foo f; -// Foo f_copy(f); // ERROR: Foo(Foo&) is private in this context. -// Foo f_assign; -// f_assign = f; // ERROR: operator=(Foo&) is private in this context. -// -// -// Foo f(MakeFoo()); // R-value so alternate conversion executed. -// Foo f_copy(f.Pass()); // R-value so alternate conversion executed. -// f = f_copy.Pass(); // R-value so alternate conversion executed. -// -// -// IMPLEMENTATION SUBTLETIES WITH RValue -// -// The RValue struct is just a container for a pointer back to the original -// object. It should only ever be created as a temporary, and no external -// class should ever declare it or use it in a parameter. -// -// It is tempting to want to use the RValue type in function parameters, but -// excluding the limited usage here for the move constructor and move -// operator=, doing so would mean that the function could take both r-values -// and l-values equially which is unexpected. See COMPARED To Boost.Move for -// more details. -// -// An alternate, and incorrect, implementation of the RValue class used by -// Boost.Move makes RValue a fieldless child of the move-only type. RValue& -// is then used in place of RValue in the various operators. The RValue& is -// "created" by doing *reinterpret_cast(this). This has the appeal -// of never creating a temporary RValue struct even with optimizations -// disabled. Also, by virtue of inheritance you can treat the RValue -// reference as if it were the move-only type itself. Unfortunately, -// using the result of this reinterpret_cast<> is actually undefined behavior -// due to C++98 5.2.10.7. In certain compilers (e.g., NaCl) the optimizer -// will generate non-working code. -// -// In optimized builds, both implementations generate the same assembly so we -// choose the one that adheres to the standard. -// -// -// WHY HAVE typedef void MoveOnlyTypeForCPP03 -// -// Callback<>/Bind() needs to understand movable-but-not-copyable semantics -// to call .Pass() appropriately when it is expected to transfer the value. -// The cryptic typedef MoveOnlyTypeForCPP03 is added to make this check -// easy and automatic in helper templates for Callback<>/Bind(). -// See IsMoveOnlyType template and its usage in base/callback_internal.h -// for more details. -// -// -// COMPARED TO C++11 -// -// In C++11, you would implement this functionality using an r-value reference -// and our .Pass() method would be replaced with a call to std::move(). -// -// This emulation also has a deficiency where it uses up the single -// user-defined conversion allowed by C++ during initialization. This can -// cause problems in some API edge cases. For instance, in scoped_ptr, it is -// impossible to make a function "void Foo(scoped_ptr p)" accept a -// value of type scoped_ptr even if you add a constructor to -// scoped_ptr<> that would make it look like it should work. C++11 does not -// have this deficiency. -// -// -// COMPARED TO Boost.Move -// -// Our implementation similar to Boost.Move, but we keep the RValue struct -// private to the move-only type, and we don't use the reinterpret_cast<> hack. -// -// In Boost.Move, RValue is the boost::rv<> template. This type can be used -// when writing APIs like: -// -// void MyFunc(boost::rv& f) -// -// that can take advantage of rv<> to avoid extra copies of a type. However you -// would still be able to call this version of MyFunc with an l-value: -// -// Foo f; -// MyFunc(f); // Uh oh, we probably just destroyed |f| w/o calling Pass(). -// -// unless someone is very careful to also declare a parallel override like: -// -// void MyFunc(const Foo& f) -// -// that would catch the l-values first. This was declared unsafe in C++11 and -// a C++11 compiler will explicitly fail MyFunc(f). Unfortunately, we cannot -// ensure this in C++03. -// -// Since we have no need for writing such APIs yet, our implementation keeps -// RValue private and uses a .Pass() method to do the conversion instead of -// trying to write a version of "std::move()." Writing an API like std::move() -// would require the RValue struct to be public. -// -// -// CAVEATS -// -// If you include a move-only type as a field inside a class that does not -// explicitly declare a copy constructor, the containing class's implicit -// copy constructor will change from Containing(const Containing&) to -// Containing(Containing&). This can cause some unexpected errors. -// -// http://llvm.org/bugs/show_bug.cgi?id=11528 -// -// The workaround is to explicitly declare your copy constructor. -// -#define MOVE_ONLY_TYPE_FOR_CPP_03(type, rvalue_type) \ - private: \ - struct rvalue_type { \ - explicit rvalue_type(type* object) : object(object) {} \ - type* object; \ - }; \ - type(type&); \ - void operator=(type&); \ - public: \ - operator rvalue_type() { return rvalue_type(this); } \ - type Pass() { return type(rvalue_type(this)); } \ - typedef void MoveOnlyTypeForCPP03; \ - private: - -#endif // !BUILDING_CEF_SHARED - -#endif // CEF_INCLUDE_BASE_CEF_MOVE_H_ diff --git a/tool_kits/cef/cef_wrapper/include/base/cef_platform_thread.h b/tool_kits/cef/cef_wrapper/include/base/cef_platform_thread.h deleted file mode 100644 index cda1dc45..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/cef_platform_thread.h +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 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. - -// WARNING: You should *NOT* be using this class directly. PlatformThread is -// the low-level platform-specific abstraction to the OS's threading interface. -// You should instead be using a message-loop driven Thread, see thread.h. - -#ifndef CEF_INCLUDE_BASE_PLATFORM_THREAD_H_ -#define CEF_INCLUDE_BASE_PLATFORM_THREAD_H_ - -#if defined(BASE_THREADING_PLATFORM_THREAD_H_) -// Do nothing if 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(BUILDING_CEF_SHARED) -// When building CEF include the Chromium header directly. -#include "base/threading/platform_thread.h" -#else // !BUILDING_CEF_SHARED -// The following is substantially similar to the Chromium implementation. -// If the Chromium implementation diverges the below implementation should be -// updated to match. - -#include "include/base/cef_basictypes.h" -#include "include/base/cef_build.h" -#include "include/internal/cef_thread_internal.h" - -namespace base { - -// Used for logging. Always an integer value. -typedef cef_platform_thread_id_t PlatformThreadId; - -// Used for thread checking and debugging. -// Meant to be as fast as possible. -// These are produced by PlatformThread::CurrentRef(), and used to later -// check if we are on the same thread or not by using ==. These are safe -// to copy between threads, but can't be copied to another process as they -// have no meaning there. Also, the internal identifier can be re-used -// after a thread dies, so a PlatformThreadRef cannot be reliably used -// to distinguish a new thread from an old, dead thread. -class PlatformThreadRef { - public: - typedef cef_platform_thread_handle_t RefType; - - PlatformThreadRef() - : id_(0) { - } - - explicit PlatformThreadRef(RefType id) - : id_(id) { - } - - bool operator==(PlatformThreadRef other) const { - return id_ == other.id_; - } - - bool is_null() const { - return id_ == 0; - } - private: - RefType id_; -}; - -// A namespace for low-level thread functions. -// Chromium uses a class with static methods but CEF uses an actual namespace -// to avoid linker problems with the sandbox libaries on Windows. -namespace PlatformThread { - -// Gets the current thread id, which may be useful for logging purposes. -inline PlatformThreadId CurrentId() { - return cef_get_current_platform_thread_id(); -} - -// Gets the current thread reference, which can be used to check if -// we're on the right thread quickly. -inline PlatformThreadRef CurrentRef() { - return PlatformThreadRef(cef_get_current_platform_thread_handle()); -} - -} // namespace PlatformThread - -} // namespace base - -#endif // !BUILDING_CEF_SHARED - -#endif // CEF_INCLUDE_BASE_PLATFORM_THREAD_H_ diff --git a/tool_kits/cef/cef_wrapper/include/base/cef_ref_counted.h b/tool_kits/cef/cef_wrapper/include/base/cef_ref_counted.h deleted file mode 100644 index dd451f3d..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/cef_ref_counted.h +++ /dev/null @@ -1,386 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012 -// 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. -// - -#ifndef CEF_INCLUDE_BASE_CEF_REF_COUNTED_H_ -#define CEF_INCLUDE_BASE_CEF_REF_COUNTED_H_ -#pragma once - -#if defined(BASE_MEMORY_REF_COUNTED_H_) -// Do nothing if 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(BUILDING_CEF_SHARED) -// When building CEF include the Chromium header directly. -#include "base/memory/ref_counted.h" -#else // !BUILDING_CEF_SHARED -// The following is substantially similar to the Chromium implementation. -// If the Chromium implementation diverges the below implementation should be -// updated to match. - -#include - -#include "include/base/cef_atomic_ref_count.h" -#include "include/base/cef_build.h" -#ifndef NDEBUG -#include "include/base/cef_logging.h" -#endif -#include "include/base/cef_thread_collision_warner.h" - -namespace base { - -namespace cef_subtle { - -class RefCountedBase { - public: - bool HasOneRef() const { return ref_count_ == 1; } - - protected: - RefCountedBase() - : ref_count_(0) - #ifndef NDEBUG - , in_dtor_(false) - #endif - { - } - - ~RefCountedBase() { - #ifndef NDEBUG - DCHECK(in_dtor_) << "RefCounted object deleted without calling Release()"; - #endif - } - - - void AddRef() const { - // TODO(maruel): Add back once it doesn't assert 500 times/sec. - // Current thread books the critical section "AddRelease" - // without release it. - // DFAKE_SCOPED_LOCK_THREAD_LOCKED(add_release_); - #ifndef NDEBUG - DCHECK(!in_dtor_); - #endif - ++ref_count_; - } - - // Returns true if the object should self-delete. - bool Release() const { - // TODO(maruel): Add back once it doesn't assert 500 times/sec. - // Current thread books the critical section "AddRelease" - // without release it. - // DFAKE_SCOPED_LOCK_THREAD_LOCKED(add_release_); - #ifndef NDEBUG - DCHECK(!in_dtor_); - #endif - if (--ref_count_ == 0) { - #ifndef NDEBUG - in_dtor_ = true; - #endif - return true; - } - return false; - } - - private: - mutable int ref_count_; -#ifndef NDEBUG - mutable bool in_dtor_; -#endif - - DFAKE_MUTEX(add_release_); - - DISALLOW_COPY_AND_ASSIGN(RefCountedBase); -}; - -class RefCountedThreadSafeBase { - public: - bool HasOneRef() const; - - protected: - RefCountedThreadSafeBase(); - ~RefCountedThreadSafeBase(); - - void AddRef() const; - - // Returns true if the object should self-delete. - bool Release() const; - - private: - mutable AtomicRefCount ref_count_; -#ifndef NDEBUG - mutable bool in_dtor_; -#endif - - DISALLOW_COPY_AND_ASSIGN(RefCountedThreadSafeBase); -}; - -} // namespace cef_subtle - -// -// A base class for reference counted classes. Otherwise, known as a cheap -// knock-off of WebKit's RefCounted class. To use this guy just extend your -// class from it like so: -// -// class MyFoo : public base::RefCounted { -// ... -// private: -// friend class base::RefCounted; -// ~MyFoo(); -// }; -// -// You should always make your destructor private, to avoid any code deleting -// the object accidently while there are references to it. -template -class RefCounted : public cef_subtle::RefCountedBase { - public: - RefCounted() {} - - void AddRef() const { - cef_subtle::RefCountedBase::AddRef(); - } - - void Release() const { - if (cef_subtle::RefCountedBase::Release()) { - delete static_cast(this); - } - } - - protected: - ~RefCounted() {} - - private: - DISALLOW_COPY_AND_ASSIGN(RefCounted); -}; - -// Forward declaration. -template class RefCountedThreadSafe; - -// Default traits for RefCountedThreadSafe. Deletes the object when its ref -// count reaches 0. Overload to delete it on a different thread etc. -template -struct DefaultRefCountedThreadSafeTraits { - static void Destruct(const T* x) { - // Delete through RefCountedThreadSafe to make child classes only need to be - // friend with RefCountedThreadSafe instead of this struct, which is an - // implementation detail. - RefCountedThreadSafe::DeleteInternal(x); - } -}; - -// -// A thread-safe variant of RefCounted -// -// class MyFoo : public base::RefCountedThreadSafe { -// ... -// }; -// -// If you're using the default trait, then you should add compile time -// asserts that no one else is deleting your object. i.e. -// private: -// friend class base::RefCountedThreadSafe; -// ~MyFoo(); -template > -class RefCountedThreadSafe : public cef_subtle::RefCountedThreadSafeBase { - public: - RefCountedThreadSafe() {} - - void AddRef() const { - cef_subtle::RefCountedThreadSafeBase::AddRef(); - } - - void Release() const { - if (cef_subtle::RefCountedThreadSafeBase::Release()) { - Traits::Destruct(static_cast(this)); - } - } - - protected: - ~RefCountedThreadSafe() {} - - private: - friend struct DefaultRefCountedThreadSafeTraits; - static void DeleteInternal(const T* x) { delete x; } - - DISALLOW_COPY_AND_ASSIGN(RefCountedThreadSafe); -}; - -// -// A thread-safe wrapper for some piece of data so we can place other -// things in scoped_refptrs<>. -// -template -class RefCountedData - : public base::RefCountedThreadSafe< base::RefCountedData > { - public: - RefCountedData() : data() {} - RefCountedData(const T& in_value) : data(in_value) {} - - T data; - - private: - friend class base::RefCountedThreadSafe >; - ~RefCountedData() {} -}; - -} // namespace base - -// -// A smart pointer class for reference counted objects. Use this class instead -// of calling AddRef and Release manually on a reference counted object to -// avoid common memory leaks caused by forgetting to Release an object -// reference. Sample usage: -// -// class MyFoo : public RefCounted { -// ... -// }; -// -// void some_function() { -// scoped_refptr foo = new MyFoo(); -// foo->Method(param); -// // |foo| is released when this function returns -// } -// -// void some_other_function() { -// scoped_refptr foo = new MyFoo(); -// ... -// foo = NULL; // explicitly releases |foo| -// ... -// if (foo) -// foo->Method(param); -// } -// -// The above examples show how scoped_refptr acts like a pointer to T. -// Given two scoped_refptr classes, it is also possible to exchange -// references between the two objects, like so: -// -// { -// scoped_refptr a = new MyFoo(); -// scoped_refptr b; -// -// b.swap(a); -// // now, |b| references the MyFoo object, and |a| references NULL. -// } -// -// To make both |a| and |b| in the above example reference the same MyFoo -// object, simply use the assignment operator: -// -// { -// scoped_refptr a = new MyFoo(); -// scoped_refptr b; -// -// b = a; -// // now, |a| and |b| each own a reference to the same MyFoo object. -// } -// -template -class scoped_refptr { - public: - typedef T element_type; - - scoped_refptr() : ptr_(NULL) { - } - - scoped_refptr(T* p) : ptr_(p) { - if (ptr_) - ptr_->AddRef(); - } - - scoped_refptr(const scoped_refptr& r) : ptr_(r.ptr_) { - if (ptr_) - ptr_->AddRef(); - } - - template - scoped_refptr(const scoped_refptr& r) : ptr_(r.get()) { - if (ptr_) - ptr_->AddRef(); - } - - ~scoped_refptr() { - if (ptr_) - ptr_->Release(); - } - - T* get() const { return ptr_; } - - // Allow scoped_refptr to be used in boolean expression - // and comparison operations. - operator T*() const { return ptr_; } - - T* operator->() const { - assert(ptr_ != NULL); - return ptr_; - } - - scoped_refptr& operator=(T* p) { - // AddRef first so that self assignment should work - if (p) - p->AddRef(); - T* old_ptr = ptr_; - ptr_ = p; - if (old_ptr) - old_ptr->Release(); - return *this; - } - - scoped_refptr& operator=(const scoped_refptr& r) { - return *this = r.ptr_; - } - - template - scoped_refptr& operator=(const scoped_refptr& r) { - return *this = r.get(); - } - - void swap(T** pp) { - T* p = ptr_; - ptr_ = *pp; - *pp = p; - } - - void swap(scoped_refptr& r) { - swap(&r.ptr_); - } - - protected: - T* ptr_; -}; - -// Handy utility for creating a scoped_refptr out of a T* explicitly without -// having to retype all the template arguments -template -scoped_refptr make_scoped_refptr(T* t) { - return scoped_refptr(t); -} - -#endif // !BUILDING_CEF_SHARED - -#endif // CEF_INCLUDE_BASE_CEF_REF_COUNTED_H_ diff --git a/tool_kits/cef/cef_wrapper/include/base/cef_scoped_ptr.h b/tool_kits/cef/cef_wrapper/include/base/cef_scoped_ptr.h deleted file mode 100644 index ed6c706f..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/cef_scoped_ptr.h +++ /dev/null @@ -1,624 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012 -// 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. - -// Scopers help you manage ownership of a pointer, helping you easily manage a -// pointer within a scope, and automatically destroying the pointer at the end -// of a scope. There are two main classes you will use, which correspond to the -// operators new/delete and new[]/delete[]. -// -// Example usage (scoped_ptr): -// { -// scoped_ptr foo(new Foo("wee")); -// } // foo goes out of scope, releasing the pointer with it. -// -// { -// scoped_ptr foo; // No pointer managed. -// foo.reset(new Foo("wee")); // Now a pointer is managed. -// foo.reset(new Foo("wee2")); // Foo("wee") was destroyed. -// foo.reset(new Foo("wee3")); // Foo("wee2") was destroyed. -// foo->Method(); // Foo::Method() called. -// foo.get()->Method(); // Foo::Method() called. -// SomeFunc(foo.release()); // SomeFunc takes ownership, foo no longer -// // manages a pointer. -// foo.reset(new Foo("wee4")); // foo manages a pointer again. -// foo.reset(); // Foo("wee4") destroyed, foo no longer -// // manages a pointer. -// } // foo wasn't managing a pointer, so nothing was destroyed. -// -// Example usage (scoped_ptr): -// { -// scoped_ptr foo(new Foo[100]); -// foo.get()->Method(); // Foo::Method on the 0th element. -// foo[10].Method(); // Foo::Method on the 10th element. -// } -// -// These scopers also implement part of the functionality of C++11 unique_ptr -// in that they are "movable but not copyable." You can use the scopers in -// the parameter and return types of functions to signify ownership transfer -// in to and out of a function. When calling a function that has a scoper -// as the argument type, it must be called with the result of an analogous -// scoper's Pass() function or another function that generates a temporary; -// passing by copy will NOT work. Here is an example using scoped_ptr: -// -// void TakesOwnership(scoped_ptr arg) { -// // Do something with arg -// } -// scoped_ptr CreateFoo() { -// // No need for calling Pass() because we are constructing a temporary -// // for the return value. -// return scoped_ptr(new Foo("new")); -// } -// scoped_ptr PassThru(scoped_ptr arg) { -// return arg.Pass(); -// } -// -// { -// scoped_ptr ptr(new Foo("yay")); // ptr manages Foo("yay"). -// TakesOwnership(ptr.Pass()); // ptr no longer owns Foo("yay"). -// scoped_ptr ptr2 = CreateFoo(); // ptr2 owns the return Foo. -// scoped_ptr ptr3 = // ptr3 now owns what was in ptr2. -// PassThru(ptr2.Pass()); // ptr2 is correspondingly NULL. -// } -// -// Notice that if you do not call Pass() when returning from PassThru(), or -// when invoking TakesOwnership(), the code will not compile because scopers -// are not copyable; they only implement move semantics which require calling -// the Pass() function to signify a destructive transfer of state. CreateFoo() -// is different though because we are constructing a temporary on the return -// line and thus can avoid needing to call Pass(). -// -// Pass() properly handles upcast in initialization, i.e. you can use a -// scoped_ptr to initialize a scoped_ptr: -// -// scoped_ptr foo(new Foo()); -// scoped_ptr parent(foo.Pass()); -// -// PassAs<>() should be used to upcast return value in return statement: -// -// scoped_ptr CreateFoo() { -// scoped_ptr result(new FooChild()); -// return result.PassAs(); -// } -// -// Note that PassAs<>() is implemented only for scoped_ptr, but not for -// scoped_ptr. This is because casting array pointers may not be safe. - -#ifndef CEF_INCLUDE_BASE_CEF_MEMORY_SCOPED_PTR_H_ -#define CEF_INCLUDE_BASE_CEF_MEMORY_SCOPED_PTR_H_ -#pragma once - -#if defined(BASE_MEMORY_SCOPED_PTR_H_) -// Do nothing if 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(BUILDING_CEF_SHARED) -// When building CEF include the Chromium header directly. -#include "base/memory/scoped_ptr.h" -#else // !BUILDING_CEF_SHARED -// The following is substantially similar to the Chromium implementation. -// If the Chromium implementation diverges the below implementation should be -// updated to match. - -// This is an implementation designed to match the anticipated future TR2 -// implementation of the scoped_ptr class. - -#include -#include -#include - -#include // For std::swap(). - -#include "include/base/cef_basictypes.h" -#include "include/base/cef_build.h" -#include "include/base/cef_macros.h" -#include "include/base/cef_move.h" -#include "include/base/cef_template_util.h" - -namespace base { - -namespace subtle { -class RefCountedBase; -class RefCountedThreadSafeBase; -} // namespace subtle - -// Function object which deletes its parameter, which must be a pointer. -// If C is an array type, invokes 'delete[]' on the parameter; otherwise, -// invokes 'delete'. The default deleter for scoped_ptr. -template -struct DefaultDeleter { - DefaultDeleter() {} - template DefaultDeleter(const DefaultDeleter& other) { - // IMPLEMENTATION NOTE: C++11 20.7.1.1.2p2 only provides this constructor - // if U* is implicitly convertible to T* and U is not an array type. - // - // Correct implementation should use SFINAE to disable this - // constructor. However, since there are no other 1-argument constructors, - // using a COMPILE_ASSERT() based on is_convertible<> and requiring - // complete types is simpler and will cause compile failures for equivalent - // misuses. - // - // Note, the is_convertible check also ensures that U is not an - // array. T is guaranteed to be a non-array, so any U* where U is an array - // cannot convert to T*. - enum { T_must_be_complete = sizeof(T) }; - enum { U_must_be_complete = sizeof(U) }; - COMPILE_ASSERT((base::is_convertible::value), - U_ptr_must_implicitly_convert_to_T_ptr); - } - inline void operator()(T* ptr) const { - enum { type_must_be_complete = sizeof(T) }; - delete ptr; - } -}; - -// Specialization of DefaultDeleter for array types. -template -struct DefaultDeleter { - inline void operator()(T* ptr) const { - enum { type_must_be_complete = sizeof(T) }; - delete[] ptr; - } - - private: - // Disable this operator for any U != T because it is undefined to execute - // an array delete when the static type of the array mismatches the dynamic - // type. - // - // References: - // C++98 [expr.delete]p3 - // http://cplusplus.github.com/LWG/lwg-defects.html#938 - template void operator()(U* array) const; -}; - -template -struct DefaultDeleter { - // Never allow someone to declare something like scoped_ptr. - COMPILE_ASSERT(sizeof(T) == -1, do_not_use_array_with_size_as_type); -}; - -// Function object which invokes 'free' on its parameter, which must be -// a pointer. Can be used to store malloc-allocated pointers in scoped_ptr: -// -// scoped_ptr foo_ptr( -// static_cast(malloc(sizeof(int)))); -struct FreeDeleter { - inline void operator()(void* ptr) const { - free(ptr); - } -}; - -namespace cef_internal { - -template struct IsNotRefCounted { - enum { - value = !base::is_convertible::value && - !base::is_convertible:: - value - }; -}; - -// Minimal implementation of the core logic of scoped_ptr, suitable for -// reuse in both scoped_ptr and its specializations. -template -class scoped_ptr_impl { - public: - explicit scoped_ptr_impl(T* p) : data_(p) { } - - // Initializer for deleters that have data parameters. - scoped_ptr_impl(T* p, const D& d) : data_(p, d) {} - - // Templated constructor that destructively takes the value from another - // scoped_ptr_impl. - template - scoped_ptr_impl(scoped_ptr_impl* other) - : data_(other->release(), other->get_deleter()) { - // We do not support move-only deleters. We could modify our move - // emulation to have base::subtle::move() and base::subtle::forward() - // functions that are imperfect emulations of their C++11 equivalents, - // but until there's a requirement, just assume deleters are copyable. - } - - template - void TakeState(scoped_ptr_impl* other) { - // See comment in templated constructor above regarding lack of support - // for move-only deleters. - reset(other->release()); - get_deleter() = other->get_deleter(); - } - - ~scoped_ptr_impl() { - if (data_.ptr != NULL) { - // Not using get_deleter() saves one function call in non-optimized - // builds. - static_cast(data_)(data_.ptr); - } - } - - void reset(T* p) { - // This is a self-reset, which is no longer allowed: http://crbug.com/162971 - if (p != NULL && p == data_.ptr) - abort(); - - // Note that running data_.ptr = p can lead to undefined behavior if - // get_deleter()(get()) deletes this. In order to prevent this, reset() - // should update the stored pointer before deleting its old value. - // - // However, changing reset() to use that behavior may cause current code to - // break in unexpected ways. If the destruction of the owned object - // dereferences the scoped_ptr when it is destroyed by a call to reset(), - // then it will incorrectly dispatch calls to |p| rather than the original - // value of |data_.ptr|. - // - // During the transition period, set the stored pointer to NULL while - // deleting the object. Eventually, this safety check will be removed to - // prevent the scenario initially described from occuring and - // http://crbug.com/176091 can be closed. - T* old = data_.ptr; - data_.ptr = NULL; - if (old != NULL) - static_cast(data_)(old); - data_.ptr = p; - } - - T* get() const { return data_.ptr; } - - D& get_deleter() { return data_; } - const D& get_deleter() const { return data_; } - - void swap(scoped_ptr_impl& p2) { - // Standard swap idiom: 'using std::swap' ensures that std::swap is - // present in the overload set, but we call swap unqualified so that - // any more-specific overloads can be used, if available. - using std::swap; - swap(static_cast(data_), static_cast(p2.data_)); - swap(data_.ptr, p2.data_.ptr); - } - - T* release() { - T* old_ptr = data_.ptr; - data_.ptr = NULL; - return old_ptr; - } - - private: - // Needed to allow type-converting constructor. - template friend class scoped_ptr_impl; - - // Use the empty base class optimization to allow us to have a D - // member, while avoiding any space overhead for it when D is an - // empty class. See e.g. http://www.cantrip.org/emptyopt.html for a good - // discussion of this technique. - struct Data : public D { - explicit Data(T* ptr_in) : ptr(ptr_in) {} - Data(T* ptr_in, const D& other) : D(other), ptr(ptr_in) {} - T* ptr; - }; - - Data data_; - - DISALLOW_COPY_AND_ASSIGN(scoped_ptr_impl); -}; - -} // namespace cef_internal - -} // namespace base - -// A scoped_ptr is like a T*, except that the destructor of scoped_ptr -// automatically deletes the pointer it holds (if any). -// That is, scoped_ptr owns the T object that it points to. -// Like a T*, a scoped_ptr may hold either NULL or a pointer to a T object. -// Also like T*, scoped_ptr is thread-compatible, and once you -// dereference it, you get the thread safety guarantees of T. -// -// The size of scoped_ptr is small. On most compilers, when using the -// DefaultDeleter, sizeof(scoped_ptr) == sizeof(T*). Custom deleters will -// increase the size proportional to whatever state they need to have. See -// comments inside scoped_ptr_impl<> for details. -// -// Current implementation targets having a strict subset of C++11's -// unique_ptr<> features. Known deficiencies include not supporting move-only -// deleteres, function pointers as deleters, and deleters with reference -// types. -template > -class scoped_ptr { - MOVE_ONLY_TYPE_FOR_CPP_03(scoped_ptr, RValue) - - COMPILE_ASSERT(base::cef_internal::IsNotRefCounted::value, - T_is_refcounted_type_and_needs_scoped_refptr); - - public: - // The element and deleter types. - typedef T element_type; - typedef D deleter_type; - - // Constructor. Defaults to initializing with NULL. - scoped_ptr() : impl_(NULL) { } - - // Constructor. Takes ownership of p. - explicit scoped_ptr(element_type* p) : impl_(p) { } - - // Constructor. Allows initialization of a stateful deleter. - scoped_ptr(element_type* p, const D& d) : impl_(p, d) { } - - // Constructor. Allows construction from a scoped_ptr rvalue for a - // convertible type and deleter. - // - // IMPLEMENTATION NOTE: C++11 unique_ptr<> keeps this constructor distinct - // from the normal move constructor. By C++11 20.7.1.2.1.21, this constructor - // has different post-conditions if D is a reference type. Since this - // implementation does not support deleters with reference type, - // we do not need a separate move constructor allowing us to avoid one - // use of SFINAE. You only need to care about this if you modify the - // implementation of scoped_ptr. - template - scoped_ptr(scoped_ptr other) : impl_(&other.impl_) { - COMPILE_ASSERT(!base::is_array::value, U_cannot_be_an_array); - } - - // Constructor. Move constructor for C++03 move emulation of this type. - scoped_ptr(RValue rvalue) : impl_(&rvalue.object->impl_) { } - - // operator=. Allows assignment from a scoped_ptr rvalue for a convertible - // type and deleter. - // - // IMPLEMENTATION NOTE: C++11 unique_ptr<> keeps this operator= distinct from - // the normal move assignment operator. By C++11 20.7.1.2.3.4, this templated - // form has different requirements on for move-only Deleters. Since this - // implementation does not support move-only Deleters, we do not need a - // separate move assignment operator allowing us to avoid one use of SFINAE. - // You only need to care about this if you modify the implementation of - // scoped_ptr. - template - scoped_ptr& operator=(scoped_ptr rhs) { - COMPILE_ASSERT(!base::is_array::value, U_cannot_be_an_array); - impl_.TakeState(&rhs.impl_); - return *this; - } - - // Reset. Deletes the currently owned object, if any. - // Then takes ownership of a new object, if given. - void reset(element_type* p = NULL) { impl_.reset(p); } - - // Accessors to get the owned object. - // operator* and operator-> will assert() if there is no current object. - element_type& operator*() const { - assert(impl_.get() != NULL); - return *impl_.get(); - } - element_type* operator->() const { - assert(impl_.get() != NULL); - return impl_.get(); - } - element_type* get() const { return impl_.get(); } - - // Access to the deleter. - deleter_type& get_deleter() { return impl_.get_deleter(); } - const deleter_type& get_deleter() const { return impl_.get_deleter(); } - - // Allow scoped_ptr to be used in boolean expressions, but not - // implicitly convertible to a real bool (which is dangerous). - // - // Note that this trick is only safe when the == and != operators - // are declared explicitly, as otherwise "scoped_ptr1 == - // scoped_ptr2" will compile but do the wrong thing (i.e., convert - // to Testable and then do the comparison). - private: - typedef base::cef_internal::scoped_ptr_impl - scoped_ptr::*Testable; - - public: - operator Testable() const { return impl_.get() ? &scoped_ptr::impl_ : NULL; } - - // Comparison operators. - // These return whether two scoped_ptr refer to the same object, not just to - // two different but equal objects. - bool operator==(const element_type* p) const { return impl_.get() == p; } - bool operator!=(const element_type* p) const { return impl_.get() != p; } - - // Swap two scoped pointers. - void swap(scoped_ptr& p2) { - impl_.swap(p2.impl_); - } - - // Release a pointer. - // The return value is the current pointer held by this object. - // If this object holds a NULL pointer, the return value is NULL. - // After this operation, this object will hold a NULL pointer, - // and will not own the object any more. - element_type* release() WARN_UNUSED_RESULT { - return impl_.release(); - } - - // C++98 doesn't support functions templates with default parameters which - // makes it hard to write a PassAs() that understands converting the deleter - // while preserving simple calling semantics. - // - // Until there is a use case for PassAs() with custom deleters, just ignore - // the custom deleter. - template - scoped_ptr PassAs() { - return scoped_ptr(Pass()); - } - - private: - // Needed to reach into |impl_| in the constructor. - template friend class scoped_ptr; - base::cef_internal::scoped_ptr_impl impl_; - - // Forbidden for API compatibility with std::unique_ptr. - explicit scoped_ptr(int disallow_construction_from_null); - - // Forbid comparison of scoped_ptr types. If U != T, it totally - // doesn't make sense, and if U == T, it still doesn't make sense - // because you should never have the same object owned by two different - // scoped_ptrs. - template bool operator==(scoped_ptr const& p2) const; - template bool operator!=(scoped_ptr const& p2) const; -}; - -template -class scoped_ptr { - MOVE_ONLY_TYPE_FOR_CPP_03(scoped_ptr, RValue) - - public: - // The element and deleter types. - typedef T element_type; - typedef D deleter_type; - - // Constructor. Defaults to initializing with NULL. - scoped_ptr() : impl_(NULL) { } - - // Constructor. Stores the given array. Note that the argument's type - // must exactly match T*. In particular: - // - it cannot be a pointer to a type derived from T, because it is - // inherently unsafe in the general case to access an array through a - // pointer whose dynamic type does not match its static type (eg., if - // T and the derived types had different sizes access would be - // incorrectly calculated). Deletion is also always undefined - // (C++98 [expr.delete]p3). If you're doing this, fix your code. - // - it cannot be NULL, because NULL is an integral expression, not a - // pointer to T. Use the no-argument version instead of explicitly - // passing NULL. - // - it cannot be const-qualified differently from T per unique_ptr spec - // (http://cplusplus.github.com/LWG/lwg-active.html#2118). Users wanting - // to work around this may use implicit_cast(). - // However, because of the first bullet in this comment, users MUST - // NOT use implicit_cast() to upcast the static type of the array. - explicit scoped_ptr(element_type* array) : impl_(array) { } - - // Constructor. Move constructor for C++03 move emulation of this type. - scoped_ptr(RValue rvalue) : impl_(&rvalue.object->impl_) { } - - // operator=. Move operator= for C++03 move emulation of this type. - scoped_ptr& operator=(RValue rhs) { - impl_.TakeState(&rhs.object->impl_); - return *this; - } - - // Reset. Deletes the currently owned array, if any. - // Then takes ownership of a new object, if given. - void reset(element_type* array = NULL) { impl_.reset(array); } - - // Accessors to get the owned array. - element_type& operator[](size_t i) const { - assert(impl_.get() != NULL); - return impl_.get()[i]; - } - element_type* get() const { return impl_.get(); } - - // Access to the deleter. - deleter_type& get_deleter() { return impl_.get_deleter(); } - const deleter_type& get_deleter() const { return impl_.get_deleter(); } - - // Allow scoped_ptr to be used in boolean expressions, but not - // implicitly convertible to a real bool (which is dangerous). - private: - typedef base::cef_internal::scoped_ptr_impl - scoped_ptr::*Testable; - - public: - operator Testable() const { return impl_.get() ? &scoped_ptr::impl_ : NULL; } - - // Comparison operators. - // These return whether two scoped_ptr refer to the same object, not just to - // two different but equal objects. - bool operator==(element_type* array) const { return impl_.get() == array; } - bool operator!=(element_type* array) const { return impl_.get() != array; } - - // Swap two scoped pointers. - void swap(scoped_ptr& p2) { - impl_.swap(p2.impl_); - } - - // Release a pointer. - // The return value is the current pointer held by this object. - // If this object holds a NULL pointer, the return value is NULL. - // After this operation, this object will hold a NULL pointer, - // and will not own the object any more. - element_type* release() WARN_UNUSED_RESULT { - return impl_.release(); - } - - private: - // Force element_type to be a complete type. - enum { type_must_be_complete = sizeof(element_type) }; - - // Actually hold the data. - base::cef_internal::scoped_ptr_impl impl_; - - // Disable initialization from any type other than element_type*, by - // providing a constructor that matches such an initialization, but is - // private and has no definition. This is disabled because it is not safe to - // call delete[] on an array whose static type does not match its dynamic - // type. - template explicit scoped_ptr(U* array); - explicit scoped_ptr(int disallow_construction_from_null); - - // Disable reset() from any type other than element_type*, for the same - // reasons as the constructor above. - template void reset(U* array); - void reset(int disallow_reset_from_null); - - // Forbid comparison of scoped_ptr types. If U != T, it totally - // doesn't make sense, and if U == T, it still doesn't make sense - // because you should never have the same object owned by two different - // scoped_ptrs. - template bool operator==(scoped_ptr const& p2) const; - template bool operator!=(scoped_ptr const& p2) const; -}; - -// Free functions -template -void swap(scoped_ptr& p1, scoped_ptr& p2) { - p1.swap(p2); -} - -template -bool operator==(T* p1, const scoped_ptr& p2) { - return p1 == p2.get(); -} - -template -bool operator!=(T* p1, const scoped_ptr& p2) { - return p1 != p2.get(); -} - -// A function to convert T* into scoped_ptr -// Doing e.g. make_scoped_ptr(new FooBarBaz(arg)) is a shorter notation -// for scoped_ptr >(new FooBarBaz(arg)) -template -scoped_ptr make_scoped_ptr(T* ptr) { - return scoped_ptr(ptr); -} - -#endif // !BUILDING_CEF_SHARED - -#endif // CEF_INCLUDE_BASE_CEF_MEMORY_SCOPED_PTR_H_ diff --git a/tool_kits/cef/cef_wrapper/include/base/cef_string16.h b/tool_kits/cef/cef_wrapper/include/base/cef_string16.h deleted file mode 100644 index 0d642b2d..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/cef_string16.h +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2013 -// Google Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CEF_INCLUDE_BASE_CEF_STRING16_H_ -#define CEF_INCLUDE_BASE_CEF_STRING16_H_ -#pragma once - -#if defined(BASE_STRINGS_STRING16_H_) -// Do nothing if 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(BUILDING_CEF_SHARED) -// When building CEF include the Chromium header directly. -#include "base/strings/string16.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. -// WHAT: -// A version of std::basic_string that provides 2-byte characters even when -// wchar_t is not implemented as a 2-byte type. You can access this class as -// string16. We also define char16, which string16 is based upon. -// -// WHY: -// On Windows, wchar_t is 2 bytes, and it can conveniently handle UTF-16/UCS-2 -// data. Plenty of existing code operates on strings encoded as UTF-16. -// -// On many other platforms, sizeof(wchar_t) is 4 bytes by default. We can make -// it 2 bytes by using the GCC flag -fshort-wchar. But then std::wstring fails -// at run time, because it calls some functions (like wcslen) that come from -// the system's native C library -- which was built with a 4-byte wchar_t! -// It's wasteful to use 4-byte wchar_t strings to carry UTF-16 data, and it's -// entirely improper on those systems where the encoding of wchar_t is defined -// as UTF-32. -// -// Here, we define string16, which is similar to std::wstring but replaces all -// libc functions with custom, 2-byte-char compatible routines. It is capable -// of carrying UTF-16-encoded data. - -#include -#include - -#include "include/base/cef_basictypes.h" - -#if defined(WCHAR_T_IS_UTF16) - -namespace base { - -typedef wchar_t char16; -typedef std::wstring string16; -typedef std::char_traits string16_char_traits; - -} // namespace base - -#elif defined(WCHAR_T_IS_UTF32) - -#include // For uint16_t - -#include "include/base/cef_macros.h" - -namespace base { - -typedef uint16_t char16; - -// char16 versions of the functions required by string16_char_traits; these -// are based on the wide character functions of similar names ("w" or "wcs" -// instead of "c16"). -int c16memcmp(const char16* s1, const char16* s2, size_t n); -size_t c16len(const char16* s); -const char16* c16memchr(const char16* s, char16 c, size_t n); -char16* c16memmove(char16* s1, const char16* s2, size_t n); -char16* c16memcpy(char16* s1, const char16* s2, size_t n); -char16* c16memset(char16* s, char16 c, size_t n); - -struct string16_char_traits { - typedef char16 char_type; - typedef int int_type; - - // int_type needs to be able to hold each possible value of char_type, and in - // addition, the distinct value of eof(). - COMPILE_ASSERT(sizeof(int_type) > sizeof(char_type), unexpected_type_width); - - typedef std::streamoff off_type; - typedef mbstate_t state_type; - typedef std::fpos pos_type; - - static void assign(char_type& c1, const char_type& c2) { - c1 = c2; - } - - static bool eq(const char_type& c1, const char_type& c2) { - return c1 == c2; - } - static bool lt(const char_type& c1, const char_type& c2) { - return c1 < c2; - } - - static int compare(const char_type* s1, const char_type* s2, size_t n) { - return c16memcmp(s1, s2, n); - } - - static size_t length(const char_type* s) { - return c16len(s); - } - - static const char_type* find(const char_type* s, size_t n, - const char_type& a) { - return c16memchr(s, a, n); - } - - static char_type* move(char_type* s1, const char_type* s2, int_type n) { - return c16memmove(s1, s2, n); - } - - static char_type* copy(char_type* s1, const char_type* s2, size_t n) { - return c16memcpy(s1, s2, n); - } - - static char_type* assign(char_type* s, size_t n, char_type a) { - return c16memset(s, a, n); - } - - static int_type not_eof(const int_type& c) { - return eq_int_type(c, eof()) ? 0 : c; - } - - static char_type to_char_type(const int_type& c) { - return char_type(c); - } - - static int_type to_int_type(const char_type& c) { - return int_type(c); - } - - static bool eq_int_type(const int_type& c1, const int_type& c2) { - return c1 == c2; - } - - static int_type eof() { - return static_cast(EOF); - } -}; - -typedef std::basic_string string16; - -extern std::ostream& operator<<(std::ostream& out, const string16& str); - -// This is required by googletest to print a readable output on test failures. -extern void PrintTo(const string16& str, std::ostream* out); - -} // namespace base - -// The string class will be explicitly instantiated only once, in string16.cc. -// -// std::basic_string<> in GNU libstdc++ contains a static data member, -// _S_empty_rep_storage, to represent empty strings. When an operation such -// as assignment or destruction is performed on a string, causing its existing -// data member to be invalidated, it must not be freed if this static data -// member is being used. Otherwise, it counts as an attempt to free static -// (and not allocated) data, which is a memory error. -// -// Generally, due to C++ template magic, _S_empty_rep_storage will be marked -// as a coalesced symbol, meaning that the linker will combine multiple -// instances into a single one when generating output. -// -// If a string class is used by multiple shared libraries, a problem occurs. -// Each library will get its own copy of _S_empty_rep_storage. When strings -// are passed across a library boundary for alteration or destruction, memory -// errors will result. GNU libstdc++ contains a configuration option, -// --enable-fully-dynamic-string (_GLIBCXX_FULLY_DYNAMIC_STRING), which -// disables the static data member optimization, but it's a good optimization -// and non-STL code is generally at the mercy of the system's STL -// configuration. Fully-dynamic strings are not the default for GNU libstdc++ -// libstdc++ itself or for the libstdc++ installations on the systems we care -// about, such as Mac OS X and relevant flavors of Linux. -// -// See also http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24196 . -// -// To avoid problems, string classes need to be explicitly instantiated only -// once, in exactly one library. All other string users see it via an "extern" -// declaration. This is precisely how GNU libstdc++ handles -// std::basic_string (string) and std::basic_string (wstring). -// -// This also works around a Mac OS X linker bug in ld64-85.2.1 (Xcode 3.1.2), -// in which the linker does not fully coalesce symbols when dead code -// stripping is enabled. This bug causes the memory errors described above -// to occur even when a std::basic_string<> does not cross shared library -// boundaries, such as in statically-linked executables. -// -// TODO(mark): File this bug with Apple and update this note with a bug number. - -extern template -class std::basic_string; - -#endif // WCHAR_T_IS_UTF32 - -#endif // !BUILDING_CEF_SHARED - -#endif // CEF_INCLUDE_BASE_CEF_STRING16_H_ diff --git a/tool_kits/cef/cef_wrapper/include/base/cef_template_util.h b/tool_kits/cef/cef_wrapper/include/base/cef_template_util.h deleted file mode 100644 index 5fa228b5..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/cef_template_util.h +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 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. - -#ifndef CEF_INCLUDE_BASE_CEF_TEMPLATE_UTIL_H_ -#define CEF_INCLUDE_BASE_CEF_TEMPLATE_UTIL_H_ -#pragma once - -#if defined(BASE_TEMPLATE_UTIL_H_) -// Do nothing if 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(BUILDING_CEF_SHARED) -// When building CEF include the Chromium header directly. -#include "base/template_util.h" -#else // !BUILDING_CEF_SHARED -// The following is substantially similar to the Chromium implementation. -// If the Chromium implementation diverges the below implementation should be -// updated to match. - -#include // For size_t. - -#include "include/base/cef_build.h" - -namespace base { - -// template definitions from tr1 - -template -struct integral_constant { - static const T value = v; - typedef T value_type; - typedef integral_constant type; -}; - -template const T integral_constant::value; - -typedef integral_constant true_type; -typedef integral_constant false_type; - -template struct is_pointer : false_type {}; -template struct is_pointer : true_type {}; - -// Member function pointer detection up to four params. Add more as needed -// below. This is built-in to C++ 11, and we can remove this when we switch. -template -struct is_member_function_pointer : false_type {}; - -template -struct is_member_function_pointer : true_type {}; -template -struct is_member_function_pointer : true_type {}; - -template -struct is_member_function_pointer : true_type {}; -template -struct is_member_function_pointer : true_type {}; - -template -struct is_member_function_pointer : true_type {}; -template -struct is_member_function_pointer : true_type {}; - -template -struct is_member_function_pointer : true_type {}; -template -struct is_member_function_pointer : true_type {}; - -template -struct is_member_function_pointer : true_type {}; -template -struct is_member_function_pointer : true_type {}; - - -template struct is_same : public false_type {}; -template struct is_same : true_type {}; - -template struct is_array : public false_type {}; -template struct is_array : public true_type {}; -template struct is_array : public true_type {}; - -template struct is_non_const_reference : false_type {}; -template struct is_non_const_reference : true_type {}; -template struct is_non_const_reference : false_type {}; - -template struct is_const : false_type {}; -template struct is_const : true_type {}; - -template struct is_void : false_type {}; -template <> struct is_void : true_type {}; - -namespace cef_internal { - -// Types YesType and NoType are guaranteed such that sizeof(YesType) < -// sizeof(NoType). -typedef char YesType; - -struct NoType { - YesType dummy[2]; -}; - -// This class is an implementation detail for is_convertible, and you -// don't need to know how it works to use is_convertible. For those -// who care: we declare two different functions, one whose argument is -// of type To and one with a variadic argument list. We give them -// return types of different size, so we can use sizeof to trick the -// compiler into telling us which function it would have chosen if we -// had called it with an argument of type From. See Alexandrescu's -// _Modern C++ Design_ for more details on this sort of trick. - -struct ConvertHelper { - template - static YesType Test(To); - - template - static NoType Test(...); - - template - static From& Create(); -}; - -// Used to determine if a type is a struct/union/class. Inspired by Boost's -// is_class type_trait implementation. -struct IsClassHelper { - template - static YesType Test(void(C::*)(void)); - - template - static NoType Test(...); -}; - -} // namespace cef_internal - -// Inherits from true_type if From is convertible to To, false_type otherwise. -// -// Note that if the type is convertible, this will be a true_type REGARDLESS -// of whether or not the conversion would emit a warning. -template -struct is_convertible - : integral_constant( - cef_internal::ConvertHelper::Create())) == - sizeof(cef_internal::YesType)> { -}; - -template -struct is_class - : integral_constant(0)) == - sizeof(cef_internal::YesType)> { -}; - -template -struct enable_if {}; - -template -struct enable_if { typedef T type; }; - -} // namespace base - -#endif // !BUILDING_CEF_SHARED - -#endif // CEF_INCLUDE_BASE_CEF_TEMPLATE_UTIL_H_ diff --git a/tool_kits/cef/cef_wrapper/include/base/cef_thread_checker.h b/tool_kits/cef/cef_wrapper/include/base/cef_thread_checker.h deleted file mode 100644 index 73f3fb51..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/cef_thread_checker.h +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012 -// 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. - -#ifndef CEF_INCLUDE_BASE_THREAD_CHECKER_H_ -#define CEF_INCLUDE_BASE_THREAD_CHECKER_H_ -#pragma once - -#if defined(BASE_THREADING_THREAD_CHECKER_H_) -// Do nothing if 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(BUILDING_CEF_SHARED) -// When building CEF include the Chromium header directly. -#include "base/threading/thread_checker.h" -#else // !BUILDING_CEF_SHARED -// The following is substantially similar to the Chromium implementation. -// If the Chromium implementation diverges the below implementation should be -// updated to match. - -#include "include/base/cef_logging.h" -#include "include/base/internal/cef_thread_checker_impl.h" - -// Apart from debug builds, we also enable the thread checker in -// builds with DCHECK_ALWAYS_ON so that trybots and waterfall bots -// with this define will get the same level of thread checking as -// debug bots. -#if DCHECK_IS_ON() -#define ENABLE_THREAD_CHECKER 1 -#else -#define ENABLE_THREAD_CHECKER 0 -#endif - - -namespace base { - -namespace cef_internal { - -// Do nothing implementation, for use in release mode. -// -// Note: You should almost always use the ThreadChecker class to get the -// right version for your build configuration. -class ThreadCheckerDoNothing { - public: - bool CalledOnValidThread() const { - return true; - } - - void DetachFromThread() {} -}; - -} // namespace cef_internal - -// ThreadChecker is a helper class used to help verify that some methods of a -// class are called from the same thread. It provides identical functionality to -// base::NonThreadSafe, but it is meant to be held as a member variable, rather -// than inherited from base::NonThreadSafe. -// -// While inheriting from base::NonThreadSafe may give a clear indication about -// the thread-safety of a class, it may also lead to violations of the style -// guide with regard to multiple inheritance. The choice between having a -// ThreadChecker member and inheriting from base::NonThreadSafe should be based -// on whether: -// - Derived classes need to know the thread they belong to, as opposed to -// having that functionality fully encapsulated in the base class. -// - Derived classes should be able to reassign the base class to another -// thread, via DetachFromThread. -// -// If neither of these are true, then having a ThreadChecker member and calling -// CalledOnValidThread is the preferable solution. -// -// Example: -// class MyClass { -// public: -// void Foo() { -// DCHECK(thread_checker_.CalledOnValidThread()); -// ... (do stuff) ... -// } -// -// private: -// ThreadChecker thread_checker_; -// } -// -// In Release mode, CalledOnValidThread will always return true. -#if ENABLE_THREAD_CHECKER -class ThreadChecker : public cef_internal::ThreadCheckerImpl { -}; -#else -class ThreadChecker : public cef_internal::ThreadCheckerDoNothing { -}; -#endif // ENABLE_THREAD_CHECKER - -#undef ENABLE_THREAD_CHECKER - -} // namespace base - -#endif // !BUILDING_CEF_SHARED - -#endif // CEF_INCLUDE_BASE_THREAD_CHECKER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/base/cef_thread_collision_warner.h b/tool_kits/cef/cef_wrapper/include/base/cef_thread_collision_warner.h deleted file mode 100644 index bbc88759..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/cef_thread_collision_warner.h +++ /dev/null @@ -1,287 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012 -// 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. - -#ifndef CEF_INCLUDE_BASE_CEF_THREAD_COLLISION_WARNER_H_ -#define CEF_INCLUDE_BASE_CEF_THREAD_COLLISION_WARNER_H_ -#pragma once - -#if defined(BASE_THREADING_THREAD_COLLISION_WARNER_H_) -// Do nothing if 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(BUILDING_CEF_SHARED) -// When building CEF include the Chromium header directly. -#include "base/threading/thread_collision_warner.h" -#else // !BUILDING_CEF_SHARED -// The following is substantially similar to the Chromium implementation. -// If the Chromium implementation diverges the below implementation should be -// updated to match. - -#include - -#include "include/base/cef_atomicops.h" -#include "include/base/cef_basictypes.h" -#include "include/base/cef_build.h" -#include "include/base/cef_macros.h" - -// A helper class alongside macros to be used to verify assumptions about thread -// safety of a class. -// -// Example: Queue implementation non thread-safe but still usable if clients -// are synchronized somehow. -// -// In this case the macro DFAKE_SCOPED_LOCK has to be -// used, it checks that if a thread is inside the push/pop then -// noone else is still inside the pop/push -// -// class NonThreadSafeQueue { -// public: -// ... -// void push(int) { DFAKE_SCOPED_LOCK(push_pop_); ... } -// int pop() { DFAKE_SCOPED_LOCK(push_pop_); ... } -// ... -// private: -// DFAKE_MUTEX(push_pop_); -// }; -// -// -// Example: Queue implementation non thread-safe but still usable if clients -// are synchronized somehow, it calls a method to "protect" from -// a "protected" method -// -// In this case the macro DFAKE_SCOPED_RECURSIVE_LOCK -// has to be used, it checks that if a thread is inside the push/pop -// then noone else is still inside the pop/push -// -// class NonThreadSafeQueue { -// public: -// void push(int) { -// DFAKE_SCOPED_LOCK(push_pop_); -// ... -// } -// int pop() { -// DFAKE_SCOPED_RECURSIVE_LOCK(push_pop_); -// bar(); -// ... -// } -// void bar() { DFAKE_SCOPED_RECURSIVE_LOCK(push_pop_); ... } -// ... -// private: -// DFAKE_MUTEX(push_pop_); -// }; -// -// -// Example: Queue implementation not usable even if clients are synchronized, -// so only one thread in the class life cycle can use the two members -// push/pop. -// -// In this case the macro DFAKE_SCOPED_LOCK_THREAD_LOCKED pins the -// specified -// critical section the first time a thread enters push or pop, from -// that time on only that thread is allowed to execute push or pop. -// -// class NonThreadSafeQueue { -// public: -// ... -// void push(int) { DFAKE_SCOPED_LOCK_THREAD_LOCKED(push_pop_); ... } -// int pop() { DFAKE_SCOPED_LOCK_THREAD_LOCKED(push_pop_); ... } -// ... -// private: -// DFAKE_MUTEX(push_pop_); -// }; -// -// -// Example: Class that has to be contructed/destroyed on same thread, it has -// a "shareable" method (with external synchronization) and a not -// shareable method (even with external synchronization). -// -// In this case 3 Critical sections have to be defined -// -// class ExoticClass { -// public: -// ExoticClass() { DFAKE_SCOPED_LOCK_THREAD_LOCKED(ctor_dtor_); ... } -// ~ExoticClass() { DFAKE_SCOPED_LOCK_THREAD_LOCKED(ctor_dtor_); ... } -// -// void Shareable() { DFAKE_SCOPED_LOCK(shareable_section_); ... } -// void NotShareable() { DFAKE_SCOPED_LOCK_THREAD_LOCKED(ctor_dtor_); ... } -// ... -// private: -// DFAKE_MUTEX(ctor_dtor_); -// DFAKE_MUTEX(shareable_section_); -// }; - - -#if !defined(NDEBUG) - -// Defines a class member that acts like a mutex. It is used only as a -// verification tool. -#define DFAKE_MUTEX(obj) \ - mutable base::ThreadCollisionWarner obj -// Asserts the call is never called simultaneously in two threads. Used at -// member function scope. -#define DFAKE_SCOPED_LOCK(obj) \ - base::ThreadCollisionWarner::ScopedCheck s_check_##obj(&obj) -// Asserts the call is never called simultaneously in two threads. Used at -// member function scope. Same as DFAKE_SCOPED_LOCK but allows recursive locks. -#define DFAKE_SCOPED_RECURSIVE_LOCK(obj) \ - base::ThreadCollisionWarner::ScopedRecursiveCheck sr_check_##obj(&obj) -// Asserts the code is always executed in the same thread. -#define DFAKE_SCOPED_LOCK_THREAD_LOCKED(obj) \ - base::ThreadCollisionWarner::Check check_##obj(&obj) - -#else - -#define DFAKE_MUTEX(obj) typedef void InternalFakeMutexType##obj -#define DFAKE_SCOPED_LOCK(obj) ((void)0) -#define DFAKE_SCOPED_RECURSIVE_LOCK(obj) ((void)0) -#define DFAKE_SCOPED_LOCK_THREAD_LOCKED(obj) ((void)0) - -#endif - -namespace base { - -// The class ThreadCollisionWarner uses an Asserter to notify the collision -// AsserterBase is the interfaces and DCheckAsserter is the default asserter -// used. During the unit tests is used another class that doesn't "DCHECK" -// in case of collision (check thread_collision_warner_unittests.cc) -struct AsserterBase { - virtual ~AsserterBase() {} - virtual void warn() = 0; -}; - -struct DCheckAsserter : public AsserterBase { - virtual ~DCheckAsserter() {} - virtual void warn() OVERRIDE; -}; - -class ThreadCollisionWarner { - public: - // The parameter asserter is there only for test purpose - explicit ThreadCollisionWarner(AsserterBase* asserter = new DCheckAsserter()) - : valid_thread_id_(0), - counter_(0), - asserter_(asserter) {} - - ~ThreadCollisionWarner() { - delete asserter_; - } - - // This class is meant to be used through the macro - // DFAKE_SCOPED_LOCK_THREAD_LOCKED - // it doesn't leave the critical section, as opposed to ScopedCheck, - // because the critical section being pinned is allowed to be used only - // from one thread - class Check { - public: - explicit Check(ThreadCollisionWarner* warner) - : warner_(warner) { - warner_->EnterSelf(); - } - - ~Check() {} - - private: - ThreadCollisionWarner* warner_; - - DISALLOW_COPY_AND_ASSIGN(Check); - }; - - // This class is meant to be used through the macro - // DFAKE_SCOPED_LOCK - class ScopedCheck { - public: - explicit ScopedCheck(ThreadCollisionWarner* warner) - : warner_(warner) { - warner_->Enter(); - } - - ~ScopedCheck() { - warner_->Leave(); - } - - private: - ThreadCollisionWarner* warner_; - - DISALLOW_COPY_AND_ASSIGN(ScopedCheck); - }; - - // This class is meant to be used through the macro - // DFAKE_SCOPED_RECURSIVE_LOCK - class ScopedRecursiveCheck { - public: - explicit ScopedRecursiveCheck(ThreadCollisionWarner* warner) - : warner_(warner) { - warner_->EnterSelf(); - } - - ~ScopedRecursiveCheck() { - warner_->Leave(); - } - - private: - ThreadCollisionWarner* warner_; - - DISALLOW_COPY_AND_ASSIGN(ScopedRecursiveCheck); - }; - - private: - // This method stores the current thread identifier and does a DCHECK - // if a another thread has already done it, it is safe if same thread - // calls this multiple time (recursion allowed). - void EnterSelf(); - - // Same as EnterSelf but recursion is not allowed. - void Enter(); - - // Removes the thread_id stored in order to allow other threads to - // call EnterSelf or Enter. - void Leave(); - - // This stores the thread id that is inside the critical section, if the - // value is 0 then no thread is inside. - volatile subtle::Atomic32 valid_thread_id_; - - // Counter to trace how many time a critical section was "pinned" - // (when allowed) in order to unpin it when counter_ reaches 0. - volatile subtle::Atomic32 counter_; - - // Here only for class unit tests purpose, during the test I need to not - // DCHECK but notify the collision with something else. - AsserterBase* asserter_; - - DISALLOW_COPY_AND_ASSIGN(ThreadCollisionWarner); -}; - -} // namespace base - -#endif // !BUILDING_CEF_SHARED - -#endif // CEF_INCLUDE_BASE_CEF_THREAD_COLLISION_WARNER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/base/cef_trace_event.h b/tool_kits/cef/cef_wrapper/include/base/cef_trace_event.h deleted file mode 100644 index a24146cd..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/cef_trace_event.h +++ /dev/null @@ -1,427 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012 -// 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. - -/// -// Trace events are for tracking application performance and resource usage. -// Macros are provided to track: -// Begin and end of function calls -// Counters -// -// Events are issued against categories. Whereas LOG's categories are statically -// defined, TRACE categories are created implicitly with a string. For example: -// TRACE_EVENT_INSTANT0("MY_SUBSYSTEM", "SomeImportantEvent") -// -// Events can be INSTANT, or can be pairs of BEGIN and END in the same scope: -// TRACE_EVENT_BEGIN0("MY_SUBSYSTEM", "SomethingCostly") -// doSomethingCostly() -// TRACE_EVENT_END0("MY_SUBSYSTEM", "SomethingCostly") -// Note: Our tools can't always determine the correct BEGIN/END pairs unless -// these are used in the same scope. Use ASYNC_BEGIN/ASYNC_END macros if you -// need them to be in separate scopes. -// -// A common use case is to trace entire function scopes. This issues a trace -// BEGIN and END automatically: -// void doSomethingCostly() { -// TRACE_EVENT0("MY_SUBSYSTEM", "doSomethingCostly"); -// ... -// } -// -// Additional parameters can be associated with an event: -// void doSomethingCostly2(int howMuch) { -// TRACE_EVENT1("MY_SUBSYSTEM", "doSomethingCostly", -// "howMuch", howMuch); -// ... -// } -// -// The trace system will automatically add to this information the current -// process id, thread id, and a timestamp in microseconds. -// -// To trace an asynchronous procedure such as an IPC send/receive, use -// ASYNC_BEGIN and ASYNC_END: -// [single threaded sender code] -// static int send_count = 0; -// ++send_count; -// TRACE_EVENT_ASYNC_BEGIN0("ipc", "message", send_count); -// Send(new MyMessage(send_count)); -// [receive code] -// void OnMyMessage(send_count) { -// TRACE_EVENT_ASYNC_END0("ipc", "message", send_count); -// } -// The third parameter is a unique ID to match ASYNC_BEGIN/ASYNC_END pairs. -// ASYNC_BEGIN and ASYNC_END can occur on any thread of any traced process. -// Pointers can be used for the ID parameter, and they will be mangled -// internally so that the same pointer on two different processes will not -// match. For example: -// class MyTracedClass { -// public: -// MyTracedClass() { -// TRACE_EVENT_ASYNC_BEGIN0("category", "MyTracedClass", this); -// } -// ~MyTracedClass() { -// TRACE_EVENT_ASYNC_END0("category", "MyTracedClass", this); -// } -// } -// -// The trace event also supports counters, which is a way to track a quantity -// as it varies over time. Counters are created with the following macro: -// TRACE_COUNTER1("MY_SUBSYSTEM", "myCounter", g_myCounterValue); -// -// Counters are process-specific. The macro itself can be issued from any -// thread, however. -// -// Sometimes, you want to track two counters at once. You can do this with two -// counter macros: -// TRACE_COUNTER1("MY_SUBSYSTEM", "myCounter0", g_myCounterValue[0]); -// TRACE_COUNTER1("MY_SUBSYSTEM", "myCounter1", g_myCounterValue[1]); -// Or you can do it with a combined macro: -// TRACE_COUNTER2("MY_SUBSYSTEM", "myCounter", -// "bytesPinned", g_myCounterValue[0], -// "bytesAllocated", g_myCounterValue[1]); -// This indicates to the tracing UI that these counters should be displayed -// in a single graph, as a summed area chart. -// -// Since counters are in a global namespace, you may want to disembiguate with a -// unique ID, by using the TRACE_COUNTER_ID* variations. -// -// By default, trace collection is compiled in, but turned off at runtime. -// Collecting trace data is the responsibility of the embedding application. In -// CEF's case, calling BeginTracing will turn on tracing on all active -// processes. -// -// -// Memory scoping note: -// Tracing copies the pointers, not the string content, of the strings passed -// in for category, name, and arg_names. Thus, the following code will cause -// problems: -// char* str = strdup("impprtantName"); -// TRACE_EVENT_INSTANT0("SUBSYSTEM", str); // BAD! -// free(str); // Trace system now has dangling pointer -// -// To avoid this issue with the |name| and |arg_name| parameters, use the -// TRACE_EVENT_COPY_XXX overloads of the macros at additional runtime -// overhead. -// Notes: The category must always be in a long-lived char* (i.e. static const). -// The |arg_values|, when used, are always deep copied with the _COPY -// macros. -// -// -// Thread Safety: -// All macros are thread safe and can be used from any process. -/// - -#ifndef CEF_INCLUDE_BASE_CEF_TRACE_EVENT_H_ -#define CEF_INCLUDE_BASE_CEF_TRACE_EVENT_H_ -#pragma once - -#if defined(TRACE_EVENT0) -// Do nothing if the macros provided by this header already exist. -// 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(BUILDING_CEF_SHARED) -// When building CEF include the Chromium header directly. -#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. - -#include "include/internal/cef_trace_event_internal.h" - -// Records a pair of begin and end events called "name" for the current -// scope, with 0, 1 or 2 associated arguments. If the category is not -// enabled, then this does nothing. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -#define TRACE_EVENT0(category, name) \ - cef_trace_event_begin(category, name, NULL, 0, NULL, 0, false); \ - CEF_INTERNAL_TRACE_END_ON_SCOPE_CLOSE(category, name) -#define TRACE_EVENT1(category, name, arg1_name, arg1_val) \ - cef_trace_event_begin(category, name, arg1_name, arg1_val, NULL, 0, false); \ - CEF_INTERNAL_TRACE_END_ON_SCOPE_CLOSE(category, name) -#define TRACE_EVENT2(category, name, arg1_name, arg1_val, arg2_name, \ - arg2_val) \ - cef_trace_event_begin(category, name, arg1_name, arg1_val, \ - arg2_name, arg2_val, false); \ - CEF_INTERNAL_TRACE_END_ON_SCOPE_CLOSE(category, name) - -// Implementation detail: trace event macros create temporary variable names. -// These macros give each temporary variable a unique name based on the line -// number to prevent name collisions. -#define CEF_INTERNAL_TRACE_EVENT_UID3(a,b) \ - cef_trace_event_unique_##a##b -#define CEF_INTERNAL_TRACE_EVENT_UID2(a,b) \ - CEF_INTERNAL_TRACE_EVENT_UID3(a,b) -#define CEF_INTERNAL_TRACE_EVENT_UID(name_prefix) \ - CEF_INTERNAL_TRACE_EVENT_UID2(name_prefix, __LINE__) - -// Implementation detail: internal macro to end end event when the scope ends. -#define CEF_INTERNAL_TRACE_END_ON_SCOPE_CLOSE(category, name) \ - cef_trace_event::CefTraceEndOnScopeClose \ - CEF_INTERNAL_TRACE_EVENT_UID(profileScope)(category, name) - -// Records a single event called "name" immediately, with 0, 1 or 2 -// associated arguments. If the category is not enabled, then this -// does nothing. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -#define TRACE_EVENT_INSTANT0(category, name) \ - cef_trace_event_instant(category, name, NULL, 0, NULL, 0, false) -#define TRACE_EVENT_INSTANT1(category, name, arg1_name, arg1_val) \ - cef_trace_event_instant(category, name, arg1_name, arg1_val, NULL, 0, false) -#define TRACE_EVENT_INSTANT2(category, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - cef_trace_event_instant(category, name, arg1_name, arg1_val, arg2_name, \ - arg2_val, false) -#define TRACE_EVENT_COPY_INSTANT0(category, name) \ - cef_trace_event_instant(category, name, NULL, 0, NULL, 0, true) -#define TRACE_EVENT_COPY_INSTANT1(category, name, arg1_name, arg1_val) \ - cef_trace_event_instant(category, name, arg1_name, arg1_val, NULL, 0, true) -#define TRACE_EVENT_COPY_INSTANT2(category, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - cef_trace_event_instant(category, name, arg1_name, arg1_val, arg2_name, \ - arg2_val, true) - -// Records a single BEGIN event called "name" immediately, with 0, 1 or 2 -// associated arguments. If the category is not enabled, then this -// does nothing. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -#define TRACE_EVENT_BEGIN0(category, name) \ - cef_trace_event_begin(category, name, NULL, 0, NULL, 0, false) -#define TRACE_EVENT_BEGIN1(category, name, arg1_name, arg1_val) \ - cef_trace_event_begin(category, name, arg1_name, arg1_val, NULL, 0, false) -#define TRACE_EVENT_BEGIN2(category, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - cef_trace_event_begin(category, name, arg1_name, arg1_val, arg2_name, \ - arg2_val, false) -#define TRACE_EVENT_COPY_BEGIN0(category, name) \ - cef_trace_event_begin(category, name, NULL, 0, NULL, 0, true) -#define TRACE_EVENT_COPY_BEGIN1(category, name, arg1_name, arg1_val) \ - cef_trace_event_begin(category, name, arg1_name, arg1_val, NULL, 0, true) -#define TRACE_EVENT_COPY_BEGIN2(category, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - cef_trace_event_begin(category, name, arg1_name, arg1_val, arg2_name, \ - arg2_val, true) - -// Records a single END event for "name" immediately. If the category -// is not enabled, then this does nothing. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -#define TRACE_EVENT_END0(category, name) \ - cef_trace_event_end(category, name, NULL, 0, NULL, 0, false) -#define TRACE_EVENT_END1(category, name, arg1_name, arg1_val) \ - cef_trace_event_end(category, name, arg1_name, arg1_val, NULL, 0, false) -#define TRACE_EVENT_END2(category, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - cef_trace_event_end(category, name, arg1_name, arg1_val, arg2_name, \ - arg2_val, false) -#define TRACE_EVENT_COPY_END0(category, name) \ - cef_trace_event_end(category, name, NULL, 0, NULL, 0, true) -#define TRACE_EVENT_COPY_END1(category, name, arg1_name, arg1_val) \ - cef_trace_event_end(category, name, arg1_name, arg1_val, NULL, 0, true) -#define TRACE_EVENT_COPY_END2(category, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - cef_trace_event_end(category, name, arg1_name, arg1_val, arg2_name, \ - arg2_val, true) - -// Records the value of a counter called "name" immediately. Value -// must be representable as a 32 bit integer. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -#define TRACE_COUNTER1(category, name, value) \ - cef_trace_counter(category, name, NULL, value, NULL, 0, false) -#define TRACE_COPY_COUNTER1(category, name, value) \ - cef_trace_counter(category, name, NULL, value, NULL, 0, true) - -// Records the values of a multi-parted counter called "name" immediately. -// The UI will treat value1 and value2 as parts of a whole, displaying their -// values as a stacked-bar chart. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -#define TRACE_COUNTER2(category, name, value1_name, value1_val, \ - value2_name, value2_val) \ - cef_trace_counter(category, name, value1_name, value1_val, value2_name, \ - value2_val, false) -#define TRACE_COPY_COUNTER2(category, name, value1_name, value1_val, \ - value2_name, value2_val) \ - cef_trace_counter(category, name, value1_name, value1_val, value2_name, \ - value2_val, true) - -// Records the value of a counter called "name" immediately. Value -// must be representable as a 32 bit integer. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -// - |id| is used to disambiguate counters with the same name. It must either -// be a pointer or an integer value up to 64 bits. If it's a pointer, the -// bits will be xored with a hash of the process ID so that the same pointer -// on two different processes will not collide. -#define TRACE_COUNTER_ID1(category, name, id, value) \ - cef_trace_counter_id(category, name, id, NULL, value, NULL, 0, false) -#define TRACE_COPY_COUNTER_ID1(category, name, id, value) \ - cef_trace_counter_id(category, name, id, NULL, value, NULL, 0, true) - -// Records the values of a multi-parted counter called "name" immediately. -// The UI will treat value1 and value2 as parts of a whole, displaying their -// values as a stacked-bar chart. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -// - |id| is used to disambiguate counters with the same name. It must either -// be a pointer or an integer value up to 64 bits. If it's a pointer, the -// bits will be xored with a hash of the process ID so that the same pointer -// on two different processes will not collide. -#define TRACE_COUNTER_ID2(category, name, id, value1_name, value1_val, \ - value2_name, value2_val) \ - cef_trace_counter_id(category, name, id, value1_name, value1_val, \ - value2_name, value2_val, false) -#define TRACE_COPY_COUNTER_ID2(category, name, id, value1_name, \ - value1_val, value2_name, value2_val) \ - cef_trace_counter_id(category, name, id, value1_name, value1_val, \ - value2_name, value2_val, true) - - -// Records a single ASYNC_BEGIN event called "name" immediately, with 0, 1 or 2 -// associated arguments. If the category is not enabled, then this -// does nothing. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -// - |id| is used to match the ASYNC_BEGIN event with the ASYNC_END event. -// ASYNC events are considered to match if their category, name and id values -// all match. |id| must either be a pointer or an integer value up to 64 -// bits. If it's a pointer, the bits will be xored with a hash of the process -// ID sothat the same pointer on two different processes will not collide. -// An asynchronous operation can consist of multiple phases. The first phase is -// defined by the ASYNC_BEGIN calls. Additional phases can be defined using the -// ASYNC_STEP_BEGIN macros. When the operation completes, call ASYNC_END. -// An async operation can span threads and processes, but all events in that -// operation must use the same |name| and |id|. Each event can have its own -// args. -#define TRACE_EVENT_ASYNC_BEGIN0(category, name, id) \ - cef_trace_event_async_begin(category, name, id, NULL, 0, NULL, 0, false) -#define TRACE_EVENT_ASYNC_BEGIN1(category, name, id, arg1_name, arg1_val) \ - cef_trace_event_async_begin(category, name, id, arg1_name, arg1_val, NULL, \ - 0, false) -#define TRACE_EVENT_ASYNC_BEGIN2(category, name, id, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - cef_trace_event_async_begin(category, name, id, arg1_name, arg1_val, \ - arg2_name, arg2_val, false) -#define TRACE_EVENT_COPY_ASYNC_BEGIN0(category, name, id) \ - cef_trace_event_async_begin(category, name, id, NULL, 0, NULL, 0, true) -#define TRACE_EVENT_COPY_ASYNC_BEGIN1(category, name, id, arg1_name, \ - arg1_val) \ - cef_trace_event_async_begin(category, name, id, arg1_name, arg1_val, NULL, \ - 0, true) -#define TRACE_EVENT_COPY_ASYNC_BEGIN2(category, name, id, arg1_name, \ - arg1_val, arg2_name, arg2_val) \ - cef_trace_event_async_begin(category, name, id, arg1_name, arg1_val, \ - arg2_name, arg2_val, true) - -// Records a single ASYNC_STEP_INTO event for |step| immediately. If the -// category is not enabled, then this does nothing. The |name| and |id| must -// match the ASYNC_BEGIN event above. The |step| param identifies this step -// within the async event. This should be called at the beginning of the next -// phase of an asynchronous operation. The ASYNC_BEGIN event must not have any -// ASYNC_STEP_PAST events. -#define TRACE_EVENT_ASYNC_STEP_INTO0(category, name, id, step) \ - cef_trace_event_async_step_into(category, name, id, step, NULL, 0, false) -#define TRACE_EVENT_ASYNC_STEP_INTO1(category, name, id, step, \ - arg1_name, arg1_val) \ - cef_trace_event_async_step_into(category, name, id, step, arg1_name, \ - arg1_val, false) -#define TRACE_EVENT_COPY_ASYNC_STEP_INTO0(category, name, id, step) \ - cef_trace_event_async_step_into(category, name, id, step, NULL, 0, true) -#define TRACE_EVENT_COPY_ASYNC_STEP_INTO1(category, name, id, step, \ - arg1_name, arg1_val) \ - cef_trace_event_async_step_into(category, name, id, step, arg1_name, \ - arg1_val, true) - -// Records a single ASYNC_STEP_PAST event for |step| immediately. If the -// category is not enabled, then this does nothing. The |name| and |id| must -// match the ASYNC_BEGIN event above. The |step| param identifies this step -// within the async event. This should be called at the beginning of the next -// phase of an asynchronous operation. The ASYNC_BEGIN event must not have any -// ASYNC_STEP_INTO events. -#define TRACE_EVENT_ASYNC_STEP_PAST0(category, name, id, step) \ - cef_trace_event_async_step_past(category, name, id, step, NULL, 0, false) -#define TRACE_EVENT_ASYNC_STEP_PAST1(category, name, id, step, \ - arg1_name, arg1_val) \ - cef_trace_event_async_step_past(category, name, id, step, arg1_name, \ - arg1_val, false) -#define TRACE_EVENT_COPY_ASYNC_STEP_PAST0(category, name, id, step) \ - cef_trace_event_async_step_past(category, name, id, step, NULL, 0, true) -#define TRACE_EVENT_COPY_ASYNC_STEP_PAST1(category, name, id, step, \ - arg1_name, arg1_val) \ - cef_trace_event_async_step_past(category, name, id, step, arg1_name, \ - arg1_val, true) - -// Records a single ASYNC_END event for "name" immediately. If the category -// is not enabled, then this does nothing. -#define TRACE_EVENT_ASYNC_END0(category, name, id) \ - cef_trace_event_async_end(category, name, id, NULL, 0, NULL, 0, false) -#define TRACE_EVENT_ASYNC_END1(category, name, id, arg1_name, arg1_val) \ - cef_trace_event_async_end(category, name, id, arg1_name, arg1_val, NULL, 0, \ - false) -#define TRACE_EVENT_ASYNC_END2(category, name, id, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - cef_trace_event_async_end(category, name, id, arg1_name, arg1_val, \ - arg2_name, arg2_val, false) -#define TRACE_EVENT_COPY_ASYNC_END0(category, name, id) \ - cef_trace_event_async_end(category, name, id, NULL, 0, NULL, 0, true) -#define TRACE_EVENT_COPY_ASYNC_END1(category, name, id, arg1_name, \ - arg1_val) \ - cef_trace_event_async_end(category, name, id, arg1_name, arg1_val, NULL, 0, \ - true) -#define TRACE_EVENT_COPY_ASYNC_END2(category, name, id, arg1_name, \ - arg1_val, arg2_name, arg2_val) \ - cef_trace_event_async_end(category, name, id, arg1_name, arg1_val, \ - arg2_name, arg2_val, true) - -namespace cef_trace_event { - -// Used by TRACE_EVENTx macro. Do not use directly. -class CefTraceEndOnScopeClose { - public: - CefTraceEndOnScopeClose(const char* category, const char* name) - : category_(category), name_(name) { - } - ~CefTraceEndOnScopeClose() { - cef_trace_event_end(category_, name_, NULL, 0, NULL, 0, false); - } - - private: - const char* category_; - const char* name_; -}; - -} // cef_trace_event - -#endif // !BUILDING_CEF_SHARED - -#endif // CEF_INCLUDE_BASE_CEF_TRACE_EVENT_H_ diff --git a/tool_kits/cef/cef_wrapper/include/base/cef_tuple.h b/tool_kits/cef/cef_wrapper/include/base/cef_tuple.h deleted file mode 100644 index 1d038430..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/cef_tuple.h +++ /dev/null @@ -1,1407 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 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. - -// A Tuple is a generic templatized container, similar in concept to std::pair. -// There are classes Tuple0 to Tuple6, cooresponding to the number of elements -// it contains. The convenient MakeTuple() function takes 0 to 6 arguments, -// and will construct and return the appropriate Tuple object. The functions -// DispatchToMethod and DispatchToFunction take a function pointer or instance -// and method pointer, and unpack a tuple into arguments to the call. -// -// Tuple elements are copied by value, and stored in the tuple. See the unit -// tests for more details of how/when the values are copied. -// -// Example usage: -// // These two methods of creating a Tuple are identical. -// Tuple2 tuple_a(1, "wee"); -// Tuple2 tuple_b = MakeTuple(1, "wee"); -// -// void SomeFunc(int a, const char* b) { } -// DispatchToFunction(&SomeFunc, tuple_a); // SomeFunc(1, "wee") -// DispatchToFunction( -// &SomeFunc, MakeTuple(10, "foo")); // SomeFunc(10, "foo") -// -// struct { void SomeMeth(int a, int b, int c) { } } foo; -// DispatchToMethod(&foo, &Foo::SomeMeth, MakeTuple(1, 2, 3)); -// // foo->SomeMeth(1, 2, 3); - -#ifndef CEF_INCLUDE_BASE_CEF_TUPLE_H_ -#define CEF_INCLUDE_BASE_CEF_TUPLE_H_ -#pragma once - -#if defined(BASE_TUPLE_H_) -// 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. - -// 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 \ - struct TupleLeaf { \ - TupleLeaf() {} \ - explicit TupleLeaf(typename TupleTraits::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 -using Tuple1 = Tuple; -template -using Tuple2 = Tuple; -template -using Tuple3 = Tuple; -template -using Tuple4 = Tuple; -template -using Tuple5 = Tuple; -template -using Tuple6 = Tuple; -template -using Tuple7 = Tuple; -template -using Tuple8 = Tuple; - -} // namespace base - -#elif defined(BUILDING_CEF_SHARED) -// When building CEF include the Chromium header directly. -#include "base/tuple.h" -#else // !BUILDING_CEF_SHARED -// The following is substantially similar to the Chromium implementation. -// If the Chromium implementation diverges the below implementation should be -// updated to match. - -#include "include/base/cef_bind_helpers.h" - -namespace base { - -// Traits ---------------------------------------------------------------------- -// -// A simple traits class for tuple arguments. -// -// ValueType: the bare, nonref version of a type (same as the type for nonrefs). -// RefType: the ref version of a type (same as the type for refs). -// ParamType: what type to pass to functions (refs should not be constified). - -template -struct TupleTraits { - typedef P ValueType; - typedef P& RefType; - typedef const P& ParamType; -}; - -template -struct TupleTraits { - typedef P ValueType; - typedef P& RefType; - typedef P& ParamType; -}; - -template -struct TupleTypes { }; - -// Tuple ----------------------------------------------------------------------- -// -// This set of classes is useful for bundling 0 or more heterogeneous data types -// into a single variable. The advantage of this is that it greatly simplifies -// function objects that need to take an arbitrary number of parameters; see -// RunnableMethod and IPC::MessageWithTuple. -// -// Tuple0 is supplied to act as a 'void' type. It can be used, for example, -// when dispatching to a function that accepts no arguments (see the -// Dispatchers below). -// Tuple1 is rarely useful. One such use is when A is non-const ref that you -// want filled by the dispatchee, and the tuple is merely a container for that -// output (a "tier"). See MakeRefTuple and its usages. - -struct Tuple0 { - typedef Tuple0 ValueTuple; - typedef Tuple0 RefTuple; - typedef Tuple0 ParamTuple; -}; - -template -struct Tuple1 { - public: - typedef A TypeA; - - Tuple1() {} - explicit Tuple1(typename TupleTraits::ParamType a) : a(a) {} - - A a; -}; - -template -struct Tuple2 { - public: - typedef A TypeA; - typedef B TypeB; - - Tuple2() {} - Tuple2(typename TupleTraits::ParamType a, - typename TupleTraits::ParamType b) - : a(a), b(b) { - } - - A a; - B b; -}; - -template -struct Tuple3 { - public: - typedef A TypeA; - typedef B TypeB; - typedef C TypeC; - - Tuple3() {} - Tuple3(typename TupleTraits::ParamType a, - typename TupleTraits::ParamType b, - typename TupleTraits::ParamType c) - : a(a), b(b), c(c){ - } - - A a; - B b; - C c; -}; - -template -struct Tuple4 { - public: - typedef A TypeA; - typedef B TypeB; - typedef C TypeC; - typedef D TypeD; - - Tuple4() {} - Tuple4(typename TupleTraits::ParamType a, - typename TupleTraits::ParamType b, - typename TupleTraits::ParamType c, - typename TupleTraits::ParamType d) - : a(a), b(b), c(c), d(d) { - } - - A a; - B b; - C c; - D d; -}; - -template -struct Tuple5 { - public: - typedef A TypeA; - typedef B TypeB; - typedef C TypeC; - typedef D TypeD; - typedef E TypeE; - - Tuple5() {} - Tuple5(typename TupleTraits::ParamType a, - typename TupleTraits::ParamType b, - typename TupleTraits::ParamType c, - typename TupleTraits::ParamType d, - typename TupleTraits::ParamType e) - : a(a), b(b), c(c), d(d), e(e) { - } - - A a; - B b; - C c; - D d; - E e; -}; - -template -struct Tuple6 { - public: - typedef A TypeA; - typedef B TypeB; - typedef C TypeC; - typedef D TypeD; - typedef E TypeE; - typedef F TypeF; - - Tuple6() {} - Tuple6(typename TupleTraits::ParamType a, - typename TupleTraits::ParamType b, - typename TupleTraits::ParamType c, - typename TupleTraits::ParamType d, - typename TupleTraits::ParamType e, - typename TupleTraits::ParamType f) - : a(a), b(b), c(c), d(d), e(e), f(f) { - } - - A a; - B b; - C c; - D d; - E e; - F f; -}; - -template -struct Tuple7 { - public: - typedef A TypeA; - typedef B TypeB; - typedef C TypeC; - typedef D TypeD; - typedef E TypeE; - typedef F TypeF; - typedef G TypeG; - - Tuple7() {} - Tuple7(typename TupleTraits::ParamType a, - typename TupleTraits::ParamType b, - typename TupleTraits::ParamType c, - typename TupleTraits::ParamType d, - typename TupleTraits::ParamType e, - typename TupleTraits::ParamType f, - typename TupleTraits::ParamType g) - : a(a), b(b), c(c), d(d), e(e), f(f), g(g) { - } - - A a; - B b; - C c; - D d; - E e; - F f; - G g; -}; - -template -struct Tuple8 { - public: - typedef A TypeA; - typedef B TypeB; - typedef C TypeC; - typedef D TypeD; - typedef E TypeE; - typedef F TypeF; - typedef G TypeG; - typedef H TypeH; - - Tuple8() {} - Tuple8(typename TupleTraits::ParamType a, - typename TupleTraits::ParamType b, - typename TupleTraits::ParamType c, - typename TupleTraits::ParamType d, - typename TupleTraits::ParamType e, - typename TupleTraits::ParamType f, - typename TupleTraits::ParamType g, - typename TupleTraits::ParamType h) - : a(a), b(b), c(c), d(d), e(e), f(f), g(g), h(h) { - } - - A a; - B b; - C c; - D d; - E e; - F f; - G g; - H h; -}; - -// Tuple types ---------------------------------------------------------------- -// -// Allows for selection of ValueTuple/RefTuple/ParamTuple without needing the -// definitions of class types the tuple takes as parameters. - -template <> -struct TupleTypes< Tuple0 > { - typedef Tuple0 ValueTuple; - typedef Tuple0 RefTuple; - typedef Tuple0 ParamTuple; -}; - -template -struct TupleTypes< Tuple1 > { - typedef Tuple1::ValueType> ValueTuple; - typedef Tuple1::RefType> RefTuple; - typedef Tuple1::ParamType> ParamTuple; -}; - -template -struct TupleTypes< Tuple2 > { - typedef Tuple2::ValueType, - typename TupleTraits::ValueType> ValueTuple; -typedef Tuple2::RefType, - typename TupleTraits::RefType> RefTuple; - typedef Tuple2::ParamType, - typename TupleTraits::ParamType> ParamTuple; -}; - -template -struct TupleTypes< Tuple3 > { - typedef Tuple3::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType> ValueTuple; -typedef Tuple3::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType> RefTuple; - typedef Tuple3::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType> ParamTuple; -}; - -template -struct TupleTypes< Tuple4 > { - typedef Tuple4::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType> ValueTuple; -typedef Tuple4::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType> RefTuple; - typedef Tuple4::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType> ParamTuple; -}; - -template -struct TupleTypes< Tuple5 > { - typedef Tuple5::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType> ValueTuple; -typedef Tuple5::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType> RefTuple; - typedef Tuple5::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType> ParamTuple; -}; - -template -struct TupleTypes< Tuple6 > { - typedef Tuple6::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType> ValueTuple; -typedef Tuple6::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType> RefTuple; - typedef Tuple6::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType> ParamTuple; -}; - -template -struct TupleTypes< Tuple7 > { - typedef Tuple7::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType> ValueTuple; -typedef Tuple7::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType> RefTuple; - typedef Tuple7::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType> ParamTuple; -}; - -template -struct TupleTypes< Tuple8 > { - typedef Tuple8::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType> ValueTuple; -typedef Tuple8::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType> RefTuple; - typedef Tuple8::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType> ParamTuple; -}; - -// Tuple creators ------------------------------------------------------------- -// -// Helper functions for constructing tuples while inferring the template -// argument types. - -inline Tuple0 MakeTuple() { - return Tuple0(); -} - -template -inline Tuple1 MakeTuple(const A& a) { - return Tuple1(a); -} - -template -inline Tuple2 MakeTuple(const A& a, const B& b) { - return Tuple2(a, b); -} - -template -inline Tuple3 MakeTuple(const A& a, const B& b, const C& c) { - return Tuple3(a, b, c); -} - -template -inline Tuple4 MakeTuple(const A& a, const B& b, const C& c, - const D& d) { - return Tuple4(a, b, c, d); -} - -template -inline Tuple5 MakeTuple(const A& a, const B& b, const C& c, - const D& d, const E& e) { - return Tuple5(a, b, c, d, e); -} - -template -inline Tuple6 MakeTuple(const A& a, const B& b, const C& c, - const D& d, const E& e, const F& f) { - return Tuple6(a, b, c, d, e, f); -} - -template -inline Tuple7 MakeTuple(const A& a, const B& b, const C& c, - const D& d, const E& e, const F& f, - const G& g) { - return Tuple7(a, b, c, d, e, f, g); -} - -template -inline Tuple8 MakeTuple(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 Tuple8(a, b, c, d, e, f, g, h); -} - -// The following set of helpers make what Boost refers to as "Tiers" - a tuple -// of references. - -template -inline Tuple1 MakeRefTuple(A& a) { - return Tuple1(a); -} - -template -inline Tuple2 MakeRefTuple(A& a, B& b) { - return Tuple2(a, b); -} - -template -inline Tuple3 MakeRefTuple(A& a, B& b, C& c) { - return Tuple3(a, b, c); -} - -template -inline Tuple4 MakeRefTuple(A& a, B& b, C& c, D& d) { - return Tuple4(a, b, c, d); -} - -template -inline Tuple5 MakeRefTuple(A& a, B& b, C& c, D& d, E& e) { - return Tuple5(a, b, c, d, e); -} - -template -inline Tuple6 MakeRefTuple(A& a, B& b, C& c, D& d, E& e, - F& f) { - return Tuple6(a, b, c, d, e, f); -} - -template -inline Tuple7 MakeRefTuple(A& a, B& b, C& c, D& d, - E& e, F& f, G& g) { - return Tuple7(a, b, c, d, e, f, g); -} - -template -inline Tuple8 MakeRefTuple(A& a, B& b, C& c, - D& d, E& e, F& f, - G& g, H& h) { - return Tuple8(a, b, c, d, e, f, g, h); -} - -// Dispatchers ---------------------------------------------------------------- -// -// Helper functions that call the given method on an object, with the unpacked -// tuple arguments. Notice that they all have the same number of arguments, -// so you need only write: -// DispatchToMethod(object, &Object::method, args); -// This is very useful for templated dispatchers, since they don't need to know -// what type |args| is. - -// Non-Static Dispatchers with no out params. - -template -inline void DispatchToMethod(ObjT* obj, Method method, const Tuple0& arg) { - (obj->*method)(); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, const A& arg) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(arg)); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, const Tuple1& arg) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(arg.a)); -} - -template -inline void DispatchToMethod(ObjT* obj, - Method method, - const Tuple2& arg) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(arg.a), - base::cef_internal::UnwrapTraits::Unwrap(arg.b)); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple3& arg) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(arg.a), - base::cef_internal::UnwrapTraits::Unwrap(arg.b), - base::cef_internal::UnwrapTraits::Unwrap(arg.c)); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple4& arg) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(arg.a), - base::cef_internal::UnwrapTraits::Unwrap(arg.b), - base::cef_internal::UnwrapTraits::Unwrap(arg.c), - base::cef_internal::UnwrapTraits::Unwrap(arg.d)); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple5& arg) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(arg.a), - base::cef_internal::UnwrapTraits::Unwrap(arg.b), - base::cef_internal::UnwrapTraits::Unwrap(arg.c), - base::cef_internal::UnwrapTraits::Unwrap(arg.d), - base::cef_internal::UnwrapTraits::Unwrap(arg.e)); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple6& arg) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(arg.a), - base::cef_internal::UnwrapTraits::Unwrap(arg.b), - base::cef_internal::UnwrapTraits::Unwrap(arg.c), - base::cef_internal::UnwrapTraits::Unwrap(arg.d), - base::cef_internal::UnwrapTraits::Unwrap(arg.e), - base::cef_internal::UnwrapTraits::Unwrap(arg.f)); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple7& arg) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(arg.a), - base::cef_internal::UnwrapTraits::Unwrap(arg.b), - base::cef_internal::UnwrapTraits::Unwrap(arg.c), - base::cef_internal::UnwrapTraits::Unwrap(arg.d), - base::cef_internal::UnwrapTraits::Unwrap(arg.e), - base::cef_internal::UnwrapTraits::Unwrap(arg.f), - base::cef_internal::UnwrapTraits::Unwrap(arg.g)); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple8& arg) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(arg.a), - base::cef_internal::UnwrapTraits::Unwrap(arg.b), - base::cef_internal::UnwrapTraits::Unwrap(arg.c), - base::cef_internal::UnwrapTraits::Unwrap(arg.d), - base::cef_internal::UnwrapTraits::Unwrap(arg.e), - base::cef_internal::UnwrapTraits::Unwrap(arg.f), - base::cef_internal::UnwrapTraits::Unwrap(arg.g), - base::cef_internal::UnwrapTraits::Unwrap(arg.h)); -} - -// Static Dispatchers with no out params. - -template -inline void DispatchToFunction(Function function, const Tuple0& arg) { - (*function)(); -} - -template -inline void DispatchToFunction(Function function, const A& arg) { - (*function)(arg); -} - -template -inline void DispatchToFunction(Function function, const Tuple1& arg) { - (*function)(base::cef_internal::UnwrapTraits::Unwrap(arg.a)); -} - -template -inline void DispatchToFunction(Function function, const Tuple2& arg) { - (*function)(base::cef_internal::UnwrapTraits::Unwrap(arg.a), - base::cef_internal::UnwrapTraits::Unwrap(arg.b)); -} - -template -inline void DispatchToFunction(Function function, const Tuple3& arg) { - (*function)(base::cef_internal::UnwrapTraits::Unwrap(arg.a), - base::cef_internal::UnwrapTraits::Unwrap(arg.b), - base::cef_internal::UnwrapTraits::Unwrap(arg.c)); -} - -template -inline void DispatchToFunction(Function function, - const Tuple4& arg) { - (*function)(base::cef_internal::UnwrapTraits::Unwrap(arg.a), - base::cef_internal::UnwrapTraits::Unwrap(arg.b), - base::cef_internal::UnwrapTraits::Unwrap(arg.c), - base::cef_internal::UnwrapTraits::Unwrap(arg.d)); -} - -template -inline void DispatchToFunction(Function function, - const Tuple5& arg) { - (*function)(base::cef_internal::UnwrapTraits::Unwrap(arg.a), - base::cef_internal::UnwrapTraits::Unwrap(arg.b), - base::cef_internal::UnwrapTraits::Unwrap(arg.c), - base::cef_internal::UnwrapTraits::Unwrap(arg.d), - base::cef_internal::UnwrapTraits::Unwrap(arg.e)); -} - -template -inline void DispatchToFunction(Function function, - const Tuple6& arg) { - (*function)(base::cef_internal::UnwrapTraits::Unwrap(arg.a), - base::cef_internal::UnwrapTraits::Unwrap(arg.b), - base::cef_internal::UnwrapTraits::Unwrap(arg.c), - base::cef_internal::UnwrapTraits::Unwrap(arg.d), - base::cef_internal::UnwrapTraits::Unwrap(arg.e), - base::cef_internal::UnwrapTraits::Unwrap(arg.f)); -} - -template -inline void DispatchToFunction(Function function, - const Tuple7& arg) { - (*function)(base::cef_internal::UnwrapTraits::Unwrap(arg.a), - base::cef_internal::UnwrapTraits::Unwrap(arg.b), - base::cef_internal::UnwrapTraits::Unwrap(arg.c), - base::cef_internal::UnwrapTraits::Unwrap(arg.d), - base::cef_internal::UnwrapTraits::Unwrap(arg.e), - base::cef_internal::UnwrapTraits::Unwrap(arg.f), - base::cef_internal::UnwrapTraits::Unwrap(arg.g)); -} - -template -inline void DispatchToFunction(Function function, - const Tuple8& arg) { - (*function)(base::cef_internal::UnwrapTraits::Unwrap(arg.a), - base::cef_internal::UnwrapTraits::Unwrap(arg.b), - base::cef_internal::UnwrapTraits::Unwrap(arg.c), - base::cef_internal::UnwrapTraits::Unwrap(arg.d), - base::cef_internal::UnwrapTraits::Unwrap(arg.e), - base::cef_internal::UnwrapTraits::Unwrap(arg.f), - base::cef_internal::UnwrapTraits::Unwrap(arg.g), - base::cef_internal::UnwrapTraits::Unwrap(arg.h)); -} - -// Dispatchers with 0 out param (as a Tuple0). - -template -inline void DispatchToMethod(ObjT* obj, - Method method, - const Tuple0& arg, Tuple0*) { - (obj->*method)(); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, const A& arg, Tuple0*) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(arg)); -} - -template -inline void DispatchToMethod(ObjT* obj, - Method method, - const Tuple1& arg, Tuple0*) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(arg.a)); -} - -template -inline void DispatchToMethod(ObjT* obj, - Method method, - const Tuple2& arg, Tuple0*) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(arg.a), - base::cef_internal::UnwrapTraits::Unwrap(arg.b)); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple3& arg, Tuple0*) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(arg.a), - base::cef_internal::UnwrapTraits::Unwrap(arg.b), - base::cef_internal::UnwrapTraits::Unwrap(arg.c)); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple4& arg, Tuple0*) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(arg.a), - base::cef_internal::UnwrapTraits::Unwrap(arg.b), - base::cef_internal::UnwrapTraits::Unwrap(arg.c), - base::cef_internal::UnwrapTraits::Unwrap(arg.d)); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple5& arg, Tuple0*) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(arg.a), - base::cef_internal::UnwrapTraits::Unwrap(arg.b), - base::cef_internal::UnwrapTraits::Unwrap(arg.c), - base::cef_internal::UnwrapTraits::Unwrap(arg.d), - base::cef_internal::UnwrapTraits::Unwrap(arg.e)); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple6& arg, Tuple0*) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(arg.a), - base::cef_internal::UnwrapTraits::Unwrap(arg.b), - base::cef_internal::UnwrapTraits::Unwrap(arg.c), - base::cef_internal::UnwrapTraits::Unwrap(arg.d), - base::cef_internal::UnwrapTraits::Unwrap(arg.e), - base::cef_internal::UnwrapTraits::Unwrap(arg.f)); -} - -// Dispatchers with 1 out param. - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple0& in, - Tuple1* out) { - (obj->*method)(&out->a); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const InA& in, - Tuple1* out) { - (obj->*method)(in, &out->a); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple1& in, - Tuple1* out) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(in.a), &out->a); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple2& in, - Tuple1* out) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(in.a), - base::cef_internal::UnwrapTraits::Unwrap(in.b), - &out->a); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple3& in, - Tuple1* out) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(in.a), - base::cef_internal::UnwrapTraits::Unwrap(in.b), - base::cef_internal::UnwrapTraits::Unwrap(in.c), - &out->a); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple4& in, - Tuple1* out) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(in.a), - base::cef_internal::UnwrapTraits::Unwrap(in.b), - base::cef_internal::UnwrapTraits::Unwrap(in.c), - base::cef_internal::UnwrapTraits::Unwrap(in.d), - &out->a); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple5& in, - Tuple1* out) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(in.a), - base::cef_internal::UnwrapTraits::Unwrap(in.b), - base::cef_internal::UnwrapTraits::Unwrap(in.c), - base::cef_internal::UnwrapTraits::Unwrap(in.d), - base::cef_internal::UnwrapTraits::Unwrap(in.e), - &out->a); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple6& in, - Tuple1* out) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(in.a), - base::cef_internal::UnwrapTraits::Unwrap(in.b), - base::cef_internal::UnwrapTraits::Unwrap(in.c), - base::cef_internal::UnwrapTraits::Unwrap(in.d), - base::cef_internal::UnwrapTraits::Unwrap(in.e), - base::cef_internal::UnwrapTraits::Unwrap(in.f), - &out->a); -} - -// Dispatchers with 2 out params. - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple0& in, - Tuple2* out) { - (obj->*method)(&out->a, &out->b); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const InA& in, - Tuple2* out) { - (obj->*method)(in, &out->a, &out->b); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple1& in, - Tuple2* out) { - (obj->*method)( - base::cef_internal::UnwrapTraits::Unwrap(in.a), &out->a, &out->b); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple2& in, - Tuple2* out) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(in.a), - base::cef_internal::UnwrapTraits::Unwrap(in.b), - &out->a, - &out->b); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple3& in, - Tuple2* out) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(in.a), - base::cef_internal::UnwrapTraits::Unwrap(in.b), - base::cef_internal::UnwrapTraits::Unwrap(in.c), - &out->a, - &out->b); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple4& in, - Tuple2* out) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(in.a), - base::cef_internal::UnwrapTraits::Unwrap(in.b), - base::cef_internal::UnwrapTraits::Unwrap(in.c), - base::cef_internal::UnwrapTraits::Unwrap(in.d), - &out->a, - &out->b); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple5& in, - Tuple2* out) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(in.a), - base::cef_internal::UnwrapTraits::Unwrap(in.b), - base::cef_internal::UnwrapTraits::Unwrap(in.c), - base::cef_internal::UnwrapTraits::Unwrap(in.d), - base::cef_internal::UnwrapTraits::Unwrap(in.e), - &out->a, - &out->b); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple6& in, - Tuple2* out) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(in.a), - base::cef_internal::UnwrapTraits::Unwrap(in.b), - base::cef_internal::UnwrapTraits::Unwrap(in.c), - base::cef_internal::UnwrapTraits::Unwrap(in.d), - base::cef_internal::UnwrapTraits::Unwrap(in.e), - base::cef_internal::UnwrapTraits::Unwrap(in.f), - &out->a, - &out->b); -} - -// Dispatchers with 3 out params. - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple0& in, - Tuple3* out) { - (obj->*method)(&out->a, &out->b, &out->c); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const InA& in, - Tuple3* out) { - (obj->*method)(in, &out->a, &out->b, &out->c); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple1& in, - Tuple3* out) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(in.a), - &out->a, - &out->b, - &out->c); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple2& in, - Tuple3* out) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(in.a), - base::cef_internal::UnwrapTraits::Unwrap(in.b), - &out->a, - &out->b, - &out->c); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple3& in, - Tuple3* out) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(in.a), - base::cef_internal::UnwrapTraits::Unwrap(in.b), - base::cef_internal::UnwrapTraits::Unwrap(in.c), - &out->a, - &out->b, - &out->c); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple4& in, - Tuple3* out) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(in.a), - base::cef_internal::UnwrapTraits::Unwrap(in.b), - base::cef_internal::UnwrapTraits::Unwrap(in.c), - base::cef_internal::UnwrapTraits::Unwrap(in.d), - &out->a, - &out->b, - &out->c); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple5& in, - Tuple3* out) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(in.a), - base::cef_internal::UnwrapTraits::Unwrap(in.b), - base::cef_internal::UnwrapTraits::Unwrap(in.c), - base::cef_internal::UnwrapTraits::Unwrap(in.d), - base::cef_internal::UnwrapTraits::Unwrap(in.e), - &out->a, - &out->b, - &out->c); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple6& in, - Tuple3* out) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(in.a), - base::cef_internal::UnwrapTraits::Unwrap(in.b), - base::cef_internal::UnwrapTraits::Unwrap(in.c), - base::cef_internal::UnwrapTraits::Unwrap(in.d), - base::cef_internal::UnwrapTraits::Unwrap(in.e), - base::cef_internal::UnwrapTraits::Unwrap(in.f), - &out->a, - &out->b, - &out->c); -} - -// Dispatchers with 4 out params. - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple0& in, - Tuple4* out) { - (obj->*method)(&out->a, &out->b, &out->c, &out->d); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const InA& in, - Tuple4* out) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(in), - &out->a, - &out->b, - &out->c, - &out->d); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple1& in, - Tuple4* out) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(in.a), - &out->a, - &out->b, - &out->c, - &out->d); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple2& in, - Tuple4* out) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(in.a), - base::cef_internal::UnwrapTraits::Unwrap(in.b), - &out->a, - &out->b, - &out->c, - &out->d); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple3& in, - Tuple4* out) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(in.a), - base::cef_internal::UnwrapTraits::Unwrap(in.b), - base::cef_internal::UnwrapTraits::Unwrap(in.c), - &out->a, - &out->b, - &out->c, - &out->d); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple4& in, - Tuple4* out) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(in.a), - base::cef_internal::UnwrapTraits::Unwrap(in.b), - base::cef_internal::UnwrapTraits::Unwrap(in.c), - base::cef_internal::UnwrapTraits::Unwrap(in.d), - &out->a, - &out->b, - &out->c, - &out->d); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple5& in, - Tuple4* out) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(in.a), - base::cef_internal::UnwrapTraits::Unwrap(in.b), - base::cef_internal::UnwrapTraits::Unwrap(in.c), - base::cef_internal::UnwrapTraits::Unwrap(in.d), - base::cef_internal::UnwrapTraits::Unwrap(in.e), - &out->a, - &out->b, - &out->c, - &out->d); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple6& in, - Tuple4* out) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(in.a), - base::cef_internal::UnwrapTraits::Unwrap(in.b), - base::cef_internal::UnwrapTraits::Unwrap(in.c), - base::cef_internal::UnwrapTraits::Unwrap(in.d), - base::cef_internal::UnwrapTraits::Unwrap(in.e), - base::cef_internal::UnwrapTraits::Unwrap(in.f), - &out->a, - &out->b, - &out->c, - &out->d); -} - -// Dispatchers with 5 out params. - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple0& in, - Tuple5* out) { - (obj->*method)(&out->a, &out->b, &out->c, &out->d, &out->e); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const InA& in, - Tuple5* out) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(in), - &out->a, - &out->b, - &out->c, - &out->d, - &out->e); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple1& in, - Tuple5* out) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(in.a), - &out->a, - &out->b, - &out->c, - &out->d, - &out->e); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple2& in, - Tuple5* out) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(in.a), - base::cef_internal::UnwrapTraits::Unwrap(in.b), - &out->a, - &out->b, - &out->c, - &out->d, - &out->e); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple3& in, - Tuple5* out) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(in.a), - base::cef_internal::UnwrapTraits::Unwrap(in.b), - base::cef_internal::UnwrapTraits::Unwrap(in.c), - &out->a, - &out->b, - &out->c, - &out->d, - &out->e); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple4& in, - Tuple5* out) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(in.a), - base::cef_internal::UnwrapTraits::Unwrap(in.b), - base::cef_internal::UnwrapTraits::Unwrap(in.c), - base::cef_internal::UnwrapTraits::Unwrap(in.d), - &out->a, - &out->b, - &out->c, - &out->d, - &out->e); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple5& in, - Tuple5* out) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(in.a), - base::cef_internal::UnwrapTraits::Unwrap(in.b), - base::cef_internal::UnwrapTraits::Unwrap(in.c), - base::cef_internal::UnwrapTraits::Unwrap(in.d), - base::cef_internal::UnwrapTraits::Unwrap(in.e), - &out->a, - &out->b, - &out->c, - &out->d, - &out->e); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple6& in, - Tuple5* out) { - (obj->*method)(base::cef_internal::UnwrapTraits::Unwrap(in.a), - base::cef_internal::UnwrapTraits::Unwrap(in.b), - base::cef_internal::UnwrapTraits::Unwrap(in.c), - base::cef_internal::UnwrapTraits::Unwrap(in.d), - base::cef_internal::UnwrapTraits::Unwrap(in.e), - base::cef_internal::UnwrapTraits::Unwrap(in.f), - &out->a, - &out->b, - &out->c, - &out->d, - &out->e); -} - -} // namespace base - -#endif // !BUILDING_CEF_SHARED - -#endif // CEF_INCLUDE_BASE_CEF_TUPLE_H_ diff --git a/tool_kits/cef/cef_wrapper/include/base/cef_weak_ptr.h b/tool_kits/cef/cef_wrapper/include/base/cef_weak_ptr.h deleted file mode 100644 index 11fabbdc..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/cef_weak_ptr.h +++ /dev/null @@ -1,388 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012 -// 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. - -// Weak pointers are pointers to an object that do not affect its lifetime, -// and which may be invalidated (i.e. reset to NULL) by the object, or its -// owner, at any time, most commonly when the object is about to be deleted. - -// Weak pointers are useful when an object needs to be accessed safely by one -// or more objects other than its owner, and those callers can cope with the -// object vanishing and e.g. tasks posted to it being silently dropped. -// Reference-counting such an object would complicate the ownership graph and -// make it harder to reason about the object's lifetime. - -// EXAMPLE: -// -// class Controller { -// public: -// Controller() : weak_factory_(this) {} -// void SpawnWorker() { Worker::StartNew(weak_factory_.GetWeakPtr()); } -// void WorkComplete(const Result& result) { ... } -// private: -// // Member variables should appear before the WeakPtrFactory, to ensure -// // that any WeakPtrs to Controller are invalidated before its members -// // variable's destructors are executed, rendering them invalid. -// WeakPtrFactory weak_factory_; -// }; -// -// class Worker { -// public: -// static void StartNew(const WeakPtr& controller) { -// Worker* worker = new Worker(controller); -// // Kick off asynchronous processing... -// } -// private: -// Worker(const WeakPtr& controller) -// : controller_(controller) {} -// void DidCompleteAsynchronousProcessing(const Result& result) { -// if (controller_) -// controller_->WorkComplete(result); -// } -// WeakPtr controller_; -// }; -// -// With this implementation a caller may use SpawnWorker() to dispatch multiple -// Workers and subsequently delete the Controller, without waiting for all -// Workers to have completed. - -// ------------------------- IMPORTANT: Thread-safety ------------------------- - -// Weak pointers may be passed safely between threads, but must always be -// dereferenced and invalidated on the same thread otherwise checking the -// pointer would be racey. -// -// To ensure correct use, the first time a WeakPtr issued by a WeakPtrFactory -// is dereferenced, the factory and its WeakPtrs become bound to the calling -// thread, and cannot be dereferenced or invalidated on any other thread. Bound -// WeakPtrs can still be handed off to other threads, e.g. to use to post tasks -// back to object on the bound thread. -// -// If all WeakPtr objects are destroyed or invalidated then the factory is -// unbound from the SequencedTaskRunner/Thread. The WeakPtrFactory may then be -// destroyed, or new WeakPtr objects may be used, from a different sequence. -// -// Thus, at least one WeakPtr object must exist and have been dereferenced on -// the correct thread to enforce that other WeakPtr objects will enforce they -// are used on the desired thread. - -#ifndef CEF_INCLUDE_BASE_CEF_WEAK_PTR_H_ -#define CEF_INCLUDE_BASE_CEF_WEAK_PTR_H_ -#pragma once - -#if defined(BASE_MEMORY_WEAK_PTR_H_) -// Do nothing if 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(BUILDING_CEF_SHARED) -// When building CEF include the Chromium header directly. -#include "base/memory/weak_ptr.h" -#else // !BUILDING_CEF_SHARED -// The following is substantially similar to the Chromium implementation. -// If the Chromium implementation diverges the below implementation should be -// updated to match. - -#include "include/base/cef_basictypes.h" -#include "include/base/cef_logging.h" -#include "include/base/cef_ref_counted.h" -#include "include/base/cef_template_util.h" -#include "include/base/cef_thread_checker.h" - -namespace base { - -template class SupportsWeakPtr; -template class WeakPtr; - -namespace cef_internal { -// These classes are part of the WeakPtr implementation. -// DO NOT USE THESE CLASSES DIRECTLY YOURSELF. - -class WeakReference { - public: - // Although Flag is bound to a specific thread, it may be deleted from another - // via base::WeakPtr::~WeakPtr(). - class Flag : public RefCountedThreadSafe { - public: - Flag(); - - void Invalidate(); - bool IsValid() const; - - private: - friend class base::RefCountedThreadSafe; - - ~Flag(); - - // The current Chromium implementation uses SequenceChecker instead of - // ThreadChecker to support SequencedWorkerPools. CEF does not yet expose - // the concept of SequencedWorkerPools. - ThreadChecker thread_checker_; - bool is_valid_; - }; - - WeakReference(); - explicit WeakReference(const Flag* flag); - ~WeakReference(); - - bool is_valid() const; - - private: - scoped_refptr flag_; -}; - -class WeakReferenceOwner { - public: - WeakReferenceOwner(); - ~WeakReferenceOwner(); - - WeakReference GetRef() const; - - bool HasRefs() const { - return flag_.get() && !flag_->HasOneRef(); - } - - void Invalidate(); - - private: - mutable scoped_refptr flag_; -}; - -// This class simplifies the implementation of WeakPtr's type conversion -// constructor by avoiding the need for a public accessor for ref_. A -// WeakPtr cannot access the private members of WeakPtr, so this -// base class gives us a way to access ref_ in a protected fashion. -class WeakPtrBase { - public: - WeakPtrBase(); - ~WeakPtrBase(); - - protected: - explicit WeakPtrBase(const WeakReference& ref); - - WeakReference ref_; -}; - -// This class provides a common implementation of common functions that would -// otherwise get instantiated separately for each distinct instantiation of -// SupportsWeakPtr<>. -class SupportsWeakPtrBase { - public: - // A safe static downcast of a WeakPtr to WeakPtr. This - // conversion will only compile if there is exists a Base which inherits - // from SupportsWeakPtr. See base::AsWeakPtr() below for a helper - // function that makes calling this easier. - template - static WeakPtr StaticAsWeakPtr(Derived* t) { - typedef - is_convertible convertible; - COMPILE_ASSERT(convertible::value, - AsWeakPtr_argument_inherits_from_SupportsWeakPtr); - return AsWeakPtrImpl(t, *t); - } - - private: - // This template function uses type inference to find a Base of Derived - // which is an instance of SupportsWeakPtr. We can then safely - // static_cast the Base* to a Derived*. - template - static WeakPtr AsWeakPtrImpl( - Derived* t, const SupportsWeakPtr&) { - WeakPtr ptr = t->Base::AsWeakPtr(); - return WeakPtr(ptr.ref_, static_cast(ptr.ptr_)); - } -}; - -} // namespace cef_internal - -template class WeakPtrFactory; - -// The WeakPtr class holds a weak reference to |T*|. -// -// This class is designed to be used like a normal pointer. You should always -// null-test an object of this class before using it or invoking a method that -// may result in the underlying object being destroyed. -// -// EXAMPLE: -// -// class Foo { ... }; -// WeakPtr foo; -// if (foo) -// foo->method(); -// -template -class WeakPtr : public cef_internal::WeakPtrBase { - public: - WeakPtr() : ptr_(NULL) { - } - - // Allow conversion from U to T provided U "is a" T. Note that this - // is separate from the (implicit) copy constructor. - template - WeakPtr(const WeakPtr& other) : WeakPtrBase(other), ptr_(other.ptr_) { - } - - T* get() const { return ref_.is_valid() ? ptr_ : NULL; } - - T& operator*() const { - DCHECK(get() != NULL); - return *get(); - } - T* operator->() const { - DCHECK(get() != NULL); - return get(); - } - - // Allow WeakPtr to be used in boolean expressions, but not - // implicitly convertible to a real bool (which is dangerous). - // - // Note that this trick is only safe when the == and != operators - // are declared explicitly, as otherwise "weak_ptr1 == weak_ptr2" - // will compile but do the wrong thing (i.e., convert to Testable - // and then do the comparison). - private: - typedef T* WeakPtr::*Testable; - - public: - operator Testable() const { return get() ? &WeakPtr::ptr_ : NULL; } - - void reset() { - ref_ = cef_internal::WeakReference(); - ptr_ = NULL; - } - - private: - // Explicitly declare comparison operators as required by the bool - // trick, but keep them private. - template bool operator==(WeakPtr const&) const; - template bool operator!=(WeakPtr const&) const; - - friend class cef_internal::SupportsWeakPtrBase; - template friend class WeakPtr; - friend class SupportsWeakPtr; - friend class WeakPtrFactory; - - WeakPtr(const cef_internal::WeakReference& ref, T* ptr) - : WeakPtrBase(ref), - ptr_(ptr) { - } - - // This pointer is only valid when ref_.is_valid() is true. Otherwise, its - // value is undefined (as opposed to NULL). - T* ptr_; -}; - -// A class may be composed of a WeakPtrFactory and thereby -// control how it exposes weak pointers to itself. This is helpful if you only -// need weak pointers within the implementation of a class. This class is also -// useful when working with primitive types. For example, you could have a -// WeakPtrFactory that is used to pass around a weak reference to a bool. -template -class WeakPtrFactory { - public: - explicit WeakPtrFactory(T* ptr) : ptr_(ptr) { - } - - ~WeakPtrFactory() { - ptr_ = NULL; - } - - WeakPtr GetWeakPtr() { - DCHECK(ptr_); - return WeakPtr(weak_reference_owner_.GetRef(), ptr_); - } - - // Call this method to invalidate all existing weak pointers. - void InvalidateWeakPtrs() { - DCHECK(ptr_); - weak_reference_owner_.Invalidate(); - } - - // Call this method to determine if any weak pointers exist. - bool HasWeakPtrs() const { - DCHECK(ptr_); - return weak_reference_owner_.HasRefs(); - } - - private: - cef_internal::WeakReferenceOwner weak_reference_owner_; - T* ptr_; - DISALLOW_IMPLICIT_CONSTRUCTORS(WeakPtrFactory); -}; - -// A class may extend from SupportsWeakPtr to let others take weak pointers to -// it. This avoids the class itself implementing boilerplate to dispense weak -// pointers. However, since SupportsWeakPtr's destructor won't invalidate -// weak pointers to the class until after the derived class' members have been -// destroyed, its use can lead to subtle use-after-destroy issues. -template -class SupportsWeakPtr : public cef_internal::SupportsWeakPtrBase { - public: - SupportsWeakPtr() {} - - WeakPtr AsWeakPtr() { - return WeakPtr(weak_reference_owner_.GetRef(), static_cast(this)); - } - - protected: - ~SupportsWeakPtr() {} - - private: - cef_internal::WeakReferenceOwner weak_reference_owner_; - DISALLOW_COPY_AND_ASSIGN(SupportsWeakPtr); -}; - -// Helper function that uses type deduction to safely return a WeakPtr -// when Derived doesn't directly extend SupportsWeakPtr, instead it -// extends a Base that extends SupportsWeakPtr. -// -// EXAMPLE: -// class Base : public base::SupportsWeakPtr {}; -// class Derived : public Base {}; -// -// Derived derived; -// base::WeakPtr ptr = base::AsWeakPtr(&derived); -// -// Note that the following doesn't work (invalid type conversion) since -// Derived::AsWeakPtr() is WeakPtr SupportsWeakPtr::AsWeakPtr(), -// and there's no way to safely cast WeakPtr to WeakPtr at -// the caller. -// -// base::WeakPtr ptr = derived.AsWeakPtr(); // Fails. - -template -WeakPtr AsWeakPtr(Derived* t) { - return cef_internal::SupportsWeakPtrBase::StaticAsWeakPtr(t); -} - -} // namespace base - -#endif // !BUILDING_CEF_SHARED - -#endif // CEF_INCLUDE_BASE_CEF_WEAK_PTR_H_ diff --git a/tool_kits/cef/cef_wrapper/include/base/internal/cef_atomicops_x86_msvc.h b/tool_kits/cef/cef_wrapper/include/base/internal/cef_atomicops_x86_msvc.h deleted file mode 100644 index 12bb0f46..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/internal/cef_atomicops_x86_msvc.h +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright (c) 2008 Google Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Do not include this header file directly. Use base/cef_atomicops.h -// instead. - -#ifndef CEF_INCLUDE_BASE_INTERNAL_CEF_ATOMICOPS_X86_MSVC_H_ -#define CEF_INCLUDE_BASE_INTERNAL_CEF_ATOMICOPS_X86_MSVC_H_ - -#include - -#include - -#include "include/base/cef_macros.h" - -#if defined(ARCH_CPU_64_BITS) -// windows.h #defines this (only on x64). This causes problems because the -// public API also uses MemoryBarrier at the public name for this fence. So, on -// X64, undef it, and call its documented -// (http://msdn.microsoft.com/en-us/library/windows/desktop/ms684208.aspx) -// implementation directly. -#undef MemoryBarrier -#endif - -namespace base { -namespace subtle { - -inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr, - Atomic32 old_value, - Atomic32 new_value) { - LONG result = _InterlockedCompareExchange( - reinterpret_cast(ptr), - static_cast(new_value), - static_cast(old_value)); - return static_cast(result); -} - -inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr, - Atomic32 new_value) { - LONG result = _InterlockedExchange( - reinterpret_cast(ptr), - static_cast(new_value)); - return static_cast(result); -} - -inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr, - Atomic32 increment) { - return _InterlockedExchangeAdd( - reinterpret_cast(ptr), - static_cast(increment)) + increment; -} - -inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr, - Atomic32 increment) { - return Barrier_AtomicIncrement(ptr, increment); -} - -#if !(defined(_MSC_VER) && _MSC_VER >= 1400) -#error "We require at least vs2005 for MemoryBarrier" -#endif -inline void MemoryBarrier() { -#if defined(ARCH_CPU_64_BITS) - // See #undef and note at the top of this file. - __faststorefence(); -#else - // We use MemoryBarrier from WinNT.h - ::MemoryBarrier(); -#endif -} - -inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr, - Atomic32 old_value, - Atomic32 new_value) { - return NoBarrier_CompareAndSwap(ptr, old_value, new_value); -} - -inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr, - Atomic32 old_value, - Atomic32 new_value) { - return NoBarrier_CompareAndSwap(ptr, old_value, new_value); -} - -inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) { - *ptr = value; -} - -inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) { - NoBarrier_AtomicExchange(ptr, value); - // acts as a barrier in this implementation -} - -inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) { - *ptr = value; // works w/o barrier for current Intel chips as of June 2005 - // See comments in Atomic64 version of Release_Store() below. -} - -inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) { - return *ptr; -} - -inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) { - Atomic32 value = *ptr; - return value; -} - -inline Atomic32 Release_Load(volatile const Atomic32* ptr) { - MemoryBarrier(); - return *ptr; -} - -#if defined(_WIN64) - -// 64-bit low-level operations on 64-bit platform. - -COMPILE_ASSERT(sizeof(Atomic64) == sizeof(PVOID), atomic_word_is_atomic); - -inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr, - Atomic64 old_value, - Atomic64 new_value) { - PVOID result = InterlockedCompareExchangePointer( - reinterpret_cast(ptr), - reinterpret_cast(new_value), reinterpret_cast(old_value)); - return reinterpret_cast(result); -} - -inline Atomic64 NoBarrier_AtomicExchange(volatile Atomic64* ptr, - Atomic64 new_value) { - PVOID result = InterlockedExchangePointer( - reinterpret_cast(ptr), - reinterpret_cast(new_value)); - return reinterpret_cast(result); -} - -inline Atomic64 Barrier_AtomicIncrement(volatile Atomic64* ptr, - Atomic64 increment) { - return InterlockedExchangeAdd64( - reinterpret_cast(ptr), - static_cast(increment)) + increment; -} - -inline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr, - Atomic64 increment) { - return Barrier_AtomicIncrement(ptr, increment); -} - -inline void NoBarrier_Store(volatile Atomic64* ptr, Atomic64 value) { - *ptr = value; -} - -inline void Acquire_Store(volatile Atomic64* ptr, Atomic64 value) { - NoBarrier_AtomicExchange(ptr, value); - // acts as a barrier in this implementation -} - -inline void Release_Store(volatile Atomic64* ptr, Atomic64 value) { - *ptr = value; // works w/o barrier for current Intel chips as of June 2005 - - // When new chips come out, check: - // IA-32 Intel Architecture Software Developer's Manual, Volume 3: - // System Programming Guide, Chatper 7: Multiple-processor management, - // Section 7.2, Memory Ordering. - // Last seen at: - // http://developer.intel.com/design/pentium4/manuals/index_new.htm -} - -inline Atomic64 NoBarrier_Load(volatile const Atomic64* ptr) { - return *ptr; -} - -inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) { - Atomic64 value = *ptr; - return value; -} - -inline Atomic64 Release_Load(volatile const Atomic64* ptr) { - MemoryBarrier(); - return *ptr; -} - -inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr, - Atomic64 old_value, - Atomic64 new_value) { - return NoBarrier_CompareAndSwap(ptr, old_value, new_value); -} - -inline Atomic64 Release_CompareAndSwap(volatile Atomic64* ptr, - Atomic64 old_value, - Atomic64 new_value) { - return NoBarrier_CompareAndSwap(ptr, old_value, new_value); -} - - -#endif // defined(_WIN64) - -} // namespace base::subtle -} // namespace base - -#endif // CEF_INCLUDE_BASE_INTERNAL_CEF_ATOMICOPS_X86_MSVC_H_ diff --git a/tool_kits/cef/cef_wrapper/include/base/internal/cef_bind_internal.h b/tool_kits/cef/cef_wrapper/include/base/internal/cef_bind_internal.h deleted file mode 100644 index a097978b..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/internal/cef_bind_internal.h +++ /dev/null @@ -1,2852 +0,0 @@ -// Copyright (c) 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. - -// Do not include this header file directly. Use base/cef_bind.h instead. - -#ifndef CEF_INCLUDE_BASE_INTERNAL_CEF_BIND_INTERNAL_H_ -#define CEF_INCLUDE_BASE_INTERNAL_CEF_BIND_INTERNAL_H_ - -#include "include/base/cef_bind_helpers.h" -#include "include/base/cef_build.h" -#include "include/base/cef_template_util.h" -#include "include/base/cef_weak_ptr.h" -#include "include/base/internal/cef_callback_internal.h" -#include "include/base/internal/cef_raw_scoped_refptr_mismatch_checker.h" - -#if defined(OS_WIN) -#include "include/base/internal/cef_bind_internal_win.h" -#endif - -namespace base { -namespace cef_internal { - -// See base/callback.h for user documentation. -// -// -// CONCEPTS: -// Runnable -- A type (really a type class) that has a single Run() method -// and a RunType typedef that corresponds to the type of Run(). -// A Runnable can declare that it should treated like a method -// call by including a typedef named IsMethod. The value of -// this typedef is NOT inspected, only the existence. When a -// Runnable declares itself a method, Bind() will enforce special -// refcounting + WeakPtr handling semantics for the first -// parameter which is expected to be an object. -// Functor -- A copyable type representing something that should be called. -// All function pointers, Callback<>, and Runnables are functors -// even if the invocation syntax differs. -// RunType -- A function type (as opposed to function _pointer_ type) for -// a Run() function. Usually just a convenience typedef. -// (Bound)ArgsType -- A function type that is being (ab)used to store the -// types of set of arguments. The "return" type is always -// void here. We use this hack so that we do not need -// a new type name for each arity of type. (eg., -// BindState1, BindState2). This makes forward -// declarations and friending much much easier. -// -// Types: -// RunnableAdapter<> -- Wraps the various "function" pointer types into an -// object that adheres to the Runnable interface. -// There are |3*ARITY| RunnableAdapter types. -// FunctionTraits<> -- Type traits that unwrap a function signature into a -// a set of easier to use typedefs. Used mainly for -// compile time asserts. -// There are |ARITY| FunctionTraits types. -// ForceVoidReturn<> -- Helper class for translating function signatures to -// equivalent forms with a "void" return type. -// There are |ARITY| ForceVoidReturn types. -// FunctorTraits<> -- Type traits used determine the correct RunType and -// RunnableType for a Functor. This is where function -// signature adapters are applied. -// There are |ARITY| ForceVoidReturn types. -// MakeRunnable<> -- Takes a Functor and returns an object in the Runnable -// type class that represents the underlying Functor. -// There are |O(1)| MakeRunnable types. -// InvokeHelper<> -- Take a Runnable + arguments and actully invokes it. -// Handle the differing syntaxes needed for WeakPtr<> support, -// and for ignoring return values. This is separate from -// Invoker to avoid creating multiple version of Invoker<> -// which grows at O(n^2) with the arity. -// There are |k*ARITY| InvokeHelper types. -// Invoker<> -- Unwraps the curried parameters and executes the Runnable. -// There are |(ARITY^2 + ARITY)/2| Invoketypes. -// BindState<> -- Stores the curried parameters, and is the main entry point -// into the Bind() system, doing most of the type resolution. -// There are ARITY BindState types. - -// RunnableAdapter<> -// -// The RunnableAdapter<> templates provide a uniform interface for invoking -// a function pointer, method pointer, or const method pointer. The adapter -// exposes a Run() method with an appropriate signature. Using this wrapper -// allows for writing code that supports all three pointer types without -// undue repetition. Without it, a lot of code would need to be repeated 3 -// times. -// -// For method pointers and const method pointers the first argument to Run() -// is considered to be the received of the method. This is similar to STL's -// mem_fun(). -// -// This class also exposes a RunType typedef that is the function type of the -// Run() function. -// -// If and only if the wrapper contains a method or const method pointer, an -// IsMethod typedef is exposed. The existence of this typedef (NOT the value) -// marks that the wrapper should be considered a method wrapper. - -template -class RunnableAdapter; - -// Function: Arity 0. -template -class RunnableAdapter { - public: - typedef R (RunType)(); - - explicit RunnableAdapter(R(*function)()) - : function_(function) { - } - - R Run() { - return function_(); - } - - private: - R (*function_)(); -}; - -// Method: Arity 0. -template -class RunnableAdapter { - public: - typedef R (RunType)(T*); - typedef true_type IsMethod; - - explicit RunnableAdapter(R(T::*method)()) - : method_(method) { - } - - R Run(T* object) { - return (object->*method_)(); - } - - private: - R (T::*method_)(); -}; - -// Const Method: Arity 0. -template -class RunnableAdapter { - public: - typedef R (RunType)(const T*); - typedef true_type IsMethod; - - explicit RunnableAdapter(R(T::*method)() const) - : method_(method) { - } - - R Run(const T* object) { - return (object->*method_)(); - } - - private: - R (T::*method_)() const; -}; - -// Function: Arity 1. -template -class RunnableAdapter { - public: - typedef R (RunType)(A1); - - explicit RunnableAdapter(R(*function)(A1)) - : function_(function) { - } - - R Run(typename CallbackParamTraits::ForwardType a1) { - return function_(CallbackForward(a1)); - } - - private: - R (*function_)(A1); -}; - -// Method: Arity 1. -template -class RunnableAdapter { - public: - typedef R (RunType)(T*, A1); - typedef true_type IsMethod; - - explicit RunnableAdapter(R(T::*method)(A1)) - : method_(method) { - } - - R Run(T* object, typename CallbackParamTraits::ForwardType a1) { - return (object->*method_)(CallbackForward(a1)); - } - - private: - R (T::*method_)(A1); -}; - -// Const Method: Arity 1. -template -class RunnableAdapter { - public: - typedef R (RunType)(const T*, A1); - typedef true_type IsMethod; - - explicit RunnableAdapter(R(T::*method)(A1) const) - : method_(method) { - } - - R Run(const T* object, typename CallbackParamTraits::ForwardType a1) { - return (object->*method_)(CallbackForward(a1)); - } - - private: - R (T::*method_)(A1) const; -}; - -// Function: Arity 2. -template -class RunnableAdapter { - public: - typedef R (RunType)(A1, A2); - - explicit RunnableAdapter(R(*function)(A1, A2)) - : function_(function) { - } - - R Run(typename CallbackParamTraits::ForwardType a1, - typename CallbackParamTraits::ForwardType a2) { - return function_(CallbackForward(a1), CallbackForward(a2)); - } - - private: - R (*function_)(A1, A2); -}; - -// Method: Arity 2. -template -class RunnableAdapter { - public: - typedef R (RunType)(T*, A1, A2); - typedef true_type IsMethod; - - explicit RunnableAdapter(R(T::*method)(A1, A2)) - : method_(method) { - } - - R Run(T* object, typename CallbackParamTraits::ForwardType a1, - typename CallbackParamTraits::ForwardType a2) { - return (object->*method_)(CallbackForward(a1), CallbackForward(a2)); - } - - private: - R (T::*method_)(A1, A2); -}; - -// Const Method: Arity 2. -template -class RunnableAdapter { - public: - typedef R (RunType)(const T*, A1, A2); - typedef true_type IsMethod; - - explicit RunnableAdapter(R(T::*method)(A1, A2) const) - : method_(method) { - } - - R Run(const T* object, typename CallbackParamTraits::ForwardType a1, - typename CallbackParamTraits::ForwardType a2) { - return (object->*method_)(CallbackForward(a1), CallbackForward(a2)); - } - - private: - R (T::*method_)(A1, A2) const; -}; - -// Function: Arity 3. -template -class RunnableAdapter { - public: - typedef R (RunType)(A1, A2, A3); - - explicit RunnableAdapter(R(*function)(A1, A2, A3)) - : function_(function) { - } - - R Run(typename CallbackParamTraits::ForwardType a1, - typename CallbackParamTraits::ForwardType a2, - typename CallbackParamTraits::ForwardType a3) { - return function_(CallbackForward(a1), CallbackForward(a2), - CallbackForward(a3)); - } - - private: - R (*function_)(A1, A2, A3); -}; - -// Method: Arity 3. -template -class RunnableAdapter { - public: - typedef R (RunType)(T*, A1, A2, A3); - typedef true_type IsMethod; - - explicit RunnableAdapter(R(T::*method)(A1, A2, A3)) - : method_(method) { - } - - R Run(T* object, typename CallbackParamTraits::ForwardType a1, - typename CallbackParamTraits::ForwardType a2, - typename CallbackParamTraits::ForwardType a3) { - return (object->*method_)(CallbackForward(a1), CallbackForward(a2), - CallbackForward(a3)); - } - - private: - R (T::*method_)(A1, A2, A3); -}; - -// Const Method: Arity 3. -template -class RunnableAdapter { - public: - typedef R (RunType)(const T*, A1, A2, A3); - typedef true_type IsMethod; - - explicit RunnableAdapter(R(T::*method)(A1, A2, A3) const) - : method_(method) { - } - - R Run(const T* object, typename CallbackParamTraits::ForwardType a1, - typename CallbackParamTraits::ForwardType a2, - typename CallbackParamTraits::ForwardType a3) { - return (object->*method_)(CallbackForward(a1), CallbackForward(a2), - CallbackForward(a3)); - } - - private: - R (T::*method_)(A1, A2, A3) const; -}; - -// Function: Arity 4. -template -class RunnableAdapter { - public: - typedef R (RunType)(A1, A2, A3, A4); - - explicit RunnableAdapter(R(*function)(A1, A2, A3, A4)) - : function_(function) { - } - - R Run(typename CallbackParamTraits::ForwardType a1, - typename CallbackParamTraits::ForwardType a2, - typename CallbackParamTraits::ForwardType a3, - typename CallbackParamTraits::ForwardType a4) { - return function_(CallbackForward(a1), CallbackForward(a2), - CallbackForward(a3), CallbackForward(a4)); - } - - private: - R (*function_)(A1, A2, A3, A4); -}; - -// Method: Arity 4. -template -class RunnableAdapter { - public: - typedef R (RunType)(T*, A1, A2, A3, A4); - typedef true_type IsMethod; - - explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4)) - : method_(method) { - } - - R Run(T* object, typename CallbackParamTraits::ForwardType a1, - typename CallbackParamTraits::ForwardType a2, - typename CallbackParamTraits::ForwardType a3, - typename CallbackParamTraits::ForwardType a4) { - return (object->*method_)(CallbackForward(a1), CallbackForward(a2), - CallbackForward(a3), CallbackForward(a4)); - } - - private: - R (T::*method_)(A1, A2, A3, A4); -}; - -// Const Method: Arity 4. -template -class RunnableAdapter { - public: - typedef R (RunType)(const T*, A1, A2, A3, A4); - typedef true_type IsMethod; - - explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4) const) - : method_(method) { - } - - R Run(const T* object, typename CallbackParamTraits::ForwardType a1, - typename CallbackParamTraits::ForwardType a2, - typename CallbackParamTraits::ForwardType a3, - typename CallbackParamTraits::ForwardType a4) { - return (object->*method_)(CallbackForward(a1), CallbackForward(a2), - CallbackForward(a3), CallbackForward(a4)); - } - - private: - R (T::*method_)(A1, A2, A3, A4) const; -}; - -// Function: Arity 5. -template -class RunnableAdapter { - public: - typedef R (RunType)(A1, A2, A3, A4, A5); - - explicit RunnableAdapter(R(*function)(A1, A2, A3, A4, A5)) - : function_(function) { - } - - R Run(typename CallbackParamTraits::ForwardType a1, - typename CallbackParamTraits::ForwardType a2, - typename CallbackParamTraits::ForwardType a3, - typename CallbackParamTraits::ForwardType a4, - typename CallbackParamTraits::ForwardType a5) { - return function_(CallbackForward(a1), CallbackForward(a2), - CallbackForward(a3), CallbackForward(a4), CallbackForward(a5)); - } - - private: - R (*function_)(A1, A2, A3, A4, A5); -}; - -// Method: Arity 5. -template -class RunnableAdapter { - public: - typedef R (RunType)(T*, A1, A2, A3, A4, A5); - typedef true_type IsMethod; - - explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5)) - : method_(method) { - } - - R Run(T* object, typename CallbackParamTraits::ForwardType a1, - typename CallbackParamTraits::ForwardType a2, - typename CallbackParamTraits::ForwardType a3, - typename CallbackParamTraits::ForwardType a4, - typename CallbackParamTraits::ForwardType a5) { - return (object->*method_)(CallbackForward(a1), CallbackForward(a2), - CallbackForward(a3), CallbackForward(a4), CallbackForward(a5)); - } - - private: - R (T::*method_)(A1, A2, A3, A4, A5); -}; - -// Const Method: Arity 5. -template -class RunnableAdapter { - public: - typedef R (RunType)(const T*, A1, A2, A3, A4, A5); - typedef true_type IsMethod; - - explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5) const) - : method_(method) { - } - - R Run(const T* object, typename CallbackParamTraits::ForwardType a1, - typename CallbackParamTraits::ForwardType a2, - typename CallbackParamTraits::ForwardType a3, - typename CallbackParamTraits::ForwardType a4, - typename CallbackParamTraits::ForwardType a5) { - return (object->*method_)(CallbackForward(a1), CallbackForward(a2), - CallbackForward(a3), CallbackForward(a4), CallbackForward(a5)); - } - - private: - R (T::*method_)(A1, A2, A3, A4, A5) const; -}; - -// Function: Arity 6. -template -class RunnableAdapter { - public: - typedef R (RunType)(A1, A2, A3, A4, A5, A6); - - explicit RunnableAdapter(R(*function)(A1, A2, A3, A4, A5, A6)) - : function_(function) { - } - - R Run(typename CallbackParamTraits::ForwardType a1, - typename CallbackParamTraits::ForwardType a2, - typename CallbackParamTraits::ForwardType a3, - typename CallbackParamTraits::ForwardType a4, - typename CallbackParamTraits::ForwardType a5, - typename CallbackParamTraits::ForwardType a6) { - return function_(CallbackForward(a1), CallbackForward(a2), - CallbackForward(a3), CallbackForward(a4), CallbackForward(a5), - CallbackForward(a6)); - } - - private: - R (*function_)(A1, A2, A3, A4, A5, A6); -}; - -// Method: Arity 6. -template -class RunnableAdapter { - public: - typedef R (RunType)(T*, A1, A2, A3, A4, A5, A6); - typedef true_type IsMethod; - - explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5, A6)) - : method_(method) { - } - - R Run(T* object, typename CallbackParamTraits::ForwardType a1, - typename CallbackParamTraits::ForwardType a2, - typename CallbackParamTraits::ForwardType a3, - typename CallbackParamTraits::ForwardType a4, - typename CallbackParamTraits::ForwardType a5, - typename CallbackParamTraits::ForwardType a6) { - return (object->*method_)(CallbackForward(a1), CallbackForward(a2), - CallbackForward(a3), CallbackForward(a4), CallbackForward(a5), - CallbackForward(a6)); - } - - private: - R (T::*method_)(A1, A2, A3, A4, A5, A6); -}; - -// Const Method: Arity 6. -template -class RunnableAdapter { - public: - typedef R (RunType)(const T*, A1, A2, A3, A4, A5, A6); - typedef true_type IsMethod; - - explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5, A6) const) - : method_(method) { - } - - R Run(const T* object, typename CallbackParamTraits::ForwardType a1, - typename CallbackParamTraits::ForwardType a2, - typename CallbackParamTraits::ForwardType a3, - typename CallbackParamTraits::ForwardType a4, - typename CallbackParamTraits::ForwardType a5, - typename CallbackParamTraits::ForwardType a6) { - return (object->*method_)(CallbackForward(a1), CallbackForward(a2), - CallbackForward(a3), CallbackForward(a4), CallbackForward(a5), - CallbackForward(a6)); - } - - private: - R (T::*method_)(A1, A2, A3, A4, A5, A6) const; -}; - -// Function: Arity 7. -template -class RunnableAdapter { - public: - typedef R (RunType)(A1, A2, A3, A4, A5, A6, A7); - - explicit RunnableAdapter(R(*function)(A1, A2, A3, A4, A5, A6, A7)) - : function_(function) { - } - - R Run(typename CallbackParamTraits::ForwardType a1, - typename CallbackParamTraits::ForwardType a2, - typename CallbackParamTraits::ForwardType a3, - typename CallbackParamTraits::ForwardType a4, - typename CallbackParamTraits::ForwardType a5, - typename CallbackParamTraits::ForwardType a6, - typename CallbackParamTraits::ForwardType a7) { - return function_(CallbackForward(a1), CallbackForward(a2), - CallbackForward(a3), CallbackForward(a4), CallbackForward(a5), - CallbackForward(a6), CallbackForward(a7)); - } - - private: - R (*function_)(A1, A2, A3, A4, A5, A6, A7); -}; - -// Method: Arity 7. -template -class RunnableAdapter { - public: - typedef R (RunType)(T*, A1, A2, A3, A4, A5, A6, A7); - typedef true_type IsMethod; - - explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5, A6, A7)) - : method_(method) { - } - - R Run(T* object, typename CallbackParamTraits::ForwardType a1, - typename CallbackParamTraits::ForwardType a2, - typename CallbackParamTraits::ForwardType a3, - typename CallbackParamTraits::ForwardType a4, - typename CallbackParamTraits::ForwardType a5, - typename CallbackParamTraits::ForwardType a6, - typename CallbackParamTraits::ForwardType a7) { - return (object->*method_)(CallbackForward(a1), CallbackForward(a2), - CallbackForward(a3), CallbackForward(a4), CallbackForward(a5), - CallbackForward(a6), CallbackForward(a7)); - } - - private: - R (T::*method_)(A1, A2, A3, A4, A5, A6, A7); -}; - -// Const Method: Arity 7. -template -class RunnableAdapter { - public: - typedef R (RunType)(const T*, A1, A2, A3, A4, A5, A6, A7); - typedef true_type IsMethod; - - explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5, A6, A7) const) - : method_(method) { - } - - R Run(const T* object, typename CallbackParamTraits::ForwardType a1, - typename CallbackParamTraits::ForwardType a2, - typename CallbackParamTraits::ForwardType a3, - typename CallbackParamTraits::ForwardType a4, - typename CallbackParamTraits::ForwardType a5, - typename CallbackParamTraits::ForwardType a6, - typename CallbackParamTraits::ForwardType a7) { - return (object->*method_)(CallbackForward(a1), CallbackForward(a2), - CallbackForward(a3), CallbackForward(a4), CallbackForward(a5), - CallbackForward(a6), CallbackForward(a7)); - } - - private: - R (T::*method_)(A1, A2, A3, A4, A5, A6, A7) const; -}; - - -// FunctionTraits<> -// -// Breaks a function signature apart into typedefs for easier introspection. -template -struct FunctionTraits; - -template -struct FunctionTraits { - typedef R ReturnType; -}; - -template -struct FunctionTraits { - typedef R ReturnType; - typedef A1 A1Type; -}; - -template -struct FunctionTraits { - typedef R ReturnType; - typedef A1 A1Type; - typedef A2 A2Type; -}; - -template -struct FunctionTraits { - typedef R ReturnType; - typedef A1 A1Type; - typedef A2 A2Type; - typedef A3 A3Type; -}; - -template -struct FunctionTraits { - typedef R ReturnType; - typedef A1 A1Type; - typedef A2 A2Type; - typedef A3 A3Type; - typedef A4 A4Type; -}; - -template -struct FunctionTraits { - typedef R ReturnType; - typedef A1 A1Type; - typedef A2 A2Type; - typedef A3 A3Type; - typedef A4 A4Type; - typedef A5 A5Type; -}; - -template -struct FunctionTraits { - typedef R ReturnType; - typedef A1 A1Type; - typedef A2 A2Type; - typedef A3 A3Type; - typedef A4 A4Type; - typedef A5 A5Type; - typedef A6 A6Type; -}; - -template -struct FunctionTraits { - typedef R ReturnType; - typedef A1 A1Type; - typedef A2 A2Type; - typedef A3 A3Type; - typedef A4 A4Type; - typedef A5 A5Type; - typedef A6 A6Type; - typedef A7 A7Type; -}; - - -// ForceVoidReturn<> -// -// Set of templates that support forcing the function return type to void. -template -struct ForceVoidReturn; - -template -struct ForceVoidReturn { - typedef void(RunType)(); -}; - -template -struct ForceVoidReturn { - typedef void(RunType)(A1); -}; - -template -struct ForceVoidReturn { - typedef void(RunType)(A1, A2); -}; - -template -struct ForceVoidReturn { - typedef void(RunType)(A1, A2, A3); -}; - -template -struct ForceVoidReturn { - typedef void(RunType)(A1, A2, A3, A4); -}; - -template -struct ForceVoidReturn { - typedef void(RunType)(A1, A2, A3, A4, A5); -}; - -template -struct ForceVoidReturn { - typedef void(RunType)(A1, A2, A3, A4, A5, A6); -}; - -template -struct ForceVoidReturn { - typedef void(RunType)(A1, A2, A3, A4, A5, A6, A7); -}; - - -// FunctorTraits<> -// -// See description at top of file. -template -struct FunctorTraits { - typedef RunnableAdapter RunnableType; - typedef typename RunnableType::RunType RunType; -}; - -template -struct FunctorTraits > { - typedef typename FunctorTraits::RunnableType RunnableType; - typedef typename ForceVoidReturn< - typename RunnableType::RunType>::RunType RunType; -}; - -template -struct FunctorTraits > { - typedef Callback RunnableType; - typedef typename Callback::RunType RunType; -}; - - -// MakeRunnable<> -// -// Converts a passed in functor to a RunnableType using type inference. - -template -typename FunctorTraits::RunnableType MakeRunnable(const T& t) { - return RunnableAdapter(t); -} - -template -typename FunctorTraits::RunnableType -MakeRunnable(const IgnoreResultHelper& t) { - return MakeRunnable(t.functor_); -} - -template -const typename FunctorTraits >::RunnableType& -MakeRunnable(const Callback& t) { - DCHECK(!t.is_null()); - return t; -} - - -// InvokeHelper<> -// -// There are 3 logical InvokeHelper<> specializations: normal, void-return, -// WeakCalls. -// -// The normal type just calls the underlying runnable. -// -// We need a InvokeHelper to handle void return types in order to support -// IgnoreResult(). Normally, if the Runnable's RunType had a void return, -// the template system would just accept "return functor.Run()" ignoring -// the fact that a void function is being used with return. This piece of -// sugar breaks though when the Runnable's RunType is not void. Thus, we -// need a partial specialization to change the syntax to drop the "return" -// from the invocation call. -// -// WeakCalls similarly need special syntax that is applied to the first -// argument to check if they should no-op themselves. -template -struct InvokeHelper; - -template -struct InvokeHelper { - static ReturnType MakeItSo(Runnable runnable) { - return runnable.Run(); - } -}; - -template -struct InvokeHelper { - static void MakeItSo(Runnable runnable) { - runnable.Run(); - } -}; - -template -struct InvokeHelper { - static ReturnType MakeItSo(Runnable runnable, A1 a1) { - return runnable.Run(CallbackForward(a1)); - } -}; - -template -struct InvokeHelper { - static void MakeItSo(Runnable runnable, A1 a1) { - runnable.Run(CallbackForward(a1)); - } -}; - -template -struct InvokeHelper { - static void MakeItSo(Runnable runnable, BoundWeakPtr weak_ptr) { - if (!weak_ptr.get()) { - return; - } - runnable.Run(weak_ptr.get()); - } -}; - -template -struct InvokeHelper { - static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2) { - return runnable.Run(CallbackForward(a1), CallbackForward(a2)); - } -}; - -template -struct InvokeHelper { - static void MakeItSo(Runnable runnable, A1 a1, A2 a2) { - runnable.Run(CallbackForward(a1), CallbackForward(a2)); - } -}; - -template -struct InvokeHelper { - static void MakeItSo(Runnable runnable, BoundWeakPtr weak_ptr, A2 a2) { - if (!weak_ptr.get()) { - return; - } - runnable.Run(weak_ptr.get(), CallbackForward(a2)); - } -}; - -template -struct InvokeHelper { - static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3) { - return runnable.Run(CallbackForward(a1), CallbackForward(a2), - CallbackForward(a3)); - } -}; - -template -struct InvokeHelper { - static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3) { - runnable.Run(CallbackForward(a1), CallbackForward(a2), CallbackForward(a3)); - } -}; - -template -struct InvokeHelper { - static void MakeItSo(Runnable runnable, BoundWeakPtr weak_ptr, A2 a2, A3 a3) { - if (!weak_ptr.get()) { - return; - } - runnable.Run(weak_ptr.get(), CallbackForward(a2), CallbackForward(a3)); - } -}; - -template -struct InvokeHelper { - static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4) { - return runnable.Run(CallbackForward(a1), CallbackForward(a2), - CallbackForward(a3), CallbackForward(a4)); - } -}; - -template -struct InvokeHelper { - static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4) { - runnable.Run(CallbackForward(a1), CallbackForward(a2), CallbackForward(a3), - CallbackForward(a4)); - } -}; - -template -struct InvokeHelper { - static void MakeItSo(Runnable runnable, BoundWeakPtr weak_ptr, A2 a2, A3 a3, - A4 a4) { - if (!weak_ptr.get()) { - return; - } - runnable.Run(weak_ptr.get(), CallbackForward(a2), CallbackForward(a3), - CallbackForward(a4)); - } -}; - -template -struct InvokeHelper { - static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, - A5 a5) { - return runnable.Run(CallbackForward(a1), CallbackForward(a2), - CallbackForward(a3), CallbackForward(a4), CallbackForward(a5)); - } -}; - -template -struct InvokeHelper { - static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) { - runnable.Run(CallbackForward(a1), CallbackForward(a2), CallbackForward(a3), - CallbackForward(a4), CallbackForward(a5)); - } -}; - -template -struct InvokeHelper { - static void MakeItSo(Runnable runnable, BoundWeakPtr weak_ptr, A2 a2, A3 a3, - A4 a4, A5 a5) { - if (!weak_ptr.get()) { - return; - } - runnable.Run(weak_ptr.get(), CallbackForward(a2), CallbackForward(a3), - CallbackForward(a4), CallbackForward(a5)); - } -}; - -template -struct InvokeHelper { - static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, - A5 a5, A6 a6) { - return runnable.Run(CallbackForward(a1), CallbackForward(a2), - CallbackForward(a3), CallbackForward(a4), CallbackForward(a5), - CallbackForward(a6)); - } -}; - -template -struct InvokeHelper { - static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, - A6 a6) { - runnable.Run(CallbackForward(a1), CallbackForward(a2), CallbackForward(a3), - CallbackForward(a4), CallbackForward(a5), CallbackForward(a6)); - } -}; - -template -struct InvokeHelper { - static void MakeItSo(Runnable runnable, BoundWeakPtr weak_ptr, A2 a2, A3 a3, - A4 a4, A5 a5, A6 a6) { - if (!weak_ptr.get()) { - return; - } - runnable.Run(weak_ptr.get(), CallbackForward(a2), CallbackForward(a3), - CallbackForward(a4), CallbackForward(a5), CallbackForward(a6)); - } -}; - -template -struct InvokeHelper { - static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, - A5 a5, A6 a6, A7 a7) { - return runnable.Run(CallbackForward(a1), CallbackForward(a2), - CallbackForward(a3), CallbackForward(a4), CallbackForward(a5), - CallbackForward(a6), CallbackForward(a7)); - } -}; - -template -struct InvokeHelper { - static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, - A6 a6, A7 a7) { - runnable.Run(CallbackForward(a1), CallbackForward(a2), CallbackForward(a3), - CallbackForward(a4), CallbackForward(a5), CallbackForward(a6), - CallbackForward(a7)); - } -}; - -template -struct InvokeHelper { - static void MakeItSo(Runnable runnable, BoundWeakPtr weak_ptr, A2 a2, A3 a3, - A4 a4, A5 a5, A6 a6, A7 a7) { - if (!weak_ptr.get()) { - return; - } - runnable.Run(weak_ptr.get(), CallbackForward(a2), CallbackForward(a3), - CallbackForward(a4), CallbackForward(a5), CallbackForward(a6), - CallbackForward(a7)); - } -}; - -#if !defined(_MSC_VER) - -template -struct InvokeHelper { - // WeakCalls are only supported for functions with a void return type. - // Otherwise, the function result would be undefined if the the WeakPtr<> - // is invalidated. - COMPILE_ASSERT(is_void::value, - weak_ptrs_can_only_bind_to_methods_without_return_values); -}; - -#endif - -// Invoker<> -// -// See description at the top of the file. -template -struct Invoker; - -// Arity 0 -> 0. -template -struct Invoker<0, StorageType, R()> { - typedef R(RunType)(BindStateBase*); - - typedef R(UnboundRunType)(); - - static R Run(BindStateBase* base) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - - return InvokeHelper - ::MakeItSo(storage->runnable_); - } -}; - -// Arity 1 -> 1. -template -struct Invoker<0, StorageType, R(X1)> { - typedef R(RunType)(BindStateBase*, - typename CallbackParamTraits::ForwardType); - - typedef R(UnboundRunType)(X1); - - static R Run(BindStateBase* base, - typename CallbackParamTraits::ForwardType x1) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - - return InvokeHelper::ForwardType x1)> - ::MakeItSo(storage->runnable_, CallbackForward(x1)); - } -}; - -// Arity 1 -> 0. -template -struct Invoker<1, StorageType, R(X1)> { - typedef R(RunType)(BindStateBase*); - - typedef R(UnboundRunType)(); - - static R Run(BindStateBase* base) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; - - typename Bound1UnwrapTraits::ForwardType x1 = - Bound1UnwrapTraits::Unwrap(storage->p1_); - return InvokeHelper - ::MakeItSo(storage->runnable_, CallbackForward(x1)); - } -}; - -// Arity 2 -> 2. -template -struct Invoker<0, StorageType, R(X1, X2)> { - typedef R(RunType)(BindStateBase*, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType); - - typedef R(UnboundRunType)(X1, X2); - - static R Run(BindStateBase* base, - typename CallbackParamTraits::ForwardType x1, - typename CallbackParamTraits::ForwardType x2) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - - return InvokeHelper::ForwardType x1, - typename CallbackParamTraits::ForwardType x2)> - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2)); - } -}; - -// Arity 2 -> 1. -template -struct Invoker<1, StorageType, R(X1, X2)> { - typedef R(RunType)(BindStateBase*, - typename CallbackParamTraits::ForwardType); - - typedef R(UnboundRunType)(X2); - - static R Run(BindStateBase* base, - typename CallbackParamTraits::ForwardType x2) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; - - typename Bound1UnwrapTraits::ForwardType x1 = - Bound1UnwrapTraits::Unwrap(storage->p1_); - return InvokeHelper::ForwardType x2)> - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2)); - } -}; - -// Arity 2 -> 0. -template -struct Invoker<2, StorageType, R(X1, X2)> { - typedef R(RunType)(BindStateBase*); - - typedef R(UnboundRunType)(); - - static R Run(BindStateBase* base) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; - typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits; - - typename Bound1UnwrapTraits::ForwardType x1 = - Bound1UnwrapTraits::Unwrap(storage->p1_); - typename Bound2UnwrapTraits::ForwardType x2 = - Bound2UnwrapTraits::Unwrap(storage->p2_); - return InvokeHelper - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2)); - } -}; - -// Arity 3 -> 3. -template -struct Invoker<0, StorageType, R(X1, X2, X3)> { - typedef R(RunType)(BindStateBase*, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType); - - typedef R(UnboundRunType)(X1, X2, X3); - - static R Run(BindStateBase* base, - typename CallbackParamTraits::ForwardType x1, - typename CallbackParamTraits::ForwardType x2, - typename CallbackParamTraits::ForwardType x3) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - - return InvokeHelper::ForwardType x1, - typename CallbackParamTraits::ForwardType x2, - typename CallbackParamTraits::ForwardType x3)> - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2), CallbackForward(x3)); - } -}; - -// Arity 3 -> 2. -template -struct Invoker<1, StorageType, R(X1, X2, X3)> { - typedef R(RunType)(BindStateBase*, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType); - - typedef R(UnboundRunType)(X2, X3); - - static R Run(BindStateBase* base, - typename CallbackParamTraits::ForwardType x2, - typename CallbackParamTraits::ForwardType x3) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; - - typename Bound1UnwrapTraits::ForwardType x1 = - Bound1UnwrapTraits::Unwrap(storage->p1_); - return InvokeHelper::ForwardType x2, - typename CallbackParamTraits::ForwardType x3)> - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2), CallbackForward(x3)); - } -}; - -// Arity 3 -> 1. -template -struct Invoker<2, StorageType, R(X1, X2, X3)> { - typedef R(RunType)(BindStateBase*, - typename CallbackParamTraits::ForwardType); - - typedef R(UnboundRunType)(X3); - - static R Run(BindStateBase* base, - typename CallbackParamTraits::ForwardType x3) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; - typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits; - - typename Bound1UnwrapTraits::ForwardType x1 = - Bound1UnwrapTraits::Unwrap(storage->p1_); - typename Bound2UnwrapTraits::ForwardType x2 = - Bound2UnwrapTraits::Unwrap(storage->p2_); - return InvokeHelper::ForwardType x3)> - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2), CallbackForward(x3)); - } -}; - -// Arity 3 -> 0. -template -struct Invoker<3, StorageType, R(X1, X2, X3)> { - typedef R(RunType)(BindStateBase*); - - typedef R(UnboundRunType)(); - - static R Run(BindStateBase* base) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; - typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits; - typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits; - - typename Bound1UnwrapTraits::ForwardType x1 = - Bound1UnwrapTraits::Unwrap(storage->p1_); - typename Bound2UnwrapTraits::ForwardType x2 = - Bound2UnwrapTraits::Unwrap(storage->p2_); - typename Bound3UnwrapTraits::ForwardType x3 = - Bound3UnwrapTraits::Unwrap(storage->p3_); - return InvokeHelper - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2), CallbackForward(x3)); - } -}; - -// Arity 4 -> 4. -template -struct Invoker<0, StorageType, R(X1, X2, X3, X4)> { - typedef R(RunType)(BindStateBase*, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType); - - typedef R(UnboundRunType)(X1, X2, X3, X4); - - static R Run(BindStateBase* base, - typename CallbackParamTraits::ForwardType x1, - typename CallbackParamTraits::ForwardType x2, - typename CallbackParamTraits::ForwardType x3, - typename CallbackParamTraits::ForwardType x4) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - - return InvokeHelper::ForwardType x1, - typename CallbackParamTraits::ForwardType x2, - typename CallbackParamTraits::ForwardType x3, - typename CallbackParamTraits::ForwardType x4)> - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2), CallbackForward(x3), - CallbackForward(x4)); - } -}; - -// Arity 4 -> 3. -template -struct Invoker<1, StorageType, R(X1, X2, X3, X4)> { - typedef R(RunType)(BindStateBase*, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType); - - typedef R(UnboundRunType)(X2, X3, X4); - - static R Run(BindStateBase* base, - typename CallbackParamTraits::ForwardType x2, - typename CallbackParamTraits::ForwardType x3, - typename CallbackParamTraits::ForwardType x4) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; - - typename Bound1UnwrapTraits::ForwardType x1 = - Bound1UnwrapTraits::Unwrap(storage->p1_); - return InvokeHelper::ForwardType x2, - typename CallbackParamTraits::ForwardType x3, - typename CallbackParamTraits::ForwardType x4)> - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2), CallbackForward(x3), - CallbackForward(x4)); - } -}; - -// Arity 4 -> 2. -template -struct Invoker<2, StorageType, R(X1, X2, X3, X4)> { - typedef R(RunType)(BindStateBase*, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType); - - typedef R(UnboundRunType)(X3, X4); - - static R Run(BindStateBase* base, - typename CallbackParamTraits::ForwardType x3, - typename CallbackParamTraits::ForwardType x4) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; - typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits; - - typename Bound1UnwrapTraits::ForwardType x1 = - Bound1UnwrapTraits::Unwrap(storage->p1_); - typename Bound2UnwrapTraits::ForwardType x2 = - Bound2UnwrapTraits::Unwrap(storage->p2_); - return InvokeHelper::ForwardType x3, - typename CallbackParamTraits::ForwardType x4)> - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2), CallbackForward(x3), - CallbackForward(x4)); - } -}; - -// Arity 4 -> 1. -template -struct Invoker<3, StorageType, R(X1, X2, X3, X4)> { - typedef R(RunType)(BindStateBase*, - typename CallbackParamTraits::ForwardType); - - typedef R(UnboundRunType)(X4); - - static R Run(BindStateBase* base, - typename CallbackParamTraits::ForwardType x4) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; - typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits; - typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits; - - typename Bound1UnwrapTraits::ForwardType x1 = - Bound1UnwrapTraits::Unwrap(storage->p1_); - typename Bound2UnwrapTraits::ForwardType x2 = - Bound2UnwrapTraits::Unwrap(storage->p2_); - typename Bound3UnwrapTraits::ForwardType x3 = - Bound3UnwrapTraits::Unwrap(storage->p3_); - return InvokeHelper::ForwardType x4)> - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2), CallbackForward(x3), - CallbackForward(x4)); - } -}; - -// Arity 4 -> 0. -template -struct Invoker<4, StorageType, R(X1, X2, X3, X4)> { - typedef R(RunType)(BindStateBase*); - - typedef R(UnboundRunType)(); - - static R Run(BindStateBase* base) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; - typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits; - typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits; - typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits; - - typename Bound1UnwrapTraits::ForwardType x1 = - Bound1UnwrapTraits::Unwrap(storage->p1_); - typename Bound2UnwrapTraits::ForwardType x2 = - Bound2UnwrapTraits::Unwrap(storage->p2_); - typename Bound3UnwrapTraits::ForwardType x3 = - Bound3UnwrapTraits::Unwrap(storage->p3_); - typename Bound4UnwrapTraits::ForwardType x4 = - Bound4UnwrapTraits::Unwrap(storage->p4_); - return InvokeHelper - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2), CallbackForward(x3), - CallbackForward(x4)); - } -}; - -// Arity 5 -> 5. -template -struct Invoker<0, StorageType, R(X1, X2, X3, X4, X5)> { - typedef R(RunType)(BindStateBase*, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType); - - typedef R(UnboundRunType)(X1, X2, X3, X4, X5); - - static R Run(BindStateBase* base, - typename CallbackParamTraits::ForwardType x1, - typename CallbackParamTraits::ForwardType x2, - typename CallbackParamTraits::ForwardType x3, - typename CallbackParamTraits::ForwardType x4, - typename CallbackParamTraits::ForwardType x5) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - - return InvokeHelper::ForwardType x1, - typename CallbackParamTraits::ForwardType x2, - typename CallbackParamTraits::ForwardType x3, - typename CallbackParamTraits::ForwardType x4, - typename CallbackParamTraits::ForwardType x5)> - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2), CallbackForward(x3), - CallbackForward(x4), CallbackForward(x5)); - } -}; - -// Arity 5 -> 4. -template -struct Invoker<1, StorageType, R(X1, X2, X3, X4, X5)> { - typedef R(RunType)(BindStateBase*, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType); - - typedef R(UnboundRunType)(X2, X3, X4, X5); - - static R Run(BindStateBase* base, - typename CallbackParamTraits::ForwardType x2, - typename CallbackParamTraits::ForwardType x3, - typename CallbackParamTraits::ForwardType x4, - typename CallbackParamTraits::ForwardType x5) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; - - typename Bound1UnwrapTraits::ForwardType x1 = - Bound1UnwrapTraits::Unwrap(storage->p1_); - return InvokeHelper::ForwardType x2, - typename CallbackParamTraits::ForwardType x3, - typename CallbackParamTraits::ForwardType x4, - typename CallbackParamTraits::ForwardType x5)> - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2), CallbackForward(x3), - CallbackForward(x4), CallbackForward(x5)); - } -}; - -// Arity 5 -> 3. -template -struct Invoker<2, StorageType, R(X1, X2, X3, X4, X5)> { - typedef R(RunType)(BindStateBase*, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType); - - typedef R(UnboundRunType)(X3, X4, X5); - - static R Run(BindStateBase* base, - typename CallbackParamTraits::ForwardType x3, - typename CallbackParamTraits::ForwardType x4, - typename CallbackParamTraits::ForwardType x5) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; - typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits; - - typename Bound1UnwrapTraits::ForwardType x1 = - Bound1UnwrapTraits::Unwrap(storage->p1_); - typename Bound2UnwrapTraits::ForwardType x2 = - Bound2UnwrapTraits::Unwrap(storage->p2_); - return InvokeHelper::ForwardType x3, - typename CallbackParamTraits::ForwardType x4, - typename CallbackParamTraits::ForwardType x5)> - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2), CallbackForward(x3), - CallbackForward(x4), CallbackForward(x5)); - } -}; - -// Arity 5 -> 2. -template -struct Invoker<3, StorageType, R(X1, X2, X3, X4, X5)> { - typedef R(RunType)(BindStateBase*, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType); - - typedef R(UnboundRunType)(X4, X5); - - static R Run(BindStateBase* base, - typename CallbackParamTraits::ForwardType x4, - typename CallbackParamTraits::ForwardType x5) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; - typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits; - typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits; - - typename Bound1UnwrapTraits::ForwardType x1 = - Bound1UnwrapTraits::Unwrap(storage->p1_); - typename Bound2UnwrapTraits::ForwardType x2 = - Bound2UnwrapTraits::Unwrap(storage->p2_); - typename Bound3UnwrapTraits::ForwardType x3 = - Bound3UnwrapTraits::Unwrap(storage->p3_); - return InvokeHelper::ForwardType x4, - typename CallbackParamTraits::ForwardType x5)> - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2), CallbackForward(x3), - CallbackForward(x4), CallbackForward(x5)); - } -}; - -// Arity 5 -> 1. -template -struct Invoker<4, StorageType, R(X1, X2, X3, X4, X5)> { - typedef R(RunType)(BindStateBase*, - typename CallbackParamTraits::ForwardType); - - typedef R(UnboundRunType)(X5); - - static R Run(BindStateBase* base, - typename CallbackParamTraits::ForwardType x5) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; - typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits; - typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits; - typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits; - - typename Bound1UnwrapTraits::ForwardType x1 = - Bound1UnwrapTraits::Unwrap(storage->p1_); - typename Bound2UnwrapTraits::ForwardType x2 = - Bound2UnwrapTraits::Unwrap(storage->p2_); - typename Bound3UnwrapTraits::ForwardType x3 = - Bound3UnwrapTraits::Unwrap(storage->p3_); - typename Bound4UnwrapTraits::ForwardType x4 = - Bound4UnwrapTraits::Unwrap(storage->p4_); - return InvokeHelper::ForwardType x5)> - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2), CallbackForward(x3), - CallbackForward(x4), CallbackForward(x5)); - } -}; - -// Arity 5 -> 0. -template -struct Invoker<5, StorageType, R(X1, X2, X3, X4, X5)> { - typedef R(RunType)(BindStateBase*); - - typedef R(UnboundRunType)(); - - static R Run(BindStateBase* base) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; - typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits; - typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits; - typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits; - typedef typename StorageType::Bound5UnwrapTraits Bound5UnwrapTraits; - - typename Bound1UnwrapTraits::ForwardType x1 = - Bound1UnwrapTraits::Unwrap(storage->p1_); - typename Bound2UnwrapTraits::ForwardType x2 = - Bound2UnwrapTraits::Unwrap(storage->p2_); - typename Bound3UnwrapTraits::ForwardType x3 = - Bound3UnwrapTraits::Unwrap(storage->p3_); - typename Bound4UnwrapTraits::ForwardType x4 = - Bound4UnwrapTraits::Unwrap(storage->p4_); - typename Bound5UnwrapTraits::ForwardType x5 = - Bound5UnwrapTraits::Unwrap(storage->p5_); - return InvokeHelper - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2), CallbackForward(x3), - CallbackForward(x4), CallbackForward(x5)); - } -}; - -// Arity 6 -> 6. -template -struct Invoker<0, StorageType, R(X1, X2, X3, X4, X5, X6)> { - typedef R(RunType)(BindStateBase*, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType); - - typedef R(UnboundRunType)(X1, X2, X3, X4, X5, X6); - - static R Run(BindStateBase* base, - typename CallbackParamTraits::ForwardType x1, - typename CallbackParamTraits::ForwardType x2, - typename CallbackParamTraits::ForwardType x3, - typename CallbackParamTraits::ForwardType x4, - typename CallbackParamTraits::ForwardType x5, - typename CallbackParamTraits::ForwardType x6) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - - return InvokeHelper::ForwardType x1, - typename CallbackParamTraits::ForwardType x2, - typename CallbackParamTraits::ForwardType x3, - typename CallbackParamTraits::ForwardType x4, - typename CallbackParamTraits::ForwardType x5, - typename CallbackParamTraits::ForwardType x6)> - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2), CallbackForward(x3), - CallbackForward(x4), CallbackForward(x5), - CallbackForward(x6)); - } -}; - -// Arity 6 -> 5. -template -struct Invoker<1, StorageType, R(X1, X2, X3, X4, X5, X6)> { - typedef R(RunType)(BindStateBase*, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType); - - typedef R(UnboundRunType)(X2, X3, X4, X5, X6); - - static R Run(BindStateBase* base, - typename CallbackParamTraits::ForwardType x2, - typename CallbackParamTraits::ForwardType x3, - typename CallbackParamTraits::ForwardType x4, - typename CallbackParamTraits::ForwardType x5, - typename CallbackParamTraits::ForwardType x6) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; - - typename Bound1UnwrapTraits::ForwardType x1 = - Bound1UnwrapTraits::Unwrap(storage->p1_); - return InvokeHelper::ForwardType x2, - typename CallbackParamTraits::ForwardType x3, - typename CallbackParamTraits::ForwardType x4, - typename CallbackParamTraits::ForwardType x5, - typename CallbackParamTraits::ForwardType x6)> - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2), CallbackForward(x3), - CallbackForward(x4), CallbackForward(x5), - CallbackForward(x6)); - } -}; - -// Arity 6 -> 4. -template -struct Invoker<2, StorageType, R(X1, X2, X3, X4, X5, X6)> { - typedef R(RunType)(BindStateBase*, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType); - - typedef R(UnboundRunType)(X3, X4, X5, X6); - - static R Run(BindStateBase* base, - typename CallbackParamTraits::ForwardType x3, - typename CallbackParamTraits::ForwardType x4, - typename CallbackParamTraits::ForwardType x5, - typename CallbackParamTraits::ForwardType x6) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; - typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits; - - typename Bound1UnwrapTraits::ForwardType x1 = - Bound1UnwrapTraits::Unwrap(storage->p1_); - typename Bound2UnwrapTraits::ForwardType x2 = - Bound2UnwrapTraits::Unwrap(storage->p2_); - return InvokeHelper::ForwardType x3, - typename CallbackParamTraits::ForwardType x4, - typename CallbackParamTraits::ForwardType x5, - typename CallbackParamTraits::ForwardType x6)> - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2), CallbackForward(x3), - CallbackForward(x4), CallbackForward(x5), - CallbackForward(x6)); - } -}; - -// Arity 6 -> 3. -template -struct Invoker<3, StorageType, R(X1, X2, X3, X4, X5, X6)> { - typedef R(RunType)(BindStateBase*, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType); - - typedef R(UnboundRunType)(X4, X5, X6); - - static R Run(BindStateBase* base, - typename CallbackParamTraits::ForwardType x4, - typename CallbackParamTraits::ForwardType x5, - typename CallbackParamTraits::ForwardType x6) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; - typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits; - typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits; - - typename Bound1UnwrapTraits::ForwardType x1 = - Bound1UnwrapTraits::Unwrap(storage->p1_); - typename Bound2UnwrapTraits::ForwardType x2 = - Bound2UnwrapTraits::Unwrap(storage->p2_); - typename Bound3UnwrapTraits::ForwardType x3 = - Bound3UnwrapTraits::Unwrap(storage->p3_); - return InvokeHelper::ForwardType x4, - typename CallbackParamTraits::ForwardType x5, - typename CallbackParamTraits::ForwardType x6)> - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2), CallbackForward(x3), - CallbackForward(x4), CallbackForward(x5), - CallbackForward(x6)); - } -}; - -// Arity 6 -> 2. -template -struct Invoker<4, StorageType, R(X1, X2, X3, X4, X5, X6)> { - typedef R(RunType)(BindStateBase*, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType); - - typedef R(UnboundRunType)(X5, X6); - - static R Run(BindStateBase* base, - typename CallbackParamTraits::ForwardType x5, - typename CallbackParamTraits::ForwardType x6) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; - typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits; - typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits; - typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits; - - typename Bound1UnwrapTraits::ForwardType x1 = - Bound1UnwrapTraits::Unwrap(storage->p1_); - typename Bound2UnwrapTraits::ForwardType x2 = - Bound2UnwrapTraits::Unwrap(storage->p2_); - typename Bound3UnwrapTraits::ForwardType x3 = - Bound3UnwrapTraits::Unwrap(storage->p3_); - typename Bound4UnwrapTraits::ForwardType x4 = - Bound4UnwrapTraits::Unwrap(storage->p4_); - return InvokeHelper::ForwardType x5, - typename CallbackParamTraits::ForwardType x6)> - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2), CallbackForward(x3), - CallbackForward(x4), CallbackForward(x5), - CallbackForward(x6)); - } -}; - -// Arity 6 -> 1. -template -struct Invoker<5, StorageType, R(X1, X2, X3, X4, X5, X6)> { - typedef R(RunType)(BindStateBase*, - typename CallbackParamTraits::ForwardType); - - typedef R(UnboundRunType)(X6); - - static R Run(BindStateBase* base, - typename CallbackParamTraits::ForwardType x6) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; - typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits; - typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits; - typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits; - typedef typename StorageType::Bound5UnwrapTraits Bound5UnwrapTraits; - - typename Bound1UnwrapTraits::ForwardType x1 = - Bound1UnwrapTraits::Unwrap(storage->p1_); - typename Bound2UnwrapTraits::ForwardType x2 = - Bound2UnwrapTraits::Unwrap(storage->p2_); - typename Bound3UnwrapTraits::ForwardType x3 = - Bound3UnwrapTraits::Unwrap(storage->p3_); - typename Bound4UnwrapTraits::ForwardType x4 = - Bound4UnwrapTraits::Unwrap(storage->p4_); - typename Bound5UnwrapTraits::ForwardType x5 = - Bound5UnwrapTraits::Unwrap(storage->p5_); - return InvokeHelper::ForwardType x6)> - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2), CallbackForward(x3), - CallbackForward(x4), CallbackForward(x5), - CallbackForward(x6)); - } -}; - -// Arity 6 -> 0. -template -struct Invoker<6, StorageType, R(X1, X2, X3, X4, X5, X6)> { - typedef R(RunType)(BindStateBase*); - - typedef R(UnboundRunType)(); - - static R Run(BindStateBase* base) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; - typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits; - typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits; - typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits; - typedef typename StorageType::Bound5UnwrapTraits Bound5UnwrapTraits; - typedef typename StorageType::Bound6UnwrapTraits Bound6UnwrapTraits; - - typename Bound1UnwrapTraits::ForwardType x1 = - Bound1UnwrapTraits::Unwrap(storage->p1_); - typename Bound2UnwrapTraits::ForwardType x2 = - Bound2UnwrapTraits::Unwrap(storage->p2_); - typename Bound3UnwrapTraits::ForwardType x3 = - Bound3UnwrapTraits::Unwrap(storage->p3_); - typename Bound4UnwrapTraits::ForwardType x4 = - Bound4UnwrapTraits::Unwrap(storage->p4_); - typename Bound5UnwrapTraits::ForwardType x5 = - Bound5UnwrapTraits::Unwrap(storage->p5_); - typename Bound6UnwrapTraits::ForwardType x6 = - Bound6UnwrapTraits::Unwrap(storage->p6_); - return InvokeHelper - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2), CallbackForward(x3), - CallbackForward(x4), CallbackForward(x5), - CallbackForward(x6)); - } -}; - -// Arity 7 -> 7. -template -struct Invoker<0, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> { - typedef R(RunType)(BindStateBase*, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType); - - typedef R(UnboundRunType)(X1, X2, X3, X4, X5, X6, X7); - - static R Run(BindStateBase* base, - typename CallbackParamTraits::ForwardType x1, - typename CallbackParamTraits::ForwardType x2, - typename CallbackParamTraits::ForwardType x3, - typename CallbackParamTraits::ForwardType x4, - typename CallbackParamTraits::ForwardType x5, - typename CallbackParamTraits::ForwardType x6, - typename CallbackParamTraits::ForwardType x7) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - - return InvokeHelper::ForwardType x1, - typename CallbackParamTraits::ForwardType x2, - typename CallbackParamTraits::ForwardType x3, - typename CallbackParamTraits::ForwardType x4, - typename CallbackParamTraits::ForwardType x5, - typename CallbackParamTraits::ForwardType x6, - typename CallbackParamTraits::ForwardType x7)> - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2), CallbackForward(x3), - CallbackForward(x4), CallbackForward(x5), - CallbackForward(x6), CallbackForward(x7)); - } -}; - -// Arity 7 -> 6. -template -struct Invoker<1, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> { - typedef R(RunType)(BindStateBase*, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType); - - typedef R(UnboundRunType)(X2, X3, X4, X5, X6, X7); - - static R Run(BindStateBase* base, - typename CallbackParamTraits::ForwardType x2, - typename CallbackParamTraits::ForwardType x3, - typename CallbackParamTraits::ForwardType x4, - typename CallbackParamTraits::ForwardType x5, - typename CallbackParamTraits::ForwardType x6, - typename CallbackParamTraits::ForwardType x7) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; - - typename Bound1UnwrapTraits::ForwardType x1 = - Bound1UnwrapTraits::Unwrap(storage->p1_); - return InvokeHelper::ForwardType x2, - typename CallbackParamTraits::ForwardType x3, - typename CallbackParamTraits::ForwardType x4, - typename CallbackParamTraits::ForwardType x5, - typename CallbackParamTraits::ForwardType x6, - typename CallbackParamTraits::ForwardType x7)> - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2), CallbackForward(x3), - CallbackForward(x4), CallbackForward(x5), - CallbackForward(x6), CallbackForward(x7)); - } -}; - -// Arity 7 -> 5. -template -struct Invoker<2, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> { - typedef R(RunType)(BindStateBase*, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType); - - typedef R(UnboundRunType)(X3, X4, X5, X6, X7); - - static R Run(BindStateBase* base, - typename CallbackParamTraits::ForwardType x3, - typename CallbackParamTraits::ForwardType x4, - typename CallbackParamTraits::ForwardType x5, - typename CallbackParamTraits::ForwardType x6, - typename CallbackParamTraits::ForwardType x7) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; - typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits; - - typename Bound1UnwrapTraits::ForwardType x1 = - Bound1UnwrapTraits::Unwrap(storage->p1_); - typename Bound2UnwrapTraits::ForwardType x2 = - Bound2UnwrapTraits::Unwrap(storage->p2_); - return InvokeHelper::ForwardType x3, - typename CallbackParamTraits::ForwardType x4, - typename CallbackParamTraits::ForwardType x5, - typename CallbackParamTraits::ForwardType x6, - typename CallbackParamTraits::ForwardType x7)> - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2), CallbackForward(x3), - CallbackForward(x4), CallbackForward(x5), - CallbackForward(x6), CallbackForward(x7)); - } -}; - -// Arity 7 -> 4. -template -struct Invoker<3, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> { - typedef R(RunType)(BindStateBase*, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType); - - typedef R(UnboundRunType)(X4, X5, X6, X7); - - static R Run(BindStateBase* base, - typename CallbackParamTraits::ForwardType x4, - typename CallbackParamTraits::ForwardType x5, - typename CallbackParamTraits::ForwardType x6, - typename CallbackParamTraits::ForwardType x7) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; - typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits; - typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits; - - typename Bound1UnwrapTraits::ForwardType x1 = - Bound1UnwrapTraits::Unwrap(storage->p1_); - typename Bound2UnwrapTraits::ForwardType x2 = - Bound2UnwrapTraits::Unwrap(storage->p2_); - typename Bound3UnwrapTraits::ForwardType x3 = - Bound3UnwrapTraits::Unwrap(storage->p3_); - return InvokeHelper::ForwardType x4, - typename CallbackParamTraits::ForwardType x5, - typename CallbackParamTraits::ForwardType x6, - typename CallbackParamTraits::ForwardType x7)> - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2), CallbackForward(x3), - CallbackForward(x4), CallbackForward(x5), - CallbackForward(x6), CallbackForward(x7)); - } -}; - -// Arity 7 -> 3. -template -struct Invoker<4, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> { - typedef R(RunType)(BindStateBase*, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType); - - typedef R(UnboundRunType)(X5, X6, X7); - - static R Run(BindStateBase* base, - typename CallbackParamTraits::ForwardType x5, - typename CallbackParamTraits::ForwardType x6, - typename CallbackParamTraits::ForwardType x7) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; - typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits; - typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits; - typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits; - - typename Bound1UnwrapTraits::ForwardType x1 = - Bound1UnwrapTraits::Unwrap(storage->p1_); - typename Bound2UnwrapTraits::ForwardType x2 = - Bound2UnwrapTraits::Unwrap(storage->p2_); - typename Bound3UnwrapTraits::ForwardType x3 = - Bound3UnwrapTraits::Unwrap(storage->p3_); - typename Bound4UnwrapTraits::ForwardType x4 = - Bound4UnwrapTraits::Unwrap(storage->p4_); - return InvokeHelper::ForwardType x5, - typename CallbackParamTraits::ForwardType x6, - typename CallbackParamTraits::ForwardType x7)> - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2), CallbackForward(x3), - CallbackForward(x4), CallbackForward(x5), - CallbackForward(x6), CallbackForward(x7)); - } -}; - -// Arity 7 -> 2. -template -struct Invoker<5, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> { - typedef R(RunType)(BindStateBase*, - typename CallbackParamTraits::ForwardType, - typename CallbackParamTraits::ForwardType); - - typedef R(UnboundRunType)(X6, X7); - - static R Run(BindStateBase* base, - typename CallbackParamTraits::ForwardType x6, - typename CallbackParamTraits::ForwardType x7) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; - typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits; - typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits; - typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits; - typedef typename StorageType::Bound5UnwrapTraits Bound5UnwrapTraits; - - typename Bound1UnwrapTraits::ForwardType x1 = - Bound1UnwrapTraits::Unwrap(storage->p1_); - typename Bound2UnwrapTraits::ForwardType x2 = - Bound2UnwrapTraits::Unwrap(storage->p2_); - typename Bound3UnwrapTraits::ForwardType x3 = - Bound3UnwrapTraits::Unwrap(storage->p3_); - typename Bound4UnwrapTraits::ForwardType x4 = - Bound4UnwrapTraits::Unwrap(storage->p4_); - typename Bound5UnwrapTraits::ForwardType x5 = - Bound5UnwrapTraits::Unwrap(storage->p5_); - return InvokeHelper::ForwardType x6, - typename CallbackParamTraits::ForwardType x7)> - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2), CallbackForward(x3), - CallbackForward(x4), CallbackForward(x5), - CallbackForward(x6), CallbackForward(x7)); - } -}; - -// Arity 7 -> 1. -template -struct Invoker<6, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> { - typedef R(RunType)(BindStateBase*, - typename CallbackParamTraits::ForwardType); - - typedef R(UnboundRunType)(X7); - - static R Run(BindStateBase* base, - typename CallbackParamTraits::ForwardType x7) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; - typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits; - typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits; - typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits; - typedef typename StorageType::Bound5UnwrapTraits Bound5UnwrapTraits; - typedef typename StorageType::Bound6UnwrapTraits Bound6UnwrapTraits; - - typename Bound1UnwrapTraits::ForwardType x1 = - Bound1UnwrapTraits::Unwrap(storage->p1_); - typename Bound2UnwrapTraits::ForwardType x2 = - Bound2UnwrapTraits::Unwrap(storage->p2_); - typename Bound3UnwrapTraits::ForwardType x3 = - Bound3UnwrapTraits::Unwrap(storage->p3_); - typename Bound4UnwrapTraits::ForwardType x4 = - Bound4UnwrapTraits::Unwrap(storage->p4_); - typename Bound5UnwrapTraits::ForwardType x5 = - Bound5UnwrapTraits::Unwrap(storage->p5_); - typename Bound6UnwrapTraits::ForwardType x6 = - Bound6UnwrapTraits::Unwrap(storage->p6_); - return InvokeHelper::ForwardType x7)> - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2), CallbackForward(x3), - CallbackForward(x4), CallbackForward(x5), - CallbackForward(x6), CallbackForward(x7)); - } -}; - -// Arity 7 -> 0. -template -struct Invoker<7, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> { - typedef R(RunType)(BindStateBase*); - - typedef R(UnboundRunType)(); - - static R Run(BindStateBase* base) { - StorageType* storage = static_cast(base); - - // Local references to make debugger stepping easier. If in a debugger, - // you really want to warp ahead and step through the - // InvokeHelper<>::MakeItSo() call below. - typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; - typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits; - typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits; - typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits; - typedef typename StorageType::Bound5UnwrapTraits Bound5UnwrapTraits; - typedef typename StorageType::Bound6UnwrapTraits Bound6UnwrapTraits; - typedef typename StorageType::Bound7UnwrapTraits Bound7UnwrapTraits; - - typename Bound1UnwrapTraits::ForwardType x1 = - Bound1UnwrapTraits::Unwrap(storage->p1_); - typename Bound2UnwrapTraits::ForwardType x2 = - Bound2UnwrapTraits::Unwrap(storage->p2_); - typename Bound3UnwrapTraits::ForwardType x3 = - Bound3UnwrapTraits::Unwrap(storage->p3_); - typename Bound4UnwrapTraits::ForwardType x4 = - Bound4UnwrapTraits::Unwrap(storage->p4_); - typename Bound5UnwrapTraits::ForwardType x5 = - Bound5UnwrapTraits::Unwrap(storage->p5_); - typename Bound6UnwrapTraits::ForwardType x6 = - Bound6UnwrapTraits::Unwrap(storage->p6_); - typename Bound7UnwrapTraits::ForwardType x7 = - Bound7UnwrapTraits::Unwrap(storage->p7_); - return InvokeHelper - ::MakeItSo(storage->runnable_, CallbackForward(x1), - CallbackForward(x2), CallbackForward(x3), - CallbackForward(x4), CallbackForward(x5), - CallbackForward(x6), CallbackForward(x7)); - } -}; - - -// BindState<> -// -// This stores all the state passed into Bind() and is also where most -// of the template resolution magic occurs. -// -// Runnable is the functor we are binding arguments to. -// RunType is type of the Run() function that the Invoker<> should use. -// Normally, this is the same as the RunType of the Runnable, but it can -// be different if an adapter like IgnoreResult() has been used. -// -// BoundArgsType contains the storage type for all the bound arguments by -// (ab)using a function type. -template -struct BindState; - -template -struct BindState : public BindStateBase { - typedef Runnable RunnableType; - typedef false_type IsWeakCall; - typedef Invoker<0, BindState, RunType> InvokerType; - typedef typename InvokerType::UnboundRunType UnboundRunType; - explicit BindState(const Runnable& runnable) - : BindStateBase(&Destroy), - runnable_(runnable) { - } - - ~BindState() { } - - static void Destroy(BindStateBase* self) { - delete static_cast(self); - } - - RunnableType runnable_; -}; - -template -struct BindState : public BindStateBase { - typedef Runnable RunnableType; - typedef IsWeakMethod::value, P1> IsWeakCall; - typedef Invoker<1, BindState, RunType> InvokerType; - typedef typename InvokerType::UnboundRunType UnboundRunType; - - // Convenience typedefs for bound argument types. - typedef UnwrapTraits Bound1UnwrapTraits; - - BindState(const Runnable& runnable, const P1& p1) - : BindStateBase(&Destroy), - runnable_(runnable), - p1_(p1) { - MaybeRefcount::value, P1>::AddRef(p1_); - } - - ~BindState() { MaybeRefcount::value, - P1>::Release(p1_); } - - static void Destroy(BindStateBase* self) { - delete static_cast(self); - } - - RunnableType runnable_; - P1 p1_; -}; - -template -struct BindState : public BindStateBase { - typedef Runnable RunnableType; - typedef IsWeakMethod::value, P1> IsWeakCall; - typedef Invoker<2, BindState, RunType> InvokerType; - typedef typename InvokerType::UnboundRunType UnboundRunType; - - // Convenience typedefs for bound argument types. - typedef UnwrapTraits Bound1UnwrapTraits; - typedef UnwrapTraits Bound2UnwrapTraits; - - BindState(const Runnable& runnable, const P1& p1, const P2& p2) - : BindStateBase(&Destroy), - runnable_(runnable), - p1_(p1), - p2_(p2) { - MaybeRefcount::value, P1>::AddRef(p1_); - } - - ~BindState() { MaybeRefcount::value, - P1>::Release(p1_); } - - static void Destroy(BindStateBase* self) { - delete static_cast(self); - } - - RunnableType runnable_; - P1 p1_; - P2 p2_; -}; - -template -struct BindState - : public BindStateBase { - typedef Runnable RunnableType; - typedef IsWeakMethod::value, P1> IsWeakCall; - typedef Invoker<3, BindState, RunType> InvokerType; - typedef typename InvokerType::UnboundRunType UnboundRunType; - - // Convenience typedefs for bound argument types. - typedef UnwrapTraits Bound1UnwrapTraits; - typedef UnwrapTraits Bound2UnwrapTraits; - typedef UnwrapTraits Bound3UnwrapTraits; - - BindState(const Runnable& runnable, const P1& p1, const P2& p2, const P3& p3) - : BindStateBase(&Destroy), - runnable_(runnable), - p1_(p1), - p2_(p2), - p3_(p3) { - MaybeRefcount::value, P1>::AddRef(p1_); - } - - ~BindState() { MaybeRefcount::value, - P1>::Release(p1_); } - - static void Destroy(BindStateBase* self) { - delete static_cast(self); - } - - RunnableType runnable_; - P1 p1_; - P2 p2_; - P3 p3_; -}; - -template -struct BindState - : public BindStateBase { - typedef Runnable RunnableType; - typedef IsWeakMethod::value, P1> IsWeakCall; - typedef Invoker<4, BindState, RunType> InvokerType; - typedef typename InvokerType::UnboundRunType UnboundRunType; - - // Convenience typedefs for bound argument types. - typedef UnwrapTraits Bound1UnwrapTraits; - typedef UnwrapTraits Bound2UnwrapTraits; - typedef UnwrapTraits Bound3UnwrapTraits; - typedef UnwrapTraits Bound4UnwrapTraits; - - BindState(const Runnable& runnable, const P1& p1, const P2& p2, const P3& p3, - const P4& p4) - : BindStateBase(&Destroy), - runnable_(runnable), - p1_(p1), - p2_(p2), - p3_(p3), - p4_(p4) { - MaybeRefcount::value, P1>::AddRef(p1_); - } - - ~BindState() { MaybeRefcount::value, - P1>::Release(p1_); } - - static void Destroy(BindStateBase* self) { - delete static_cast(self); - } - - RunnableType runnable_; - P1 p1_; - P2 p2_; - P3 p3_; - P4 p4_; -}; - -template -struct BindState - : public BindStateBase { - typedef Runnable RunnableType; - typedef IsWeakMethod::value, P1> IsWeakCall; - typedef Invoker<5, BindState, RunType> InvokerType; - typedef typename InvokerType::UnboundRunType UnboundRunType; - - // Convenience typedefs for bound argument types. - typedef UnwrapTraits Bound1UnwrapTraits; - typedef UnwrapTraits Bound2UnwrapTraits; - typedef UnwrapTraits Bound3UnwrapTraits; - typedef UnwrapTraits Bound4UnwrapTraits; - typedef UnwrapTraits Bound5UnwrapTraits; - - BindState(const Runnable& runnable, const P1& p1, const P2& p2, const P3& p3, - const P4& p4, const P5& p5) - : BindStateBase(&Destroy), - runnable_(runnable), - p1_(p1), - p2_(p2), - p3_(p3), - p4_(p4), - p5_(p5) { - MaybeRefcount::value, P1>::AddRef(p1_); - } - - ~BindState() { MaybeRefcount::value, - P1>::Release(p1_); } - - static void Destroy(BindStateBase* self) { - delete static_cast(self); - } - - RunnableType runnable_; - P1 p1_; - P2 p2_; - P3 p3_; - P4 p4_; - P5 p5_; -}; - -template -struct BindState - : public BindStateBase { - typedef Runnable RunnableType; - typedef IsWeakMethod::value, P1> IsWeakCall; - typedef Invoker<6, BindState, RunType> InvokerType; - typedef typename InvokerType::UnboundRunType UnboundRunType; - - // Convenience typedefs for bound argument types. - typedef UnwrapTraits Bound1UnwrapTraits; - typedef UnwrapTraits Bound2UnwrapTraits; - typedef UnwrapTraits Bound3UnwrapTraits; - typedef UnwrapTraits Bound4UnwrapTraits; - typedef UnwrapTraits Bound5UnwrapTraits; - typedef UnwrapTraits Bound6UnwrapTraits; - - BindState(const Runnable& runnable, const P1& p1, const P2& p2, const P3& p3, - const P4& p4, const P5& p5, const P6& p6) - : BindStateBase(&Destroy), - runnable_(runnable), - p1_(p1), - p2_(p2), - p3_(p3), - p4_(p4), - p5_(p5), - p6_(p6) { - MaybeRefcount::value, P1>::AddRef(p1_); - } - - ~BindState() { MaybeRefcount::value, - P1>::Release(p1_); } - - static void Destroy(BindStateBase* self) { - delete static_cast(self); - } - - RunnableType runnable_; - P1 p1_; - P2 p2_; - P3 p3_; - P4 p4_; - P5 p5_; - P6 p6_; -}; - -template -struct BindState - : public BindStateBase { - typedef Runnable RunnableType; - typedef IsWeakMethod::value, P1> IsWeakCall; - typedef Invoker<7, BindState, RunType> InvokerType; - typedef typename InvokerType::UnboundRunType UnboundRunType; - - // Convenience typedefs for bound argument types. - typedef UnwrapTraits Bound1UnwrapTraits; - typedef UnwrapTraits Bound2UnwrapTraits; - typedef UnwrapTraits Bound3UnwrapTraits; - typedef UnwrapTraits Bound4UnwrapTraits; - typedef UnwrapTraits Bound5UnwrapTraits; - typedef UnwrapTraits Bound6UnwrapTraits; - typedef UnwrapTraits Bound7UnwrapTraits; - - BindState(const Runnable& runnable, const P1& p1, const P2& p2, const P3& p3, - const P4& p4, const P5& p5, const P6& p6, const P7& p7) - : BindStateBase(&Destroy), - runnable_(runnable), - p1_(p1), - p2_(p2), - p3_(p3), - p4_(p4), - p5_(p5), - p6_(p6), - p7_(p7) { - MaybeRefcount::value, P1>::AddRef(p1_); - } - - ~BindState() { MaybeRefcount::value, - P1>::Release(p1_); } - - static void Destroy(BindStateBase* self) { - delete static_cast(self); - } - - RunnableType runnable_; - P1 p1_; - P2 p2_; - P3 p3_; - P4 p4_; - P5 p5_; - P6 p6_; - P7 p7_; -}; - -} // namespace cef_internal -} // namespace base - -#endif // CEF_INCLUDE_BASE_INTERNAL_CEF_BIND_INTERNAL_H_ diff --git a/tool_kits/cef/cef_wrapper/include/base/internal/cef_bind_internal_win.h b/tool_kits/cef/cef_wrapper/include/base/internal/cef_bind_internal_win.h deleted file mode 100644 index 1b061ccd..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/internal/cef_bind_internal_win.h +++ /dev/null @@ -1,390 +0,0 @@ -// Copyright (c) 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. - -// Do not include this header file directly. Use base/cef_bind.h instead. - -// Specializations of RunnableAdapter<> for Windows specific calling -// conventions. Please see base/bind_internal.h for more info. - -#ifndef CEF_INCLUDE_BASE_INTERNAL_CEF_BIND_INTERNAL_WIN_H_ -#define CEF_INCLUDE_BASE_INTERNAL_CEF_BIND_INTERNAL_WIN_H_ - -// In the x64 architecture in Windows, __fastcall, __stdcall, etc, are all -// the same as __cdecl which would turn the following specializations into -// multiple definitions. -#if !defined(ARCH_CPU_X86_64) - -namespace base { -namespace cef_internal { - -template -class RunnableAdapter; - -// __stdcall Function: Arity 0. -template -class RunnableAdapter { - public: - typedef R (RunType)(); - - explicit RunnableAdapter(R(__stdcall *function)()) - : function_(function) { - } - - R Run() { - return function_(); - } - - private: - R (__stdcall *function_)(); -}; - -// __fastcall Function: Arity 0. -template -class RunnableAdapter { - public: - typedef R (RunType)(); - - explicit RunnableAdapter(R(__fastcall *function)()) - : function_(function) { - } - - R Run() { - return function_(); - } - - private: - R (__fastcall *function_)(); -}; - -// __stdcall Function: Arity 1. -template -class RunnableAdapter { - public: - typedef R (RunType)(A1); - - explicit RunnableAdapter(R(__stdcall *function)(A1)) - : function_(function) { - } - - R Run(typename CallbackParamTraits::ForwardType a1) { - return function_(a1); - } - - private: - R (__stdcall *function_)(A1); -}; - -// __fastcall Function: Arity 1. -template -class RunnableAdapter { - public: - typedef R (RunType)(A1); - - explicit RunnableAdapter(R(__fastcall *function)(A1)) - : function_(function) { - } - - R Run(typename CallbackParamTraits::ForwardType a1) { - return function_(a1); - } - - private: - R (__fastcall *function_)(A1); -}; - -// __stdcall Function: Arity 2. -template -class RunnableAdapter { - public: - typedef R (RunType)(A1, A2); - - explicit RunnableAdapter(R(__stdcall *function)(A1, A2)) - : function_(function) { - } - - R Run(typename CallbackParamTraits::ForwardType a1, - typename CallbackParamTraits::ForwardType a2) { - return function_(a1, a2); - } - - private: - R (__stdcall *function_)(A1, A2); -}; - -// __fastcall Function: Arity 2. -template -class RunnableAdapter { - public: - typedef R (RunType)(A1, A2); - - explicit RunnableAdapter(R(__fastcall *function)(A1, A2)) - : function_(function) { - } - - R Run(typename CallbackParamTraits::ForwardType a1, - typename CallbackParamTraits::ForwardType a2) { - return function_(a1, a2); - } - - private: - R (__fastcall *function_)(A1, A2); -}; - -// __stdcall Function: Arity 3. -template -class RunnableAdapter { - public: - typedef R (RunType)(A1, A2, A3); - - explicit RunnableAdapter(R(__stdcall *function)(A1, A2, A3)) - : function_(function) { - } - - R Run(typename CallbackParamTraits::ForwardType a1, - typename CallbackParamTraits::ForwardType a2, - typename CallbackParamTraits::ForwardType a3) { - return function_(a1, a2, a3); - } - - private: - R (__stdcall *function_)(A1, A2, A3); -}; - -// __fastcall Function: Arity 3. -template -class RunnableAdapter { - public: - typedef R (RunType)(A1, A2, A3); - - explicit RunnableAdapter(R(__fastcall *function)(A1, A2, A3)) - : function_(function) { - } - - R Run(typename CallbackParamTraits::ForwardType a1, - typename CallbackParamTraits::ForwardType a2, - typename CallbackParamTraits::ForwardType a3) { - return function_(a1, a2, a3); - } - - private: - R (__fastcall *function_)(A1, A2, A3); -}; - -// __stdcall Function: Arity 4. -template -class RunnableAdapter { - public: - typedef R (RunType)(A1, A2, A3, A4); - - explicit RunnableAdapter(R(__stdcall *function)(A1, A2, A3, A4)) - : function_(function) { - } - - R Run(typename CallbackParamTraits::ForwardType a1, - typename CallbackParamTraits::ForwardType a2, - typename CallbackParamTraits::ForwardType a3, - typename CallbackParamTraits::ForwardType a4) { - return function_(a1, a2, a3, a4); - } - - private: - R (__stdcall *function_)(A1, A2, A3, A4); -}; - -// __fastcall Function: Arity 4. -template -class RunnableAdapter { - public: - typedef R (RunType)(A1, A2, A3, A4); - - explicit RunnableAdapter(R(__fastcall *function)(A1, A2, A3, A4)) - : function_(function) { - } - - R Run(typename CallbackParamTraits::ForwardType a1, - typename CallbackParamTraits::ForwardType a2, - typename CallbackParamTraits::ForwardType a3, - typename CallbackParamTraits::ForwardType a4) { - return function_(a1, a2, a3, a4); - } - - private: - R (__fastcall *function_)(A1, A2, A3, A4); -}; - -// __stdcall Function: Arity 5. -template -class RunnableAdapter { - public: - typedef R (RunType)(A1, A2, A3, A4, A5); - - explicit RunnableAdapter(R(__stdcall *function)(A1, A2, A3, A4, A5)) - : function_(function) { - } - - R Run(typename CallbackParamTraits::ForwardType a1, - typename CallbackParamTraits::ForwardType a2, - typename CallbackParamTraits::ForwardType a3, - typename CallbackParamTraits::ForwardType a4, - typename CallbackParamTraits::ForwardType a5) { - return function_(a1, a2, a3, a4, a5); - } - - private: - R (__stdcall *function_)(A1, A2, A3, A4, A5); -}; - -// __fastcall Function: Arity 5. -template -class RunnableAdapter { - public: - typedef R (RunType)(A1, A2, A3, A4, A5); - - explicit RunnableAdapter(R(__fastcall *function)(A1, A2, A3, A4, A5)) - : function_(function) { - } - - R Run(typename CallbackParamTraits::ForwardType a1, - typename CallbackParamTraits::ForwardType a2, - typename CallbackParamTraits::ForwardType a3, - typename CallbackParamTraits::ForwardType a4, - typename CallbackParamTraits::ForwardType a5) { - return function_(a1, a2, a3, a4, a5); - } - - private: - R (__fastcall *function_)(A1, A2, A3, A4, A5); -}; - -// __stdcall Function: Arity 6. -template -class RunnableAdapter { - public: - typedef R (RunType)(A1, A2, A3, A4, A5, A6); - - explicit RunnableAdapter(R(__stdcall *function)(A1, A2, A3, A4, A5, A6)) - : function_(function) { - } - - R Run(typename CallbackParamTraits::ForwardType a1, - typename CallbackParamTraits::ForwardType a2, - typename CallbackParamTraits::ForwardType a3, - typename CallbackParamTraits::ForwardType a4, - typename CallbackParamTraits::ForwardType a5, - typename CallbackParamTraits::ForwardType a6) { - return function_(a1, a2, a3, a4, a5, a6); - } - - private: - R (__stdcall *function_)(A1, A2, A3, A4, A5, A6); -}; - -// __fastcall Function: Arity 6. -template -class RunnableAdapter { - public: - typedef R (RunType)(A1, A2, A3, A4, A5, A6); - - explicit RunnableAdapter(R(__fastcall *function)(A1, A2, A3, A4, A5, A6)) - : function_(function) { - } - - R Run(typename CallbackParamTraits::ForwardType a1, - typename CallbackParamTraits::ForwardType a2, - typename CallbackParamTraits::ForwardType a3, - typename CallbackParamTraits::ForwardType a4, - typename CallbackParamTraits::ForwardType a5, - typename CallbackParamTraits::ForwardType a6) { - return function_(a1, a2, a3, a4, a5, a6); - } - - private: - R (__fastcall *function_)(A1, A2, A3, A4, A5, A6); -}; - -// __stdcall Function: Arity 7. -template -class RunnableAdapter { - public: - typedef R (RunType)(A1, A2, A3, A4, A5, A6, A7); - - explicit RunnableAdapter(R(__stdcall *function)(A1, A2, A3, A4, A5, A6, A7)) - : function_(function) { - } - - R Run(typename CallbackParamTraits::ForwardType a1, - typename CallbackParamTraits::ForwardType a2, - typename CallbackParamTraits::ForwardType a3, - typename CallbackParamTraits::ForwardType a4, - typename CallbackParamTraits::ForwardType a5, - typename CallbackParamTraits::ForwardType a6, - typename CallbackParamTraits::ForwardType a7) { - return function_(a1, a2, a3, a4, a5, a6, a7); - } - - private: - R (__stdcall *function_)(A1, A2, A3, A4, A5, A6, A7); -}; - -// __fastcall Function: Arity 7. -template -class RunnableAdapter { - public: - typedef R (RunType)(A1, A2, A3, A4, A5, A6, A7); - - explicit RunnableAdapter(R(__fastcall *function)(A1, A2, A3, A4, A5, A6, A7)) - : function_(function) { - } - - R Run(typename CallbackParamTraits::ForwardType a1, - typename CallbackParamTraits::ForwardType a2, - typename CallbackParamTraits::ForwardType a3, - typename CallbackParamTraits::ForwardType a4, - typename CallbackParamTraits::ForwardType a5, - typename CallbackParamTraits::ForwardType a6, - typename CallbackParamTraits::ForwardType a7) { - return function_(a1, a2, a3, a4, a5, a6, a7); - } - - private: - R (__fastcall *function_)(A1, A2, A3, A4, A5, A6, A7); -}; - -} // namespace cef_internal -} // namespace base - -#endif // !defined(ARCH_CPU_X86_64) - -#endif // CEF_INCLUDE_BASE_INTERNAL_CEF_BIND_INTERNAL_WIN_H_ diff --git a/tool_kits/cef/cef_wrapper/include/base/internal/cef_callback_internal.h b/tool_kits/cef/cef_wrapper/include/base/internal/cef_callback_internal.h deleted file mode 100644 index 542e8438..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/internal/cef_callback_internal.h +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright (c) 2012 Google Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Do not include this header file directly. Use base/cef_bind.h or -// base/cef_callback.h instead. - -// This file contains utility functions and classes that help the -// implementation, and management of the Callback objects. - -#ifndef CEF_INCLUDE_BASE_INTERNAL_CEF_CALLBACK_INTERNAL_H_ -#define CEF_INCLUDE_BASE_INTERNAL_CEF_CALLBACK_INTERNAL_H_ - -#include - -#include "include/base/cef_atomic_ref_count.h" -#include "include/base/cef_macros.h" -#include "include/base/cef_ref_counted.h" -#include "include/base/cef_scoped_ptr.h" -#include "include/base/cef_template_util.h" - -template -class ScopedVector; - -namespace base { -namespace cef_internal { -class CallbackBase; - -// At the base level, the only task is to add reference counting data. Don't use -// RefCountedThreadSafe since it requires the destructor to be a virtual method. -// Creating a vtable for every BindState template instantiation results in a lot -// of bloat. Its only task is to call the destructor which can be done with a -// function pointer. -class BindStateBase { - protected: - explicit BindStateBase(void (*destructor)(BindStateBase*)) - : ref_count_(0), destructor_(destructor) {} - ~BindStateBase() {} - - private: - friend class scoped_refptr; - friend class CallbackBase; - - void AddRef(); - void Release(); - - AtomicRefCount ref_count_; - - // Pointer to a function that will properly destroy |this|. - void (*destructor_)(BindStateBase*); - - DISALLOW_COPY_AND_ASSIGN(BindStateBase); -}; - -// Holds the Callback methods that don't require specialization to reduce -// template bloat. -class CallbackBase { - public: - // Returns true if Callback is null (doesn't refer to anything). - bool is_null() const { return bind_state_.get() == NULL; } - - // Returns the Callback into an uninitialized state. - void Reset(); - - protected: - // In C++, it is safe to cast function pointers to function pointers of - // another type. It is not okay to use void*. We create a InvokeFuncStorage - // that that can store our function pointer, and then cast it back to - // the original type on usage. - typedef void(*InvokeFuncStorage)(void); - - // Returns true if this callback equals |other|. |other| may be null. - bool Equals(const CallbackBase& other) const; - - // Allow initializing of |bind_state_| via the constructor to avoid default - // initialization of the scoped_refptr. We do not also initialize - // |polymorphic_invoke_| here because doing a normal assignment in the - // derived Callback templates makes for much nicer compiler errors. - explicit CallbackBase(BindStateBase* bind_state); - - // Force the destructor to be instantiated inside this translation unit so - // that our subclasses will not get inlined versions. Avoids more template - // bloat. - ~CallbackBase(); - - scoped_refptr bind_state_; - InvokeFuncStorage polymorphic_invoke_; -}; - -// A helper template to determine if given type is non-const move-only-type, -// i.e. if a value of the given type should be passed via .Pass() in a -// destructive way. -template struct IsMoveOnlyType { - template - static YesType Test(const typename U::MoveOnlyTypeForCPP03*); - - template - static NoType Test(...); - - static const bool value = sizeof(Test(0)) == sizeof(YesType) && - !is_const::value; -}; - -// This is a typetraits object that's used to take an argument type, and -// extract a suitable type for storing and forwarding arguments. -// -// In particular, it strips off references, and converts arrays to -// pointers for storage; and it avoids accidentally trying to create a -// "reference of a reference" if the argument is a reference type. -// -// This array type becomes an issue for storage because we are passing bound -// parameters by const reference. In this case, we end up passing an actual -// array type in the initializer list which C++ does not allow. This will -// break passing of C-string literals. -template ::value> -struct CallbackParamTraits { - typedef const T& ForwardType; - typedef T StorageType; -}; - -// The Storage should almost be impossible to trigger unless someone manually -// specifies type of the bind parameters. However, in case they do, -// this will guard against us accidentally storing a reference parameter. -// -// The ForwardType should only be used for unbound arguments. -template -struct CallbackParamTraits { - typedef T& ForwardType; - typedef T StorageType; -}; - -// Note that for array types, we implicitly add a const in the conversion. This -// means that it is not possible to bind array arguments to functions that take -// a non-const pointer. Trying to specialize the template based on a "const -// T[n]" does not seem to match correctly, so we are stuck with this -// restriction. -template -struct CallbackParamTraits { - typedef const T* ForwardType; - typedef const T* StorageType; -}; - -// See comment for CallbackParamTraits. -template -struct CallbackParamTraits { - typedef const T* ForwardType; - typedef const T* StorageType; -}; - -// Parameter traits for movable-but-not-copyable scopers. -// -// Callback<>/Bind() understands movable-but-not-copyable semantics where -// the type cannot be copied but can still have its state destructively -// transferred (aka. moved) to another instance of the same type by calling a -// helper function. When used with Bind(), this signifies transferal of the -// object's state to the target function. -// -// For these types, the ForwardType must not be a const reference, or a -// reference. A const reference is inappropriate, and would break const -// correctness, because we are implementing a destructive move. A non-const -// reference cannot be used with temporaries which means the result of a -// function or a cast would not be usable with Callback<> or Bind(). -template -struct CallbackParamTraits { - typedef T ForwardType; - typedef T StorageType; -}; - -// CallbackForward() is a very limited simulation of C++11's std::forward() -// used by the Callback/Bind system for a set of movable-but-not-copyable -// types. It is needed because forwarding a movable-but-not-copyable -// argument to another function requires us to invoke the proper move -// operator to create a rvalue version of the type. The supported types are -// whitelisted below as overloads of the CallbackForward() function. The -// default template compiles out to be a no-op. -// -// In C++11, std::forward would replace all uses of this function. However, it -// is impossible to implement a general std::forward with C++11 due to a lack -// of rvalue references. -// -// In addition to Callback/Bind, this is used by PostTaskAndReplyWithResult to -// simulate std::forward() and forward the result of one Callback as a -// parameter to another callback. This is to support Callbacks that return -// the movable-but-not-copyable types whitelisted above. -template -typename enable_if::value, T>::type& CallbackForward(T& t) { - return t; -} - -template -typename enable_if::value, T>::type CallbackForward(T& t) { - return t.Pass(); -} - -} // namespace cef_internal -} // namespace base - -#endif // CEF_INCLUDE_BASE_INTERNAL_CEF_CALLBACK_INTERNAL_H_ diff --git a/tool_kits/cef/cef_wrapper/include/base/internal/cef_lock_impl.h b/tool_kits/cef/cef_wrapper/include/base/internal/cef_lock_impl.h deleted file mode 100644 index 470547fe..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/internal/cef_lock_impl.h +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) 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. - -// Do not include this header file directly. Use base/cef_lock.h instead. - -#ifndef CEF_INCLUDE_BASE_INTERNAL_CEF_LOCK_IMPL_H_ -#define CEF_INCLUDE_BASE_INTERNAL_CEF_LOCK_IMPL_H_ - -#include "include/base/cef_build.h" - -#if defined(OS_WIN) -#include -#elif defined(OS_POSIX) -#include -#endif - -#include "include/base/cef_macros.h" - -namespace base { -namespace cef_internal { - -// This class implements the underlying platform-specific spin-lock mechanism -// used for the Lock class. Most users should not use LockImpl directly, but -// should instead use Lock. -class LockImpl { - public: -#if defined(OS_WIN) - typedef CRITICAL_SECTION NativeHandle; -#elif defined(OS_POSIX) - typedef pthread_mutex_t NativeHandle; -#endif - - LockImpl(); - ~LockImpl(); - - // If the lock is not held, take it and return true. If the lock is already - // held by something else, immediately return false. - bool Try(); - - // Take the lock, blocking until it is available if necessary. - void Lock(); - - // Release the lock. This must only be called by the lock's holder: after - // a successful call to Try, or a call to Lock. - void Unlock(); - - // Return the native underlying lock. - // TODO(awalker): refactor lock and condition variables so that this is - // unnecessary. - NativeHandle* native_handle() { return &native_handle_; } - - private: - NativeHandle native_handle_; - - DISALLOW_COPY_AND_ASSIGN(LockImpl); -}; - -} // namespace cef_internal -} // namespace base - -#endif // CEF_INCLUDE_BASE_INTERNAL_CEF_LOCK_IMPL_H_ diff --git a/tool_kits/cef/cef_wrapper/include/base/internal/cef_raw_scoped_refptr_mismatch_checker.h b/tool_kits/cef/cef_wrapper/include/base/internal/cef_raw_scoped_refptr_mismatch_checker.h deleted file mode 100644 index 8584fcd7..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/internal/cef_raw_scoped_refptr_mismatch_checker.h +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) 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. - -// Do not include this header file directly. Use base/cef_callback.h instead. - -#ifndef CEF_INCLUDE_BASE_INTERNAL_CEF_RAW_SCOPED_REFPTR_MISMATCH_CHECKER_H_ -#define CEF_INCLUDE_BASE_INTERNAL_CEF_RAW_SCOPED_REFPTR_MISMATCH_CHECKER_H_ - -#include "include/base/cef_build.h" -#include "include/base/cef_ref_counted.h" -#include "include/base/cef_template_util.h" -#include "include/base/cef_tuple.h" - -// It is dangerous to post a task with a T* argument where T is a subtype of -// RefCounted(Base|ThreadSafeBase), since by the time the parameter is used, the -// object may already have been deleted since it was not held with a -// scoped_refptr. Example: http://crbug.com/27191 -// The following set of traits are designed to generate a compile error -// whenever this antipattern is attempted. - -namespace base { - -namespace cef_internal { - -template -struct NeedsScopedRefptrButGetsRawPtr { -#if defined(OS_WIN) - enum { - value = base::false_type::value - }; -#else - enum { - // Human readable translation: you needed to be a scoped_refptr if you are a - // raw pointer type and are convertible to a RefCounted(Base|ThreadSafeBase) - // type. - value = (is_pointer::value && - (is_convertible::value || - is_convertible::value)) - }; -#endif -}; - -template -struct ParamsUseScopedRefptrCorrectly { - enum { value = 0 }; -}; - -template <> -struct ParamsUseScopedRefptrCorrectly { - enum { value = 1 }; -}; - -template -struct ParamsUseScopedRefptrCorrectly > { - enum { value = !NeedsScopedRefptrButGetsRawPtr::value }; -}; - -template -struct ParamsUseScopedRefptrCorrectly > { - enum { value = !(NeedsScopedRefptrButGetsRawPtr::value || - NeedsScopedRefptrButGetsRawPtr::value) }; -}; - -template -struct ParamsUseScopedRefptrCorrectly > { - enum { value = !(NeedsScopedRefptrButGetsRawPtr::value || - NeedsScopedRefptrButGetsRawPtr::value || - NeedsScopedRefptrButGetsRawPtr::value) }; -}; - -template -struct ParamsUseScopedRefptrCorrectly > { - enum { value = !(NeedsScopedRefptrButGetsRawPtr::value || - NeedsScopedRefptrButGetsRawPtr::value || - NeedsScopedRefptrButGetsRawPtr::value || - NeedsScopedRefptrButGetsRawPtr::value) }; -}; - -template -struct ParamsUseScopedRefptrCorrectly > { - enum { value = !(NeedsScopedRefptrButGetsRawPtr::value || - NeedsScopedRefptrButGetsRawPtr::value || - NeedsScopedRefptrButGetsRawPtr::value || - NeedsScopedRefptrButGetsRawPtr::value || - NeedsScopedRefptrButGetsRawPtr::value) }; -}; - -template -struct ParamsUseScopedRefptrCorrectly > { - enum { value = !(NeedsScopedRefptrButGetsRawPtr::value || - NeedsScopedRefptrButGetsRawPtr::value || - NeedsScopedRefptrButGetsRawPtr::value || - NeedsScopedRefptrButGetsRawPtr::value || - NeedsScopedRefptrButGetsRawPtr::value || - NeedsScopedRefptrButGetsRawPtr::value) }; -}; - -template -struct ParamsUseScopedRefptrCorrectly > { - enum { value = !(NeedsScopedRefptrButGetsRawPtr::value || - NeedsScopedRefptrButGetsRawPtr::value || - NeedsScopedRefptrButGetsRawPtr::value || - NeedsScopedRefptrButGetsRawPtr::value || - NeedsScopedRefptrButGetsRawPtr::value || - NeedsScopedRefptrButGetsRawPtr::value || - NeedsScopedRefptrButGetsRawPtr::value) }; -}; - -template -struct ParamsUseScopedRefptrCorrectly > { - enum { value = !(NeedsScopedRefptrButGetsRawPtr::value || - NeedsScopedRefptrButGetsRawPtr::value || - NeedsScopedRefptrButGetsRawPtr::value || - NeedsScopedRefptrButGetsRawPtr::value || - NeedsScopedRefptrButGetsRawPtr::value || - NeedsScopedRefptrButGetsRawPtr::value || - NeedsScopedRefptrButGetsRawPtr::value || - NeedsScopedRefptrButGetsRawPtr::value) }; -}; - -} // namespace cef_internal - -} // namespace base - -#endif // CEF_INCLUDE_BASE_INTERNAL_CEF_RAW_SCOPED_REFPTR_MISMATCH_CHECKER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/base/internal/cef_thread_checker_impl.h b/tool_kits/cef/cef_wrapper/include/base/internal/cef_thread_checker_impl.h deleted file mode 100644 index 26546981..00000000 --- a/tool_kits/cef/cef_wrapper/include/base/internal/cef_thread_checker_impl.h +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 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. - -// Do not include this header file directly. Use base/cef_thread_checker.h -// instead. - -#ifndef CEF_INCLUDE_BASE_INTERNAL_THREAD_CHECKER_IMPL_H_ -#define CEF_INCLUDE_BASE_INTERNAL_THREAD_CHECKER_IMPL_H_ - -#include "include/base/cef_lock.h" -#include "include/base/cef_platform_thread.h" - -namespace base { -namespace cef_internal { - -// Real implementation of ThreadChecker, for use in debug mode, or -// for temporary use in release mode (e.g. to CHECK on a threading issue -// seen only in the wild). -// -// Note: You should almost always use the ThreadChecker class to get the -// right version for your build configuration. -class ThreadCheckerImpl { - public: - ThreadCheckerImpl(); - ~ThreadCheckerImpl(); - - bool CalledOnValidThread() const; - - // Changes the thread that is checked for in CalledOnValidThread. This may - // be useful when an object may be created on one thread and then used - // exclusively on another thread. - void DetachFromThread(); - - private: - void EnsureThreadIdAssigned() const; - - mutable base::Lock lock_; - // This is mutable so that CalledOnValidThread can set it. - // It's guarded by |lock_|. - mutable PlatformThreadRef valid_thread_id_; -}; - -} // namespace cef_internal -} // namespace base - -#endif // CEF_INCLUDE_BASE_INTERNAL_THREAD_CHECKER_IMPL_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_app_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_app_capi.h deleted file mode 100644 index d1200774..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_app_capi.h +++ /dev/null @@ -1,189 +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_APP_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_APP_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_browser_process_handler_capi.h" -#include "include/capi/cef_command_line_capi.h" -#include "include/capi/cef_render_process_handler_capi.h" -#include "include/capi/cef_resource_bundle_handler_capi.h" -#include "include/capi/cef_scheme_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct _cef_app_t; - -/// -// Implement this structure to provide handler implementations. Methods will be -// called by the process and/or thread indicated. -/// -typedef struct _cef_app_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Provides an opportunity to view and/or modify command-line arguments before - // processing by CEF and Chromium. The |process_type| value will be NULL for - // the browser process. Do not keep a reference to the cef_command_line_t - // object passed to this function. The CefSettings.command_line_args_disabled - // value can be used to start with an NULL command-line object. Any values - // specified in CefSettings that equate to command-line arguments will be set - // before this function is called. Be cautious when using this function to - // modify command-line arguments for non-browser processes as this may result - // in undefined behavior including crashes. - /// - void (CEF_CALLBACK *on_before_command_line_processing)( - struct _cef_app_t* self, const cef_string_t* process_type, - struct _cef_command_line_t* command_line); - - /// - // Provides an opportunity to register custom schemes. Do not keep a reference - // to the |registrar| object. This function is called on the main thread for - // each process and the registered schemes should be the same across all - // processes. - /// - void (CEF_CALLBACK *on_register_custom_schemes)(struct _cef_app_t* self, - struct _cef_scheme_registrar_t* registrar); - - /// - // Return the handler for resource bundle events. If - // CefSettings.pack_loading_disabled is true (1) a handler must be returned. - // If no handler is returned resources will be loaded from pack files. This - // function is called by the browser and render processes on multiple threads. - /// - struct _cef_resource_bundle_handler_t* ( - CEF_CALLBACK *get_resource_bundle_handler)(struct _cef_app_t* self); - - /// - // Return the handler for functionality specific to the browser process. This - // function is called on multiple threads in the browser process. - /// - struct _cef_browser_process_handler_t* ( - CEF_CALLBACK *get_browser_process_handler)(struct _cef_app_t* self); - - /// - // Return the handler for functionality specific to the render process. This - // function is called on the render process main thread. - /// - struct _cef_render_process_handler_t* ( - CEF_CALLBACK *get_render_process_handler)(struct _cef_app_t* self); -} cef_app_t; - - -/// -// This function should be called from the application entry point function to -// execute a secondary process. It can be used to run secondary processes from -// the browser client executable (default behavior) or from a separate -// executable specified by the CefSettings.browser_subprocess_path value. If -// called for the browser process (identified by no "type" command-line value) -// it will return immediately with a value of -1. If called for a recognized -// secondary process it will block until the process should exit and then return -// the process exit code. The |application| parameter may be NULL. The -// |windows_sandbox_info| parameter is only used on Windows and may be NULL (see -// cef_sandbox_win.h for details). -/// -CEF_EXPORT int cef_execute_process(const struct _cef_main_args_t* args, - cef_app_t* application, void* windows_sandbox_info); - -/// -// This function should be called on the main application thread to initialize -// the CEF browser process. The |application| parameter may be NULL. A return -// value of true (1) indicates that it succeeded and false (0) indicates that it -// failed. The |windows_sandbox_info| parameter is only used on Windows and may -// be NULL (see cef_sandbox_win.h for details). -/// -CEF_EXPORT int cef_initialize(const struct _cef_main_args_t* args, - const struct _cef_settings_t* settings, cef_app_t* application, - void* windows_sandbox_info); - -/// -// This function should be called on the main application thread to shut down -// the CEF browser process before the application exits. -/// -CEF_EXPORT void cef_shutdown(); - -/// -// Perform a single iteration of CEF message loop processing. This function is -// used to integrate the CEF message loop into an existing application message -// loop. Care must be taken to balance performance against excessive CPU usage. -// This function should only be called on the main application thread and only -// if cef_initialize() is called with a CefSettings.multi_threaded_message_loop -// value of false (0). This function will not block. -/// -CEF_EXPORT void cef_do_message_loop_work(); - -/// -// Run the CEF message loop. Use this function instead of an application- -// provided message loop to get the best balance between performance and CPU -// usage. This function should only be called on the main application thread and -// only if cef_initialize() is called with a -// CefSettings.multi_threaded_message_loop value of false (0). This function -// will block until a quit message is received by the system. -/// -CEF_EXPORT void cef_run_message_loop(); - -/// -// Quit the CEF message loop that was started by calling cef_run_message_loop(). -// This function should only be called on the main application thread and only -// if cef_run_message_loop() was used. -/// -CEF_EXPORT void cef_quit_message_loop(); - -/// -// Set to true (1) before calling Windows APIs like TrackPopupMenu that enter a -// modal message loop. Set to false (0) after exiting the modal message loop. -/// -CEF_EXPORT void cef_set_osmodal_loop(int osModalLoop); - -/// -// Call during process startup to enable High-DPI support on Windows 7 or newer. -// Older versions of Windows should be left DPI-unaware because they do not -// support DirectWrite and GDI fonts are kerned very badly. -/// -CEF_EXPORT void cef_enable_highdpi_support(); - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_APP_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_auth_callback_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_auth_callback_capi.h deleted file mode 100644 index 73ed1d99..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_auth_callback_capi.h +++ /dev/null @@ -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_CEF_AUTH_CALLBACK_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_AUTH_CALLBACK_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Callback structure used for asynchronous continuation of authentication -// requests. -/// -typedef struct _cef_auth_callback_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Continue the authentication request. - /// - void (CEF_CALLBACK *cont)(struct _cef_auth_callback_t* self, - const cef_string_t* username, const cef_string_t* password); - - /// - // Cancel the authentication request. - /// - void (CEF_CALLBACK *cancel)(struct _cef_auth_callback_t* self); -} cef_auth_callback_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_AUTH_CALLBACK_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_base_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_base_capi.h deleted file mode 100644 index ba3a39cb..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_base_capi.h +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -#ifndef CEF_INCLUDE_CAPI_CEF_BASE_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_BASE_CAPI_H_ - -#include - -#include "include/internal/cef_export.h" -#include "include/internal/cef_string.h" -#include "include/internal/cef_string_list.h" -#include "include/internal/cef_string_map.h" -#include "include/internal/cef_string_multimap.h" -#include "include/internal/cef_types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/// -// Structure defining the reference count implementation functions. All -// framework structures must include the cef_base_t structure first. -/// -typedef struct _cef_base_t { - /// - // Size of the data structure. - /// - size_t size; - - /// - // Called to increment the reference count for the object. Should be called - // for every new copy of a pointer to a given object. - /// - void (CEF_CALLBACK *add_ref)(struct _cef_base_t* self); - - /// - // Called to decrement the reference count for the object. If the reference - // count falls to 0 the object should self-delete. Returns true (1) if the - // resulting reference count is 0. - /// - int (CEF_CALLBACK *release)(struct _cef_base_t* self); - - /// - // Returns true (1) if the current reference count is 1. - /// - int (CEF_CALLBACK *has_one_ref)(struct _cef_base_t* self); -} cef_base_t; - - -// Check that the structure |s|, which is defined with a cef_base_t member named -// |base|, is large enough to contain the specified member |f|. -#define CEF_MEMBER_EXISTS(s, f) \ - ((intptr_t)&((s)->f) - (intptr_t)(s) + sizeof((s)->f) <= \ - reinterpret_cast(s)->size) - -#define CEF_MEMBER_MISSING(s, f) (!CEF_MEMBER_EXISTS(s, f) || !((s)->f)) - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_BASE_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_browser_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_browser_capi.h deleted file mode 100644 index dc65c045..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_browser_capi.h +++ /dev/null @@ -1,672 +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_BROWSER_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_BROWSER_CAPI_H_ -#pragma once - -#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_navigation_entry_capi.h" -#include "include/capi/cef_process_message_capi.h" -#include "include/capi/cef_request_context_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct _cef_browser_host_t; -struct _cef_client_t; - -/// -// Structure used to represent a browser window. When used in the browser -// process the functions of this structure may be called on any thread unless -// otherwise indicated in the comments. When used in the render process the -// functions of this structure may only be called on the main thread. -/// -typedef struct _cef_browser_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns the browser host object. This function can only be called in the - // browser process. - /// - struct _cef_browser_host_t* (CEF_CALLBACK *get_host)( - struct _cef_browser_t* self); - - /// - // Returns true (1) if the browser can navigate backwards. - /// - int (CEF_CALLBACK *can_go_back)(struct _cef_browser_t* self); - - /// - // Navigate backwards. - /// - void (CEF_CALLBACK *go_back)(struct _cef_browser_t* self); - - /// - // Returns true (1) if the browser can navigate forwards. - /// - int (CEF_CALLBACK *can_go_forward)(struct _cef_browser_t* self); - - /// - // Navigate forwards. - /// - void (CEF_CALLBACK *go_forward)(struct _cef_browser_t* self); - - /// - // Returns true (1) if the browser is currently loading. - /// - int (CEF_CALLBACK *is_loading)(struct _cef_browser_t* self); - - /// - // Reload the current page. - /// - void (CEF_CALLBACK *reload)(struct _cef_browser_t* self); - - /// - // Reload the current page ignoring any cached data. - /// - void (CEF_CALLBACK *reload_ignore_cache)(struct _cef_browser_t* self); - - /// - // Stop loading the page. - /// - void (CEF_CALLBACK *stop_load)(struct _cef_browser_t* self); - - /// - // Returns the globally unique identifier for this browser. - /// - int (CEF_CALLBACK *get_identifier)(struct _cef_browser_t* self); - - /// - // Returns true (1) if this object is pointing to the same handle as |that| - // object. - /// - int (CEF_CALLBACK *is_same)(struct _cef_browser_t* self, - struct _cef_browser_t* that); - - /// - // Returns true (1) if the window is a popup window. - /// - int (CEF_CALLBACK *is_popup)(struct _cef_browser_t* self); - - /// - // Returns true (1) if a document has been loaded in the browser. - /// - int (CEF_CALLBACK *has_document)(struct _cef_browser_t* self); - - /// - // Returns the main (top-level) frame for the browser window. - /// - struct _cef_frame_t* (CEF_CALLBACK *get_main_frame)( - struct _cef_browser_t* self); - - /// - // Returns the focused frame for the browser window. - /// - struct _cef_frame_t* (CEF_CALLBACK *get_focused_frame)( - struct _cef_browser_t* self); - - /// - // Returns the frame with the specified identifier, or NULL if not found. - /// - struct _cef_frame_t* (CEF_CALLBACK *get_frame_byident)( - struct _cef_browser_t* self, int64 identifier); - - /// - // Returns the frame with the specified name, or NULL if not found. - /// - struct _cef_frame_t* (CEF_CALLBACK *get_frame)(struct _cef_browser_t* self, - const cef_string_t* name); - - /// - // Returns the number of frames that currently exist. - /// - size_t (CEF_CALLBACK *get_frame_count)(struct _cef_browser_t* self); - - /// - // Returns the identifiers of all existing frames. - /// - void (CEF_CALLBACK *get_frame_identifiers)(struct _cef_browser_t* self, - size_t* identifiersCount, int64* identifiers); - - /// - // Returns the names of all existing frames. - /// - void (CEF_CALLBACK *get_frame_names)(struct _cef_browser_t* self, - cef_string_list_t names); - - /// - // Send a message to the specified |target_process|. Returns true (1) if the - // message was sent successfully. - /// - int (CEF_CALLBACK *send_process_message)(struct _cef_browser_t* self, - cef_process_id_t target_process, - struct _cef_process_message_t* message); -} cef_browser_t; - - -/// -// Callback structure for cef_browser_host_t::RunFileDialog. The functions of -// this structure will be called on the browser process UI thread. -/// -typedef struct _cef_run_file_dialog_callback_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Called asynchronously after the file dialog is dismissed. - // |selected_accept_filter| is the 0-based index of the value selected from - // the accept filters array passed to cef_browser_host_t::RunFileDialog. - // |file_paths| will be a single value or a list of values depending on the - // dialog mode. If the selection was cancelled |file_paths| will be NULL. - /// - void (CEF_CALLBACK *on_file_dialog_dismissed)( - struct _cef_run_file_dialog_callback_t* self, int selected_accept_filter, - cef_string_list_t file_paths); -} cef_run_file_dialog_callback_t; - - -/// -// Callback structure for cef_browser_host_t::GetNavigationEntries. The -// functions of this structure will be called on the browser process UI thread. -/// -typedef struct _cef_navigation_entry_visitor_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Method that will be executed. Do not keep a reference to |entry| outside of - // this callback. Return true (1) to continue visiting entries or false (0) to - // stop. |current| is true (1) if this entry is the currently loaded - // navigation entry. |index| is the 0-based index of this entry and |total| is - // the total number of entries. - /// - int (CEF_CALLBACK *visit)(struct _cef_navigation_entry_visitor_t* self, - struct _cef_navigation_entry_t* entry, int current, int index, - int total); -} cef_navigation_entry_visitor_t; - - -/// -// Callback structure for cef_browser_host_t::PrintToPDF. The functions of this -// structure will be called on the browser process UI thread. -/// -typedef struct _cef_pdf_print_callback_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Method that will be executed when the PDF printing has completed. |path| is - // the output path. |ok| will be true (1) if the printing completed - // successfully or false (0) otherwise. - /// - void (CEF_CALLBACK *on_pdf_print_finished)( - struct _cef_pdf_print_callback_t* self, const cef_string_t* path, - int ok); -} cef_pdf_print_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. -// They may be called on any thread in that process unless otherwise indicated -// in the comments. -/// -typedef struct _cef_browser_host_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns the hosted browser object. - /// - struct _cef_browser_t* (CEF_CALLBACK *get_browser)( - struct _cef_browser_host_t* self); - - /// - // Request that the browser close. The JavaScript 'onbeforeunload' event will - // be fired. If |force_close| is false (0) the event handler, if any, will be - // allowed to prompt the user and the user can optionally cancel the close. If - // |force_close| is true (1) the prompt will not be displayed and the close - // will proceed. Results in a call to cef_life_span_handler_t::do_close() if - // the event handler allows the close or if |force_close| is true (1). See - // cef_life_span_handler_t::do_close() documentation for additional usage - // information. - /// - void (CEF_CALLBACK *close_browser)(struct _cef_browser_host_t* self, - int force_close); - - /// - // Set whether the browser is focused. - /// - void (CEF_CALLBACK *set_focus)(struct _cef_browser_host_t* self, int focus); - - /// - // 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. 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 the client for this browser. - /// - struct _cef_client_t* (CEF_CALLBACK *get_client)( - struct _cef_browser_host_t* self); - - /// - // Returns the request context for this browser. - /// - struct _cef_request_context_t* (CEF_CALLBACK *get_request_context)( - struct _cef_browser_host_t* self); - - /// - // Get the current zoom level. The default zoom level is 0.0. This function - // can only be called on the UI thread. - /// - double (CEF_CALLBACK *get_zoom_level)(struct _cef_browser_host_t* self); - - /// - // Change the zoom level to the specified value. Specify 0.0 to reset the zoom - // level. If called on the UI thread the change will be applied immediately. - // Otherwise, the change will be applied asynchronously on the UI thread. - /// - void (CEF_CALLBACK *set_zoom_level)(struct _cef_browser_host_t* self, - double zoomLevel); - - /// - // Call to run a file chooser dialog. Only a single file chooser dialog may be - // pending at any given time. |mode| represents the type of dialog to display. - // |title| to the title to be used for the dialog and may be NULL to show the - // default title ("Open" or "Save" depending on the mode). |default_file_path| - // is the path with optional directory and/or file name component that will be - // initially selected in the dialog. |accept_filters| are used to restrict the - // selectable file types and may any combination of (a) valid lower-cased MIME - // types (e.g. "text/*" or "image/*"), (b) individual file extensions (e.g. - // ".txt" or ".png"), or (c) combined description and file extension delimited - // using "|" and ";" (e.g. "Image Types|.png;.gif;.jpg"). - // |selected_accept_filter| is the 0-based index of the filter that will be - // selected by default. |callback| will be executed after the dialog is - // dismissed or immediately if another dialog is already pending. The dialog - // will be initiated asynchronously on the UI thread. - /// - void (CEF_CALLBACK *run_file_dialog)(struct _cef_browser_host_t* self, - cef_file_dialog_mode_t mode, const cef_string_t* title, - const cef_string_t* default_file_path, cef_string_list_t accept_filters, - int selected_accept_filter, - struct _cef_run_file_dialog_callback_t* callback); - - /// - // Download the file at |url| using cef_download_handler_t. - /// - void (CEF_CALLBACK *start_download)(struct _cef_browser_host_t* self, - const cef_string_t* url); - - /// - // Print the current browser contents. - /// - void (CEF_CALLBACK *print)(struct _cef_browser_host_t* self); - - /// - // Print the current browser contents to the PDF file specified by |path| and - // execute |callback| on completion. The caller is responsible for deleting - // |path| when done. For PDF printing to work on Linux you must implement the - // cef_print_handler_t::GetPdfPaperSize function. - /// - void (CEF_CALLBACK *print_to_pdf)(struct _cef_browser_host_t* self, - const cef_string_t* path, - const struct _cef_pdf_print_settings_t* settings, - struct _cef_pdf_print_callback_t* callback); - - /// - // Search for |searchText|. |identifier| can be used to have multiple searches - // running simultaniously. |forward| indicates whether to search forward or - // backward within the page. |matchCase| indicates whether the search should - // be case-sensitive. |findNext| indicates whether this is the first request - // or a follow-up. The cef_find_handler_t instance, if any, returned via - // cef_client_t::GetFindHandler will be called to report find results. - /// - void (CEF_CALLBACK *find)(struct _cef_browser_host_t* self, int identifier, - const cef_string_t* searchText, int forward, int matchCase, - int findNext); - - /// - // Cancel all searches that are currently going on. - /// - void (CEF_CALLBACK *stop_finding)(struct _cef_browser_host_t* self, - int clearSelection); - - /// - // 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, - struct _cef_client_t* client, - const struct _cef_browser_settings_t* settings, - const cef_point_t* inspect_element_at); - - /// - // 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); - - /// - // Retrieve a snapshot of current navigation entries as values sent to the - // specified visitor. If |current_only| is true (1) only the current - // navigation entry will be sent, otherwise all navigation entries will be - // sent. - /// - void (CEF_CALLBACK *get_navigation_entries)(struct _cef_browser_host_t* self, - struct _cef_navigation_entry_visitor_t* visitor, int current_only); - - /// - // Set whether mouse cursor change is disabled. - /// - void (CEF_CALLBACK *set_mouse_cursor_change_disabled)( - struct _cef_browser_host_t* self, int disabled); - - /// - // Returns true (1) if mouse cursor change is disabled. - /// - int (CEF_CALLBACK *is_mouse_cursor_change_disabled)( - struct _cef_browser_host_t* self); - - /// - // If a misspelled word is currently selected in an editable node calling this - // function will replace it with the specified |word|. - /// - void (CEF_CALLBACK *replace_misspelling)(struct _cef_browser_host_t* self, - const cef_string_t* word); - - /// - // Add the specified |word| to the spelling dictionary. - /// - void (CEF_CALLBACK *add_word_to_dictionary)(struct _cef_browser_host_t* self, - const cef_string_t* word); - - /// - // Returns true (1) if window rendering is disabled. - /// - int (CEF_CALLBACK *is_window_rendering_disabled)( - struct _cef_browser_host_t* self); - - /// - // Notify the browser that the widget has been resized. The browser will first - // call cef_render_handler_t::GetViewRect to get the new size and then call - // cef_render_handler_t::OnPaint asynchronously with the updated regions. This - // function is only used when window rendering is disabled. - /// - void (CEF_CALLBACK *was_resized)(struct _cef_browser_host_t* self); - - /// - // Notify the browser that it has been hidden or shown. Layouting and - // cef_render_handler_t::OnPaint notification will stop when the browser is - // hidden. This function is only used when window rendering is disabled. - /// - void (CEF_CALLBACK *was_hidden)(struct _cef_browser_host_t* self, int hidden); - - /// - // Send a notification to the browser that the screen info has changed. The - // browser will then call cef_render_handler_t::GetScreenInfo to update the - // screen information with the new values. This simulates moving the webview - // window from one display to another, or changing the properties of the - // current display. This function is only used when window rendering is - // disabled. - /// - void (CEF_CALLBACK *notify_screen_info_changed)( - struct _cef_browser_host_t* self); - - /// - // Invalidate the view. The browser will call cef_render_handler_t::OnPaint - // asynchronously. This function is only used when window rendering is - // disabled. - /// - void (CEF_CALLBACK *invalidate)(struct _cef_browser_host_t* self, - cef_paint_element_type_t type); - - /// - // Send a key event to the browser. - /// - void (CEF_CALLBACK *send_key_event)(struct _cef_browser_host_t* self, - const struct _cef_key_event_t* event); - - /// - // Send a mouse click event to the browser. The |x| and |y| coordinates are - // relative to the upper-left corner of the view. - /// - void (CEF_CALLBACK *send_mouse_click_event)(struct _cef_browser_host_t* self, - const struct _cef_mouse_event_t* event, cef_mouse_button_type_t type, - int mouseUp, int clickCount); - - /// - // Send a mouse move event to the browser. The |x| and |y| coordinates are - // relative to the upper-left corner of the view. - /// - void (CEF_CALLBACK *send_mouse_move_event)(struct _cef_browser_host_t* self, - const struct _cef_mouse_event_t* event, int mouseLeave); - - /// - // Send a mouse wheel event to the browser. The |x| and |y| coordinates are - // relative to the upper-left corner of the view. The |deltaX| and |deltaY| - // values represent the movement delta in the X and Y directions respectively. - // In order to scroll inside select popups with window rendering disabled - // cef_render_handler_t::GetScreenPoint should be implemented properly. - /// - void (CEF_CALLBACK *send_mouse_wheel_event)(struct _cef_browser_host_t* self, - const struct _cef_mouse_event_t* event, int deltaX, int deltaY); - - /// - // Send a focus event to the browser. - /// - void (CEF_CALLBACK *send_focus_event)(struct _cef_browser_host_t* self, - int setFocus); - - /// - // Send a capture lost event to the browser. - /// - void (CEF_CALLBACK *send_capture_lost_event)( - struct _cef_browser_host_t* self); - - /// - // Notify the browser that the window hosting it is about to be moved or - // resized. This function is only used on Windows and Linux. - /// - void (CEF_CALLBACK *notify_move_or_resize_started)( - struct _cef_browser_host_t* self); - - /// - // Returns the maximum rate in frames per second (fps) that - // cef_render_handler_t:: OnPaint will be called for a windowless browser. The - // actual fps may be lower if the browser cannot generate frames at the - // requested rate. The minimum value is 1 and the maximum value is 60 (default - // 30). This function can only be called on the UI thread. - /// - int (CEF_CALLBACK *get_windowless_frame_rate)( - struct _cef_browser_host_t* self); - - /// - // Set the maximum rate in frames per second (fps) that cef_render_handler_t:: - // OnPaint will be called for a windowless browser. The actual fps may be - // lower if the browser cannot generate frames at the requested rate. The - // minimum value is 1 and the maximum value is 60 (default 30). Can also be - // set at browser creation via cef_browser_tSettings.windowless_frame_rate. - /// - void (CEF_CALLBACK *set_windowless_frame_rate)( - struct _cef_browser_host_t* self, int frame_rate); - - /// - // Get the NSTextInputContext implementation for enabling IME on Mac when - // window rendering is disabled. - /// - cef_text_input_context_t (CEF_CALLBACK *get_nstext_input_context)( - struct _cef_browser_host_t* self); - - /// - // Handles a keyDown event prior to passing it through the NSTextInputClient - // machinery. - /// - void (CEF_CALLBACK *handle_key_event_before_text_input_client)( - struct _cef_browser_host_t* self, cef_event_handle_t keyEvent); - - /// - // Performs any additional actions after NSTextInputClient handles the event. - /// - void (CEF_CALLBACK *handle_key_event_after_text_input_client)( - struct _cef_browser_host_t* self, cef_event_handle_t keyEvent); - - /// - // Call this function when the user drags the mouse into the web view (before - // calling DragTargetDragOver/DragTargetLeave/DragTargetDrop). |drag_data| - // should not contain file contents as this type of data is not allowed to be - // dragged into the web view. File contents can be removed using - // cef_drag_data_t::ResetFileContents (for example, if |drag_data| comes from - // cef_render_handler_t::StartDragging). This function is only used when - // window rendering is disabled. - /// - void (CEF_CALLBACK *drag_target_drag_enter)(struct _cef_browser_host_t* self, - struct _cef_drag_data_t* drag_data, - const struct _cef_mouse_event_t* event, - cef_drag_operations_mask_t allowed_ops); - - /// - // Call this function each time the mouse is moved across the web view during - // a drag operation (after calling DragTargetDragEnter and before calling - // DragTargetDragLeave/DragTargetDrop). This function is only used when window - // rendering is disabled. - /// - void (CEF_CALLBACK *drag_target_drag_over)(struct _cef_browser_host_t* self, - const struct _cef_mouse_event_t* event, - cef_drag_operations_mask_t allowed_ops); - - /// - // Call this function when the user drags the mouse out of the web view (after - // calling DragTargetDragEnter). This function is only used when window - // rendering is disabled. - /// - void (CEF_CALLBACK *drag_target_drag_leave)(struct _cef_browser_host_t* self); - - /// - // Call this function when the user completes the drag operation by dropping - // the object onto the web view (after calling DragTargetDragEnter). The - // object being dropped is |drag_data|, given as an argument to the previous - // DragTargetDragEnter call. This function is only used when window rendering - // is disabled. - /// - void (CEF_CALLBACK *drag_target_drop)(struct _cef_browser_host_t* self, - const struct _cef_mouse_event_t* event); - - /// - // Call this function when the drag operation started by a - // cef_render_handler_t::StartDragging call has ended either in a drop or by - // being cancelled. |x| and |y| are mouse coordinates relative to the upper- - // left corner of the view. If the web view is both the drag source and the - // drag target then all DragTarget* functions should be called before - // DragSource* mthods. This function is only used when window rendering is - // disabled. - /// - void (CEF_CALLBACK *drag_source_ended_at)(struct _cef_browser_host_t* self, - int x, int y, cef_drag_operations_mask_t op); - - /// - // Call this function when the drag operation started by a - // cef_render_handler_t::StartDragging call has completed. This function may - // be called immediately without first calling DragSourceEndedAt to cancel a - // drag operation. If the web view is both the drag source and the drag target - // then all DragTarget* functions should be called before DragSource* mthods. - // This function is only used when window rendering is disabled. - /// - void (CEF_CALLBACK *drag_source_system_drag_ended)( - struct _cef_browser_host_t* self); -} cef_browser_host_t; - - -/// -// Create a new browser window using the window parameters specified by -// |windowInfo|. All values will be copied internally and the actual window will -// be created on the UI thread. If |request_context| is NULL the global request -// context will be used. This function can be called on any browser process -// thread and will not block. -/// -CEF_EXPORT int cef_browser_host_create_browser( - const cef_window_info_t* windowInfo, struct _cef_client_t* client, - const cef_string_t* url, const struct _cef_browser_settings_t* settings, - struct _cef_request_context_t* request_context); - -/// -// Create a new browser window using the window parameters specified by -// |windowInfo|. If |request_context| is NULL the global request context will be -// used. This function can only be called on the browser process UI thread. -/// -CEF_EXPORT cef_browser_t* cef_browser_host_create_browser_sync( - const cef_window_info_t* windowInfo, struct _cef_client_t* client, - const cef_string_t* url, const struct _cef_browser_settings_t* settings, - struct _cef_request_context_t* request_context); - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_BROWSER_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_browser_process_handler_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_browser_process_handler_capi.h deleted file mode 100644 index 5150be4d..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_browser_process_handler_capi.h +++ /dev/null @@ -1,104 +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_BROWSER_PROCESS_HANDLER_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_BROWSER_PROCESS_HANDLER_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_command_line_capi.h" -#include "include/capi/cef_print_handler_capi.h" -#include "include/capi/cef_values_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Structure used to implement browser process callbacks. The functions of this -// structure will be called on the browser process main thread unless otherwise -// indicated. -/// -typedef struct _cef_browser_process_handler_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Called on the browser process UI thread immediately after the CEF context - // has been initialized. - /// - void (CEF_CALLBACK *on_context_initialized)( - struct _cef_browser_process_handler_t* self); - - /// - // Called before a child process is launched. Will be called on the browser - // process UI thread when launching a render process and on the browser - // process IO thread when launching a GPU or plugin process. Provides an - // opportunity to modify the child process command line. Do not keep a - // reference to |command_line| outside of this function. - /// - void (CEF_CALLBACK *on_before_child_process_launch)( - struct _cef_browser_process_handler_t* self, - struct _cef_command_line_t* command_line); - - /// - // Called on the browser process IO thread after the main thread has been - // created for a new render process. Provides an opportunity to specify extra - // information that will be passed to - // cef_render_process_handler_t::on_render_thread_created() in the render - // process. Do not keep a reference to |extra_info| outside of this function. - /// - void (CEF_CALLBACK *on_render_process_thread_created)( - struct _cef_browser_process_handler_t* self, - struct _cef_list_value_t* extra_info); - - /// - // Return the handler for printing on Linux. If a print handler is not - // provided then printing will not be supported on the Linux platform. - /// - struct _cef_print_handler_t* (CEF_CALLBACK *get_print_handler)( - struct _cef_browser_process_handler_t* self); -} cef_browser_process_handler_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_BROWSER_PROCESS_HANDLER_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_callback_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_callback_capi.h deleted file mode 100644 index 8d3fa011..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_callback_capi.h +++ /dev/null @@ -1,89 +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_CALLBACK_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_CALLBACK_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Generic callback structure used for asynchronous continuation. -/// -typedef struct _cef_callback_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Continue processing. - /// - void (CEF_CALLBACK *cont)(struct _cef_callback_t* self); - - /// - // Cancel processing. - /// - void (CEF_CALLBACK *cancel)(struct _cef_callback_t* self); -} cef_callback_t; - - -/// -// Generic callback structure used for asynchronous completion. -/// -typedef struct _cef_completion_callback_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Method that will be called once the task is complete. - /// - void (CEF_CALLBACK *on_complete)(struct _cef_completion_callback_t* self); -} cef_completion_callback_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_CALLBACK_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_client_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_client_capi.h deleted file mode 100644 index a8ce6fc2..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_client_capi.h +++ /dev/null @@ -1,176 +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_CLIENT_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_context_menu_handler_capi.h" -#include "include/capi/cef_dialog_handler_capi.h" -#include "include/capi/cef_display_handler_capi.h" -#include "include/capi/cef_download_handler_capi.h" -#include "include/capi/cef_drag_handler_capi.h" -#include "include/capi/cef_find_handler_capi.h" -#include "include/capi/cef_focus_handler_capi.h" -#include "include/capi/cef_geolocation_handler_capi.h" -#include "include/capi/cef_jsdialog_handler_capi.h" -#include "include/capi/cef_keyboard_handler_capi.h" -#include "include/capi/cef_life_span_handler_capi.h" -#include "include/capi/cef_load_handler_capi.h" -#include "include/capi/cef_process_message_capi.h" -#include "include/capi/cef_render_handler_capi.h" -#include "include/capi/cef_request_handler_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Implement this structure to provide handler implementations. -/// -typedef struct _cef_client_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Return the handler for context menus. If no handler is provided the default - // implementation will be used. - /// - struct _cef_context_menu_handler_t* (CEF_CALLBACK *get_context_menu_handler)( - struct _cef_client_t* self); - - /// - // Return the handler for dialogs. If no handler is provided the default - // implementation will be used. - /// - struct _cef_dialog_handler_t* (CEF_CALLBACK *get_dialog_handler)( - struct _cef_client_t* self); - - /// - // Return the handler for browser display state events. - /// - struct _cef_display_handler_t* (CEF_CALLBACK *get_display_handler)( - struct _cef_client_t* self); - - /// - // Return the handler for download events. If no handler is returned downloads - // will not be allowed. - /// - struct _cef_download_handler_t* (CEF_CALLBACK *get_download_handler)( - struct _cef_client_t* self); - - /// - // Return the handler for drag events. - /// - struct _cef_drag_handler_t* (CEF_CALLBACK *get_drag_handler)( - struct _cef_client_t* self); - - /// - // Return the handler for find result events. - /// - struct _cef_find_handler_t* (CEF_CALLBACK *get_find_handler)( - struct _cef_client_t* self); - - /// - // Return the handler for focus events. - /// - struct _cef_focus_handler_t* (CEF_CALLBACK *get_focus_handler)( - struct _cef_client_t* self); - - /// - // Return the handler for geolocation permissions requests. If no handler is - // provided geolocation access will be denied by default. - /// - struct _cef_geolocation_handler_t* (CEF_CALLBACK *get_geolocation_handler)( - struct _cef_client_t* self); - - /// - // Return the handler for JavaScript dialogs. If no handler is provided the - // default implementation will be used. - /// - struct _cef_jsdialog_handler_t* (CEF_CALLBACK *get_jsdialog_handler)( - struct _cef_client_t* self); - - /// - // Return the handler for keyboard events. - /// - struct _cef_keyboard_handler_t* (CEF_CALLBACK *get_keyboard_handler)( - struct _cef_client_t* self); - - /// - // Return the handler for browser life span events. - /// - struct _cef_life_span_handler_t* (CEF_CALLBACK *get_life_span_handler)( - struct _cef_client_t* self); - - /// - // Return the handler for browser load status events. - /// - struct _cef_load_handler_t* (CEF_CALLBACK *get_load_handler)( - struct _cef_client_t* self); - - /// - // Return the handler for off-screen rendering events. - /// - struct _cef_render_handler_t* (CEF_CALLBACK *get_render_handler)( - struct _cef_client_t* self); - - /// - // Return the handler for browser request events. - /// - struct _cef_request_handler_t* (CEF_CALLBACK *get_request_handler)( - struct _cef_client_t* self); - - /// - // Called when a new message is received from a different process. Return true - // (1) if the message was handled or false (0) otherwise. Do not keep a - // reference to or attempt to access the message outside of this callback. - /// - int (CEF_CALLBACK *on_process_message_received)(struct _cef_client_t* self, - struct _cef_browser_t* browser, cef_process_id_t source_process, - struct _cef_process_message_t* message); -} cef_client_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_command_line_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_command_line_capi.h deleted file mode 100644 index 0c90356b..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_command_line_capi.h +++ /dev/null @@ -1,213 +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_COMMAND_LINE_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_COMMAND_LINE_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Structure used to create and/or parse command line arguments. Arguments with -// '--', '-' and, on Windows, '/' prefixes are considered switches. Switches -// will always precede any arguments without switch prefixes. Switches can -// optionally have a value specified using the '=' delimiter (e.g. -// "-switch=value"). An argument of "--" will terminate switch parsing with all -// subsequent tokens, regardless of prefix, being interpreted as non-switch -// arguments. Switch names are considered case-insensitive. This structure can -// be used before cef_initialize() is called. -/// -typedef struct _cef_command_line_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns true (1) if this object is valid. Do not call any other functions - // if this function returns false (0). - /// - int (CEF_CALLBACK *is_valid)(struct _cef_command_line_t* self); - - /// - // Returns true (1) if the values of this object are read-only. Some APIs may - // expose read-only objects. - /// - int (CEF_CALLBACK *is_read_only)(struct _cef_command_line_t* self); - - /// - // Returns a writable copy of this object. - /// - struct _cef_command_line_t* (CEF_CALLBACK *copy)( - struct _cef_command_line_t* self); - - /// - // Initialize the command line with the specified |argc| and |argv| values. - // The first argument must be the name of the program. This function is only - // supported on non-Windows platforms. - /// - void (CEF_CALLBACK *init_from_argv)(struct _cef_command_line_t* self, - int argc, const char* const* argv); - - /// - // Initialize the command line with the string returned by calling - // GetCommandLineW(). This function is only supported on Windows. - /// - void (CEF_CALLBACK *init_from_string)(struct _cef_command_line_t* self, - const cef_string_t* command_line); - - /// - // Reset the command-line switches and arguments but leave the program - // component unchanged. - /// - void (CEF_CALLBACK *reset)(struct _cef_command_line_t* self); - - /// - // Retrieve the original command line string as a vector of strings. The argv - // array: { program, [(--|-|/)switch[=value]]*, [--], [argument]* } - /// - void (CEF_CALLBACK *get_argv)(struct _cef_command_line_t* self, - cef_string_list_t argv); - - /// - // Constructs and returns the represented command line string. Use this - // function cautiously because quoting behavior is unclear. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_command_line_string)( - struct _cef_command_line_t* self); - - /// - // Get the program part of the command line string (the first item). - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_program)( - struct _cef_command_line_t* self); - - /// - // Set the program part of the command line string (the first item). - /// - void (CEF_CALLBACK *set_program)(struct _cef_command_line_t* self, - const cef_string_t* program); - - /// - // Returns true (1) if the command line has switches. - /// - int (CEF_CALLBACK *has_switches)(struct _cef_command_line_t* self); - - /// - // Returns true (1) if the command line contains the given switch. - /// - int (CEF_CALLBACK *has_switch)(struct _cef_command_line_t* self, - const cef_string_t* name); - - /// - // Returns the value associated with the given switch. If the switch has no - // value or isn't present this function returns the NULL string. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_switch_value)( - struct _cef_command_line_t* self, const cef_string_t* name); - - /// - // Returns the map of switch names and values. If a switch has no value an - // NULL string is returned. - /// - void (CEF_CALLBACK *get_switches)(struct _cef_command_line_t* self, - cef_string_map_t switches); - - /// - // Add a switch to the end of the command line. If the switch has no value - // pass an NULL value string. - /// - void (CEF_CALLBACK *append_switch)(struct _cef_command_line_t* self, - const cef_string_t* name); - - /// - // Add a switch with the specified value to the end of the command line. - /// - void (CEF_CALLBACK *append_switch_with_value)( - struct _cef_command_line_t* self, const cef_string_t* name, - const cef_string_t* value); - - /// - // True if there are remaining command line arguments. - /// - int (CEF_CALLBACK *has_arguments)(struct _cef_command_line_t* self); - - /// - // Get the remaining command line arguments. - /// - void (CEF_CALLBACK *get_arguments)(struct _cef_command_line_t* self, - cef_string_list_t arguments); - - /// - // Add an argument to the end of the command line. - /// - void (CEF_CALLBACK *append_argument)(struct _cef_command_line_t* self, - const cef_string_t* argument); - - /// - // Insert a command before the current command. Common for debuggers, like - // "valgrind" or "gdb --args". - /// - void (CEF_CALLBACK *prepend_wrapper)(struct _cef_command_line_t* self, - const cef_string_t* wrapper); -} cef_command_line_t; - - -/// -// Create a new cef_command_line_t instance. -/// -CEF_EXPORT cef_command_line_t* cef_command_line_create(); - -/// -// Returns the singleton global cef_command_line_t object. The returned object -// will be read-only. -/// -CEF_EXPORT cef_command_line_t* cef_command_line_get_global(); - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_COMMAND_LINE_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_context_menu_handler_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_context_menu_handler_capi.h deleted file mode 100644 index 8de9a852..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_context_menu_handler_capi.h +++ /dev/null @@ -1,291 +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_CONTEXT_MENU_HANDLER_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_CONTEXT_MENU_HANDLER_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_browser_capi.h" -#include "include/capi/cef_frame_capi.h" -#include "include/capi/cef_menu_model_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct _cef_context_menu_params_t; - -/// -// Callback structure used for continuation of custom context menu display. -/// -typedef struct _cef_run_context_menu_callback_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Complete context menu display by selecting the specified |command_id| and - // |event_flags|. - /// - void (CEF_CALLBACK *cont)(struct _cef_run_context_menu_callback_t* self, - int command_id, cef_event_flags_t event_flags); - - /// - // Cancel context menu display. - /// - void (CEF_CALLBACK *cancel)(struct _cef_run_context_menu_callback_t* self); -} cef_run_context_menu_callback_t; - - -/// -// Implement this structure to handle context menu events. The functions of this -// structure will be called on the UI thread. -/// -typedef struct _cef_context_menu_handler_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Called before a context menu is displayed. |params| provides information - // about the context menu state. |model| initially contains the default - // context menu. The |model| can be cleared to show no context menu or - // modified to show a custom menu. Do not keep references to |params| or - // |model| outside of this callback. - /// - void (CEF_CALLBACK *on_before_context_menu)( - struct _cef_context_menu_handler_t* self, struct _cef_browser_t* browser, - struct _cef_frame_t* frame, struct _cef_context_menu_params_t* params, - struct _cef_menu_model_t* model); - - /// - // Called to allow custom display of the context menu. |params| provides - // information about the context menu state. |model| contains the context menu - // model resulting from OnBeforeContextMenu. For custom display return true - // (1) and execute |callback| either synchronously or asynchronously with the - // selected command ID. For default display return false (0). Do not keep - // references to |params| or |model| outside of this callback. - /// - int (CEF_CALLBACK *run_context_menu)(struct _cef_context_menu_handler_t* self, - struct _cef_browser_t* browser, struct _cef_frame_t* frame, - struct _cef_context_menu_params_t* params, - struct _cef_menu_model_t* model, - struct _cef_run_context_menu_callback_t* callback); - - /// - // Called to execute a command selected from the context menu. Return true (1) - // if the command was handled or false (0) for the default implementation. See - // cef_menu_id_t for the command ids that have default implementations. All - // user-defined command ids should be between MENU_ID_USER_FIRST and - // MENU_ID_USER_LAST. |params| will have the same values as what was passed to - // on_before_context_menu(). Do not keep a reference to |params| outside of - // this callback. - /// - int (CEF_CALLBACK *on_context_menu_command)( - struct _cef_context_menu_handler_t* self, struct _cef_browser_t* browser, - struct _cef_frame_t* frame, struct _cef_context_menu_params_t* params, - int command_id, cef_event_flags_t event_flags); - - /// - // Called when the context menu is dismissed irregardless of whether the menu - // was NULL or a command was selected. - /// - void (CEF_CALLBACK *on_context_menu_dismissed)( - struct _cef_context_menu_handler_t* self, struct _cef_browser_t* browser, - struct _cef_frame_t* frame); -} cef_context_menu_handler_t; - - -/// -// Provides information about the context menu state. The ethods of this -// structure can only be accessed on browser process the UI thread. -/// -typedef struct _cef_context_menu_params_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns the X coordinate of the mouse where the context menu was invoked. - // Coords are relative to the associated RenderView's origin. - /// - int (CEF_CALLBACK *get_xcoord)(struct _cef_context_menu_params_t* self); - - /// - // Returns the Y coordinate of the mouse where the context menu was invoked. - // Coords are relative to the associated RenderView's origin. - /// - int (CEF_CALLBACK *get_ycoord)(struct _cef_context_menu_params_t* self); - - /// - // Returns flags representing the type of node that the context menu was - // invoked on. - /// - cef_context_menu_type_flags_t (CEF_CALLBACK *get_type_flags)( - struct _cef_context_menu_params_t* self); - - /// - // Returns the URL of the link, if any, that encloses the node that the - // context menu was invoked on. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_link_url)( - struct _cef_context_menu_params_t* self); - - /// - // Returns the link URL, if any, to be used ONLY for "copy link address". We - // don't validate this field in the frontend process. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_unfiltered_link_url)( - struct _cef_context_menu_params_t* self); - - /// - // Returns the source URL, if any, for the element that the context menu was - // invoked on. Example of elements with source URLs are img, audio, and video. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_source_url)( - struct _cef_context_menu_params_t* self); - - /// - // Returns true (1) if the context menu was invoked on an image which has non- - // NULL contents. - /// - int (CEF_CALLBACK *has_image_contents)( - struct _cef_context_menu_params_t* self); - - /// - // Returns the URL of the top level page that the context menu was invoked on. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_page_url)( - struct _cef_context_menu_params_t* self); - - /// - // Returns the URL of the subframe that the context menu was invoked on. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_frame_url)( - struct _cef_context_menu_params_t* self); - - /// - // Returns the character encoding of the subframe that the context menu was - // invoked on. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_frame_charset)( - struct _cef_context_menu_params_t* self); - - /// - // Returns the type of context node that the context menu was invoked on. - /// - cef_context_menu_media_type_t (CEF_CALLBACK *get_media_type)( - struct _cef_context_menu_params_t* self); - - /// - // Returns flags representing the actions supported by the media element, if - // any, that the context menu was invoked on. - /// - cef_context_menu_media_state_flags_t (CEF_CALLBACK *get_media_state_flags)( - struct _cef_context_menu_params_t* self); - - /// - // Returns the text of the selection, if any, that the context menu was - // invoked on. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_selection_text)( - struct _cef_context_menu_params_t* self); - - /// - // Returns the text of the misspelled word, if any, that the context menu was - // invoked on. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_misspelled_word)( - struct _cef_context_menu_params_t* self); - - /// - // Returns true (1) if suggestions exist, false (0) otherwise. Fills in - // |suggestions| from the spell check service for the misspelled word if there - // is one. - /// - int (CEF_CALLBACK *get_dictionary_suggestions)( - struct _cef_context_menu_params_t* self, cef_string_list_t suggestions); - - /// - // Returns true (1) if the context menu was invoked on an editable node. - /// - int (CEF_CALLBACK *is_editable)(struct _cef_context_menu_params_t* self); - - /// - // Returns true (1) if the context menu was invoked on an editable node where - // spell-check is enabled. - /// - int (CEF_CALLBACK *is_spell_check_enabled)( - struct _cef_context_menu_params_t* self); - - /// - // Returns flags representing the actions supported by the editable node, if - // any, that the context menu was invoked on. - /// - cef_context_menu_edit_state_flags_t (CEF_CALLBACK *get_edit_state_flags)( - struct _cef_context_menu_params_t* self); - - /// - // Returns true (1) if the context menu contains items specified by the - // renderer process (for example, plugin placeholder or pepper plugin menu - // items). - /// - int (CEF_CALLBACK *is_custom_menu)(struct _cef_context_menu_params_t* self); - - /// - // Returns true (1) if the context menu was invoked from a pepper plugin. - /// - int (CEF_CALLBACK *is_pepper_menu)(struct _cef_context_menu_params_t* self); -} cef_context_menu_params_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_CONTEXT_MENU_HANDLER_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_cookie_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_cookie_capi.h deleted file mode 100644 index b1f4a1d1..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_cookie_capi.h +++ /dev/null @@ -1,232 +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_COOKIE_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_COOKIE_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_callback_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct _cef_cookie_visitor_t; -struct _cef_delete_cookies_callback_t; -struct _cef_set_cookie_callback_t; - -/// -// Structure used for managing cookies. The functions of this structure may be -// called on any thread unless otherwise indicated. -/// -typedef struct _cef_cookie_manager_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Set the schemes supported by this manager. The default schemes ("http", - // "https", "ws" and "wss") will always be supported. If |callback| is non- - // NULL it will be executed asnychronously on the IO thread after the change - // has been applied. Must be called before any cookies are accessed. - /// - void (CEF_CALLBACK *set_supported_schemes)(struct _cef_cookie_manager_t* self, - cef_string_list_t schemes, struct _cef_completion_callback_t* callback); - - /// - // Visit all cookies on the IO thread. The returned cookies are ordered by - // longest path, then by earliest creation date. Returns false (0) if cookies - // cannot be accessed. - /// - int (CEF_CALLBACK *visit_all_cookies)(struct _cef_cookie_manager_t* self, - struct _cef_cookie_visitor_t* visitor); - - /// - // Visit a subset of cookies on the IO thread. The results are filtered by the - // given url scheme, host, domain and path. If |includeHttpOnly| is true (1) - // HTTP-only cookies will also be included in the results. The returned - // cookies are ordered by longest path, then by earliest creation date. - // Returns false (0) if cookies cannot be accessed. - /// - int (CEF_CALLBACK *visit_url_cookies)(struct _cef_cookie_manager_t* self, - const cef_string_t* url, int includeHttpOnly, - struct _cef_cookie_visitor_t* visitor); - - /// - // Sets a cookie given a valid URL and explicit user-provided cookie - // attributes. This function expects each attribute to be well-formed. It will - // check for disallowed characters (e.g. the ';' character is disallowed - // within the cookie value attribute) and fail without setting the cookie if - // such characters are found. If |callback| is non-NULL it will be executed - // asnychronously on the IO thread after the cookie has been set. Returns - // false (0) if an invalid URL is specified or if cookies cannot be accessed. - /// - int (CEF_CALLBACK *set_cookie)(struct _cef_cookie_manager_t* self, - const cef_string_t* url, const struct _cef_cookie_t* cookie, - struct _cef_set_cookie_callback_t* callback); - - /// - // Delete all cookies that match the specified parameters. If both |url| and - // |cookie_name| values are specified all host and domain cookies matching - // both will be deleted. If only |url| is specified all host cookies (but not - // domain cookies) irrespective of path will be deleted. If |url| is NULL all - // cookies for all hosts and domains will be deleted. If |callback| is non- - // NULL it will be executed asnychronously on the IO thread after the cookies - // have been deleted. Returns false (0) if a non-NULL invalid URL is specified - // or if cookies cannot be accessed. Cookies can alternately be deleted using - // the Visit*Cookies() functions. - /// - int (CEF_CALLBACK *delete_cookies)(struct _cef_cookie_manager_t* self, - const cef_string_t* url, const cef_string_t* cookie_name, - struct _cef_delete_cookies_callback_t* callback); - - /// - // Sets the directory path that will be used for storing cookie data. If - // |path| is NULL data will be stored in memory only. Otherwise, data will be - // stored at the specified |path|. To persist session cookies (cookies without - // an expiry date or validity interval) set |persist_session_cookies| to true - // (1). Session cookies are generally intended to be transient and most Web - // browsers do not persist them. If |callback| is non-NULL it will be executed - // asnychronously on the IO thread after the manager's storage has been - // initialized. Returns false (0) if cookies cannot be accessed. - /// - int (CEF_CALLBACK *set_storage_path)(struct _cef_cookie_manager_t* self, - const cef_string_t* path, int persist_session_cookies, - struct _cef_completion_callback_t* callback); - - /// - // Flush the backing store (if any) to disk. If |callback| is non-NULL it will - // be executed asnychronously on the IO thread after the flush is complete. - // Returns false (0) if cookies cannot be accessed. - /// - int (CEF_CALLBACK *flush_store)(struct _cef_cookie_manager_t* self, - struct _cef_completion_callback_t* callback); -} cef_cookie_manager_t; - - -/// -// Returns the global cookie manager. By default data will be stored at -// CefSettings.cache_path if specified or in memory otherwise. If |callback| is -// non-NULL it will be executed asnychronously on the IO thread after the -// manager's storage has been initialized. Using this function is equivalent to -// calling cef_request_tContext::cef_request_context_get_global_context()->get_d -// efault_cookie_manager(). -/// -CEF_EXPORT cef_cookie_manager_t* cef_cookie_manager_get_global_manager( - struct _cef_completion_callback_t* callback); - -/// -// Creates a new cookie manager. If |path| is NULL data will be stored in memory -// only. Otherwise, data will be stored at the specified |path|. To persist -// session cookies (cookies without an expiry date or validity interval) set -// |persist_session_cookies| to true (1). Session cookies are generally intended -// to be transient and most Web browsers do not persist them. If |callback| is -// non-NULL it will be executed asnychronously on the IO thread after the -// manager's storage has been initialized. -/// -CEF_EXPORT cef_cookie_manager_t* cef_cookie_manager_create_manager( - const cef_string_t* path, int persist_session_cookies, - struct _cef_completion_callback_t* callback); - - -/// -// Structure to implement for visiting cookie values. The functions of this -// structure will always be called on the IO thread. -/// -typedef struct _cef_cookie_visitor_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Method that will be called once for each cookie. |count| is the 0-based - // index for the current cookie. |total| is the total number of cookies. Set - // |deleteCookie| to true (1) to delete the cookie currently being visited. - // Return false (0) to stop visiting cookies. This function may never be - // called if no cookies are found. - /// - int (CEF_CALLBACK *visit)(struct _cef_cookie_visitor_t* self, - const struct _cef_cookie_t* cookie, int count, int total, - int* deleteCookie); -} cef_cookie_visitor_t; - - -/// -// Structure to implement to be notified of asynchronous completion via -// cef_cookie_manager_t::set_cookie(). -/// -typedef struct _cef_set_cookie_callback_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Method that will be called upon completion. |success| will be true (1) if - // the cookie was set successfully. - /// - void (CEF_CALLBACK *on_complete)(struct _cef_set_cookie_callback_t* self, - int success); -} cef_set_cookie_callback_t; - - -/// -// Structure to implement to be notified of asynchronous completion via -// cef_cookie_manager_t::delete_cookies(). -/// -typedef struct _cef_delete_cookies_callback_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Method that will be called upon completion. |num_deleted| will be the - // number of cookies that were deleted or -1 if unknown. - /// - void (CEF_CALLBACK *on_complete)(struct _cef_delete_cookies_callback_t* self, - int num_deleted); -} cef_delete_cookies_callback_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_COOKIE_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_dialog_handler_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_dialog_handler_capi.h deleted file mode 100644 index 42a18895..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_dialog_handler_capi.h +++ /dev/null @@ -1,112 +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_DIALOG_HANDLER_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_DIALOG_HANDLER_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_browser_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Callback structure for asynchronous continuation of file dialog requests. -/// -typedef struct _cef_file_dialog_callback_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Continue the file selection. |selected_accept_filter| should be the 0-based - // index of the value selected from the accept filters array passed to - // cef_dialog_handler_t::OnFileDialog. |file_paths| should be a single value - // or a list of values depending on the dialog mode. An NULL |file_paths| - // value is treated the same as calling cancel(). - /// - void (CEF_CALLBACK *cont)(struct _cef_file_dialog_callback_t* self, - int selected_accept_filter, cef_string_list_t file_paths); - - /// - // Cancel the file selection. - /// - void (CEF_CALLBACK *cancel)(struct _cef_file_dialog_callback_t* self); -} cef_file_dialog_callback_t; - - -/// -// Implement this structure to handle dialog events. The functions of this -// structure will be called on the browser process UI thread. -/// -typedef struct _cef_dialog_handler_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Called to run a file chooser dialog. |mode| represents the type of dialog - // to display. |title| to the title to be used for the dialog and may be NULL - // to show the default title ("Open" or "Save" depending on the mode). - // |default_file_path| is the path with optional directory and/or file name - // component that should be initially selected in the dialog. |accept_filters| - // are used to restrict the selectable file types and may any combination of - // (a) valid lower-cased MIME types (e.g. "text/*" or "image/*"), (b) - // individual file extensions (e.g. ".txt" or ".png"), or (c) combined - // description and file extension delimited using "|" and ";" (e.g. "Image - // Types|.png;.gif;.jpg"). |selected_accept_filter| is the 0-based index of - // the filter that should be selected by default. To display a custom dialog - // return true (1) and execute |callback| either inline or at a later time. To - // display the default dialog return false (0). - /// - int (CEF_CALLBACK *on_file_dialog)(struct _cef_dialog_handler_t* self, - struct _cef_browser_t* browser, cef_file_dialog_mode_t mode, - const cef_string_t* title, const cef_string_t* default_file_path, - cef_string_list_t accept_filters, int selected_accept_filter, - struct _cef_file_dialog_callback_t* callback); -} cef_dialog_handler_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_DIALOG_HANDLER_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_display_handler_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_display_handler_capi.h deleted file mode 100644 index 8a1f6c8c..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_display_handler_capi.h +++ /dev/null @@ -1,122 +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_DISPLAY_HANDLER_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_DISPLAY_HANDLER_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_browser_capi.h" -#include "include/capi/cef_frame_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Implement this structure to handle events related to browser display state. -// The functions of this structure will be called on the UI thread. -/// -typedef struct _cef_display_handler_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Called when a frame's address has changed. - /// - void (CEF_CALLBACK *on_address_change)(struct _cef_display_handler_t* self, - struct _cef_browser_t* browser, struct _cef_frame_t* frame, - const cef_string_t* url); - - /// - // Called when the page title changes. - /// - void (CEF_CALLBACK *on_title_change)(struct _cef_display_handler_t* self, - struct _cef_browser_t* browser, const cef_string_t* title); - - /// - // Called when the page icon changes. - /// - void (CEF_CALLBACK *on_favicon_urlchange)(struct _cef_display_handler_t* self, - struct _cef_browser_t* browser, cef_string_list_t icon_urls); - - /// - // Called when web content in the page has toggled fullscreen mode. If - // |fullscreen| is true (1) the content will automatically be sized to fill - // the browser content area. If |fullscreen| is false (0) the content will - // automatically return to its original size and position. The client is - // responsible for resizing the browser if desired. - /// - void (CEF_CALLBACK *on_fullscreen_mode_change)( - struct _cef_display_handler_t* self, struct _cef_browser_t* browser, - int fullscreen); - - /// - // Called when the browser is about to display a tooltip. |text| contains the - // text that will be displayed in the tooltip. To handle the display of the - // tooltip yourself return true (1). Otherwise, you can optionally modify - // |text| and then return false (0) to allow the browser to display the - // tooltip. When window rendering is disabled the application is responsible - // for drawing tooltips and the return value is ignored. - /// - int (CEF_CALLBACK *on_tooltip)(struct _cef_display_handler_t* self, - struct _cef_browser_t* browser, cef_string_t* text); - - /// - // Called when the browser receives a status message. |value| contains the - // text that will be displayed in the status message. - /// - void (CEF_CALLBACK *on_status_message)(struct _cef_display_handler_t* self, - struct _cef_browser_t* browser, const cef_string_t* value); - - /// - // Called to display a console message. Return true (1) to stop the message - // from being output to the console. - /// - int (CEF_CALLBACK *on_console_message)(struct _cef_display_handler_t* self, - struct _cef_browser_t* browser, const cef_string_t* message, - const cef_string_t* source, int line); -} cef_display_handler_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_DISPLAY_HANDLER_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_dom_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_dom_capi.h deleted file mode 100644 index 5bb42d3d..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_dom_capi.h +++ /dev/null @@ -1,341 +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_DOM_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_DOM_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct _cef_domdocument_t; -struct _cef_domnode_t; - -/// -// Structure to implement for visiting the DOM. The functions of this structure -// will be called on the render process main thread. -/// -typedef struct _cef_domvisitor_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Method executed for visiting the DOM. The document object passed to this - // function represents a snapshot of the DOM at the time this function is - // executed. DOM objects are only valid for the scope of this function. Do not - // keep references to or attempt to access any DOM objects outside the scope - // of this function. - /// - void (CEF_CALLBACK *visit)(struct _cef_domvisitor_t* self, - struct _cef_domdocument_t* document); -} cef_domvisitor_t; - - -/// -// Structure used to represent a DOM document. The functions of this structure -// should only be called on the render process main thread thread. -/// -typedef struct _cef_domdocument_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns the document type. - /// - cef_dom_document_type_t (CEF_CALLBACK *get_type)( - struct _cef_domdocument_t* self); - - /// - // Returns the root document node. - /// - struct _cef_domnode_t* (CEF_CALLBACK *get_document)( - struct _cef_domdocument_t* self); - - /// - // Returns the BODY node of an HTML document. - /// - struct _cef_domnode_t* (CEF_CALLBACK *get_body)( - struct _cef_domdocument_t* self); - - /// - // Returns the HEAD node of an HTML document. - /// - struct _cef_domnode_t* (CEF_CALLBACK *get_head)( - struct _cef_domdocument_t* self); - - /// - // Returns the title of an HTML document. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_title)( - struct _cef_domdocument_t* self); - - /// - // Returns the document element with the specified ID value. - /// - struct _cef_domnode_t* (CEF_CALLBACK *get_element_by_id)( - struct _cef_domdocument_t* self, const cef_string_t* id); - - /// - // Returns the node that currently has keyboard focus. - /// - struct _cef_domnode_t* (CEF_CALLBACK *get_focused_node)( - struct _cef_domdocument_t* self); - - /// - // Returns true (1) if a portion of the document is selected. - /// - int (CEF_CALLBACK *has_selection)(struct _cef_domdocument_t* self); - - /// - // Returns the selection offset within the start node. - /// - int (CEF_CALLBACK *get_selection_start_offset)( - struct _cef_domdocument_t* self); - - /// - // Returns the selection offset within the end node. - /// - int (CEF_CALLBACK *get_selection_end_offset)(struct _cef_domdocument_t* self); - - /// - // Returns the contents of this selection as markup. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_selection_as_markup)( - struct _cef_domdocument_t* self); - - /// - // Returns the contents of this selection as text. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_selection_as_text)( - struct _cef_domdocument_t* self); - - /// - // Returns the base URL for the document. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_base_url)( - struct _cef_domdocument_t* self); - - /// - // Returns a complete URL based on the document base URL and the specified - // partial URL. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_complete_url)( - struct _cef_domdocument_t* self, const cef_string_t* partialURL); -} cef_domdocument_t; - - -/// -// Structure used to represent a DOM node. The functions of this structure -// should only be called on the render process main thread. -/// -typedef struct _cef_domnode_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns the type for this node. - /// - cef_dom_node_type_t (CEF_CALLBACK *get_type)(struct _cef_domnode_t* self); - - /// - // Returns true (1) if this is a text node. - /// - int (CEF_CALLBACK *is_text)(struct _cef_domnode_t* self); - - /// - // Returns true (1) if this is an element node. - /// - int (CEF_CALLBACK *is_element)(struct _cef_domnode_t* self); - - /// - // Returns true (1) if this is an editable node. - /// - int (CEF_CALLBACK *is_editable)(struct _cef_domnode_t* self); - - /// - // Returns true (1) if this is a form control element node. - /// - int (CEF_CALLBACK *is_form_control_element)(struct _cef_domnode_t* self); - - /// - // Returns the type of this form control element node. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_form_control_element_type)( - struct _cef_domnode_t* self); - - /// - // Returns true (1) if this object is pointing to the same handle as |that| - // object. - /// - int (CEF_CALLBACK *is_same)(struct _cef_domnode_t* self, - struct _cef_domnode_t* that); - - /// - // Returns the name of this node. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_name)(struct _cef_domnode_t* self); - - /// - // Returns the value of this node. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_value)(struct _cef_domnode_t* self); - - /// - // Set the value of this node. Returns true (1) on success. - /// - int (CEF_CALLBACK *set_value)(struct _cef_domnode_t* self, - const cef_string_t* value); - - /// - // Returns the contents of this node as markup. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_as_markup)( - struct _cef_domnode_t* self); - - /// - // Returns the document associated with this node. - /// - struct _cef_domdocument_t* (CEF_CALLBACK *get_document)( - struct _cef_domnode_t* self); - - /// - // Returns the parent node. - /// - struct _cef_domnode_t* (CEF_CALLBACK *get_parent)( - struct _cef_domnode_t* self); - - /// - // Returns the previous sibling node. - /// - struct _cef_domnode_t* (CEF_CALLBACK *get_previous_sibling)( - struct _cef_domnode_t* self); - - /// - // Returns the next sibling node. - /// - struct _cef_domnode_t* (CEF_CALLBACK *get_next_sibling)( - struct _cef_domnode_t* self); - - /// - // Returns true (1) if this node has child nodes. - /// - int (CEF_CALLBACK *has_children)(struct _cef_domnode_t* self); - - /// - // Return the first child node. - /// - struct _cef_domnode_t* (CEF_CALLBACK *get_first_child)( - struct _cef_domnode_t* self); - - /// - // Returns the last child node. - /// - struct _cef_domnode_t* (CEF_CALLBACK *get_last_child)( - struct _cef_domnode_t* self); - - - // The following functions are valid only for element nodes. - - /// - // Returns the tag name of this element. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_element_tag_name)( - struct _cef_domnode_t* self); - - /// - // Returns true (1) if this element has attributes. - /// - int (CEF_CALLBACK *has_element_attributes)(struct _cef_domnode_t* self); - - /// - // Returns true (1) if this element has an attribute named |attrName|. - /// - int (CEF_CALLBACK *has_element_attribute)(struct _cef_domnode_t* self, - const cef_string_t* attrName); - - /// - // Returns the element attribute named |attrName|. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_element_attribute)( - struct _cef_domnode_t* self, const cef_string_t* attrName); - - /// - // Returns a map of all element attributes. - /// - void (CEF_CALLBACK *get_element_attributes)(struct _cef_domnode_t* self, - cef_string_map_t attrMap); - - /// - // Set the value for the element attribute named |attrName|. Returns true (1) - // on success. - /// - int (CEF_CALLBACK *set_element_attribute)(struct _cef_domnode_t* self, - const cef_string_t* attrName, const cef_string_t* value); - - /// - // Returns the inner text of the element. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_element_inner_text)( - struct _cef_domnode_t* self); -} cef_domnode_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_DOM_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_download_handler_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_download_handler_capi.h deleted file mode 100644 index 0495674e..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_download_handler_capi.h +++ /dev/null @@ -1,137 +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_DOWNLOAD_HANDLER_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_DOWNLOAD_HANDLER_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_browser_capi.h" -#include "include/capi/cef_download_item_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Callback structure used to asynchronously continue a download. -/// -typedef struct _cef_before_download_callback_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Call to continue the download. Set |download_path| to the full file path - // for the download including the file name or leave blank to use the - // suggested name and the default temp directory. Set |show_dialog| to true - // (1) if you do wish to show the default "Save As" dialog. - /// - void (CEF_CALLBACK *cont)(struct _cef_before_download_callback_t* self, - const cef_string_t* download_path, int show_dialog); -} cef_before_download_callback_t; - - -/// -// Callback structure used to asynchronously cancel a download. -/// -typedef struct _cef_download_item_callback_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Call to cancel the download. - /// - void (CEF_CALLBACK *cancel)(struct _cef_download_item_callback_t* self); - - /// - // Call to pause the download. - /// - void (CEF_CALLBACK *pause)(struct _cef_download_item_callback_t* self); - - /// - // Call to resume the download. - /// - void (CEF_CALLBACK *resume)(struct _cef_download_item_callback_t* self); -} cef_download_item_callback_t; - - -/// -// Structure used to handle file downloads. The functions of this structure will -// called on the browser process UI thread. -/// -typedef struct _cef_download_handler_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Called before a download begins. |suggested_name| is the suggested name for - // the download file. By default the download will be canceled. Execute - // |callback| either asynchronously or in this function to continue the - // download if desired. Do not keep a reference to |download_item| outside of - // this function. - /// - void (CEF_CALLBACK *on_before_download)(struct _cef_download_handler_t* self, - struct _cef_browser_t* browser, - struct _cef_download_item_t* download_item, - const cef_string_t* suggested_name, - struct _cef_before_download_callback_t* callback); - - /// - // Called when a download's status or progress information has been updated. - // This may be called multiple times before and after on_before_download(). - // Execute |callback| either asynchronously or in this function to cancel the - // download if desired. Do not keep a reference to |download_item| outside of - // this function. - /// - void (CEF_CALLBACK *on_download_updated)(struct _cef_download_handler_t* self, - struct _cef_browser_t* browser, - struct _cef_download_item_t* download_item, - struct _cef_download_item_callback_t* callback); -} cef_download_handler_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_DOWNLOAD_HANDLER_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_download_item_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_download_item_capi.h deleted file mode 100644 index 13786a01..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_download_item_capi.h +++ /dev/null @@ -1,162 +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_DOWNLOAD_ITEM_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_DOWNLOAD_ITEM_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Structure used to represent a download item. -/// -typedef struct _cef_download_item_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns true (1) if this object is valid. Do not call any other functions - // if this function returns false (0). - /// - int (CEF_CALLBACK *is_valid)(struct _cef_download_item_t* self); - - /// - // Returns true (1) if the download is in progress. - /// - int (CEF_CALLBACK *is_in_progress)(struct _cef_download_item_t* self); - - /// - // Returns true (1) if the download is complete. - /// - int (CEF_CALLBACK *is_complete)(struct _cef_download_item_t* self); - - /// - // Returns true (1) if the download has been canceled or interrupted. - /// - int (CEF_CALLBACK *is_canceled)(struct _cef_download_item_t* self); - - /// - // Returns a simple speed estimate in bytes/s. - /// - int64 (CEF_CALLBACK *get_current_speed)(struct _cef_download_item_t* self); - - /// - // Returns the rough percent complete or -1 if the receive total size is - // unknown. - /// - int (CEF_CALLBACK *get_percent_complete)(struct _cef_download_item_t* self); - - /// - // Returns the total number of bytes. - /// - int64 (CEF_CALLBACK *get_total_bytes)(struct _cef_download_item_t* self); - - /// - // Returns the number of received bytes. - /// - int64 (CEF_CALLBACK *get_received_bytes)(struct _cef_download_item_t* self); - - /// - // Returns the time that the download started. - /// - cef_time_t (CEF_CALLBACK *get_start_time)(struct _cef_download_item_t* self); - - /// - // Returns the time that the download ended. - /// - cef_time_t (CEF_CALLBACK *get_end_time)(struct _cef_download_item_t* self); - - /// - // Returns the full path to the downloaded or downloading file. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_full_path)( - struct _cef_download_item_t* self); - - /// - // Returns the unique identifier for this download. - /// - uint32 (CEF_CALLBACK *get_id)(struct _cef_download_item_t* self); - - /// - // Returns the URL. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_url)( - struct _cef_download_item_t* self); - - /// - // Returns the original URL before any redirections. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_original_url)( - struct _cef_download_item_t* self); - - /// - // Returns the suggested file name. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_suggested_file_name)( - struct _cef_download_item_t* self); - - /// - // Returns the content disposition. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_content_disposition)( - struct _cef_download_item_t* self); - - /// - // Returns the mime type. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_mime_type)( - struct _cef_download_item_t* self); -} cef_download_item_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_DOWNLOAD_ITEM_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_drag_data_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_drag_data_capi.h deleted file mode 100644 index 5f86225f..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_drag_data_capi.h +++ /dev/null @@ -1,211 +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_DRAG_DATA_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_DRAG_DATA_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_stream_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Structure used to represent drag data. The functions of this structure may be -// called on any thread. -/// -typedef struct _cef_drag_data_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns a copy of the current object. - /// - struct _cef_drag_data_t* (CEF_CALLBACK *clone)(struct _cef_drag_data_t* self); - - /// - // Returns true (1) if this object is read-only. - /// - int (CEF_CALLBACK *is_read_only)(struct _cef_drag_data_t* self); - - /// - // Returns true (1) if the drag data is a link. - /// - int (CEF_CALLBACK *is_link)(struct _cef_drag_data_t* self); - - /// - // Returns true (1) if the drag data is a text or html fragment. - /// - int (CEF_CALLBACK *is_fragment)(struct _cef_drag_data_t* self); - - /// - // Returns true (1) if the drag data is a file. - /// - int (CEF_CALLBACK *is_file)(struct _cef_drag_data_t* self); - - /// - // Return the link URL that is being dragged. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_link_url)( - struct _cef_drag_data_t* self); - - /// - // Return the title associated with the link being dragged. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_link_title)( - struct _cef_drag_data_t* self); - - /// - // Return the metadata, if any, associated with the link being dragged. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_link_metadata)( - struct _cef_drag_data_t* self); - - /// - // Return the plain text fragment that is being dragged. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_fragment_text)( - struct _cef_drag_data_t* self); - - /// - // Return the text/html fragment that is being dragged. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_fragment_html)( - struct _cef_drag_data_t* self); - - /// - // Return the base URL that the fragment came from. This value is used for - // resolving relative URLs and may be NULL. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_fragment_base_url)( - struct _cef_drag_data_t* self); - - /// - // Return the name of the file being dragged out of the browser window. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_file_name)( - struct _cef_drag_data_t* self); - - /// - // Write the contents of the file being dragged out of the web view into - // |writer|. Returns the number of bytes sent to |writer|. If |writer| is NULL - // this function will return the size of the file contents in bytes. Call - // get_file_name() to get a suggested name for the file. - /// - size_t (CEF_CALLBACK *get_file_contents)(struct _cef_drag_data_t* self, - struct _cef_stream_writer_t* writer); - - /// - // Retrieve the list of file names that are being dragged into the browser - // window. - /// - int (CEF_CALLBACK *get_file_names)(struct _cef_drag_data_t* self, - cef_string_list_t names); - - /// - // Set the link URL that is being dragged. - /// - void (CEF_CALLBACK *set_link_url)(struct _cef_drag_data_t* self, - const cef_string_t* url); - - /// - // Set the title associated with the link being dragged. - /// - void (CEF_CALLBACK *set_link_title)(struct _cef_drag_data_t* self, - const cef_string_t* title); - - /// - // Set the metadata associated with the link being dragged. - /// - void (CEF_CALLBACK *set_link_metadata)(struct _cef_drag_data_t* self, - const cef_string_t* data); - - /// - // Set the plain text fragment that is being dragged. - /// - void (CEF_CALLBACK *set_fragment_text)(struct _cef_drag_data_t* self, - const cef_string_t* text); - - /// - // Set the text/html fragment that is being dragged. - /// - void (CEF_CALLBACK *set_fragment_html)(struct _cef_drag_data_t* self, - const cef_string_t* html); - - /// - // Set the base URL that the fragment came from. - /// - void (CEF_CALLBACK *set_fragment_base_url)(struct _cef_drag_data_t* self, - const cef_string_t* base_url); - - /// - // Reset the file contents. You should do this before calling - // cef_browser_host_t::DragTargetDragEnter as the web view does not allow us - // to drag in this kind of data. - /// - void (CEF_CALLBACK *reset_file_contents)(struct _cef_drag_data_t* self); - - /// - // Add a file that is being dragged into the webview. - /// - void (CEF_CALLBACK *add_file)(struct _cef_drag_data_t* self, - const cef_string_t* path, const cef_string_t* display_name); -} cef_drag_data_t; - - -/// -// Create a new cef_drag_data_t object. -/// -CEF_EXPORT cef_drag_data_t* cef_drag_data_create(); - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_DRAG_DATA_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_drag_handler_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_drag_handler_capi.h deleted file mode 100644 index efb90393..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_drag_handler_capi.h +++ /dev/null @@ -1,87 +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_DRAG_HANDLER_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_DRAG_HANDLER_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_browser_capi.h" -#include "include/capi/cef_drag_data_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Implement this structure to handle events related to dragging. The functions -// of this structure will be called on the UI thread. -/// -typedef struct _cef_drag_handler_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Called when an external drag event enters the browser window. |dragData| - // contains the drag event data and |mask| represents the type of drag - // operation. Return false (0) for default drag handling behavior or true (1) - // to cancel the drag event. - /// - int (CEF_CALLBACK *on_drag_enter)(struct _cef_drag_handler_t* self, - struct _cef_browser_t* browser, struct _cef_drag_data_t* dragData, - cef_drag_operations_mask_t mask); - - /// - // Called whenever draggable regions for the browser window change. These can - // be specified using the '-webkit-app-region: drag/no-drag' CSS-property. If - // draggable regions are never defined in a document this function will also - // never be called. If the last draggable region is removed from a document - // this function will be called with an NULL vector. - /// - void (CEF_CALLBACK *on_draggable_regions_changed)( - struct _cef_drag_handler_t* self, struct _cef_browser_t* browser, - size_t regionsCount, cef_draggable_region_t const* regions); -} cef_drag_handler_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_DRAG_HANDLER_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_find_handler_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_find_handler_capi.h deleted file mode 100644 index d020f3ef..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_find_handler_capi.h +++ /dev/null @@ -1,78 +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_FIND_HANDLER_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_FIND_HANDLER_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_browser_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Implement this structure to handle events related to find results. The -// functions of this structure will be called on the UI thread. -/// -typedef struct _cef_find_handler_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Called to report find results returned by cef_browser_host_t::find(). - // |identifer| is the identifier passed to find(), |count| is the number of - // matches currently identified, |selectionRect| is the location of where the - // match was found (in window coordinates), |activeMatchOrdinal| is the - // current position in the search results, and |finalUpdate| is true (1) if - // this is the last find notification. - /// - void (CEF_CALLBACK *on_find_result)(struct _cef_find_handler_t* self, - struct _cef_browser_t* browser, int identifier, int count, - const cef_rect_t* selectionRect, int activeMatchOrdinal, - int finalUpdate); -} cef_find_handler_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_FIND_HANDLER_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_focus_handler_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_focus_handler_capi.h deleted file mode 100644 index 9ec0f1b5..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_focus_handler_capi.h +++ /dev/null @@ -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_CEF_FOCUS_HANDLER_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_FOCUS_HANDLER_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_browser_capi.h" -#include "include/capi/cef_dom_capi.h" -#include "include/capi/cef_frame_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Implement this structure to handle events related to focus. The functions of -// this structure will be called on the UI thread. -/// -typedef struct _cef_focus_handler_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Called when the browser component is about to loose focus. For instance, if - // focus was on the last HTML element and the user pressed the TAB key. |next| - // will be true (1) if the browser is giving focus to the next component and - // false (0) if the browser is giving focus to the previous component. - /// - void (CEF_CALLBACK *on_take_focus)(struct _cef_focus_handler_t* self, - struct _cef_browser_t* browser, int next); - - /// - // Called when the browser component is requesting focus. |source| indicates - // where the focus request is originating from. Return false (0) to allow the - // focus to be set or true (1) to cancel setting the focus. - /// - int (CEF_CALLBACK *on_set_focus)(struct _cef_focus_handler_t* self, - struct _cef_browser_t* browser, cef_focus_source_t source); - - /// - // Called when the browser component has received focus. - /// - void (CEF_CALLBACK *on_got_focus)(struct _cef_focus_handler_t* self, - struct _cef_browser_t* browser); -} cef_focus_handler_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_FOCUS_HANDLER_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_frame_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_frame_capi.h deleted file mode 100644 index a0bcd930..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_frame_capi.h +++ /dev/null @@ -1,221 +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_FRAME_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_FRAME_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_dom_capi.h" -#include "include/capi/cef_request_capi.h" -#include "include/capi/cef_stream_capi.h" -#include "include/capi/cef_string_visitor_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct _cef_browser_t; -struct _cef_v8context_t; - -/// -// Structure used to represent a frame in the browser window. When used in the -// browser process the functions of this structure may be called on any thread -// unless otherwise indicated in the comments. When used in the render process -// the functions of this structure may only be called on the main thread. -/// -typedef struct _cef_frame_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // True if this object is currently attached to a valid frame. - /// - int (CEF_CALLBACK *is_valid)(struct _cef_frame_t* self); - - /// - // Execute undo in this frame. - /// - void (CEF_CALLBACK *undo)(struct _cef_frame_t* self); - - /// - // Execute redo in this frame. - /// - void (CEF_CALLBACK *redo)(struct _cef_frame_t* self); - - /// - // Execute cut in this frame. - /// - void (CEF_CALLBACK *cut)(struct _cef_frame_t* self); - - /// - // Execute copy in this frame. - /// - void (CEF_CALLBACK *copy)(struct _cef_frame_t* self); - - /// - // Execute paste in this frame. - /// - void (CEF_CALLBACK *paste)(struct _cef_frame_t* self); - - /// - // Execute delete in this frame. - /// - void (CEF_CALLBACK *del)(struct _cef_frame_t* self); - - /// - // Execute select all in this frame. - /// - void (CEF_CALLBACK *select_all)(struct _cef_frame_t* self); - - /// - // Save this frame's HTML source to a temporary file and open it in the - // default text viewing application. This function can only be called from the - // browser process. - /// - void (CEF_CALLBACK *view_source)(struct _cef_frame_t* self); - - /// - // Retrieve this frame's HTML source as a string sent to the specified - // visitor. - /// - void (CEF_CALLBACK *get_source)(struct _cef_frame_t* self, - struct _cef_string_visitor_t* visitor); - - /// - // Retrieve this frame's display text as a string sent to the specified - // visitor. - /// - void (CEF_CALLBACK *get_text)(struct _cef_frame_t* self, - struct _cef_string_visitor_t* visitor); - - /// - // Load the request represented by the |request| object. - /// - void (CEF_CALLBACK *load_request)(struct _cef_frame_t* self, - struct _cef_request_t* request); - - /// - // Load the specified |url|. - /// - void (CEF_CALLBACK *load_url)(struct _cef_frame_t* self, - const cef_string_t* url); - - /// - // Load the contents of |string_val| with the specified dummy |url|. |url| - // should have a standard scheme (for example, http scheme) or behaviors like - // link clicks and web security restrictions may not behave as expected. - /// - void (CEF_CALLBACK *load_string)(struct _cef_frame_t* self, - const cef_string_t* string_val, const cef_string_t* url); - - /// - // Execute a string of JavaScript code in this frame. The |script_url| - // parameter is the URL where the script in question can be found, if any. The - // renderer may request this URL to show the developer the source of the - // error. The |start_line| parameter is the base line number to use for error - // reporting. - /// - void (CEF_CALLBACK *execute_java_script)(struct _cef_frame_t* self, - const cef_string_t* code, const cef_string_t* script_url, - int start_line); - - /// - // Returns true (1) if this is the main (top-level) frame. - /// - int (CEF_CALLBACK *is_main)(struct _cef_frame_t* self); - - /// - // Returns true (1) if this is the focused frame. - /// - int (CEF_CALLBACK *is_focused)(struct _cef_frame_t* self); - - /// - // Returns the name for this frame. If the frame has an assigned name (for - // example, set via the iframe "name" attribute) then that value will be - // returned. Otherwise a unique name will be constructed based on the frame - // parent hierarchy. The main (top-level) frame will always have an NULL name - // value. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_name)(struct _cef_frame_t* self); - - /// - // Returns the globally unique identifier for this frame or < 0 if the - // underlying frame does not yet exist. - /// - int64 (CEF_CALLBACK *get_identifier)(struct _cef_frame_t* self); - - /// - // Returns the parent of this frame or NULL if this is the main (top-level) - // frame. - /// - struct _cef_frame_t* (CEF_CALLBACK *get_parent)(struct _cef_frame_t* self); - - /// - // Returns the URL currently loaded in this frame. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_url)(struct _cef_frame_t* self); - - /// - // Returns the browser that this frame belongs to. - /// - struct _cef_browser_t* (CEF_CALLBACK *get_browser)(struct _cef_frame_t* self); - - /// - // Get the V8 context associated with the frame. This function can only be - // called from the render process. - /// - struct _cef_v8context_t* (CEF_CALLBACK *get_v8context)( - struct _cef_frame_t* self); - - /// - // Visit the DOM document. This function can only be called from the render - // process. - /// - void (CEF_CALLBACK *visit_dom)(struct _cef_frame_t* self, - struct _cef_domvisitor_t* visitor); -} cef_frame_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_FRAME_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_geolocation_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_geolocation_capi.h deleted file mode 100644 index c8a24f79..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_geolocation_capi.h +++ /dev/null @@ -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. -// -// --------------------------------------------------------------------------- -// -// 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_GEOLOCATION_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_GEOLOCATION_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Implement this structure to receive geolocation updates. The functions of -// this structure will be called on the browser process UI thread. -/// -typedef struct _cef_get_geolocation_callback_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Called with the 'best available' location information or, if the location - // update failed, with error information. - /// - void (CEF_CALLBACK *on_location_update)( - struct _cef_get_geolocation_callback_t* self, - const struct _cef_geoposition_t* position); -} cef_get_geolocation_callback_t; - - -/// -// Request a one-time geolocation update. This function bypasses any user -// permission checks so should only be used by code that is allowed to access -// location information. -/// -CEF_EXPORT int cef_get_geolocation(cef_get_geolocation_callback_t* callback); - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_GEOLOCATION_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_geolocation_handler_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_geolocation_handler_capi.h deleted file mode 100644 index edf10331..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_geolocation_handler_capi.h +++ /dev/null @@ -1,105 +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_GEOLOCATION_HANDLER_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_GEOLOCATION_HANDLER_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_browser_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Callback structure used for asynchronous continuation of geolocation -// permission requests. -/// -typedef struct _cef_geolocation_callback_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Call to allow or deny geolocation access. - /// - void (CEF_CALLBACK *cont)(struct _cef_geolocation_callback_t* self, - int allow); -} cef_geolocation_callback_t; - - -/// -// Implement this structure to handle events related to geolocation permission -// requests. The functions of this structure will be called on the browser -// process UI thread. -/// -typedef struct _cef_geolocation_handler_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Called when a page requests permission to access geolocation information. - // |requesting_url| is the URL requesting permission and |request_id| is the - // unique ID for the permission request. Return true (1) and call - // cef_geolocation_callback_t::cont() either in this function or at a later - // time to continue or cancel the request. Return false (0) to cancel the - // request immediately. - /// - int (CEF_CALLBACK *on_request_geolocation_permission)( - struct _cef_geolocation_handler_t* self, struct _cef_browser_t* browser, - const cef_string_t* requesting_url, int request_id, - struct _cef_geolocation_callback_t* callback); - - /// - // Called when a geolocation access request is canceled. |request_id| is the - // unique ID for the permission request. - /// - void (CEF_CALLBACK *on_cancel_geolocation_permission)( - struct _cef_geolocation_handler_t* self, struct _cef_browser_t* browser, - int request_id); -} cef_geolocation_handler_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_GEOLOCATION_HANDLER_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_jsdialog_handler_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_jsdialog_handler_capi.h deleted file mode 100644 index b12bc4be..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_jsdialog_handler_capi.h +++ /dev/null @@ -1,135 +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_JSDIALOG_HANDLER_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_JSDIALOG_HANDLER_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_browser_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Callback structure used for asynchronous continuation of JavaScript dialog -// requests. -/// -typedef struct _cef_jsdialog_callback_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Continue the JS dialog request. Set |success| to true (1) if the OK button - // was pressed. The |user_input| value should be specified for prompt dialogs. - /// - void (CEF_CALLBACK *cont)(struct _cef_jsdialog_callback_t* self, int success, - const cef_string_t* user_input); -} cef_jsdialog_callback_t; - - -/// -// Implement this structure to handle events related to JavaScript dialogs. The -// functions of this structure will be called on the UI thread. -/// -typedef struct _cef_jsdialog_handler_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // 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, - 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); - - /// - // Called to run a dialog asking the user if they want to leave a page. Return - // false (0) to use the default dialog implementation. 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_before_unload_dialog)( - struct _cef_jsdialog_handler_t* self, struct _cef_browser_t* browser, - const cef_string_t* message_text, int is_reload, - struct _cef_jsdialog_callback_t* callback); - - /// - // Called to cancel any pending dialogs and reset any saved dialog state. Will - // be called due to events like page navigation irregardless of whether any - // dialogs are currently pending. - /// - void (CEF_CALLBACK *on_reset_dialog_state)( - struct _cef_jsdialog_handler_t* self, struct _cef_browser_t* browser); - - /// - // Called when the default implementation dialog is closed. - /// - void (CEF_CALLBACK *on_dialog_closed)(struct _cef_jsdialog_handler_t* self, - struct _cef_browser_t* browser); -} cef_jsdialog_handler_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_JSDIALOG_HANDLER_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_keyboard_handler_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_keyboard_handler_capi.h deleted file mode 100644 index 9cd2e042..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_keyboard_handler_capi.h +++ /dev/null @@ -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_CEF_KEYBOARD_HANDLER_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_KEYBOARD_HANDLER_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_browser_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Implement this structure to handle events related to keyboard input. The -// functions of this structure will be called on the UI thread. -/// -typedef struct _cef_keyboard_handler_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Called before a keyboard event is sent to the renderer. |event| contains - // information about the keyboard event. |os_event| is the operating system - // event message, if any. Return true (1) if the event was handled or false - // (0) otherwise. If the event will be handled in on_key_event() as a keyboard - // shortcut set |is_keyboard_shortcut| to true (1) and return false (0). - /// - int (CEF_CALLBACK *on_pre_key_event)(struct _cef_keyboard_handler_t* self, - struct _cef_browser_t* browser, const struct _cef_key_event_t* event, - cef_event_handle_t os_event, int* is_keyboard_shortcut); - - /// - // Called after the renderer and JavaScript in the page has had a chance to - // handle the event. |event| contains information about the keyboard event. - // |os_event| is the operating system event message, if any. Return true (1) - // if the keyboard event was handled or false (0) otherwise. - /// - int (CEF_CALLBACK *on_key_event)(struct _cef_keyboard_handler_t* self, - struct _cef_browser_t* browser, const struct _cef_key_event_t* event, - cef_event_handle_t os_event); -} cef_keyboard_handler_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_KEYBOARD_HANDLER_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_life_span_handler_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_life_span_handler_capi.h deleted file mode 100644 index b333e0a7..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_life_span_handler_capi.h +++ /dev/null @@ -1,178 +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_LIFE_SPAN_HANDLER_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_LIFE_SPAN_HANDLER_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_browser_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct _cef_client_t; - -/// -// Implement this structure to handle events related to browser life span. The -// functions of this structure will be called on the UI thread unless otherwise -// indicated. -/// -typedef struct _cef_life_span_handler_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Called on the IO thread before a new popup browser is created. The - // |browser| and |frame| values represent the source of the popup request. The - // |target_url| and |target_frame_name| values indicate where the popup - // browser should navigate and may be NULL if not specified with the request. - // The |target_disposition| value indicates where the user intended to open - // the popup (e.g. current tab, new tab, etc). The |user_gesture| value will - // be true (1) if the popup was opened via explicit user gesture (e.g. - // clicking a link) or false (0) if the popup opened automatically (e.g. via - // the DomContentLoaded event). The |popupFeatures| structure contains - // additional information about the requested popup window. To allow creation - // of the popup browser optionally modify |windowInfo|, |client|, |settings| - // and |no_javascript_access| and return false (0). To cancel creation of the - // 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. - /// - int (CEF_CALLBACK *on_before_popup)(struct _cef_life_span_handler_t* self, - struct _cef_browser_t* browser, struct _cef_frame_t* frame, - const cef_string_t* target_url, const cef_string_t* target_frame_name, - cef_window_open_disposition_t target_disposition, int user_gesture, - const struct _cef_popup_features_t* popupFeatures, - struct _cef_window_info_t* windowInfo, struct _cef_client_t** client, - struct _cef_browser_settings_t* settings, int* no_javascript_access); - - /// - // 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 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). - // - // 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. - // - // The cef_life_span_handler_t::on_before_close() function will be called - // immediately before the browser object is destroyed. The application should - // only exit after on_before_close() has been called for all existing - // browsers. - // - // 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. - // - // 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. - // 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. - // 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 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. 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. - /// - int (CEF_CALLBACK *do_close)(struct _cef_life_span_handler_t* self, - struct _cef_browser_t* browser); - - /// - // 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. 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, - struct _cef_browser_t* browser); -} cef_life_span_handler_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_LIFE_SPAN_HANDLER_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_load_handler_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_load_handler_capi.h deleted file mode 100644 index 9ef20c87..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_load_handler_capi.h +++ /dev/null @@ -1,114 +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_LOAD_HANDLER_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_LOAD_HANDLER_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_browser_capi.h" -#include "include/capi/cef_frame_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Implement this structure to handle events related to browser load status. The -// functions of this structure will be called on the browser process UI thread -// or render process main thread (TID_RENDERER). -/// -typedef struct _cef_load_handler_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Called when the loading state has changed. This callback will be executed - // twice -- once when loading is initiated either programmatically or by user - // action, and once when loading is terminated due to completion, cancellation - // of failure. It will be called before any calls to OnLoadStart and after all - // calls to OnLoadError and/or OnLoadEnd. - /// - void (CEF_CALLBACK *on_loading_state_change)(struct _cef_load_handler_t* self, - struct _cef_browser_t* browser, int isLoading, int canGoBack, - int canGoForward); - - /// - // Called when the browser begins loading a frame. The |frame| value will - // never be NULL -- call the is_main() function to check if this frame is the - // main frame. Multiple frames may be loading at the same time. Sub-frames may - // start or continue loading after the main frame load has ended. This - // function will always be called for all frames irrespective of whether the - // request completes successfully. For notification of overall browser load - // status use OnLoadingStateChange instead. - /// - void (CEF_CALLBACK *on_load_start)(struct _cef_load_handler_t* self, - struct _cef_browser_t* browser, struct _cef_frame_t* frame); - - /// - // Called when the browser is done loading a frame. The |frame| value will - // never be NULL -- call the is_main() function to check if this frame is the - // main frame. Multiple frames may be loading at the same time. Sub-frames may - // start or continue loading after the main frame load has ended. This - // function will always be called for all frames irrespective of whether the - // request completes successfully. For notification of overall browser load - // status use OnLoadingStateChange instead. - /// - void (CEF_CALLBACK *on_load_end)(struct _cef_load_handler_t* self, - struct _cef_browser_t* browser, struct _cef_frame_t* frame, - int httpStatusCode); - - /// - // Called when the resource load for a navigation fails or is canceled. - // |errorCode| is the error code number, |errorText| is the error text and - // |failedUrl| is the URL that failed to load. See net\base\net_error_list.h - // for complete descriptions of the error codes. - /// - void (CEF_CALLBACK *on_load_error)(struct _cef_load_handler_t* self, - struct _cef_browser_t* browser, struct _cef_frame_t* frame, - cef_errorcode_t errorCode, const cef_string_t* errorText, - const cef_string_t* failedUrl); -} cef_load_handler_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_LOAD_HANDLER_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_menu_model_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_menu_model_capi.h deleted file mode 100644 index fb9c90f0..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_menu_model_capi.h +++ /dev/null @@ -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. -// -// --------------------------------------------------------------------------- -// -// 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_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_MENU_MODEL_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Supports creation and modification of menus. See cef_menu_id_t for the -// command ids that have default implementations. All user-defined command ids -// should be between MENU_ID_USER_FIRST and MENU_ID_USER_LAST. The functions of -// this structure can only be accessed on the browser process the UI thread. -/// -typedef struct _cef_menu_model_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Clears the menu. Returns true (1) on success. - /// - int (CEF_CALLBACK *clear)(struct _cef_menu_model_t* self); - - /// - // Returns the number of items in this menu. - /// - int (CEF_CALLBACK *get_count)(struct _cef_menu_model_t* self); - - /// - // Add a separator to the menu. Returns true (1) on success. - /// - int (CEF_CALLBACK *add_separator)(struct _cef_menu_model_t* self); - - /// - // Add an item to the menu. Returns true (1) on success. - /// - int (CEF_CALLBACK *add_item)(struct _cef_menu_model_t* self, int command_id, - const cef_string_t* label); - - /// - // Add a check item to the menu. Returns true (1) on success. - /// - int (CEF_CALLBACK *add_check_item)(struct _cef_menu_model_t* self, - int command_id, const cef_string_t* label); - - /// - // Add a radio item to the menu. Only a single item with the specified - // |group_id| can be checked at a time. Returns true (1) on success. - /// - int (CEF_CALLBACK *add_radio_item)(struct _cef_menu_model_t* self, - int command_id, const cef_string_t* label, int group_id); - - /// - // Add a sub-menu to the menu. The new sub-menu is returned. - /// - struct _cef_menu_model_t* (CEF_CALLBACK *add_sub_menu)( - struct _cef_menu_model_t* self, int command_id, - const cef_string_t* label); - - /// - // Insert a separator in the menu at the specified |index|. Returns true (1) - // on success. - /// - int (CEF_CALLBACK *insert_separator_at)(struct _cef_menu_model_t* self, - int index); - - /// - // Insert an item in the menu at the specified |index|. Returns true (1) on - // success. - /// - int (CEF_CALLBACK *insert_item_at)(struct _cef_menu_model_t* self, int index, - int command_id, const cef_string_t* label); - - /// - // Insert a check item in the menu at the specified |index|. Returns true (1) - // on success. - /// - int (CEF_CALLBACK *insert_check_item_at)(struct _cef_menu_model_t* self, - int index, int command_id, const cef_string_t* label); - - /// - // Insert a radio item in the menu at the specified |index|. Only a single - // item with the specified |group_id| can be checked at a time. Returns true - // (1) on success. - /// - int (CEF_CALLBACK *insert_radio_item_at)(struct _cef_menu_model_t* self, - int index, int command_id, const cef_string_t* label, int group_id); - - /// - // Insert a sub-menu in the menu at the specified |index|. The new sub-menu is - // returned. - /// - struct _cef_menu_model_t* (CEF_CALLBACK *insert_sub_menu_at)( - struct _cef_menu_model_t* self, int index, int command_id, - const cef_string_t* label); - - /// - // Removes the item with the specified |command_id|. Returns true (1) on - // success. - /// - int (CEF_CALLBACK *remove)(struct _cef_menu_model_t* self, int command_id); - - /// - // Removes the item at the specified |index|. Returns true (1) on success. - /// - int (CEF_CALLBACK *remove_at)(struct _cef_menu_model_t* self, int index); - - /// - // Returns the index associated with the specified |command_id| or -1 if not - // found due to the command id not existing in the menu. - /// - int (CEF_CALLBACK *get_index_of)(struct _cef_menu_model_t* self, - int command_id); - - /// - // Returns the command id at the specified |index| or -1 if not found due to - // invalid range or the index being a separator. - /// - int (CEF_CALLBACK *get_command_id_at)(struct _cef_menu_model_t* self, - int index); - - /// - // Sets the command id at the specified |index|. Returns true (1) on success. - /// - int (CEF_CALLBACK *set_command_id_at)(struct _cef_menu_model_t* self, - int index, int command_id); - - /// - // Returns the label for the specified |command_id| or NULL if not found. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_label)( - struct _cef_menu_model_t* self, int command_id); - - /// - // Returns the label at the specified |index| or NULL if not found due to - // invalid range or the index being a separator. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_label_at)( - struct _cef_menu_model_t* self, int index); - - /// - // Sets the label for the specified |command_id|. Returns true (1) on success. - /// - int (CEF_CALLBACK *set_label)(struct _cef_menu_model_t* self, int command_id, - const cef_string_t* label); - - /// - // Set the label at the specified |index|. Returns true (1) on success. - /// - int (CEF_CALLBACK *set_label_at)(struct _cef_menu_model_t* self, int index, - const cef_string_t* label); - - /// - // Returns the item type for the specified |command_id|. - /// - cef_menu_item_type_t (CEF_CALLBACK *get_type)(struct _cef_menu_model_t* self, - int command_id); - - /// - // Returns the item type at the specified |index|. - /// - cef_menu_item_type_t (CEF_CALLBACK *get_type_at)( - struct _cef_menu_model_t* self, int index); - - /// - // Returns the group id for the specified |command_id| or -1 if invalid. - /// - int (CEF_CALLBACK *get_group_id)(struct _cef_menu_model_t* self, - int command_id); - - /// - // Returns the group id at the specified |index| or -1 if invalid. - /// - int (CEF_CALLBACK *get_group_id_at)(struct _cef_menu_model_t* self, - int index); - - /// - // Sets the group id for the specified |command_id|. Returns true (1) on - // success. - /// - int (CEF_CALLBACK *set_group_id)(struct _cef_menu_model_t* self, - int command_id, int group_id); - - /// - // Sets the group id at the specified |index|. Returns true (1) on success. - /// - int (CEF_CALLBACK *set_group_id_at)(struct _cef_menu_model_t* self, int index, - int group_id); - - /// - // Returns the submenu for the specified |command_id| or NULL if invalid. - /// - struct _cef_menu_model_t* (CEF_CALLBACK *get_sub_menu)( - struct _cef_menu_model_t* self, int command_id); - - /// - // Returns the submenu at the specified |index| or NULL if invalid. - /// - struct _cef_menu_model_t* (CEF_CALLBACK *get_sub_menu_at)( - struct _cef_menu_model_t* self, int index); - - /// - // Returns true (1) if the specified |command_id| is visible. - /// - int (CEF_CALLBACK *is_visible)(struct _cef_menu_model_t* self, - int command_id); - - /// - // Returns true (1) if the specified |index| is visible. - /// - int (CEF_CALLBACK *is_visible_at)(struct _cef_menu_model_t* self, int index); - - /// - // Change the visibility of the specified |command_id|. Returns true (1) on - // success. - /// - int (CEF_CALLBACK *set_visible)(struct _cef_menu_model_t* self, - int command_id, int visible); - - /// - // Change the visibility at the specified |index|. Returns true (1) on - // success. - /// - int (CEF_CALLBACK *set_visible_at)(struct _cef_menu_model_t* self, int index, - int visible); - - /// - // Returns true (1) if the specified |command_id| is enabled. - /// - int (CEF_CALLBACK *is_enabled)(struct _cef_menu_model_t* self, - int command_id); - - /// - // Returns true (1) if the specified |index| is enabled. - /// - int (CEF_CALLBACK *is_enabled_at)(struct _cef_menu_model_t* self, int index); - - /// - // Change the enabled status of the specified |command_id|. Returns true (1) - // on success. - /// - int (CEF_CALLBACK *set_enabled)(struct _cef_menu_model_t* self, - int command_id, int enabled); - - /// - // Change the enabled status at the specified |index|. Returns true (1) on - // success. - /// - int (CEF_CALLBACK *set_enabled_at)(struct _cef_menu_model_t* self, int index, - int enabled); - - /// - // Returns true (1) if the specified |command_id| is checked. Only applies to - // check and radio items. - /// - int (CEF_CALLBACK *is_checked)(struct _cef_menu_model_t* self, - int command_id); - - /// - // Returns true (1) if the specified |index| is checked. Only applies to check - // and radio items. - /// - int (CEF_CALLBACK *is_checked_at)(struct _cef_menu_model_t* self, int index); - - /// - // Check the specified |command_id|. Only applies to check and radio items. - // Returns true (1) on success. - /// - int (CEF_CALLBACK *set_checked)(struct _cef_menu_model_t* self, - int command_id, int checked); - - /// - // Check the specified |index|. Only applies to check and radio items. Returns - // true (1) on success. - /// - int (CEF_CALLBACK *set_checked_at)(struct _cef_menu_model_t* self, int index, - int checked); - - /// - // Returns true (1) if the specified |command_id| has a keyboard accelerator - // assigned. - /// - int (CEF_CALLBACK *has_accelerator)(struct _cef_menu_model_t* self, - int command_id); - - /// - // Returns true (1) if the specified |index| has a keyboard accelerator - // assigned. - /// - int (CEF_CALLBACK *has_accelerator_at)(struct _cef_menu_model_t* self, - int index); - - /// - // Set the keyboard accelerator for the specified |command_id|. |key_code| can - // be any virtual key or character value. Returns true (1) on success. - /// - int (CEF_CALLBACK *set_accelerator)(struct _cef_menu_model_t* self, - int command_id, int key_code, int shift_pressed, int ctrl_pressed, - int alt_pressed); - - /// - // Set the keyboard accelerator at the specified |index|. |key_code| can be - // any virtual key or character value. Returns true (1) on success. - /// - int (CEF_CALLBACK *set_accelerator_at)(struct _cef_menu_model_t* self, - int index, int key_code, int shift_pressed, int ctrl_pressed, - int alt_pressed); - - /// - // Remove the keyboard accelerator for the specified |command_id|. Returns - // true (1) on success. - /// - int (CEF_CALLBACK *remove_accelerator)(struct _cef_menu_model_t* self, - int command_id); - - /// - // Remove the keyboard accelerator at the specified |index|. Returns true (1) - // on success. - /// - int (CEF_CALLBACK *remove_accelerator_at)(struct _cef_menu_model_t* self, - int index); - - /// - // Retrieves the keyboard accelerator for the specified |command_id|. Returns - // true (1) on success. - /// - int (CEF_CALLBACK *get_accelerator)(struct _cef_menu_model_t* self, - int command_id, int* key_code, int* shift_pressed, int* ctrl_pressed, - int* alt_pressed); - - /// - // Retrieves the keyboard accelerator for the specified |index|. Returns true - // (1) on success. - /// - int (CEF_CALLBACK *get_accelerator_at)(struct _cef_menu_model_t* self, - int index, int* key_code, int* shift_pressed, int* ctrl_pressed, - int* alt_pressed); -} cef_menu_model_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_MENU_MODEL_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_navigation_entry_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_navigation_entry_capi.h deleted file mode 100644 index edd8d251..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_navigation_entry_capi.h +++ /dev/null @@ -1,126 +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_NAVIGATION_ENTRY_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_NAVIGATION_ENTRY_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Structure used to represent an entry in navigation history. -/// -typedef struct _cef_navigation_entry_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns true (1) if this object is valid. Do not call any other functions - // if this function returns false (0). - /// - int (CEF_CALLBACK *is_valid)(struct _cef_navigation_entry_t* self); - - /// - // Returns the actual URL of the page. For some pages this may be data: URL or - // similar. Use get_display_url() to return a display-friendly version. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_url)( - struct _cef_navigation_entry_t* self); - - /// - // Returns a display-friendly version of the URL. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_display_url)( - struct _cef_navigation_entry_t* self); - - /// - // Returns the original URL that was entered by the user before any redirects. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_original_url)( - struct _cef_navigation_entry_t* self); - - /// - // Returns the title set by the page. This value may be NULL. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_title)( - struct _cef_navigation_entry_t* self); - - /// - // Returns the transition type which indicates what the user did to move to - // this page from the previous page. - /// - cef_transition_type_t (CEF_CALLBACK *get_transition_type)( - struct _cef_navigation_entry_t* self); - - /// - // Returns true (1) if this navigation includes post data. - /// - int (CEF_CALLBACK *has_post_data)(struct _cef_navigation_entry_t* self); - - /// - // Returns the time for the last known successful navigation completion. A - // navigation may be completed more than once if the page is reloaded. May be - // 0 if the navigation has not yet completed. - /// - cef_time_t (CEF_CALLBACK *get_completion_time)( - struct _cef_navigation_entry_t* self); - - /// - // Returns the HTTP status code for the last known successful navigation - // response. May be 0 if the response has not yet been received or if the - // navigation has not yet completed. - /// - int (CEF_CALLBACK *get_http_status_code)( - struct _cef_navigation_entry_t* self); -} cef_navigation_entry_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_NAVIGATION_ENTRY_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_origin_whitelist_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_origin_whitelist_capi.h deleted file mode 100644 index 9a632736..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_origin_whitelist_capi.h +++ /dev/null @@ -1,106 +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_ORIGIN_WHITELIST_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_ORIGIN_WHITELIST_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Add an entry to the cross-origin access whitelist. -// -// The same-origin policy restricts how scripts hosted from different origins -// (scheme + domain + port) can communicate. By default, scripts can only access -// resources with the same origin. Scripts hosted on the HTTP and HTTPS schemes -// (but no other schemes) can use the "Access-Control-Allow-Origin" header to -// allow cross-origin requests. For example, https://source.example.com can make -// XMLHttpRequest requests on http://target.example.com if the -// http://target.example.com request returns an "Access-Control-Allow-Origin: -// https://source.example.com" response header. -// -// Scripts in separate frames or iframes and hosted from the same protocol and -// domain suffix can execute cross-origin JavaScript if both pages set the -// document.domain value to the same domain suffix. For example, -// scheme://foo.example.com and scheme://bar.example.com can communicate using -// JavaScript if both domains set document.domain="example.com". -// -// This function is used to allow access to origins that would otherwise violate -// the same-origin policy. Scripts hosted underneath the fully qualified -// |source_origin| URL (like http://www.example.com) will be allowed access to -// all resources hosted on the specified |target_protocol| and |target_domain|. -// If |target_domain| is non-NULL and |allow_target_subdomains| if false (0) -// only exact domain matches will be allowed. If |target_domain| contains a top- -// level domain component (like "example.com") and |allow_target_subdomains| is -// true (1) sub-domain matches will be allowed. If |target_domain| is NULL and -// |allow_target_subdomains| if true (1) all domains and IP addresses will be -// allowed. -// -// This function cannot be used to bypass the restrictions on local or display -// isolated schemes. See the comments on CefRegisterCustomScheme for more -// information. -// -// This function may be called on any thread. Returns false (0) if -// |source_origin| is invalid or the whitelist cannot be accessed. -/// -CEF_EXPORT int cef_add_cross_origin_whitelist_entry( - const cef_string_t* source_origin, const cef_string_t* target_protocol, - const cef_string_t* target_domain, int allow_target_subdomains); - -/// -// Remove an entry from the cross-origin access whitelist. Returns false (0) if -// |source_origin| is invalid or the whitelist cannot be accessed. -/// -CEF_EXPORT int cef_remove_cross_origin_whitelist_entry( - const cef_string_t* source_origin, const cef_string_t* target_protocol, - const cef_string_t* target_domain, int allow_target_subdomains); - -/// -// Remove all entries from the cross-origin access whitelist. Returns false (0) -// if the whitelist cannot be accessed. -/// -CEF_EXPORT int cef_clear_cross_origin_whitelist(); - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_ORIGIN_WHITELIST_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_parser_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_parser_capi.h deleted file mode 100644 index d0c14c88..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_parser_capi.h +++ /dev/null @@ -1,171 +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_PARSER_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_PARSER_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Parse the specified |url| into its component parts. Returns false (0) if the -// URL is NULL or invalid. -/// -CEF_EXPORT int cef_parse_url(const cef_string_t* url, - struct _cef_urlparts_t* parts); - -/// -// Creates a URL from the specified |parts|, which must contain a non-NULL spec -// or a non-NULL host and path (at a minimum), but not both. Returns false (0) -// if |parts| isn't initialized as described. -/// -CEF_EXPORT int cef_create_url(const struct _cef_urlparts_t* parts, - cef_string_t* url); - -/// -// This is a convenience function for formatting a URL in a concise and human- -// 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 |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* languages); - -/// -// Returns the mime type for the specified file extension or an NULL string if -// unknown. -/// -// The resulting string must be freed by calling cef_string_userfree_free(). -CEF_EXPORT cef_string_userfree_t cef_get_mime_type( - const cef_string_t* extension); - -/// -// Get the extensions associated with the given mime type. This should be passed -// in lower case. There could be multiple extensions for a given mime type, like -// "html,htm" for "text/html", or "txt,text,html,..." for "text/*". Any existing -// elements in the provided vector will not be erased. -/// -CEF_EXPORT void cef_get_extensions_for_mime_type(const cef_string_t* mime_type, - cef_string_list_t extensions); - -/// -// Encodes |data| as a base64 string. -/// -// The resulting string must be freed by calling cef_string_userfree_free(). -CEF_EXPORT cef_string_userfree_t cef_base64encode(const void* data, - size_t data_size); - -/// -// Decodes the base64 encoded string |data|. The returned value will be NULL if -// the decoding fails. -/// -CEF_EXPORT struct _cef_binary_value_t* cef_base64decode( - const cef_string_t* data); - -/// -// Escapes characters in |text| which are unsuitable for use as a query -// parameter value. Everything except alphanumerics and -_.!~*'() will be -// converted to "%XX". If |use_plus| is true (1) spaces will change to "+". The -// result is basically the same as encodeURIComponent in Javacript. -/// -// The resulting string must be freed by calling cef_string_userfree_free(). -CEF_EXPORT cef_string_userfree_t cef_uriencode(const cef_string_t* text, - int use_plus); - -/// -// Unescapes |text| and returns the result. Unescaping consists of looking for -// the exact pattern "%XX" where each X is a hex digit and converting to the -// character with the numerical value of those digits (e.g. "i%20=%203%3b" -// unescapes to "i = 3;"). If |convert_to_utf8| is true (1) this function will -// attempt to interpret the initial decoded result as UTF-8. If the result is -// convertable into UTF-8 it will be returned as converted. Otherwise the -// initial decoded result will be returned. The |unescape_rule| parameter -// supports further customization the decoding process. -/// -// The resulting string must be freed by calling cef_string_userfree_free(). -CEF_EXPORT cef_string_userfree_t cef_uridecode(const cef_string_t* text, - int convert_to_utf8, cef_uri_unescape_rule_t unescape_rule); - -/// -// Parses |string| which represents a CSS color value. If |strict| is true (1) -// strict parsing rules will be applied. Returns true (1) on success or false -// (0) on error. If parsing succeeds |color| will be set to the color value -// otherwise |color| will remain unchanged. -/// -CEF_EXPORT int cef_parse_csscolor(const cef_string_t* string, int strict, - cef_color_t* color); - -/// -// Parses the specified |json_string| and returns a dictionary or list -// representation. If JSON parsing fails this function returns NULL. -/// -CEF_EXPORT struct _cef_value_t* cef_parse_json(const cef_string_t* json_string, - cef_json_parser_options_t options); - -/// -// Parses the specified |json_string| and returns a dictionary or list -// representation. If JSON parsing fails this function returns NULL and -// populates |error_code_out| and |error_msg_out| with an error code and a -// formatted error message respectively. -/// -CEF_EXPORT struct _cef_value_t* cef_parse_jsonand_return_error( - const cef_string_t* json_string, cef_json_parser_options_t options, - cef_json_parser_error_t* error_code_out, cef_string_t* error_msg_out); - -/// -// Generates a JSON string from the specified root |node| which should be a -// dictionary or list value. Returns an NULL string on failure. This function -// requires exclusive access to |node| including any underlying data. -/// -// The resulting string must be freed by calling cef_string_userfree_free(). -CEF_EXPORT cef_string_userfree_t cef_write_json(struct _cef_value_t* node, - cef_json_writer_options_t options); - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_PARSER_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_path_util_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_path_util_capi.h deleted file mode 100644 index 23befacc..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_path_util_capi.h +++ /dev/null @@ -1,58 +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_PATH_UTIL_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_PATH_UTIL_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Retrieve the path associated with the specified |key|. Returns true (1) on -// success. Can be called on any thread in the browser process. -/// -CEF_EXPORT int cef_get_path(cef_path_key_t key, cef_string_t* path); - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_PATH_UTIL_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_print_handler_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_print_handler_capi.h deleted file mode 100644 index 119cd086..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_print_handler_capi.h +++ /dev/null @@ -1,150 +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_PRINT_HANDLER_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_PRINT_HANDLER_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_browser_capi.h" -#include "include/capi/cef_print_settings_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Callback structure for asynchronous continuation of print dialog requests. -/// -typedef struct _cef_print_dialog_callback_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Continue printing with the specified |settings|. - /// - void (CEF_CALLBACK *cont)(struct _cef_print_dialog_callback_t* self, - struct _cef_print_settings_t* settings); - - /// - // Cancel the printing. - /// - void (CEF_CALLBACK *cancel)(struct _cef_print_dialog_callback_t* self); -} cef_print_dialog_callback_t; - - -/// -// Callback structure for asynchronous continuation of print job requests. -/// -typedef struct _cef_print_job_callback_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Indicate completion of the print job. - /// - void (CEF_CALLBACK *cont)(struct _cef_print_job_callback_t* self); -} cef_print_job_callback_t; - - -/// -// Implement this structure to handle printing on Linux. The functions of this -// structure will be called on the browser process UI thread. -/// -typedef struct _cef_print_handler_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Called when printing has started for the specified |browser|. This function - // will be called before the other OnPrint*() functions and irrespective of - // how printing was initiated (e.g. cef_browser_host_t::print(), JavaScript - // window.print() or PDF extension print button). - /// - void (CEF_CALLBACK *on_print_start)(struct _cef_print_handler_t* self, - struct _cef_browser_t* browser); - - /// - // Synchronize |settings| with client state. If |get_defaults| is true (1) - // then populate |settings| with the default print settings. Do not keep a - // reference to |settings| outside of this callback. - /// - void (CEF_CALLBACK *on_print_settings)(struct _cef_print_handler_t* self, - struct _cef_print_settings_t* settings, int get_defaults); - - /// - // Show the print dialog. Execute |callback| once the dialog is dismissed. - // Return true (1) if the dialog will be displayed or false (0) to cancel the - // printing immediately. - /// - int (CEF_CALLBACK *on_print_dialog)(struct _cef_print_handler_t* self, - int has_selection, struct _cef_print_dialog_callback_t* callback); - - /// - // Send the print job to the printer. Execute |callback| once the job is - // completed. Return true (1) if the job will proceed or false (0) to cancel - // the job immediately. - /// - int (CEF_CALLBACK *on_print_job)(struct _cef_print_handler_t* self, - const cef_string_t* document_name, const cef_string_t* pdf_file_path, - struct _cef_print_job_callback_t* callback); - - /// - // Reset client state related to printing. - /// - void (CEF_CALLBACK *on_print_reset)(struct _cef_print_handler_t* self); - - /// - // Return the PDF paper size in device units. Used in combination with - // cef_browser_host_t::print_to_pdf(). - /// - cef_size_t (CEF_CALLBACK *get_pdf_paper_size)( - struct _cef_print_handler_t* self, int device_units_per_inch); -} cef_print_handler_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_PRINT_HANDLER_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_print_settings_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_print_settings_capi.h deleted file mode 100644 index b60e10bb..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_print_settings_capi.h +++ /dev/null @@ -1,207 +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_PRINT_SETTINGS_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_PRINT_SETTINGS_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Structure representing print settings. -/// -typedef struct _cef_print_settings_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns true (1) if this object is valid. Do not call any other functions - // if this function returns false (0). - /// - int (CEF_CALLBACK *is_valid)(struct _cef_print_settings_t* self); - - /// - // Returns true (1) if the values of this object are read-only. Some APIs may - // expose read-only objects. - /// - int (CEF_CALLBACK *is_read_only)(struct _cef_print_settings_t* self); - - /// - // Returns a writable copy of this object. - /// - struct _cef_print_settings_t* (CEF_CALLBACK *copy)( - struct _cef_print_settings_t* self); - - /// - // Set the page orientation. - /// - void (CEF_CALLBACK *set_orientation)(struct _cef_print_settings_t* self, - int landscape); - - /// - // Returns true (1) if the orientation is landscape. - /// - int (CEF_CALLBACK *is_landscape)(struct _cef_print_settings_t* self); - - /// - // Set the printer printable area in device units. Some platforms already - // provide flipped area. Set |landscape_needs_flip| to false (0) on those - // platforms to avoid double flipping. - /// - void (CEF_CALLBACK *set_printer_printable_area)( - struct _cef_print_settings_t* self, - const cef_size_t* physical_size_device_units, - const cef_rect_t* printable_area_device_units, - int landscape_needs_flip); - - /// - // Set the device name. - /// - void (CEF_CALLBACK *set_device_name)(struct _cef_print_settings_t* self, - const cef_string_t* name); - - /// - // Get the device name. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_device_name)( - struct _cef_print_settings_t* self); - - /// - // Set the DPI (dots per inch). - /// - void (CEF_CALLBACK *set_dpi)(struct _cef_print_settings_t* self, int dpi); - - /// - // Get the DPI (dots per inch). - /// - int (CEF_CALLBACK *get_dpi)(struct _cef_print_settings_t* self); - - /// - // Set the page ranges. - /// - void (CEF_CALLBACK *set_page_ranges)(struct _cef_print_settings_t* self, - size_t rangesCount, cef_page_range_t const* ranges); - - /// - // Returns the number of page ranges that currently exist. - /// - size_t (CEF_CALLBACK *get_page_ranges_count)( - struct _cef_print_settings_t* self); - - /// - // Retrieve the page ranges. - /// - void (CEF_CALLBACK *get_page_ranges)(struct _cef_print_settings_t* self, - size_t* rangesCount, cef_page_range_t* ranges); - - /// - // Set whether only the selection will be printed. - /// - void (CEF_CALLBACK *set_selection_only)(struct _cef_print_settings_t* self, - int selection_only); - - /// - // Returns true (1) if only the selection will be printed. - /// - int (CEF_CALLBACK *is_selection_only)(struct _cef_print_settings_t* self); - - /// - // Set whether pages will be collated. - /// - void (CEF_CALLBACK *set_collate)(struct _cef_print_settings_t* self, - int collate); - - /// - // Returns true (1) if pages will be collated. - /// - int (CEF_CALLBACK *will_collate)(struct _cef_print_settings_t* self); - - /// - // Set the color model. - /// - void (CEF_CALLBACK *set_color_model)(struct _cef_print_settings_t* self, - cef_color_model_t model); - - /// - // Get the color model. - /// - cef_color_model_t (CEF_CALLBACK *get_color_model)( - struct _cef_print_settings_t* self); - - /// - // Set the number of copies. - /// - void (CEF_CALLBACK *set_copies)(struct _cef_print_settings_t* self, - int copies); - - /// - // Get the number of copies. - /// - int (CEF_CALLBACK *get_copies)(struct _cef_print_settings_t* self); - - /// - // Set the duplex mode. - /// - void (CEF_CALLBACK *set_duplex_mode)(struct _cef_print_settings_t* self, - cef_duplex_mode_t mode); - - /// - // Get the duplex mode. - /// - cef_duplex_mode_t (CEF_CALLBACK *get_duplex_mode)( - struct _cef_print_settings_t* self); -} cef_print_settings_t; - - -/// -// Create a new cef_print_settings_t object. -/// -CEF_EXPORT cef_print_settings_t* cef_print_settings_create(); - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_PRINT_SETTINGS_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_process_message_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_process_message_capi.h deleted file mode 100644 index 3b6a6891..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_process_message_capi.h +++ /dev/null @@ -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. -// -// --------------------------------------------------------------------------- -// -// 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_PROCESS_MESSAGE_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_PROCESS_MESSAGE_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_values_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Structure representing a message. Can be used on any process and thread. -/// -typedef struct _cef_process_message_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns true (1) if this object is valid. Do not call any other functions - // if this function returns false (0). - /// - int (CEF_CALLBACK *is_valid)(struct _cef_process_message_t* self); - - /// - // Returns true (1) if the values of this object are read-only. Some APIs may - // expose read-only objects. - /// - int (CEF_CALLBACK *is_read_only)(struct _cef_process_message_t* self); - - /// - // Returns a writable copy of this object. - /// - struct _cef_process_message_t* (CEF_CALLBACK *copy)( - struct _cef_process_message_t* self); - - /// - // Returns the message name. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_name)( - struct _cef_process_message_t* self); - - /// - // Returns the list of arguments. - /// - struct _cef_list_value_t* (CEF_CALLBACK *get_argument_list)( - struct _cef_process_message_t* self); -} cef_process_message_t; - - -/// -// Create a new cef_process_message_t object with the specified name. -/// -CEF_EXPORT cef_process_message_t* cef_process_message_create( - const cef_string_t* name); - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_PROCESS_MESSAGE_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_process_util_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_process_util_capi.h deleted file mode 100644 index 130e3f9a..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_process_util_capi.h +++ /dev/null @@ -1,64 +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_PROCESS_UTIL_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_PROCESS_UTIL_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Launches the process specified via |command_line|. Returns true (1) upon -// success. Must be called on the browser process TID_PROCESS_LAUNCHER thread. -// -// Unix-specific notes: - All file descriptors open in the parent process will -// be closed in the -// child process except for stdin, stdout, and stderr. -// - If the first argument on the command line does not contain a slash, -// PATH will be searched. (See man execvp.) -/// -CEF_EXPORT int cef_launch_process(struct _cef_command_line_t* command_line); - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_PROCESS_UTIL_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_render_handler_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_render_handler_capi.h deleted file mode 100644 index 1a9d2652..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_render_handler_capi.h +++ /dev/null @@ -1,171 +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_RENDER_HANDLER_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_RENDER_HANDLER_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_browser_capi.h" -#include "include/capi/cef_drag_data_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Implement this structure to handle events when window rendering is disabled. -// The functions of this structure will be called on the UI thread. -/// -typedef struct _cef_render_handler_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Called to retrieve the root window rectangle in screen coordinates. Return - // true (1) if the rectangle was provided. - /// - int (CEF_CALLBACK *get_root_screen_rect)(struct _cef_render_handler_t* self, - struct _cef_browser_t* browser, cef_rect_t* rect); - - /// - // Called to retrieve the view rectangle which is relative to screen - // coordinates. Return true (1) if the rectangle was provided. - /// - int (CEF_CALLBACK *get_view_rect)(struct _cef_render_handler_t* self, - struct _cef_browser_t* browser, cef_rect_t* rect); - - /// - // Called to retrieve the translation from view coordinates to actual screen - // coordinates. Return true (1) if the screen coordinates were provided. - /// - int (CEF_CALLBACK *get_screen_point)(struct _cef_render_handler_t* self, - struct _cef_browser_t* browser, int viewX, int viewY, int* screenX, - int* screenY); - - /// - // Called to allow the client to fill in the CefScreenInfo object with - // appropriate values. Return true (1) if the |screen_info| structure has been - // modified. - // - // If the screen info rectangle is left NULL the rectangle from GetViewRect - // will be used. If the rectangle is still NULL or invalid popups may not be - // drawn correctly. - /// - int (CEF_CALLBACK *get_screen_info)(struct _cef_render_handler_t* self, - struct _cef_browser_t* browser, struct _cef_screen_info_t* screen_info); - - /// - // Called when the browser wants to show or hide the popup widget. The popup - // should be shown if |show| is true (1) and hidden if |show| is false (0). - /// - void (CEF_CALLBACK *on_popup_show)(struct _cef_render_handler_t* self, - struct _cef_browser_t* browser, int show); - - /// - // Called when the browser wants to move or resize the popup widget. |rect| - // contains the new location and size in view coordinates. - /// - void (CEF_CALLBACK *on_popup_size)(struct _cef_render_handler_t* self, - struct _cef_browser_t* browser, const cef_rect_t* rect); - - /// - // Called when an element should be painted. Pixel values passed to this - // function are scaled relative to view coordinates based on the value of - // CefScreenInfo.device_scale_factor returned from GetScreenInfo. |type| - // indicates whether the element is the view or the popup widget. |buffer| - // contains the pixel data for the whole image. |dirtyRects| contains the set - // of rectangles in pixel coordinates that need to be repainted. |buffer| will - // be |width|*|height|*4 bytes in size and represents a BGRA image with an - // upper-left origin. - /// - void (CEF_CALLBACK *on_paint)(struct _cef_render_handler_t* self, - struct _cef_browser_t* browser, cef_paint_element_type_t type, - size_t dirtyRectsCount, cef_rect_t const* dirtyRects, const void* buffer, - int width, int height); - - /// - // Called when the browser's cursor has changed. If |type| is CT_CUSTOM then - // |custom_cursor_info| will be populated with the custom cursor information. - /// - void (CEF_CALLBACK *on_cursor_change)(struct _cef_render_handler_t* self, - struct _cef_browser_t* browser, cef_cursor_handle_t cursor, - cef_cursor_type_t type, - const struct _cef_cursor_info_t* custom_cursor_info); - - /// - // Called when the user starts dragging content in the web view. Contextual - // information about the dragged content is supplied by |drag_data|. (|x|, - // |y|) is the drag start location in screen coordinates. OS APIs that run a - // system message loop may be used within the StartDragging call. - // - // Return false (0) to abort the drag operation. Don't call any of - // cef_browser_host_t::DragSource*Ended* functions after returning false (0). - // - // Return true (1) to handle the drag operation. Call - // cef_browser_host_t::DragSourceEndedAt and DragSourceSystemDragEnded either - // synchronously or asynchronously to inform the web view that the drag - // operation has ended. - /// - int (CEF_CALLBACK *start_dragging)(struct _cef_render_handler_t* self, - struct _cef_browser_t* browser, struct _cef_drag_data_t* drag_data, - cef_drag_operations_mask_t allowed_ops, int x, int y); - - /// - // Called when the web view wants to update the mouse cursor during a drag & - // drop operation. |operation| describes the allowed operation (none, move, - // copy, link). - /// - void (CEF_CALLBACK *update_drag_cursor)(struct _cef_render_handler_t* self, - struct _cef_browser_t* browser, cef_drag_operations_mask_t operation); - - /// - // Called when the scroll offset has changed. - /// - void (CEF_CALLBACK *on_scroll_offset_changed)( - struct _cef_render_handler_t* self, struct _cef_browser_t* browser, - double x, double y); -} cef_render_handler_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_RENDER_HANDLER_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_render_process_handler_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_render_process_handler_capi.h deleted file mode 100644 index 8646b45e..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_render_process_handler_capi.h +++ /dev/null @@ -1,177 +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_RENDER_PROCESS_HANDLER_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_RENDER_PROCESS_HANDLER_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_browser_capi.h" -#include "include/capi/cef_dom_capi.h" -#include "include/capi/cef_frame_capi.h" -#include "include/capi/cef_load_handler_capi.h" -#include "include/capi/cef_process_message_capi.h" -#include "include/capi/cef_v8_capi.h" -#include "include/capi/cef_values_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Structure used to implement render process callbacks. The functions of this -// structure will be called on the render process main thread (TID_RENDERER) -// unless otherwise indicated. -/// -typedef struct _cef_render_process_handler_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Called after the render process main thread has been created. |extra_info| - // is a read-only value originating from - // cef_browser_process_handler_t::on_render_process_thread_created(). Do not - // keep a reference to |extra_info| outside of this function. - /// - void (CEF_CALLBACK *on_render_thread_created)( - struct _cef_render_process_handler_t* self, - struct _cef_list_value_t* extra_info); - - /// - // Called after WebKit has been initialized. - /// - void (CEF_CALLBACK *on_web_kit_initialized)( - struct _cef_render_process_handler_t* self); - - /// - // Called after a browser has been created. When browsing cross-origin a new - // browser will be created before the old browser with the same identifier is - // destroyed. - /// - void (CEF_CALLBACK *on_browser_created)( - struct _cef_render_process_handler_t* self, - struct _cef_browser_t* browser); - - /// - // Called before a browser is destroyed. - /// - void (CEF_CALLBACK *on_browser_destroyed)( - struct _cef_render_process_handler_t* self, - struct _cef_browser_t* browser); - - /// - // Return the handler for browser load status events. - /// - struct _cef_load_handler_t* (CEF_CALLBACK *get_load_handler)( - struct _cef_render_process_handler_t* self); - - /// - // Called before browser navigation. Return true (1) to cancel the navigation - // or false (0) to allow the navigation to proceed. The |request| object - // cannot be modified in this callback. - /// - int (CEF_CALLBACK *on_before_navigation)( - struct _cef_render_process_handler_t* self, - struct _cef_browser_t* browser, struct _cef_frame_t* frame, - struct _cef_request_t* request, cef_navigation_type_t navigation_type, - int is_redirect); - - /// - // Called immediately after the V8 context for a frame has been created. To - // retrieve the JavaScript 'window' object use the - // cef_v8context_t::get_global() function. V8 handles can only be accessed - // from the thread on which they are created. A task runner for posting tasks - // on the associated thread can be retrieved via the - // cef_v8context_t::get_task_runner() function. - /// - void (CEF_CALLBACK *on_context_created)( - struct _cef_render_process_handler_t* self, - struct _cef_browser_t* browser, struct _cef_frame_t* frame, - struct _cef_v8context_t* context); - - /// - // Called immediately before the V8 context for a frame is released. No - // references to the context should be kept after this function is called. - /// - void (CEF_CALLBACK *on_context_released)( - struct _cef_render_process_handler_t* self, - struct _cef_browser_t* browser, struct _cef_frame_t* frame, - struct _cef_v8context_t* context); - - /// - // Called for global uncaught exceptions in a frame. Execution of this - // callback is disabled by default. To enable set - // CefSettings.uncaught_exception_stack_size > 0. - /// - void (CEF_CALLBACK *on_uncaught_exception)( - struct _cef_render_process_handler_t* self, - struct _cef_browser_t* browser, struct _cef_frame_t* frame, - struct _cef_v8context_t* context, struct _cef_v8exception_t* exception, - struct _cef_v8stack_trace_t* stackTrace); - - /// - // Called when a new node in the the browser gets focus. The |node| value may - // be NULL if no specific node has gained focus. The node object passed to - // this function represents a snapshot of the DOM at the time this function is - // executed. DOM objects are only valid for the scope of this function. Do not - // keep references to or attempt to access any DOM objects outside the scope - // of this function. - /// - void (CEF_CALLBACK *on_focused_node_changed)( - struct _cef_render_process_handler_t* self, - struct _cef_browser_t* browser, struct _cef_frame_t* frame, - struct _cef_domnode_t* node); - - /// - // Called when a new message is received from a different process. Return true - // (1) if the message was handled or false (0) otherwise. Do not keep a - // reference to or attempt to access the message outside of this callback. - /// - int (CEF_CALLBACK *on_process_message_received)( - struct _cef_render_process_handler_t* self, - struct _cef_browser_t* browser, cef_process_id_t source_process, - struct _cef_process_message_t* message); -} cef_render_process_handler_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_RENDER_PROCESS_HANDLER_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_request_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_request_capi.h deleted file mode 100644 index d4b9063b..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_request_capi.h +++ /dev/null @@ -1,330 +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_REQUEST_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_REQUEST_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct _cef_post_data_element_t; -struct _cef_post_data_t; - -/// -// Structure used to represent a web request. The functions of this structure -// may be called on any thread. -/// -typedef struct _cef_request_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns true (1) if this object is read-only. - /// - int (CEF_CALLBACK *is_read_only)(struct _cef_request_t* self); - - /// - // Get the fully qualified URL. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_url)(struct _cef_request_t* self); - - /// - // Set the fully qualified URL. - /// - void (CEF_CALLBACK *set_url)(struct _cef_request_t* self, - const cef_string_t* url); - - /// - // Get the request function type. The value will default to POST if post data - // is provided and GET otherwise. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_method)(struct _cef_request_t* self); - - /// - // Set the request function type. - /// - void (CEF_CALLBACK *set_method)(struct _cef_request_t* self, - const cef_string_t* method); - - /// - // Set the referrer URL and policy. If non-NULL the referrer URL must be fully - // qualified with an HTTP or HTTPS scheme component. Any username, password or - // ref component will be removed. - /// - void (CEF_CALLBACK *set_referrer)(struct _cef_request_t* self, - const cef_string_t* referrer_url, cef_referrer_policy_t policy); - - /// - // Get the referrer URL. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_referrer_url)( - struct _cef_request_t* self); - - /// - // Get the referrer policy. - /// - cef_referrer_policy_t (CEF_CALLBACK *get_referrer_policy)( - struct _cef_request_t* self); - - /// - // Get the post data. - /// - struct _cef_post_data_t* (CEF_CALLBACK *get_post_data)( - struct _cef_request_t* self); - - /// - // Set the post data. - /// - void (CEF_CALLBACK *set_post_data)(struct _cef_request_t* self, - struct _cef_post_data_t* postData); - - /// - // Get the header values. Will not include the Referer value if any. - /// - void (CEF_CALLBACK *get_header_map)(struct _cef_request_t* self, - cef_string_multimap_t headerMap); - - /// - // Set the header values. If a Referer value exists in the header map it will - // be removed and ignored. - /// - void (CEF_CALLBACK *set_header_map)(struct _cef_request_t* self, - cef_string_multimap_t headerMap); - - /// - // Set all values at one time. - /// - void (CEF_CALLBACK *set)(struct _cef_request_t* self, const cef_string_t* url, - const cef_string_t* method, struct _cef_post_data_t* postData, - cef_string_multimap_t headerMap); - - /// - // Get the flags used in combination with cef_urlrequest_t. See - // cef_urlrequest_flags_t for supported values. - /// - int (CEF_CALLBACK *get_flags)(struct _cef_request_t* self); - - /// - // Set the flags used in combination with cef_urlrequest_t. See - // cef_urlrequest_flags_t for supported values. - /// - void (CEF_CALLBACK *set_flags)(struct _cef_request_t* self, int flags); - - /// - // Set the URL to the first party for cookies used in combination with - // cef_urlrequest_t. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_first_party_for_cookies)( - struct _cef_request_t* self); - - /// - // Get the URL to the first party for cookies used in combination with - // cef_urlrequest_t. - /// - void (CEF_CALLBACK *set_first_party_for_cookies)(struct _cef_request_t* self, - const cef_string_t* url); - - /// - // Get the resource type for this request. Only available in the browser - // process. - /// - cef_resource_type_t (CEF_CALLBACK *get_resource_type)( - struct _cef_request_t* self); - - /// - // Get the transition type for this request. Only available in the browser - // process and only applies to requests that represent a main frame or sub- - // frame navigation. - /// - cef_transition_type_t (CEF_CALLBACK *get_transition_type)( - struct _cef_request_t* self); - - /// - // Returns the globally unique identifier for this request or 0 if not - // specified. Can be used by cef_request_tHandler implementations in the - // browser process to track a single request across multiple callbacks. - /// - uint64 (CEF_CALLBACK *get_identifier)(struct _cef_request_t* self); -} cef_request_t; - - -/// -// Create a new cef_request_t object. -/// -CEF_EXPORT cef_request_t* cef_request_create(); - - -/// -// Structure used to represent post data for a web request. The functions of -// this structure may be called on any thread. -/// -typedef struct _cef_post_data_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns true (1) if this object is read-only. - /// - int (CEF_CALLBACK *is_read_only)(struct _cef_post_data_t* self); - - /// - // Returns true (1) if the underlying POST data includes elements that are not - // represented by this cef_post_data_t object (for example, multi-part file - // upload data). Modifying cef_post_data_t objects with excluded elements may - // result in the request failing. - /// - int (CEF_CALLBACK *has_excluded_elements)(struct _cef_post_data_t* self); - - /// - // Returns the number of existing post data elements. - /// - size_t (CEF_CALLBACK *get_element_count)(struct _cef_post_data_t* self); - - /// - // Retrieve the post data elements. - /// - void (CEF_CALLBACK *get_elements)(struct _cef_post_data_t* self, - size_t* elementsCount, struct _cef_post_data_element_t** elements); - - /// - // Remove the specified post data element. Returns true (1) if the removal - // succeeds. - /// - int (CEF_CALLBACK *remove_element)(struct _cef_post_data_t* self, - struct _cef_post_data_element_t* element); - - /// - // Add the specified post data element. Returns true (1) if the add succeeds. - /// - int (CEF_CALLBACK *add_element)(struct _cef_post_data_t* self, - struct _cef_post_data_element_t* element); - - /// - // Remove all existing post data elements. - /// - void (CEF_CALLBACK *remove_elements)(struct _cef_post_data_t* self); -} cef_post_data_t; - - -/// -// Create a new cef_post_data_t object. -/// -CEF_EXPORT cef_post_data_t* cef_post_data_create(); - - -/// -// Structure used to represent a single element in the request post data. The -// functions of this structure may be called on any thread. -/// -typedef struct _cef_post_data_element_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns true (1) if this object is read-only. - /// - int (CEF_CALLBACK *is_read_only)(struct _cef_post_data_element_t* self); - - /// - // Remove all contents from the post data element. - /// - void (CEF_CALLBACK *set_to_empty)(struct _cef_post_data_element_t* self); - - /// - // The post data element will represent a file. - /// - void (CEF_CALLBACK *set_to_file)(struct _cef_post_data_element_t* self, - const cef_string_t* fileName); - - /// - // The post data element will represent bytes. The bytes passed in will be - // copied. - /// - void (CEF_CALLBACK *set_to_bytes)(struct _cef_post_data_element_t* self, - size_t size, const void* bytes); - - /// - // Return the type of this post data element. - /// - cef_postdataelement_type_t (CEF_CALLBACK *get_type)( - struct _cef_post_data_element_t* self); - - /// - // Return the file name. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_file)( - struct _cef_post_data_element_t* self); - - /// - // Return the number of bytes. - /// - size_t (CEF_CALLBACK *get_bytes_count)(struct _cef_post_data_element_t* self); - - /// - // Read up to |size| bytes into |bytes| and return the number of bytes - // actually read. - /// - size_t (CEF_CALLBACK *get_bytes)(struct _cef_post_data_element_t* self, - size_t size, void* bytes); -} cef_post_data_element_t; - - -/// -// Create a new cef_post_data_element_t object. -/// -CEF_EXPORT cef_post_data_element_t* cef_post_data_element_create(); - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_REQUEST_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_request_context_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_request_context_capi.h deleted file mode 100644 index 54b3db31..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_request_context_capi.h +++ /dev/null @@ -1,291 +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_REQUEST_CONTEXT_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_CAPI_H_ -#pragma once - -#include "include/capi/cef_callback_capi.h" -#include "include/capi/cef_cookie_capi.h" -#include "include/capi/cef_request_context_handler_capi.h" -#include "include/capi/cef_values_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct _cef_scheme_handler_factory_t; - -/// -// Callback structure for cef_request_tContext::ResolveHost. -/// -typedef struct _cef_resolve_callback_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Called after the ResolveHost request has completed. |result| will be the - // result code. |resolved_ips| will be the list of resolved IP addresses or - // NULL if the resolution failed. - /// - void (CEF_CALLBACK *on_resolve_completed)( - struct _cef_resolve_callback_t* self, cef_errorcode_t result, - cef_string_list_t resolved_ips); -} cef_resolve_callback_t; - - -/// -// A request context provides request handling for a set of related browser or -// URL request objects. A request context can be specified when creating a new -// browser via the cef_browser_host_t static factory functions or when creating -// a new URL request via the cef_urlrequest_t static factory functions. Browser -// objects with different request contexts will never be hosted in the same -// render process. Browser objects with the same request context may or may not -// be hosted in the same render process depending on the process model. Browser -// objects created indirectly via the JavaScript window.open function or -// targeted links will share the same render process and the same request -// context as the source browser. When running in single-process mode there is -// only a single render process (the main process) and so all browsers created -// in single-process mode will share the same request context. This will be the -// first request context passed into a cef_browser_host_t static factory -// function and all other request context objects will be ignored. -/// -typedef struct _cef_request_context_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns true (1) if this object is pointing to the same context as |that| - // object. - /// - int (CEF_CALLBACK *is_same)(struct _cef_request_context_t* self, - struct _cef_request_context_t* other); - - /// - // Returns true (1) if this object is sharing the same storage as |that| - // object. - /// - int (CEF_CALLBACK *is_sharing_with)(struct _cef_request_context_t* self, - struct _cef_request_context_t* other); - - /// - // Returns true (1) if this object is the global context. The global context - // is used by default when creating a browser or URL request with a NULL - // context argument. - /// - int (CEF_CALLBACK *is_global)(struct _cef_request_context_t* self); - - /// - // Returns the handler for this context if any. - /// - struct _cef_request_context_handler_t* (CEF_CALLBACK *get_handler)( - struct _cef_request_context_t* self); - - /// - // Returns the cache path for this object. If NULL an "incognito mode" in- - // memory cache is being used. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_cache_path)( - struct _cef_request_context_t* self); - - /// - // Returns the default cookie manager for this object. This will be the global - // cookie manager if this object is the global request context. Otherwise, - // this will be the default cookie manager used when this request context does - // not receive a value via cef_request_tContextHandler::get_cookie_manager(). - // If |callback| is non-NULL it will be executed asnychronously on the IO - // thread after the manager's storage has been initialized. - /// - struct _cef_cookie_manager_t* (CEF_CALLBACK *get_default_cookie_manager)( - struct _cef_request_context_t* self, - struct _cef_completion_callback_t* callback); - - /// - // Register a scheme handler factory for the specified |scheme_name| and - // optional |domain_name|. An NULL |domain_name| value for a standard scheme - // will cause the factory to match all domain names. The |domain_name| value - // will be ignored for non-standard schemes. If |scheme_name| is a built-in - // scheme and no handler is returned by |factory| then the built-in scheme - // handler factory will be called. If |scheme_name| is a custom scheme then - // you must also implement the cef_app_t::on_register_custom_schemes() - // function in all processes. This function may be called multiple times to - // change or remove the factory that matches the specified |scheme_name| and - // optional |domain_name|. Returns false (0) if an error occurs. This function - // may be called on any thread in the browser process. - /// - int (CEF_CALLBACK *register_scheme_handler_factory)( - struct _cef_request_context_t* self, const cef_string_t* scheme_name, - const cef_string_t* domain_name, - struct _cef_scheme_handler_factory_t* factory); - - /// - // Clear all registered scheme handler factories. Returns false (0) on error. - // This function may be called on any thread in the browser process. - /// - int (CEF_CALLBACK *clear_scheme_handler_factories)( - struct _cef_request_context_t* self); - - /// - // Tells all renderer processes associated with this context to throw away - // their plugin list cache. If |reload_pages| is true (1) they will also - // reload all pages with plugins. - // cef_request_tContextHandler::OnBeforePluginLoad may be called to rebuild - // the plugin list cache. - /// - void (CEF_CALLBACK *purge_plugin_list_cache)( - struct _cef_request_context_t* self, int reload_pages); - - /// - // Returns true (1) if a preference with the specified |name| exists. This - // function must be called on the browser process UI thread. - /// - int (CEF_CALLBACK *has_preference)(struct _cef_request_context_t* self, - const cef_string_t* name); - - /// - // Returns the value for the preference with the specified |name|. Returns - // NULL if the preference does not exist. The returned object contains a copy - // of the underlying preference value and modifications to the returned object - // will not modify the underlying preference value. This function must be - // called on the browser process UI thread. - /// - struct _cef_value_t* (CEF_CALLBACK *get_preference)( - struct _cef_request_context_t* self, const cef_string_t* name); - - /// - // Returns all preferences as a dictionary. If |include_defaults| is true (1) - // then preferences currently at their default value will be included. The - // returned object contains a copy of the underlying preference values and - // modifications to the returned object will not modify the underlying - // preference values. This function must be called on the browser process UI - // thread. - /// - struct _cef_dictionary_value_t* (CEF_CALLBACK *get_all_preferences)( - struct _cef_request_context_t* self, int include_defaults); - - /// - // Returns true (1) if the preference with the specified |name| can be - // modified using SetPreference. As one example preferences set via the - // command-line usually cannot be modified. This function must be called on - // the browser process UI thread. - /// - int (CEF_CALLBACK *can_set_preference)(struct _cef_request_context_t* self, - const cef_string_t* name); - - /// - // Set the |value| associated with preference |name|. Returns true (1) if the - // value is set successfully and false (0) otherwise. If |value| is NULL the - // preference will be restored to its default value. If setting the preference - // fails then |error| will be populated with a detailed description of the - // problem. This function must be called on the browser process UI thread. - /// - int (CEF_CALLBACK *set_preference)(struct _cef_request_context_t* self, - const cef_string_t* name, struct _cef_value_t* value, - cef_string_t* error); - - /// - // Clears all certificate exceptions that were added as part of handling - // cef_request_tHandler::on_certificate_error(). If you call this it is - // recommended that you also call close_all_connections() or you risk not - // being prompted again for server certificates if you reconnect quickly. If - // |callback| is non-NULL it will be executed on the UI thread after - // completion. - /// - void (CEF_CALLBACK *clear_certificate_exceptions)( - struct _cef_request_context_t* self, - struct _cef_completion_callback_t* callback); - - /// - // Clears all active and idle connections that Chromium currently has. This is - // only recommended if you have released all other CEF objects but don't yet - // want to call cef_shutdown(). If |callback| is non-NULL it will be executed - // on the UI thread after completion. - /// - void (CEF_CALLBACK *close_all_connections)( - struct _cef_request_context_t* self, - struct _cef_completion_callback_t* callback); - - /// - // Attempts to resolve |origin| to a list of associated IP addresses. - // |callback| will be executed on the UI thread after completion. - /// - void (CEF_CALLBACK *resolve_host)(struct _cef_request_context_t* self, - const cef_string_t* origin, struct _cef_resolve_callback_t* callback); - - /// - // Attempts to resolve |origin| to a list of associated IP addresses using - // cached data. |resolved_ips| will be populated with the list of resolved IP - // addresses or NULL if no cached data is available. Returns ERR_NONE on - // success. This function must be called on the browser process IO thread. - /// - cef_errorcode_t (CEF_CALLBACK *resolve_host_cached)( - struct _cef_request_context_t* self, const cef_string_t* origin, - cef_string_list_t resolved_ips); -} cef_request_context_t; - - -/// -// Returns the global context object. -/// -CEF_EXPORT cef_request_context_t* cef_request_context_get_global_context(); - -/// -// Creates a new context object with the specified |settings| and optional -// |handler|. -/// -CEF_EXPORT cef_request_context_t* cef_request_context_create_context( - const struct _cef_request_context_settings_t* settings, - struct _cef_request_context_handler_t* handler); - -/// -// Creates a new context object that shares storage with |other| and uses an -// optional |handler|. -/// -CEF_EXPORT cef_request_context_t* create_context_shared( - cef_request_context_t* other, - struct _cef_request_context_handler_t* handler); - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_request_context_handler_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_request_context_handler_capi.h deleted file mode 100644 index a7c57072..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_request_context_handler_capi.h +++ /dev/null @@ -1,99 +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_REQUEST_CONTEXT_HANDLER_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_HANDLER_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_cookie_capi.h" -#include "include/capi/cef_web_plugin_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Implement this structure to provide handler implementations. The handler -// instance will not be released until all objects related to the context have -// been destroyed. -/// -typedef struct _cef_request_context_handler_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Called on the browser process IO thread to retrieve the cookie manager. If - // this function returns NULL the default cookie manager retrievable via - // cef_request_tContext::get_default_cookie_manager() will be used. - /// - struct _cef_cookie_manager_t* (CEF_CALLBACK *get_cookie_manager)( - struct _cef_request_context_handler_t* self); - - /// - // Called on multiple browser process threads before a plugin instance is - // loaded. |mime_type| is the mime type of the plugin that will be loaded. - // |plugin_url| is the content URL that the plugin will load and may be NULL. - // |top_origin_url| is the URL for the top-level frame that contains the - // plugin when loading a specific plugin instance or NULL when building the - // initial list of enabled plugins for 'navigator.plugins' JavaScript state. - // |plugin_info| includes additional information about the plugin that will be - // loaded. |plugin_policy| is the recommended policy. Modify |plugin_policy| - // and return true (1) to change the policy. Return false (0) to use the - // recommended policy. The default plugin policy can be set at runtime using - // the `--plugin-policy=[allow|detect|block]` command-line flag. Decisions to - // mark a plugin as disabled by setting |plugin_policy| to - // PLUGIN_POLICY_DISABLED may be cached when |top_origin_url| is NULL. To - // purge the plugin list cache and potentially trigger new calls to this - // function call cef_request_tContext::PurgePluginListCache. - /// - int (CEF_CALLBACK *on_before_plugin_load)( - struct _cef_request_context_handler_t* self, - const cef_string_t* mime_type, const cef_string_t* plugin_url, - const cef_string_t* top_origin_url, - struct _cef_web_plugin_info_t* plugin_info, - cef_plugin_policy_t* plugin_policy); -} cef_request_context_handler_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_HANDLER_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_request_handler_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_request_handler_capi.h deleted file mode 100644 index 70e6b3c1..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_request_handler_capi.h +++ /dev/null @@ -1,270 +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_REQUEST_HANDLER_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_REQUEST_HANDLER_CAPI_H_ -#pragma once - -#include "include/capi/cef_auth_callback_capi.h" -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_browser_capi.h" -#include "include/capi/cef_frame_capi.h" -#include "include/capi/cef_request_capi.h" -#include "include/capi/cef_resource_handler_capi.h" -#include "include/capi/cef_response_capi.h" -#include "include/capi/cef_response_filter_capi.h" -#include "include/capi/cef_ssl_info_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Callback structure used for asynchronous continuation of url requests. -/// -typedef struct _cef_request_callback_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Continue the url request. If |allow| is true (1) the request will be - // continued. Otherwise, the request will be canceled. - /// - void (CEF_CALLBACK *cont)(struct _cef_request_callback_t* self, int allow); - - /// - // Cancel the url request. - /// - void (CEF_CALLBACK *cancel)(struct _cef_request_callback_t* self); -} cef_request_callback_t; - - -/// -// Implement this structure to handle events related to browser requests. The -// functions of this structure will be called on the thread indicated. -/// -typedef struct _cef_request_handler_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Called on the UI thread before browser navigation. Return true (1) to - // cancel the navigation or false (0) to allow the navigation to proceed. The - // |request| object cannot be modified in this callback. - // cef_load_handler_t::OnLoadingStateChange will be called twice in all cases. - // If the navigation is allowed cef_load_handler_t::OnLoadStart and - // cef_load_handler_t::OnLoadEnd will be called. If the navigation is canceled - // cef_load_handler_t::OnLoadError will be called with an |errorCode| value of - // ERR_ABORTED. - /// - int (CEF_CALLBACK *on_before_browse)(struct _cef_request_handler_t* self, - struct _cef_browser_t* browser, struct _cef_frame_t* frame, - struct _cef_request_t* request, int is_redirect); - - /// - // Called on the UI thread before OnBeforeBrowse in certain limited cases - // where navigating a new or different browser might be desirable. This - // includes user-initiated navigation that might open in a special way (e.g. - // links clicked via middle-click or ctrl + left-click) and certain types of - // cross-origin navigation initiated from the renderer process (e.g. - // navigating the top-level frame to/from a file URL). The |browser| and - // |frame| values represent the source of the navigation. The - // |target_disposition| value indicates where the user intended to navigate - // the browser based on standard Chromium behaviors (e.g. current tab, new - // tab, etc). The |user_gesture| value will be true (1) if the browser - // navigated via explicit user gesture (e.g. clicking a link) or false (0) if - // it navigated automatically (e.g. via the DomContentLoaded event). Return - // true (1) to cancel the navigation or false (0) to allow the navigation to - // proceed in the source browser's top-level frame. - /// - int (CEF_CALLBACK *on_open_urlfrom_tab)(struct _cef_request_handler_t* self, - struct _cef_browser_t* browser, struct _cef_frame_t* frame, - const cef_string_t* target_url, - cef_window_open_disposition_t target_disposition, int user_gesture); - - /// - // Called on the IO thread before a resource request is loaded. The |request| - // object may be modified. Return RV_CONTINUE to continue the request - // immediately. Return RV_CONTINUE_ASYNC and call cef_request_tCallback:: - // cont() at a later time to continue or cancel the request asynchronously. - // Return RV_CANCEL to cancel the request immediately. - // - /// - cef_return_value_t (CEF_CALLBACK *on_before_resource_load)( - struct _cef_request_handler_t* self, struct _cef_browser_t* browser, - struct _cef_frame_t* frame, struct _cef_request_t* request, - struct _cef_request_callback_t* callback); - - /// - // Called on the IO thread before a resource is loaded. To allow the resource - // to load normally return NULL. To specify a handler for the resource return - // a cef_resource_handler_t object. The |request| object should not be - // modified in this callback. - /// - struct _cef_resource_handler_t* (CEF_CALLBACK *get_resource_handler)( - struct _cef_request_handler_t* self, struct _cef_browser_t* browser, - struct _cef_frame_t* frame, struct _cef_request_t* request); - - /// - // Called on the IO thread when a resource load is redirected. The |request| - // parameter will contain the old URL and other request-related information. - // The |new_url| parameter will contain the new URL and can be changed if - // desired. The |request| object cannot be modified in this callback. - /// - void (CEF_CALLBACK *on_resource_redirect)(struct _cef_request_handler_t* self, - struct _cef_browser_t* browser, struct _cef_frame_t* frame, - struct _cef_request_t* request, cef_string_t* new_url); - - /// - // Called on the IO thread when a resource response is received. To allow the - // resource to load normally return false (0). To redirect or retry the - // resource modify |request| (url, headers or post body) and return true (1). - // The |response| object cannot be modified in this callback. - /// - int (CEF_CALLBACK *on_resource_response)(struct _cef_request_handler_t* self, - struct _cef_browser_t* browser, struct _cef_frame_t* frame, - struct _cef_request_t* request, struct _cef_response_t* response); - - /// - // Called on the IO thread to optionally filter resource response content. - // |request| and |response| represent the request and response respectively - // and cannot be modified in this callback. - /// - struct _cef_response_filter_t* (CEF_CALLBACK *get_resource_response_filter)( - struct _cef_request_handler_t* self, struct _cef_browser_t* browser, - struct _cef_frame_t* frame, struct _cef_request_t* request, - struct _cef_response_t* response); - - /// - // Called on the IO thread when a resource load has completed. |request| and - // |response| represent the request and response respectively and cannot be - // modified in this callback. |status| indicates the load completion status. - // |received_content_length| is the number of response bytes actually read. - /// - void (CEF_CALLBACK *on_resource_load_complete)( - struct _cef_request_handler_t* self, struct _cef_browser_t* browser, - struct _cef_frame_t* frame, struct _cef_request_t* request, - struct _cef_response_t* response, cef_urlrequest_status_t status, - int64 received_content_length); - - /// - // Called on the IO thread when the browser needs credentials from the user. - // |isProxy| indicates whether the host is a proxy server. |host| contains the - // hostname and |port| contains the port number. |realm| is the realm of the - // challenge and may be NULL. |scheme| is the authentication scheme used, such - // as "basic" or "digest", and will be NULL if the source of the request is an - // FTP server. Return true (1) to continue the request and call - // cef_auth_callback_t::cont() either in this function or at a later time when - // the authentication information is available. Return false (0) to cancel the - // request immediately. - /// - int (CEF_CALLBACK *get_auth_credentials)(struct _cef_request_handler_t* self, - struct _cef_browser_t* browser, struct _cef_frame_t* frame, int isProxy, - const cef_string_t* host, int port, const cef_string_t* realm, - const cef_string_t* scheme, struct _cef_auth_callback_t* callback); - - /// - // Called on the IO thread when JavaScript requests a specific storage quota - // size via the webkitStorageInfo.requestQuota function. |origin_url| is the - // origin of the page making the request. |new_size| is the requested quota - // size in bytes. Return true (1) to continue the request and call - // cef_request_tCallback::cont() either in this function or at a later time to - // grant or deny the request. Return false (0) to cancel the request - // immediately. - /// - int (CEF_CALLBACK *on_quota_request)(struct _cef_request_handler_t* self, - struct _cef_browser_t* browser, const cef_string_t* origin_url, - int64 new_size, struct _cef_request_callback_t* callback); - - /// - // Called on the UI thread to handle requests for URLs with an unknown - // protocol component. Set |allow_os_execution| to true (1) to attempt - // execution via the registered OS protocol handler, if any. SECURITY WARNING: - // YOU SHOULD USE THIS METHOD TO ENFORCE RESTRICTIONS BASED ON SCHEME, HOST OR - // OTHER URL ANALYSIS BEFORE ALLOWING OS EXECUTION. - /// - void (CEF_CALLBACK *on_protocol_execution)( - struct _cef_request_handler_t* self, struct _cef_browser_t* browser, - const cef_string_t* url, int* allow_os_execution); - - /// - // Called on the UI thread to handle requests for URLs with an invalid SSL - // certificate. Return true (1) and call cef_request_tCallback::cont() either - // in this function or at a later time to continue or cancel the request. - // Return false (0) to cancel the request immediately. If - // CefSettings.ignore_certificate_errors is set all invalid certificates will - // be accepted without calling this function. - /// - int (CEF_CALLBACK *on_certificate_error)(struct _cef_request_handler_t* self, - struct _cef_browser_t* browser, cef_errorcode_t cert_error, - const cef_string_t* request_url, struct _cef_sslinfo_t* ssl_info, - struct _cef_request_callback_t* callback); - - /// - // Called on the browser process UI thread when a plugin has crashed. - // |plugin_path| is the path of the plugin that crashed. - /// - void (CEF_CALLBACK *on_plugin_crashed)(struct _cef_request_handler_t* self, - struct _cef_browser_t* browser, const cef_string_t* plugin_path); - - /// - // Called on the browser process UI thread when the render view associated - // with |browser| is ready to receive/handle IPC messages in the render - // process. - /// - void (CEF_CALLBACK *on_render_view_ready)(struct _cef_request_handler_t* self, - struct _cef_browser_t* browser); - - /// - // Called on the browser process UI thread when the render process terminates - // unexpectedly. |status| indicates how the process terminated. - /// - void (CEF_CALLBACK *on_render_process_terminated)( - struct _cef_request_handler_t* self, struct _cef_browser_t* browser, - cef_termination_status_t status); -} cef_request_handler_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_REQUEST_HANDLER_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_resource_bundle_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_resource_bundle_capi.h deleted file mode 100644 index 7694618e..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_resource_bundle_capi.h +++ /dev/null @@ -1,107 +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_RESOURCE_BUNDLE_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Structure used for retrieving resources from the resource bundle (*.pak) -// files loaded by CEF during startup or via the cef_resource_bundle_tHandler -// returned from cef_app_t::GetResourceBundleHandler. See CefSettings for -// additional options related to resource bundle loading. The functions of this -// structure may be called on any thread unless otherwise indicated. -/// -typedef struct _cef_resource_bundle_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns the localized string for the specified |string_id| or an NULL - // string if the value is not found. Include cef_pack_strings.h for a listing - // of valid string ID values. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_localized_string)( - struct _cef_resource_bundle_t* self, int string_id); - - /// - // Retrieves the contents of the specified scale independent |resource_id|. If - // the value is found then |data| and |data_size| will be populated and this - // function will return true (1). If the value is not found then this function - // will return false (0). The returned |data| pointer will remain resident in - // memory and should not be freed. Include cef_pack_resources.h for a listing - // of valid resource ID values. - /// - int (CEF_CALLBACK *get_data_resource)(struct _cef_resource_bundle_t* self, - int resource_id, void** data, size_t* data_size); - - /// - // Retrieves the contents of the specified |resource_id| nearest the scale - // factor |scale_factor|. Use a |scale_factor| value of SCALE_FACTOR_NONE for - // scale independent resources or call GetDataResource instead. If the value - // is found then |data| and |data_size| will be populated and this function - // will return true (1). If the value is not found then this function will - // return false (0). The returned |data| pointer will remain resident in - // memory and should not be freed. Include cef_pack_resources.h for a listing - // of valid resource ID values. - /// - int (CEF_CALLBACK *get_data_resource_for_scale)( - struct _cef_resource_bundle_t* self, int resource_id, - cef_scale_factor_t scale_factor, void** data, size_t* data_size); -} cef_resource_bundle_t; - - -/// -// Returns the global resource bundle instance. -/// -CEF_EXPORT cef_resource_bundle_t* cef_resource_bundle_get_global(); - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_resource_bundle_handler_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_resource_bundle_handler_capi.h deleted file mode 100644 index a0397f7e..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_resource_bundle_handler_capi.h +++ /dev/null @@ -1,99 +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_RESOURCE_BUNDLE_HANDLER_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_HANDLER_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Structure used to implement a custom resource bundle structure. See -// CefSettings for additional options related to resource bundle loading. The -// functions of this structure may be called on multiple threads. -/// -typedef struct _cef_resource_bundle_handler_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Called to retrieve a localized translation for the specified |string_id|. - // To provide the translation set |string| to the translation string and - // return true (1). To use the default translation return false (0). Include - // cef_pack_strings.h for a listing of valid string ID values. - /// - int (CEF_CALLBACK *get_localized_string)( - struct _cef_resource_bundle_handler_t* self, int string_id, - cef_string_t* string); - - /// - // Called to retrieve data for the specified scale independent |resource_id|. - // To provide the resource data set |data| and |data_size| to the data pointer - // and size respectively and return true (1). To use the default resource data - // return false (0). The resource data will not be copied and must remain - // resident in memory. Include cef_pack_resources.h for a listing of valid - // resource ID values. - /// - int (CEF_CALLBACK *get_data_resource)( - struct _cef_resource_bundle_handler_t* self, int resource_id, void** data, - size_t* data_size); - - /// - // Called to retrieve data for the specified |resource_id| nearest the scale - // factor |scale_factor|. To provide the resource data set |data| and - // |data_size| to the data pointer and size respectively and return true (1). - // To use the default resource data return false (0). The resource data will - // not be copied and must remain resident in memory. Include - // cef_pack_resources.h for a listing of valid resource ID values. - /// - int (CEF_CALLBACK *get_data_resource_for_scale)( - struct _cef_resource_bundle_handler_t* self, int resource_id, - cef_scale_factor_t scale_factor, void** data, size_t* data_size); -} cef_resource_bundle_handler_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_HANDLER_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_resource_handler_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_resource_handler_capi.h deleted file mode 100644 index eb31980f..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_resource_handler_capi.h +++ /dev/null @@ -1,124 +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_RESOURCE_HANDLER_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_RESOURCE_HANDLER_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_browser_capi.h" -#include "include/capi/cef_callback_capi.h" -#include "include/capi/cef_cookie_capi.h" -#include "include/capi/cef_request_capi.h" -#include "include/capi/cef_response_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Structure used to implement a custom request handler structure. The functions -// of this structure will always be called on the IO thread. -/// -typedef struct _cef_resource_handler_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Begin processing the request. To handle the request return true (1) and - // call cef_callback_t::cont() once the response header information is - // available (cef_callback_t::cont() can also be called from inside this - // function if header information is available immediately). To cancel the - // request return false (0). - /// - int (CEF_CALLBACK *process_request)(struct _cef_resource_handler_t* self, - struct _cef_request_t* request, struct _cef_callback_t* callback); - - /// - // Retrieve response header information. If the response length is not known - // set |response_length| to -1 and read_response() will be called until it - // returns false (0). If the response length is known set |response_length| to - // a positive value and read_response() will be called until it returns false - // (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. - /// - void (CEF_CALLBACK *get_response_headers)( - struct _cef_resource_handler_t* self, struct _cef_response_t* response, - int64* response_length, cef_string_t* redirectUrl); - - /// - // Read response data. If data is available immediately copy up to - // |bytes_to_read| bytes into |data_out|, set |bytes_read| to the number of - // bytes copied, and return true (1). To read the data at a later time set - // |bytes_read| to 0, return true (1) and call cef_callback_t::cont() when the - // data is available. To indicate response completion return false (0). - /// - int (CEF_CALLBACK *read_response)(struct _cef_resource_handler_t* self, - void* data_out, int bytes_to_read, int* bytes_read, - struct _cef_callback_t* callback); - - /// - // Return true (1) if the specified cookie can be sent with the request or - // false (0) otherwise. If false (0) is returned for any cookie then no - // cookies will be sent with the request. - /// - int (CEF_CALLBACK *can_get_cookie)(struct _cef_resource_handler_t* self, - const struct _cef_cookie_t* cookie); - - /// - // Return true (1) if the specified cookie returned with the response can be - // set or false (0) otherwise. - /// - int (CEF_CALLBACK *can_set_cookie)(struct _cef_resource_handler_t* self, - const struct _cef_cookie_t* cookie); - - /// - // Request processing has been canceled. - /// - void (CEF_CALLBACK *cancel)(struct _cef_resource_handler_t* self); -} cef_resource_handler_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_RESOURCE_HANDLER_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_response_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_response_capi.h deleted file mode 100644 index e6143c84..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_response_capi.h +++ /dev/null @@ -1,130 +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_RESPONSE_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_RESPONSE_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Structure used to represent a web response. The functions of this structure -// may be called on any thread. -/// -typedef struct _cef_response_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns true (1) if this object is read-only. - /// - int (CEF_CALLBACK *is_read_only)(struct _cef_response_t* self); - - /// - // Get the response status code. - /// - int (CEF_CALLBACK *get_status)(struct _cef_response_t* self); - - /// - // Set the response status code. - /// - void (CEF_CALLBACK *set_status)(struct _cef_response_t* self, int status); - - /// - // Get the response status text. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_status_text)( - struct _cef_response_t* self); - - /// - // Set the response status text. - /// - void (CEF_CALLBACK *set_status_text)(struct _cef_response_t* self, - const cef_string_t* statusText); - - /// - // Get the response mime type. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_mime_type)( - struct _cef_response_t* self); - - /// - // Set the response mime type. - /// - void (CEF_CALLBACK *set_mime_type)(struct _cef_response_t* self, - const cef_string_t* mimeType); - - /// - // Get the value for the specified response header field. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_header)(struct _cef_response_t* self, - const cef_string_t* name); - - /// - // Get all response header fields. - /// - void (CEF_CALLBACK *get_header_map)(struct _cef_response_t* self, - cef_string_multimap_t headerMap); - - /// - // Set all response header fields. - /// - void (CEF_CALLBACK *set_header_map)(struct _cef_response_t* self, - cef_string_multimap_t headerMap); -} cef_response_t; - - -/// -// Create a new cef_response_t object. -/// -CEF_EXPORT cef_response_t* cef_response_create(); - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_RESPONSE_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_response_filter_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_response_filter_capi.h deleted file mode 100644 index 3817abc8..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_response_filter_capi.h +++ /dev/null @@ -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_CEF_RESPONSE_FILTER_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_RESPONSE_FILTER_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Implement this structure to filter resource response content. The functions -// of this structure will be called on the browser process IO thread. -/// -typedef struct _cef_response_filter_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Initialize the response filter. Will only be called a single time. The - // filter will not be installed if this function returns false (0). - /// - int (CEF_CALLBACK *init_filter)(struct _cef_response_filter_t* self); - - /// - // Called to filter a chunk of data. |data_in| is the input buffer containing - // |data_in_size| bytes of pre-filter data (|data_in| will be NULL if - // |data_in_size| is zero). |data_out| is the output buffer that can accept up - // to |data_out_size| bytes of filtered output data. Set |data_in_read| to the - // number of bytes that were read from |data_in|. Set |data_out_written| to - // the number of bytes that were written into |data_out|. If some or all of - // the pre-filter data was read successfully but more data is needed in order - // to continue filtering (filtered output is pending) return - // RESPONSE_FILTER_NEED_MORE_DATA. If some or all of the pre-filter data was - // read successfully and all available filtered output has been written return - // RESPONSE_FILTER_DONE. If an error occurs during filtering return - // RESPONSE_FILTER_ERROR. This function will be called repeatedly until there - // is no more data to filter (resource response is complete), |data_in_read| - // matches |data_in_size| (all available pre-filter bytes have been read), and - // the function returns RESPONSE_FILTER_DONE or RESPONSE_FILTER_ERROR. Do not - // keep a reference to the buffers passed to this function. - /// - cef_response_filter_status_t (CEF_CALLBACK *filter)( - struct _cef_response_filter_t* self, void* data_in, size_t data_in_size, - size_t* data_in_read, void* data_out, size_t data_out_size, - size_t* data_out_written); -} cef_response_filter_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_RESPONSE_FILTER_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_scheme_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_scheme_capi.h deleted file mode 100644 index 5251b886..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_scheme_capi.h +++ /dev/null @@ -1,173 +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_SCHEME_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_SCHEME_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_browser_capi.h" -#include "include/capi/cef_frame_capi.h" -#include "include/capi/cef_request_capi.h" -#include "include/capi/cef_resource_handler_capi.h" -#include "include/capi/cef_response_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct _cef_scheme_handler_factory_t; - -/// -// Structure that manages custom scheme registrations. -/// -typedef struct _cef_scheme_registrar_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Register a custom scheme. This function should not be called for the built- - // in HTTP, HTTPS, FILE, FTP, ABOUT and DATA schemes. - // - // If |is_standard| is true (1) the scheme will be treated as a standard - // scheme. Standard schemes are subject to URL canonicalization and parsing - // rules as defined in the Common Internet Scheme Syntax RFC 1738 Section 3.1 - // available at http://www.ietf.org/rfc/rfc1738.txt - // - // In particular, the syntax for standard scheme URLs must be of the form: - //
-  //  [scheme]://[username]:[password]@[host]:[port]/[url-path]
-  // 
Standard scheme URLs must have a host component that is a fully - // qualified domain name as defined in Section 3.5 of RFC 1034 [13] and - // Section 2.1 of RFC 1123. These URLs will be canonicalized to - // "scheme://host/path" in the simplest case and - // "scheme://username:password@host:port/path" in the most explicit case. For - // example, "scheme:host/path" and "scheme:///host/path" will both be - // canonicalized to "scheme://host/path". The origin of a standard scheme URL - // is the combination of scheme, host and port (i.e., "scheme://host:port" in - // the most explicit case). - // - // For non-standard scheme URLs only the "scheme:" component is parsed and - // canonicalized. The remainder of the URL will be passed to the handler as- - // is. For example, "scheme:///some%20text" will remain the same. Non-standard - // scheme URLs cannot be used as a target for form submission. - // - // If |is_local| is true (1) the scheme will be treated as local (i.e., with - // the same security rules as those applied to "file" URLs). Normal pages - // cannot link to or access local URLs. Also, by default, local URLs can only - // perform XMLHttpRequest calls to the same URL (origin + path) that - // originated the request. To allow XMLHttpRequest calls from a local URL to - // other URLs with the same origin set the - // CefSettings.file_access_from_file_urls_allowed value to true (1). To allow - // XMLHttpRequest calls from a local URL to all origins set the - // CefSettings.universal_access_from_file_urls_allowed value to true (1). - // - // If |is_display_isolated| is true (1) the scheme will be treated as display- - // isolated. This means that pages cannot display these URLs unless they are - // from the same scheme. For example, pages in another origin cannot create - // iframes or hyperlinks to URLs with this scheme. - // - // This function may be called on any thread. It should only be called once - // per unique |scheme_name| value. If |scheme_name| is already registered or - // if an error occurs this function will return false (0). - /// - int (CEF_CALLBACK *add_custom_scheme)(struct _cef_scheme_registrar_t* self, - const cef_string_t* scheme_name, int is_standard, int is_local, - int is_display_isolated); -} cef_scheme_registrar_t; - - -/// -// Structure that creates cef_resource_handler_t instances for handling scheme -// requests. The functions of this structure will always be called on the IO -// thread. -/// -typedef struct _cef_scheme_handler_factory_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Return a new resource handler instance to handle the request or an NULL - // reference to allow default handling of the request. |browser| and |frame| - // will be the browser window and frame respectively that originated the - // request or NULL if the request did not originate from a browser window (for - // example, if the request came from cef_urlrequest_t). The |request| object - // passed to this function will not contain cookie data. - /// - struct _cef_resource_handler_t* (CEF_CALLBACK *create)( - struct _cef_scheme_handler_factory_t* self, - struct _cef_browser_t* browser, struct _cef_frame_t* frame, - const cef_string_t* scheme_name, struct _cef_request_t* request); -} cef_scheme_handler_factory_t; - - -/// -// Register a scheme handler factory with the global request context. An NULL -// |domain_name| value for a standard scheme will cause the factory to match all -// domain names. The |domain_name| value will be ignored for non-standard -// schemes. If |scheme_name| is a built-in scheme and no handler is returned by -// |factory| then the built-in scheme handler factory will be called. If -// |scheme_name| is a custom scheme then you must also implement the -// cef_app_t::on_register_custom_schemes() function in all processes. This -// function may be called multiple times to change or remove the factory that -// matches the specified |scheme_name| and optional |domain_name|. Returns false -// (0) if an error occurs. This function may be called on any thread in the -// browser process. Using this function is equivalent to calling cef_request_tCo -// ntext::cef_request_context_get_global_context()->register_scheme_handler_fact -// ory(). -/// -CEF_EXPORT int cef_register_scheme_handler_factory( - const cef_string_t* scheme_name, const cef_string_t* domain_name, - cef_scheme_handler_factory_t* factory); - -/// -// Clear all scheme handler factories registered with the global request -// context. Returns false (0) on error. This function may be called on any -// thread in the browser process. Using this function is equivalent to calling c -// ef_request_tContext::cef_request_context_get_global_context()->clear_scheme_h -// andler_factories(). -/// -CEF_EXPORT int cef_clear_scheme_handler_factories(); - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_SCHEME_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_ssl_info_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_ssl_info_capi.h deleted file mode 100644 index fe340de7..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_ssl_info_capi.h +++ /dev/null @@ -1,220 +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_SSL_INFO_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_SSL_INFO_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_values_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Structure representing the issuer or subject field of an X.509 certificate. -/// -typedef struct _cef_sslcert_principal_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns a name that can be used to represent the issuer. It tries in this - // order: CN, O and OU and returns the first non-NULL one found. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_display_name)( - struct _cef_sslcert_principal_t* self); - - /// - // Returns the common name. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_common_name)( - struct _cef_sslcert_principal_t* self); - - /// - // Returns the locality name. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_locality_name)( - struct _cef_sslcert_principal_t* self); - - /// - // Returns the state or province name. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_state_or_province_name)( - struct _cef_sslcert_principal_t* self); - - /// - // Returns the country name. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_country_name)( - struct _cef_sslcert_principal_t* self); - - /// - // Retrieve the list of street addresses. - /// - void (CEF_CALLBACK *get_street_addresses)( - struct _cef_sslcert_principal_t* self, cef_string_list_t addresses); - - /// - // Retrieve the list of organization names. - /// - void (CEF_CALLBACK *get_organization_names)( - struct _cef_sslcert_principal_t* self, cef_string_list_t names); - - /// - // Retrieve the list of organization unit names. - /// - void (CEF_CALLBACK *get_organization_unit_names)( - struct _cef_sslcert_principal_t* self, cef_string_list_t names); - - /// - // Retrieve the list of domain components. - /// - void (CEF_CALLBACK *get_domain_components)( - struct _cef_sslcert_principal_t* self, cef_string_list_t components); -} cef_sslcert_principal_t; - - -/// -// Structure representing SSL information. -/// -typedef struct _cef_sslinfo_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns a bitmask containing any and all problems verifying the server - // certificate. - /// - cef_cert_status_t (CEF_CALLBACK *get_cert_status)( - struct _cef_sslinfo_t* self); - - /// - // Returns true (1) if the certificate status has any error, major or minor. - /// - int (CEF_CALLBACK *is_cert_status_error)(struct _cef_sslinfo_t* self); - - /// - // Returns true (1) if the certificate status represents only minor errors - // (e.g. failure to verify certificate revocation). - /// - int (CEF_CALLBACK *is_cert_status_minor_error)(struct _cef_sslinfo_t* self); - - /// - // Returns the subject of the X.509 certificate. For HTTPS server certificates - // this represents the web server. The common name of the subject should - // match the host name of the web server. - /// - struct _cef_sslcert_principal_t* (CEF_CALLBACK *get_subject)( - struct _cef_sslinfo_t* self); - - /// - // Returns the issuer of the X.509 certificate. - /// - struct _cef_sslcert_principal_t* (CEF_CALLBACK *get_issuer)( - struct _cef_sslinfo_t* self); - - /// - // Returns the DER encoded serial number for the X.509 certificate. The value - // possibly includes a leading 00 byte. - /// - struct _cef_binary_value_t* (CEF_CALLBACK *get_serial_number)( - struct _cef_sslinfo_t* self); - - /// - // Returns the date before which the X.509 certificate is invalid. - // CefTime.GetTimeT() will return 0 if no date was specified. - /// - cef_time_t (CEF_CALLBACK *get_valid_start)(struct _cef_sslinfo_t* self); - - /// - // Returns the date after which the X.509 certificate is invalid. - // CefTime.GetTimeT() will return 0 if no date was specified. - /// - cef_time_t (CEF_CALLBACK *get_valid_expiry)(struct _cef_sslinfo_t* self); - - /// - // Returns the DER encoded data for the X.509 certificate. - /// - struct _cef_binary_value_t* (CEF_CALLBACK *get_derencoded)( - struct _cef_sslinfo_t* self); - - /// - // Returns the PEM encoded data for the X.509 certificate. - /// - struct _cef_binary_value_t* (CEF_CALLBACK *get_pemencoded)( - struct _cef_sslinfo_t* self); - - /// - // Returns the number of certificates in the issuer chain. If 0, the - // certificate is self-signed. - /// - size_t (CEF_CALLBACK *get_issuer_chain_size)(struct _cef_sslinfo_t* self); - - /// - // Returns the DER encoded data for the certificate issuer chain. If we failed - // to encode a certificate in the chain it is still present in the array but - // is an NULL string. - /// - void (CEF_CALLBACK *get_derencoded_issuer_chain)(struct _cef_sslinfo_t* self, - size_t* chainCount, struct _cef_binary_value_t** chain); - - /// - // Returns the PEM encoded data for the certificate issuer chain. If we failed - // to encode a certificate in the chain it is still present in the array but - // is an NULL string. - /// - void (CEF_CALLBACK *get_pemencoded_issuer_chain)(struct _cef_sslinfo_t* self, - size_t* chainCount, struct _cef_binary_value_t** chain); -} cef_sslinfo_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_SSL_INFO_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_stream_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_stream_capi.h deleted file mode 100644 index 35e514fd..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_stream_capi.h +++ /dev/null @@ -1,252 +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_STREAM_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_STREAM_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Structure the client can implement to provide a custom stream reader. The -// functions of this structure may be called on any thread. -/// -typedef struct _cef_read_handler_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Read raw binary data. - /// - size_t (CEF_CALLBACK *read)(struct _cef_read_handler_t* self, void* ptr, - size_t size, size_t n); - - /// - // Seek to the specified offset position. |whence| may be any one of SEEK_CUR, - // SEEK_END or SEEK_SET. Return zero on success and non-zero on failure. - /// - int (CEF_CALLBACK *seek)(struct _cef_read_handler_t* self, int64 offset, - int whence); - - /// - // Return the current offset position. - /// - int64 (CEF_CALLBACK *tell)(struct _cef_read_handler_t* self); - - /// - // Return non-zero if at end of file. - /// - int (CEF_CALLBACK *eof)(struct _cef_read_handler_t* self); - - /// - // Return true (1) if this handler performs work like accessing the file - // system which may block. Used as a hint for determining the thread to access - // the handler from. - /// - int (CEF_CALLBACK *may_block)(struct _cef_read_handler_t* self); -} cef_read_handler_t; - - -/// -// Structure used to read data from a stream. The functions of this structure -// may be called on any thread. -/// -typedef struct _cef_stream_reader_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Read raw binary data. - /// - size_t (CEF_CALLBACK *read)(struct _cef_stream_reader_t* self, void* ptr, - size_t size, size_t n); - - /// - // Seek to the specified offset position. |whence| may be any one of SEEK_CUR, - // SEEK_END or SEEK_SET. Returns zero on success and non-zero on failure. - /// - int (CEF_CALLBACK *seek)(struct _cef_stream_reader_t* self, int64 offset, - int whence); - - /// - // Return the current offset position. - /// - int64 (CEF_CALLBACK *tell)(struct _cef_stream_reader_t* self); - - /// - // Return non-zero if at end of file. - /// - int (CEF_CALLBACK *eof)(struct _cef_stream_reader_t* self); - - /// - // Returns true (1) if this reader performs work like accessing the file - // system which may block. Used as a hint for determining the thread to access - // the reader from. - /// - int (CEF_CALLBACK *may_block)(struct _cef_stream_reader_t* self); -} cef_stream_reader_t; - - -/// -// Create a new cef_stream_reader_t object from a file. -/// -CEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_file( - const cef_string_t* fileName); - -/// -// Create a new cef_stream_reader_t object from data. -/// -CEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_data(void* data, - size_t size); - -/// -// Create a new cef_stream_reader_t object from a custom handler. -/// -CEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_handler( - cef_read_handler_t* handler); - - -/// -// Structure the client can implement to provide a custom stream writer. The -// functions of this structure may be called on any thread. -/// -typedef struct _cef_write_handler_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Write raw binary data. - /// - size_t (CEF_CALLBACK *write)(struct _cef_write_handler_t* self, - const void* ptr, size_t size, size_t n); - - /// - // Seek to the specified offset position. |whence| may be any one of SEEK_CUR, - // SEEK_END or SEEK_SET. Return zero on success and non-zero on failure. - /// - int (CEF_CALLBACK *seek)(struct _cef_write_handler_t* self, int64 offset, - int whence); - - /// - // Return the current offset position. - /// - int64 (CEF_CALLBACK *tell)(struct _cef_write_handler_t* self); - - /// - // Flush the stream. - /// - int (CEF_CALLBACK *flush)(struct _cef_write_handler_t* self); - - /// - // Return true (1) if this handler performs work like accessing the file - // system which may block. Used as a hint for determining the thread to access - // the handler from. - /// - int (CEF_CALLBACK *may_block)(struct _cef_write_handler_t* self); -} cef_write_handler_t; - - -/// -// Structure used to write data to a stream. The functions of this structure may -// be called on any thread. -/// -typedef struct _cef_stream_writer_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Write raw binary data. - /// - size_t (CEF_CALLBACK *write)(struct _cef_stream_writer_t* self, - const void* ptr, size_t size, size_t n); - - /// - // Seek to the specified offset position. |whence| may be any one of SEEK_CUR, - // SEEK_END or SEEK_SET. Returns zero on success and non-zero on failure. - /// - int (CEF_CALLBACK *seek)(struct _cef_stream_writer_t* self, int64 offset, - int whence); - - /// - // Return the current offset position. - /// - int64 (CEF_CALLBACK *tell)(struct _cef_stream_writer_t* self); - - /// - // Flush the stream. - /// - int (CEF_CALLBACK *flush)(struct _cef_stream_writer_t* self); - - /// - // Returns true (1) if this writer performs work like accessing the file - // system which may block. Used as a hint for determining the thread to access - // the writer from. - /// - int (CEF_CALLBACK *may_block)(struct _cef_stream_writer_t* self); -} cef_stream_writer_t; - - -/// -// Create a new cef_stream_writer_t object for a file. -/// -CEF_EXPORT cef_stream_writer_t* cef_stream_writer_create_for_file( - const cef_string_t* fileName); - -/// -// Create a new cef_stream_writer_t object for a custom handler. -/// -CEF_EXPORT cef_stream_writer_t* cef_stream_writer_create_for_handler( - cef_write_handler_t* handler); - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_STREAM_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_string_visitor_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_string_visitor_capi.h deleted file mode 100644 index ab9ea801..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_string_visitor_capi.h +++ /dev/null @@ -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. -// -// --------------------------------------------------------------------------- -// -// 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_STRING_VISITOR_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_STRING_VISITOR_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Implement this structure to receive string values asynchronously. -/// -typedef struct _cef_string_visitor_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Method that will be executed. - /// - void (CEF_CALLBACK *visit)(struct _cef_string_visitor_t* self, - const cef_string_t* string); -} cef_string_visitor_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_STRING_VISITOR_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_task_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_task_capi.h deleted file mode 100644 index 0ab13f44..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_task_capi.h +++ /dev/null @@ -1,159 +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_TASK_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_TASK_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Implement this structure for asynchronous task execution. If the task is -// posted successfully and if the associated message loop is still running then -// the execute() function will be called on the target thread. If the task fails -// to post then the task object may be destroyed on the source thread instead of -// the target thread. For this reason be cautious when performing work in the -// task object destructor. -/// -typedef struct _cef_task_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Method that will be executed on the target thread. - /// - void (CEF_CALLBACK *execute)(struct _cef_task_t* self); -} cef_task_t; - - -/// -// Structure that asynchronously executes tasks on the associated thread. It is -// safe to call the functions of this structure on any thread. -// -// CEF maintains multiple internal threads that are used for handling different -// types of tasks in different processes. The cef_thread_id_t definitions in -// cef_types.h list the common CEF threads. Task runners are also available for -// other CEF threads as appropriate (for example, V8 WebWorker threads). -/// -typedef struct _cef_task_runner_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns true (1) if this object is pointing to the same task runner as - // |that| object. - /// - int (CEF_CALLBACK *is_same)(struct _cef_task_runner_t* self, - struct _cef_task_runner_t* that); - - /// - // Returns true (1) if this task runner belongs to the current thread. - /// - int (CEF_CALLBACK *belongs_to_current_thread)( - struct _cef_task_runner_t* self); - - /// - // Returns true (1) if this task runner is for the specified CEF thread. - /// - int (CEF_CALLBACK *belongs_to_thread)(struct _cef_task_runner_t* self, - cef_thread_id_t threadId); - - /// - // Post a task for execution on the thread associated with this task runner. - // Execution will occur asynchronously. - /// - int (CEF_CALLBACK *post_task)(struct _cef_task_runner_t* self, - struct _cef_task_t* task); - - /// - // Post a task for delayed execution on the thread associated with this task - // runner. Execution will occur asynchronously. Delayed tasks are not - // supported on V8 WebWorker threads and will be executed without the - // specified delay. - /// - int (CEF_CALLBACK *post_delayed_task)(struct _cef_task_runner_t* self, - struct _cef_task_t* task, int64 delay_ms); -} cef_task_runner_t; - - -/// -// Returns the task runner for the current thread. Only CEF threads will have -// task runners. An NULL reference will be returned if this function is called -// on an invalid thread. -/// -CEF_EXPORT cef_task_runner_t* cef_task_runner_get_for_current_thread(); - -/// -// Returns the task runner for the specified CEF thread. -/// -CEF_EXPORT cef_task_runner_t* cef_task_runner_get_for_thread( - cef_thread_id_t threadId); - - -/// -// Returns true (1) if called on the specified thread. Equivalent to using -// cef_task_tRunner::GetForThread(threadId)->belongs_to_current_thread(). -/// -CEF_EXPORT int cef_currently_on(cef_thread_id_t threadId); - -/// -// Post a task for execution on the specified thread. Equivalent to using -// cef_task_tRunner::GetForThread(threadId)->PostTask(task). -/// -CEF_EXPORT int cef_post_task(cef_thread_id_t threadId, cef_task_t* task); - -/// -// Post a task for delayed execution on the specified thread. Equivalent to -// using cef_task_tRunner::GetForThread(threadId)->PostDelayedTask(task, -// delay_ms). -/// -CEF_EXPORT int cef_post_delayed_task(cef_thread_id_t threadId, cef_task_t* task, - int64 delay_ms); - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_TASK_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_trace_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_trace_capi.h deleted file mode 100644 index 1d398e3c..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_trace_capi.h +++ /dev/null @@ -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_CEF_TRACE_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_TRACE_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_callback_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Implement this structure to receive notification when tracing has completed. -// The functions of this structure will be called on the browser process UI -// thread. -/// -typedef struct _cef_end_tracing_callback_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Called after all processes have sent their trace data. |tracing_file| is - // the path at which tracing data was written. The client is responsible for - // deleting |tracing_file|. - /// - void (CEF_CALLBACK *on_end_tracing_complete)( - struct _cef_end_tracing_callback_t* self, - const cef_string_t* tracing_file); -} cef_end_tracing_callback_t; - - -/// -// Start tracing events on all processes. Tracing is initialized asynchronously -// and |callback| will be executed on the UI thread after initialization is -// complete. -// -// If CefBeginTracing was called previously, or if a CefEndTracingAsync call is -// pending, CefBeginTracing will fail and return false (0). -// -// |categories| is a comma-delimited list of category wildcards. A category can -// have an optional '-' prefix to make it an excluded category. Having both -// included and excluded categories in the same list is not supported. -// -// Example: "test_MyTest*" Example: "test_MyTest*,test_OtherStuff" Example: -// "-excluded_category1,-excluded_category2" -// -// This function must be called on the browser process UI thread. -/// -CEF_EXPORT int cef_begin_tracing(const cef_string_t* categories, - struct _cef_completion_callback_t* callback); - -/// -// Stop tracing events on all processes. -// -// This function will fail and return false (0) if a previous call to -// CefEndTracingAsync is already pending or if CefBeginTracing was not called. -// -// |tracing_file| is the path at which tracing data will be written and -// |callback| is the callback that will be executed once all processes have sent -// their trace data. If |tracing_file| is NULL a new temporary file path will be -// used. If |callback| is NULL no trace data will be written. -// -// This function must be called on the browser process UI thread. -/// -CEF_EXPORT int cef_end_tracing(const cef_string_t* tracing_file, - cef_end_tracing_callback_t* callback); - -/// -// Returns the current system trace time or, if none is defined, the current -// high-res time. Can be used by clients to synchronize with the time -// information in trace events. -/// -CEF_EXPORT int64 cef_now_from_system_trace_time(); - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_TRACE_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_urlrequest_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_urlrequest_capi.h deleted file mode 100644 index b325a3be..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_urlrequest_capi.h +++ /dev/null @@ -1,194 +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_URLREQUEST_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_URLREQUEST_CAPI_H_ -#pragma once - -#include "include/capi/cef_auth_callback_capi.h" -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_request_capi.h" -#include "include/capi/cef_request_context_capi.h" -#include "include/capi/cef_response_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct _cef_urlrequest_client_t; - -/// -// Structure used to make a URL request. URL requests are not associated with a -// browser instance so no cef_client_t callbacks will be executed. URL requests -// can be created on any valid CEF thread in either the browser or render -// process. Once created the functions of the URL request object must be -// accessed on the same thread that created it. -/// -typedef struct _cef_urlrequest_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns the request object used to create this URL request. The returned - // object is read-only and should not be modified. - /// - struct _cef_request_t* (CEF_CALLBACK *get_request)( - struct _cef_urlrequest_t* self); - - /// - // Returns the client. - /// - struct _cef_urlrequest_client_t* (CEF_CALLBACK *get_client)( - struct _cef_urlrequest_t* self); - - /// - // Returns the request status. - /// - cef_urlrequest_status_t (CEF_CALLBACK *get_request_status)( - struct _cef_urlrequest_t* self); - - /// - // Returns the request error if status is UR_CANCELED or UR_FAILED, or 0 - // otherwise. - /// - cef_errorcode_t (CEF_CALLBACK *get_request_error)( - struct _cef_urlrequest_t* self); - - /// - // Returns the response, or NULL if no response information is available. - // Response information will only be available after the upload has completed. - // The returned object is read-only and should not be modified. - /// - struct _cef_response_t* (CEF_CALLBACK *get_response)( - struct _cef_urlrequest_t* self); - - /// - // Cancel the request. - /// - void (CEF_CALLBACK *cancel)(struct _cef_urlrequest_t* self); -} cef_urlrequest_t; - - -/// -// Create a new URL request. Only GET, POST, HEAD, DELETE and PUT request -// functions are supported. Multiple post data elements are not supported and -// elements of type PDE_TYPE_FILE are only supported for requests originating -// from the browser process. Requests originating from the render process will -// receive the same handling as requests originating from Web content -- if the -// response contains Content-Disposition or Mime-Type header values that would -// not normally be rendered then the response may receive special handling -// inside the browser (for example, via the file download code path instead of -// the URL request code path). The |request| object will be marked as read-only -// after calling this function. In the browser process if |request_context| is -// NULL the global request context will be used. In the render process -// |request_context| must be NULL and the context associated with the current -// renderer process' browser will be used. -/// -CEF_EXPORT cef_urlrequest_t* cef_urlrequest_create( - struct _cef_request_t* request, struct _cef_urlrequest_client_t* client, - struct _cef_request_context_t* request_context); - - -/// -// Structure that should be implemented by the cef_urlrequest_t client. The -// functions of this structure will be called on the same thread that created -// the request unless otherwise documented. -/// -typedef struct _cef_urlrequest_client_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Notifies the client that the request has completed. Use the - // cef_urlrequest_t::GetRequestStatus function to determine if the request was - // successful or not. - /// - void (CEF_CALLBACK *on_request_complete)( - struct _cef_urlrequest_client_t* self, - struct _cef_urlrequest_t* request); - - /// - // Notifies the client of upload progress. |current| denotes the number of - // bytes sent so far and |total| is the total size of uploading data (or -1 if - // chunked upload is enabled). This function will only be called if the - // UR_FLAG_REPORT_UPLOAD_PROGRESS flag is set on the request. - /// - void (CEF_CALLBACK *on_upload_progress)(struct _cef_urlrequest_client_t* self, - struct _cef_urlrequest_t* request, int64 current, int64 total); - - /// - // Notifies the client of download progress. |current| denotes the number of - // bytes received up to the call and |total| is the expected total size of the - // response (or -1 if not determined). - /// - void (CEF_CALLBACK *on_download_progress)( - struct _cef_urlrequest_client_t* self, struct _cef_urlrequest_t* request, - int64 current, int64 total); - - /// - // Called when some part of the response is read. |data| contains the current - // bytes received since the last call. This function will not be called if the - // UR_FLAG_NO_DOWNLOAD_DATA flag is set on the request. - /// - void (CEF_CALLBACK *on_download_data)(struct _cef_urlrequest_client_t* self, - struct _cef_urlrequest_t* request, const void* data, - size_t data_length); - - /// - // Called on the IO thread when the browser needs credentials from the user. - // |isProxy| indicates whether the host is a proxy server. |host| contains the - // hostname and |port| contains the port number. Return true (1) to continue - // the request and call cef_auth_callback_t::cont() when the authentication - // information is available. Return false (0) to cancel the request. This - // function will only be called for requests initiated from the browser - // process. - /// - int (CEF_CALLBACK *get_auth_credentials)( - struct _cef_urlrequest_client_t* self, int isProxy, - const cef_string_t* host, int port, const cef_string_t* realm, - const cef_string_t* scheme, struct _cef_auth_callback_t* callback); -} cef_urlrequest_client_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_URLREQUEST_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_v8_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_v8_capi.h deleted file mode 100644 index 4bc4025d..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_v8_capi.h +++ /dev/null @@ -1,852 +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_V8_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_V8_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_browser_capi.h" -#include "include/capi/cef_frame_capi.h" -#include "include/capi/cef_task_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct _cef_v8exception_t; -struct _cef_v8handler_t; -struct _cef_v8stack_frame_t; -struct _cef_v8value_t; - -/// -// Structure representing a V8 context handle. V8 handles can only be accessed -// from the thread on which they are created. Valid threads for creating a V8 -// handle include the render process main thread (TID_RENDERER) and WebWorker -// threads. A task runner for posting tasks on the associated thread can be -// retrieved via the cef_v8context_t::get_task_runner() function. -/// -typedef struct _cef_v8context_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns the task runner associated with this context. V8 handles can only - // be accessed from the thread on which they are created. This function can be - // called on any render process thread. - /// - struct _cef_task_runner_t* (CEF_CALLBACK *get_task_runner)( - struct _cef_v8context_t* self); - - /// - // Returns true (1) if the underlying handle is valid and it can be accessed - // on the current thread. Do not call any other functions if this function - // returns false (0). - /// - int (CEF_CALLBACK *is_valid)(struct _cef_v8context_t* self); - - /// - // Returns the browser for this context. This function will return an NULL - // reference for WebWorker contexts. - /// - struct _cef_browser_t* (CEF_CALLBACK *get_browser)( - struct _cef_v8context_t* self); - - /// - // Returns the frame for this context. This function will return an NULL - // reference for WebWorker contexts. - /// - struct _cef_frame_t* (CEF_CALLBACK *get_frame)(struct _cef_v8context_t* self); - - /// - // Returns the global object for this context. The context must be entered - // before calling this function. - /// - struct _cef_v8value_t* (CEF_CALLBACK *get_global)( - struct _cef_v8context_t* self); - - /// - // Enter this context. A context must be explicitly entered before creating a - // V8 Object, Array, Function or Date asynchronously. exit() must be called - // the same number of times as enter() before releasing this context. V8 - // objects belong to the context in which they are created. Returns true (1) - // if the scope was entered successfully. - /// - int (CEF_CALLBACK *enter)(struct _cef_v8context_t* self); - - /// - // Exit this context. Call this function only after calling enter(). Returns - // true (1) if the scope was exited successfully. - /// - int (CEF_CALLBACK *exit)(struct _cef_v8context_t* self); - - /// - // Returns true (1) if this object is pointing to the same handle as |that| - // object. - /// - int (CEF_CALLBACK *is_same)(struct _cef_v8context_t* self, - struct _cef_v8context_t* that); - - /// - // Evaluates the specified JavaScript code using this context's global object. - // On success |retval| will be set to the return value, if any, and the - // function will return true (1). On failure |exception| will be set to the - // exception, if any, and the function will return false (0). - /// - int (CEF_CALLBACK *eval)(struct _cef_v8context_t* self, - const cef_string_t* code, struct _cef_v8value_t** retval, - struct _cef_v8exception_t** exception); -} cef_v8context_t; - - -/// -// Returns the current (top) context object in the V8 context stack. -/// -CEF_EXPORT cef_v8context_t* cef_v8context_get_current_context(); - -/// -// Returns the entered (bottom) context object in the V8 context stack. -/// -CEF_EXPORT cef_v8context_t* cef_v8context_get_entered_context(); - -/// -// Returns true (1) if V8 is currently inside a context. -/// -CEF_EXPORT int cef_v8context_in_context(); - - -/// -// Structure that should be implemented to handle V8 function calls. The -// functions of this structure will be called on the thread associated with the -// V8 function. -/// -typedef struct _cef_v8handler_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Handle execution of the function identified by |name|. |object| is the - // receiver ('this' object) of the function. |arguments| is the list of - // arguments passed to the function. If execution succeeds set |retval| to the - // function return value. If execution fails set |exception| to the exception - // that will be thrown. Return true (1) if execution was handled. - /// - int (CEF_CALLBACK *execute)(struct _cef_v8handler_t* self, - const cef_string_t* name, struct _cef_v8value_t* object, - size_t argumentsCount, struct _cef_v8value_t* const* arguments, - struct _cef_v8value_t** retval, cef_string_t* exception); -} cef_v8handler_t; - - -/// -// Structure that should be implemented to handle V8 accessor calls. Accessor -// identifiers are registered by calling cef_v8value_t::set_value(). The -// functions of this structure will be called on the thread associated with the -// V8 accessor. -/// -typedef struct _cef_v8accessor_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Handle retrieval the accessor value identified by |name|. |object| is the - // receiver ('this' object) of the accessor. If retrieval succeeds set - // |retval| to the return value. If retrieval fails set |exception| to the - // exception that will be thrown. Return true (1) if accessor retrieval was - // handled. - /// - int (CEF_CALLBACK *get)(struct _cef_v8accessor_t* self, - const cef_string_t* name, struct _cef_v8value_t* object, - struct _cef_v8value_t** retval, cef_string_t* exception); - - /// - // Handle assignment of the accessor value identified by |name|. |object| is - // the receiver ('this' object) of the accessor. |value| is the new value - // being assigned to the accessor. If assignment fails set |exception| to the - // exception that will be thrown. Return true (1) if accessor assignment was - // handled. - /// - int (CEF_CALLBACK *set)(struct _cef_v8accessor_t* self, - const cef_string_t* name, struct _cef_v8value_t* object, - struct _cef_v8value_t* value, cef_string_t* exception); -} cef_v8accessor_t; - - -/// -// Structure representing a V8 exception. The functions of this structure may be -// called on any render process thread. -/// -typedef struct _cef_v8exception_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns the exception message. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_message)( - struct _cef_v8exception_t* self); - - /// - // Returns the line of source code that the exception occurred within. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_source_line)( - struct _cef_v8exception_t* self); - - /// - // Returns the resource name for the script from where the function causing - // the error originates. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_script_resource_name)( - struct _cef_v8exception_t* self); - - /// - // Returns the 1-based number of the line where the error occurred or 0 if the - // line number is unknown. - /// - int (CEF_CALLBACK *get_line_number)(struct _cef_v8exception_t* self); - - /// - // Returns the index within the script of the first character where the error - // occurred. - /// - int (CEF_CALLBACK *get_start_position)(struct _cef_v8exception_t* self); - - /// - // Returns the index within the script of the last character where the error - // occurred. - /// - int (CEF_CALLBACK *get_end_position)(struct _cef_v8exception_t* self); - - /// - // Returns the index within the line of the first character where the error - // occurred. - /// - int (CEF_CALLBACK *get_start_column)(struct _cef_v8exception_t* self); - - /// - // Returns the index within the line of the last character where the error - // occurred. - /// - int (CEF_CALLBACK *get_end_column)(struct _cef_v8exception_t* self); -} cef_v8exception_t; - - -/// -// Structure representing a V8 value handle. V8 handles can only be accessed -// from the thread on which they are created. Valid threads for creating a V8 -// handle include the render process main thread (TID_RENDERER) and WebWorker -// threads. A task runner for posting tasks on the associated thread can be -// retrieved via the cef_v8context_t::get_task_runner() function. -/// -typedef struct _cef_v8value_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns true (1) if the underlying handle is valid and it can be accessed - // on the current thread. Do not call any other functions if this function - // returns false (0). - /// - int (CEF_CALLBACK *is_valid)(struct _cef_v8value_t* self); - - /// - // True if the value type is undefined. - /// - int (CEF_CALLBACK *is_undefined)(struct _cef_v8value_t* self); - - /// - // True if the value type is null. - /// - int (CEF_CALLBACK *is_null)(struct _cef_v8value_t* self); - - /// - // True if the value type is bool. - /// - int (CEF_CALLBACK *is_bool)(struct _cef_v8value_t* self); - - /// - // True if the value type is int. - /// - int (CEF_CALLBACK *is_int)(struct _cef_v8value_t* self); - - /// - // True if the value type is unsigned int. - /// - int (CEF_CALLBACK *is_uint)(struct _cef_v8value_t* self); - - /// - // True if the value type is double. - /// - int (CEF_CALLBACK *is_double)(struct _cef_v8value_t* self); - - /// - // True if the value type is Date. - /// - int (CEF_CALLBACK *is_date)(struct _cef_v8value_t* self); - - /// - // True if the value type is string. - /// - int (CEF_CALLBACK *is_string)(struct _cef_v8value_t* self); - - /// - // True if the value type is object. - /// - int (CEF_CALLBACK *is_object)(struct _cef_v8value_t* self); - - /// - // True if the value type is array. - /// - int (CEF_CALLBACK *is_array)(struct _cef_v8value_t* self); - - /// - // True if the value type is function. - /// - int (CEF_CALLBACK *is_function)(struct _cef_v8value_t* self); - - /// - // Returns true (1) if this object is pointing to the same handle as |that| - // object. - /// - int (CEF_CALLBACK *is_same)(struct _cef_v8value_t* self, - struct _cef_v8value_t* that); - - /// - // Return a bool value. The underlying data will be converted to if - // necessary. - /// - int (CEF_CALLBACK *get_bool_value)(struct _cef_v8value_t* self); - - /// - // Return an int value. The underlying data will be converted to if - // necessary. - /// - int32 (CEF_CALLBACK *get_int_value)(struct _cef_v8value_t* self); - - /// - // Return an unisgned int value. The underlying data will be converted to if - // necessary. - /// - uint32 (CEF_CALLBACK *get_uint_value)(struct _cef_v8value_t* self); - - /// - // Return a double value. The underlying data will be converted to if - // necessary. - /// - double (CEF_CALLBACK *get_double_value)(struct _cef_v8value_t* self); - - /// - // Return a Date value. The underlying data will be converted to if - // necessary. - /// - cef_time_t (CEF_CALLBACK *get_date_value)(struct _cef_v8value_t* self); - - /// - // Return a string value. The underlying data will be converted to if - // necessary. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_string_value)( - struct _cef_v8value_t* self); - - - // OBJECT METHODS - These functions are only available on objects. Arrays and - // functions are also objects. String- and integer-based keys can be used - // interchangably with the framework converting between them as necessary. - - /// - // Returns true (1) if this is a user created object. - /// - int (CEF_CALLBACK *is_user_created)(struct _cef_v8value_t* self); - - /// - // Returns true (1) if the last function call resulted in an exception. This - // attribute exists only in the scope of the current CEF value object. - /// - int (CEF_CALLBACK *has_exception)(struct _cef_v8value_t* self); - - /// - // Returns the exception resulting from the last function call. This attribute - // exists only in the scope of the current CEF value object. - /// - struct _cef_v8exception_t* (CEF_CALLBACK *get_exception)( - struct _cef_v8value_t* self); - - /// - // Clears the last exception and returns true (1) on success. - /// - int (CEF_CALLBACK *clear_exception)(struct _cef_v8value_t* self); - - /// - // Returns true (1) if this object will re-throw future exceptions. This - // attribute exists only in the scope of the current CEF value object. - /// - int (CEF_CALLBACK *will_rethrow_exceptions)(struct _cef_v8value_t* self); - - /// - // Set whether this object will re-throw future exceptions. By default - // exceptions are not re-thrown. If a exception is re-thrown the current - // context should not be accessed again until after the exception has been - // caught and not re-thrown. Returns true (1) on success. This attribute - // exists only in the scope of the current CEF value object. - /// - int (CEF_CALLBACK *set_rethrow_exceptions)(struct _cef_v8value_t* self, - int rethrow); - - /// - // Returns true (1) if the object has a value with the specified identifier. - /// - int (CEF_CALLBACK *has_value_bykey)(struct _cef_v8value_t* self, - const cef_string_t* key); - - /// - // Returns true (1) if the object has a value with the specified identifier. - /// - int (CEF_CALLBACK *has_value_byindex)(struct _cef_v8value_t* self, int index); - - /// - // Deletes the value with the specified identifier and returns true (1) on - // success. Returns false (0) if this function is called incorrectly or an - // exception is thrown. For read-only and don't-delete values this function - // will return true (1) even though deletion failed. - /// - int (CEF_CALLBACK *delete_value_bykey)(struct _cef_v8value_t* self, - const cef_string_t* key); - - /// - // Deletes the value with the specified identifier and returns true (1) on - // success. Returns false (0) if this function is called incorrectly, deletion - // fails or an exception is thrown. For read-only and don't-delete values this - // function will return true (1) even though deletion failed. - /// - int (CEF_CALLBACK *delete_value_byindex)(struct _cef_v8value_t* self, - int index); - - /// - // Returns the value with the specified identifier on success. Returns NULL if - // this function is called incorrectly or an exception is thrown. - /// - struct _cef_v8value_t* (CEF_CALLBACK *get_value_bykey)( - struct _cef_v8value_t* self, const cef_string_t* key); - - /// - // Returns the value with the specified identifier on success. Returns NULL if - // this function is called incorrectly or an exception is thrown. - /// - struct _cef_v8value_t* (CEF_CALLBACK *get_value_byindex)( - struct _cef_v8value_t* self, int index); - - /// - // Associates a value with the specified identifier and returns true (1) on - // success. Returns false (0) if this function is called incorrectly or an - // exception is thrown. For read-only values this function will return true - // (1) even though assignment failed. - /// - int (CEF_CALLBACK *set_value_bykey)(struct _cef_v8value_t* self, - const cef_string_t* key, struct _cef_v8value_t* value, - cef_v8_propertyattribute_t attribute); - - /// - // Associates a value with the specified identifier and returns true (1) on - // success. Returns false (0) if this function is called incorrectly or an - // exception is thrown. For read-only values this function will return true - // (1) even though assignment failed. - /// - int (CEF_CALLBACK *set_value_byindex)(struct _cef_v8value_t* self, int index, - struct _cef_v8value_t* value); - - /// - // Registers an identifier and returns true (1) on success. Access to the - // identifier will be forwarded to the cef_v8accessor_t instance passed to - // cef_v8value_t::cef_v8value_create_object(). Returns false (0) if this - // function is called incorrectly or an exception is thrown. For read-only - // values this function will return true (1) even though assignment failed. - /// - int (CEF_CALLBACK *set_value_byaccessor)(struct _cef_v8value_t* self, - const cef_string_t* key, cef_v8_accesscontrol_t settings, - cef_v8_propertyattribute_t attribute); - - /// - // Read the keys for the object's values into the specified vector. Integer- - // based keys will also be returned as strings. - /// - int (CEF_CALLBACK *get_keys)(struct _cef_v8value_t* self, - cef_string_list_t keys); - - /// - // Sets the user data for this object and returns true (1) on success. Returns - // false (0) if this function is called incorrectly. This function can only be - // called on user created objects. - /// - int (CEF_CALLBACK *set_user_data)(struct _cef_v8value_t* self, - struct _cef_base_t* user_data); - - /// - // Returns the user data, if any, assigned to this object. - /// - struct _cef_base_t* (CEF_CALLBACK *get_user_data)( - struct _cef_v8value_t* self); - - /// - // Returns the amount of externally allocated memory registered for the - // object. - /// - int (CEF_CALLBACK *get_externally_allocated_memory)( - struct _cef_v8value_t* self); - - /// - // Adjusts the amount of registered external memory for the object. Used to - // give V8 an indication of the amount of externally allocated memory that is - // kept alive by JavaScript objects. V8 uses this information to decide when - // to perform global garbage collection. Each cef_v8value_t tracks the amount - // of external memory associated with it and automatically decreases the - // global total by the appropriate amount on its destruction. - // |change_in_bytes| specifies the number of bytes to adjust by. This function - // returns the number of bytes associated with the object after the - // adjustment. This function can only be called on user created objects. - /// - int (CEF_CALLBACK *adjust_externally_allocated_memory)( - struct _cef_v8value_t* self, int change_in_bytes); - - - // ARRAY METHODS - These functions are only available on arrays. - - /// - // Returns the number of elements in the array. - /// - int (CEF_CALLBACK *get_array_length)(struct _cef_v8value_t* self); - - - // FUNCTION METHODS - These functions are only available on functions. - - /// - // Returns the function name. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_function_name)( - struct _cef_v8value_t* self); - - /// - // Returns the function handler or NULL if not a CEF-created function. - /// - struct _cef_v8handler_t* (CEF_CALLBACK *get_function_handler)( - struct _cef_v8value_t* self); - - /// - // Execute the function using the current V8 context. This function should - // only be called from within the scope of a cef_v8handler_t or - // cef_v8accessor_t callback, or in combination with calling enter() and - // exit() on a stored cef_v8context_t reference. |object| is the receiver - // ('this' object) of the function. If |object| is NULL the current context's - // global object will be used. |arguments| is the list of arguments that will - // be passed to the function. Returns the function return value on success. - // Returns NULL if this function is called incorrectly or an exception is - // thrown. - /// - struct _cef_v8value_t* (CEF_CALLBACK *execute_function)( - struct _cef_v8value_t* self, struct _cef_v8value_t* object, - size_t argumentsCount, struct _cef_v8value_t* const* arguments); - - /// - // Execute the function using the specified V8 context. |object| is the - // receiver ('this' object) of the function. If |object| is NULL the specified - // context's global object will be used. |arguments| is the list of arguments - // that will be passed to the function. Returns the function return value on - // success. Returns NULL if this function is called incorrectly or an - // exception is thrown. - /// - struct _cef_v8value_t* (CEF_CALLBACK *execute_function_with_context)( - struct _cef_v8value_t* self, struct _cef_v8context_t* context, - struct _cef_v8value_t* object, size_t argumentsCount, - struct _cef_v8value_t* const* arguments); -} cef_v8value_t; - - -/// -// Create a new cef_v8value_t object of type undefined. -/// -CEF_EXPORT cef_v8value_t* cef_v8value_create_undefined(); - -/// -// Create a new cef_v8value_t object of type null. -/// -CEF_EXPORT cef_v8value_t* cef_v8value_create_null(); - -/// -// Create a new cef_v8value_t object of type bool. -/// -CEF_EXPORT cef_v8value_t* cef_v8value_create_bool(int value); - -/// -// Create a new cef_v8value_t object of type int. -/// -CEF_EXPORT cef_v8value_t* cef_v8value_create_int(int32 value); - -/// -// Create a new cef_v8value_t object of type unsigned int. -/// -CEF_EXPORT cef_v8value_t* cef_v8value_create_uint(uint32 value); - -/// -// Create a new cef_v8value_t object of type double. -/// -CEF_EXPORT cef_v8value_t* cef_v8value_create_double(double value); - -/// -// Create a new cef_v8value_t object of type Date. This function should only be -// called from within the scope of a cef_render_process_handler_t, -// cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling -// enter() and exit() on a stored cef_v8context_t reference. -/// -CEF_EXPORT cef_v8value_t* cef_v8value_create_date(const cef_time_t* date); - -/// -// Create a new cef_v8value_t object of type string. -/// -CEF_EXPORT cef_v8value_t* cef_v8value_create_string(const cef_string_t* value); - -/// -// Create a new cef_v8value_t object of type object with optional accessor. This -// function should only be called from within the scope of a -// cef_render_process_handler_t, cef_v8handler_t or cef_v8accessor_t callback, -// or in combination with calling enter() and exit() on a stored cef_v8context_t -// reference. -/// -CEF_EXPORT cef_v8value_t* cef_v8value_create_object(cef_v8accessor_t* accessor); - -/// -// Create a new cef_v8value_t object of type array with the specified |length|. -// If |length| is negative the returned array will have length 0. This function -// should only be called from within the scope of a -// cef_render_process_handler_t, cef_v8handler_t or cef_v8accessor_t callback, -// or in combination with calling enter() and exit() on a stored cef_v8context_t -// reference. -/// -CEF_EXPORT cef_v8value_t* cef_v8value_create_array(int length); - -/// -// Create a new cef_v8value_t object of type function. This function should only -// be called from within the scope of a cef_render_process_handler_t, -// cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling -// enter() and exit() on a stored cef_v8context_t reference. -/// -CEF_EXPORT cef_v8value_t* cef_v8value_create_function(const cef_string_t* name, - cef_v8handler_t* handler); - - -/// -// Structure representing a V8 stack trace handle. V8 handles can only be -// accessed from the thread on which they are created. Valid threads for -// creating a V8 handle include the render process main thread (TID_RENDERER) -// and WebWorker threads. A task runner for posting tasks on the associated -// thread can be retrieved via the cef_v8context_t::get_task_runner() function. -/// -typedef struct _cef_v8stack_trace_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns true (1) if the underlying handle is valid and it can be accessed - // on the current thread. Do not call any other functions if this function - // returns false (0). - /// - int (CEF_CALLBACK *is_valid)(struct _cef_v8stack_trace_t* self); - - /// - // Returns the number of stack frames. - /// - int (CEF_CALLBACK *get_frame_count)(struct _cef_v8stack_trace_t* self); - - /// - // Returns the stack frame at the specified 0-based index. - /// - struct _cef_v8stack_frame_t* (CEF_CALLBACK *get_frame)( - struct _cef_v8stack_trace_t* self, int index); -} cef_v8stack_trace_t; - - -/// -// Returns the stack trace for the currently active context. |frame_limit| is -// the maximum number of frames that will be captured. -/// -CEF_EXPORT cef_v8stack_trace_t* cef_v8stack_trace_get_current(int frame_limit); - - -/// -// Structure representing a V8 stack frame handle. V8 handles can only be -// accessed from the thread on which they are created. Valid threads for -// creating a V8 handle include the render process main thread (TID_RENDERER) -// and WebWorker threads. A task runner for posting tasks on the associated -// thread can be retrieved via the cef_v8context_t::get_task_runner() function. -/// -typedef struct _cef_v8stack_frame_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns true (1) if the underlying handle is valid and it can be accessed - // on the current thread. Do not call any other functions if this function - // returns false (0). - /// - int (CEF_CALLBACK *is_valid)(struct _cef_v8stack_frame_t* self); - - /// - // Returns the name of the resource script that contains the function. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_script_name)( - struct _cef_v8stack_frame_t* self); - - /// - // Returns the name of the resource script that contains the function or the - // sourceURL value if the script name is undefined and its source ends with a - // "//@ sourceURL=..." string. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_script_name_or_source_url)( - struct _cef_v8stack_frame_t* self); - - /// - // Returns the name of the function. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_function_name)( - struct _cef_v8stack_frame_t* self); - - /// - // Returns the 1-based line number for the function call or 0 if unknown. - /// - int (CEF_CALLBACK *get_line_number)(struct _cef_v8stack_frame_t* self); - - /// - // Returns the 1-based column offset on the line for the function call or 0 if - // unknown. - /// - int (CEF_CALLBACK *get_column)(struct _cef_v8stack_frame_t* self); - - /// - // Returns true (1) if the function was compiled using eval(). - /// - int (CEF_CALLBACK *is_eval)(struct _cef_v8stack_frame_t* self); - - /// - // Returns true (1) if the function was called as a constructor via "new". - /// - int (CEF_CALLBACK *is_constructor)(struct _cef_v8stack_frame_t* self); -} cef_v8stack_frame_t; - - -/// -// Register a new V8 extension with the specified JavaScript extension code and -// handler. Functions implemented by the handler are prototyped using the -// keyword 'native'. The calling of a native function is restricted to the scope -// in which the prototype of the native function is defined. This function may -// only be called on the render process main thread. -// -// Example JavaScript extension code:
-//   // create the 'example' global object if it doesn't already exist.
-//   if (!example)
-//     example = {};
-//   // create the 'example.test' global object if it doesn't already exist.
-//   if (!example.test)
-//     example.test = {};
-//   (function() {
-//     // Define the function 'example.test.myfunction'.
-//     example.test.myfunction = function() {
-//       // Call CefV8Handler::Execute() with the function name 'MyFunction'
-//       // and no arguments.
-//       native function MyFunction();
-//       return MyFunction();
-//     };
-//     // Define the getter function for parameter 'example.test.myparam'.
-//     example.test.__defineGetter__('myparam', function() {
-//       // Call CefV8Handler::Execute() with the function name 'GetMyParam'
-//       // and no arguments.
-//       native function GetMyParam();
-//       return GetMyParam();
-//     });
-//     // Define the setter function for parameter 'example.test.myparam'.
-//     example.test.__defineSetter__('myparam', function(b) {
-//       // Call CefV8Handler::Execute() with the function name 'SetMyParam'
-//       // and a single argument.
-//       native function SetMyParam();
-//       if(b) SetMyParam(b);
-//     });
-//
-//     // Extension definitions can also contain normal JavaScript variables
-//     // and functions.
-//     var myint = 0;
-//     example.test.increment = function() {
-//       myint += 1;
-//       return myint;
-//     };
-//   })();
-// 
Example usage in the page:
-//   // Call the function.
-//   example.test.myfunction();
-//   // Set the parameter.
-//   example.test.myparam = value;
-//   // Get the parameter.
-//   value = example.test.myparam;
-//   // Call another function.
-//   example.test.increment();
-// 
-/// -CEF_EXPORT int cef_register_extension(const cef_string_t* extension_name, - const cef_string_t* javascript_code, cef_v8handler_t* handler); - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_V8_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_values_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_values_capi.h deleted file mode 100644 index 6434489f..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_values_capi.h +++ /dev/null @@ -1,734 +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_VALUES_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_VALUES_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct _cef_binary_value_t; -struct _cef_dictionary_value_t; -struct _cef_list_value_t; - -/// -// Structure that wraps other data value types. Complex types (binary, -// dictionary and list) will be referenced but not owned by this object. Can be -// used on any process and thread. -/// -typedef struct _cef_value_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns true (1) if the underlying data is valid. This will always be true - // (1) for simple types. For complex types (binary, dictionary and list) the - // underlying data may become invalid if owned by another object (e.g. list or - // dictionary) and that other object is then modified or destroyed. This value - // object can be re-used by calling Set*() even if the underlying data is - // invalid. - /// - int (CEF_CALLBACK *is_valid)(struct _cef_value_t* self); - - /// - // Returns true (1) if the underlying data is owned by another object. - /// - int (CEF_CALLBACK *is_owned)(struct _cef_value_t* self); - - /// - // Returns true (1) if the underlying data is read-only. Some APIs may expose - // read-only objects. - /// - int (CEF_CALLBACK *is_read_only)(struct _cef_value_t* self); - - /// - // Returns true (1) if this object and |that| object have the same underlying - // data. If true (1) modifications to this object will also affect |that| - // object and vice-versa. - /// - int (CEF_CALLBACK *is_same)(struct _cef_value_t* self, - struct _cef_value_t* that); - - /// - // Returns true (1) if this object and |that| object have an equivalent - // underlying value but are not necessarily the same object. - /// - int (CEF_CALLBACK *is_equal)(struct _cef_value_t* self, - struct _cef_value_t* that); - - /// - // Returns a copy of this object. The underlying data will also be copied. - /// - struct _cef_value_t* (CEF_CALLBACK *copy)(struct _cef_value_t* self); - - /// - // Returns the underlying value type. - /// - cef_value_type_t (CEF_CALLBACK *get_type)(struct _cef_value_t* self); - - /// - // Returns the underlying value as type bool. - /// - int (CEF_CALLBACK *get_bool)(struct _cef_value_t* self); - - /// - // Returns the underlying value as type int. - /// - int (CEF_CALLBACK *get_int)(struct _cef_value_t* self); - - /// - // Returns the underlying value as type double. - /// - double (CEF_CALLBACK *get_double)(struct _cef_value_t* self); - - /// - // Returns the underlying value as type string. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_string)(struct _cef_value_t* self); - - /// - // Returns the underlying value as type binary. The returned reference may - // become invalid if the value is owned by another object or if ownership is - // transferred to another object in the future. To maintain a reference to the - // value after assigning ownership to a dictionary or list pass this object to - // the set_value() function instead of passing the returned reference to - // set_binary(). - /// - struct _cef_binary_value_t* (CEF_CALLBACK *get_binary)( - struct _cef_value_t* self); - - /// - // Returns the underlying value as type dictionary. The returned reference may - // become invalid if the value is owned by another object or if ownership is - // transferred to another object in the future. To maintain a reference to the - // value after assigning ownership to a dictionary or list pass this object to - // the set_value() function instead of passing the returned reference to - // set_dictionary(). - /// - struct _cef_dictionary_value_t* (CEF_CALLBACK *get_dictionary)( - struct _cef_value_t* self); - - /// - // Returns the underlying value as type list. The returned reference may - // become invalid if the value is owned by another object or if ownership is - // transferred to another object in the future. To maintain a reference to the - // value after assigning ownership to a dictionary or list pass this object to - // the set_value() function instead of passing the returned reference to - // set_list(). - /// - struct _cef_list_value_t* (CEF_CALLBACK *get_list)(struct _cef_value_t* self); - - /// - // Sets the underlying value as type null. Returns true (1) if the value was - // set successfully. - /// - int (CEF_CALLBACK *set_null)(struct _cef_value_t* self); - - /// - // Sets the underlying value as type bool. Returns true (1) if the value was - // set successfully. - /// - int (CEF_CALLBACK *set_bool)(struct _cef_value_t* self, int value); - - /// - // Sets the underlying value as type int. Returns true (1) if the value was - // set successfully. - /// - int (CEF_CALLBACK *set_int)(struct _cef_value_t* self, int value); - - /// - // Sets the underlying value as type double. Returns true (1) if the value was - // set successfully. - /// - int (CEF_CALLBACK *set_double)(struct _cef_value_t* self, double value); - - /// - // Sets the underlying value as type string. Returns true (1) if the value was - // set successfully. - /// - int (CEF_CALLBACK *set_string)(struct _cef_value_t* self, - const cef_string_t* value); - - /// - // Sets the underlying value as type binary. Returns true (1) if the value was - // set successfully. This object keeps a reference to |value| and ownership of - // the underlying data remains unchanged. - /// - int (CEF_CALLBACK *set_binary)(struct _cef_value_t* self, - struct _cef_binary_value_t* value); - - /// - // Sets the underlying value as type dict. Returns true (1) if the value was - // set successfully. This object keeps a reference to |value| and ownership of - // the underlying data remains unchanged. - /// - int (CEF_CALLBACK *set_dictionary)(struct _cef_value_t* self, - struct _cef_dictionary_value_t* value); - - /// - // Sets the underlying value as type list. Returns true (1) if the value was - // set successfully. This object keeps a reference to |value| and ownership of - // the underlying data remains unchanged. - /// - int (CEF_CALLBACK *set_list)(struct _cef_value_t* self, - struct _cef_list_value_t* value); -} cef_value_t; - - -/// -// Creates a new object. -/// -CEF_EXPORT cef_value_t* cef_value_create(); - - -/// -// Structure representing a binary value. Can be used on any process and thread. -/// -typedef struct _cef_binary_value_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns true (1) if this object is valid. This object may become invalid if - // the underlying data is owned by another object (e.g. list or dictionary) - // and that other object is then modified or destroyed. Do not call any other - // functions if this function returns false (0). - /// - int (CEF_CALLBACK *is_valid)(struct _cef_binary_value_t* self); - - /// - // Returns true (1) if this object is currently owned by another object. - /// - int (CEF_CALLBACK *is_owned)(struct _cef_binary_value_t* self); - - /// - // Returns true (1) if this object and |that| object have the same underlying - // data. - /// - int (CEF_CALLBACK *is_same)(struct _cef_binary_value_t* self, - struct _cef_binary_value_t* that); - - /// - // Returns true (1) if this object and |that| object have an equivalent - // underlying value but are not necessarily the same object. - /// - int (CEF_CALLBACK *is_equal)(struct _cef_binary_value_t* self, - struct _cef_binary_value_t* that); - - /// - // Returns a copy of this object. The data in this object will also be copied. - /// - struct _cef_binary_value_t* (CEF_CALLBACK *copy)( - struct _cef_binary_value_t* self); - - /// - // Returns the data size. - /// - size_t (CEF_CALLBACK *get_size)(struct _cef_binary_value_t* self); - - /// - // Read up to |buffer_size| number of bytes into |buffer|. Reading begins at - // the specified byte |data_offset|. Returns the number of bytes read. - /// - size_t (CEF_CALLBACK *get_data)(struct _cef_binary_value_t* self, - void* buffer, size_t buffer_size, size_t data_offset); -} cef_binary_value_t; - - -/// -// Creates a new object that is not owned by any other object. The specified -// |data| will be copied. -/// -CEF_EXPORT cef_binary_value_t* cef_binary_value_create(const void* data, - size_t data_size); - - -/// -// Structure representing a dictionary value. Can be used on any process and -// thread. -/// -typedef struct _cef_dictionary_value_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns true (1) if this object is valid. This object may become invalid if - // the underlying data is owned by another object (e.g. list or dictionary) - // and that other object is then modified or destroyed. Do not call any other - // functions if this function returns false (0). - /// - int (CEF_CALLBACK *is_valid)(struct _cef_dictionary_value_t* self); - - /// - // Returns true (1) if this object is currently owned by another object. - /// - int (CEF_CALLBACK *is_owned)(struct _cef_dictionary_value_t* self); - - /// - // Returns true (1) if the values of this object are read-only. Some APIs may - // expose read-only objects. - /// - int (CEF_CALLBACK *is_read_only)(struct _cef_dictionary_value_t* self); - - /// - // Returns true (1) if this object and |that| object have the same underlying - // data. If true (1) modifications to this object will also affect |that| - // object and vice-versa. - /// - int (CEF_CALLBACK *is_same)(struct _cef_dictionary_value_t* self, - struct _cef_dictionary_value_t* that); - - /// - // Returns true (1) if this object and |that| object have an equivalent - // underlying value but are not necessarily the same object. - /// - int (CEF_CALLBACK *is_equal)(struct _cef_dictionary_value_t* self, - struct _cef_dictionary_value_t* that); - - /// - // Returns a writable copy of this object. If |exclude_NULL_children| is true - // (1) any NULL dictionaries or lists will be excluded from the copy. - /// - struct _cef_dictionary_value_t* (CEF_CALLBACK *copy)( - struct _cef_dictionary_value_t* self, int exclude_empty_children); - - /// - // Returns the number of values. - /// - size_t (CEF_CALLBACK *get_size)(struct _cef_dictionary_value_t* self); - - /// - // Removes all values. Returns true (1) on success. - /// - int (CEF_CALLBACK *clear)(struct _cef_dictionary_value_t* self); - - /// - // Returns true (1) if the current dictionary has a value for the given key. - /// - int (CEF_CALLBACK *has_key)(struct _cef_dictionary_value_t* self, - const cef_string_t* key); - - /// - // Reads all keys for this dictionary into the specified vector. - /// - int (CEF_CALLBACK *get_keys)(struct _cef_dictionary_value_t* self, - cef_string_list_t keys); - - /// - // Removes the value at the specified key. Returns true (1) is the value was - // removed successfully. - /// - int (CEF_CALLBACK *remove)(struct _cef_dictionary_value_t* self, - const cef_string_t* key); - - /// - // Returns the value type for the specified key. - /// - cef_value_type_t (CEF_CALLBACK *get_type)( - struct _cef_dictionary_value_t* self, const cef_string_t* key); - - /// - // Returns the value at the specified key. For simple types the returned value - // will copy existing data and modifications to the value will not modify this - // object. For complex types (binary, dictionary and list) the returned value - // will reference existing data and modifications to the value will modify - // this object. - /// - struct _cef_value_t* (CEF_CALLBACK *get_value)( - struct _cef_dictionary_value_t* self, const cef_string_t* key); - - /// - // Returns the value at the specified key as type bool. - /// - int (CEF_CALLBACK *get_bool)(struct _cef_dictionary_value_t* self, - const cef_string_t* key); - - /// - // Returns the value at the specified key as type int. - /// - int (CEF_CALLBACK *get_int)(struct _cef_dictionary_value_t* self, - const cef_string_t* key); - - /// - // Returns the value at the specified key as type double. - /// - double (CEF_CALLBACK *get_double)(struct _cef_dictionary_value_t* self, - const cef_string_t* key); - - /// - // Returns the value at the specified key as type string. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_string)( - struct _cef_dictionary_value_t* self, const cef_string_t* key); - - /// - // Returns the value at the specified key as type binary. The returned value - // will reference existing data. - /// - struct _cef_binary_value_t* (CEF_CALLBACK *get_binary)( - struct _cef_dictionary_value_t* self, const cef_string_t* key); - - /// - // Returns the value at the specified key as type dictionary. The returned - // value will reference existing data and modifications to the value will - // modify this object. - /// - struct _cef_dictionary_value_t* (CEF_CALLBACK *get_dictionary)( - struct _cef_dictionary_value_t* self, const cef_string_t* key); - - /// - // Returns the value at the specified key as type list. The returned value - // will reference existing data and modifications to the value will modify - // this object. - /// - struct _cef_list_value_t* (CEF_CALLBACK *get_list)( - struct _cef_dictionary_value_t* self, const cef_string_t* key); - - /// - // Sets the value at the specified key. Returns true (1) if the value was set - // successfully. If |value| represents simple data then the underlying data - // will be copied and modifications to |value| will not modify this object. If - // |value| represents complex data (binary, dictionary or list) then the - // underlying data will be referenced and modifications to |value| will modify - // this object. - /// - int (CEF_CALLBACK *set_value)(struct _cef_dictionary_value_t* self, - const cef_string_t* key, struct _cef_value_t* value); - - /// - // Sets the value at the specified key as type null. Returns true (1) if the - // value was set successfully. - /// - int (CEF_CALLBACK *set_null)(struct _cef_dictionary_value_t* self, - const cef_string_t* key); - - /// - // Sets the value at the specified key as type bool. Returns true (1) if the - // value was set successfully. - /// - int (CEF_CALLBACK *set_bool)(struct _cef_dictionary_value_t* self, - const cef_string_t* key, int value); - - /// - // Sets the value at the specified key as type int. Returns true (1) if the - // value was set successfully. - /// - int (CEF_CALLBACK *set_int)(struct _cef_dictionary_value_t* self, - const cef_string_t* key, int value); - - /// - // Sets the value at the specified key as type double. Returns true (1) if the - // value was set successfully. - /// - int (CEF_CALLBACK *set_double)(struct _cef_dictionary_value_t* self, - const cef_string_t* key, double value); - - /// - // Sets the value at the specified key as type string. Returns true (1) if the - // value was set successfully. - /// - int (CEF_CALLBACK *set_string)(struct _cef_dictionary_value_t* self, - const cef_string_t* key, const cef_string_t* value); - - /// - // Sets the value at the specified key as type binary. Returns true (1) if the - // value was set successfully. If |value| is currently owned by another object - // then the value will be copied and the |value| reference will not change. - // Otherwise, ownership will be transferred to this object and the |value| - // reference will be invalidated. - /// - int (CEF_CALLBACK *set_binary)(struct _cef_dictionary_value_t* self, - const cef_string_t* key, struct _cef_binary_value_t* value); - - /// - // Sets the value at the specified key as type dict. Returns true (1) if the - // value was set successfully. If |value| is currently owned by another object - // then the value will be copied and the |value| reference will not change. - // Otherwise, ownership will be transferred to this object and the |value| - // reference will be invalidated. - /// - int (CEF_CALLBACK *set_dictionary)(struct _cef_dictionary_value_t* self, - const cef_string_t* key, struct _cef_dictionary_value_t* value); - - /// - // Sets the value at the specified key as type list. Returns true (1) if the - // value was set successfully. If |value| is currently owned by another object - // then the value will be copied and the |value| reference will not change. - // Otherwise, ownership will be transferred to this object and the |value| - // reference will be invalidated. - /// - int (CEF_CALLBACK *set_list)(struct _cef_dictionary_value_t* self, - const cef_string_t* key, struct _cef_list_value_t* value); -} cef_dictionary_value_t; - - -/// -// Creates a new object that is not owned by any other object. -/// -CEF_EXPORT cef_dictionary_value_t* cef_dictionary_value_create(); - - -/// -// Structure representing a list value. Can be used on any process and thread. -/// -typedef struct _cef_list_value_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns true (1) if this object is valid. This object may become invalid if - // the underlying data is owned by another object (e.g. list or dictionary) - // and that other object is then modified or destroyed. Do not call any other - // functions if this function returns false (0). - /// - int (CEF_CALLBACK *is_valid)(struct _cef_list_value_t* self); - - /// - // Returns true (1) if this object is currently owned by another object. - /// - int (CEF_CALLBACK *is_owned)(struct _cef_list_value_t* self); - - /// - // Returns true (1) if the values of this object are read-only. Some APIs may - // expose read-only objects. - /// - int (CEF_CALLBACK *is_read_only)(struct _cef_list_value_t* self); - - /// - // Returns true (1) if this object and |that| object have the same underlying - // data. If true (1) modifications to this object will also affect |that| - // object and vice-versa. - /// - int (CEF_CALLBACK *is_same)(struct _cef_list_value_t* self, - struct _cef_list_value_t* that); - - /// - // Returns true (1) if this object and |that| object have an equivalent - // underlying value but are not necessarily the same object. - /// - int (CEF_CALLBACK *is_equal)(struct _cef_list_value_t* self, - struct _cef_list_value_t* that); - - /// - // Returns a writable copy of this object. - /// - struct _cef_list_value_t* (CEF_CALLBACK *copy)( - struct _cef_list_value_t* self); - - /// - // Sets the number of values. If the number of values is expanded all new - // value slots will default to type null. Returns true (1) on success. - /// - int (CEF_CALLBACK *set_size)(struct _cef_list_value_t* self, size_t size); - - /// - // Returns the number of values. - /// - size_t (CEF_CALLBACK *get_size)(struct _cef_list_value_t* self); - - /// - // Removes all values. Returns true (1) on success. - /// - int (CEF_CALLBACK *clear)(struct _cef_list_value_t* self); - - /// - // Removes the value at the specified index. - /// - int (CEF_CALLBACK *remove)(struct _cef_list_value_t* self, int index); - - /// - // Returns the value type at the specified index. - /// - cef_value_type_t (CEF_CALLBACK *get_type)(struct _cef_list_value_t* self, - int index); - - /// - // Returns the value at the specified index. For simple types the returned - // value will copy existing data and modifications to the value will not - // modify this object. For complex types (binary, dictionary and list) the - // returned value will reference existing data and modifications to the value - // will modify this object. - /// - struct _cef_value_t* (CEF_CALLBACK *get_value)(struct _cef_list_value_t* self, - int index); - - /// - // Returns the value at the specified index as type bool. - /// - int (CEF_CALLBACK *get_bool)(struct _cef_list_value_t* self, int index); - - /// - // Returns the value at the specified index as type int. - /// - int (CEF_CALLBACK *get_int)(struct _cef_list_value_t* self, int index); - - /// - // Returns the value at the specified index as type double. - /// - double (CEF_CALLBACK *get_double)(struct _cef_list_value_t* self, int index); - - /// - // Returns the value at the specified index as type string. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_string)( - struct _cef_list_value_t* self, int index); - - /// - // Returns the value at the specified index as type binary. The returned value - // will reference existing data. - /// - struct _cef_binary_value_t* (CEF_CALLBACK *get_binary)( - struct _cef_list_value_t* self, int index); - - /// - // Returns the value at the specified index as type dictionary. The returned - // value will reference existing data and modifications to the value will - // modify this object. - /// - struct _cef_dictionary_value_t* (CEF_CALLBACK *get_dictionary)( - struct _cef_list_value_t* self, int index); - - /// - // Returns the value at the specified index as type list. The returned value - // will reference existing data and modifications to the value will modify - // this object. - /// - struct _cef_list_value_t* (CEF_CALLBACK *get_list)( - struct _cef_list_value_t* self, int index); - - /// - // Sets the value at the specified index. Returns true (1) if the value was - // set successfully. If |value| represents simple data then the underlying - // data will be copied and modifications to |value| will not modify this - // object. If |value| represents complex data (binary, dictionary or list) - // then the underlying data will be referenced and modifications to |value| - // will modify this object. - /// - int (CEF_CALLBACK *set_value)(struct _cef_list_value_t* self, int index, - struct _cef_value_t* value); - - /// - // Sets the value at the specified index as type null. Returns true (1) if the - // value was set successfully. - /// - int (CEF_CALLBACK *set_null)(struct _cef_list_value_t* self, int index); - - /// - // Sets the value at the specified index as type bool. Returns true (1) if the - // value was set successfully. - /// - int (CEF_CALLBACK *set_bool)(struct _cef_list_value_t* self, int index, - int value); - - /// - // Sets the value at the specified index as type int. Returns true (1) if the - // value was set successfully. - /// - int (CEF_CALLBACK *set_int)(struct _cef_list_value_t* self, int index, - int value); - - /// - // Sets the value at the specified index as type double. Returns true (1) if - // the value was set successfully. - /// - int (CEF_CALLBACK *set_double)(struct _cef_list_value_t* self, int index, - double value); - - /// - // Sets the value at the specified index as type string. Returns true (1) if - // the value was set successfully. - /// - int (CEF_CALLBACK *set_string)(struct _cef_list_value_t* self, int index, - const cef_string_t* value); - - /// - // Sets the value at the specified index as type binary. Returns true (1) if - // the value was set successfully. If |value| is currently owned by another - // object then the value will be copied and the |value| reference will not - // change. Otherwise, ownership will be transferred to this object and the - // |value| reference will be invalidated. - /// - int (CEF_CALLBACK *set_binary)(struct _cef_list_value_t* self, int index, - struct _cef_binary_value_t* value); - - /// - // Sets the value at the specified index as type dict. Returns true (1) if the - // value was set successfully. If |value| is currently owned by another object - // then the value will be copied and the |value| reference will not change. - // Otherwise, ownership will be transferred to this object and the |value| - // reference will be invalidated. - /// - int (CEF_CALLBACK *set_dictionary)(struct _cef_list_value_t* self, int index, - struct _cef_dictionary_value_t* value); - - /// - // Sets the value at the specified index as type list. Returns true (1) if the - // value was set successfully. If |value| is currently owned by another object - // then the value will be copied and the |value| reference will not change. - // Otherwise, ownership will be transferred to this object and the |value| - // reference will be invalidated. - /// - int (CEF_CALLBACK *set_list)(struct _cef_list_value_t* self, int index, - struct _cef_list_value_t* value); -} cef_list_value_t; - - -/// -// Creates a new object that is not owned by any other object. -/// -CEF_EXPORT cef_list_value_t* cef_list_value_create(); - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_VALUES_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_web_plugin_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_web_plugin_capi.h deleted file mode 100644 index eb98f6b6..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_web_plugin_capi.h +++ /dev/null @@ -1,195 +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_WEB_PLUGIN_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_WEB_PLUGIN_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct _cef_browser_t; - -/// -// Information about a specific web plugin. -/// -typedef struct _cef_web_plugin_info_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns the plugin name (i.e. Flash). - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_name)( - struct _cef_web_plugin_info_t* self); - - /// - // Returns the plugin file path (DLL/bundle/library). - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_path)( - struct _cef_web_plugin_info_t* self); - - /// - // Returns the version of the plugin (may be OS-specific). - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_version)( - struct _cef_web_plugin_info_t* self); - - /// - // Returns a description of the plugin from the version information. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_description)( - struct _cef_web_plugin_info_t* self); -} cef_web_plugin_info_t; - - -/// -// Structure to implement for visiting web plugin information. The functions of -// this structure will be called on the browser process UI thread. -/// -typedef struct _cef_web_plugin_info_visitor_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Method that will be called once for each plugin. |count| is the 0-based - // index for the current plugin. |total| is the total number of plugins. - // Return false (0) to stop visiting plugins. This function may never be - // called if no plugins are found. - /// - int (CEF_CALLBACK *visit)(struct _cef_web_plugin_info_visitor_t* self, - struct _cef_web_plugin_info_t* info, int count, int total); -} cef_web_plugin_info_visitor_t; - - -/// -// Structure to implement for receiving unstable plugin information. The -// functions of this structure will be called on the browser process IO thread. -/// -typedef struct _cef_web_plugin_unstable_callback_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Method that will be called for the requested plugin. |unstable| will be - // true (1) if the plugin has reached the crash count threshold of 3 times in - // 120 seconds. - /// - void (CEF_CALLBACK *is_unstable)( - struct _cef_web_plugin_unstable_callback_t* self, - const cef_string_t* path, int unstable); -} cef_web_plugin_unstable_callback_t; - - -/// -// Visit web plugin information. Can be called on any thread in the browser -// process. -/// -CEF_EXPORT void cef_visit_web_plugin_info( - cef_web_plugin_info_visitor_t* visitor); - -/// -// Cause the plugin list to refresh the next time it is accessed regardless of -// whether it has already been loaded. Can be called on any thread in the -// browser process. -/// -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 -// browser process. -/// -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. -/// -CEF_EXPORT void cef_register_web_plugin_crash(const cef_string_t* path); - -/// -// Query if a plugin is unstable. Can be called on any thread in the browser -// process. -/// -CEF_EXPORT void cef_is_web_plugin_unstable(const cef_string_t* path, - cef_web_plugin_unstable_callback_t* callback); - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_WEB_PLUGIN_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_xml_reader_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_xml_reader_capi.h deleted file mode 100644 index 6774e555..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_xml_reader_capi.h +++ /dev/null @@ -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. -// -// --------------------------------------------------------------------------- -// -// 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_XML_READER_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_XML_READER_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_stream_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Structure that supports the reading of XML data via the libxml streaming API. -// The functions of this structure should only be called on the thread that -// creates the object. -/// -typedef struct _cef_xml_reader_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Moves the cursor to the next node in the document. This function must be - // called at least once to set the current cursor position. Returns true (1) - // if the cursor position was set successfully. - /// - int (CEF_CALLBACK *move_to_next_node)(struct _cef_xml_reader_t* self); - - /// - // Close the document. This should be called directly to ensure that cleanup - // occurs on the correct thread. - /// - int (CEF_CALLBACK *close)(struct _cef_xml_reader_t* self); - - /// - // Returns true (1) if an error has been reported by the XML parser. - /// - int (CEF_CALLBACK *has_error)(struct _cef_xml_reader_t* self); - - /// - // Returns the error string. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_error)( - struct _cef_xml_reader_t* self); - - - // The below functions retrieve data for the node at the current cursor - // position. - - /// - // Returns the node type. - /// - cef_xml_node_type_t (CEF_CALLBACK *get_type)(struct _cef_xml_reader_t* self); - - /// - // Returns the node depth. Depth starts at 0 for the root node. - /// - int (CEF_CALLBACK *get_depth)(struct _cef_xml_reader_t* self); - - /// - // Returns the local name. See http://www.w3.org/TR/REC-xml-names/#NT- - // LocalPart for additional details. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_local_name)( - struct _cef_xml_reader_t* self); - - /// - // Returns the namespace prefix. See http://www.w3.org/TR/REC-xml-names/ for - // additional details. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_prefix)( - struct _cef_xml_reader_t* self); - - /// - // Returns the qualified name, equal to (Prefix:)LocalName. See - // http://www.w3.org/TR/REC-xml-names/#ns-qualnames for additional details. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_qualified_name)( - struct _cef_xml_reader_t* self); - - /// - // Returns the URI defining the namespace associated with the node. See - // http://www.w3.org/TR/REC-xml-names/ for additional details. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_namespace_uri)( - struct _cef_xml_reader_t* self); - - /// - // Returns the base URI of the node. See http://www.w3.org/TR/xmlbase/ for - // additional details. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_base_uri)( - struct _cef_xml_reader_t* self); - - /// - // Returns the xml:lang scope within which the node resides. See - // http://www.w3.org/TR/REC-xml/#sec-lang-tag for additional details. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_xml_lang)( - struct _cef_xml_reader_t* self); - - /// - // Returns true (1) if the node represents an NULL element.
is considered - // NULL but is not. - /// - int (CEF_CALLBACK *is_empty_element)(struct _cef_xml_reader_t* self); - - /// - // Returns true (1) if the node has a text value. - /// - int (CEF_CALLBACK *has_value)(struct _cef_xml_reader_t* self); - - /// - // Returns the text value. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_value)( - struct _cef_xml_reader_t* self); - - /// - // Returns true (1) if the node has attributes. - /// - int (CEF_CALLBACK *has_attributes)(struct _cef_xml_reader_t* self); - - /// - // Returns the number of attributes. - /// - size_t (CEF_CALLBACK *get_attribute_count)(struct _cef_xml_reader_t* self); - - /// - // Returns the value of the attribute at the specified 0-based index. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_attribute_byindex)( - struct _cef_xml_reader_t* self, int index); - - /// - // Returns the value of the attribute with the specified qualified name. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_attribute_byqname)( - struct _cef_xml_reader_t* self, const cef_string_t* qualifiedName); - - /// - // Returns the value of the attribute with the specified local name and - // namespace URI. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_attribute_bylname)( - struct _cef_xml_reader_t* self, const cef_string_t* localName, - const cef_string_t* namespaceURI); - - /// - // Returns an XML representation of the current node's children. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_inner_xml)( - struct _cef_xml_reader_t* self); - - /// - // Returns an XML representation of the current node including its children. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_outer_xml)( - struct _cef_xml_reader_t* self); - - /// - // Returns the line number for the current node. - /// - int (CEF_CALLBACK *get_line_number)(struct _cef_xml_reader_t* self); - - - // Attribute nodes are not traversed by default. The below functions can be - // used to move the cursor to an attribute node. move_to_carrying_element() - // can be called afterwards to return the cursor to the carrying element. The - // depth of an attribute node will be 1 + the depth of the carrying element. - - /// - // Moves the cursor to the attribute at the specified 0-based index. Returns - // true (1) if the cursor position was set successfully. - /// - int (CEF_CALLBACK *move_to_attribute_byindex)(struct _cef_xml_reader_t* self, - int index); - - /// - // Moves the cursor to the attribute with the specified qualified name. - // Returns true (1) if the cursor position was set successfully. - /// - int (CEF_CALLBACK *move_to_attribute_byqname)(struct _cef_xml_reader_t* self, - const cef_string_t* qualifiedName); - - /// - // Moves the cursor to the attribute with the specified local name and - // namespace URI. Returns true (1) if the cursor position was set - // successfully. - /// - int (CEF_CALLBACK *move_to_attribute_bylname)(struct _cef_xml_reader_t* self, - const cef_string_t* localName, const cef_string_t* namespaceURI); - - /// - // Moves the cursor to the first attribute in the current element. Returns - // true (1) if the cursor position was set successfully. - /// - int (CEF_CALLBACK *move_to_first_attribute)(struct _cef_xml_reader_t* self); - - /// - // Moves the cursor to the next attribute in the current element. Returns true - // (1) if the cursor position was set successfully. - /// - int (CEF_CALLBACK *move_to_next_attribute)(struct _cef_xml_reader_t* self); - - /// - // Moves the cursor back to the carrying element. Returns true (1) if the - // cursor position was set successfully. - /// - int (CEF_CALLBACK *move_to_carrying_element)(struct _cef_xml_reader_t* self); -} cef_xml_reader_t; - - -/// -// Create a new cef_xml_reader_t object. The returned object's functions can -// only be called from the thread that created the object. -/// -CEF_EXPORT cef_xml_reader_t* cef_xml_reader_create( - struct _cef_stream_reader_t* stream, cef_xml_encoding_type_t encodingType, - const cef_string_t* URI); - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_XML_READER_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/capi/cef_zip_reader_capi.h b/tool_kits/cef/cef_wrapper/include/capi/cef_zip_reader_capi.h deleted file mode 100644 index b1233c44..00000000 --- a/tool_kits/cef/cef_wrapper/include/capi/cef_zip_reader_capi.h +++ /dev/null @@ -1,150 +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_ZIP_READER_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_ZIP_READER_CAPI_H_ -#pragma once - -#include "include/capi/cef_base_capi.h" -#include "include/capi/cef_stream_capi.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/// -// Structure that supports the reading of zip archives via the zlib unzip API. -// The functions of this structure should only be called on the thread that -// creates the object. -/// -typedef struct _cef_zip_reader_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Moves the cursor to the first file in the archive. Returns true (1) if the - // cursor position was set successfully. - /// - int (CEF_CALLBACK *move_to_first_file)(struct _cef_zip_reader_t* self); - - /// - // Moves the cursor to the next file in the archive. Returns true (1) if the - // cursor position was set successfully. - /// - int (CEF_CALLBACK *move_to_next_file)(struct _cef_zip_reader_t* self); - - /// - // Moves the cursor to the specified file in the archive. If |caseSensitive| - // is true (1) then the search will be case sensitive. Returns true (1) if the - // cursor position was set successfully. - /// - int (CEF_CALLBACK *move_to_file)(struct _cef_zip_reader_t* self, - const cef_string_t* fileName, int caseSensitive); - - /// - // Closes the archive. This should be called directly to ensure that cleanup - // occurs on the correct thread. - /// - int (CEF_CALLBACK *close)(struct _cef_zip_reader_t* self); - - - // The below functions act on the file at the current cursor position. - - /// - // Returns the name of the file. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_file_name)( - struct _cef_zip_reader_t* self); - - /// - // Returns the uncompressed size of the file. - /// - int64 (CEF_CALLBACK *get_file_size)(struct _cef_zip_reader_t* self); - - /// - // Returns the last modified timestamp for the file. - /// - cef_time_t (CEF_CALLBACK *get_file_last_modified)( - struct _cef_zip_reader_t* self); - - /// - // Opens the file for reading of uncompressed data. A read password may - // optionally be specified. - /// - int (CEF_CALLBACK *open_file)(struct _cef_zip_reader_t* self, - const cef_string_t* password); - - /// - // Closes the file. - /// - int (CEF_CALLBACK *close_file)(struct _cef_zip_reader_t* self); - - /// - // Read uncompressed file contents into the specified buffer. Returns < 0 if - // an error occurred, 0 if at the end of file, or the number of bytes read. - /// - int (CEF_CALLBACK *read_file)(struct _cef_zip_reader_t* self, void* buffer, - size_t bufferSize); - - /// - // Returns the current offset in the uncompressed file contents. - /// - int64 (CEF_CALLBACK *tell)(struct _cef_zip_reader_t* self); - - /// - // Returns true (1) if at end of the file contents. - /// - int (CEF_CALLBACK *eof)(struct _cef_zip_reader_t* self); -} cef_zip_reader_t; - - -/// -// Create a new cef_zip_reader_t object. The returned object's functions can -// only be called from the thread that created the object. -/// -CEF_EXPORT cef_zip_reader_t* cef_zip_reader_create( - struct _cef_stream_reader_t* stream); - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_ZIP_READER_CAPI_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_app.h b/tool_kits/cef/cef_wrapper/include/cef_app.h deleted file mode 100644 index 03f31f5c..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_app.h +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_APP_H_ -#define CEF_INCLUDE_CEF_APP_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_browser_process_handler.h" -#include "include/cef_command_line.h" -#include "include/cef_render_process_handler.h" -#include "include/cef_resource_bundle_handler.h" -#include "include/cef_scheme.h" - -class CefApp; - -/// -// This function should be called from the application entry point function to -// execute a secondary process. It can be used to run secondary processes from -// the browser client executable (default behavior) or from a separate -// executable specified by the CefSettings.browser_subprocess_path value. If -// called for the browser process (identified by no "type" command-line value) -// it will return immediately with a value of -1. If called for a recognized -// secondary process it will block until the process should exit and then return -// the process exit code. The |application| parameter may be empty. The -// |windows_sandbox_info| parameter is only used on Windows and may be NULL (see -// cef_sandbox_win.h for details). -/// -/*--cef(api_hash_check,optional_param=application, - optional_param=windows_sandbox_info)--*/ -int CefExecuteProcess(const CefMainArgs& args, - CefRefPtr application, - void* windows_sandbox_info); - -/// -// This function should be called on the main application thread to initialize -// the CEF browser process. The |application| parameter may be empty. A return -// value of true indicates that it succeeded and false indicates that it failed. -// The |windows_sandbox_info| parameter is only used on Windows and may be NULL -// (see cef_sandbox_win.h for details). -/// -/*--cef(api_hash_check,optional_param=application, - optional_param=windows_sandbox_info)--*/ -bool CefInitialize(const CefMainArgs& args, - const CefSettings& settings, - CefRefPtr application, - void* windows_sandbox_info); - -/// -// This function should be called on the main application thread to shut down -// the CEF browser process before the application exits. -/// -/*--cef()--*/ -void CefShutdown(); - -/// -// Perform a single iteration of CEF message loop processing. This function is -// used to integrate the CEF message loop into an existing application message -// loop. Care must be taken to balance performance against excessive CPU usage. -// This function should only be called on the main application thread and only -// if CefInitialize() is called with a CefSettings.multi_threaded_message_loop -// value of false. This function will not block. -/// -/*--cef()--*/ -void CefDoMessageLoopWork(); - -/// -// Run the CEF message loop. Use this function instead of an application- -// provided message loop to get the best balance between performance and CPU -// usage. This function should only be called on the main application thread and -// only if CefInitialize() is called with a -// CefSettings.multi_threaded_message_loop value of false. This function will -// block until a quit message is received by the system. -/// -/*--cef()--*/ -void CefRunMessageLoop(); - -/// -// Quit the CEF message loop that was started by calling CefRunMessageLoop(). -// This function should only be called on the main application thread and only -// if CefRunMessageLoop() was used. -/// -/*--cef()--*/ -void CefQuitMessageLoop(); - -/// -// Set to true before calling Windows APIs like TrackPopupMenu that enter a -// modal message loop. Set to false after exiting the modal message loop. -/// -/*--cef()--*/ -void CefSetOSModalLoop(bool osModalLoop); - -/// -// Call during process startup to enable High-DPI support on Windows 7 or newer. -// Older versions of Windows should be left DPI-unaware because they do not -// support DirectWrite and GDI fonts are kerned very badly. -/// -/*--cef(capi_name=cef_enable_highdpi_support)--*/ -void CefEnableHighDPISupport(); - -/// -// Implement this interface to provide handler implementations. Methods will be -// called by the process and/or thread indicated. -/// -/*--cef(source=client,no_debugct_check)--*/ -class CefApp : public virtual CefBase { - public: - /// - // Provides an opportunity to view and/or modify command-line arguments before - // processing by CEF and Chromium. The |process_type| value will be empty for - // the browser process. Do not keep a reference to the CefCommandLine object - // passed to this method. The CefSettings.command_line_args_disabled value - // can be used to start with an empty command-line object. Any values - // specified in CefSettings that equate to command-line arguments will be set - // before this method is called. Be cautious when using this method to modify - // command-line arguments for non-browser processes as this may result in - // undefined behavior including crashes. - /// - /*--cef(optional_param=process_type)--*/ - virtual void OnBeforeCommandLineProcessing( - const CefString& process_type, - CefRefPtr command_line) { - } - - /// - // Provides an opportunity to register custom schemes. Do not keep a reference - // to the |registrar| object. This method is called on the main thread for - // each process and the registered schemes should be the same across all - // processes. - /// - /*--cef()--*/ - virtual void OnRegisterCustomSchemes( - CefRefPtr registrar) { - } - - /// - // Return the handler for resource bundle events. If - // CefSettings.pack_loading_disabled is true a handler must be returned. If no - // handler is returned resources will be loaded from pack files. This method - // is called by the browser and render processes on multiple threads. - /// - /*--cef()--*/ - virtual CefRefPtr GetResourceBundleHandler() { - return NULL; - } - - /// - // Return the handler for functionality specific to the browser process. This - // method is called on multiple threads in the browser process. - /// - /*--cef()--*/ - virtual CefRefPtr GetBrowserProcessHandler() { - return NULL; - } - - /// - // Return the handler for functionality specific to the render process. This - // method is called on the render process main thread. - /// - /*--cef()--*/ - virtual CefRefPtr GetRenderProcessHandler() { - return NULL; - } -}; - -#endif // CEF_INCLUDE_CEF_APP_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_auth_callback.h b/tool_kits/cef/cef_wrapper/include/cef_auth_callback.h deleted file mode 100644 index 86d249ad..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_auth_callback.h +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2013 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_AUTH_CALLBACK_H_ -#define CEF_INCLUDE_CEF_AUTH_CALLBACK_H_ -#pragma once - -#include "include/cef_base.h" - -/// -// Callback interface used for asynchronous continuation of authentication -// requests. -/// -/*--cef(source=library)--*/ -class CefAuthCallback : public virtual CefBase { - public: - /// - // Continue the authentication request. - /// - /*--cef(capi_name=cont)--*/ - virtual void Continue(const CefString& username, - const CefString& password) =0; - - /// - // Cancel the authentication request. - /// - /*--cef()--*/ - virtual void Cancel() =0; -}; - -#endif // CEF_INCLUDE_CEF_AUTH_CALLBACK_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_base.h b/tool_kits/cef/cef_wrapper/include/cef_base.h deleted file mode 100644 index c9213588..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_base.h +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -#ifndef CEF_INCLUDE_CEF_BASE_H_ -#define CEF_INCLUDE_CEF_BASE_H_ -#pragma once - -#include "include/base/cef_atomic_ref_count.h" -#include "include/base/cef_build.h" -#include "include/base/cef_macros.h" - -// Bring in common C++ type definitions used by CEF consumers. -#include "include/internal/cef_ptr.h" -#include "include/internal/cef_types_wrappers.h" -#if defined(OS_WIN) -#include "include/internal/cef_win.h" -#elif defined(OS_MACOSX) -#include "include/internal/cef_mac.h" -#elif defined(OS_LINUX) -#include "include/internal/cef_linux.h" -#endif - -/// -// Interface defining the reference count implementation methods. All framework -// classes must extend the CefBase class. -/// -class CefBase { - public: - /// - // Called to increment the reference count for the object. Should be called - // for every new copy of a pointer to a given object. - /// - virtual void AddRef() const =0; - - /// - // Called to decrement the reference count for the object. Returns true if - // the reference count is 0, in which case the object should self-delete. - /// - virtual bool Release() const =0; - - /// - // Returns true if the reference count is 1. - /// - virtual bool HasOneRef() const =0; - - protected: - virtual ~CefBase() {} -}; - -/// -// Class that implements atomic reference counting. -/// -class CefRefCount { - public: - CefRefCount() : ref_count_(0) {} - - /// - // Increment the reference count. - /// - void AddRef() const { - base::AtomicRefCountInc(&ref_count_); - } - - /// - // Decrement the reference count. Returns true if the reference count is 0. - /// - bool Release() const { - return !base::AtomicRefCountDec(&ref_count_); - } - - /// - // Returns true if the reference count is 1. - /// - bool HasOneRef() const { - return base::AtomicRefCountIsOne(&ref_count_); - } - - private: - mutable base::AtomicRefCount ref_count_; - DISALLOW_COPY_AND_ASSIGN(CefRefCount); -}; - -/// -// Macro that provides a reference counting implementation for classes extending -// CefBase. -/// -#define IMPLEMENT_REFCOUNTING(ClassName) \ - public: \ - void AddRef() const OVERRIDE { \ - ref_count_.AddRef(); \ - } \ - bool Release() const OVERRIDE { \ - if (ref_count_.Release()) { \ - delete static_cast(this); \ - return true; \ - } \ - return false; \ - } \ - bool HasOneRef() const OVERRIDE { \ - return ref_count_.HasOneRef(); \ - } \ - private: \ - CefRefCount ref_count_; - -/// -// Macro that provides a locking implementation. Use the Lock() and Unlock() -// methods to protect a section of code from simultaneous access by multiple -// threads. The AutoLock class is a helper that will hold the lock while in -// scope. -// -// THIS MACRO IS DEPRECATED. Use an explicit base::Lock member variable and -// base::AutoLock instead. For example: -// -// #include "include/base/cef_lock.h" -// -// // Class declaration. -// class MyClass : public CefBase { -// public: -// MyClass() : value_(0) {} -// // Method that may be called on multiple threads. -// void IncrementValue(); -// private: -// // Value that may be accessed on multiple theads. -// int value_; -// // Lock used to protect access to |value_|. -// base::Lock lock_; -// IMPLEMENT_REFCOUNTING(MyClass); -// }; -// -// // Class implementation. -// void MyClass::IncrementValue() { -// // Acquire the lock for the scope of this method. -// base::AutoLock lock_scope(lock_); -// // |value_| can now be modified safely. -// value_++; -// } -/// -#define IMPLEMENT_LOCKING(ClassName) \ - public: \ - class AutoLock { \ - public: \ - explicit AutoLock(ClassName* base) : base_(base) { base_->Lock(); } \ - ~AutoLock() { base_->Unlock(); } \ - private: \ - ClassName* base_; \ - DISALLOW_COPY_AND_ASSIGN(AutoLock); \ - }; \ - void Lock() { lock_.Acquire(); } \ - void Unlock() { lock_.Release(); } \ - private: \ - base::Lock lock_; - -#endif // CEF_INCLUDE_CEF_BASE_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_browser.h b/tool_kits/cef/cef_wrapper/include/cef_browser.h deleted file mode 100644 index c6c4403e..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_browser.h +++ /dev/null @@ -1,692 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_BROWSER_H_ -#define CEF_INCLUDE_CEF_BROWSER_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_drag_data.h" -#include "include/cef_frame.h" -#include "include/cef_navigation_entry.h" -#include "include/cef_process_message.h" -#include "include/cef_request_context.h" -#include - -class CefBrowserHost; -class CefClient; - - -/// -// Class used to represent a browser window. When used in the browser process -// the methods of this class may be called on any thread unless otherwise -// indicated in the comments. When used in the render process the methods of -// this class may only be called on the main thread. -/// -/*--cef(source=library)--*/ -class CefBrowser : public virtual CefBase { - public: - /// - // Returns the browser host object. This method can only be called in the - // browser process. - /// - /*--cef()--*/ - virtual CefRefPtr GetHost() =0; - - /// - // Returns true if the browser can navigate backwards. - /// - /*--cef()--*/ - virtual bool CanGoBack() =0; - - /// - // Navigate backwards. - /// - /*--cef()--*/ - virtual void GoBack() =0; - - /// - // Returns true if the browser can navigate forwards. - /// - /*--cef()--*/ - virtual bool CanGoForward() =0; - - /// - // Navigate forwards. - /// - /*--cef()--*/ - virtual void GoForward() =0; - - /// - // Returns true if the browser is currently loading. - /// - /*--cef()--*/ - virtual bool IsLoading() =0; - - /// - // Reload the current page. - /// - /*--cef()--*/ - virtual void Reload() =0; - - /// - // Reload the current page ignoring any cached data. - /// - /*--cef()--*/ - virtual void ReloadIgnoreCache() =0; - - /// - // Stop loading the page. - /// - /*--cef()--*/ - virtual void StopLoad() =0; - - /// - // Returns the globally unique identifier for this browser. - /// - /*--cef()--*/ - virtual int GetIdentifier() =0; - - /// - // Returns true if this object is pointing to the same handle as |that| - // object. - /// - /*--cef()--*/ - virtual bool IsSame(CefRefPtr that) =0; - - /// - // Returns true if the window is a popup window. - /// - /*--cef()--*/ - virtual bool IsPopup() =0; - - /// - // Returns true if a document has been loaded in the browser. - /// - /*--cef()--*/ - virtual bool HasDocument() =0; - - /// - // Returns the main (top-level) frame for the browser window. - /// - /*--cef()--*/ - virtual CefRefPtr GetMainFrame() =0; - - /// - // Returns the focused frame for the browser window. - /// - /*--cef()--*/ - virtual CefRefPtr GetFocusedFrame() =0; - - /// - // Returns the frame with the specified identifier, or NULL if not found. - /// - /*--cef(capi_name=get_frame_byident)--*/ - virtual CefRefPtr GetFrame(int64 identifier) =0; - - /// - // Returns the frame with the specified name, or NULL if not found. - /// - /*--cef(optional_param=name)--*/ - virtual CefRefPtr GetFrame(const CefString& name) =0; - - /// - // Returns the number of frames that currently exist. - /// - /*--cef()--*/ - virtual size_t GetFrameCount() =0; - - /// - // Returns the identifiers of all existing frames. - /// - /*--cef(count_func=identifiers:GetFrameCount)--*/ - virtual void GetFrameIdentifiers(std::vector& identifiers) =0; - - /// - // Returns the names of all existing frames. - /// - /*--cef()--*/ - virtual void GetFrameNames(std::vector& names) =0; - - /// - // Send a message to the specified |target_process|. Returns true if the - // message was sent successfully. - /// - /*--cef()--*/ - virtual bool SendProcessMessage(CefProcessId target_process, - CefRefPtr message) =0; -}; - - -/// -// Callback interface for CefBrowserHost::RunFileDialog. The methods of this -// class will be called on the browser process UI thread. -/// -/*--cef(source=client)--*/ -class CefRunFileDialogCallback : public virtual CefBase { - public: - /// - // Called asynchronously after the file dialog is dismissed. - // |selected_accept_filter| is the 0-based index of the value selected from - // the accept filters array passed to CefBrowserHost::RunFileDialog. - // |file_paths| will be a single value or a list of values depending on the - // dialog mode. If the selection was cancelled |file_paths| will be empty. - /// - /*--cef(index_param=selected_accept_filter,optional_param=file_paths)--*/ - virtual void OnFileDialogDismissed( - int selected_accept_filter, - const std::vector& file_paths) =0; -}; - - -/// -// Callback interface for CefBrowserHost::GetNavigationEntries. The methods of -// this class will be called on the browser process UI thread. -/// -/*--cef(source=client)--*/ -class CefNavigationEntryVisitor : public virtual CefBase { - public: - /// - // Method that will be executed. Do not keep a reference to |entry| outside of - // this callback. Return true to continue visiting entries or false to stop. - // |current| is true if this entry is the currently loaded navigation entry. - // |index| is the 0-based index of this entry and |total| is the total number - // of entries. - /// - /*--cef()--*/ - virtual bool Visit(CefRefPtr entry, - bool current, - int index, - int total) =0; -}; - - -/// -// Callback interface for CefBrowserHost::PrintToPDF. The methods of this class -// will be called on the browser process UI thread. -/// -/*--cef(source=client)--*/ -class CefPdfPrintCallback : public virtual CefBase { - public: - /// - // Method that will be executed when the PDF printing has completed. |path| - // is the output path. |ok| will be true if the printing completed - // successfully or false otherwise. - /// - /*--cef()--*/ - virtual void OnPdfPrintFinished(const CefString& path, bool ok) =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 -// called on any thread in that process unless otherwise indicated in the -// comments. -/// -/*--cef(source=library)--*/ -class CefBrowserHost : public virtual CefBase { - public: - typedef cef_drag_operations_mask_t DragOperationsMask; - typedef cef_file_dialog_mode_t FileDialogMode; - typedef cef_mouse_button_type_t MouseButtonType; - typedef cef_paint_element_type_t PaintElementType; - - /// - // Create a new browser window using the window parameters specified by - // |windowInfo|. All values will be copied internally and the actual window - // will be created on the UI thread. If |request_context| is empty the - // global request context will be used. This method can be called on any - // browser process thread and will not block. - /// - /*--cef(optional_param=client,optional_param=url, - optional_param=request_context)--*/ - static bool CreateBrowser(const CefWindowInfo& windowInfo, - CefRefPtr client, - const CefString& url, - const CefBrowserSettings& settings, - CefRefPtr request_context); - - /// - // Create a new browser window using the window parameters specified by - // |windowInfo|. If |request_context| is empty the global request context - // will be used. This method can only be called on the browser process UI - // thread. - /// - /*--cef(optional_param=client,optional_param=url, - optional_param=request_context)--*/ - static CefRefPtr CreateBrowserSync( - const CefWindowInfo& windowInfo, - CefRefPtr client, - const CefString& url, - const CefBrowserSettings& settings, - CefRefPtr request_context); - - /// - // Returns the hosted browser object. - /// - /*--cef()--*/ - virtual CefRefPtr GetBrowser() =0; - - /// - // Request that the browser close. The JavaScript 'onbeforeunload' event will - // be fired. If |force_close| is false the event handler, if any, will be - // allowed to prompt the user and the user can optionally cancel the close. - // If |force_close| is true the prompt will not be displayed and the close - // will proceed. Results in a call to CefLifeSpanHandler::DoClose() if the - // event handler allows the close or if |force_close| is true. See - // CefLifeSpanHandler::DoClose() documentation for additional usage - // information. - /// - /*--cef()--*/ - virtual void CloseBrowser(bool force_close) =0; - - /// - // Set whether the browser is focused. - /// - /*--cef()--*/ - virtual void SetFocus(bool focus) =0; - - /// - // 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. This method can be used in combination - // with custom handling of modal windows. - /// - /*--cef()--*/ - virtual CefWindowHandle GetOpenerWindowHandle() =0; - - /// - // Returns the client for this browser. - /// - /*--cef()--*/ - virtual CefRefPtr GetClient() =0; - - /// - // Returns the request context for this browser. - /// - /*--cef()--*/ - virtual CefRefPtr GetRequestContext() =0; - - /// - // Get the current zoom level. The default zoom level is 0.0. This method can - // only be called on the UI thread. - /// - /*--cef()--*/ - virtual double GetZoomLevel() =0; - - /// - // Change the zoom level to the specified value. Specify 0.0 to reset the - // zoom level. If called on the UI thread the change will be applied - // immediately. Otherwise, the change will be applied asynchronously on the - // UI thread. - /// - /*--cef()--*/ - virtual void SetZoomLevel(double zoomLevel) =0; - - /// - // Call to run a file chooser dialog. Only a single file chooser dialog may be - // pending at any given time. |mode| represents the type of dialog to display. - // |title| to the title to be used for the dialog and may be empty to show the - // default title ("Open" or "Save" depending on the mode). |default_file_path| - // is the path with optional directory and/or file name component that will be - // initially selected in the dialog. |accept_filters| are used to restrict the - // selectable file types and may any combination of (a) valid lower-cased MIME - // types (e.g. "text/*" or "image/*"), (b) individual file extensions (e.g. - // ".txt" or ".png"), or (c) combined description and file extension delimited - // using "|" and ";" (e.g. "Image Types|.png;.gif;.jpg"). - // |selected_accept_filter| is the 0-based index of the filter that will be - // selected by default. |callback| will be executed after the dialog is - // dismissed or immediately if another dialog is already pending. The dialog - // will be initiated asynchronously on the UI thread. - /// - /*--cef(optional_param=title,optional_param=default_file_path, - optional_param=accept_filters,index_param=selected_accept_filter)--*/ - virtual void RunFileDialog(FileDialogMode mode, - const CefString& title, - const CefString& default_file_path, - const std::vector& accept_filters, - int selected_accept_filter, - CefRefPtr callback) =0; - - /// - // Download the file at |url| using CefDownloadHandler. - /// - /*--cef()--*/ - virtual void StartDownload(const CefString& url) =0; - - /// - // Print the current browser contents. - /// - /*--cef()--*/ - virtual void Print() =0; - - /// - // Print the current browser contents to the PDF file specified by |path| and - // execute |callback| on completion. The caller is responsible for deleting - // |path| when done. For PDF printing to work on Linux you must implement the - // CefPrintHandler::GetPdfPaperSize method. - /// - /*--cef(optional_param=callback)--*/ - virtual void PrintToPDF(const CefString& path, - const CefPdfPrintSettings& settings, - CefRefPtr callback) =0; - - /// - // Search for |searchText|. |identifier| can be used to have multiple searches - // running simultaniously. |forward| indicates whether to search forward or - // backward within the page. |matchCase| indicates whether the search should - // be case-sensitive. |findNext| indicates whether this is the first request - // or a follow-up. The CefFindHandler instance, if any, returned via - // CefClient::GetFindHandler will be called to report find results. - /// - /*--cef()--*/ - virtual void Find(int identifier, const CefString& searchText, - bool forward, bool matchCase, bool findNext) =0; - - /// - // Cancel all searches that are currently going on. - /// - /*--cef()--*/ - virtual void StopFinding(bool clearSelection) =0; - - /// - // 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=inspect_element_at)--*/ - virtual void ShowDevTools(const CefWindowInfo& windowInfo, - CefRefPtr client, - const CefBrowserSettings& settings, - const CefPoint& inspect_element_at) =0; - - /// - // Explicitly close the developer tools window if one exists for this browser - // instance. - /// - /*--cef()--*/ - virtual void CloseDevTools() =0; - - /// - // Retrieve a snapshot of current navigation entries as values sent to the - // specified visitor. If |current_only| is true only the current navigation - // entry will be sent, otherwise all navigation entries will be sent. - /// - /*--cef()--*/ - virtual void GetNavigationEntries( - CefRefPtr visitor, - bool current_only) =0; - - /// - // Set whether mouse cursor change is disabled. - /// - /*--cef()--*/ - virtual void SetMouseCursorChangeDisabled(bool disabled) =0; - - /// - // Returns true if mouse cursor change is disabled. - /// - /*--cef()--*/ - virtual bool IsMouseCursorChangeDisabled() =0; - - /// - // If a misspelled word is currently selected in an editable node calling - // this method will replace it with the specified |word|. - /// - /*--cef()--*/ - virtual void ReplaceMisspelling(const CefString& word) =0; - - /// - // Add the specified |word| to the spelling dictionary. - /// - /*--cef()--*/ - virtual void AddWordToDictionary(const CefString& word) =0; - - /// - // Returns true if window rendering is disabled. - /// - /*--cef()--*/ - virtual bool IsWindowRenderingDisabled() =0; - - /// - // Notify the browser that the widget has been resized. The browser will first - // call CefRenderHandler::GetViewRect to get the new size and then call - // CefRenderHandler::OnPaint asynchronously with the updated regions. This - // method is only used when window rendering is disabled. - /// - /*--cef()--*/ - virtual void WasResized() =0; - - /// - // Notify the browser that it has been hidden or shown. Layouting and - // CefRenderHandler::OnPaint notification will stop when the browser is - // hidden. This method is only used when window rendering is disabled. - /// - /*--cef()--*/ - virtual void WasHidden(bool hidden) =0; - - /// - // Send a notification to the browser that the screen info has changed. The - // browser will then call CefRenderHandler::GetScreenInfo to update the - // screen information with the new values. This simulates moving the webview - // window from one display to another, or changing the properties of the - // current display. This method is only used when window rendering is - // disabled. - /// - /*--cef()--*/ - virtual void NotifyScreenInfoChanged() =0; - - /// - // Invalidate the view. The browser will call CefRenderHandler::OnPaint - // asynchronously. This method is only used when window rendering is - // disabled. - /// - /*--cef()--*/ - virtual void Invalidate(PaintElementType type) =0; - - /// - // Send a key event to the browser. - /// - /*--cef()--*/ - virtual void SendKeyEvent(const CefKeyEvent& event) =0; - - /// - // Send a mouse click event to the browser. The |x| and |y| coordinates are - // relative to the upper-left corner of the view. - /// - /*--cef()--*/ - virtual void SendMouseClickEvent(const CefMouseEvent& event, - MouseButtonType type, - bool mouseUp, int clickCount) =0; - - /// - // Send a mouse move event to the browser. The |x| and |y| coordinates are - // relative to the upper-left corner of the view. - /// - /*--cef()--*/ - virtual void SendMouseMoveEvent(const CefMouseEvent& event, - bool mouseLeave) =0; - - /// - // Send a mouse wheel event to the browser. The |x| and |y| coordinates are - // relative to the upper-left corner of the view. The |deltaX| and |deltaY| - // values represent the movement delta in the X and Y directions respectively. - // In order to scroll inside select popups with window rendering disabled - // CefRenderHandler::GetScreenPoint should be implemented properly. - /// - /*--cef()--*/ - virtual void SendMouseWheelEvent(const CefMouseEvent& event, - int deltaX, int deltaY) =0; - - /// - // Send a focus event to the browser. - /// - /*--cef()--*/ - virtual void SendFocusEvent(bool setFocus) =0; - - /// - // Send a capture lost event to the browser. - /// - /*--cef()--*/ - virtual void SendCaptureLostEvent() =0; - - /// - // Notify the browser that the window hosting it is about to be moved or - // resized. This method is only used on Windows and Linux. - /// - /*--cef()--*/ - virtual void NotifyMoveOrResizeStarted() =0; - - /// - // Returns the maximum rate in frames per second (fps) that CefRenderHandler:: - // OnPaint will be called for a windowless browser. The actual fps may be - // lower if the browser cannot generate frames at the requested rate. The - // minimum value is 1 and the maximum value is 60 (default 30). This method - // can only be called on the UI thread. - /// - /*--cef()--*/ - virtual int GetWindowlessFrameRate() =0; - - /// - // Set the maximum rate in frames per second (fps) that CefRenderHandler:: - // OnPaint will be called for a windowless browser. The actual fps may be - // lower if the browser cannot generate frames at the requested rate. The - // minimum value is 1 and the maximum value is 60 (default 30). Can also be - // set at browser creation via CefBrowserSettings.windowless_frame_rate. - /// - /*--cef()--*/ - virtual void SetWindowlessFrameRate(int frame_rate) =0; - - /// - // Get the NSTextInputContext implementation for enabling IME on Mac when - // window rendering is disabled. - /// - /*--cef(default_retval=NULL)--*/ - virtual CefTextInputContext GetNSTextInputContext() =0; - - /// - // Handles a keyDown event prior to passing it through the NSTextInputClient - // machinery. - /// - /*--cef()--*/ - virtual void HandleKeyEventBeforeTextInputClient(CefEventHandle keyEvent) =0; - - /// - // Performs any additional actions after NSTextInputClient handles the event. - /// - /*--cef()--*/ - virtual void HandleKeyEventAfterTextInputClient(CefEventHandle keyEvent) =0; - - /// - // Call this method when the user drags the mouse into the web view (before - // calling DragTargetDragOver/DragTargetLeave/DragTargetDrop). - // |drag_data| should not contain file contents as this type of data is not - // allowed to be dragged into the web view. File contents can be removed using - // CefDragData::ResetFileContents (for example, if |drag_data| comes from - // CefRenderHandler::StartDragging). - // This method is only used when window rendering is disabled. - /// - /*--cef()--*/ - virtual void DragTargetDragEnter(CefRefPtr drag_data, - const CefMouseEvent& event, - DragOperationsMask allowed_ops) =0; - - /// - // Call this method each time the mouse is moved across the web view during - // a drag operation (after calling DragTargetDragEnter and before calling - // DragTargetDragLeave/DragTargetDrop). - // This method is only used when window rendering is disabled. - /// - /*--cef()--*/ - virtual void DragTargetDragOver(const CefMouseEvent& event, - DragOperationsMask allowed_ops) =0; - - /// - // Call this method when the user drags the mouse out of the web view (after - // calling DragTargetDragEnter). - // This method is only used when window rendering is disabled. - /// - /*--cef()--*/ - virtual void DragTargetDragLeave() =0; - - /// - // Call this method when the user completes the drag operation by dropping - // the object onto the web view (after calling DragTargetDragEnter). - // The object being dropped is |drag_data|, given as an argument to - // the previous DragTargetDragEnter call. - // This method is only used when window rendering is disabled. - /// - /*--cef()--*/ - virtual void DragTargetDrop(const CefMouseEvent& event) =0; - - /// - // Call this method when the drag operation started by a - // CefRenderHandler::StartDragging call has ended either in a drop or - // by being cancelled. |x| and |y| are mouse coordinates relative to the - // upper-left corner of the view. If the web view is both the drag source - // and the drag target then all DragTarget* methods should be called before - // DragSource* mthods. - // This method is only used when window rendering is disabled. - /// - /*--cef()--*/ - virtual void DragSourceEndedAt(int x, int y, DragOperationsMask op) =0; - - /// - // Call this method when the drag operation started by a - // CefRenderHandler::StartDragging call has completed. This method may be - // called immediately without first calling DragSourceEndedAt to cancel a - // drag operation. If the web view is both the drag source and the drag - // target then all DragTarget* methods should be called before DragSource* - // mthods. - // This method is only used when window rendering is disabled. - /// - /*--cef()--*/ - virtual void DragSourceSystemDragEnded() =0; -}; - -#endif // CEF_INCLUDE_CEF_BROWSER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_browser_process_handler.h b/tool_kits/cef/cef_wrapper/include/cef_browser_process_handler.h deleted file mode 100644 index 5d62cb30..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_browser_process_handler.h +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_BROWSER_PROCESS_HANDLER_H_ -#define CEF_INCLUDE_CEF_BROWSER_PROCESS_HANDLER_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_command_line.h" -#include "include/cef_print_handler.h" -#include "include/cef_values.h" - -/// -// Class used to implement browser process callbacks. The methods of this class -// will be called on the browser process main thread unless otherwise indicated. -/// -/*--cef(source=client)--*/ -class CefBrowserProcessHandler : public virtual CefBase { - public: - /// - // Called on the browser process UI thread immediately after the CEF context - // has been initialized. - /// - /*--cef()--*/ - virtual void OnContextInitialized() {} - - /// - // Called before a child process is launched. Will be called on the browser - // process UI thread when launching a render process and on the browser - // process IO thread when launching a GPU or plugin process. Provides an - // opportunity to modify the child process command line. Do not keep a - // reference to |command_line| outside of this method. - /// - /*--cef()--*/ - virtual void OnBeforeChildProcessLaunch( - CefRefPtr command_line) {} - - /// - // Called on the browser process IO thread after the main thread has been - // created for a new render process. Provides an opportunity to specify extra - // information that will be passed to - // CefRenderProcessHandler::OnRenderThreadCreated() in the render process. Do - // not keep a reference to |extra_info| outside of this method. - /// - /*--cef()--*/ - virtual void OnRenderProcessThreadCreated( - CefRefPtr extra_info) {} - - /// - // Return the handler for printing on Linux. If a print handler is not - // provided then printing will not be supported on the Linux platform. - /// - /*--cef()--*/ - virtual CefRefPtr GetPrintHandler() { - return NULL; - } -}; - -#endif // CEF_INCLUDE_CEF_BROWSER_PROCESS_HANDLER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_callback.h b/tool_kits/cef/cef_wrapper/include/cef_callback.h deleted file mode 100644 index e5efebd2..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_callback.h +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_CALLBACK_H_ -#define CEF_INCLUDE_CEF_CALLBACK_H_ -#pragma once - -#include "include/cef_base.h" - -/// -// Generic callback interface used for asynchronous continuation. -/// -/*--cef(source=library)--*/ -class CefCallback : public virtual CefBase { - public: - /// - // Continue processing. - /// - /*--cef(capi_name=cont)--*/ - virtual void Continue() =0; - - /// - // Cancel processing. - /// - /*--cef()--*/ - virtual void Cancel() =0; -}; - -/// -// Generic callback interface used for asynchronous completion. -/// -/*--cef(source=client)--*/ -class CefCompletionCallback : public virtual CefBase { - public: - /// - // Method that will be called once the task is complete. - /// - /*--cef()--*/ - virtual void OnComplete() =0; -}; - -#endif // CEF_INCLUDE_CEF_CALLBACK_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_client.h b/tool_kits/cef/cef_wrapper/include/cef_client.h deleted file mode 100644 index 81a67eba..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_client.h +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_CLIENT_H_ -#define CEF_INCLUDE_CEF_CLIENT_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_context_menu_handler.h" -#include "include/cef_dialog_handler.h" -#include "include/cef_display_handler.h" -#include "include/cef_download_handler.h" -#include "include/cef_drag_handler.h" -#include "include/cef_find_handler.h" -#include "include/cef_focus_handler.h" -#include "include/cef_geolocation_handler.h" -#include "include/cef_jsdialog_handler.h" -#include "include/cef_keyboard_handler.h" -#include "include/cef_life_span_handler.h" -#include "include/cef_load_handler.h" -#include "include/cef_process_message.h" -#include "include/cef_render_handler.h" -#include "include/cef_request_handler.h" - -/// -// Implement this interface to provide handler implementations. -/// -/*--cef(source=client,no_debugct_check)--*/ -class CefClient : public virtual CefBase { - public: - /// - // Return the handler for context menus. If no handler is provided the default - // implementation will be used. - /// - /*--cef()--*/ - virtual CefRefPtr GetContextMenuHandler() { - return NULL; - } - - /// - // Return the handler for dialogs. If no handler is provided the default - // implementation will be used. - /// - /*--cef()--*/ - virtual CefRefPtr GetDialogHandler() { - return NULL; - } - - /// - // Return the handler for browser display state events. - /// - /*--cef()--*/ - virtual CefRefPtr GetDisplayHandler() { - return NULL; - } - - /// - // Return the handler for download events. If no handler is returned downloads - // will not be allowed. - /// - /*--cef()--*/ - virtual CefRefPtr GetDownloadHandler() { - return NULL; - } - - /// - // Return the handler for drag events. - /// - /*--cef()--*/ - virtual CefRefPtr GetDragHandler() { - return NULL; - } - - /// - // Return the handler for find result events. - /// - /*--cef()--*/ - virtual CefRefPtr GetFindHandler() { - return NULL; - } - - /// - // Return the handler for focus events. - /// - /*--cef()--*/ - virtual CefRefPtr GetFocusHandler() { - return NULL; - } - - /// - // Return the handler for geolocation permissions requests. If no handler is - // provided geolocation access will be denied by default. - /// - /*--cef()--*/ - virtual CefRefPtr GetGeolocationHandler() { - return NULL; - } - - /// - // Return the handler for JavaScript dialogs. If no handler is provided the - // default implementation will be used. - /// - /*--cef()--*/ - virtual CefRefPtr GetJSDialogHandler() { - return NULL; - } - - /// - // Return the handler for keyboard events. - /// - /*--cef()--*/ - virtual CefRefPtr GetKeyboardHandler() { - return NULL; - } - - /// - // Return the handler for browser life span events. - /// - /*--cef()--*/ - virtual CefRefPtr GetLifeSpanHandler() { - return NULL; - } - - /// - // Return the handler for browser load status events. - /// - /*--cef()--*/ - virtual CefRefPtr GetLoadHandler() { - return NULL; - } - - /// - // Return the handler for off-screen rendering events. - /// - /*--cef()--*/ - virtual CefRefPtr GetRenderHandler() { - return NULL; - } - - /// - // Return the handler for browser request events. - /// - /*--cef()--*/ - virtual CefRefPtr GetRequestHandler() { - return NULL; - } - - /// - // Called when a new message is received from a different process. Return true - // if the message was handled or false otherwise. Do not keep a reference to - // or attempt to access the message outside of this callback. - /// - /*--cef()--*/ - virtual bool OnProcessMessageReceived(CefRefPtr browser, - CefProcessId source_process, - CefRefPtr message) { - return false; - } -}; - -#endif // CEF_INCLUDE_CEF_CLIENT_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_command_line.h b/tool_kits/cef/cef_wrapper/include/cef_command_line.h deleted file mode 100644 index 96241cf4..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_command_line.h +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_COMMAND_LINE_H_ -#define CEF_INCLUDE_CEF_COMMAND_LINE_H_ -#pragma once - -#include "include/cef_base.h" -#include -#include - -/// -// Class used to create and/or parse command line arguments. Arguments with -// '--', '-' and, on Windows, '/' prefixes are considered switches. Switches -// will always precede any arguments without switch prefixes. Switches can -// optionally have a value specified using the '=' delimiter (e.g. -// "-switch=value"). An argument of "--" will terminate switch parsing with all -// subsequent tokens, regardless of prefix, being interpreted as non-switch -// arguments. Switch names are considered case-insensitive. This class can be -// used before CefInitialize() is called. -/// -/*--cef(source=library,no_debugct_check)--*/ -class CefCommandLine : public virtual CefBase { - public: - typedef std::vector ArgumentList; - typedef std::map SwitchMap; - - /// - // Create a new CefCommandLine instance. - /// - /*--cef(api_hash_check)--*/ - static CefRefPtr CreateCommandLine(); - - /// - // Returns the singleton global CefCommandLine object. The returned object - // will be read-only. - /// - /*--cef(api_hash_check)--*/ - static CefRefPtr GetGlobalCommandLine(); - - /// - // Returns true if this object is valid. Do not call any other methods if this - // function returns false. - /// - /*--cef()--*/ - virtual bool IsValid() =0; - - /// - // Returns true if the values of this object are read-only. Some APIs may - // expose read-only objects. - /// - /*--cef()--*/ - virtual bool IsReadOnly() =0; - - /// - // Returns a writable copy of this object. - /// - /*--cef()--*/ - virtual CefRefPtr Copy() =0; - - /// - // Initialize the command line with the specified |argc| and |argv| values. - // The first argument must be the name of the program. This method is only - // supported on non-Windows platforms. - /// - /*--cef()--*/ - virtual void InitFromArgv(int argc, const char* const* argv) =0; - - /// - // Initialize the command line with the string returned by calling - // GetCommandLineW(). This method is only supported on Windows. - /// - /*--cef()--*/ - virtual void InitFromString(const CefString& command_line) =0; - - /// - // Reset the command-line switches and arguments but leave the program - // component unchanged. - /// - /*--cef()--*/ - virtual void Reset() =0; - - /// - // Retrieve the original command line string as a vector of strings. - // The argv array: { program, [(--|-|/)switch[=value]]*, [--], [argument]* } - /// - /*--cef()--*/ - virtual void GetArgv(std::vector& argv) =0; - - /// - // Constructs and returns the represented command line string. Use this method - // cautiously because quoting behavior is unclear. - /// - /*--cef()--*/ - virtual CefString GetCommandLineString() =0; - - /// - // Get the program part of the command line string (the first item). - /// - /*--cef()--*/ - virtual CefString GetProgram() =0; - - /// - // Set the program part of the command line string (the first item). - /// - /*--cef()--*/ - virtual void SetProgram(const CefString& program) =0; - - /// - // Returns true if the command line has switches. - /// - /*--cef()--*/ - virtual bool HasSwitches() =0; - - /// - // Returns true if the command line contains the given switch. - /// - /*--cef()--*/ - virtual bool HasSwitch(const CefString& name) =0; - - /// - // Returns the value associated with the given switch. If the switch has no - // value or isn't present this method returns the empty string. - /// - /*--cef()--*/ - virtual CefString GetSwitchValue(const CefString& name) =0; - - /// - // Returns the map of switch names and values. If a switch has no value an - // empty string is returned. - /// - /*--cef()--*/ - virtual void GetSwitches(SwitchMap& switches) =0; - - /// - // Add a switch to the end of the command line. If the switch has no value - // pass an empty value string. - /// - /*--cef()--*/ - virtual void AppendSwitch(const CefString& name) =0; - - /// - // Add a switch with the specified value to the end of the command line. - /// - /*--cef()--*/ - virtual void AppendSwitchWithValue(const CefString& name, - const CefString& value) =0; - - /// - // True if there are remaining command line arguments. - /// - /*--cef()--*/ - virtual bool HasArguments() =0; - - /// - // Get the remaining command line arguments. - /// - /*--cef()--*/ - virtual void GetArguments(ArgumentList& arguments) =0; - - /// - // Add an argument to the end of the command line. - /// - /*--cef()--*/ - virtual void AppendArgument(const CefString& argument) =0; - - /// - // Insert a command before the current command. - // Common for debuggers, like "valgrind" or "gdb --args". - /// - /*--cef()--*/ - virtual void PrependWrapper(const CefString& wrapper) =0; -}; - -#endif // CEF_INCLUDE_CEF_COMMAND_LINE_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_context_menu_handler.h b/tool_kits/cef/cef_wrapper/include/cef_context_menu_handler.h deleted file mode 100644 index ab450357..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_context_menu_handler.h +++ /dev/null @@ -1,285 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_CONTEXT_MENU_HANDLER_H_ -#define CEF_INCLUDE_CEF_CONTEXT_MENU_HANDLER_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_browser.h" -#include "include/cef_frame.h" -#include "include/cef_menu_model.h" - -class CefContextMenuParams; - - -/// -// Callback interface used for continuation of custom context menu display. -/// -/*--cef(source=library)--*/ -class CefRunContextMenuCallback : public virtual CefBase { - public: - typedef cef_event_flags_t EventFlags; - - /// - // Complete context menu display by selecting the specified |command_id| and - // |event_flags|. - /// - /*--cef(capi_name=cont)--*/ - virtual void Continue(int command_id, EventFlags event_flags) =0; - - /// - // Cancel context menu display. - /// - /*--cef()--*/ - virtual void Cancel() =0; -}; - - -/// -// Implement this interface to handle context menu events. The methods of this -// class will be called on the UI thread. -/// -/*--cef(source=client)--*/ -class CefContextMenuHandler : public virtual CefBase { - public: - typedef cef_event_flags_t EventFlags; - - /// - // Called before a context menu is displayed. |params| provides information - // about the context menu state. |model| initially contains the default - // context menu. The |model| can be cleared to show no context menu or - // modified to show a custom menu. Do not keep references to |params| or - // |model| outside of this callback. - /// - /*--cef()--*/ - virtual void OnBeforeContextMenu(CefRefPtr browser, - CefRefPtr frame, - CefRefPtr params, - CefRefPtr model) {} - - /// - // Called to allow custom display of the context menu. |params| provides - // information about the context menu state. |model| contains the context menu - // model resulting from OnBeforeContextMenu. For custom display return true - // and execute |callback| either synchronously or asynchronously with the - // selected command ID. For default display return false. Do not keep - // references to |params| or |model| outside of this callback. - /// - /*--cef()--*/ - virtual bool RunContextMenu(CefRefPtr browser, - CefRefPtr frame, - CefRefPtr params, - CefRefPtr model, - CefRefPtr callback) { - return false; - } - - /// - // Called to execute a command selected from the context menu. Return true if - // the command was handled or false for the default implementation. See - // cef_menu_id_t for the command ids that have default implementations. All - // user-defined command ids should be between MENU_ID_USER_FIRST and - // MENU_ID_USER_LAST. |params| will have the same values as what was passed to - // OnBeforeContextMenu(). Do not keep a reference to |params| outside of this - // callback. - /// - /*--cef()--*/ - virtual bool OnContextMenuCommand(CefRefPtr browser, - CefRefPtr frame, - CefRefPtr params, - int command_id, - EventFlags event_flags) { return false; } - - /// - // Called when the context menu is dismissed irregardless of whether the menu - // was empty or a command was selected. - /// - /*--cef()--*/ - virtual void OnContextMenuDismissed(CefRefPtr browser, - CefRefPtr frame) {} -}; - - -/// -// Provides information about the context menu state. The ethods of this class -// can only be accessed on browser process the UI thread. -/// -/*--cef(source=library)--*/ -class CefContextMenuParams : public virtual CefBase { - public: - typedef cef_context_menu_type_flags_t TypeFlags; - typedef cef_context_menu_media_type_t MediaType; - typedef cef_context_menu_media_state_flags_t MediaStateFlags; - typedef cef_context_menu_edit_state_flags_t EditStateFlags; - - /// - // Returns the X coordinate of the mouse where the context menu was invoked. - // Coords are relative to the associated RenderView's origin. - /// - /*--cef()--*/ - virtual int GetXCoord() =0; - - /// - // Returns the Y coordinate of the mouse where the context menu was invoked. - // Coords are relative to the associated RenderView's origin. - /// - /*--cef()--*/ - virtual int GetYCoord() =0; - - /// - // Returns flags representing the type of node that the context menu was - // invoked on. - /// - /*--cef(default_retval=CM_TYPEFLAG_NONE)--*/ - virtual TypeFlags GetTypeFlags() =0; - - /// - // Returns the URL of the link, if any, that encloses the node that the - // context menu was invoked on. - /// - /*--cef()--*/ - virtual CefString GetLinkUrl() =0; - - /// - // Returns the link URL, if any, to be used ONLY for "copy link address". We - // don't validate this field in the frontend process. - /// - /*--cef()--*/ - virtual CefString GetUnfilteredLinkUrl() =0; - - /// - // Returns the source URL, if any, for the element that the context menu was - // invoked on. Example of elements with source URLs are img, audio, and video. - /// - /*--cef()--*/ - virtual CefString GetSourceUrl() =0; - - /// - // Returns true if the context menu was invoked on an image which has - // non-empty contents. - /// - /*--cef()--*/ - virtual bool HasImageContents() =0; - - /// - // Returns the URL of the top level page that the context menu was invoked on. - /// - /*--cef()--*/ - virtual CefString GetPageUrl() =0; - - /// - // Returns the URL of the subframe that the context menu was invoked on. - /// - /*--cef()--*/ - virtual CefString GetFrameUrl() =0; - - /// - // Returns the character encoding of the subframe that the context menu was - // invoked on. - /// - /*--cef()--*/ - virtual CefString GetFrameCharset() =0; - - /// - // Returns the type of context node that the context menu was invoked on. - /// - /*--cef(default_retval=CM_MEDIATYPE_NONE)--*/ - virtual MediaType GetMediaType() =0; - - /// - // Returns flags representing the actions supported by the media element, if - // any, that the context menu was invoked on. - /// - /*--cef(default_retval=CM_MEDIAFLAG_NONE)--*/ - virtual MediaStateFlags GetMediaStateFlags() =0; - - /// - // Returns the text of the selection, if any, that the context menu was - // invoked on. - /// - /*--cef()--*/ - virtual CefString GetSelectionText() =0; - - /// - // Returns the text of the misspelled word, if any, that the context menu was - // invoked on. - /// - /*--cef()--*/ - virtual CefString GetMisspelledWord() =0; - - /// - // Returns true if suggestions exist, false otherwise. Fills in |suggestions| - // from the spell check service for the misspelled word if there is one. - /// - /*--cef()--*/ - virtual bool GetDictionarySuggestions(std::vector& suggestions) =0; - - /// - // Returns true if the context menu was invoked on an editable node. - /// - /*--cef()--*/ - virtual bool IsEditable() =0; - - /// - // Returns true if the context menu was invoked on an editable node where - // spell-check is enabled. - /// - /*--cef()--*/ - virtual bool IsSpellCheckEnabled() =0; - - /// - // Returns flags representing the actions supported by the editable node, if - // any, that the context menu was invoked on. - /// - /*--cef(default_retval=CM_EDITFLAG_NONE)--*/ - virtual EditStateFlags GetEditStateFlags() =0; - - /// - // Returns true if the context menu contains items specified by the renderer - // process (for example, plugin placeholder or pepper plugin menu items). - /// - /*--cef()--*/ - virtual bool IsCustomMenu() =0; - - /// - // Returns true if the context menu was invoked from a pepper plugin. - /// - /*--cef()--*/ - virtual bool IsPepperMenu() =0; -}; - -#endif // CEF_INCLUDE_CEF_CONTEXT_MENU_HANDLER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_cookie.h b/tool_kits/cef/cef_wrapper/include/cef_cookie.h deleted file mode 100644 index b4cb33cb..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_cookie.h +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_COOKIE_H_ -#define CEF_INCLUDE_CEF_COOKIE_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_callback.h" -#include - -class CefCookieVisitor; -class CefSetCookieCallback; -class CefDeleteCookiesCallback; - -/// -// Class used for managing cookies. The methods of this class may be called on -// any thread unless otherwise indicated. -/// -/*--cef(source=library,no_debugct_check)--*/ -class CefCookieManager : public virtual CefBase { - public: - /// - // Returns the global cookie manager. By default data will be stored at - // CefSettings.cache_path if specified or in memory otherwise. If |callback| - // is non-NULL it will be executed asnychronously on the IO thread after the - // manager's storage has been initialized. Using this method is equivalent to - // calling CefRequestContext::GetGlobalContext()->GetDefaultCookieManager(). - /// - /*--cef(optional_param=callback)--*/ - static CefRefPtr GetGlobalManager( - CefRefPtr callback); - - /// - // Creates a new cookie manager. If |path| is empty data will be stored in - // memory only. Otherwise, data will be stored at the specified |path|. To - // persist session cookies (cookies without an expiry date or validity - // interval) set |persist_session_cookies| to true. Session cookies are - // generally intended to be transient and most Web browsers do not persist - // them. If |callback| is non-NULL it will be executed asnychronously on the - // IO thread after the manager's storage has been initialized. - /// - /*--cef(optional_param=path,optional_param=callback)--*/ - static CefRefPtr CreateManager( - const CefString& path, - bool persist_session_cookies, - CefRefPtr callback); - - /// - // Set the schemes supported by this manager. The default schemes ("http", - // "https", "ws" and "wss") will always be supported. If |callback| is non- - // NULL it will be executed asnychronously on the IO thread after the change - // has been applied. Must be called before any cookies are accessed. - /// - /*--cef(optional_param=callback)--*/ - virtual void SetSupportedSchemes( - const std::vector& schemes, - CefRefPtr callback) =0; - - /// - // Visit all cookies on the IO thread. The returned cookies are ordered by - // longest path, then by earliest creation date. Returns false if cookies - // cannot be accessed. - /// - /*--cef()--*/ - virtual bool VisitAllCookies(CefRefPtr visitor) =0; - - /// - // Visit a subset of cookies on the IO thread. The results are filtered by the - // given url scheme, host, domain and path. If |includeHttpOnly| is true - // HTTP-only cookies will also be included in the results. The returned - // cookies are ordered by longest path, then by earliest creation date. - // Returns false if cookies cannot be accessed. - /// - /*--cef()--*/ - virtual bool VisitUrlCookies(const CefString& url, - bool includeHttpOnly, - CefRefPtr visitor) =0; - - /// - // Sets a cookie given a valid URL and explicit user-provided cookie - // attributes. This function expects each attribute to be well-formed. It will - // check for disallowed characters (e.g. the ';' character is disallowed - // within the cookie value attribute) and fail without setting the cookie if - // such characters are found. If |callback| is non-NULL it will be executed - // asnychronously on the IO thread after the cookie has been set. Returns - // false if an invalid URL is specified or if cookies cannot be accessed. - /// - /*--cef(optional_param=callback)--*/ - virtual bool SetCookie(const CefString& url, - const CefCookie& cookie, - CefRefPtr callback) =0; - - /// - // Delete all cookies that match the specified parameters. If both |url| and - // |cookie_name| values are specified all host and domain cookies matching - // both will be deleted. If only |url| is specified all host cookies (but not - // domain cookies) irrespective of path will be deleted. If |url| is empty all - // cookies for all hosts and domains will be deleted. If |callback| is - // non-NULL it will be executed asnychronously on the IO thread after the - // cookies have been deleted. Returns false if a non-empty invalid URL is - // specified or if cookies cannot be accessed. Cookies can alternately be - // deleted using the Visit*Cookies() methods. - /// - /*--cef(optional_param=url,optional_param=cookie_name, - optional_param=callback)--*/ - virtual bool DeleteCookies(const CefString& url, - const CefString& cookie_name, - CefRefPtr callback) =0; - - /// - // Sets the directory path that will be used for storing cookie data. If - // |path| is empty data will be stored in memory only. Otherwise, data will be - // stored at the specified |path|. To persist session cookies (cookies without - // an expiry date or validity interval) set |persist_session_cookies| to true. - // Session cookies are generally intended to be transient and most Web - // browsers do not persist them. If |callback| is non-NULL it will be executed - // asnychronously on the IO thread after the manager's storage has been - // initialized. Returns false if cookies cannot be accessed. - /// - /*--cef(optional_param=path,optional_param=callback)--*/ - virtual bool SetStoragePath(const CefString& path, - bool persist_session_cookies, - CefRefPtr callback) =0; - - /// - // Flush the backing store (if any) to disk. If |callback| is non-NULL it will - // be executed asnychronously on the IO thread after the flush is complete. - // Returns false if cookies cannot be accessed. - /// - /*--cef(optional_param=callback)--*/ - virtual bool FlushStore(CefRefPtr callback) =0; -}; - - -/// -// Interface to implement for visiting cookie values. The methods of this class -// will always be called on the IO thread. -/// -/*--cef(source=client)--*/ -class CefCookieVisitor : public virtual CefBase { - public: - /// - // Method that will be called once for each cookie. |count| is the 0-based - // index for the current cookie. |total| is the total number of cookies. - // Set |deleteCookie| to true to delete the cookie currently being visited. - // Return false to stop visiting cookies. This method may never be called if - // no cookies are found. - /// - /*--cef()--*/ - virtual bool Visit(const CefCookie& cookie, int count, int total, - bool& deleteCookie) =0; -}; - - -/// -// Interface to implement to be notified of asynchronous completion via -// CefCookieManager::SetCookie(). -/// -/*--cef(source=client)--*/ -class CefSetCookieCallback : public virtual CefBase { - public: - /// - // Method that will be called upon completion. |success| will be true if the - // cookie was set successfully. - /// - /*--cef()--*/ - virtual void OnComplete(bool success) =0; -}; - - -/// -// Interface to implement to be notified of asynchronous completion via -// CefCookieManager::DeleteCookies(). -/// -/*--cef(source=client)--*/ -class CefDeleteCookiesCallback : public virtual CefBase { - public: - /// - // Method that will be called upon completion. |num_deleted| will be the - // number of cookies that were deleted or -1 if unknown. - /// - /*--cef()--*/ - virtual void OnComplete(int num_deleted) =0; -}; - -#endif // CEF_INCLUDE_CEF_COOKIE_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_dialog_handler.h b/tool_kits/cef/cef_wrapper/include/cef_dialog_handler.h deleted file mode 100644 index 93cd5de7..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_dialog_handler.h +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_DIALOG_HANDLER_H_ -#define CEF_INCLUDE_CEF_DIALOG_HANDLER_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_browser.h" - -/// -// Callback interface for asynchronous continuation of file dialog requests. -/// -/*--cef(source=library)--*/ -class CefFileDialogCallback : public virtual CefBase { - public: - /// - // Continue the file selection. |selected_accept_filter| should be the 0-based - // index of the value selected from the accept filters array passed to - // CefDialogHandler::OnFileDialog. |file_paths| should be a single value or a - // list of values depending on the dialog mode. An empty |file_paths| value is - // treated the same as calling Cancel(). - /// - /*--cef(capi_name=cont,index_param=selected_accept_filter, - optional_param=file_paths)--*/ - virtual void Continue(int selected_accept_filter, - const std::vector& file_paths) =0; - - /// - // Cancel the file selection. - /// - /*--cef()--*/ - virtual void Cancel() =0; -}; - - -/// -// Implement this interface to handle dialog events. The methods of this class -// will be called on the browser process UI thread. -/// -/*--cef(source=client)--*/ -class CefDialogHandler : public virtual CefBase { - public: - typedef cef_file_dialog_mode_t FileDialogMode; - - /// - // Called to run a file chooser dialog. |mode| represents the type of dialog - // to display. |title| to the title to be used for the dialog and may be empty - // to show the default title ("Open" or "Save" depending on the mode). - // |default_file_path| is the path with optional directory and/or file name - // component that should be initially selected in the dialog. |accept_filters| - // are used to restrict the selectable file types and may any combination of - // (a) valid lower-cased MIME types (e.g. "text/*" or "image/*"), - // (b) individual file extensions (e.g. ".txt" or ".png"), or (c) combined - // description and file extension delimited using "|" and ";" (e.g. - // "Image Types|.png;.gif;.jpg"). |selected_accept_filter| is the 0-based - // index of the filter that should be selected by default. To display a custom - // dialog return true and execute |callback| either inline or at a later time. - // To display the default dialog return false. - /// - /*--cef(optional_param=title,optional_param=default_file_path, - optional_param=accept_filters,index_param=selected_accept_filter)--*/ - virtual bool OnFileDialog(CefRefPtr browser, - FileDialogMode mode, - const CefString& title, - const CefString& default_file_path, - const std::vector& accept_filters, - int selected_accept_filter, - CefRefPtr callback) { - return false; - } -}; - -#endif // CEF_INCLUDE_CEF_DIALOG_HANDLER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_display_handler.h b/tool_kits/cef/cef_wrapper/include/cef_display_handler.h deleted file mode 100644 index 3f064610..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_display_handler.h +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_DISPLAY_HANDLER_H_ -#define CEF_INCLUDE_CEF_DISPLAY_HANDLER_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_browser.h" -#include "include/cef_frame.h" - -/// -// Implement this interface to handle events related to browser display state. -// The methods of this class will be called on the UI thread. -/// -/*--cef(source=client)--*/ -class CefDisplayHandler : public virtual CefBase { - public: - /// - // Called when a frame's address has changed. - /// - /*--cef()--*/ - virtual void OnAddressChange(CefRefPtr browser, - CefRefPtr frame, - const CefString& url) {} - - /// - // Called when the page title changes. - /// - /*--cef(optional_param=title)--*/ - virtual void OnTitleChange(CefRefPtr browser, - const CefString& title) {} - - /// - // Called when the page icon changes. - /// - /*--cef(optional_param=icon_urls)--*/ - virtual void OnFaviconURLChange(CefRefPtr browser, - const std::vector& icon_urls) {} - - /// - // Called when web content in the page has toggled fullscreen mode. If - // |fullscreen| is true the content will automatically be sized to fill the - // browser content area. If |fullscreen| is false the content will - // automatically return to its original size and position. The client is - // responsible for resizing the browser if desired. - /// - /*--cef()--*/ - virtual void OnFullscreenModeChange(CefRefPtr browser, - bool fullscreen) {} - - /// - // Called when the browser is about to display a tooltip. |text| contains the - // text that will be displayed in the tooltip. To handle the display of the - // tooltip yourself return true. Otherwise, you can optionally modify |text| - // and then return false to allow the browser to display the tooltip. - // When window rendering is disabled the application is responsible for - // drawing tooltips and the return value is ignored. - /// - /*--cef(optional_param=text)--*/ - virtual bool OnTooltip(CefRefPtr browser, - CefString& text) { return false; } - - /// - // Called when the browser receives a status message. |value| contains the - // text that will be displayed in the status message. - /// - /*--cef(optional_param=value)--*/ - virtual void OnStatusMessage(CefRefPtr browser, - const CefString& value) {} - - /// - // Called to display a console message. Return true to stop the message from - // being output to the console. - /// - /*--cef(optional_param=message,optional_param=source)--*/ - virtual bool OnConsoleMessage(CefRefPtr browser, - const CefString& message, - const CefString& source, - int line) { return false; } -}; - -#endif // CEF_INCLUDE_CEF_DISPLAY_HANDLER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_dom.h b/tool_kits/cef/cef_wrapper/include/cef_dom.h deleted file mode 100644 index 9f9a3d5a..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_dom.h +++ /dev/null @@ -1,328 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_DOM_H_ -#define CEF_INCLUDE_CEF_DOM_H_ -#pragma once - -#include "include/cef_base.h" -#include - -class CefDOMDocument; -class CefDOMNode; - -/// -// Interface to implement for visiting the DOM. The methods of this class will -// be called on the render process main thread. -/// -/*--cef(source=client)--*/ -class CefDOMVisitor : public virtual CefBase { - public: - /// - // Method executed for visiting the DOM. The document object passed to this - // method represents a snapshot of the DOM at the time this method is - // executed. DOM objects are only valid for the scope of this method. Do not - // keep references to or attempt to access any DOM objects outside the scope - // of this method. - /// - /*--cef()--*/ - virtual void Visit(CefRefPtr document) =0; -}; - - -/// -// Class used to represent a DOM document. The methods of this class should only -// be called on the render process main thread thread. -/// -/*--cef(source=library)--*/ -class CefDOMDocument : public virtual CefBase { - public: - typedef cef_dom_document_type_t Type; - - /// - // Returns the document type. - /// - /*--cef(default_retval=DOM_DOCUMENT_TYPE_UNKNOWN)--*/ - virtual Type GetType() =0; - - /// - // Returns the root document node. - /// - /*--cef()--*/ - virtual CefRefPtr GetDocument() =0; - - /// - // Returns the BODY node of an HTML document. - /// - /*--cef()--*/ - virtual CefRefPtr GetBody() =0; - - /// - // Returns the HEAD node of an HTML document. - /// - /*--cef()--*/ - virtual CefRefPtr GetHead() =0; - - /// - // Returns the title of an HTML document. - /// - /*--cef()--*/ - virtual CefString GetTitle() =0; - - /// - // Returns the document element with the specified ID value. - /// - /*--cef()--*/ - virtual CefRefPtr GetElementById(const CefString& id) =0; - - /// - // Returns the node that currently has keyboard focus. - /// - /*--cef()--*/ - virtual CefRefPtr GetFocusedNode() =0; - - /// - // Returns true if a portion of the document is selected. - /// - /*--cef()--*/ - virtual bool HasSelection() =0; - - /// - // Returns the selection offset within the start node. - /// - /*--cef()--*/ - virtual int GetSelectionStartOffset() =0; - - /// - // Returns the selection offset within the end node. - /// - /*--cef()--*/ - virtual int GetSelectionEndOffset() =0; - - /// - // Returns the contents of this selection as markup. - /// - /*--cef()--*/ - virtual CefString GetSelectionAsMarkup() =0; - - /// - // Returns the contents of this selection as text. - /// - /*--cef()--*/ - virtual CefString GetSelectionAsText() =0; - - /// - // Returns the base URL for the document. - /// - /*--cef()--*/ - virtual CefString GetBaseURL() =0; - - /// - // Returns a complete URL based on the document base URL and the specified - // partial URL. - /// - /*--cef()--*/ - virtual CefString GetCompleteURL(const CefString& partialURL) =0; -}; - - -/// -// Class used to represent a DOM node. The methods of this class should only be -// called on the render process main thread. -/// -/*--cef(source=library)--*/ -class CefDOMNode : public virtual CefBase { - public: - typedef std::map AttributeMap; - typedef cef_dom_node_type_t Type; - - /// - // Returns the type for this node. - /// - /*--cef(default_retval=DOM_NODE_TYPE_UNSUPPORTED)--*/ - virtual Type GetType() =0; - - /// - // Returns true if this is a text node. - /// - /*--cef()--*/ - virtual bool IsText() =0; - - /// - // Returns true if this is an element node. - /// - /*--cef()--*/ - virtual bool IsElement() =0; - - /// - // Returns true if this is an editable node. - /// - /*--cef()--*/ - virtual bool IsEditable() =0; - - /// - // Returns true if this is a form control element node. - /// - /*--cef()--*/ - virtual bool IsFormControlElement() =0; - - /// - // Returns the type of this form control element node. - /// - /*--cef()--*/ - virtual CefString GetFormControlElementType() =0; - - /// - // Returns true if this object is pointing to the same handle as |that| - // object. - /// - /*--cef()--*/ - virtual bool IsSame(CefRefPtr that) =0; - - /// - // Returns the name of this node. - /// - /*--cef()--*/ - virtual CefString GetName() =0; - - /// - // Returns the value of this node. - /// - /*--cef()--*/ - virtual CefString GetValue() =0; - - /// - // Set the value of this node. Returns true on success. - /// - /*--cef()--*/ - virtual bool SetValue(const CefString& value) =0; - - /// - // Returns the contents of this node as markup. - /// - /*--cef()--*/ - virtual CefString GetAsMarkup() =0; - - /// - // Returns the document associated with this node. - /// - /*--cef()--*/ - virtual CefRefPtr GetDocument() =0; - - /// - // Returns the parent node. - /// - /*--cef()--*/ - virtual CefRefPtr GetParent() =0; - - /// - // Returns the previous sibling node. - /// - /*--cef()--*/ - virtual CefRefPtr GetPreviousSibling() =0; - - /// - // Returns the next sibling node. - /// - /*--cef()--*/ - virtual CefRefPtr GetNextSibling() =0; - - /// - // Returns true if this node has child nodes. - /// - /*--cef()--*/ - virtual bool HasChildren() =0; - - /// - // Return the first child node. - /// - /*--cef()--*/ - virtual CefRefPtr GetFirstChild() =0; - - /// - // Returns the last child node. - /// - /*--cef()--*/ - virtual CefRefPtr GetLastChild() =0; - - // The following methods are valid only for element nodes. - - /// - // Returns the tag name of this element. - /// - /*--cef()--*/ - virtual CefString GetElementTagName() =0; - - /// - // Returns true if this element has attributes. - /// - /*--cef()--*/ - virtual bool HasElementAttributes() =0; - - /// - // Returns true if this element has an attribute named |attrName|. - /// - /*--cef()--*/ - virtual bool HasElementAttribute(const CefString& attrName) =0; - - /// - // Returns the element attribute named |attrName|. - /// - /*--cef()--*/ - virtual CefString GetElementAttribute(const CefString& attrName) =0; - - /// - // Returns a map of all element attributes. - /// - /*--cef()--*/ - virtual void GetElementAttributes(AttributeMap& attrMap) =0; - - /// - // Set the value for the element attribute named |attrName|. Returns true on - // success. - /// - /*--cef()--*/ - virtual bool SetElementAttribute(const CefString& attrName, - const CefString& value) =0; - - /// - // Returns the inner text of the element. - /// - /*--cef()--*/ - virtual CefString GetElementInnerText() =0; -}; - -#endif // CEF_INCLUDE_CEF_DOM_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_download_handler.h b/tool_kits/cef/cef_wrapper/include/cef_download_handler.h deleted file mode 100644 index 4f58af48..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_download_handler.h +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_DOWNLOAD_HANDLER_H_ -#define CEF_INCLUDE_CEF_DOWNLOAD_HANDLER_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_browser.h" -#include "include/cef_download_item.h" - - -/// -// Callback interface used to asynchronously continue a download. -/// -/*--cef(source=library)--*/ -class CefBeforeDownloadCallback : public virtual CefBase { - public: - /// - // Call to continue the download. Set |download_path| to the full file path - // for the download including the file name or leave blank to use the - // suggested name and the default temp directory. Set |show_dialog| to true - // if you do wish to show the default "Save As" dialog. - /// - /*--cef(capi_name=cont,optional_param=download_path)--*/ - virtual void Continue(const CefString& download_path, bool show_dialog) =0; -}; - - -/// -// Callback interface used to asynchronously cancel a download. -/// -/*--cef(source=library)--*/ -class CefDownloadItemCallback : public virtual CefBase { - public: - /// - // Call to cancel the download. - /// - /*--cef()--*/ - virtual void Cancel() =0; - - /// - // Call to pause the download. - /// - /*--cef()--*/ - virtual void Pause() =0; - - /// - // Call to resume the download. - /// - /*--cef()--*/ - virtual void Resume() =0; -}; - - -/// -// Class used to handle file downloads. The methods of this class will called -// on the browser process UI thread. -/// -/*--cef(source=client)--*/ -class CefDownloadHandler : public virtual CefBase { - public: - /// - // Called before a download begins. |suggested_name| is the suggested name for - // the download file. By default the download will be canceled. Execute - // |callback| either asynchronously or in this method to continue the download - // if desired. Do not keep a reference to |download_item| outside of this - // method. - /// - /*--cef()--*/ - virtual void OnBeforeDownload( - CefRefPtr browser, - CefRefPtr download_item, - const CefString& suggested_name, - CefRefPtr callback) =0; - - /// - // Called when a download's status or progress information has been updated. - // This may be called multiple times before and after OnBeforeDownload(). - // Execute |callback| either asynchronously or in this method to cancel the - // download if desired. Do not keep a reference to |download_item| outside of - // this method. - /// - /*--cef()--*/ - virtual void OnDownloadUpdated( - CefRefPtr browser, - CefRefPtr download_item, - CefRefPtr callback) {} -}; - -#endif // CEF_INCLUDE_CEF_DOWNLOAD_HANDLER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_download_item.h b/tool_kits/cef/cef_wrapper/include/cef_download_item.h deleted file mode 100644 index 988ef6bd..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_download_item.h +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_DOWNLOAD_ITEM_H_ -#define CEF_INCLUDE_CEF_DOWNLOAD_ITEM_H_ -#pragma once - -#include "include/cef_base.h" - -/// -// Class used to represent a download item. -/// -/*--cef(source=library)--*/ -class CefDownloadItem : public virtual CefBase { - public: - /// - // Returns true if this object is valid. Do not call any other methods if this - // function returns false. - /// - /*--cef()--*/ - virtual bool IsValid() =0; - - /// - // Returns true if the download is in progress. - /// - /*--cef()--*/ - virtual bool IsInProgress() =0; - - /// - // Returns true if the download is complete. - /// - /*--cef()--*/ - virtual bool IsComplete() =0; - - /// - // Returns true if the download has been canceled or interrupted. - /// - /*--cef()--*/ - virtual bool IsCanceled() =0; - - /// - // Returns a simple speed estimate in bytes/s. - /// - /*--cef()--*/ - virtual int64 GetCurrentSpeed() =0; - - /// - // Returns the rough percent complete or -1 if the receive total size is - // unknown. - /// - /*--cef()--*/ - virtual int GetPercentComplete() =0; - - /// - // Returns the total number of bytes. - /// - /*--cef()--*/ - virtual int64 GetTotalBytes() =0; - - /// - // Returns the number of received bytes. - /// - /*--cef()--*/ - virtual int64 GetReceivedBytes() =0; - - /// - // Returns the time that the download started. - /// - /*--cef()--*/ - virtual CefTime GetStartTime() =0; - - /// - // Returns the time that the download ended. - /// - /*--cef()--*/ - virtual CefTime GetEndTime() =0; - - /// - // Returns the full path to the downloaded or downloading file. - /// - /*--cef()--*/ - virtual CefString GetFullPath() =0; - - /// - // Returns the unique identifier for this download. - /// - /*--cef()--*/ - virtual uint32 GetId() =0; - - /// - // Returns the URL. - /// - /*--cef()--*/ - virtual CefString GetURL() =0; - - /// - // Returns the original URL before any redirections. - /// - /*--cef()--*/ - virtual CefString GetOriginalUrl() =0; - - /// - // Returns the suggested file name. - /// - /*--cef()--*/ - virtual CefString GetSuggestedFileName() =0; - - /// - // Returns the content disposition. - /// - /*--cef()--*/ - virtual CefString GetContentDisposition() =0; - - /// - // Returns the mime type. - /// - /*--cef()--*/ - virtual CefString GetMimeType() =0; -}; - -#endif // CEF_INCLUDE_CEF_DOWNLOAD_ITEM_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_drag_data.h b/tool_kits/cef/cef_wrapper/include/cef_drag_data.h deleted file mode 100644 index 8f8094b4..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_drag_data.h +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright (c) 2013 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_DRAG_DATA_H_ -#define CEF_INCLUDE_CEF_DRAG_DATA_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_stream.h" -#include - -/// -// Class used to represent drag data. The methods of this class may be called -// on any thread. -/// -/*--cef(source=library)--*/ -class CefDragData : public virtual CefBase { - public: - /// - // Create a new CefDragData object. - /// - /*--cef()--*/ - static CefRefPtr Create(); - - /// - // Returns a copy of the current object. - /// - /*--cef()--*/ - virtual CefRefPtr Clone() =0; - - /// - // Returns true if this object is read-only. - /// - /*--cef()--*/ - virtual bool IsReadOnly() =0; - - /// - // Returns true if the drag data is a link. - /// - /*--cef()--*/ - virtual bool IsLink() =0; - - /// - // Returns true if the drag data is a text or html fragment. - /// - /*--cef()--*/ - virtual bool IsFragment() =0; - - /// - // Returns true if the drag data is a file. - /// - /*--cef()--*/ - virtual bool IsFile() =0; - - /// - // Return the link URL that is being dragged. - /// - /*--cef()--*/ - virtual CefString GetLinkURL() =0; - - /// - // Return the title associated with the link being dragged. - /// - /*--cef()--*/ - virtual CefString GetLinkTitle() =0; - - /// - // Return the metadata, if any, associated with the link being dragged. - /// - /*--cef()--*/ - virtual CefString GetLinkMetadata() =0; - - /// - // Return the plain text fragment that is being dragged. - /// - /*--cef()--*/ - virtual CefString GetFragmentText() =0; - - /// - // Return the text/html fragment that is being dragged. - /// - /*--cef()--*/ - virtual CefString GetFragmentHtml() =0; - - /// - // Return the base URL that the fragment came from. This value is used for - // resolving relative URLs and may be empty. - /// - /*--cef()--*/ - virtual CefString GetFragmentBaseURL() =0; - - /// - // Return the name of the file being dragged out of the browser window. - /// - /*--cef()--*/ - virtual CefString GetFileName() =0; - - /// - // Write the contents of the file being dragged out of the web view into - // |writer|. Returns the number of bytes sent to |writer|. If |writer| is - // NULL this method will return the size of the file contents in bytes. - // Call GetFileName() to get a suggested name for the file. - /// - /*--cef(optional_param=writer)--*/ - virtual size_t GetFileContents(CefRefPtr writer) =0; - - /// - // Retrieve the list of file names that are being dragged into the browser - // window. - /// - /*--cef()--*/ - virtual bool GetFileNames(std::vector& names) =0; - - /// - // Set the link URL that is being dragged. - /// - /*--cef(optional_param=url)--*/ - virtual void SetLinkURL(const CefString& url) =0; - - /// - // Set the title associated with the link being dragged. - /// - /*--cef(optional_param=title)--*/ - virtual void SetLinkTitle(const CefString& title) =0; - - /// - // Set the metadata associated with the link being dragged. - /// - /*--cef(optional_param=data)--*/ - virtual void SetLinkMetadata(const CefString& data) =0; - - /// - // Set the plain text fragment that is being dragged. - /// - /*--cef(optional_param=text)--*/ - virtual void SetFragmentText(const CefString& text) =0; - - /// - // Set the text/html fragment that is being dragged. - /// - /*--cef(optional_param=html)--*/ - virtual void SetFragmentHtml(const CefString& html) =0; - - /// - // Set the base URL that the fragment came from. - /// - /*--cef(optional_param=base_url)--*/ - virtual void SetFragmentBaseURL(const CefString& base_url) =0; - - /// - // Reset the file contents. You should do this before calling - // CefBrowserHost::DragTargetDragEnter as the web view does not allow us to - // drag in this kind of data. - /// - /*--cef()--*/ - virtual void ResetFileContents() =0; - - /// - // Add a file that is being dragged into the webview. - /// - /*--cef(optional_param=display_name)--*/ - virtual void AddFile(const CefString& path, const CefString& display_name) =0; -}; - -#endif // CEF_INCLUDE_CEF_DRAG_DATA_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_drag_handler.h b/tool_kits/cef/cef_wrapper/include/cef_drag_handler.h deleted file mode 100644 index 3e26f975..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_drag_handler.h +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) 2013 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_DRAG_HANDLER_H_ -#define CEF_INCLUDE_CEF_DRAG_HANDLER_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_drag_data.h" -#include "include/cef_browser.h" - -/// -// Implement this interface to handle events related to dragging. The methods of -// this class will be called on the UI thread. -/// -/*--cef(source=client)--*/ -class CefDragHandler : public virtual CefBase { - public: - typedef cef_drag_operations_mask_t DragOperationsMask; - - /// - // Called when an external drag event enters the browser window. |dragData| - // contains the drag event data and |mask| represents the type of drag - // operation. Return false for default drag handling behavior or true to - // cancel the drag event. - /// - /*--cef()--*/ - virtual bool OnDragEnter(CefRefPtr browser, - CefRefPtr dragData, - DragOperationsMask mask) { return false; } - - /// - // Called whenever draggable regions for the browser window change. These can - // be specified using the '-webkit-app-region: drag/no-drag' CSS-property. If - // draggable regions are never defined in a document this method will also - // never be called. If the last draggable region is removed from a document - // this method will be called with an empty vector. - /// - /*--cef()--*/ - virtual void OnDraggableRegionsChanged( - CefRefPtr browser, - const std::vector& regions) {} -}; - -#endif // CEF_INCLUDE_CEF_DRAG_HANDLER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_find_handler.h b/tool_kits/cef/cef_wrapper/include/cef_find_handler.h deleted file mode 100644 index 410cf5fe..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_find_handler.h +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2015 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_FIND_HANDLER_H_ -#define CEF_INCLUDE_CEF_FIND_HANDLER_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_browser.h" - -/// -// Implement this interface to handle events related to find results. The -// methods of this class will be called on the UI thread. -/// -/*--cef(source=client)--*/ -class CefFindHandler : public virtual CefBase { - public: - /// - // Called to report find results returned by CefBrowserHost::Find(). - // |identifer| is the identifier passed to Find(), |count| is the number of - // matches currently identified, |selectionRect| is the location of where the - // match was found (in window coordinates), |activeMatchOrdinal| is the - // current position in the search results, and |finalUpdate| is true if this - // is the last find notification. - /// - /*--cef()--*/ - virtual void OnFindResult(CefRefPtr browser, - int identifier, - int count, - const CefRect& selectionRect, - int activeMatchOrdinal, - bool finalUpdate) {} -}; - -#endif // CEF_INCLUDE_CEF_FIND_HANDLER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_focus_handler.h b/tool_kits/cef/cef_wrapper/include/cef_focus_handler.h deleted file mode 100644 index 1d91c42a..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_focus_handler.h +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_FOCUS_HANDLER_H_ -#define CEF_INCLUDE_CEF_FOCUS_HANDLER_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_browser.h" -#include "include/cef_dom.h" -#include "include/cef_frame.h" - -/// -// Implement this interface to handle events related to focus. The methods of -// this class will be called on the UI thread. -/// -/*--cef(source=client)--*/ -class CefFocusHandler : public virtual CefBase { - public: - typedef cef_focus_source_t FocusSource; - - /// - // Called when the browser component is about to loose focus. For instance, if - // focus was on the last HTML element and the user pressed the TAB key. |next| - // will be true if the browser is giving focus to the next component and false - // if the browser is giving focus to the previous component. - /// - /*--cef()--*/ - virtual void OnTakeFocus(CefRefPtr browser, - bool next) {} - - /// - // Called when the browser component is requesting focus. |source| indicates - // where the focus request is originating from. Return false to allow the - // focus to be set or true to cancel setting the focus. - /// - /*--cef()--*/ - virtual bool OnSetFocus(CefRefPtr browser, - FocusSource source) { return false; } - - /// - // Called when the browser component has received focus. - /// - /*--cef()--*/ - virtual void OnGotFocus(CefRefPtr browser) {} -}; - -#endif // CEF_INCLUDE_CEF_FOCUS_HANDLER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_frame.h b/tool_kits/cef/cef_wrapper/include/cef_frame.h deleted file mode 100644 index 1ea172f1..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_frame.h +++ /dev/null @@ -1,225 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_FRAME_H_ -#define CEF_INCLUDE_CEF_FRAME_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_dom.h" -#include "include/cef_request.h" -#include "include/cef_stream.h" -#include "include/cef_string_visitor.h" - -class CefBrowser; -class CefV8Context; - -/// -// Class used to represent a frame in the browser window. When used in the -// browser process the methods of this class may be called on any thread unless -// otherwise indicated in the comments. When used in the render process the -// methods of this class may only be called on the main thread. -/// -/*--cef(source=library)--*/ -class CefFrame : public virtual CefBase { - public: - /// - // True if this object is currently attached to a valid frame. - /// - /*--cef()--*/ - virtual bool IsValid() =0; - - /// - // Execute undo in this frame. - /// - /*--cef()--*/ - virtual void Undo() =0; - - /// - // Execute redo in this frame. - /// - /*--cef()--*/ - virtual void Redo() =0; - - /// - // Execute cut in this frame. - /// - /*--cef()--*/ - virtual void Cut() =0; - - /// - // Execute copy in this frame. - /// - /*--cef()--*/ - virtual void Copy() =0; - - /// - // Execute paste in this frame. - /// - /*--cef()--*/ - virtual void Paste() =0; - - /// - // Execute delete in this frame. - /// - /*--cef(capi_name=del)--*/ - virtual void Delete() =0; - - /// - // Execute select all in this frame. - /// - /*--cef()--*/ - virtual void SelectAll() =0; - - /// - // Save this frame's HTML source to a temporary file and open it in the - // default text viewing application. This method can only be called from the - // browser process. - /// - /*--cef()--*/ - virtual void ViewSource() =0; - - /// - // Retrieve this frame's HTML source as a string sent to the specified - // visitor. - /// - /*--cef()--*/ - virtual void GetSource(CefRefPtr visitor) =0; - - /// - // Retrieve this frame's display text as a string sent to the specified - // visitor. - /// - /*--cef()--*/ - virtual void GetText(CefRefPtr visitor) =0; - - /// - // Load the request represented by the |request| object. - /// - /*--cef()--*/ - virtual void LoadRequest(CefRefPtr request) =0; - - /// - // Load the specified |url|. - /// - /*--cef()--*/ - virtual void LoadURL(const CefString& url) =0; - - /// - // Load the contents of |string_val| with the specified dummy |url|. |url| - // should have a standard scheme (for example, http scheme) or behaviors like - // link clicks and web security restrictions may not behave as expected. - /// - /*--cef()--*/ - virtual void LoadString(const CefString& string_val, - const CefString& url) =0; - - /// - // Execute a string of JavaScript code in this frame. The |script_url| - // parameter is the URL where the script in question can be found, if any. - // The renderer may request this URL to show the developer the source of the - // error. The |start_line| parameter is the base line number to use for error - // reporting. - /// - /*--cef(optional_param=script_url)--*/ - virtual void ExecuteJavaScript(const CefString& code, - const CefString& script_url, - int start_line) =0; - - /// - // Returns true if this is the main (top-level) frame. - /// - /*--cef()--*/ - virtual bool IsMain() =0; - - /// - // Returns true if this is the focused frame. - /// - /*--cef()--*/ - virtual bool IsFocused() =0; - - /// - // Returns the name for this frame. If the frame has an assigned name (for - // example, set via the iframe "name" attribute) then that value will be - // returned. Otherwise a unique name will be constructed based on the frame - // parent hierarchy. The main (top-level) frame will always have an empty name - // value. - /// - /*--cef()--*/ - virtual CefString GetName() =0; - - /// - // Returns the globally unique identifier for this frame or < 0 if the - // underlying frame does not yet exist. - /// - /*--cef()--*/ - virtual int64 GetIdentifier() =0; - - /// - // Returns the parent of this frame or NULL if this is the main (top-level) - // frame. - /// - /*--cef()--*/ - virtual CefRefPtr GetParent() =0; - - /// - // Returns the URL currently loaded in this frame. - /// - /*--cef()--*/ - virtual CefString GetURL() =0; - - /// - // Returns the browser that this frame belongs to. - /// - /*--cef()--*/ - virtual CefRefPtr GetBrowser() =0; - - /// - // Get the V8 context associated with the frame. This method can only be - // called from the render process. - /// - /*--cef()--*/ - virtual CefRefPtr GetV8Context() =0; - - /// - // Visit the DOM document. This method can only be called from the render - // process. - /// - /*--cef()--*/ - virtual void VisitDOM(CefRefPtr visitor) =0; -}; - -#endif // CEF_INCLUDE_CEF_FRAME_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_geolocation.h b/tool_kits/cef/cef_wrapper/include/cef_geolocation.h deleted file mode 100644 index 69c08779..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_geolocation.h +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_GEOLOCATION_H_ -#define CEF_INCLUDE_CEF_GEOLOCATION_H_ -#pragma once - -#include "include/cef_base.h" - -/// -// Implement this interface to receive geolocation updates. The methods of this -// class will be called on the browser process UI thread. -/// -/*--cef(source=client)--*/ -class CefGetGeolocationCallback : public virtual CefBase { - public: - /// - // Called with the 'best available' location information or, if the location - // update failed, with error information. - /// - /*--cef()--*/ - virtual void OnLocationUpdate(const CefGeoposition& position) =0; -}; - -/// -// Request a one-time geolocation update. This function bypasses any user -// permission checks so should only be used by code that is allowed to access -// location information. -/// -/*--cef()--*/ -bool CefGetGeolocation(CefRefPtr callback); - -#endif // CEF_INCLUDE_CEF_GEOLOCATION_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_geolocation_handler.h b/tool_kits/cef/cef_wrapper/include/cef_geolocation_handler.h deleted file mode 100644 index dda52834..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_geolocation_handler.h +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_GEOLOCATION_HANDLER_H_ -#define CEF_INCLUDE_CEF_GEOLOCATION_HANDLER_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_browser.h" - -/// -// Callback interface used for asynchronous continuation of geolocation -// permission requests. -/// -/*--cef(source=library)--*/ -class CefGeolocationCallback : public virtual CefBase { - public: - /// - // Call to allow or deny geolocation access. - /// - /*--cef(capi_name=cont)--*/ - virtual void Continue(bool allow) =0; -}; - - -/// -// Implement this interface to handle events related to geolocation permission -// requests. The methods of this class will be called on the browser process UI -// thread. -/// -/*--cef(source=client)--*/ -class CefGeolocationHandler : public virtual CefBase { - public: - /// - // Called when a page requests permission to access geolocation information. - // |requesting_url| is the URL requesting permission and |request_id| is the - // unique ID for the permission request. Return true and call - // CefGeolocationCallback::Continue() either in this method or at a later - // time to continue or cancel the request. Return false to cancel the request - // immediately. - /// - /*--cef()--*/ - virtual bool OnRequestGeolocationPermission( - CefRefPtr browser, - const CefString& requesting_url, - int request_id, - CefRefPtr callback) { - return false; - } - - /// - // Called when a geolocation access request is canceled. |request_id| is the - // unique ID for the permission request. - /// - /*--cef()--*/ - virtual void OnCancelGeolocationPermission( - CefRefPtr browser, - int request_id) { - } -}; - -#endif // CEF_INCLUDE_CEF_GEOLOCATION_HANDLER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_jsdialog_handler.h b/tool_kits/cef/cef_wrapper/include/cef_jsdialog_handler.h deleted file mode 100644 index 9ef1ae50..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_jsdialog_handler.h +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_JSDIALOG_HANDLER_H_ -#define CEF_INCLUDE_CEF_JSDIALOG_HANDLER_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_browser.h" - -/// -// Callback interface used for asynchronous continuation of JavaScript dialog -// requests. -/// -/*--cef(source=library)--*/ -class CefJSDialogCallback : public virtual CefBase { - public: - /// - // Continue the JS dialog request. Set |success| to true if the OK button was - // pressed. The |user_input| value should be specified for prompt dialogs. - /// - /*--cef(capi_name=cont,optional_param=user_input)--*/ - virtual void Continue(bool success, - const CefString& user_input) =0; -}; - - -/// -// Implement this interface to handle events related to JavaScript dialogs. The -// methods of this class will be called on the UI thread. -/// -/*--cef(source=client)--*/ -class CefJSDialogHandler : public virtual CefBase { - public: - typedef cef_jsdialog_type_t JSDialogType; - - /// - // 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 browser, - const CefString& origin_url, - const CefString& accept_lang, - JSDialogType dialog_type, - const CefString& message_text, - const CefString& default_prompt_text, - CefRefPtr callback, - bool& suppress_message) { - return false; - } - - /// - // Called to run a dialog asking the user if they want to leave a page. Return - // false to use the default dialog implementation. 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=message_text)--*/ - virtual bool OnBeforeUnloadDialog(CefRefPtr browser, - const CefString& message_text, - bool is_reload, - CefRefPtr callback) { - return false; - } - - /// - // Called to cancel any pending dialogs and reset any saved dialog state. Will - // be called due to events like page navigation irregardless of whether any - // dialogs are currently pending. - /// - /*--cef()--*/ - virtual void OnResetDialogState(CefRefPtr browser) {} - - /// - // Called when the default implementation dialog is closed. - /// - /*--cef()--*/ - virtual void OnDialogClosed(CefRefPtr browser) {} -}; - -#endif // CEF_INCLUDE_CEF_JSDIALOG_HANDLER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_keyboard_handler.h b/tool_kits/cef/cef_wrapper/include/cef_keyboard_handler.h deleted file mode 100644 index 0346aa4a..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_keyboard_handler.h +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_KEYBOARD_HANDLER_H_ -#define CEF_INCLUDE_CEF_KEYBOARD_HANDLER_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_browser.h" - -/// -// Implement this interface to handle events related to keyboard input. The -// methods of this class will be called on the UI thread. -/// -/*--cef(source=client)--*/ -class CefKeyboardHandler : public virtual CefBase { - public: - /// - // Called before a keyboard event is sent to the renderer. |event| contains - // information about the keyboard event. |os_event| is the operating system - // event message, if any. Return true if the event was handled or false - // otherwise. If the event will be handled in OnKeyEvent() as a keyboard - // shortcut set |is_keyboard_shortcut| to true and return false. - /// - /*--cef()--*/ - virtual bool OnPreKeyEvent(CefRefPtr browser, - const CefKeyEvent& event, - CefEventHandle os_event, - bool* is_keyboard_shortcut) { return false; } - - /// - // Called after the renderer and JavaScript in the page has had a chance to - // handle the event. |event| contains information about the keyboard event. - // |os_event| is the operating system event message, if any. Return true if - // the keyboard event was handled or false otherwise. - /// - /*--cef()--*/ - virtual bool OnKeyEvent(CefRefPtr browser, - const CefKeyEvent& event, - CefEventHandle os_event) { return false; } -}; - -#endif // CEF_INCLUDE_CEF_KEYBOARD_HANDLER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_life_span_handler.h b/tool_kits/cef/cef_wrapper/include/cef_life_span_handler.h deleted file mode 100644 index 73b693ae..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_life_span_handler.h +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_LIFE_SPAN_HANDLER_H_ -#define CEF_INCLUDE_CEF_LIFE_SPAN_HANDLER_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_browser.h" - -class CefClient; - -/// -// Implement this interface to handle events related to browser life span. The -// methods of this class will be called on the UI thread unless otherwise -// indicated. -/// -/*--cef(source=client)--*/ -class CefLifeSpanHandler : public virtual CefBase { - public: - typedef cef_window_open_disposition_t WindowOpenDisposition; - - /// - // Called on the IO thread before a new popup browser is created. The - // |browser| and |frame| values represent the source of the popup request. The - // |target_url| and |target_frame_name| values indicate where the popup - // browser should navigate and may be empty if not specified with the request. - // The |target_disposition| value indicates where the user intended to open - // the popup (e.g. current tab, new tab, etc). The |user_gesture| value will - // be true if the popup was opened via explicit user gesture (e.g. clicking a - // link) or false if the popup opened automatically (e.g. via the - // DomContentLoaded event). The |popupFeatures| structure contains additional - // information about the requested popup window. To allow creation of the - // popup browser optionally modify |windowInfo|, |client|, |settings| and - // |no_javascript_access| and return false. To cancel creation of the popup - // 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. - /// - /*--cef(optional_param=target_url,optional_param=target_frame_name)--*/ - virtual bool OnBeforePopup(CefRefPtr browser, - CefRefPtr frame, - const CefString& target_url, - const CefString& target_frame_name, - WindowOpenDisposition target_disposition, - bool user_gesture, - const CefPopupFeatures& popupFeatures, - CefWindowInfo& windowInfo, - CefRefPtr& client, - CefBrowserSettings& settings, - bool* no_javascript_access) { - return false; - } - - /// - // Called after a new browser is created. - /// - /*--cef()--*/ - virtual void OnAfterCreated(CefRefPtr 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 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 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). - // - // 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. - // - // 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. - // - // 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 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. - // - // 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. - // 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. 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 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. 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. - /// - /*--cef()--*/ - virtual bool DoClose(CefRefPtr browser) { return false; } - - /// - // 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. 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()--*/ - virtual void OnBeforeClose(CefRefPtr browser) {} -}; - -#endif // CEF_INCLUDE_CEF_LIFE_SPAN_HANDLER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_load_handler.h b/tool_kits/cef/cef_wrapper/include/cef_load_handler.h deleted file mode 100644 index 29f7b740..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_load_handler.h +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_LOAD_HANDLER_H_ -#define CEF_INCLUDE_CEF_LOAD_HANDLER_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_browser.h" -#include "include/cef_frame.h" - -/// -// Implement this interface to handle events related to browser load status. The -// methods of this class will be called on the browser process UI thread or -// render process main thread (TID_RENDERER). -/// -/*--cef(source=client)--*/ -class CefLoadHandler : public virtual CefBase { - public: - typedef cef_errorcode_t ErrorCode; - - /// - // Called when the loading state has changed. This callback will be executed - // twice -- once when loading is initiated either programmatically or by user - // action, and once when loading is terminated due to completion, cancellation - // of failure. It will be called before any calls to OnLoadStart and after all - // calls to OnLoadError and/or OnLoadEnd. - /// - /*--cef()--*/ - virtual void OnLoadingStateChange(CefRefPtr browser, - bool isLoading, - bool canGoBack, - bool canGoForward) {} - - /// - // Called when the browser begins loading a frame. The |frame| value will - // never be empty -- call the IsMain() method to check if this frame is the - // main frame. Multiple frames may be loading at the same time. Sub-frames may - // start or continue loading after the main frame load has ended. This method - // will always be called for all frames irrespective of whether the request - // completes successfully. For notification of overall browser load status use - // OnLoadingStateChange instead. - /// - /*--cef()--*/ - virtual void OnLoadStart(CefRefPtr browser, - CefRefPtr frame) {} - - /// - // Called when the browser is done loading a frame. The |frame| value will - // never be empty -- call the IsMain() method to check if this frame is the - // main frame. Multiple frames may be loading at the same time. Sub-frames may - // start or continue loading after the main frame load has ended. This method - // will always be called for all frames irrespective of whether the request - // completes successfully. For notification of overall browser load status use - // OnLoadingStateChange instead. - /// - /*--cef()--*/ - virtual void OnLoadEnd(CefRefPtr browser, - CefRefPtr frame, - int httpStatusCode) {} - - /// - // Called when the resource load for a navigation fails or is canceled. - // |errorCode| is the error code number, |errorText| is the error text and - // |failedUrl| is the URL that failed to load. See net\base\net_error_list.h - // for complete descriptions of the error codes. - /// - /*--cef(optional_param=errorText)--*/ - virtual void OnLoadError(CefRefPtr browser, - CefRefPtr frame, - ErrorCode errorCode, - const CefString& errorText, - const CefString& failedUrl) {} -}; - -#endif // CEF_INCLUDE_CEF_LOAD_HANDLER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_menu_model.h b/tool_kits/cef/cef_wrapper/include/cef_menu_model.h deleted file mode 100644 index 28ec447b..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_menu_model.h +++ /dev/null @@ -1,402 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_MENU_MODEL_H_ -#define CEF_INCLUDE_CEF_MENU_MODEL_H_ -#pragma once - -#include "include/cef_base.h" - -/// -// Supports creation and modification of menus. See cef_menu_id_t for the -// command ids that have default implementations. All user-defined command ids -// should be between MENU_ID_USER_FIRST and MENU_ID_USER_LAST. The methods of -// this class can only be accessed on the browser process the UI thread. -/// -/*--cef(source=library)--*/ -class CefMenuModel : public virtual CefBase { - public: - typedef cef_menu_item_type_t MenuItemType; - - /// - // Clears the menu. Returns true on success. - /// - /*--cef()--*/ - virtual bool Clear() =0; - - /// - // Returns the number of items in this menu. - /// - /*--cef()--*/ - virtual int GetCount() =0; - - /// - // Add a separator to the menu. Returns true on success. - /// - /*--cef()--*/ - virtual bool AddSeparator() =0; - - /// - // Add an item to the menu. Returns true on success. - /// - /*--cef()--*/ - virtual bool AddItem(int command_id, - const CefString& label) =0; - - /// - // Add a check item to the menu. Returns true on success. - /// - /*--cef()--*/ - virtual bool AddCheckItem(int command_id, - const CefString& label) =0; - /// - // Add a radio item to the menu. Only a single item with the specified - // |group_id| can be checked at a time. Returns true on success. - /// - /*--cef()--*/ - virtual bool AddRadioItem(int command_id, - const CefString& label, - int group_id) =0; - - /// - // Add a sub-menu to the menu. The new sub-menu is returned. - /// - /*--cef()--*/ - virtual CefRefPtr AddSubMenu(int command_id, - const CefString& label) =0; - - /// - // Insert a separator in the menu at the specified |index|. Returns true on - // success. - /// - /*--cef()--*/ - virtual bool InsertSeparatorAt(int index) =0; - - /// - // Insert an item in the menu at the specified |index|. Returns true on - // success. - /// - /*--cef()--*/ - virtual bool InsertItemAt(int index, - int command_id, - const CefString& label) =0; - - /// - // Insert a check item in the menu at the specified |index|. Returns true on - // success. - /// - /*--cef()--*/ - virtual bool InsertCheckItemAt(int index, - int command_id, - const CefString& label) =0; - - /// - // Insert a radio item in the menu at the specified |index|. Only a single - // item with the specified |group_id| can be checked at a time. Returns true - // on success. - /// - /*--cef()--*/ - virtual bool InsertRadioItemAt(int index, - int command_id, - const CefString& label, - int group_id) =0; - - /// - // Insert a sub-menu in the menu at the specified |index|. The new sub-menu - // is returned. - /// - /*--cef()--*/ - virtual CefRefPtr InsertSubMenuAt(int index, - int command_id, - const CefString& label) =0; - - /// - // Removes the item with the specified |command_id|. Returns true on success. - /// - /*--cef()--*/ - virtual bool Remove(int command_id) =0; - - /// - // Removes the item at the specified |index|. Returns true on success. - /// - /*--cef()--*/ - virtual bool RemoveAt(int index) =0; - - /// - // Returns the index associated with the specified |command_id| or -1 if not - // found due to the command id not existing in the menu. - /// - /*--cef()--*/ - virtual int GetIndexOf(int command_id) =0; - - /// - // Returns the command id at the specified |index| or -1 if not found due to - // invalid range or the index being a separator. - /// - /*--cef()--*/ - virtual int GetCommandIdAt(int index) =0; - - /// - // Sets the command id at the specified |index|. Returns true on success. - /// - /*--cef()--*/ - virtual bool SetCommandIdAt(int index, int command_id) =0; - - /// - // Returns the label for the specified |command_id| or empty if not found. - /// - /*--cef()--*/ - virtual CefString GetLabel(int command_id) =0; - - /// - // Returns the label at the specified |index| or empty if not found due to - // invalid range or the index being a separator. - /// - /*--cef()--*/ - virtual CefString GetLabelAt(int index) =0; - - /// - // Sets the label for the specified |command_id|. Returns true on success. - /// - /*--cef()--*/ - virtual bool SetLabel(int command_id, const CefString& label) =0; - - /// - // Set the label at the specified |index|. Returns true on success. - /// - /*--cef()--*/ - virtual bool SetLabelAt(int index, const CefString& label) =0; - - /// - // Returns the item type for the specified |command_id|. - /// - /*--cef(default_retval=MENUITEMTYPE_NONE)--*/ - virtual MenuItemType GetType(int command_id) =0; - - /// - // Returns the item type at the specified |index|. - /// - /*--cef(default_retval=MENUITEMTYPE_NONE)--*/ - virtual MenuItemType GetTypeAt(int index) =0; - - /// - // Returns the group id for the specified |command_id| or -1 if invalid. - /// - /*--cef()--*/ - virtual int GetGroupId(int command_id) =0; - - /// - // Returns the group id at the specified |index| or -1 if invalid. - /// - /*--cef()--*/ - virtual int GetGroupIdAt(int index) =0; - - /// - // Sets the group id for the specified |command_id|. Returns true on success. - /// - /*--cef()--*/ - virtual bool SetGroupId(int command_id, int group_id) =0; - - /// - // Sets the group id at the specified |index|. Returns true on success. - /// - /*--cef()--*/ - virtual bool SetGroupIdAt(int index, int group_id) =0; - - /// - // Returns the submenu for the specified |command_id| or empty if invalid. - /// - /*--cef()--*/ - virtual CefRefPtr GetSubMenu(int command_id) =0; - - /// - // Returns the submenu at the specified |index| or empty if invalid. - /// - /*--cef()--*/ - virtual CefRefPtr GetSubMenuAt(int index) =0; - - /// - // Returns true if the specified |command_id| is visible. - /// - /*--cef()--*/ - virtual bool IsVisible(int command_id) =0; - - /// - // Returns true if the specified |index| is visible. - /// - /*--cef()--*/ - virtual bool IsVisibleAt(int index) =0; - - /// - // Change the visibility of the specified |command_id|. Returns true on - // success. - /// - /*--cef()--*/ - virtual bool SetVisible(int command_id, bool visible) =0; - - /// - // Change the visibility at the specified |index|. Returns true on success. - /// - /*--cef()--*/ - virtual bool SetVisibleAt(int index, bool visible) =0; - - /// - // Returns true if the specified |command_id| is enabled. - /// - /*--cef()--*/ - virtual bool IsEnabled(int command_id) =0; - - /// - // Returns true if the specified |index| is enabled. - /// - /*--cef()--*/ - virtual bool IsEnabledAt(int index) =0; - - /// - // Change the enabled status of the specified |command_id|. Returns true on - // success. - /// - /*--cef()--*/ - virtual bool SetEnabled(int command_id, bool enabled) =0; - - /// - // Change the enabled status at the specified |index|. Returns true on - // success. - /// - /*--cef()--*/ - virtual bool SetEnabledAt(int index, bool enabled) =0; - - /// - // Returns true if the specified |command_id| is checked. Only applies to - // check and radio items. - /// - /*--cef()--*/ - virtual bool IsChecked(int command_id) =0; - - /// - // Returns true if the specified |index| is checked. Only applies to check - // and radio items. - /// - /*--cef()--*/ - virtual bool IsCheckedAt(int index) =0; - - /// - // Check the specified |command_id|. Only applies to check and radio items. - // Returns true on success. - /// - /*--cef()--*/ - virtual bool SetChecked(int command_id, bool checked) =0; - - /// - // Check the specified |index|. Only applies to check and radio items. Returns - // true on success. - /// - /*--cef()--*/ - virtual bool SetCheckedAt(int index, bool checked) =0; - - /// - // Returns true if the specified |command_id| has a keyboard accelerator - // assigned. - /// - /*--cef()--*/ - virtual bool HasAccelerator(int command_id) =0; - - /// - // Returns true if the specified |index| has a keyboard accelerator assigned. - /// - /*--cef()--*/ - virtual bool HasAcceleratorAt(int index) =0; - - /// - // Set the keyboard accelerator for the specified |command_id|. |key_code| can - // be any virtual key or character value. Returns true on success. - /// - /*--cef()--*/ - virtual bool SetAccelerator(int command_id, - int key_code, - bool shift_pressed, - bool ctrl_pressed, - bool alt_pressed) =0; - - /// - // Set the keyboard accelerator at the specified |index|. |key_code| can be - // any virtual key or character value. Returns true on success. - /// - /*--cef()--*/ - virtual bool SetAcceleratorAt(int index, - int key_code, - bool shift_pressed, - bool ctrl_pressed, - bool alt_pressed) =0; - - /// - // Remove the keyboard accelerator for the specified |command_id|. Returns - // true on success. - /// - /*--cef()--*/ - virtual bool RemoveAccelerator(int command_id) =0; - - /// - // Remove the keyboard accelerator at the specified |index|. Returns true on - // success. - /// - /*--cef()--*/ - virtual bool RemoveAcceleratorAt(int index) =0; - - /// - // Retrieves the keyboard accelerator for the specified |command_id|. Returns - // true on success. - /// - /*--cef()--*/ - virtual bool GetAccelerator(int command_id, - int& key_code, - bool& shift_pressed, - bool& ctrl_pressed, - bool& alt_pressed) =0; - - /// - // Retrieves the keyboard accelerator for the specified |index|. Returns true - // on success. - /// - /*--cef()--*/ - virtual bool GetAcceleratorAt(int index, - int& key_code, - bool& shift_pressed, - bool& ctrl_pressed, - bool& alt_pressed) =0; -}; - -#endif // CEF_INCLUDE_CEF_MENU_MODEL_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_navigation_entry.h b/tool_kits/cef/cef_wrapper/include/cef_navigation_entry.h deleted file mode 100644 index 211351f8..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_navigation_entry.h +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) 2014 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_NAVIGATION_ENTRY_H_ -#define CEF_INCLUDE_CEF_NAVIGATION_ENTRY_H_ -#pragma once - -#include "include/cef_base.h" - -/// -// Class used to represent an entry in navigation history. -/// -/*--cef(source=library)--*/ -class CefNavigationEntry : public virtual CefBase { - public: - typedef cef_transition_type_t TransitionType; - - /// - // Returns true if this object is valid. Do not call any other methods if this - // function returns false. - /// - /*--cef()--*/ - virtual bool IsValid() =0; - - /// - // Returns the actual URL of the page. For some pages this may be data: URL or - // similar. Use GetDisplayURL() to return a display-friendly version. - /// - /*--cef()--*/ - virtual CefString GetURL() =0; - - /// - // Returns a display-friendly version of the URL. - /// - /*--cef()--*/ - virtual CefString GetDisplayURL() =0; - - /// - // Returns the original URL that was entered by the user before any redirects. - /// - /*--cef()--*/ - virtual CefString GetOriginalURL() =0; - - /// - // Returns the title set by the page. This value may be empty. - /// - /*--cef()--*/ - virtual CefString GetTitle() =0; - - /// - // Returns the transition type which indicates what the user did to move to - // this page from the previous page. - /// - /*--cef(default_retval=TT_EXPLICIT)--*/ - virtual TransitionType GetTransitionType() =0; - - /// - // Returns true if this navigation includes post data. - /// - /*--cef()--*/ - virtual bool HasPostData() =0; - - /// - // Returns the time for the last known successful navigation completion. A - // navigation may be completed more than once if the page is reloaded. May be - // 0 if the navigation has not yet completed. - /// - /*--cef()--*/ - virtual CefTime GetCompletionTime() =0; - - /// - // Returns the HTTP status code for the last known successful navigation - // response. May be 0 if the response has not yet been received or if the - // navigation has not yet completed. - /// - /*--cef()--*/ - virtual int GetHttpStatusCode() =0; -}; - -#endif // CEF_INCLUDE_CEF_NAVIGATION_ENTRY_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_origin_whitelist.h b/tool_kits/cef/cef_wrapper/include/cef_origin_whitelist.h deleted file mode 100644 index 7fed3453..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_origin_whitelist.h +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_ORIGIN_WHITELIST_H_ -#define CEF_INCLUDE_CEF_ORIGIN_WHITELIST_H_ -#pragma once - -#include "include/cef_base.h" - - -/// -// Add an entry to the cross-origin access whitelist. -// -// The same-origin policy restricts how scripts hosted from different origins -// (scheme + domain + port) can communicate. By default, scripts can only access -// resources with the same origin. Scripts hosted on the HTTP and HTTPS schemes -// (but no other schemes) can use the "Access-Control-Allow-Origin" header to -// allow cross-origin requests. For example, https://source.example.com can make -// XMLHttpRequest requests on http://target.example.com if the -// http://target.example.com request returns an "Access-Control-Allow-Origin: -// https://source.example.com" response header. -// -// Scripts in separate frames or iframes and hosted from the same protocol and -// domain suffix can execute cross-origin JavaScript if both pages set the -// document.domain value to the same domain suffix. For example, -// scheme://foo.example.com and scheme://bar.example.com can communicate using -// JavaScript if both domains set document.domain="example.com". -// -// This method is used to allow access to origins that would otherwise violate -// the same-origin policy. Scripts hosted underneath the fully qualified -// |source_origin| URL (like http://www.example.com) will be allowed access to -// all resources hosted on the specified |target_protocol| and |target_domain|. -// If |target_domain| is non-empty and |allow_target_subdomains| if false only -// exact domain matches will be allowed. If |target_domain| contains a top- -// level domain component (like "example.com") and |allow_target_subdomains| is -// true sub-domain matches will be allowed. If |target_domain| is empty and -// |allow_target_subdomains| if true all domains and IP addresses will be -// allowed. -// -// This method cannot be used to bypass the restrictions on local or display -// isolated schemes. See the comments on CefRegisterCustomScheme for more -// information. -// -// This function may be called on any thread. Returns false if |source_origin| -// is invalid or the whitelist cannot be accessed. -/// -/*--cef(optional_param=target_domain)--*/ -bool CefAddCrossOriginWhitelistEntry(const CefString& source_origin, - const CefString& target_protocol, - const CefString& target_domain, - bool allow_target_subdomains); - -/// -// Remove an entry from the cross-origin access whitelist. Returns false if -// |source_origin| is invalid or the whitelist cannot be accessed. -/// -/*--cef(optional_param=target_domain)--*/ -bool CefRemoveCrossOriginWhitelistEntry(const CefString& source_origin, - const CefString& target_protocol, - const CefString& target_domain, - bool allow_target_subdomains); - -/// -// Remove all entries from the cross-origin access whitelist. Returns false if -// the whitelist cannot be accessed. -/// -/*--cef()--*/ -bool CefClearCrossOriginWhitelist(); - -#endif // CEF_INCLUDE_CEF_ORIGIN_WHITELIST_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_pack_resources.h b/tool_kits/cef/cef_wrapper/include/cef_pack_resources.h deleted file mode 100644 index b514675a..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_pack_resources.h +++ /dev/null @@ -1,1646 +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 is generated by the make_pack_header.py tool. -// - -#ifndef CEF_INCLUDE_CEF_PACK_RESOURCES_H_ -#define CEF_INCLUDE_CEF_PACK_RESOURCES_H_ -#pragma once - -// --------------------------------------------------------------------------- -// From blink_resources.h: - -#define IDR_UASTYLE_HTML_CSS 30370 -#define IDR_UASTYLE_QUIRKS_CSS 30371 -#define IDR_UASTYLE_VIEW_SOURCE_CSS 30372 -#define IDR_UASTYLE_THEME_CHROMIUM_ANDROID_CSS 30373 -#define IDR_UASTYLE_MEDIA_CONTROLS_ANDROID_CSS 30374 -#define IDR_UASTYLE_MEDIA_CONTROLS_ANDROID_NEW_CSS 30375 -#define IDR_UASTYLE_THEME_CHROMIUM_LINUX_CSS 30376 -#define IDR_UASTYLE_THEME_MAC_CSS 30377 -#define IDR_UASTYLE_THEME_INPUT_MULTIPLE_FIELDS_CSS 30378 -#define IDR_UASTYLE_THEME_WIN_CSS 30379 -#define IDR_UASTYLE_THEME_WIN_QUIRKS_CSS 30380 -#define IDR_UASTYLE_SVG_CSS 30381 -#define IDR_UASTYLE_MATHML_CSS 30382 -#define IDR_UASTYLE_MEDIA_CONTROLS_CSS 30383 -#define IDR_UASTYLE_MEDIA_CONTROLS_NEW_CSS 30384 -#define IDR_UASTYLE_FULLSCREEN_CSS 30385 -#define IDR_UASTYLE_XHTMLMP_CSS 30386 -#define IDR_UASTYLE_VIEWPORT_ANDROID_CSS 30387 -#define IDR_INSPECTOR_OVERLAY_PAGE_HTML 30388 -#define IDR_INSPECTOR_INJECTED_SCRIPT_SOURCE_JS 30389 -#define IDR_INSPECTOR_DEBUGGER_SCRIPT_SOURCE_JS 30390 -#define IDR_PRIVATE_SCRIPT_DOCUMENTEXECCOMMAND_JS 30391 -#define IDR_PRIVATE_SCRIPT_DOCUMENTXMLTREEVIEWER_CSS 30392 -#define IDR_PRIVATE_SCRIPT_DOCUMENTXMLTREEVIEWER_JS 30393 -#define IDR_PRIVATE_SCRIPT_HTMLMARQUEEELEMENT_JS 30394 -#define IDR_PRIVATE_SCRIPT_PRIVATESCRIPTRUNNER_JS 30395 -#define IDR_PICKER_COMMON_JS 30396 -#define IDR_PICKER_COMMON_CSS 30397 -#define IDR_CALENDAR_PICKER_CSS 30398 -#define IDR_CALENDAR_PICKER_JS 30399 -#define IDR_PICKER_BUTTON_CSS 30400 -#define IDR_SUGGESTION_PICKER_CSS 30401 -#define IDR_SUGGESTION_PICKER_JS 30402 -#define IDR_COLOR_SUGGESTION_PICKER_CSS 30403 -#define IDR_COLOR_SUGGESTION_PICKER_JS 30404 -#define IDR_LIST_PICKER_CSS 30405 -#define IDR_LIST_PICKER_JS 30406 -#define IDR_AUDIO_SPATIALIZATION_COMPOSITE 30407 -#define IDR_AUDIO_SPATIALIZATION_T000_P000 30408 -#define IDR_AUDIO_SPATIALIZATION_T000_P015 30409 -#define IDR_AUDIO_SPATIALIZATION_T000_P030 30410 -#define IDR_AUDIO_SPATIALIZATION_T000_P045 30411 -#define IDR_AUDIO_SPATIALIZATION_T000_P060 30412 -#define IDR_AUDIO_SPATIALIZATION_T000_P075 30413 -#define IDR_AUDIO_SPATIALIZATION_T000_P090 30414 -#define IDR_AUDIO_SPATIALIZATION_T000_P315 30415 -#define IDR_AUDIO_SPATIALIZATION_T000_P330 30416 -#define IDR_AUDIO_SPATIALIZATION_T000_P345 30417 -#define IDR_AUDIO_SPATIALIZATION_T015_P000 30418 -#define IDR_AUDIO_SPATIALIZATION_T015_P015 30419 -#define IDR_AUDIO_SPATIALIZATION_T015_P030 30420 -#define IDR_AUDIO_SPATIALIZATION_T015_P045 30421 -#define IDR_AUDIO_SPATIALIZATION_T015_P060 30422 -#define IDR_AUDIO_SPATIALIZATION_T015_P075 30423 -#define IDR_AUDIO_SPATIALIZATION_T015_P090 30424 -#define IDR_AUDIO_SPATIALIZATION_T015_P315 30425 -#define IDR_AUDIO_SPATIALIZATION_T015_P330 30426 -#define IDR_AUDIO_SPATIALIZATION_T015_P345 30427 -#define IDR_AUDIO_SPATIALIZATION_T030_P000 30428 -#define IDR_AUDIO_SPATIALIZATION_T030_P015 30429 -#define IDR_AUDIO_SPATIALIZATION_T030_P030 30430 -#define IDR_AUDIO_SPATIALIZATION_T030_P045 30431 -#define IDR_AUDIO_SPATIALIZATION_T030_P060 30432 -#define IDR_AUDIO_SPATIALIZATION_T030_P075 30433 -#define IDR_AUDIO_SPATIALIZATION_T030_P090 30434 -#define IDR_AUDIO_SPATIALIZATION_T030_P315 30435 -#define IDR_AUDIO_SPATIALIZATION_T030_P330 30436 -#define IDR_AUDIO_SPATIALIZATION_T030_P345 30437 -#define IDR_AUDIO_SPATIALIZATION_T045_P000 30438 -#define IDR_AUDIO_SPATIALIZATION_T045_P015 30439 -#define IDR_AUDIO_SPATIALIZATION_T045_P030 30440 -#define IDR_AUDIO_SPATIALIZATION_T045_P045 30441 -#define IDR_AUDIO_SPATIALIZATION_T045_P060 30442 -#define IDR_AUDIO_SPATIALIZATION_T045_P075 30443 -#define IDR_AUDIO_SPATIALIZATION_T045_P090 30444 -#define IDR_AUDIO_SPATIALIZATION_T045_P315 30445 -#define IDR_AUDIO_SPATIALIZATION_T045_P330 30446 -#define IDR_AUDIO_SPATIALIZATION_T045_P345 30447 -#define IDR_AUDIO_SPATIALIZATION_T060_P000 30448 -#define IDR_AUDIO_SPATIALIZATION_T060_P015 30449 -#define IDR_AUDIO_SPATIALIZATION_T060_P030 30450 -#define IDR_AUDIO_SPATIALIZATION_T060_P045 30451 -#define IDR_AUDIO_SPATIALIZATION_T060_P060 30452 -#define IDR_AUDIO_SPATIALIZATION_T060_P075 30453 -#define IDR_AUDIO_SPATIALIZATION_T060_P090 30454 -#define IDR_AUDIO_SPATIALIZATION_T060_P315 30455 -#define IDR_AUDIO_SPATIALIZATION_T060_P330 30456 -#define IDR_AUDIO_SPATIALIZATION_T060_P345 30457 -#define IDR_AUDIO_SPATIALIZATION_T075_P000 30458 -#define IDR_AUDIO_SPATIALIZATION_T075_P015 30459 -#define IDR_AUDIO_SPATIALIZATION_T075_P030 30460 -#define IDR_AUDIO_SPATIALIZATION_T075_P045 30461 -#define IDR_AUDIO_SPATIALIZATION_T075_P060 30462 -#define IDR_AUDIO_SPATIALIZATION_T075_P075 30463 -#define IDR_AUDIO_SPATIALIZATION_T075_P090 30464 -#define IDR_AUDIO_SPATIALIZATION_T075_P315 30465 -#define IDR_AUDIO_SPATIALIZATION_T075_P330 30466 -#define IDR_AUDIO_SPATIALIZATION_T075_P345 30467 -#define IDR_AUDIO_SPATIALIZATION_T090_P000 30468 -#define IDR_AUDIO_SPATIALIZATION_T090_P015 30469 -#define IDR_AUDIO_SPATIALIZATION_T090_P030 30470 -#define IDR_AUDIO_SPATIALIZATION_T090_P045 30471 -#define IDR_AUDIO_SPATIALIZATION_T090_P060 30472 -#define IDR_AUDIO_SPATIALIZATION_T090_P075 30473 -#define IDR_AUDIO_SPATIALIZATION_T090_P090 30474 -#define IDR_AUDIO_SPATIALIZATION_T090_P315 30475 -#define IDR_AUDIO_SPATIALIZATION_T090_P330 30476 -#define IDR_AUDIO_SPATIALIZATION_T090_P345 30477 -#define IDR_AUDIO_SPATIALIZATION_T105_P000 30478 -#define IDR_AUDIO_SPATIALIZATION_T105_P015 30479 -#define IDR_AUDIO_SPATIALIZATION_T105_P030 30480 -#define IDR_AUDIO_SPATIALIZATION_T105_P045 30481 -#define IDR_AUDIO_SPATIALIZATION_T105_P060 30482 -#define IDR_AUDIO_SPATIALIZATION_T105_P075 30483 -#define IDR_AUDIO_SPATIALIZATION_T105_P090 30484 -#define IDR_AUDIO_SPATIALIZATION_T105_P315 30485 -#define IDR_AUDIO_SPATIALIZATION_T105_P330 30486 -#define IDR_AUDIO_SPATIALIZATION_T105_P345 30487 -#define IDR_AUDIO_SPATIALIZATION_T120_P000 30488 -#define IDR_AUDIO_SPATIALIZATION_T120_P015 30489 -#define IDR_AUDIO_SPATIALIZATION_T120_P030 30490 -#define IDR_AUDIO_SPATIALIZATION_T120_P045 30491 -#define IDR_AUDIO_SPATIALIZATION_T120_P060 30492 -#define IDR_AUDIO_SPATIALIZATION_T120_P075 30493 -#define IDR_AUDIO_SPATIALIZATION_T120_P090 30494 -#define IDR_AUDIO_SPATIALIZATION_T120_P315 30495 -#define IDR_AUDIO_SPATIALIZATION_T120_P330 30496 -#define IDR_AUDIO_SPATIALIZATION_T120_P345 30497 -#define IDR_AUDIO_SPATIALIZATION_T135_P000 30498 -#define IDR_AUDIO_SPATIALIZATION_T135_P015 30499 -#define IDR_AUDIO_SPATIALIZATION_T135_P030 30500 -#define IDR_AUDIO_SPATIALIZATION_T135_P045 30501 -#define IDR_AUDIO_SPATIALIZATION_T135_P060 30502 -#define IDR_AUDIO_SPATIALIZATION_T135_P075 30503 -#define IDR_AUDIO_SPATIALIZATION_T135_P090 30504 -#define IDR_AUDIO_SPATIALIZATION_T135_P315 30505 -#define IDR_AUDIO_SPATIALIZATION_T135_P330 30506 -#define IDR_AUDIO_SPATIALIZATION_T135_P345 30507 -#define IDR_AUDIO_SPATIALIZATION_T150_P000 30508 -#define IDR_AUDIO_SPATIALIZATION_T150_P015 30509 -#define IDR_AUDIO_SPATIALIZATION_T150_P030 30510 -#define IDR_AUDIO_SPATIALIZATION_T150_P045 30511 -#define IDR_AUDIO_SPATIALIZATION_T150_P060 30512 -#define IDR_AUDIO_SPATIALIZATION_T150_P075 30513 -#define IDR_AUDIO_SPATIALIZATION_T150_P090 30514 -#define IDR_AUDIO_SPATIALIZATION_T150_P315 30515 -#define IDR_AUDIO_SPATIALIZATION_T150_P330 30516 -#define IDR_AUDIO_SPATIALIZATION_T150_P345 30517 -#define IDR_AUDIO_SPATIALIZATION_T165_P000 30518 -#define IDR_AUDIO_SPATIALIZATION_T165_P015 30519 -#define IDR_AUDIO_SPATIALIZATION_T165_P030 30520 -#define IDR_AUDIO_SPATIALIZATION_T165_P045 30521 -#define IDR_AUDIO_SPATIALIZATION_T165_P060 30522 -#define IDR_AUDIO_SPATIALIZATION_T165_P075 30523 -#define IDR_AUDIO_SPATIALIZATION_T165_P090 30524 -#define IDR_AUDIO_SPATIALIZATION_T165_P315 30525 -#define IDR_AUDIO_SPATIALIZATION_T165_P330 30526 -#define IDR_AUDIO_SPATIALIZATION_T165_P345 30527 -#define IDR_AUDIO_SPATIALIZATION_T180_P000 30528 -#define IDR_AUDIO_SPATIALIZATION_T180_P015 30529 -#define IDR_AUDIO_SPATIALIZATION_T180_P030 30530 -#define IDR_AUDIO_SPATIALIZATION_T180_P045 30531 -#define IDR_AUDIO_SPATIALIZATION_T180_P060 30532 -#define IDR_AUDIO_SPATIALIZATION_T180_P075 30533 -#define IDR_AUDIO_SPATIALIZATION_T180_P090 30534 -#define IDR_AUDIO_SPATIALIZATION_T180_P315 30535 -#define IDR_AUDIO_SPATIALIZATION_T180_P330 30536 -#define IDR_AUDIO_SPATIALIZATION_T180_P345 30537 -#define IDR_AUDIO_SPATIALIZATION_T195_P000 30538 -#define IDR_AUDIO_SPATIALIZATION_T195_P015 30539 -#define IDR_AUDIO_SPATIALIZATION_T195_P030 30540 -#define IDR_AUDIO_SPATIALIZATION_T195_P045 30541 -#define IDR_AUDIO_SPATIALIZATION_T195_P060 30542 -#define IDR_AUDIO_SPATIALIZATION_T195_P075 30543 -#define IDR_AUDIO_SPATIALIZATION_T195_P090 30544 -#define IDR_AUDIO_SPATIALIZATION_T195_P315 30545 -#define IDR_AUDIO_SPATIALIZATION_T195_P330 30546 -#define IDR_AUDIO_SPATIALIZATION_T195_P345 30547 -#define IDR_AUDIO_SPATIALIZATION_T210_P000 30548 -#define IDR_AUDIO_SPATIALIZATION_T210_P015 30549 -#define IDR_AUDIO_SPATIALIZATION_T210_P030 30550 -#define IDR_AUDIO_SPATIALIZATION_T210_P045 30551 -#define IDR_AUDIO_SPATIALIZATION_T210_P060 30552 -#define IDR_AUDIO_SPATIALIZATION_T210_P075 30553 -#define IDR_AUDIO_SPATIALIZATION_T210_P090 30554 -#define IDR_AUDIO_SPATIALIZATION_T210_P315 30555 -#define IDR_AUDIO_SPATIALIZATION_T210_P330 30556 -#define IDR_AUDIO_SPATIALIZATION_T210_P345 30557 -#define IDR_AUDIO_SPATIALIZATION_T225_P000 30558 -#define IDR_AUDIO_SPATIALIZATION_T225_P015 30559 -#define IDR_AUDIO_SPATIALIZATION_T225_P030 30560 -#define IDR_AUDIO_SPATIALIZATION_T225_P045 30561 -#define IDR_AUDIO_SPATIALIZATION_T225_P060 30562 -#define IDR_AUDIO_SPATIALIZATION_T225_P075 30563 -#define IDR_AUDIO_SPATIALIZATION_T225_P090 30564 -#define IDR_AUDIO_SPATIALIZATION_T225_P315 30565 -#define IDR_AUDIO_SPATIALIZATION_T225_P330 30566 -#define IDR_AUDIO_SPATIALIZATION_T225_P345 30567 -#define IDR_AUDIO_SPATIALIZATION_T240_P000 30568 -#define IDR_AUDIO_SPATIALIZATION_T240_P015 30569 -#define IDR_AUDIO_SPATIALIZATION_T240_P030 30570 -#define IDR_AUDIO_SPATIALIZATION_T240_P045 30571 -#define IDR_AUDIO_SPATIALIZATION_T240_P060 30572 -#define IDR_AUDIO_SPATIALIZATION_T240_P075 30573 -#define IDR_AUDIO_SPATIALIZATION_T240_P090 30574 -#define IDR_AUDIO_SPATIALIZATION_T240_P315 30575 -#define IDR_AUDIO_SPATIALIZATION_T240_P330 30576 -#define IDR_AUDIO_SPATIALIZATION_T240_P345 30577 -#define IDR_AUDIO_SPATIALIZATION_T255_P000 30578 -#define IDR_AUDIO_SPATIALIZATION_T255_P015 30579 -#define IDR_AUDIO_SPATIALIZATION_T255_P030 30580 -#define IDR_AUDIO_SPATIALIZATION_T255_P045 30581 -#define IDR_AUDIO_SPATIALIZATION_T255_P060 30582 -#define IDR_AUDIO_SPATIALIZATION_T255_P075 30583 -#define IDR_AUDIO_SPATIALIZATION_T255_P090 30584 -#define IDR_AUDIO_SPATIALIZATION_T255_P315 30585 -#define IDR_AUDIO_SPATIALIZATION_T255_P330 30586 -#define IDR_AUDIO_SPATIALIZATION_T255_P345 30587 -#define IDR_AUDIO_SPATIALIZATION_T270_P000 30588 -#define IDR_AUDIO_SPATIALIZATION_T270_P015 30589 -#define IDR_AUDIO_SPATIALIZATION_T270_P030 30590 -#define IDR_AUDIO_SPATIALIZATION_T270_P045 30591 -#define IDR_AUDIO_SPATIALIZATION_T270_P060 30592 -#define IDR_AUDIO_SPATIALIZATION_T270_P075 30593 -#define IDR_AUDIO_SPATIALIZATION_T270_P090 30594 -#define IDR_AUDIO_SPATIALIZATION_T270_P315 30595 -#define IDR_AUDIO_SPATIALIZATION_T270_P330 30596 -#define IDR_AUDIO_SPATIALIZATION_T270_P345 30597 -#define IDR_AUDIO_SPATIALIZATION_T285_P000 30598 -#define IDR_AUDIO_SPATIALIZATION_T285_P015 30599 -#define IDR_AUDIO_SPATIALIZATION_T285_P030 30600 -#define IDR_AUDIO_SPATIALIZATION_T285_P045 30601 -#define IDR_AUDIO_SPATIALIZATION_T285_P060 30602 -#define IDR_AUDIO_SPATIALIZATION_T285_P075 30603 -#define IDR_AUDIO_SPATIALIZATION_T285_P090 30604 -#define IDR_AUDIO_SPATIALIZATION_T285_P315 30605 -#define IDR_AUDIO_SPATIALIZATION_T285_P330 30606 -#define IDR_AUDIO_SPATIALIZATION_T285_P345 30607 -#define IDR_AUDIO_SPATIALIZATION_T300_P000 30608 -#define IDR_AUDIO_SPATIALIZATION_T300_P015 30609 -#define IDR_AUDIO_SPATIALIZATION_T300_P030 30610 -#define IDR_AUDIO_SPATIALIZATION_T300_P045 30611 -#define IDR_AUDIO_SPATIALIZATION_T300_P060 30612 -#define IDR_AUDIO_SPATIALIZATION_T300_P075 30613 -#define IDR_AUDIO_SPATIALIZATION_T300_P090 30614 -#define IDR_AUDIO_SPATIALIZATION_T300_P315 30615 -#define IDR_AUDIO_SPATIALIZATION_T300_P330 30616 -#define IDR_AUDIO_SPATIALIZATION_T300_P345 30617 -#define IDR_AUDIO_SPATIALIZATION_T315_P000 30618 -#define IDR_AUDIO_SPATIALIZATION_T315_P015 30619 -#define IDR_AUDIO_SPATIALIZATION_T315_P030 30620 -#define IDR_AUDIO_SPATIALIZATION_T315_P045 30621 -#define IDR_AUDIO_SPATIALIZATION_T315_P060 30622 -#define IDR_AUDIO_SPATIALIZATION_T315_P075 30623 -#define IDR_AUDIO_SPATIALIZATION_T315_P090 30624 -#define IDR_AUDIO_SPATIALIZATION_T315_P315 30625 -#define IDR_AUDIO_SPATIALIZATION_T315_P330 30626 -#define IDR_AUDIO_SPATIALIZATION_T315_P345 30627 -#define IDR_AUDIO_SPATIALIZATION_T330_P000 30628 -#define IDR_AUDIO_SPATIALIZATION_T330_P015 30629 -#define IDR_AUDIO_SPATIALIZATION_T330_P030 30630 -#define IDR_AUDIO_SPATIALIZATION_T330_P045 30631 -#define IDR_AUDIO_SPATIALIZATION_T330_P060 30632 -#define IDR_AUDIO_SPATIALIZATION_T330_P075 30633 -#define IDR_AUDIO_SPATIALIZATION_T330_P090 30634 -#define IDR_AUDIO_SPATIALIZATION_T330_P315 30635 -#define IDR_AUDIO_SPATIALIZATION_T330_P330 30636 -#define IDR_AUDIO_SPATIALIZATION_T330_P345 30637 -#define IDR_AUDIO_SPATIALIZATION_T345_P000 30638 -#define IDR_AUDIO_SPATIALIZATION_T345_P015 30639 -#define IDR_AUDIO_SPATIALIZATION_T345_P030 30640 -#define IDR_AUDIO_SPATIALIZATION_T345_P045 30641 -#define IDR_AUDIO_SPATIALIZATION_T345_P060 30642 -#define IDR_AUDIO_SPATIALIZATION_T345_P075 30643 -#define IDR_AUDIO_SPATIALIZATION_T345_P090 30644 -#define IDR_AUDIO_SPATIALIZATION_T345_P315 30645 -#define IDR_AUDIO_SPATIALIZATION_T345_P330 30646 -#define IDR_AUDIO_SPATIALIZATION_T345_P345 30647 - -// --------------------------------------------------------------------------- -// From cef_resources.h: - -#define IDR_CEF_DEVTOOLS_DISCOVERY_PAGE 27500 -#define IDR_CEF_LICENSE_TXT 27501 -#define IDR_CEF_VERSION_HTML 27502 -#define IDR_CEF_EXTENSION_API_FEATURES 27503 -#define IDR_PDF_MANIFEST 27504 -#define IDR_BLOCKED_PLUGIN_HTML 27505 -#define IDR_PLUGIN_POSTER_HTML 27506 -#define IDR_PLUGIN_DB_JSON 27507 - -// --------------------------------------------------------------------------- -// From component_extension_resources.h: - -#define IDR_BOOKMARK_MANAGER_MAIN 1450 -#define IDR_HOTWORD_AUDIO_VERIFICATION_MAIN 1451 -#define IDR_WALLPAPER_MANAGER_MAIN 1452 -#define IDR_FIRST_RUN_DIALOG_MAIN 1453 -#define IDR_NETWORK_SPEECH_SYNTHESIS_JS 1000 -#define IDR_BRAILLE_IME_JS 1001 -#define IDR_BRAILLE_IME_MAIN_JS 1002 -#define IDR_BOOKMARK_MANAGER_BOOKMARK_MANAGER_SEARCH 1003 -#define IDR_BOOKMARK_MANAGER_BOOKMARK_MANAGER_SEARCH_RTL 1004 -#define IDR_BOOKMARK_MANAGER_BOOKMARK_MAIN_JS 1005 -#define IDR_BOOKMARK_MANAGER_BOOKMARK_BMM_LIST_JS 1006 -#define IDR_BOOKMARK_MANAGER_BOOKMARK_BMM_TREE_JS 1007 -#define IDR_BOOKMARK_MANAGER_BOOKMARK_DND_JS 1008 -#define IDR_BOOKMARK_MANAGER_BOOKMARK_BMM_JS 1009 -#define IDR_GAIA_AUTH_MAIN 1010 -#define IDR_GAIA_AUTH_MAIN_JS 1011 -#define IDR_GAIA_AUTH_MAIN_CSS 1012 -#define IDR_GAIA_AUTH_OFFLINE 1013 -#define IDR_GAIA_AUTH_OFFLINE_JS 1014 -#define IDR_GAIA_AUTH_OFFLINE_CSS 1015 -#define IDR_GAIA_AUTH_SUCCESS 1016 -#define IDR_GAIA_AUTH_UTIL_JS 1017 -#define IDR_GAIA_AUTH_BACKGROUND_JS 1018 -#define IDR_GAIA_AUTH_SAML_INJECTED_JS 1019 -#define IDR_GAIA_AUTH_CHANNEL_JS 1020 -#define IDR_HANGOUT_SERVICES_BACKGROUND_HTML 1021 -#define IDR_HANGOUT_SERVICES_THUNK_JS 1022 -#define IDR_HOTWORD_AUDIO_VERIFICATION_BACKGROUND_JS 1023 -#define IDR_HOTWORD_AUDIO_VERIFICATION_MAIN_JS 1024 -#define IDR_HOTWORD_AUDIO_VERIFICATION_FLOW_JS 1025 -#define IDR_START_STEP_HTML 1026 -#define IDR_AUDIO_HISTORY_STEP_HTML 1027 -#define IDR_SPEECH_TRAINING_STEP_HTML 1028 -#define IDR_FINISHED_STEP_HTML 1029 -#define IDR_HOTWORD_AUDIO_VERIFICATION_STYLE_CSS 1030 -#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_CLOSE_1X 1031 -#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_CLOSE_2X 1032 -#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_INTRO_1X 1033 -#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_INTRO_2X 1034 -#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_HEADER_1X 1035 -#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_HEADER_2X 1036 -#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_CHECK_BLUE_1X 1037 -#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_CHECK_BLUE_2X 1038 -#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_CHECK_GRAY_1X 1039 -#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_CHECK_GRAY_2X 1040 -#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_LOADER_1X 1041 -#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_LOADER_2X 1042 -#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_ERROR_1X 1043 -#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_ERROR_2X 1044 -#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_ICON_16 1045 -#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_ICON_48 1046 -#define IDR_HOTWORD_AUDIO_VERIFICATION_IMAGE_ICON_128 1047 -#define IDR_HOTWORD_ALWAYS_ON_MANAGER_JS 1048 -#define IDR_HOTWORD_AUDIO_CLIENT_JS 1049 -#define IDR_HOTWORD_BASE_SESSION_MANAGER_JS 1050 -#define IDR_HOTWORD_CONSTANTS_JS 1051 -#define IDR_HOTWORD_KEEP_ALIVE_JS 1052 -#define IDR_HOTWORD_LAUNCHER_MANAGER_JS 1053 -#define IDR_HOTWORD_LOGGING_JS 1054 -#define IDR_HOTWORD_MANAGER_JS 1055 -#define IDR_HOTWORD_METRICS_JS 1056 -#define IDR_HOTWORD_NACL_MANAGER_JS 1057 -#define IDR_HOTWORD_PAGE_AUDIO_MANAGER_JS 1058 -#define IDR_HOTWORD_STATE_MANAGER_JS 1059 -#define IDR_HOTWORD_TRAINING_MANAGER_JS 1060 -#define IDR_FEEDBACK_DEFAULT_HTML 1061 -#define IDR_FEEDBACK_SYSINFO_HTML 1062 -#define IDR_FEEDBACK_EVENT_HANDLER_JS 1063 -#define IDR_FEEDBACK_FEEDBACK_JS 1064 -#define IDR_FEEDBACK_SYSINFO_JS 1065 -#define IDR_FEEDBACK_TAKE_SCREENSHOT_JS 1066 -#define IDR_FEEDBACK_TOPBAR_HANDLER_JS 1067 -#define IDR_FEEDBACK_FEEDBACK_CSS 1068 -#define IDR_FEEDBACK_ICON_32 1069 -#define IDR_FEEDBACK_ICON_64 1070 -#define IDR_GOOGLE_NOW_BACKGROUND_JS 1071 -#define IDR_GOOGLE_NOW_CARDS_JS 1072 -#define IDR_GOOGLE_NOW_UTILITY_JS 1073 -#define IDR_GOOGLE_NOW_ICON_16 1074 -#define IDR_GOOGLE_NOW_ICON_48 1075 -#define IDR_GOOGLE_NOW_ICON_128 1076 -#define IDR_IDENTITY_API_SCOPE_APPROVAL_BACKGROUND_JS 1077 -#define IDR_IDENTITY_API_SCOPE_APPROVAL_DIALOG_CSS 1078 -#define IDR_IDENTITY_API_SCOPE_APPROVAL_DIALOG 1079 -#define IDR_IDENTITY_API_SCOPE_APPROVAL_DIALOG_JS 1080 -#define IDR_WALLPAPER_MANAGER_CONSTANTS_JS 1081 -#define IDR_WALLPAPER_MANAGER_EVENT_JS 1082 -#define IDR_WALLPAPER_MANAGER_ICON_16 1083 -#define IDR_WALLPAPER_MANAGER_ICON_32 1084 -#define IDR_WALLPAPER_MANAGER_ICON_48 1085 -#define IDR_WALLPAPER_MANAGER_ICON_64 1086 -#define IDR_WALLPAPER_MANAGER_ICON_96 1087 -#define IDR_WALLPAPER_MANAGER_ICON_128 1088 -#define IDR_WALLPAPER_MANAGER_ICON_256 1089 -#define IDR_WALLPAPER_MANAGER_MAIN_JS 1090 -#define IDR_WALLPAPER_MANAGER_UTIL_JS 1091 -#define IDR_FIRST_RUN_DIALOG_BACKGROUND_JS 1092 -#define IDR_FIRST_RUN_DIALOG_MAIN_JS 1093 -#define IDR_FIRST_RUN_DIALOG_ICON_16 1094 -#define IDR_FIRST_RUN_DIALOG_ICON_32 1095 -#define IDR_FIRST_RUN_DIALOG_ICON_48 1096 -#define IDR_FIRST_RUN_DIALOG_ICON_64 1097 -#define IDR_FIRST_RUN_DIALOG_ICON_96 1098 -#define IDR_FIRST_RUN_DIALOG_ICON_128 1099 -#define IDR_FIRST_RUN_DIALOG_ICON_256 1100 -#define IDR_SETTINGS_APP_JS 1101 -#define IDR_PDF_INDEX_CSS 1102 -#define IDR_PDF_INDEX_HTML 1103 -#define IDR_PDF_MAIN_JS 1104 -#define IDR_PDF_PDF_JS 1105 -#define IDR_PDF_UI_MANAGER_JS 1106 -#define IDR_PDF_VIEWPORT_JS 1107 -#define IDR_PDF_OPEN_PDF_PARAMS_PARSER_JS 1108 -#define IDR_PDF_NAVIGATOR_JS 1109 -#define IDR_PDF_VIEWPORT_SCROLLER_JS 1110 -#define IDR_PDF_PDF_SCRIPTING_API_JS 1111 -#define IDR_PDF_ZOOM_MANAGER_JS 1112 -#define IDR_PDF_BROWSER_API_JS 1113 -#define IDR_PDF_CONTENT_SCRIPT_JS 1114 -#define IDR_PDF_SHARED_ICON_STYLE_CSS 1115 -#define IDR_PDF_VIEWER_BOOKMARK_CSS 1116 -#define IDR_PDF_VIEWER_BOOKMARK_HTML 1117 -#define IDR_PDF_VIEWER_BOOKMARK_JS 1118 -#define IDR_PDF_VIEWER_BOOKMARKS_CONTENT_HTML 1119 -#define IDR_PDF_VIEWER_BOOKMARKS_CONTENT_JS 1120 -#define IDR_PDF_VIEWER_ERROR_SCREEN_CSS 1121 -#define IDR_PDF_VIEWER_ERROR_SCREEN_HTML 1122 -#define IDR_PDF_VIEWER_ERROR_SCREEN_JS 1123 -#define IDR_PDF_VIEWER_PAGE_INDICATOR_CSS 1124 -#define IDR_PDF_VIEWER_PAGE_INDICATOR_HTML 1125 -#define IDR_PDF_VIEWER_PAGE_INDICATOR_JS 1126 -#define IDR_PDF_VIEWER_PAGE_SELECTOR_CSS 1127 -#define IDR_PDF_VIEWER_PAGE_SELECTOR_HTML 1128 -#define IDR_PDF_VIEWER_PAGE_SELECTOR_JS 1129 -#define IDR_PDF_VIEWER_PASSWORD_SCREEN_HTML 1130 -#define IDR_PDF_VIEWER_PASSWORD_SCREEN_JS 1131 -#define IDR_PDF_VIEWER_PDF_TOOLBAR_CSS 1132 -#define IDR_PDF_VIEWER_PDF_TOOLBAR_HTML 1133 -#define IDR_PDF_VIEWER_PDF_TOOLBAR_JS 1134 -#define IDR_PDF_VIEWER_TOOLBAR_DROPDOWN_CSS 1135 -#define IDR_PDF_VIEWER_TOOLBAR_DROPDOWN_HTML 1136 -#define IDR_PDF_VIEWER_TOOLBAR_DROPDOWN_JS 1137 -#define IDR_PDF_VIEWER_ZOOM_BUTTON_CSS 1138 -#define IDR_PDF_VIEWER_ZOOM_BUTTON_HTML 1139 -#define IDR_PDF_VIEWER_ZOOM_BUTTON_JS 1140 -#define IDR_PDF_VIEWER_ZOOM_SELECTOR_CSS 1141 -#define IDR_PDF_VIEWER_ZOOM_SELECTOR_HTML 1142 -#define IDR_PDF_VIEWER_ZOOM_SELECTOR_JS 1143 -#define IDR_CRYPTOTOKEN_UTIL_JS 1144 -#define IDR_CRYPTOTOKEN_B64_JS 1145 -#define IDR_CRYPTOTOKEN_CLOSEABLE_JS 1146 -#define IDR_CRYPTOTOKEN_COUNTDOWN_JS 1147 -#define IDR_CRYPTOTOKEN_COUNTDOWNTIMER_JS 1148 -#define IDR_CRYPTOTOKEN_SHA256_JS 1149 -#define IDR_CRYPTOTOKEN_TIMER_JS 1150 -#define IDR_CRYPTOTOKEN_HIDGNUBBYDEVICE_JS 1151 -#define IDR_CRYPTOTOKEN_USBGNUBBYDEVICE_JS 1152 -#define IDR_CRYPTOTOKEN_GNUBBIES_JS 1153 -#define IDR_CRYPTOTOKEN_GNUBBY_JS 1154 -#define IDR_CRYPTOTOKEN_GNUBBY_U2F_JS 1155 -#define IDR_CRYPTOTOKEN_GNUBBYCODETYPES_JS 1156 -#define IDR_CRYPTOTOKEN_GNUBBYFACTORY_JS 1157 -#define IDR_CRYPTOTOKEN_GNUBBYMSGTYPES_JS 1158 -#define IDR_CRYPTOTOKEN_USBGNUBBYFACTORY_JS 1159 -#define IDR_CRYPTOTOKEN_DEVICESTATUSCODES_JS 1160 -#define IDR_CRYPTOTOKEN_ENROLLER_JS 1161 -#define IDR_CRYPTOTOKEN_USBENROLLHANDLER_JS 1162 -#define IDR_CRYPTOTOKEN_REQUESTQUEUE_JS 1163 -#define IDR_CRYPTOTOKEN_SIGNER_JS 1164 -#define IDR_CRYPTOTOKEN_SINGLESIGNER_JS 1165 -#define IDR_CRYPTOTOKEN_MULTIPLESIGNER_JS 1166 -#define IDR_CRYPTOTOKEN_USBSIGNHANDLER_JS 1167 -#define IDR_CRYPTOTOKEN_WEBREQUEST_JS 1168 -#define IDR_CRYPTOTOKEN_APPID_JS 1169 -#define IDR_CRYPTOTOKEN_USBHELPER_JS 1170 -#define IDR_CRYPTOTOKEN_TEXTFETCHER_JS 1171 -#define IDR_CRYPTOTOKEN_REQUESTHELPER_JS 1172 -#define IDR_CRYPTOTOKEN_MESSAGETYPES_JS 1173 -#define IDR_CRYPTOTOKEN_INHERITS_JS 1174 -#define IDR_CRYPTOTOKEN_GNUBBYDEVICE_JS 1175 -#define IDR_CRYPTOTOKEN_GENERICHELPER_JS 1176 -#define IDR_CRYPTOTOKEN_FACTORYREGISTRY_JS 1177 -#define IDR_CRYPTOTOKEN_ERRORCODES_JS 1178 -#define IDR_CRYPTOTOKEN_DEVICEFACTORYREGISTRY_JS 1179 -#define IDR_CRYPTOTOKEN_ORIGINCHECK_JS 1180 -#define IDR_CRYPTOTOKEN_INDIVIDUALATTEST_JS 1181 -#define IDR_CRYPTOTOKEN_GOOGLECORPINDIVIDUALATTEST_JS 1182 -#define IDR_CRYPTOTOKEN_APPROVEDORIGINS_JS 1183 -#define IDR_CRYPTOTOKEN_WEBREQUESTSENDER_JS 1184 -#define IDR_CRYPTOTOKEN_WINDOW_TIMER_JS 1185 -#define IDR_CRYPTOTOKEN_WATCHDOG_JS 1186 -#define IDR_CRYPTOTOKEN_LOGGING_JS 1187 -#define IDR_CRYPTOTOKEN_CRYPTOTOKENAPPROVEDORIGIN_JS 1188 -#define IDR_CRYPTOTOKEN_CRYPTOTOKENORIGINCHECK_JS 1189 -#define IDR_CRYPTOTOKEN_CRYPTOTOKENBACKGROUND_JS 1190 -#define IDR_WHISPERNET_PROXY_BACKGROUND_HTML 1191 -#define IDR_WHISPERNET_PROXY_INIT_JS 1192 -#define IDR_WHISPERNET_PROXY_NACL_JS 1193 -#define IDR_WHISPERNET_PROXY_WRAPPER_JS 1194 -#define IDR_WHISPERNET_PROXY_WHISPERNET_PROXY_PROXY_NMF 1195 -#define IDR_WHISPERNET_PROXY_WHISPERNET_PROXY_PROXY_PEXE 1196 - -// --------------------------------------------------------------------------- -// From content_resources.h: - -#define IDR_ACCESSIBILITY_HTML 24150 -#define IDR_ACCESSIBILITY_CSS 24151 -#define IDR_ACCESSIBILITY_JS 24152 -#define IDR_APPCACHE_INTERNALS_HTML 24153 -#define IDR_APPCACHE_INTERNALS_JS 24154 -#define IDR_APPCACHE_INTERNALS_CSS 24155 -#define IDR_DEVTOOLS_PINCH_CURSOR_ICON 24156 -#define IDR_DEVTOOLS_PINCH_CURSOR_ICON_2X 24157 -#define IDR_DEVTOOLS_TOUCH_CURSOR_ICON 24158 -#define IDR_DEVTOOLS_TOUCH_CURSOR_ICON_2X 24159 -#define IDR_GPU_INTERNALS_HTML 24160 -#define IDR_GPU_INTERNALS_JS 24161 -#define IDR_INDEXED_DB_INTERNALS_HTML 24162 -#define IDR_INDEXED_DB_INTERNALS_JS 24163 -#define IDR_INDEXED_DB_INTERNALS_CSS 24164 -#define IDR_MEDIA_INTERNALS_HTML 24165 -#define IDR_MEDIA_INTERNALS_JS 24166 -#define IDR_NETWORK_ERROR_LISTING_HTML 24167 -#define IDR_NETWORK_ERROR_LISTING_JS 24168 -#define IDR_NETWORK_ERROR_LISTING_CSS 24169 -#define IDR_SERVICE_WORKER_INTERNALS_HTML 24170 -#define IDR_SERVICE_WORKER_INTERNALS_JS 24171 -#define IDR_SERVICE_WORKER_INTERNALS_CSS 24172 -#define IDR_WEBRTC_INTERNALS_HTML 24173 -#define IDR_WEBRTC_INTERNALS_JS 24174 -#define IDR_GPU_SANDBOX_PROFILE 24175 -#define IDR_COMMON_SANDBOX_PROFILE 24176 -#define IDR_PPAPI_SANDBOX_PROFILE 24177 -#define IDR_RENDERER_SANDBOX_PROFILE 24178 -#define IDR_UTILITY_SANDBOX_PROFILE 24179 -#define IDR_MOJO_BINDINGS_JS 24180 -#define IDR_MOJO_BUFFER_JS 24181 -#define IDR_MOJO_CODEC_JS 24182 -#define IDR_MOJO_CONNECTION_JS 24183 -#define IDR_MOJO_CONNECTOR_JS 24184 -#define IDR_MOJO_ROUTER_JS 24185 -#define IDR_MOJO_UNICODE_JS 24186 -#define IDR_MOJO_VALIDATOR_JS 24187 - -// --------------------------------------------------------------------------- -// From devtools_resources.h: - -#define INSPECTOR_CSS 21650 -#define INSPECTOR_HTML 21651 -#define INSPECTOR_JS 21652 -#define TOOLBOX_CSS 21653 -#define TOOLBOX_HTML 21654 -#define TOOLBOX_JS 21655 -#define ACCESSIBILITY_MODULE_JS 21656 -#define ANIMATION_MODULE_JS 21657 -#define AUDITS_MODULE_JS 21658 -#define COMPONENTS_LAZY_MODULE_JS 21659 -#define CONSOLE_MODULE_JS 21660 -#define DEVICES_MODULE_JS 21661 -#define DIFF_MODULE_JS 21662 -#define ELEMENTS_MODULE_JS 21663 -#define HEAP_SNAPSHOT_WORKER_MODULE_JS 21664 -#define LAYERS_MODULE_JS 21665 -#define NETWORK_MODULE_JS 21666 -#define PROFILER_MODULE_JS 21667 -#define PROMISES_MODULE_JS 21668 -#define RESOURCES_MODULE_JS 21669 -#define SECURITY_MODULE_JS 21670 -#define SCRIPT_FORMATTER_WORKER_MODULE_JS 21671 -#define SETTINGS_MODULE_JS 21672 -#define SNIPPETS_MODULE_JS 21673 -#define SOURCE_FRAME_MODULE_JS 21674 -#define SOURCES_MODULE_JS 21675 -#define TEMP_STORAGE_SHARED_WORKER_MODULE_JS 21676 -#define TIMELINE_MODULE_JS 21677 -#define UI_LAZY_MODULE_JS 21678 -#define DEVTOOLS_EXTENSION_API_JS 21679 -#define DEVTOOLS_JS 21680 -#define IMAGES_APPLICATIONCACHE_PNG 21681 -#define IMAGES_BREAKPOINT_PNG 21682 -#define IMAGES_BREAKPOINTCONDITIONAL_PNG 21683 -#define IMAGES_BREAKPOINTCONDITIONAL_2X_PNG 21684 -#define IMAGES_BREAKPOINT_2X_PNG 21685 -#define IMAGES_CHECKER_PNG 21686 -#define IMAGES_CHROMEDISABLEDSELECT_PNG 21687 -#define IMAGES_CHROMEDISABLEDSELECT_2X_PNG 21688 -#define IMAGES_CHROMELEFT_PNG 21689 -#define IMAGES_CHROMEMIDDLE_PNG 21690 -#define IMAGES_CHROMERIGHT_PNG 21691 -#define IMAGES_CHROMESELECT_PNG 21692 -#define IMAGES_CHROMESELECT_2X_PNG 21693 -#define IMAGES_COOKIE_PNG 21694 -#define IMAGES_DATABASE_PNG 21695 -#define IMAGES_DATABASETABLE_PNG 21696 -#define IMAGES_DELETEICON_PNG 21697 -#define IMAGES_DOMAIN_PNG 21698 -#define IMAGES_ERRORWAVE_PNG 21699 -#define IMAGES_ERRORWAVE_2X_PNG 21700 -#define IMAGES_FILESYSTEM_PNG 21701 -#define IMAGES_FORWARD_PNG 21702 -#define IMAGES_FRAME_PNG 21703 -#define IMAGES_GRAPHLABELCALLOUTLEFT_PNG 21704 -#define IMAGES_GRAPHLABELCALLOUTRIGHT_PNG 21705 -#define IMAGES_IC_INFO_BLACK_18DP_SVG 21706 -#define IMAGES_IC_WARNING_BLACK_18DP_SVG 21707 -#define IMAGES_INDEXEDDB_PNG 21708 -#define IMAGES_INDEXEDDBINDEX_PNG 21709 -#define IMAGES_INDEXEDDBOBJECTSTORE_PNG 21710 -#define IMAGES_LOCALSTORAGE_PNG 21711 -#define IMAGES_NAVIGATIONCONTROLS_PNG 21712 -#define IMAGES_NAVIGATIONCONTROLS_2X_PNG 21713 -#define IMAGES_NOTIFICATIONS_SVG 21714 -#define IMAGES_PANEADDBUTTONS_PNG 21715 -#define IMAGES_PANEFILTERBUTTONS_PNG 21716 -#define IMAGES_PANEREFRESHBUTTONS_PNG 21717 -#define IMAGES_POPOVERARROWS_PNG 21718 -#define IMAGES_PROFILEGROUPICON_PNG 21719 -#define IMAGES_PROFILEICON_PNG 21720 -#define IMAGES_PROFILESMALLICON_PNG 21721 -#define IMAGES_RADIODOT_PNG 21722 -#define IMAGES_RESIZEDIAGONAL_PNG 21723 -#define IMAGES_RESIZEDIAGONAL_2X_PNG 21724 -#define IMAGES_RESIZEHORIZONTAL_PNG 21725 -#define IMAGES_RESIZEHORIZONTAL_2X_PNG 21726 -#define IMAGES_RESIZEVERTICAL_PNG 21727 -#define IMAGES_RESIZEVERTICAL_2X_PNG 21728 -#define IMAGES_RESOURCECSSICON_PNG 21729 -#define IMAGES_RESOURCEDOCUMENTICON_PNG 21730 -#define IMAGES_RESOURCEDOCUMENTICONSMALL_PNG 21731 -#define IMAGES_RESOURCEJSICON_PNG 21732 -#define IMAGES_RESOURCEPLAINICON_PNG 21733 -#define IMAGES_RESOURCEPLAINICONSMALL_PNG 21734 -#define IMAGES_RESOURCESTIMEGRAPHICON_PNG 21735 -#define IMAGES_RESPONSIVEDESIGN_PNG 21736 -#define IMAGES_RESPONSIVEDESIGN_2X_PNG 21737 -#define IMAGES_SEARCHNEXT_PNG 21738 -#define IMAGES_SEARCHPREV_PNG 21739 -#define IMAGES_SECURITYPROPERTYINFO_SVG 21740 -#define IMAGES_SECURITYPROPERTYINSECURE_SVG 21741 -#define IMAGES_SECURITYPROPERTYSECURE_SVG 21742 -#define IMAGES_SECURITYPROPERTYUNKNOWN_SVG 21743 -#define IMAGES_SECURITYPROPERTYWARNING_SVG 21744 -#define IMAGES_SECURITYSTATEINSECURE_SVG 21745 -#define IMAGES_SECURITYSTATENEUTRAL_SVG 21746 -#define IMAGES_SECURITYSTATESECURE_SVG 21747 -#define IMAGES_SERVICEWORKER_SVG 21748 -#define IMAGES_SESSIONSTORAGE_PNG 21749 -#define IMAGES_SETTINGSLISTREMOVE_PNG 21750 -#define IMAGES_SETTINGSLISTREMOVE_2X_PNG 21751 -#define IMAGES_SPEECH_PNG 21752 -#define IMAGES_TOOLBARBUTTONGLYPHS_PNG 21753 -#define IMAGES_TOOLBARBUTTONGLYPHS_2X_PNG 21754 -#define IMAGES_TOOLBARITEMSELECTED_PNG 21755 -#define IMAGES_TOOLBARRESIZERHORIZONTAL_PNG 21756 -#define IMAGES_TOOLBARRESIZERVERTICAL_PNG 21757 -#define IMAGES_TOUCHCURSOR_PNG 21758 -#define IMAGES_TOUCHCURSOR_2X_PNG 21759 -#define IMAGES_TRANSFORMCONTROLS_PNG 21760 -#define IMAGES_TRANSFORMCONTROLS_2X_PNG 21761 -#define IMAGES_UPDATESERVICEWORKER_SVG 21762 - -// --------------------------------------------------------------------------- -// From extensions_browser_resources.h: - -#define IDR_APP_DEFAULT_ICON 25950 -#define IDR_EXTENSION_DEFAULT_ICON 25951 -#define IDR_EXTENSION_ACTION_PLAIN_BACKGROUND 25952 -#define IDR_EXTENSION_ICON_PLAIN_BACKGROUND 25953 - -// --------------------------------------------------------------------------- -// From extensions_renderer_resources.h: - -#define IDR_APP_VIEW_JS 26000 -#define IDR_ASYNC_WAITER_JS 26001 -#define IDR_BROWSER_TEST_ENVIRONMENT_SPECIFIC_BINDINGS_JS 26002 -#define IDR_DATA_RECEIVER_JS 26003 -#define IDR_DATA_SENDER_JS 26004 -#define IDR_DATA_STREAM_MOJOM_JS 26005 -#define IDR_DATA_STREAM_SERIALIZATION_MOJOM_JS 26006 -#define IDR_ENTRY_ID_MANAGER 26007 -#define IDR_EVENT_BINDINGS_JS 26008 -#define IDR_EXTENSION_OPTIONS_JS 26009 -#define IDR_EXTENSION_OPTIONS_ATTRIBUTES_JS 26010 -#define IDR_EXTENSION_OPTIONS_CONSTANTS_JS 26011 -#define IDR_EXTENSION_OPTIONS_EVENTS_JS 26012 -#define IDR_EXTENSION_VIEW_JS 26013 -#define IDR_EXTENSION_VIEW_API_METHODS_JS 26014 -#define IDR_EXTENSION_VIEW_ATTRIBUTES_JS 26015 -#define IDR_EXTENSION_VIEW_CONSTANTS_JS 26016 -#define IDR_EXTENSION_VIEW_EVENTS_JS 26017 -#define IDR_EXTENSION_VIEW_INTERNAL_CUSTOM_BINDINGS_JS 26018 -#define IDR_GUEST_VIEW_ATTRIBUTES_JS 26019 -#define IDR_GUEST_VIEW_CONTAINER_JS 26020 -#define IDR_GUEST_VIEW_DENY_JS 26021 -#define IDR_GUEST_VIEW_EVENTS_JS 26022 -#define IDR_GUEST_VIEW_IFRAME_CONTAINER_JS 26023 -#define IDR_GUEST_VIEW_IFRAME_JS 26024 -#define IDR_GUEST_VIEW_JS 26025 -#define IDR_IMAGE_UTIL_JS 26026 -#define IDR_JSON_SCHEMA_JS 26027 -#define IDR_KEEP_ALIVE_JS 26028 -#define IDR_KEEP_ALIVE_MOJOM_JS 26029 -#define IDR_LAST_ERROR_JS 26030 -#define IDR_MESSAGING_JS 26031 -#define IDR_MESSAGING_UTILS_JS 26032 -#define IDR_MIME_HANDLER_PRIVATE_CUSTOM_BINDINGS_JS 26033 -#define IDR_MIME_HANDLER_MOJOM_JS 26034 -#define IDR_SCHEMA_UTILS_JS 26035 -#define IDR_SEND_REQUEST_JS 26036 -#define IDR_SERIAL_CUSTOM_BINDINGS_JS 26037 -#define IDR_SERIAL_MOJOM_JS 26038 -#define IDR_SERIAL_SERIALIZATION_MOJOM_JS 26039 -#define IDR_SERIAL_SERVICE_JS 26040 -#define IDR_SET_ICON_JS 26041 -#define IDR_STASH_CLIENT_JS 26042 -#define IDR_STASH_MOJOM_JS 26043 -#define IDR_TEST_CUSTOM_BINDINGS_JS 26044 -#define IDR_UNCAUGHT_EXCEPTION_HANDLER_JS 26045 -#define IDR_UTILS_JS 26046 -#define IDR_WEB_VIEW_ACTION_REQUESTS_JS 26047 -#define IDR_WEB_VIEW_API_METHODS_JS 26048 -#define IDR_WEB_VIEW_ATTRIBUTES_JS 26049 -#define IDR_WEB_VIEW_CONSTANTS_JS 26050 -#define IDR_WEB_VIEW_EVENTS_JS 26051 -#define IDR_WEB_VIEW_IFRAME_JS 26052 -#define IDR_WEB_VIEW_INTERNAL_CUSTOM_BINDINGS_JS 26053 -#define IDR_WEB_VIEW_JS 26054 -#define IDR_APP_RUNTIME_CUSTOM_BINDINGS_JS 26055 -#define IDR_APP_WINDOW_CUSTOM_BINDINGS_JS 26056 -#define IDR_BINDING_JS 26057 -#define IDR_CONTEXT_MENUS_CUSTOM_BINDINGS_JS 26058 -#define IDR_CONTEXT_MENUS_HANDLERS_JS 26059 -#define IDR_DECLARATIVE_WEBREQUEST_CUSTOM_BINDINGS_JS 26060 -#define IDR_DISPLAY_SOURCE_CUSTOM_BINDINGS_JS 26061 -#define IDR_EXTENSION_CUSTOM_BINDINGS_JS 26062 -#define IDR_GREASEMONKEY_API_JS 26063 -#define IDR_I18N_CUSTOM_BINDINGS_JS 26064 -#define IDR_MOJO_PRIVATE_CUSTOM_BINDINGS_JS 26065 -#define IDR_PERMISSIONS_CUSTOM_BINDINGS_JS 26066 -#define IDR_PRINTER_PROVIDER_CUSTOM_BINDINGS_JS 26067 -#define IDR_RUNTIME_CUSTOM_BINDINGS_JS 26068 -#define IDR_SERVICE_WORKER_BINDINGS_JS 26069 -#define IDR_WEB_REQUEST_CUSTOM_BINDINGS_JS 26070 -#define IDR_WEB_REQUEST_INTERNAL_CUSTOM_BINDINGS_JS 26071 -#define IDR_WINDOW_CONTROLS_JS 26072 -#define IDR_WINDOW_CONTROLS_TEMPLATE_HTML 26073 -#define IDR_WEB_VIEW_REQUEST_CUSTOM_BINDINGS_JS 26074 -#define IDR_STORAGE_AREA_JS 26075 -#define IDR_PLATFORM_APP_CSS 26076 -#define IDR_PLATFORM_APP_JS 26077 -#define IDR_EXTENSION_FONTS_CSS 26078 -#define IDR_MEDIA_ROUTER_MOJOM_JS 26079 -#define IDR_MEDIA_ROUTER_BINDINGS_JS 26080 -#define IDR_EXTENSION_CSS 26100 - -// --------------------------------------------------------------------------- -// From extensions_resources.h: - -#define IDR_EXTENSION_API_FEATURES 25750 -#define IDR_EXTENSION_API_JSON_DECLARATIVE_WEBREQUEST 25751 -#define IDR_EXTENSION_API_JSON_WEB_VIEW_REQUEST 25752 -#define IDR_EXTENSION_MANIFEST_FEATURES 25753 -#define IDR_EXTENSION_PERMISSION_FEATURES 25754 -#define IDR_EXTENSION_BEHAVIOR_FEATURES 25755 - -// --------------------------------------------------------------------------- -// From net_resources.h: - -#define IDR_DIR_HEADER_HTML 4000 - -// --------------------------------------------------------------------------- -// From ui_resources.h: - -#define IDR_AURA_CURSOR_BIG_ALIAS 5500 -#define IDR_AURA_CURSOR_BIG_CELL 5501 -#define IDR_AURA_CURSOR_BIG_COL_RESIZE 5502 -#define IDR_AURA_CURSOR_BIG_CONTEXT_MENU 5503 -#define IDR_AURA_CURSOR_BIG_COPY 5504 -#define IDR_AURA_CURSOR_BIG_CROSSHAIR 5505 -#define IDR_AURA_CURSOR_BIG_EAST_RESIZE 5506 -#define IDR_AURA_CURSOR_BIG_EAST_WEST_RESIZE 5507 -#define IDR_AURA_CURSOR_BIG_HAND 5508 -#define IDR_AURA_CURSOR_BIG_HELP 5509 -#define IDR_AURA_CURSOR_BIG_IBEAM 5510 -#define IDR_AURA_CURSOR_BIG_MOVE 5511 -#define IDR_AURA_CURSOR_BIG_NORTH_EAST_RESIZE 5512 -#define IDR_AURA_CURSOR_BIG_NORTH_EAST_SOUTH_WEST_RESIZE 5513 -#define IDR_AURA_CURSOR_BIG_NORTH_RESIZE 5514 -#define IDR_AURA_CURSOR_BIG_NORTH_SOUTH_RESIZE 5515 -#define IDR_AURA_CURSOR_BIG_NORTH_WEST_RESIZE 5516 -#define IDR_AURA_CURSOR_BIG_NORTH_WEST_SOUTH_EAST_RESIZE 5517 -#define IDR_AURA_CURSOR_BIG_NO_DROP 5518 -#define IDR_AURA_CURSOR_BIG_PTR 5519 -#define IDR_AURA_CURSOR_BIG_ROW_RESIZE 5520 -#define IDR_AURA_CURSOR_BIG_SOUTH_EAST_RESIZE 5521 -#define IDR_AURA_CURSOR_BIG_SOUTH_RESIZE 5522 -#define IDR_AURA_CURSOR_BIG_SOUTH_WEST_RESIZE 5523 -#define IDR_AURA_CURSOR_BIG_WEST_RESIZE 5524 -#define IDR_AURA_CURSOR_BIG_XTERM_HORIZ 5525 -#define IDR_AURA_CURSOR_BIG_ZOOM_IN 5526 -#define IDR_AURA_CURSOR_BIG_ZOOM_OUT 5527 -#define IDR_AURA_CURSOR_BIG_GRAB 5528 -#define IDR_AURA_CURSOR_BIG_GRABBING 5529 -#define IDR_AURA_CURSOR_ALIAS 5530 -#define IDR_AURA_CURSOR_CELL 5531 -#define IDR_AURA_CURSOR_COL_RESIZE 5532 -#define IDR_AURA_CURSOR_CONTEXT_MENU 5533 -#define IDR_AURA_CURSOR_COPY 5534 -#define IDR_AURA_CURSOR_CROSSHAIR 5535 -#define IDR_AURA_CURSOR_EAST_RESIZE 5536 -#define IDR_AURA_CURSOR_EAST_WEST_RESIZE 5537 -#define IDR_AURA_CURSOR_HAND 5538 -#define IDR_AURA_CURSOR_HELP 5539 -#define IDR_AURA_CURSOR_IBEAM 5540 -#define IDR_AURA_CURSOR_MOVE 5541 -#define IDR_AURA_CURSOR_NORTH_EAST_RESIZE 5542 -#define IDR_AURA_CURSOR_NORTH_EAST_SOUTH_WEST_RESIZE 5543 -#define IDR_AURA_CURSOR_NORTH_RESIZE 5544 -#define IDR_AURA_CURSOR_NORTH_SOUTH_RESIZE 5545 -#define IDR_AURA_CURSOR_NORTH_WEST_RESIZE 5546 -#define IDR_AURA_CURSOR_NORTH_WEST_SOUTH_EAST_RESIZE 5547 -#define IDR_AURA_CURSOR_NO_DROP 5548 -#define IDR_AURA_CURSOR_PTR 5549 -#define IDR_AURA_CURSOR_ROW_RESIZE 5550 -#define IDR_AURA_CURSOR_SOUTH_EAST_RESIZE 5551 -#define IDR_AURA_CURSOR_SOUTH_RESIZE 5552 -#define IDR_AURA_CURSOR_SOUTH_WEST_RESIZE 5553 -#define IDR_AURA_CURSOR_THROBBER 5554 -#define IDR_AURA_CURSOR_WEST_RESIZE 5555 -#define IDR_AURA_CURSOR_XTERM_HORIZ 5556 -#define IDR_AURA_CURSOR_ZOOM_IN 5557 -#define IDR_AURA_CURSOR_ZOOM_OUT 5558 -#define IDR_AURA_CURSOR_GRAB 5559 -#define IDR_AURA_CURSOR_GRABBING 5560 -#define IDR_AURA_SHADOW_ACTIVE 5561 -#define IDR_AURA_SHADOW_INACTIVE 5562 -#define IDR_WINDOW_BUBBLE_SHADOW_SMALL 5563 -#define IDR_BACK_ARROW 5564 -#define IDR_FORWARD_ARROW 5565 -#define IDR_BROWSER_ACTION_BADGE_CENTER 5566 -#define IDR_BROWSER_ACTION_BADGE_LEFT 5567 -#define IDR_BROWSER_ACTION_BADGE_RIGHT 5568 -#define IDR_CLOSE_2 5569 -#define IDR_CLOSE_2_H 5570 -#define IDR_CLOSE_2_MASK 5571 -#define IDR_CLOSE_2_P 5572 -#define IDR_CLOSE_3_MASK 5573 -#define IDR_CLOSE_4_BUTTON 5574 -#define IDR_CLOSE_DIALOG 5575 -#define IDR_CLOSE_DIALOG_H 5576 -#define IDR_CLOSE_DIALOG_P 5577 -#define IDR_DISABLE 5578 -#define IDR_DISABLE_H 5579 -#define IDR_DISABLE_P 5580 -#define IDR_DEFAULT_FAVICON 5581 -#define IDR_DEFAULT_FAVICON_32 5582 -#define IDR_DEFAULT_FAVICON_64 5583 -#define IDR_EASY_UNLOCK_HARDLOCKED 5584 -#define IDR_EASY_UNLOCK_HARDLOCKED_HOVER 5585 -#define IDR_EASY_UNLOCK_HARDLOCKED_PRESSED 5586 -#define IDR_EASY_UNLOCK_LOCKED 5587 -#define IDR_EASY_UNLOCK_LOCKED_HOVER 5588 -#define IDR_EASY_UNLOCK_LOCKED_PRESSED 5589 -#define IDR_EASY_UNLOCK_LOCKED_TO_BE_ACTIVATED 5590 -#define IDR_EASY_UNLOCK_LOCKED_TO_BE_ACTIVATED_HOVER 5591 -#define IDR_EASY_UNLOCK_LOCKED_TO_BE_ACTIVATED_PRESSED 5592 -#define IDR_EASY_UNLOCK_LOCKED_WITH_PROXIMITY_HINT 5593 -#define IDR_EASY_UNLOCK_LOCKED_WITH_PROXIMITY_HINT_HOVER 5594 -#define IDR_EASY_UNLOCK_LOCKED_WITH_PROXIMITY_HINT_PRESSED 5595 -#define IDR_EASY_UNLOCK_SPINNER 5596 -#define IDR_EASY_UNLOCK_UNLOCKED 5597 -#define IDR_EASY_UNLOCK_UNLOCKED_HOVER 5598 -#define IDR_EASY_UNLOCK_UNLOCKED_PRESSED 5599 -#define IDR_FOLDER_CLOSED 5600 -#define IDR_FOLDER_CLOSED_RTL 5601 -#define IDR_MENU_CHECK_CHECKED 5602 -#define IDR_MENU_HIERARCHY_ARROW 5603 -#define IDR_MENU_DROPARROW 5604 -#define IDR_MESSAGE_CLOSE 5605 -#define IDR_NOTIFICATION_ARROW 5606 -#define IDR_NOTIFICATION_ARROW_HOVER 5607 -#define IDR_NOTIFICATION_ARROW_PRESSED 5608 -#define IDR_NOTIFICATION_ADVANCED_SETTINGS 5609 -#define IDR_NOTIFICATION_ADVANCED_SETTINGS_HOVER 5610 -#define IDR_NOTIFICATION_ADVANCED_SETTINGS_PRESSED 5611 -#define IDR_NOTIFICATION_CLEAR_ALL 5612 -#define IDR_NOTIFICATION_CLEAR_ALL_DISABLED 5613 -#define IDR_NOTIFICATION_CLEAR_ALL_HOVER 5614 -#define IDR_NOTIFICATION_CLEAR_ALL_PRESSED 5615 -#define IDR_NOTIFICATION_CLOSE 5616 -#define IDR_NOTIFICATION_CLOSE_HOVER 5617 -#define IDR_NOTIFICATION_CLOSE_PRESSED 5618 -#define IDR_NOTIFICATION_BUBBLE_CLOSE 5619 -#define IDR_NOTIFICATION_BUBBLE_CLOSE_HOVER 5620 -#define IDR_NOTIFICATION_BUBBLE_CLOSE_PRESSED 5621 -#define IDR_NOTIFICATION_DO_NOT_DISTURB 5622 -#define IDR_NOTIFICATION_DO_NOT_DISTURB_HOVER 5623 -#define IDR_NOTIFICATION_DO_NOT_DISTURB_PRESSED 5624 -#define IDR_NOTIFICATION_SETTINGS 5625 -#define IDR_NOTIFICATION_SETTINGS_BUTTON_ICON 5626 -#define IDR_NOTIFICATION_SETTINGS_BUTTON_ICON_HOVER 5627 -#define IDR_NOTIFICATION_SETTINGS_BUTTON_ICON_PRESSED 5628 -#define IDR_NOTIFICATION_SETTINGS_HOVER 5629 -#define IDR_NOTIFICATION_SETTINGS_PRESSED 5630 -#define IDR_NTP_DEFAULT_FAVICON 5631 -#define IDR_OOBE_ACTION_BOX_BUTTON_HOVER 5632 -#define IDR_OOBE_ACTION_BOX_BUTTON_NORMAL 5633 -#define IDR_OOBE_ACTION_BOX_BUTTON_PRESSED 5634 -#define IDR_PANEL_TOP_LEFT_CORNER 5635 -#define IDR_PANEL_TOP_RIGHT_CORNER 5636 -#define IDR_PANEL_BOTTOM_LEFT_CORNER 5637 -#define IDR_PANEL_BOTTOM_RIGHT_CORNER 5638 -#define IDR_TEXT_SELECTION_HANDLE_CENTER 5639 -#define IDR_TEXT_SELECTION_HANDLE_LEFT 5640 -#define IDR_TEXT_SELECTION_HANDLE_RIGHT 5641 -#define IDR_THROBBER 5642 -#define IDR_TOUCH_DRAG_TIP_COPY 5643 -#define IDR_TOUCH_DRAG_TIP_MOVE 5644 -#define IDR_TOUCH_DRAG_TIP_LINK 5645 -#define IDR_TOUCH_DRAG_TIP_NODROP 5646 - -// --------------------------------------------------------------------------- -// From views_resources.h: - -#define IDR_APP_TOP_CENTER 5800 -#define IDR_APP_TOP_LEFT 5801 -#define IDR_APP_TOP_RIGHT 5802 -#define IDR_BUBBLE_B 5803 -#define IDR_BUBBLE_BL 5804 -#define IDR_BUBBLE_BR 5805 -#define IDR_BUBBLE_B_ARROW 5806 -#define IDR_BUBBLE_L 5807 -#define IDR_BUBBLE_L_ARROW 5808 -#define IDR_BUBBLE_R 5809 -#define IDR_BUBBLE_R_ARROW 5810 -#define IDR_BUBBLE_T 5811 -#define IDR_BUBBLE_TL 5812 -#define IDR_BUBBLE_TR 5813 -#define IDR_BUBBLE_T_ARROW 5814 -#define IDR_BUTTON_DISABLED 5815 -#define IDR_BUTTON_FOCUSED_HOVER 5816 -#define IDR_BUTTON_FOCUSED_NORMAL 5817 -#define IDR_BUTTON_FOCUSED_PRESSED 5818 -#define IDR_BUTTON_HOVER 5819 -#define IDR_BUTTON_NORMAL 5820 -#define IDR_BUTTON_PRESSED 5821 -#define IDR_BLUE_BUTTON_DISABLED 5822 -#define IDR_BLUE_BUTTON_FOCUSED_HOVER 5823 -#define IDR_BLUE_BUTTON_FOCUSED_NORMAL 5824 -#define IDR_BLUE_BUTTON_FOCUSED_PRESSED 5825 -#define IDR_BLUE_BUTTON_HOVER 5826 -#define IDR_BLUE_BUTTON_NORMAL 5827 -#define IDR_BLUE_BUTTON_PRESSED 5828 -#define IDR_CHECKBOX 5829 -#define IDR_CHECKBOX_CHECKED 5830 -#define IDR_CHECKBOX_CHECKED_DISABLED 5831 -#define IDR_CHECKBOX_CHECKED_HOVER 5832 -#define IDR_CHECKBOX_CHECKED_PRESSED 5833 -#define IDR_CHECKBOX_DISABLED 5834 -#define IDR_CHECKBOX_FOCUSED 5835 -#define IDR_CHECKBOX_FOCUSED_CHECKED 5836 -#define IDR_CHECKBOX_FOCUSED_CHECKED_HOVER 5837 -#define IDR_CHECKBOX_FOCUSED_CHECKED_PRESSED 5838 -#define IDR_CHECKBOX_FOCUSED_HOVER 5839 -#define IDR_CHECKBOX_FOCUSED_PRESSED 5840 -#define IDR_CHECKBOX_HOVER 5841 -#define IDR_CHECKBOX_PRESSED 5842 -#define IDR_CLOSE 5843 -#define IDR_CLOSE_H 5844 -#define IDR_CLOSE_P 5845 -#define IDR_COMBOBOX_BUTTON_BOTTOM 5846 -#define IDR_COMBOBOX_BUTTON_H_BOTTOM 5847 -#define IDR_COMBOBOX_BUTTON_P_BOTTOM 5848 -#define IDR_COMBOBOX_BUTTON_BOTTOM_LEFT 5849 -#define IDR_COMBOBOX_BUTTON_H_BOTTOM_LEFT 5850 -#define IDR_COMBOBOX_BUTTON_P_BOTTOM_LEFT 5851 -#define IDR_COMBOBOX_BUTTON_BOTTOM_RIGHT 5852 -#define IDR_COMBOBOX_BUTTON_H_BOTTOM_RIGHT 5853 -#define IDR_COMBOBOX_BUTTON_P_BOTTOM_RIGHT 5854 -#define IDR_COMBOBOX_BUTTON_CENTER 5855 -#define IDR_COMBOBOX_BUTTON_H_CENTER 5856 -#define IDR_COMBOBOX_BUTTON_P_CENTER 5857 -#define IDR_COMBOBOX_BUTTON_LEFT 5858 -#define IDR_COMBOBOX_BUTTON_H_LEFT 5859 -#define IDR_COMBOBOX_BUTTON_P_LEFT 5860 -#define IDR_COMBOBOX_BUTTON_RIGHT 5861 -#define IDR_COMBOBOX_BUTTON_H_RIGHT 5862 -#define IDR_COMBOBOX_BUTTON_P_RIGHT 5863 -#define IDR_COMBOBOX_BUTTON_MENU_BOTTOM 5864 -#define IDR_COMBOBOX_BUTTON_H_MENU_BOTTOM 5865 -#define IDR_COMBOBOX_BUTTON_P_MENU_BOTTOM 5866 -#define IDR_COMBOBOX_BUTTON_MENU_CENTER 5867 -#define IDR_COMBOBOX_BUTTON_H_MENU_CENTER 5868 -#define IDR_COMBOBOX_BUTTON_P_MENU_CENTER 5869 -#define IDR_COMBOBOX_BUTTON_MENU_TOP 5870 -#define IDR_COMBOBOX_BUTTON_H_MENU_TOP 5871 -#define IDR_COMBOBOX_BUTTON_P_MENU_TOP 5872 -#define IDR_COMBOBOX_BUTTON_TOP 5873 -#define IDR_COMBOBOX_BUTTON_H_TOP 5874 -#define IDR_COMBOBOX_BUTTON_P_TOP 5875 -#define IDR_COMBOBOX_BUTTON_TOP_LEFT 5876 -#define IDR_COMBOBOX_BUTTON_H_TOP_LEFT 5877 -#define IDR_COMBOBOX_BUTTON_P_TOP_LEFT 5878 -#define IDR_COMBOBOX_BUTTON_TOP_RIGHT 5879 -#define IDR_COMBOBOX_BUTTON_H_TOP_RIGHT 5880 -#define IDR_COMBOBOX_BUTTON_P_TOP_RIGHT 5881 -#define IDR_COMBOBOX_BUTTON_F_BOTTOM 5882 -#define IDR_COMBOBOX_BUTTON_F_H_BOTTOM 5883 -#define IDR_COMBOBOX_BUTTON_F_P_BOTTOM 5884 -#define IDR_COMBOBOX_BUTTON_F_BOTTOM_LEFT 5885 -#define IDR_COMBOBOX_BUTTON_F_H_BOTTOM_LEFT 5886 -#define IDR_COMBOBOX_BUTTON_F_P_BOTTOM_LEFT 5887 -#define IDR_COMBOBOX_BUTTON_F_BOTTOM_RIGHT 5888 -#define IDR_COMBOBOX_BUTTON_F_H_BOTTOM_RIGHT 5889 -#define IDR_COMBOBOX_BUTTON_F_P_BOTTOM_RIGHT 5890 -#define IDR_COMBOBOX_BUTTON_F_CENTER 5891 -#define IDR_COMBOBOX_BUTTON_F_H_CENTER 5892 -#define IDR_COMBOBOX_BUTTON_F_P_CENTER 5893 -#define IDR_COMBOBOX_BUTTON_F_LEFT 5894 -#define IDR_COMBOBOX_BUTTON_F_H_LEFT 5895 -#define IDR_COMBOBOX_BUTTON_F_P_LEFT 5896 -#define IDR_COMBOBOX_BUTTON_F_RIGHT 5897 -#define IDR_COMBOBOX_BUTTON_F_H_RIGHT 5898 -#define IDR_COMBOBOX_BUTTON_F_P_RIGHT 5899 -#define IDR_COMBOBOX_BUTTON_F_MENU_BOTTOM 5900 -#define IDR_COMBOBOX_BUTTON_F_H_MENU_BOTTOM 5901 -#define IDR_COMBOBOX_BUTTON_F_P_MENU_BOTTOM 5902 -#define IDR_COMBOBOX_BUTTON_F_MENU_CENTER 5903 -#define IDR_COMBOBOX_BUTTON_F_H_MENU_CENTER 5904 -#define IDR_COMBOBOX_BUTTON_F_P_MENU_CENTER 5905 -#define IDR_COMBOBOX_BUTTON_F_MENU_TOP 5906 -#define IDR_COMBOBOX_BUTTON_F_H_MENU_TOP 5907 -#define IDR_COMBOBOX_BUTTON_F_P_MENU_TOP 5908 -#define IDR_COMBOBOX_BUTTON_F_TOP 5909 -#define IDR_COMBOBOX_BUTTON_F_H_TOP 5910 -#define IDR_COMBOBOX_BUTTON_F_P_TOP 5911 -#define IDR_COMBOBOX_BUTTON_F_TOP_LEFT 5912 -#define IDR_COMBOBOX_BUTTON_F_H_TOP_LEFT 5913 -#define IDR_COMBOBOX_BUTTON_F_P_TOP_LEFT 5914 -#define IDR_COMBOBOX_BUTTON_F_TOP_RIGHT 5915 -#define IDR_COMBOBOX_BUTTON_F_H_TOP_RIGHT 5916 -#define IDR_COMBOBOX_BUTTON_F_P_TOP_RIGHT 5917 -#define IDR_CONTENT_BOTTOM_CENTER 5918 -#define IDR_CONTENT_BOTTOM_LEFT_CORNER 5919 -#define IDR_CONTENT_BOTTOM_RIGHT_CORNER 5920 -#define IDR_CONTENT_LEFT_SIDE 5921 -#define IDR_CONTENT_RIGHT_SIDE 5922 -#define IDR_FOLDER_OPEN 5923 -#define IDR_FOLDER_OPEN_RTL 5924 -#define IDR_FRAME 5925 -#define IDR_FRAME_INACTIVE 5926 -#define IDR_MAXIMIZE 5927 -#define IDR_MAXIMIZE_H 5928 -#define IDR_MAXIMIZE_P 5929 -#define IDR_MENU_CHECK 5930 -#define IDR_MENU_RADIO_EMPTY 5931 -#define IDR_MENU_RADIO_SELECTED 5932 -#define IDR_SLIDER_ACTIVE_LEFT 5933 -#define IDR_SLIDER_ACTIVE_RIGHT 5934 -#define IDR_SLIDER_ACTIVE_CENTER 5935 -#define IDR_SLIDER_DISABLED_LEFT 5936 -#define IDR_SLIDER_DISABLED_RIGHT 5937 -#define IDR_SLIDER_DISABLED_CENTER 5938 -#define IDR_SLIDER_PRESSED_LEFT 5939 -#define IDR_SLIDER_PRESSED_RIGHT 5940 -#define IDR_SLIDER_PRESSED_CENTER 5941 -#define IDR_SLIDER_ACTIVE_THUMB 5942 -#define IDR_SLIDER_DISABLED_THUMB 5943 -#define IDR_MINIMIZE 5944 -#define IDR_MINIMIZE_H 5945 -#define IDR_MINIMIZE_P 5946 -#define IDR_RADIO 5947 -#define IDR_RADIO_CHECKED 5948 -#define IDR_RADIO_CHECKED_DISABLED 5949 -#define IDR_RADIO_CHECKED_HOVER 5950 -#define IDR_RADIO_CHECKED_PRESSED 5951 -#define IDR_RADIO_DISABLED 5952 -#define IDR_RADIO_FOCUSED 5953 -#define IDR_RADIO_FOCUSED_CHECKED 5954 -#define IDR_RADIO_FOCUSED_CHECKED_HOVER 5955 -#define IDR_RADIO_FOCUSED_CHECKED_PRESSED 5956 -#define IDR_RADIO_FOCUSED_HOVER 5957 -#define IDR_RADIO_FOCUSED_PRESSED 5958 -#define IDR_RADIO_HOVER 5959 -#define IDR_RADIO_PRESSED 5960 -#define IDR_RESTORE 5961 -#define IDR_RESTORE_H 5962 -#define IDR_RESTORE_P 5963 -#define IDR_TEXTBUTTON_HOVER_BOTTOM 5964 -#define IDR_TEXTBUTTON_HOVER_BOTTOM_LEFT 5965 -#define IDR_TEXTBUTTON_HOVER_BOTTOM_RIGHT 5966 -#define IDR_TEXTBUTTON_HOVER_CENTER 5967 -#define IDR_TEXTBUTTON_HOVER_LEFT 5968 -#define IDR_TEXTBUTTON_HOVER_RIGHT 5969 -#define IDR_TEXTBUTTON_HOVER_TOP 5970 -#define IDR_TEXTBUTTON_HOVER_TOP_LEFT 5971 -#define IDR_TEXTBUTTON_HOVER_TOP_RIGHT 5972 -#define IDR_TEXTBUTTON_PRESSED_BOTTOM 5973 -#define IDR_TEXTBUTTON_PRESSED_BOTTOM_LEFT 5974 -#define IDR_TEXTBUTTON_PRESSED_BOTTOM_RIGHT 5975 -#define IDR_TEXTBUTTON_PRESSED_CENTER 5976 -#define IDR_TEXTBUTTON_PRESSED_LEFT 5977 -#define IDR_TEXTBUTTON_PRESSED_RIGHT 5978 -#define IDR_TEXTBUTTON_PRESSED_TOP 5979 -#define IDR_TEXTBUTTON_PRESSED_TOP_LEFT 5980 -#define IDR_TEXTBUTTON_PRESSED_TOP_RIGHT 5981 -#define IDR_WINDOW_BOTTOM_CENTER 5982 -#define IDR_WINDOW_BOTTOM_LEFT_CORNER 5983 -#define IDR_WINDOW_BOTTOM_RIGHT_CORNER 5984 -#define IDR_WINDOW_LEFT_SIDE 5985 -#define IDR_WINDOW_RIGHT_SIDE 5986 -#define IDR_WINDOW_TOP_CENTER 5987 -#define IDR_WINDOW_TOP_LEFT_CORNER 5988 -#define IDR_WINDOW_TOP_RIGHT_CORNER 5989 -#define IDR_WINDOW_BUBBLE_SHADOW_BIG_BOTTOM 5990 -#define IDR_WINDOW_BUBBLE_SHADOW_BIG_BOTTOM_LEFT 5991 -#define IDR_WINDOW_BUBBLE_SHADOW_BIG_BOTTOM_RIGHT 5992 -#define IDR_WINDOW_BUBBLE_SHADOW_BIG_LEFT 5993 -#define IDR_WINDOW_BUBBLE_SHADOW_BIG_RIGHT 5994 -#define IDR_WINDOW_BUBBLE_SHADOW_BIG_TOP 5995 -#define IDR_WINDOW_BUBBLE_SHADOW_BIG_TOP_LEFT 5996 -#define IDR_WINDOW_BUBBLE_SHADOW_BIG_TOP_RIGHT 5997 -#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_BIG_BOTTOM 5998 -#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_BIG_LEFT 5999 -#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_BIG_RIGHT 6000 -#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_BIG_TOP 6001 -#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_BOTTOM 6002 -#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_BOTTOM_LEFT 6003 -#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_BOTTOM_RIGHT 6004 -#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_LEFT 6005 -#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_RIGHT 6006 -#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_TOP 6007 -#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_TOP_LEFT 6008 -#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_TOP_RIGHT 6009 -#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_SMALL_BOTTOM 6010 -#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_SMALL_LEFT 6011 -#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_SMALL_RIGHT 6012 -#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_SMALL_TOP 6013 - -// --------------------------------------------------------------------------- -// From webui_resources.h: - -#define IDR_WEBUI_I18N_TEMPLATE_JS 2000 -#define IDR_WEBUI_JSTEMPLATE_JS 2001 -#define IDR_WEBUI_ANALYTICS_JS 2002 -#define IDR_WEBUI_ROBOTO_ROBOTO_LIGHT_WOFF2 2003 -#define IDR_WEBUI_ROBOTO_ROBOTO_REGULAR_WOFF2 2004 -#define IDR_WEBUI_ROBOTO_ROBOTO_MEDIUM_WOFF2 2005 -#define IDR_WEBUI_IMAGES_APPS_BUTTON 2006 -#define IDR_WEBUI_IMAGES_APPS_BUTTON_PRESSED 2007 -#define IDR_WEBUI_IMAGES_APPS_BUTTON_HOVER 2008 -#define IDR_WEBUI_IMAGES_APPS_BUTTON_DISABLED 2009 -#define IDR_WEBUI_IMAGES_APPS_BUTTON_FOCUSED 2010 -#define IDR_WEBUI_IMAGES_APPS_BUTTON_FOCUSED_PRESSED 2011 -#define IDR_WEBUI_IMAGES_APPS_BUTTON_FOCUSED_HOVER 2012 -#define IDR_WEBUI_IMAGES_APPS_BLUE_BUTTON 2013 -#define IDR_WEBUI_IMAGES_APPS_BLUE_BUTTON_PRESSED 2014 -#define IDR_WEBUI_IMAGES_APPS_BLUE_BUTTON_HOVER 2015 -#define IDR_WEBUI_IMAGES_APPS_BLUE_BUTTON_DISABLED 2016 -#define IDR_WEBUI_IMAGES_APPS_BLUE_BUTTON_FOCUSED 2017 -#define IDR_WEBUI_IMAGES_APPS_BLUE_BUTTON_FOCUSED_PRESSED 2018 -#define IDR_WEBUI_IMAGES_APPS_BLUE_BUTTON_FOCUSED_HOVER 2019 -#define IDR_WEBUI_IMAGES_APPS_CHECKBOX 2020 -#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_HOVER 2021 -#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_PRESSED 2022 -#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_FOCUSED 2023 -#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_FOCUSED_HOVER 2024 -#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_FOCUSED_PRESSED 2025 -#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_INACTIVE 2026 -#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_CHECKED 2027 -#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_CHECKED_HOVER 2028 -#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_CHECKED_PRESSED 2029 -#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_FOCUSED_CHECKED 2030 -#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_FOCUSED_CHECKED_HOVER 2031 -#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_FOCUSED_CHECKED_PRESSED 2032 -#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_CHECKED_INACTIVE 2033 -#define IDR_WEBUI_IMAGES_APPS_TOPBAR_BUTTON_CLOSE 2034 -#define IDR_WEBUI_IMAGES_APPS_TOPBAR_BUTTON_MAXIMIZE 2035 -#define IDR_WEBUI_IMAGES_APPS_TOPBAR_BUTTON_MINIMIZE 2036 -#define IDR_WEBUI_IMAGES_APPS_BUTTON_BUTTER_BAR_CLOSE 2037 -#define IDR_WEBUI_IMAGES_APPS_BUTTON_BUTTER_BAR_CLOSE_HOVER 2038 -#define IDR_WEBUI_IMAGES_APPS_BUTTON_BUTTER_BAR_CLOSE_PRESSED 2039 -#define IDR_WEBUI_IMAGES_APPS_BUTTON_2X 2040 -#define IDR_WEBUI_IMAGES_APPS_BUTTON_2X_PRESSED 2041 -#define IDR_WEBUI_IMAGES_APPS_BUTTON_2X_HOVER 2042 -#define IDR_WEBUI_IMAGES_APPS_BUTTON_2X_DISABLED 2043 -#define IDR_WEBUI_IMAGES_APPS_BUTTON_2X_FOCUSED 2044 -#define IDR_WEBUI_IMAGES_APPS_BUTTON_2X_FOCUSED_PRESSED 2045 -#define IDR_WEBUI_IMAGES_APPS_BUTTON_2X_FOCUSED_HOVER 2046 -#define IDR_WEBUI_IMAGES_APPS_BLUE_BUTTON_2X 2047 -#define IDR_WEBUI_IMAGES_APPS_BLUE_BUTTON_2X_PRESSED 2048 -#define IDR_WEBUI_IMAGES_APPS_BLUE_BUTTON_2X_HOVER 2049 -#define IDR_WEBUI_IMAGES_APPS_BLUE_BUTTON_2X_DISABLED 2050 -#define IDR_WEBUI_IMAGES_APPS_BLUE_BUTTON_2X_FOCUSED 2051 -#define IDR_WEBUI_IMAGES_APPS_BLUE_BUTTON_2X_FOCUSED_PRESSED 2052 -#define IDR_WEBUI_IMAGES_APPS_BLUE_BUTTON_2X_FOCUSED_HOVER 2053 -#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_2X 2054 -#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_2X_HOVER 2055 -#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_2X_PRESSED 2056 -#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_2X_FOCUSED 2057 -#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_2X_FOCUSED_HOVER 2058 -#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_2X_FOCUSED_PRESSED 2059 -#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_INACTIVE_2X 2060 -#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_CHECKED_2X 2061 -#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_CHECKED_2X_HOVER 2062 -#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_CHECKED_2X_PRESSED 2063 -#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_FOCUSED_CHECKED_2X 2064 -#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_FOCUSED_CHECKED_2X_HOVER 2065 -#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_FOCUSED_CHECKED_2X_PRESSED 2066 -#define IDR_WEBUI_IMAGES_APPS_CHECKBOX_CHECKED_INACTIVE_2X 2067 -#define IDR_WEBUI_IMAGES_APPS_TOPBAR_BUTTON_2X_CLOSE 2068 -#define IDR_WEBUI_IMAGES_APPS_TOPBAR_BUTTON_2X_MAXIMIZE 2069 -#define IDR_WEBUI_IMAGES_APPS_TOPBAR_BUTTON_2X_MINIMIZE 2070 -#define IDR_WEBUI_IMAGES_APPS_BUTTON_BUTTER_BAR_CLOSE_2X 2071 -#define IDR_WEBUI_IMAGES_APPS_BUTTON_BUTTER_BAR_CLOSE_HOVER_2X 2072 -#define IDR_WEBUI_IMAGES_APPS_BUTTON_BUTTER_BAR_CLOSE_PRESSED_2X 2073 -#define IDR_WEBUI_IMAGES_CHECK 2074 -#define IDR_WEBUI_IMAGES_CHECKBOX_BLACK 2075 -#define IDR_WEBUI_IMAGES_CHECKBOX_WHITE 2076 -#define IDR_WEBUI_IMAGES_DISABLED_SELECT 2077 -#define IDR_WEBUI_IMAGES_ERROR 2078 -#define IDR_WEBUI_IMAGES_SELECT 2079 -#define IDR_WEBUI_IMAGES_THROBBER_MEDIUM 2080 -#define IDR_WEBUI_IMAGES_THROBBER_SMALL 2081 -#define IDR_WEBUI_IMAGES_TRASH 2082 -#define IDR_WEBUI_CR_ELEMENTS_NETWORK_BADGE_CDMA1XRTT 2083 -#define IDR_WEBUI_CR_ELEMENTS_NETWORK_BADGE_3G 2084 -#define IDR_WEBUI_CR_ELEMENTS_NETWORK_BADGE_4G 2085 -#define IDR_WEBUI_CR_ELEMENTS_NETWORK_BADGE_EDGE 2086 -#define IDR_WEBUI_CR_ELEMENTS_NETWORK_BADGE_EVDO 2087 -#define IDR_WEBUI_CR_ELEMENTS_NETWORK_BADGE_GPRS 2088 -#define IDR_WEBUI_CR_ELEMENTS_NETWORK_BADGE_HSPA 2089 -#define IDR_WEBUI_CR_ELEMENTS_NETWORK_BADGE_HSPA_PLUS 2090 -#define IDR_WEBUI_CR_ELEMENTS_NETWORK_BADGE_LTE 2091 -#define IDR_WEBUI_CR_ELEMENTS_NETWORK_BADGE_LTE_ADVANCED 2092 -#define IDR_WEBUI_CR_ELEMENTS_NETWORK_BADGE_ROAMING 2093 -#define IDR_WEBUI_CR_ELEMENTS_NETWORK_BADGE_SECURE 2094 -#define IDR_WEBUI_CR_ELEMENTS_NETWORK_ICON_ETHERNET 2095 -#define IDR_WEBUI_CR_ELEMENTS_NETWORK_ICON_MOBILE 2096 -#define IDR_WEBUI_CR_ELEMENTS_NETWORK_ICON_VPN 2097 -#define IDR_WEBUI_CR_ELEMENTS_NETWORK_ICON_WIFI 2098 -#define IDR_WEBUI_CSS_ACTION_LINK 2200 -#define IDR_WEBUI_CSS_ALERT_OVERLAY 2201 -#define IDR_WEBUI_CSS_APPS_COMMON 2202 -#define IDR_WEBUI_CSS_APPS_TOPBUTTON_BAR 2203 -#define IDR_WEBUI_CSS_BUBBLE 2204 -#define IDR_WEBUI_CSS_BUBBLE_BUTTON 2205 -#define IDR_WEBUI_CSS_BUTTER_BAR 2206 -#define IDR_WEBUI_CSS_CHROME 2207 -#define IDR_WEBUI_CSS_CONTROLLED_INDICATOR 2208 -#define IDR_WEBUI_CSS_DIALOGS 2209 -#define IDR_WEBUI_CSS_I18N_PROCESS 2210 -#define IDR_WEBUI_CSS_LIST 2211 -#define IDR_WEBUI_CSS_MENU 2212 -#define IDR_WEBUI_CSS_MENU_BUTTON 2213 -#define IDR_WEBUI_CSS_TEXT_DEFAULTS 2214 -#define IDR_WEBUI_CSS_TEXT_DEFAULTS_MD 2215 -#define IDR_WEBUI_CSS_OVERLAY 2216 -#define IDR_WEBUI_CSS_ROBOTO 2217 -#define IDR_WEBUI_CSS_SPINNER 2218 -#define IDR_WEBUI_CSS_TABLE 2219 -#define IDR_WEBUI_CSS_TABS 2220 -#define IDR_WEBUI_CSS_THROBBER 2221 -#define IDR_WEBUI_CSS_TRASH 2222 -#define IDR_WEBUI_CSS_TREE 2223 -#define IDR_WEBUI_CSS_WIDGETS 2224 -#define IDR_WEBUI_HTML_ACTION_LINK 2225 -#define IDR_WEBUI_HTML_ASSERT 2226 -#define IDR_WEBUI_HTML_CR 2227 -#define IDR_WEBUI_HTML_CR_EVENT_TARGET 2228 -#define IDR_WEBUI_HTML_CR_UI 2229 -#define IDR_WEBUI_HTML_CR_UI_ALERT_OVERLAY 2230 -#define IDR_WEBUI_HTML_CR_UI_COMMAND 2231 -#define IDR_WEBUI_HTML_CR_UI_CONTEXT_MENU_BUTTON 2232 -#define IDR_WEBUI_HTML_CR_UI_CONTEXT_MENU_HANDLER 2233 -#define IDR_WEBUI_HTML_CR_UI_FOCUS_GRID 2234 -#define IDR_WEBUI_HTML_CR_UI_FOCUS_MANAGER 2235 -#define IDR_WEBUI_HTML_CR_UI_FOCUS_OUTLINE_MANAGER 2236 -#define IDR_WEBUI_HTML_CR_UI_FOCUS_ROW 2237 -#define IDR_WEBUI_HTML_CR_UI_MENU 2238 -#define IDR_WEBUI_HTML_CR_UI_MENU_BUTTON 2239 -#define IDR_WEBUI_HTML_CR_UI_MENU_ITEM 2240 -#define IDR_WEBUI_HTML_CR_UI_OVERLAY 2241 -#define IDR_WEBUI_HTML_CR_UI_POSITION_UTIL 2242 -#define IDR_WEBUI_HTML_EVENT_TRACKER 2243 -#define IDR_WEBUI_HTML_I18N_TEMPLATE 2244 -#define IDR_WEBUI_HTML_LOAD_TIME_DATA 2245 -#define IDR_WEBUI_HTML_POLYMER_CONFIG 2246 -#define IDR_WEBUI_HTML_I18N_BEHAVIOR 2247 -#define IDR_WEBUI_HTML_UTIL 2248 -#define IDR_WEBUI_JS_ACTION_LINK 2249 -#define IDR_WEBUI_JS_ASSERT 2250 -#define IDR_WEBUI_JS_CR 2251 -#define IDR_WEBUI_JS_CR_EVENT_TARGET 2252 -#define IDR_WEBUI_JS_CR_LINK_CONTROLLER 2253 -#define IDR_WEBUI_JS_CR_UI 2254 -#define IDR_WEBUI_JS_CR_UI_ALERT_OVERLAY 2255 -#define IDR_WEBUI_JS_CR_UI_ARRAY_DATA_MODEL 2256 -#define IDR_WEBUI_JS_CR_UI_AUTOCOMPLETE_LIST 2257 -#define IDR_WEBUI_JS_CR_UI_BUBBLE 2258 -#define IDR_WEBUI_JS_CR_UI_BUBBLE_BUTTON 2259 -#define IDR_WEBUI_JS_CR_UI_CARD_SLIDER 2260 -#define IDR_WEBUI_JS_CR_UI_COMMAND 2261 -#define IDR_WEBUI_JS_CR_UI_CONTEXT_MENU_BUTTON 2262 -#define IDR_WEBUI_JS_CR_UI_CONTEXT_MENU_HANDLER 2263 -#define IDR_WEBUI_JS_CR_UI_CONTROLLED_INDICATOR 2264 -#define IDR_WEBUI_JS_CR_UI_DIALOGS 2265 -#define IDR_WEBUI_JS_CR_UI_DRAG_WRAPPER 2266 -#define IDR_WEBUI_JS_CR_UI_FOCUS_GRID 2267 -#define IDR_WEBUI_JS_CR_UI_FOCUS_MANAGER 2268 -#define IDR_WEBUI_JS_CR_UI_FOCUS_OUTLINE_MANAGER 2269 -#define IDR_WEBUI_JS_CR_UI_FOCUS_ROW 2270 -#define IDR_WEBUI_JS_CR_UI_LIST 2271 -#define IDR_WEBUI_JS_CR_UI_LIST_ITEM 2272 -#define IDR_WEBUI_JS_CR_UI_LIST_SELECTION_CONTROLLER 2273 -#define IDR_WEBUI_JS_CR_UI_LIST_SELECTION_MODEL 2274 -#define IDR_WEBUI_JS_CR_UI_LIST_SINGLE_SELECTION_MODEL 2275 -#define IDR_WEBUI_JS_CR_UI_MENU 2276 -#define IDR_WEBUI_JS_CR_UI_MENU_BUTTON 2277 -#define IDR_WEBUI_JS_CR_UI_MENU_ITEM 2278 -#define IDR_WEBUI_JS_CR_UI_NODE_UTILS 2279 -#define IDR_WEBUI_JS_CR_UI_OVERLAY 2280 -#define IDR_WEBUI_JS_CR_UI_PAGE_MANAGER_PAGE 2281 -#define IDR_WEBUI_JS_CR_UI_PAGE_MANAGER_PAGE_MANAGER 2282 -#define IDR_WEBUI_JS_CR_UI_POSITION_UTIL 2283 -#define IDR_WEBUI_JS_CR_UI_SPLITTER 2284 -#define IDR_WEBUI_JS_CR_UI_GRID 2285 -#define IDR_WEBUI_JS_CR_UI_REPEATING_BUTTON 2286 -#define IDR_WEBUI_JS_CR_UI_TABLE 2287 -#define IDR_WEBUI_JS_CR_UI_TABLE_COLUMN 2288 -#define IDR_WEBUI_JS_CR_UI_TABLE_COLUMN_MODEL 2289 -#define IDR_WEBUI_JS_CR_UI_TABLE_HEADER 2290 -#define IDR_WEBUI_JS_CR_UI_TABLE_LIST 2291 -#define IDR_WEBUI_JS_CR_UI_TABLE_SPLITTER 2292 -#define IDR_WEBUI_JS_CR_UI_TABS 2293 -#define IDR_WEBUI_JS_CR_UI_TREE 2294 -#define IDR_WEBUI_JS_CR_UI_TOUCH_HANDLER 2295 -#define IDR_WEBUI_JS_EVENT_TRACKER 2296 -#define IDR_WEBUI_JS_I18N_TEMPLATE_NO_PROCESS 2297 -#define IDR_WEBUI_JS_LOAD_TIME_DATA 2298 -#define IDR_WEBUI_JS_MEDIA_COMMON 2299 -#define IDR_WEBUI_JS_PARSE_HTML_SUBSET 2300 -#define IDR_WEBUI_JS_POLYMER_CONFIG 2301 -#define IDR_WEBUI_JS_I18N_BEHAVIOR 2302 -#define IDR_WEBUI_JS_UTIL 2303 -#define IDR_WEBUI_JS_WEBUI_RESOURCE_TEST 2304 -#define IDR_WEBUI_CSS_UI_ACCOUNT_TWEAKS 2305 -#define IDR_WEBUI_HTML_UI_ACCOUNT_TWEAKS 2306 -#define IDR_WEBUI_JS_UI_ACCOUNT_TWEAKS 2307 -#define IDR_CR_ELEMENTS_CR_DEMO_ELEMENT_CSS 2308 -#define IDR_CR_ELEMENTS_CR_DEMO_ELEMENT_HTML 2309 -#define IDR_CR_ELEMENTS_CR_DEMO_ELEMENT_JS 2310 -#define IDR_CR_ELEMENTS_CR_DEMO_CONFIG_JS 2311 -#define IDR_CR_ELEMENTS_CR_DEMO_PAGE_HTML 2312 -#define IDR_CR_ELEMENTS_CR_EVENTS_HTML 2313 -#define IDR_CR_ELEMENTS_CR_EVENTS_JS 2314 -#define IDR_CR_ELEMENTS_CR_EXPAND_BUTTON_CSS 2315 -#define IDR_CR_ELEMENTS_CR_EXPAND_BUTTON_HTML 2316 -#define IDR_CR_ELEMENTS_CR_EXPAND_BUTTON_JS 2317 -#define IDR_CR_ELEMENTS_CR_NETWORK_ICON_CSS 2318 -#define IDR_CR_ELEMENTS_CR_NETWORK_ICON_HTML 2319 -#define IDR_CR_ELEMENTS_CR_NETWORK_ICON_JS 2320 -#define IDR_CR_ELEMENTS_CR_NETWORK_LIST_CSS 2321 -#define IDR_CR_ELEMENTS_CR_NETWORK_LIST_HTML 2322 -#define IDR_CR_ELEMENTS_CR_NETWORK_LIST_JS 2323 -#define IDR_CR_ELEMENTS_CR_NETWORK_LIST_ITEM_CSS 2324 -#define IDR_CR_ELEMENTS_CR_NETWORK_LIST_ITEM_HTML 2325 -#define IDR_CR_ELEMENTS_CR_NETWORK_LIST_ITEM_JS 2326 -#define IDR_CR_ELEMENTS_CR_NETWORK_SELECT_CSS 2327 -#define IDR_CR_ELEMENTS_CR_NETWORK_SELECT_HTML 2328 -#define IDR_CR_ELEMENTS_CR_NETWORK_SELECT_JS 2329 -#define IDR_CR_ELEMENTS_CR_ONC_TYPES_HTML 2330 -#define IDR_CR_ELEMENTS_CR_ONC_TYPES_JS 2331 -#define IDR_CR_ELEMENTS_CR_POLICY_INDICATOR_CSS 2332 -#define IDR_CR_ELEMENTS_CR_POLICY_INDICATOR_BEHAVIOR_HTML 2333 -#define IDR_CR_ELEMENTS_CR_POLICY_INDICATOR_BEHAVIOR_JS 2334 -#define IDR_CR_ELEMENTS_CR_POLICY_NETWORK_BEHAVIOR_HTML 2335 -#define IDR_CR_ELEMENTS_CR_POLICY_NETWORK_BEHAVIOR_JS 2336 -#define IDR_CR_ELEMENTS_CR_POLICY_NETWORK_INDICATOR_JS 2337 -#define IDR_CR_ELEMENTS_CR_POLICY_NETWORK_INDICATOR_HTML 2338 -#define IDR_CR_ELEMENTS_CR_POLICY_PREF_BEHAVIOR_HTML 2339 -#define IDR_CR_ELEMENTS_CR_POLICY_PREF_BEHAVIOR_JS 2340 -#define IDR_CR_ELEMENTS_CR_POLICY_PREF_INDICATOR_JS 2341 -#define IDR_CR_ELEMENTS_CR_POLICY_PREF_INDICATOR_HTML 2342 -#define IDR_CR_ELEMENTS_CR_SEARCH_FIELD_CSS 2343 -#define IDR_CR_ELEMENTS_CR_SEARCH_FIELD_HTML 2344 -#define IDR_CR_ELEMENTS_CR_SEARCH_FIELD_JS 2345 -#define IDR_CR_ELEMENTS_SHARED_CSS 2346 -#define IDR_POLYMER_1_0_FONT_ROBOTO_ROBOTO_HTML 2347 -#define IDR_POLYMER_1_0_IRON_A11Y_KEYS_BEHAVIOR_IRON_A11Y_KEYS_BEHAVIOR_EXTRACTED_JS 2348 -#define IDR_POLYMER_1_0_IRON_A11Y_KEYS_BEHAVIOR_IRON_A11Y_KEYS_BEHAVIOR_HTML 2349 -#define IDR_POLYMER_1_0_IRON_A11Y_KEYS_IRON_A11Y_KEYS_EXTRACTED_JS 2350 -#define IDR_POLYMER_1_0_IRON_A11Y_KEYS_IRON_A11Y_KEYS_HTML 2351 -#define IDR_POLYMER_1_0_IRON_BEHAVIORS_IRON_BUTTON_STATE_EXTRACTED_JS 2352 -#define IDR_POLYMER_1_0_IRON_BEHAVIORS_IRON_BUTTON_STATE_HTML 2353 -#define IDR_POLYMER_1_0_IRON_BEHAVIORS_IRON_CONTROL_STATE_EXTRACTED_JS 2354 -#define IDR_POLYMER_1_0_IRON_BEHAVIORS_IRON_CONTROL_STATE_HTML 2355 -#define IDR_POLYMER_1_0_IRON_CHECKED_ELEMENT_BEHAVIOR_IRON_CHECKED_ELEMENT_BEHAVIOR_EXTRACTED_JS 2356 -#define IDR_POLYMER_1_0_IRON_CHECKED_ELEMENT_BEHAVIOR_IRON_CHECKED_ELEMENT_BEHAVIOR_HTML 2357 -#define IDR_POLYMER_1_0_IRON_COLLAPSE_IRON_COLLAPSE_EXTRACTED_JS 2358 -#define IDR_POLYMER_1_0_IRON_COLLAPSE_IRON_COLLAPSE_HTML 2359 -#define IDR_POLYMER_1_0_IRON_DROPDOWN_IRON_DROPDOWN_EXTRACTED_JS 2360 -#define IDR_POLYMER_1_0_IRON_DROPDOWN_IRON_DROPDOWN_SCROLL_MANAGER_EXTRACTED_JS 2361 -#define IDR_POLYMER_1_0_IRON_DROPDOWN_IRON_DROPDOWN_SCROLL_MANAGER_HTML 2362 -#define IDR_POLYMER_1_0_IRON_DROPDOWN_IRON_DROPDOWN_HTML 2363 -#define IDR_POLYMER_1_0_IRON_FIT_BEHAVIOR_IRON_FIT_BEHAVIOR_EXTRACTED_JS 2364 -#define IDR_POLYMER_1_0_IRON_FIT_BEHAVIOR_IRON_FIT_BEHAVIOR_HTML 2365 -#define IDR_POLYMER_1_0_IRON_FLEX_LAYOUT_CLASSES_IRON_FLEX_LAYOUT_HTML 2366 -#define IDR_POLYMER_1_0_IRON_FLEX_LAYOUT_CLASSES_IRON_SHADOW_FLEX_LAYOUT_HTML 2367 -#define IDR_POLYMER_1_0_IRON_FLEX_LAYOUT_IRON_FLEX_LAYOUT_HTML 2368 -#define IDR_POLYMER_1_0_IRON_FORM_ELEMENT_BEHAVIOR_IRON_FORM_ELEMENT_BEHAVIOR_EXTRACTED_JS 2369 -#define IDR_POLYMER_1_0_IRON_FORM_ELEMENT_BEHAVIOR_IRON_FORM_ELEMENT_BEHAVIOR_HTML 2370 -#define IDR_POLYMER_1_0_IRON_ICON_IRON_ICON_EXTRACTED_JS 2371 -#define IDR_POLYMER_1_0_IRON_ICON_IRON_ICON_HTML 2372 -#define IDR_POLYMER_1_0_IRON_ICONS_AV_ICONS_HTML 2373 -#define IDR_POLYMER_1_0_IRON_ICONS_COMMUNICATION_ICONS_HTML 2374 -#define IDR_POLYMER_1_0_IRON_ICONS_DEVICE_ICONS_HTML 2375 -#define IDR_POLYMER_1_0_IRON_ICONS_HARDWARE_ICONS_HTML 2376 -#define IDR_POLYMER_1_0_IRON_ICONS_IMAGE_ICONS_HTML 2377 -#define IDR_POLYMER_1_0_IRON_ICONS_IRON_ICONS_HTML 2378 -#define IDR_POLYMER_1_0_IRON_ICONS_NOTIFICATION_ICONS_HTML 2379 -#define IDR_POLYMER_1_0_IRON_ICONS_PLACES_ICONS_HTML 2380 -#define IDR_POLYMER_1_0_IRON_ICONS_SOCIAL_ICONS_HTML 2381 -#define IDR_POLYMER_1_0_IRON_ICONSET_SVG_IRON_ICONSET_SVG_EXTRACTED_JS 2382 -#define IDR_POLYMER_1_0_IRON_ICONSET_SVG_IRON_ICONSET_SVG_HTML 2383 -#define IDR_POLYMER_1_0_IRON_INPUT_IRON_INPUT_EXTRACTED_JS 2384 -#define IDR_POLYMER_1_0_IRON_INPUT_IRON_INPUT_HTML 2385 -#define IDR_POLYMER_1_0_IRON_LIST_IRON_LIST_EXTRACTED_JS 2386 -#define IDR_POLYMER_1_0_IRON_LIST_IRON_LIST_HTML 2387 -#define IDR_POLYMER_1_0_IRON_MEDIA_QUERY_IRON_MEDIA_QUERY_EXTRACTED_JS 2388 -#define IDR_POLYMER_1_0_IRON_MEDIA_QUERY_IRON_MEDIA_QUERY_HTML 2389 -#define IDR_POLYMER_1_0_IRON_MENU_BEHAVIOR_IRON_MENU_BEHAVIOR_EXTRACTED_JS 2390 -#define IDR_POLYMER_1_0_IRON_MENU_BEHAVIOR_IRON_MENU_BEHAVIOR_HTML 2391 -#define IDR_POLYMER_1_0_IRON_MENU_BEHAVIOR_IRON_MENUBAR_BEHAVIOR_EXTRACTED_JS 2392 -#define IDR_POLYMER_1_0_IRON_MENU_BEHAVIOR_IRON_MENUBAR_BEHAVIOR_HTML 2393 -#define IDR_POLYMER_1_0_IRON_META_IRON_META_EXTRACTED_JS 2394 -#define IDR_POLYMER_1_0_IRON_META_IRON_META_HTML 2395 -#define IDR_POLYMER_1_0_IRON_OVERLAY_BEHAVIOR_IRON_OVERLAY_BACKDROP_EXTRACTED_JS 2396 -#define IDR_POLYMER_1_0_IRON_OVERLAY_BEHAVIOR_IRON_OVERLAY_BACKDROP_HTML 2397 -#define IDR_POLYMER_1_0_IRON_OVERLAY_BEHAVIOR_IRON_OVERLAY_BEHAVIOR_EXTRACTED_JS 2398 -#define IDR_POLYMER_1_0_IRON_OVERLAY_BEHAVIOR_IRON_OVERLAY_BEHAVIOR_HTML 2399 -#define IDR_POLYMER_1_0_IRON_OVERLAY_BEHAVIOR_IRON_OVERLAY_MANAGER_EXTRACTED_JS 2400 -#define IDR_POLYMER_1_0_IRON_OVERLAY_BEHAVIOR_IRON_OVERLAY_MANAGER_HTML 2401 -#define IDR_POLYMER_1_0_IRON_PAGES_IRON_PAGES_EXTRACTED_JS 2402 -#define IDR_POLYMER_1_0_IRON_PAGES_IRON_PAGES_HTML 2403 -#define IDR_POLYMER_1_0_IRON_RANGE_BEHAVIOR_IRON_RANGE_BEHAVIOR_EXTRACTED_JS 2404 -#define IDR_POLYMER_1_0_IRON_RANGE_BEHAVIOR_IRON_RANGE_BEHAVIOR_HTML 2405 -#define IDR_POLYMER_1_0_IRON_RESIZABLE_BEHAVIOR_IRON_RESIZABLE_BEHAVIOR_EXTRACTED_JS 2406 -#define IDR_POLYMER_1_0_IRON_RESIZABLE_BEHAVIOR_IRON_RESIZABLE_BEHAVIOR_HTML 2407 -#define IDR_POLYMER_1_0_IRON_SELECTOR_IRON_MULTI_SELECTABLE_EXTRACTED_JS 2408 -#define IDR_POLYMER_1_0_IRON_SELECTOR_IRON_MULTI_SELECTABLE_HTML 2409 -#define IDR_POLYMER_1_0_IRON_SELECTOR_IRON_SELECTABLE_EXTRACTED_JS 2410 -#define IDR_POLYMER_1_0_IRON_SELECTOR_IRON_SELECTABLE_HTML 2411 -#define IDR_POLYMER_1_0_IRON_SELECTOR_IRON_SELECTION_EXTRACTED_JS 2412 -#define IDR_POLYMER_1_0_IRON_SELECTOR_IRON_SELECTION_HTML 2413 -#define IDR_POLYMER_1_0_IRON_SELECTOR_IRON_SELECTOR_EXTRACTED_JS 2414 -#define IDR_POLYMER_1_0_IRON_SELECTOR_IRON_SELECTOR_HTML 2415 -#define IDR_POLYMER_1_0_IRON_TEST_HELPERS_IRON_TEST_HELPERS_EXTRACTED_JS 2416 -#define IDR_POLYMER_1_0_IRON_TEST_HELPERS_IRON_TEST_HELPERS_HTML 2417 -#define IDR_POLYMER_1_0_IRON_TEST_HELPERS_MOCK_INTERACTIONS_HTML 2418 -#define IDR_POLYMER_1_0_IRON_TEST_HELPERS_MOCK_INTERACTIONS_JS 2419 -#define IDR_POLYMER_1_0_IRON_TEST_HELPERS_TEST_HELPERS_HTML 2420 -#define IDR_POLYMER_1_0_IRON_TEST_HELPERS_TEST_HELPERS_JS 2421 -#define IDR_POLYMER_1_0_IRON_VALIDATABLE_BEHAVIOR_IRON_VALIDATABLE_BEHAVIOR_EXTRACTED_JS 2422 -#define IDR_POLYMER_1_0_IRON_VALIDATABLE_BEHAVIOR_IRON_VALIDATABLE_BEHAVIOR_HTML 2423 -#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_FADE_IN_ANIMATION_EXTRACTED_JS 2424 -#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_FADE_IN_ANIMATION_HTML 2425 -#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_FADE_OUT_ANIMATION_EXTRACTED_JS 2426 -#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_FADE_OUT_ANIMATION_HTML 2427 -#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_HERO_ANIMATION_EXTRACTED_JS 2428 -#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_HERO_ANIMATION_HTML 2429 -#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_OPAQUE_ANIMATION_EXTRACTED_JS 2430 -#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_OPAQUE_ANIMATION_HTML 2431 -#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_SLIDE_DOWN_ANIMATION_EXTRACTED_JS 2432 -#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_SLIDE_DOWN_ANIMATION_HTML 2433 -#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_SLIDE_FROM_LEFT_ANIMATION_EXTRACTED_JS 2434 -#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_SLIDE_FROM_LEFT_ANIMATION_HTML 2435 -#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_SLIDE_FROM_RIGHT_ANIMATION_EXTRACTED_JS 2436 -#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_SLIDE_FROM_RIGHT_ANIMATION_HTML 2437 -#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_SLIDE_LEFT_ANIMATION_EXTRACTED_JS 2438 -#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_SLIDE_LEFT_ANIMATION_HTML 2439 -#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_SLIDE_RIGHT_ANIMATION_EXTRACTED_JS 2440 -#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_SLIDE_RIGHT_ANIMATION_HTML 2441 -#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_SLIDE_UP_ANIMATION_EXTRACTED_JS 2442 -#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_SLIDE_UP_ANIMATION_HTML 2443 -#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_TRANSFORM_ANIMATION_EXTRACTED_JS 2444 -#define IDR_POLYMER_1_0_NEON_ANIMATION_ANIMATIONS_TRANSFORM_ANIMATION_HTML 2445 -#define IDR_POLYMER_1_0_NEON_ANIMATION_NEON_ANIMATABLE_BEHAVIOR_EXTRACTED_JS 2446 -#define IDR_POLYMER_1_0_NEON_ANIMATION_NEON_ANIMATABLE_BEHAVIOR_HTML 2447 -#define IDR_POLYMER_1_0_NEON_ANIMATION_NEON_ANIMATABLE_EXTRACTED_JS 2448 -#define IDR_POLYMER_1_0_NEON_ANIMATION_NEON_ANIMATABLE_HTML 2449 -#define IDR_POLYMER_1_0_NEON_ANIMATION_NEON_ANIMATED_PAGES_EXTRACTED_JS 2450 -#define IDR_POLYMER_1_0_NEON_ANIMATION_NEON_ANIMATED_PAGES_HTML 2451 -#define IDR_POLYMER_1_0_NEON_ANIMATION_NEON_ANIMATION_BEHAVIOR_EXTRACTED_JS 2452 -#define IDR_POLYMER_1_0_NEON_ANIMATION_NEON_ANIMATION_BEHAVIOR_HTML 2453 -#define IDR_POLYMER_1_0_NEON_ANIMATION_NEON_ANIMATION_RUNNER_BEHAVIOR_EXTRACTED_JS 2454 -#define IDR_POLYMER_1_0_NEON_ANIMATION_NEON_ANIMATION_RUNNER_BEHAVIOR_HTML 2455 -#define IDR_POLYMER_1_0_NEON_ANIMATION_NEON_SHARED_ELEMENT_ANIMATABLE_BEHAVIOR_EXTRACTED_JS 2456 -#define IDR_POLYMER_1_0_NEON_ANIMATION_NEON_SHARED_ELEMENT_ANIMATABLE_BEHAVIOR_HTML 2457 -#define IDR_POLYMER_1_0_NEON_ANIMATION_NEON_SHARED_ELEMENT_ANIMATION_BEHAVIOR_EXTRACTED_JS 2458 -#define IDR_POLYMER_1_0_NEON_ANIMATION_NEON_SHARED_ELEMENT_ANIMATION_BEHAVIOR_HTML 2459 -#define IDR_POLYMER_1_0_NEON_ANIMATION_WEB_ANIMATIONS_HTML 2460 -#define IDR_POLYMER_1_0_PAPER_BEHAVIORS_PAPER_BUTTON_BEHAVIOR_EXTRACTED_JS 2461 -#define IDR_POLYMER_1_0_PAPER_BEHAVIORS_PAPER_BUTTON_BEHAVIOR_HTML 2462 -#define IDR_POLYMER_1_0_PAPER_BEHAVIORS_PAPER_CHECKED_ELEMENT_BEHAVIOR_EXTRACTED_JS 2463 -#define IDR_POLYMER_1_0_PAPER_BEHAVIORS_PAPER_CHECKED_ELEMENT_BEHAVIOR_HTML 2464 -#define IDR_POLYMER_1_0_PAPER_BEHAVIORS_PAPER_INKY_FOCUS_BEHAVIOR_EXTRACTED_JS 2465 -#define IDR_POLYMER_1_0_PAPER_BEHAVIORS_PAPER_INKY_FOCUS_BEHAVIOR_HTML 2466 -#define IDR_POLYMER_1_0_PAPER_BEHAVIORS_PAPER_RIPPLE_BEHAVIOR_EXTRACTED_JS 2467 -#define IDR_POLYMER_1_0_PAPER_BEHAVIORS_PAPER_RIPPLE_BEHAVIOR_HTML 2468 -#define IDR_POLYMER_1_0_PAPER_BUTTON_PAPER_BUTTON_EXTRACTED_JS 2469 -#define IDR_POLYMER_1_0_PAPER_BUTTON_PAPER_BUTTON_HTML 2470 -#define IDR_POLYMER_1_0_PAPER_CARD_PAPER_CARD_EXTRACTED_JS 2471 -#define IDR_POLYMER_1_0_PAPER_CARD_PAPER_CARD_HTML 2472 -#define IDR_POLYMER_1_0_PAPER_CHECKBOX_PAPER_CHECKBOX_EXTRACTED_JS 2473 -#define IDR_POLYMER_1_0_PAPER_CHECKBOX_PAPER_CHECKBOX_HTML 2474 -#define IDR_POLYMER_1_0_PAPER_DIALOG_BEHAVIOR_PAPER_DIALOG_BEHAVIOR_EXTRACTED_JS 2475 -#define IDR_POLYMER_1_0_PAPER_DIALOG_BEHAVIOR_PAPER_DIALOG_BEHAVIOR_HTML 2476 -#define IDR_POLYMER_1_0_PAPER_DIALOG_BEHAVIOR_PAPER_DIALOG_COMMON_CSS 2477 -#define IDR_POLYMER_1_0_PAPER_DIALOG_BEHAVIOR_PAPER_DIALOG_SHARED_STYLES_HTML 2478 -#define IDR_POLYMER_1_0_PAPER_DIALOG_PAPER_DIALOG_EXTRACTED_JS 2479 -#define IDR_POLYMER_1_0_PAPER_DIALOG_PAPER_DIALOG_HTML 2480 -#define IDR_POLYMER_1_0_PAPER_DRAWER_PANEL_PAPER_DRAWER_PANEL_EXTRACTED_JS 2481 -#define IDR_POLYMER_1_0_PAPER_DRAWER_PANEL_PAPER_DRAWER_PANEL_HTML 2482 -#define IDR_POLYMER_1_0_PAPER_DROPDOWN_MENU_PAPER_DROPDOWN_MENU_EXTRACTED_JS 2483 -#define IDR_POLYMER_1_0_PAPER_DROPDOWN_MENU_PAPER_DROPDOWN_MENU_HTML 2484 -#define IDR_POLYMER_1_0_PAPER_FAB_PAPER_FAB_EXTRACTED_JS 2485 -#define IDR_POLYMER_1_0_PAPER_FAB_PAPER_FAB_HTML 2486 -#define IDR_POLYMER_1_0_PAPER_HEADER_PANEL_PAPER_HEADER_PANEL_EXTRACTED_JS 2487 -#define IDR_POLYMER_1_0_PAPER_HEADER_PANEL_PAPER_HEADER_PANEL_HTML 2488 -#define IDR_POLYMER_1_0_PAPER_ICON_BUTTON_PAPER_ICON_BUTTON_EXTRACTED_JS 2489 -#define IDR_POLYMER_1_0_PAPER_ICON_BUTTON_PAPER_ICON_BUTTON_HTML 2490 -#define IDR_POLYMER_1_0_PAPER_INPUT_PAPER_INPUT_ADDON_BEHAVIOR_EXTRACTED_JS 2491 -#define IDR_POLYMER_1_0_PAPER_INPUT_PAPER_INPUT_ADDON_BEHAVIOR_HTML 2492 -#define IDR_POLYMER_1_0_PAPER_INPUT_PAPER_INPUT_BEHAVIOR_EXTRACTED_JS 2493 -#define IDR_POLYMER_1_0_PAPER_INPUT_PAPER_INPUT_BEHAVIOR_HTML 2494 -#define IDR_POLYMER_1_0_PAPER_INPUT_PAPER_INPUT_CHAR_COUNTER_EXTRACTED_JS 2495 -#define IDR_POLYMER_1_0_PAPER_INPUT_PAPER_INPUT_CHAR_COUNTER_HTML 2496 -#define IDR_POLYMER_1_0_PAPER_INPUT_PAPER_INPUT_CONTAINER_EXTRACTED_JS 2497 -#define IDR_POLYMER_1_0_PAPER_INPUT_PAPER_INPUT_CONTAINER_HTML 2498 -#define IDR_POLYMER_1_0_PAPER_INPUT_PAPER_INPUT_ERROR_EXTRACTED_JS 2499 -#define IDR_POLYMER_1_0_PAPER_INPUT_PAPER_INPUT_ERROR_HTML 2500 -#define IDR_POLYMER_1_0_PAPER_INPUT_PAPER_INPUT_EXTRACTED_JS 2501 -#define IDR_POLYMER_1_0_PAPER_INPUT_PAPER_INPUT_HTML 2502 -#define IDR_POLYMER_1_0_PAPER_ITEM_PAPER_ICON_ITEM_EXTRACTED_JS 2503 -#define IDR_POLYMER_1_0_PAPER_ITEM_PAPER_ICON_ITEM_HTML 2504 -#define IDR_POLYMER_1_0_PAPER_ITEM_PAPER_ITEM_BEHAVIOR_EXTRACTED_JS 2505 -#define IDR_POLYMER_1_0_PAPER_ITEM_PAPER_ITEM_BEHAVIOR_HTML 2506 -#define IDR_POLYMER_1_0_PAPER_ITEM_PAPER_ITEM_BODY_EXTRACTED_JS 2507 -#define IDR_POLYMER_1_0_PAPER_ITEM_PAPER_ITEM_BODY_HTML 2508 -#define IDR_POLYMER_1_0_PAPER_ITEM_PAPER_ITEM_EXTRACTED_JS 2509 -#define IDR_POLYMER_1_0_PAPER_ITEM_PAPER_ITEM_SHARED_STYLES_HTML 2510 -#define IDR_POLYMER_1_0_PAPER_ITEM_PAPER_ITEM_HTML 2511 -#define IDR_POLYMER_1_0_PAPER_MATERIAL_PAPER_MATERIAL_EXTRACTED_JS 2512 -#define IDR_POLYMER_1_0_PAPER_MATERIAL_PAPER_MATERIAL_SHARED_STYLES_HTML 2513 -#define IDR_POLYMER_1_0_PAPER_MATERIAL_PAPER_MATERIAL_HTML 2514 -#define IDR_POLYMER_1_0_PAPER_MENU_BUTTON_PAPER_MENU_BUTTON_ANIMATIONS_EXTRACTED_JS 2515 -#define IDR_POLYMER_1_0_PAPER_MENU_BUTTON_PAPER_MENU_BUTTON_ANIMATIONS_HTML 2516 -#define IDR_POLYMER_1_0_PAPER_MENU_BUTTON_PAPER_MENU_BUTTON_EXTRACTED_JS 2517 -#define IDR_POLYMER_1_0_PAPER_MENU_BUTTON_PAPER_MENU_BUTTON_HTML 2518 -#define IDR_POLYMER_1_0_PAPER_MENU_PAPER_MENU_EXTRACTED_JS 2519 -#define IDR_POLYMER_1_0_PAPER_MENU_PAPER_MENU_SHARED_STYLES_HTML 2520 -#define IDR_POLYMER_1_0_PAPER_MENU_PAPER_MENU_HTML 2521 -#define IDR_POLYMER_1_0_PAPER_MENU_PAPER_SUBMENU_EXTRACTED_JS 2522 -#define IDR_POLYMER_1_0_PAPER_MENU_PAPER_SUBMENU_HTML 2523 -#define IDR_POLYMER_1_0_PAPER_PROGRESS_PAPER_PROGRESS_EXTRACTED_JS 2524 -#define IDR_POLYMER_1_0_PAPER_PROGRESS_PAPER_PROGRESS_HTML 2525 -#define IDR_POLYMER_1_0_PAPER_RADIO_BUTTON_PAPER_RADIO_BUTTON_EXTRACTED_JS 2526 -#define IDR_POLYMER_1_0_PAPER_RADIO_BUTTON_PAPER_RADIO_BUTTON_HTML 2527 -#define IDR_POLYMER_1_0_PAPER_RADIO_GROUP_PAPER_RADIO_GROUP_EXTRACTED_JS 2528 -#define IDR_POLYMER_1_0_PAPER_RADIO_GROUP_PAPER_RADIO_GROUP_HTML 2529 -#define IDR_POLYMER_1_0_PAPER_RIPPLE_PAPER_RIPPLE_EXTRACTED_JS 2530 -#define IDR_POLYMER_1_0_PAPER_RIPPLE_PAPER_RIPPLE_HTML 2531 -#define IDR_POLYMER_1_0_PAPER_SLIDER_PAPER_SLIDER_EXTRACTED_JS 2532 -#define IDR_POLYMER_1_0_PAPER_SLIDER_PAPER_SLIDER_HTML 2533 -#define IDR_POLYMER_1_0_PAPER_SPINNER_PAPER_SPINNER_BEHAVIOR_EXTRACTED_JS 2534 -#define IDR_POLYMER_1_0_PAPER_SPINNER_PAPER_SPINNER_BEHAVIOR_HTML 2535 -#define IDR_POLYMER_1_0_PAPER_SPINNER_PAPER_SPINNER_EXTRACTED_JS 2536 -#define IDR_POLYMER_1_0_PAPER_SPINNER_PAPER_SPINNER_LITE_EXTRACTED_JS 2537 -#define IDR_POLYMER_1_0_PAPER_SPINNER_PAPER_SPINNER_LITE_HTML 2538 -#define IDR_POLYMER_1_0_PAPER_SPINNER_PAPER_SPINNER_STYLES_HTML 2539 -#define IDR_POLYMER_1_0_PAPER_SPINNER_PAPER_SPINNER_HTML 2540 -#define IDR_POLYMER_1_0_PAPER_STYLES_CLASSES_SHADOW_LAYOUT_HTML 2541 -#define IDR_POLYMER_1_0_PAPER_STYLES_CLASSES_SHADOW_HTML 2542 -#define IDR_POLYMER_1_0_PAPER_STYLES_CLASSES_TYPOGRAPHY_HTML 2543 -#define IDR_POLYMER_1_0_PAPER_STYLES_COLOR_HTML 2544 -#define IDR_POLYMER_1_0_PAPER_STYLES_DEFAULT_THEME_HTML 2545 -#define IDR_POLYMER_1_0_PAPER_STYLES_PAPER_STYLES_CLASSES_HTML 2546 -#define IDR_POLYMER_1_0_PAPER_STYLES_PAPER_STYLES_HTML 2547 -#define IDR_POLYMER_1_0_PAPER_STYLES_SHADOW_HTML 2548 -#define IDR_POLYMER_1_0_PAPER_STYLES_TYPOGRAPHY_HTML 2549 -#define IDR_POLYMER_1_0_PAPER_TABS_PAPER_TAB_EXTRACTED_JS 2550 -#define IDR_POLYMER_1_0_PAPER_TABS_PAPER_TAB_HTML 2551 -#define IDR_POLYMER_1_0_PAPER_TABS_PAPER_TABS_EXTRACTED_JS 2552 -#define IDR_POLYMER_1_0_PAPER_TABS_PAPER_TABS_ICONS_HTML 2553 -#define IDR_POLYMER_1_0_PAPER_TABS_PAPER_TABS_HTML 2554 -#define IDR_POLYMER_1_0_PAPER_TOGGLE_BUTTON_PAPER_TOGGLE_BUTTON_EXTRACTED_JS 2555 -#define IDR_POLYMER_1_0_PAPER_TOGGLE_BUTTON_PAPER_TOGGLE_BUTTON_HTML 2556 -#define IDR_POLYMER_1_0_PAPER_TOOLBAR_PAPER_TOOLBAR_EXTRACTED_JS 2557 -#define IDR_POLYMER_1_0_PAPER_TOOLBAR_PAPER_TOOLBAR_HTML 2558 -#define IDR_POLYMER_1_0_PAPER_TOOLTIP_PAPER_TOOLTIP_EXTRACTED_JS 2559 -#define IDR_POLYMER_1_0_PAPER_TOOLTIP_PAPER_TOOLTIP_HTML 2560 -#define IDR_POLYMER_1_0_POLYMER_POLYMER_EXTRACTED_JS 2561 -#define IDR_POLYMER_1_0_POLYMER_POLYMER_MICRO_EXTRACTED_JS 2562 -#define IDR_POLYMER_1_0_POLYMER_POLYMER_MICRO_HTML 2563 -#define IDR_POLYMER_1_0_POLYMER_POLYMER_MINI_EXTRACTED_JS 2564 -#define IDR_POLYMER_1_0_POLYMER_POLYMER_MINI_HTML 2565 -#define IDR_POLYMER_1_0_POLYMER_POLYMER_HTML 2566 -#define IDR_POLYMER_1_0_WEB_ANIMATIONS_JS_WEB_ANIMATIONS_NEXT_LITE_MIN_JS 2567 - -#endif // CEF_INCLUDE_CEF_PACK_RESOURCES_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_pack_strings.h b/tool_kits/cef/cef_wrapper/include/cef_pack_strings.h deleted file mode 100644 index e13ca6c1..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_pack_strings.h +++ /dev/null @@ -1,1085 +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 is generated by the make_pack_header.py tool. -// - -#ifndef CEF_INCLUDE_CEF_PACK_STRINGS_H_ -#define CEF_INCLUDE_CEF_PACK_STRINGS_H_ -#pragma once - -// --------------------------------------------------------------------------- -// From cef_strings.h: - -#define IDS_MENU_BACK 28000 -#define IDS_MENU_FORWARD 28001 -#define IDS_MENU_RELOAD 28002 -#define IDS_MENU_RELOAD_NOCACHE 28003 -#define IDS_MENU_STOPLOAD 28004 -#define IDS_MENU_UNDO 28005 -#define IDS_MENU_REDO 28006 -#define IDS_MENU_CUT 28007 -#define IDS_MENU_COPY 28008 -#define IDS_MENU_PASTE 28009 -#define IDS_MENU_DELETE 28010 -#define IDS_MENU_SELECT_ALL 28011 -#define IDS_MENU_FIND 28012 -#define IDS_MENU_PRINT 28013 -#define IDS_MENU_VIEW_SOURCE 28014 -#define IDS_APP_AUDIO_FILES 28015 -#define IDS_APP_IMAGE_FILES 28016 -#define IDS_APP_TEXT_FILES 28017 -#define IDS_APP_VIDEO_FILES 28018 -#define IDS_DEFAULT_PRINT_DOCUMENT_TITLE 28019 -#define IDS_PRINT_SPOOL_FAILED_TITLE_TEXT 28020 -#define IDS_PRINT_SPOOL_FAILED_ERROR_TEXT 28021 -#define IDS_PRINT_INVALID_PRINTER_SETTINGS 28022 -#define IDS_UTILITY_PROCESS_EMF_CONVERTOR_NAME 28023 -#define IDS_UTILITY_PROCESS_PROXY_RESOLVER_NAME 28024 -#define IDS_SPELLCHECK_DICTIONARY 28025 -#define IDS_CONTENT_CONTEXT_ADD_TO_DICTIONARY 28026 -#define IDS_CONTENT_CONTEXT_NO_SPELLING_SUGGESTIONS 28027 -#define IDS_UTILITY_PROCESS_FONT_CACHE_BUILDER_NAME 28028 -#define IDS_PLUGIN_HIDE 28029 -#define IDS_PLUGIN_NOT_SUPPORTED 28030 -#define IDS_PLUGIN_BLOCKED 28031 -#define IDS_PLUGIN_NOT_SUPPORTED_METRO 28032 -#define IDS_PLUGIN_OUTDATED 28033 -#define IDS_PLUGIN_NOT_AUTHORIZED 28034 -#define IDS_PLUGIN_BLOCKED_BY_POLICY 28035 -#define IDS_CONTENT_CONTEXT_PLUGIN_RUN 28036 -#define IDS_CONTENT_CONTEXT_PLUGIN_HIDE 28037 -#define IDS_ACCEPT_LANGUAGES 28038 -#define IDS_DEFAULT_ENCODING 28039 -#define IDS_USES_UNIVERSAL_DETECTOR 28040 -#define IDS_STATIC_ENCODING_LIST 28041 -#define IDS_ENCODING_DISPLAY_TEMPLATE 28042 -#define IDS_ENCODING_UNICODE 28043 -#define IDS_ENCODING_WESTERN 28044 -#define IDS_ENCODING_SIMP_CHINESE 28045 -#define IDS_ENCODING_TRAD_CHINESE 28046 -#define IDS_ENCODING_KOREAN 28047 -#define IDS_ENCODING_JAPANESE 28048 -#define IDS_ENCODING_THAI 28049 -#define IDS_ENCODING_CENTRAL_EUROPEAN 28050 -#define IDS_ENCODING_CYRILLIC 28051 -#define IDS_ENCODING_GREEK 28052 -#define IDS_ENCODING_BALTIC 28053 -#define IDS_ENCODING_SOUTH_EUROPEAN 28054 -#define IDS_ENCODING_NORDIC 28055 -#define IDS_ENCODING_CELTIC 28056 -#define IDS_ENCODING_ROMANIAN 28057 -#define IDS_ENCODING_TURKISH 28058 -#define IDS_ENCODING_ARABIC 28059 -#define IDS_ENCODING_HEBREW 28060 -#define IDS_ENCODING_VIETNAMESE 28061 - -// --------------------------------------------------------------------------- -// From components_strings.h: - -#define IDS_JAVASCRIPT_MESSAGEBOX_TITLE 29160 -#define IDS_JAVASCRIPT_MESSAGEBOX_TITLE_IFRAME 29161 -#define IDS_JAVASCRIPT_MESSAGEBOX_TITLE_NONSTANDARD_URL 29162 -#define IDS_JAVASCRIPT_MESSAGEBOX_TITLE_NONSTANDARD_URL_IFRAME 29163 -#define IDS_JAVASCRIPT_MESSAGEBOX_SUPPRESS_OPTION 29164 -#define IDS_BEFOREUNLOAD_MESSAGEBOX_TITLE 29165 -#define IDS_BEFOREUNLOAD_MESSAGEBOX_FOOTER 29166 -#define IDS_BEFOREUNLOAD_MESSAGEBOX_OK_BUTTON_LABEL 29167 -#define IDS_BEFOREUNLOAD_MESSAGEBOX_CANCEL_BUTTON_LABEL 29168 -#define IDS_BEFORERELOAD_MESSAGEBOX_TITLE 29169 -#define IDS_BEFORERELOAD_MESSAGEBOX_FOOTER 29170 -#define IDS_BEFORERELOAD_MESSAGEBOX_OK_BUTTON_LABEL 29171 -#define IDS_BEFORERELOAD_MESSAGEBOX_CANCEL_BUTTON_LABEL 29172 -#define IDS_AUTOFILL_CLEAR_FORM_MENU_ITEM 29173 -#define IDS_AUTOFILL_CLEAR_LOCAL_COPY_BUTTON 29174 -#define IDS_AUTOFILL_WARNING_FORM_DISABLED 29175 -#define IDS_AUTOFILL_WARNING_INSECURE_CONNECTION 29176 -#define IDS_AUTOFILL_DELETE_AUTOCOMPLETE_SUGGESTION_CONFIRMATION_BODY 29177 -#define IDS_AUTOFILL_DELETE_CREDIT_CARD_SUGGESTION_CONFIRMATION_BODY 29178 -#define IDS_AUTOFILL_DELETE_PROFILE_SUGGESTION_CONFIRMATION_BODY 29179 -#define IDS_AUTOFILL_CC_AMEX 29180 -#define IDS_AUTOFILL_CC_AMEX_SHORT 29181 -#define IDS_AUTOFILL_CC_DINERS 29182 -#define IDS_AUTOFILL_CC_DISCOVER 29183 -#define IDS_AUTOFILL_CC_JCB 29184 -#define IDS_AUTOFILL_CC_MASTERCARD 29185 -#define IDS_AUTOFILL_CC_UNION_PAY 29186 -#define IDS_AUTOFILL_CC_VISA 29187 -#define IDS_AUTOFILL_CC_GENERIC 29188 -#define IDS_AUTOFILL_ADDRESS_LINE_SEPARATOR 29189 -#define IDS_AUTOFILL_ADDRESS_SUMMARY_SEPARATOR 29190 -#define IDS_AUTOFILL_FIELD_LABEL_STATE 29191 -#define IDS_AUTOFILL_FIELD_LABEL_AREA 29192 -#define IDS_AUTOFILL_FIELD_LABEL_COUNTY 29193 -#define IDS_AUTOFILL_FIELD_LABEL_DEPARTMENT 29194 -#define IDS_AUTOFILL_FIELD_LABEL_DISTRICT 29195 -#define IDS_AUTOFILL_FIELD_LABEL_EMIRATE 29196 -#define IDS_AUTOFILL_FIELD_LABEL_ISLAND 29197 -#define IDS_AUTOFILL_FIELD_LABEL_PARISH 29198 -#define IDS_AUTOFILL_FIELD_LABEL_PREFECTURE 29199 -#define IDS_AUTOFILL_FIELD_LABEL_PROVINCE 29200 -#define IDS_AUTOFILL_FIELD_LABEL_ZIP_CODE 29201 -#define IDS_AUTOFILL_FIELD_LABEL_POSTAL_CODE 29202 -#define IDS_AUTOFILL_FIELD_LABEL_COUNTRY 29203 -#define IDS_AUTOFILL_SHOW_PREDICTIONS_TITLE 29204 -#define IDS_AUTOFILL_DIALOG_PRIVACY_POLICY_LINK 29205 -#define IDS_AUTOFILL_OPTIONS_POPUP 29206 -#define IDS_AUTOFILL_OPTIONS_CONTENT_DESCRIPTION 29207 -#define IDS_AUTOFILL_CREDIT_CARD_NOT_SUPPORTED_BY_WALLET 29208 -#define IDS_AUTOFILL_CREDIT_CARD_NOT_SUPPORTED_BY_WALLET_FOR_MERCHANT 29209 -#define IDS_AUTOFILL_SCAN_CREDIT_CARD 29211 -#define IDS_AUTOFILL_PASSWORD_FIELD_SUGGESTIONS_TITLE 29212 -#define IDS_AUTOFILL_SAVE_CARD_PROMPT_ACCEPT 29213 -#define IDS_AUTOFILL_SAVE_CARD_PROMPT_DENY 29214 -#define IDS_AUTOFILL_SAVE_CARD_PROMPT_TITLE_LOCAL 29215 -#define IDS_AUTOFILL_SAVE_CARD_PROMPT_TITLE_TO_CLOUD 29216 -#define IDS_AUTOFILL_SAVE_CARD_PROMPT_UPLOAD_EXPLANATION 29217 -#define IDS_AUTOFILL_CREDIT_CARD_EXPIRATION_DATE_ABBR 29218 -#define IDS_AUTOFILL_CARD_UNMASK_PROMPT_ERROR_TRY_AGAIN 29219 -#define IDS_AUTOFILL_CARD_UNMASK_PROMPT_ERROR_TRY_AGAIN_WITH_EXPIRATION 29220 -#define IDS_AUTOFILL_CARD_UNMASK_PROMPT_ERROR_PERMANENT 29221 -#define IDS_AUTOFILL_CARD_UNMASK_PROMPT_ERROR_NETWORK 29222 -#define IDS_AUTOFILL_CARD_UNMASK_PROMPT_TITLE 29223 -#define IDS_AUTOFILL_CARD_UNMASK_PROMPT_UPDATE_TITLE 29224 -#define IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS 29225 -#define IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS_AMEX 29226 -#define IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS_EXPIRED 29227 -#define IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS_EXPIRED_AMEX 29228 -#define IDS_AUTOFILL_CARD_UNMASK_PROMPT_STORAGE_CHECKBOX 29229 -#define IDS_AUTOFILL_CARD_UNMASK_PROMPT_STORAGE_TOOLTIP 29230 -#define IDS_AUTOFILL_CARD_UNMASK_CONFIRM_BUTTON 29231 -#define IDS_AUTOFILL_CARD_UNMASK_VERIFICATION_IN_PROGRESS 29232 -#define IDS_AUTOFILL_CARD_UNMASK_VERIFICATION_SUCCESS 29233 -#define IDS_AUTOFILL_CARD_UNMASK_INVALID_EXPIRATION_DATE 29234 -#define IDS_AUTOFILL_CARD_UNMASK_EXPIRATION_DATE_SEPARATOR 29235 -#define IDS_AUTOFILL_CARD_UNMASK_NEW_CARD_LINK 29236 -#define IDS_AUTOFILL_DIALOG_PLACEHOLDER_CVC 29237 -#define IDS_BOOKMARK_BAR_FOLDER_NAME 29238 -#define IDS_BOOKMARK_BAR_MOBILE_FOLDER_NAME 29240 -#define IDS_BOOKMARK_BAR_OTHER_FOLDER_NAME 29241 -#define IDS_BOOKMARK_BAR_MANAGED_FOLDER_DOMAIN_NAME 29242 -#define IDS_BOOKMARK_BAR_MANAGED_FOLDER_DEFAULT_NAME 29243 -#define IDS_BOOKMARK_BAR_SUPERVISED_FOLDER_DEFAULT_NAME 29244 -#define IDS_SYNC_TIME_NEVER 29245 -#define IDS_SYNC_TIME_JUST_NOW 29246 -#define IDS_SETTINGS_TITLE 29247 -#define IDS_SETTINGS_HIDE_ADVANCED_SETTINGS 29248 -#define IDS_SETTINGS_SHOW_ADVANCED_SETTINGS 29249 -#define IDS_NETWORK_PREDICTION_ENABLED_DESCRIPTION 29250 -#define IDS_OPTIONS_PROXIES_CONFIGURE_BUTTON 29251 -#define IDS_CRASH_TITLE 29252 -#define IDS_CRASH_CRASH_COUNT_BANNER_FORMAT 29253 -#define IDS_CRASH_CRASH_HEADER_FORMAT 29254 -#define IDS_CRASH_CRASH_TIME_FORMAT 29255 -#define IDS_CRASH_BUG_LINK_LABEL 29256 -#define IDS_CRASH_NO_CRASHES_MESSAGE 29257 -#define IDS_CRASH_DISABLED_HEADER 29258 -#define IDS_CRASH_UPLOAD_MESSAGE 29259 -#define IDS_DATA_REDUCTION_PROXY_TITLE 29260 -#define IDS_DATA_REDUCTION_PROXY_BACK_BUTTON 29261 -#define IDS_DATA_REDUCTION_PROXY_CONTINUE_BUTTON 29262 -#define IDS_DATA_REDUCTION_PROXY_CANNOT_PROXY_HEADING 29263 -#define IDS_DATA_REDUCTION_PROXY_CANNOT_PROXY_PRIMARY_PARAGRAPH 29264 -#define IDS_DATA_REDUCTION_PROXY_CANNOT_PROXY_SECONDARY_PARAGRAPH 29265 -#define IDS_HTTP_POST_WARNING_TITLE 29266 -#define IDS_HTTP_POST_WARNING 29267 -#define IDS_HTTP_POST_WARNING_RESEND 29268 -#define IDS_DOM_DISTILLER_JAVASCRIPT_DISABLED_CONTENT 29269 -#define IDS_DOM_DISTILLER_WEBUI_ENTRY_URL 29270 -#define IDS_DOM_DISTILLER_WEBUI_ENTRY_ADD 29271 -#define IDS_DOM_DISTILLER_WEBUI_ENTRY_ADD_FAILED 29272 -#define IDS_DOM_DISTILLER_WEBUI_VIEW_URL 29273 -#define IDS_DOM_DISTILLER_WEBUI_VIEW_URL_FAILED 29274 -#define IDS_DOM_DISTILLER_WEBUI_REFRESH 29275 -#define IDS_DOM_DISTILLER_WEBUI_FETCHING_ENTRIES 29276 -#define IDS_DOM_DISTILLER_VIEWER_CLOSE_READER_VIEW 29277 -#define IDS_DOM_DISTILLER_VIEWER_FAILED_TO_FIND_ARTICLE_TITLE 29278 -#define IDS_DOM_DISTILLER_VIEWER_FAILED_TO_FIND_ARTICLE_CONTENT 29279 -#define IDS_DOM_DISTILLER_VIEWER_LOADING_TITLE 29280 -#define IDS_DOM_DISTILLER_VIEWER_NO_DATA_CONTENT 29281 -#define IDS_DOM_DISTILLER_VIEWER_LOADING_STRING 29282 -#define IDS_DOM_DISTILLER_QUALITY_QUESTION 29283 -#define IDS_DOM_DISTILLER_QUALITY_ANSWER_YES 29284 -#define IDS_DOM_DISTILLER_QUALITY_ANSWER_NO 29285 -#define IDS_DOM_DISTILLER_WEBUI_TITLE 29286 -#define IDS_FLAGS_ENHANCED_BOOKMARKS_NAME 29287 -#define IDS_FLAGS_ENHANCED_BOOKMARKS_DESCRIPTION 29288 -#define IDS_ERRORPAGE_NET_BUTTON_DETAILS 29289 -#define IDS_ERRORPAGE_NET_BUTTON_HIDE_DETAILS 29290 -#define IDS_ERRORPAGES_BUTTON_MORE 29291 -#define IDS_ERRORPAGES_BUTTON_LESS 29292 -#define IDS_ERRORPAGES_BUTTON_RELOAD 29293 -#define IDS_ERRORPAGES_BUTTON_SHOW_SAVED_COPY 29294 -#define IDS_ERRORPAGES_BUTTON_SHOW_SAVED_COPY_HELP 29295 -#define IDS_ERRORPAGE_FUN_DISABLED 29299 -#define IDS_ERRORPAGES_BUTTON_DIAGNOSE 29300 -#define IDS_ERRORPAGES_SUGGESTION_VISIT_GOOGLE_CACHE 29302 -#define IDS_ERRORPAGES_SUGGESTION_CORRECTED_URL 29303 -#define IDS_ERRORPAGES_SUGGESTION_ALTERNATE_URL 29304 -#define IDS_ERRORPAGES_SUGGESTION_RELOAD_REPOST_HEADER 29305 -#define IDS_ERRORPAGES_SUGGESTION_RELOAD_REPOST_BODY 29306 -#define IDS_ERRORPAGES_SUGGESTION_DISABLE_EXTENSION_HEADER 29307 -#define IDS_ERRORPAGES_SUGGESTION_CHECK_CONNECTION_HEADER 29308 -#define IDS_ERRORPAGES_SUGGESTION_CHECK_CONNECTION_BODY 29309 -#define IDS_ERRORPAGES_SUGGESTION_DNS_CONFIG_HEADER 29310 -#define IDS_ERRORPAGES_SUGGESTION_DNS_CONFIG_BODY 29311 -#define IDS_ERRORPAGES_SUGGESTION_NETWORK_PREDICTION_HEADER 29312 -#define IDS_ERRORPAGES_SUGGESTION_FIREWALL_CONFIG_BODY 29313 -#define IDS_ERRORPAGES_SUGGESTION_PROXY_CONFIG_HEADER 29314 -#define IDS_ERRORPAGES_SUGGESTION_PROXY_CONFIG_BODY 29315 -#define IDS_ERRORPAGES_SUGGESTION_LEARNMORE_BODY 29317 -#define IDS_ERRORPAGES_SUGGESTION_VIEW_POLICIES_HEADER 29318 -#define IDS_ERRORPAGES_SUGGESTION_VIEW_POLICIES_BODY 29319 -#define IDS_ERRORPAGES_SUGGESTION_CONTACT_ADMINISTRATOR_BODY 29320 -#define IDS_ERRORPAGES_SUGGESTION_GOOGLE_SEARCH 29321 -#define IDS_ERRORPAGES_TITLE_NOT_AVAILABLE 29322 -#define IDS_ERRORPAGES_TITLE_ACCESS_DENIED 29323 -#define IDS_ERRORPAGES_TITLE_NOT_FOUND 29324 -#define IDS_ERRORPAGES_TITLE_LOAD_FAILED 29325 -#define IDS_ERRORPAGES_TITLE_BLOCKED 29326 -#define IDS_ERRORPAGES_HEADING_NOT_AVAILABLE 29327 -#define IDS_ERRORPAGES_HEADING_NETWORK_ACCESS_DENIED 29328 -#define IDS_ERRORPAGES_HEADING_INTERNET_DISCONNECTED 29329 -#define IDS_ERRORPAGES_HEADING_CACHE_READ_FAILURE 29330 -#define IDS_ERRORPAGES_HEADING_CONNECTION_INTERRUPTED 29331 -#define IDS_ERRORPAGES_HEADING_NOT_FOUND 29332 -#define IDS_ERRORPAGES_HEADING_FILE_NOT_FOUND 29333 -#define IDS_ERRORPAGES_HEADING_TOO_MANY_REDIRECTS 29334 -#define IDS_ERRORPAGES_HEADING_EMPTY_RESPONSE 29335 -#define IDS_ERRORPAGES_HEADING_BLOCKED 29336 -#define IDS_ERRORPAGES_SUMMARY_NOT_AVAILABLE 29337 -#define IDS_ERRORPAGES_SUMMARY_TIMED_OUT 29338 -#define IDS_ERRORPAGES_SUMMARY_CONNECTION_RESET 29339 -#define IDS_ERRORPAGES_SUMMARY_CONNECTION_CLOSED 29340 -#define IDS_ERRORPAGES_SUMMARY_CONNECTION_FAILED 29341 -#define IDS_ERRORPAGES_SUMMARY_NETWORK_CHANGED 29342 -#define IDS_ERRORPAGES_SUMMARY_CONNECTION_REFUSED 29343 -#define IDS_ERRORPAGES_SUMMARY_NAME_NOT_RESOLVED 29344 -#define IDS_ERRORPAGES_SUMMARY_DNS_DEFINITION 29345 -#define IDS_ERRORPAGES_SUMMARY_ICANN_NAME_COLLISION 29346 -#define IDS_ERRORPAGES_SUMMARY_ADDRESS_UNREACHABLE 29347 -#define IDS_ERRORPAGES_SUMMARY_FILE_ACCESS_DENIED 29348 -#define IDS_ERRORPAGES_SUMMARY_NETWORK_ACCESS_DENIED 29349 -#define IDS_ERRORPAGES_SUMMARY_PROXY_CONNECTION_FAILED 29350 -#define IDS_ERRORPAGES_SUMMARY_INTERNET_DISCONNECTED_INSTRUCTIONS_TEMPLATE 29352 -#define IDS_ERRORPAGES_SUMMARY_INTERNET_DISCONNECTED 29351 -#define IDS_ERRORPAGES_SUMMARY_INTERNET_DISCONNECTED_PLATFORM 29353 -#define IDS_ERRORPAGES_SUMMARY_INTERNET_DISCONNECTED_PLATFORM_VISTA 29354 -#define IDS_ERRORPAGES_SUMMARY_INTERNET_DISCONNECTED_PLATFORM_XP 29355 -#define IDS_ERRORPAGES_SUMMARY_CACHE_READ_FAILURE 29356 -#define IDS_ERRORPAGES_SUMMARY_NETWORK_IO_SUSPENDED 29357 -#define IDS_ERRORPAGES_SUMMARY_NOT_FOUND 29358 -#define IDS_ERRORPAGES_SUMMARY_FILE_NOT_FOUND 29359 -#define IDS_ERRORPAGES_SUMMARY_TOO_MANY_REDIRECTS 29360 -#define IDS_ERRORPAGES_SUMMARY_EMPTY_RESPONSE 29361 -#define IDS_ERRORPAGES_SUMMARY_INVALID_RESPONSE 29362 -#define IDS_ERRORPAGES_SUMMARY_DNS_PROBE_RUNNING 29363 -#define IDS_ERRORPAGES_DETAILS_TIMED_OUT 29364 -#define IDS_ERRORPAGES_DETAILS_CONNECTION_CLOSED 29365 -#define IDS_ERRORPAGES_DETAILS_CONNECTION_RESET 29366 -#define IDS_ERRORPAGES_DETAILS_CONNECTION_REFUSED 29367 -#define IDS_ERRORPAGES_DETAILS_CONNECTION_FAILED 29368 -#define IDS_ERRORPAGES_DETAILS_NETWORK_CHANGED 29369 -#define IDS_ERRORPAGES_DETAILS_NAME_NOT_RESOLVED 29370 -#define IDS_ERRORPAGES_DETAILS_ICANN_NAME_COLLISION 29371 -#define IDS_ERRORPAGES_DETAILS_ADDRESS_UNREACHABLE 29372 -#define IDS_ERRORPAGES_DETAILS_NETWORK_ACCESS_DENIED 29373 -#define IDS_ERRORPAGES_DETAILS_FILE_ACCESS_DENIED 29374 -#define IDS_ERRORPAGES_DETAILS_PROXY_CONNECTION_FAILED 29375 -#define IDS_ERRORPAGES_DETAILS_INTERNET_DISCONNECTED 29376 -#define IDS_ERRORPAGES_DETAILS_CACHE_READ_FAILURE 29377 -#define IDS_ERRORPAGES_DETAILS_NETWORK_IO_SUSPENDED 29378 -#define IDS_ERRORPAGES_DETAILS_FILE_NOT_FOUND 29379 -#define IDS_ERRORPAGES_DETAILS_TOO_MANY_REDIRECTS 29380 -#define IDS_ERRORPAGES_DETAILS_EMPTY_RESPONSE 29381 -#define IDS_ERRORPAGES_DETAILS_RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH 29382 -#define IDS_ERRORPAGES_DETAILS_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION 29383 -#define IDS_ERRORPAGES_DETAILS_RESPONSE_HEADERS_MULTIPLE_LOCATION 29384 -#define IDS_ERRORPAGES_DETAILS_DNS_PROBE_RUNNING 29385 -#define IDS_ERRORPAGES_DETAILS_UNKNOWN 29386 -#define IDS_ERRORPAGES_HEADING_ACCESS_DENIED 29387 -#define IDS_ERRORPAGES_HEADING_FILE_ACCESS_DENIED 29388 -#define IDS_ERRORPAGES_SUMMARY_FORBIDDEN 29389 -#define IDS_ERRORPAGES_DETAILS_FORBIDDEN 29390 -#define IDS_ERRORPAGES_SUMMARY_GONE 29391 -#define IDS_ERRORPAGES_DETAILS_GONE 29392 -#define IDS_ERRORPAGES_HEADING_PAGE_NOT_WORKING 29393 -#define IDS_ERRORPAGES_DETAILS_INTERNAL_SERVER_ERROR 29394 -#define IDS_ERRORPAGES_SUMMARY_WEBSITE_CANNOT_HANDLE_REQUEST 29395 -#define IDS_ERRORPAGES_DETAILS_NOT_IMPLEMENTED 29396 -#define IDS_ERRORPAGES_DETAILS_BAD_GATEWAY 29397 -#define IDS_ERRORPAGES_SUMMARY_SERVICE_UNAVAILABLE 29398 -#define IDS_ERRORPAGES_DETAILS_SERVICE_UNAVAILABLE 29399 -#define IDS_ERRORPAGES_SUMMARY_GATEWAY_TIMEOUT 29400 -#define IDS_ERRORPAGES_DETAILS_GATEWAY_TIMEOUT 29401 -#define IDS_ERRORPAGES_SUMMARY_SSL_SECURITY_ERROR 29402 -#define IDS_ERRORPAGES_DETAILS_SSL_PROTOCOL_ERROR 29403 -#define IDS_ERRORPAGES_DETAILS_SSL_FALLBACK_BEYOND_MINIMUM_VERSION 29404 -#define IDS_ERRORPAGES_SUMMARY_SSL_VERSION_OR_CIPHER_MISMATCH 29405 -#define IDS_ERRORPAGES_DETAILS_SSL_VERSION_OR_CIPHER_MISMATCH 29406 -#define IDS_ERRORPAGES_SUGGESTION_UNSUPPORTED_CIPHER 29407 -#define IDS_ERRORPAGES_SUMMARY_PINNING_FAILURE_DETAILS 29408 -#define IDS_ERRORPAGES_HEADING_INSECURE_CONNECTION 29409 -#define IDS_ERRORPAGES_SUMMARY_BAD_SSL_CLIENT_AUTH_CERT 29410 -#define IDS_ERRORPAGES_DETAILS_BAD_SSL_CLIENT_AUTH_CERT 29411 -#define IDS_ERRORPAGES_DETAILS_TEMPORARILY_THROTTLED 29412 -#define IDS_ERRORPAGES_SUMMARY_TEMPORARY_BACKOFF 29413 -#define IDS_ERRORPAGES_DETAILS_TEMPORARY_BACKOFF 29414 -#define IDS_ERRORPAGES_SUMMARY_BLOCKED_BY_EXTENSION 29415 -#define IDS_ERRORPAGES_SUMMARY_BLOCKED_BY_ADMINISTRATOR 29416 -#define IDS_ERRORPAGES_DETAILS_BLOCKED_BY_EXTENSION 29417 -#define IDS_ERRORPAGES_DETAILS_BLOCKED_BY_ADMINISTRATOR 29418 -#define IDS_ERRORPAGES_DETAILS_BLOCKED_ENROLLMENT_CHECK_PENDING 29419 -#define IDS_ERRORPAGES_HTTP_POST_WARNING 29420 -#define IDS_FLAGS_UI_LONG_TITLE 29432 -#define IDS_FLAGS_UI_TABLE_TITLE 29433 -#define IDS_FLAGS_UI_WARNING_HEADER 29434 -#define IDS_FLAGS_UI_WARNING_TEXT 29435 -#define IDS_FLAGS_UI_PROMOTE_BETA_CHANNEL 29436 -#define IDS_FLAGS_UI_PROMOTE_DEV_CHANNEL 29437 -#define IDS_FLAGS_UI_DISABLE 29438 -#define IDS_FLAGS_UI_ENABLE 29439 -#define IDS_FLAGS_UI_RESET_ALL_BUTTON 29440 -#define IDS_FLAGS_UI_UNSUPPORTED_TABLE_TITLE 29441 -#define IDS_FLAGS_UI_NOT_AVAILABLE 29442 -#define IDS_FLAGS_UI_ENABLE_NACL_NAME 29443 -#define IDS_FLAGS_UI_RELAUNCH_BUTTON 29444 -#define IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC 29446 -#define IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT 29447 -#define IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED 29448 -#define IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED 29449 -#define IDS_HISTORY_ACTION_MENU_DESCRIPTION 29452 -#define IDS_HISTORY_BLOCKED_VISIT_TEXT 29453 -#define IDS_HISTORY_BROWSERESULTS 29454 -#define IDS_HISTORY_CONTINUED 29455 -#define IDS_HISTORY_DATE_WITH_RELATIVE_TIME 29456 -#define IDS_HISTORY_DELETE_PRIOR_VISITS_CONFIRM_BUTTON 29457 -#define IDS_HISTORY_DELETE_PRIOR_VISITS_WARNING 29458 -#define IDS_HISTORY_DELETE_PRIOR_VISITS_WARNING_NO_INCOGNITO 29459 -#define IDS_HISTORY_ENTRY_BOOKMARKED 29460 -#define IDS_HISTORY_ENTRY_SUMMARY 29461 -#define IDS_HISTORY_FILTER_ALLOW_ITEMS 29462 -#define IDS_HISTORY_FILTER_ALLOWED 29463 -#define IDS_HISTORY_FILTER_BLOCK_ITEMS 29464 -#define IDS_HISTORY_FILTER_BLOCKED 29465 -#define IDS_HISTORY_FOUND_SEARCH_RESULTS 29466 -#define IDS_HISTORY_GROUP_BY_DOMAIN_LABEL 29467 -#define IDS_HISTORY_HAS_SYNCED_RESULTS 29468 -#define IDS_HISTORY_IN_CONTENT_PACK 29469 -#define IDS_HISTORY_INTERVAL 29470 -#define IDS_HISTORY_LOADING 29471 -#define IDS_HISTORY_MORE_FROM_SITE 29472 -#define IDS_HISTORY_NEWER 29473 -#define IDS_HISTORY_NEWEST 29474 -#define IDS_HISTORY_NO_RESULTS 29475 -#define IDS_HISTORY_NO_SEARCH_RESULTS 29476 -#define IDS_HISTORY_NO_SYNCED_RESULTS 29477 -#define IDS_HISTORY_NUMBER_VISITS 29478 -#define IDS_HISTORY_OLDER 29479 -#define IDS_HISTORY_OPEN_CLEAR_BROWSING_DATA_DIALOG 29480 -#define IDS_HISTORY_OTHER_DEVICES_X_MORE 29481 -#define IDS_HISTORY_OTHER_SESSIONS_COLLAPSE_SESSION 29482 -#define IDS_HISTORY_OTHER_SESSIONS_EXPAND_SESSION 29483 -#define IDS_HISTORY_OTHER_SESSIONS_OPEN_ALL 29484 -#define IDS_HISTORY_RANGE_ALL_TIME 29485 -#define IDS_HISTORY_RANGE_LABEL 29486 -#define IDS_HISTORY_RANGE_MONTH 29487 -#define IDS_HISTORY_RANGE_NEXT 29488 -#define IDS_HISTORY_RANGE_PREVIOUS 29489 -#define IDS_HISTORY_RANGE_TODAY 29490 -#define IDS_HISTORY_RANGE_WEEK 29491 -#define IDS_HISTORY_REMOVE_BOOKMARK 29492 -#define IDS_HISTORY_REMOVE_PAGE 29493 -#define IDS_HISTORY_REMOVE_SELECTED_ITEMS 29494 -#define IDS_HISTORY_SEARCH_BUTTON 29495 -#define IDS_HISTORY_SEARCH_RESULT 29496 -#define IDS_HISTORY_SEARCH_RESULTS 29497 -#define IDS_HISTORY_SEARCHRESULTSFOR 29498 -#define IDS_HISTORY_TITLE 29499 -#define IDS_HISTORY_UNKNOWN_DEVICE 29500 -#define IDS_AUTOCOMPLETE_SEARCH_DESCRIPTION 29501 -#define IDS_KEYWORD_SEARCH 29502 -#define IDS_EXTENSION_KEYWORD_COMMAND 29503 -#define IDS_EMPTY_KEYWORD_VALUE 29504 -#define IDS_LINK_FROM_CLIPBOARD 29505 -#define IDS_PASSWORD_MANAGER_EMPTY_LOGIN 29506 -#define IDS_PASSWORD_MANAGER_SMART_LOCK 29507 -#define IDS_PDF_NEED_PASSWORD 29508 -#define IDS_PDF_PASSWORD_SUBMIT 29509 -#define IDS_PDF_PASSWORD_INVALID 29510 -#define IDS_PDF_PAGE_LOADING 29511 -#define IDS_PDF_PAGE_LOAD_FAILED 29512 -#define IDS_PDF_PAGE_RELOAD_BUTTON 29513 -#define IDS_PDF_BOOKMARKS 29514 -#define IDS_PDF_TOOLTIP_ROTATE_CW 29515 -#define IDS_PDF_TOOLTIP_DOWNLOAD 29516 -#define IDS_PDF_TOOLTIP_PRINT 29517 -#define IDS_PDF_TOOLTIP_FIT_PAGE 29518 -#define IDS_PDF_TOOLTIP_FIT_WIDTH 29519 -#define IDS_PDF_TOOLTIP_ZOOM_IN 29520 -#define IDS_PDF_TOOLTIP_ZOOM_OUT 29521 -#define IDS_PDF_LABEL_PAGE_NUMBER 29522 -#define IDS_POLICY_DM_STATUS_SUCCESS 29523 -#define IDS_POLICY_DM_STATUS_REQUEST_INVALID 29524 -#define IDS_POLICY_DM_STATUS_REQUEST_FAILED 29525 -#define IDS_POLICY_DM_STATUS_TEMPORARY_UNAVAILABLE 29526 -#define IDS_POLICY_DM_STATUS_HTTP_STATUS_ERROR 29527 -#define IDS_POLICY_DM_STATUS_RESPONSE_DECODING_ERROR 29528 -#define IDS_POLICY_DM_STATUS_SERVICE_MANAGEMENT_NOT_SUPPORTED 29529 -#define IDS_POLICY_DM_STATUS_SERVICE_DEVICE_NOT_FOUND 29530 -#define IDS_POLICY_DM_STATUS_SERVICE_MANAGEMENT_TOKEN_INVALID 29531 -#define IDS_POLICY_DM_STATUS_SERVICE_ACTIVATION_PENDING 29532 -#define IDS_POLICY_DM_STATUS_SERVICE_INVALID_SERIAL_NUMBER 29533 -#define IDS_POLICY_DM_STATUS_SERVICE_DEVICE_ID_CONFLICT 29534 -#define IDS_POLICY_DM_STATUS_SERVICE_MISSING_LICENSES 29535 -#define IDS_POLICY_DM_STATUS_SERVICE_DEPROVISIONED 29536 -#define IDS_POLICY_DM_STATUS_SERVICE_POLICY_NOT_FOUND 29537 -#define IDS_POLICY_DM_STATUS_UNKNOWN_ERROR 29538 -#define IDS_POLICY_DM_STATUS_SERVICE_DOMAIN_MISMATCH 29539 -#define IDS_POLICY_VALIDATION_OK 29540 -#define IDS_POLICY_VALIDATION_BAD_INITIAL_SIGNATURE 29541 -#define IDS_POLICY_VALIDATION_BAD_SIGNATURE 29542 -#define IDS_POLICY_VALIDATION_ERROR_CODE_PRESENT 29543 -#define IDS_POLICY_VALIDATION_PAYLOAD_PARSE_ERROR 29544 -#define IDS_POLICY_VALIDATION_WRONG_POLICY_TYPE 29545 -#define IDS_POLICY_VALIDATION_WRONG_SETTINGS_ENTITY_ID 29546 -#define IDS_POLICY_VALIDATION_BAD_TIMESTAMP 29547 -#define IDS_POLICY_VALIDATION_WRONG_TOKEN 29548 -#define IDS_POLICY_VALIDATION_BAD_USERNAME 29549 -#define IDS_POLICY_VALIDATION_POLICY_PARSE_ERROR 29550 -#define IDS_POLICY_VALIDATION_BAD_KEY_VERIFICATION_SIGNATURE 29551 -#define IDS_POLICY_VALIDATION_UNKNOWN_ERROR 29552 -#define IDS_POLICY_STORE_STATUS_OK 29553 -#define IDS_POLICY_STORE_STATUS_LOAD_ERROR 29554 -#define IDS_POLICY_STORE_STATUS_STORE_ERROR 29555 -#define IDS_POLICY_STORE_STATUS_PARSE_ERROR 29556 -#define IDS_POLICY_STORE_STATUS_SERIALIZE_ERROR 29557 -#define IDS_POLICY_STORE_STATUS_VALIDATION_ERROR 29558 -#define IDS_POLICY_STORE_STATUS_BAD_STATE 29559 -#define IDS_POLICY_STORE_STATUS_UNKNOWN_ERROR 29560 -#define IDS_POLICY_ASSOCIATION_STATE_ACTIVE 29561 -#define IDS_POLICY_ASSOCIATION_STATE_UNMANAGED 29562 -#define IDS_POLICY_ASSOCIATION_STATE_DEPROVISIONED 29563 -#define IDS_POLICY_TYPE_ERROR 29564 -#define IDS_POLICY_OUT_OF_RANGE_ERROR 29565 -#define IDS_POLICY_VALUE_FORMAT_ERROR 29566 -#define IDS_POLICY_DEFAULT_SEARCH_DISABLED 29567 -#define IDS_POLICY_NOT_SPECIFIED_ERROR 29568 -#define IDS_POLICY_SUBKEY_ERROR 29569 -#define IDS_POLICY_LIST_ENTRY_ERROR 29570 -#define IDS_POLICY_SCHEMA_VALIDATION_ERROR 29571 -#define IDS_POLICY_INVALID_SEARCH_URL_ERROR 29572 -#define IDS_POLICY_INVALID_PROXY_MODE_ERROR 29573 -#define IDS_POLICY_INVALID_UPDATE_URL_ERROR 29574 -#define IDS_POLICY_PROXY_MODE_DISABLED_ERROR 29575 -#define IDS_POLICY_PROXY_MODE_AUTO_DETECT_ERROR 29576 -#define IDS_POLICY_PROXY_MODE_PAC_URL_ERROR 29577 -#define IDS_POLICY_PROXY_MODE_FIXED_SERVERS_ERROR 29578 -#define IDS_POLICY_PROXY_MODE_SYSTEM_ERROR 29579 -#define IDS_POLICY_PROXY_BOTH_SPECIFIED_ERROR 29580 -#define IDS_POLICY_PROXY_NEITHER_SPECIFIED_ERROR 29581 -#define IDS_POLICY_OVERRIDDEN 29582 -#define IDS_POLICY_DEPRECATED 29583 -#define IDS_POLICY_VALUE_DEPRECATED 29584 -#define IDS_POLICY_LEVEL_ERROR 29589 -#define IDS_POLICY_OK 29590 -#define IDS_POLICY_UNSET 29591 -#define IDS_POLICY_UNKNOWN 29592 -#define IDS_POLICY_TITLE 29593 -#define IDS_POLICY_FILTER_PLACEHOLDER 29594 -#define IDS_POLICY_RELOAD_POLICIES 29595 -#define IDS_POLICY_STATUS 29596 -#define IDS_POLICY_STATUS_DEVICE 29597 -#define IDS_POLICY_STATUS_USER 29598 -#define IDS_POLICY_LABEL_DOMAIN 29599 -#define IDS_POLICY_LABEL_USERNAME 29600 -#define IDS_POLICY_LABEL_CLIENT_ID 29601 -#define IDS_POLICY_LABEL_ASSET_ID 29602 -#define IDS_POLICY_LABEL_LOCATION 29603 -#define IDS_POLICY_LABEL_DIRECTORY_API_ID 29604 -#define IDS_POLICY_LABEL_TIME_SINCE_LAST_REFRESH 29605 -#define IDS_POLICY_NOT_SPECIFIED 29606 -#define IDS_POLICY_NEVER_FETCHED 29607 -#define IDS_POLICY_LABEL_REFRESH_INTERVAL 29608 -#define IDS_POLICY_LABEL_STATUS 29609 -#define IDS_POLICY_SHOW_UNSET 29610 -#define IDS_POLICY_NO_POLICIES_SET 29611 -#define IDS_POLICY_HEADER_SCOPE 29612 -#define IDS_POLICY_HEADER_LEVEL 29613 -#define IDS_POLICY_HEADER_NAME 29614 -#define IDS_POLICY_HEADER_VALUE 29615 -#define IDS_POLICY_HEADER_STATUS 29616 -#define IDS_POLICY_HEADER_SOURCE 29617 -#define IDS_POLICY_SHOW_EXPANDED_VALUE 29618 -#define IDS_POLICY_HIDE_EXPANDED_VALUE 29619 -#define IDS_POLICY_SCOPE_USER 29620 -#define IDS_POLICY_SCOPE_DEVICE 29621 -#define IDS_POLICY_LEVEL_RECOMMENDED 29622 -#define IDS_POLICY_LEVEL_MANDATORY 29623 -#define IDS_POLICY_INVALID_BOOKMARK 29624 -#define IDS_POLICY_SOURCE_ENTERPRISE_DEFAULT 29625 -#define IDS_POLICY_SOURCE_CLOUD 29626 -#define IDS_POLICY_SOURCE_PLATFORM 29627 -#define IDS_POLICY_SOURCE_PUBLIC_SESSION_OVERRIDE 29628 -#define IDS_POLICY_RISK_TAG_FULL_ADMIN_ACCESS 29629 -#define IDS_POLICY_RISK_TAG_SYSTEM_SECURITY 29630 -#define IDS_POLICY_RISK_TAG_WEBSITE_SHARING 29631 -#define IDS_POLICY_RISK_TAG_ADMIN_SHARING 29632 -#define IDS_POLICY_RISK_TAG_FILTERING 29633 -#define IDS_POLICY_RISK_TAG_LOCAL_DATA_ACCESS 29634 -#define IDS_POLICY_RISK_TAG_GOOGLE_SHARING 29635 -#define IDS_SSL_OPEN_DETAILS_BUTTON 29636 -#define IDS_SSL_CLOSE_DETAILS_BUTTON 29637 -#define IDS_CLOCK_ERROR_TITLE 29638 -#define IDS_CLOCK_ERROR_AHEAD_HEADING 29639 -#define IDS_CLOCK_ERROR_BEHIND_HEADING 29640 -#define IDS_CLOCK_ERROR_UPDATE_DATE_AND_TIME 29641 -#define IDS_CLOCK_ERROR_PRIMARY_PARAGRAPH 29642 -#define IDS_CLOCK_ERROR_EXPLANATION 29643 -#define IDS_SAFE_BROWSING_PRIVACY_POLICY_URL 29644 -#define IDS_SSL_V2_TITLE 29645 -#define IDS_SSL_V2_HEADING 29646 -#define IDS_SSL_V2_PRIMARY_PARAGRAPH 29647 -#define IDS_SSL_NONOVERRIDABLE_MORE 29648 -#define IDS_SSL_NONOVERRIDABLE_INVALID 29649 -#define IDS_SSL_OVERRIDABLE_SAFETY_BUTTON 29650 -#define IDS_SSL_OVERRIDABLE_PROCEED_PARAGRAPH 29651 -#define IDS_SSL_RELOAD 29652 -#define IDS_SSL_NONOVERRIDABLE_PINNED 29653 -#define IDS_SSL_NONOVERRIDABLE_HSTS 29654 -#define IDS_SSL_NONOVERRIDABLE_REVOKED 29655 -#define IDS_CERT_ERROR_COMMON_NAME_INVALID_DETAILS 29656 -#define IDS_CERT_ERROR_COMMON_NAME_INVALID_DESCRIPTION 29657 -#define IDS_CERT_ERROR_EXPIRED_DETAILS 29658 -#define IDS_CERT_ERROR_EXPIRED_DESCRIPTION 29659 -#define IDS_CERT_ERROR_NOT_YET_VALID_DETAILS 29660 -#define IDS_CERT_ERROR_NOT_YET_VALID_DESCRIPTION 29661 -#define IDS_CERT_ERROR_NOT_VALID_AT_THIS_TIME_DETAILS 29662 -#define IDS_CERT_ERROR_NOT_VALID_AT_THIS_TIME_DESCRIPTION 29663 -#define IDS_CERT_ERROR_CHAIN_EXPIRED_DETAILS 29664 -#define IDS_CERT_ERROR_CHAIN_EXPIRED_DESCRIPTION 29665 -#define IDS_CERT_ERROR_AUTHORITY_INVALID_DESCRIPTION 29666 -#define IDS_CERT_ERROR_CONTAINS_ERRORS_DETAILS 29667 -#define IDS_CERT_ERROR_CONTAINS_ERRORS_DESCRIPTION 29668 -#define IDS_CERT_ERROR_UNABLE_TO_CHECK_REVOCATION_DETAILS 29669 -#define IDS_CERT_ERROR_UNABLE_TO_CHECK_REVOCATION_DESCRIPTION 29670 -#define IDS_CERT_ERROR_NO_REVOCATION_MECHANISM_DETAILS 29671 -#define IDS_CERT_ERROR_NO_REVOCATION_MECHANISM_DESCRIPTION 29672 -#define IDS_CERT_ERROR_REVOKED_CERT_DETAILS 29673 -#define IDS_CERT_ERROR_REVOKED_CERT_DESCRIPTION 29674 -#define IDS_CERT_ERROR_INVALID_CERT_DETAILS 29675 -#define IDS_CERT_ERROR_INVALID_CERT_DESCRIPTION 29676 -#define IDS_CERT_ERROR_WEAK_SIGNATURE_ALGORITHM_DETAILS 29677 -#define IDS_CERT_ERROR_WEAK_SIGNATURE_ALGORITHM_DESCRIPTION 29678 -#define IDS_CERT_ERROR_WEAK_KEY_DETAILS 29679 -#define IDS_CERT_ERROR_WEAK_KEY_DESCRIPTION 29680 -#define IDS_CERT_ERROR_NAME_CONSTRAINT_VIOLATION_DETAILS 29681 -#define IDS_CERT_ERROR_NAME_CONSTRAINT_VIOLATION_DESCRIPTION 29682 -#define IDS_CERT_ERROR_VALIDITY_TOO_LONG_DETAILS 29683 -#define IDS_CERT_ERROR_VALIDITY_TOO_LONG_DESCRIPTION 29684 -#define IDS_CERT_ERROR_UNKNOWN_ERROR_DETAILS 29685 -#define IDS_CERT_ERROR_UNKNOWN_ERROR_DESCRIPTION 29686 -#define IDS_CERT_ERROR_SUMMARY_PINNING_FAILURE_DETAILS 29687 -#define IDS_CERT_ERROR_SUMMARY_PINNING_FAILURE_DESCRIPTION 29688 -#define IDS_CERT_ERROR_AUTHORITY_INVALID_DETAILS 29689 -#define IDS_SYNC_BASIC_ENCRYPTION_DATA 29690 -#define IDS_SYNC_CONFIGURE_ENCRYPTION 29691 -#define IDS_SYNC_DATATYPE_AUTOFILL 29692 -#define IDS_SYNC_DATATYPE_BOOKMARKS 29693 -#define IDS_SYNC_DATATYPE_PASSWORDS 29694 -#define IDS_SYNC_DATATYPE_TABS 29695 -#define IDS_SYNC_DATATYPE_TYPED_URLS 29696 -#define IDS_SYNC_EMPTY_PASSPHRASE_ERROR 29697 -#define IDS_SYNC_ENCRYPTION_SECTION_TITLE 29698 -#define IDS_SYNC_ENTER_GOOGLE_PASSPHRASE_BODY 29699 -#define IDS_SYNC_FULL_ENCRYPTION_DATA 29700 -#define IDS_SYNC_LOGIN_INFO_OUT_OF_DATE 29701 -#define IDS_SYNC_LOGIN_SETTING_UP 29702 -#define IDS_SYNC_PASSPHRASE_LABEL 29703 -#define IDS_SYNC_PASSPHRASE_MISMATCH_ERROR 29704 -#define IDS_SYNC_SERVICE_UNAVAILABLE 29705 -#define IDS_SYNC_ENTER_PASSPHRASE_BODY_WITH_DATE 29706 -#define IDS_SYNC_ENTER_PASSPHRASE_BODY 29707 -#define IDS_TRANSLATE_INFOBAR_OPTIONS 29708 -#define IDS_TRANSLATE_INFOBAR_OPTIONS_NEVER_TRANSLATE_LANG 29709 -#define IDS_TRANSLATE_INFOBAR_OPTIONS_NEVER_TRANSLATE_SITE 29710 -#define IDS_TRANSLATE_INFOBAR_OPTIONS_ALWAYS 29711 -#define IDS_TRANSLATE_INFOBAR_OPTIONS_REPORT_ERROR 29712 -#define IDS_TRANSLATE_INFOBAR_OPTIONS_ABOUT 29713 -#define IDS_TRANSLATE_INFOBAR_BEFORE_MESSAGE 29714 -#define IDS_TRANSLATE_INFOBAR_ACCEPT 29717 -#define IDS_TRANSLATE_INFOBAR_DENY 29718 -#define IDS_TRANSLATE_INFOBAR_NEVER_TRANSLATE 29719 -#define IDS_TRANSLATE_INFOBAR_ALWAYS_TRANSLATE 29720 -#define IDS_TRANSLATE_INFOBAR_TRANSLATING_TO 29721 -#define IDS_TRANSLATE_INFOBAR_AFTER_MESSAGE 29722 -#define IDS_TRANSLATE_INFOBAR_AFTER_MESSAGE_AUTODETERMINED_SOURCE_LANGUAGE 29723 -#define IDS_TRANSLATE_INFOBAR_REVERT 29725 -#define IDS_TRANSLATE_INFOBAR_RETRY 29726 -#define IDS_TRANSLATE_INFOBAR_ERROR_CANT_CONNECT 29727 -#define IDS_TRANSLATE_INFOBAR_ERROR_CANT_TRANSLATE 29728 -#define IDS_TRANSLATE_INFOBAR_UNKNOWN_PAGE_LANGUAGE 29729 -#define IDS_TRANSLATE_INFOBAR_ERROR_SAME_LANGUAGE 29730 -#define IDS_TRANSLATE_INFOBAR_UNSUPPORTED_PAGE_LANGUAGE 29731 -#define IDS_BOOKMARK_BAR_UNDO 29733 -#define IDS_BOOKMARK_BAR_REDO 29734 -#define IDS_BOOKMARK_BAR_UNDO_ADD 29735 -#define IDS_BOOKMARK_BAR_REDO_ADD 29736 -#define IDS_BOOKMARK_BAR_UNDO_DELETE 29737 -#define IDS_BOOKMARK_BAR_REDO_DELETE 29738 -#define IDS_BOOKMARK_BAR_UNDO_EDIT 29739 -#define IDS_BOOKMARK_BAR_REDO_EDIT 29740 -#define IDS_BOOKMARK_BAR_UNDO_MOVE 29741 -#define IDS_BOOKMARK_BAR_REDO_MOVE 29742 -#define IDS_BOOKMARK_BAR_UNDO_REORDER 29743 -#define IDS_BOOKMARK_BAR_REDO_REORDER 29744 -#define IDS_VERSION_UI_TITLE 29745 -#define IDS_VERSION_UI_OFFICIAL 29746 -#define IDS_VERSION_UI_UNOFFICIAL 29747 -#define IDS_VERSION_UI_32BIT 29748 -#define IDS_VERSION_UI_64BIT 29749 -#define IDS_VERSION_UI_REVISION 29750 -#define IDS_VERSION_UI_OS 29751 -#define IDS_VERSION_UI_USER_AGENT 29752 -#define IDS_VERSION_UI_COMMAND_LINE 29753 -#define IDS_VERSION_UI_EXECUTABLE_PATH 29755 -#define IDS_VERSION_UI_PROFILE_PATH 29756 -#define IDS_VERSION_UI_PATH_NOTFOUND 29757 -#define IDS_VERSION_UI_VARIATIONS 29758 -#define IDS_CANCEL 29760 -#define IDS_CLOSE 29761 -#define IDS_DONE 29762 -#define IDS_LEARN_MORE 29763 -#define IDS_OK 29764 -#define IDS_PRINT 29765 -#define IDS_ACCNAME_BACK 29766 -#define IDS_ACCNAME_FORWARD 29767 -#define IDS_ACCNAME_CLOSE 29768 -#define IDS_ACCNAME_LOCATION 29769 -#define IDS_UTILITY_PROCESS_JSON_PARSER_NAME 29770 - -// --------------------------------------------------------------------------- -// From content_strings.h: - -#define IDS_DETAILS_WITHOUT_SUMMARY_LABEL 18900 -#define IDS_SEARCHABLE_INDEX_INTRO 18901 -#define IDS_FORM_CALENDAR_CLEAR 18902 -#define IDS_FORM_CALENDAR_TODAY 18903 -#define IDS_FORM_DATE_FORMAT_DAY_IN_MONTH 18904 -#define IDS_FORM_DATE_FORMAT_MONTH 18905 -#define IDS_FORM_DATE_FORMAT_YEAR 18906 -#define IDS_FORM_SUBMIT_LABEL 18907 -#define IDS_FORM_INPUT_ALT 18908 -#define IDS_FORM_RESET_LABEL 18909 -#define IDS_FORM_FILE_BUTTON_LABEL 18910 -#define IDS_FORM_MULTIPLE_FILES_BUTTON_LABEL 18911 -#define IDS_FORM_FILE_NO_FILE_LABEL 18912 -#define IDS_FORM_FILE_MULTIPLE_UPLOAD 18913 -#define IDS_FORM_OTHER_COLOR_LABEL 18914 -#define IDS_FORM_OTHER_DATE_LABEL 18915 -#define IDS_FORM_OTHER_MONTH_LABEL 18916 -#define IDS_FORM_OTHER_TIME_LABEL 18917 -#define IDS_FORM_OTHER_WEEK_LABEL 18918 -#define IDS_FORM_PLACEHOLDER_FOR_DAY_OF_MONTH_FIELD 18919 -#define IDS_FORM_PLACEHOLDER_FOR_MONTH_FIELD 18920 -#define IDS_FORM_PLACEHOLDER_FOR_YEAR_FIELD 18921 -#define IDS_FORM_SELECT_MENU_LIST_TEXT 18922 -#define IDS_FORM_THIS_MONTH_LABEL 18923 -#define IDS_FORM_THIS_WEEK_LABEL 18924 -#define IDS_FORM_WEEK_NUMBER_LABEL 18925 -#define IDS_RECENT_SEARCHES_NONE 18926 -#define IDS_RECENT_SEARCHES 18927 -#define IDS_RECENT_SEARCHES_CLEAR 18928 -#define IDS_AX_CALENDAR_SHOW_MONTH_SELECTOR 18929 -#define IDS_AX_CALENDAR_SHOW_NEXT_MONTH 18930 -#define IDS_AX_CALENDAR_SHOW_PREVIOUS_MONTH 18931 -#define IDS_AX_CALENDAR_WEEK_DESCRIPTION 18932 -#define IDS_AX_ROLE_ADDRESS 18933 -#define IDS_AX_ROLE_ARTICLE 18934 -#define IDS_AX_ROLE_BANNER 18935 -#define IDS_AX_ROLE_COMPLEMENTARY 18936 -#define IDS_AX_ROLE_CHECK_BOX 18937 -#define IDS_AX_ROLE_DESCRIPTION_DETAIL 18938 -#define IDS_AX_ROLE_DESCRIPTION_LIST 18939 -#define IDS_AX_ROLE_DESCRIPTION_TERM 18940 -#define IDS_AX_ROLE_FIGURE 18941 -#define IDS_AX_ROLE_FORM 18942 -#define IDS_AX_ROLE_HEADING 18946 -#define IDS_AX_ROLE_IMAGE_MAP 18947 -#define IDS_AX_ROLE_LINK 18948 -#define IDS_AX_ROLE_LIST_MARKER 18949 -#define IDS_AX_ROLE_MAIN_CONTENT 18950 -#define IDS_AX_ROLE_MARK 18951 -#define IDS_AX_ROLE_MATH 18952 -#define IDS_AX_ROLE_NAVIGATIONAL_LINK 18953 -#define IDS_AX_ROLE_REGION 18954 -#define IDS_AX_ROLE_SEARCH_BOX 18955 -#define IDS_AX_ROLE_STATUS 18956 -#define IDS_AX_ROLE_SWITCH 18957 -#define IDS_AX_ROLE_WEB_AREA 18958 -#define IDS_AX_BUTTON_ACTION_VERB 18959 -#define IDS_AX_RADIO_BUTTON_ACTION_VERB 18960 -#define IDS_AX_TEXT_FIELD_ACTION_VERB 18961 -#define IDS_AX_CHECKED_CHECK_BOX_ACTION_VERB 18962 -#define IDS_AX_UNCHECKED_CHECK_BOX_ACTION_VERB 18963 -#define IDS_AX_LINK_ACTION_VERB 18964 -#define IDS_AX_AM_PM_FIELD_TEXT 18965 -#define IDS_AX_DAY_OF_MONTH_FIELD_TEXT 18966 -#define IDS_AX_DATE_TIME_FIELD_EMPTY_VALUE_TEXT 18967 -#define IDS_AX_HOUR_FIELD_TEXT 18968 -#define IDS_AX_MEDIA_DEFAULT 18969 -#define IDS_AX_MEDIA_AUDIO_ELEMENT 18970 -#define IDS_AX_MEDIA_VIDEO_ELEMENT 18971 -#define IDS_AX_MEDIA_MUTE_BUTTON 18972 -#define IDS_AX_MEDIA_UNMUTE_BUTTON 18973 -#define IDS_AX_MEDIA_PLAY_BUTTON 18974 -#define IDS_AX_MEDIA_PAUSE_BUTTON 18975 -#define IDS_AX_MEDIA_SLIDER 18976 -#define IDS_AX_MEDIA_SLIDER_THUMB 18977 -#define IDS_AX_MEDIA_CURRENT_TIME_DISPLAY 18978 -#define IDS_AX_MEDIA_TIME_REMAINING_DISPLAY 18979 -#define IDS_AX_MEDIA_STATUS_DISPLAY 18980 -#define IDS_AX_MEDIA_ENTER_FULL_SCREEN_BUTTON 18981 -#define IDS_AX_MEDIA_EXIT_FULL_SCREEN_BUTTON 18982 -#define IDS_AX_MEDIA_SHOW_CLOSED_CAPTIONS_BUTTON 18983 -#define IDS_AX_MEDIA_HIDE_CLOSED_CAPTIONS_BUTTON 18984 -#define IDS_AX_MEDIA_CAST_OFF_BUTTON 18985 -#define IDS_AX_MEDIA_CAST_ON_BUTTON 18986 -#define IDS_AX_MEDIA_AUDIO_ELEMENT_HELP 18987 -#define IDS_AX_MEDIA_VIDEO_ELEMENT_HELP 18988 -#define IDS_AX_MEDIA_MUTE_BUTTON_HELP 18989 -#define IDS_AX_MEDIA_UNMUTE_BUTTON_HELP 18990 -#define IDS_AX_MEDIA_PLAY_BUTTON_HELP 18991 -#define IDS_AX_MEDIA_PAUSE_BUTTON_HELP 18992 -#define IDS_AX_MEDIA_AUDIO_SLIDER_HELP 18993 -#define IDS_AX_MEDIA_VIDEO_SLIDER_HELP 18994 -#define IDS_AX_MEDIA_SLIDER_THUMB_HELP 18995 -#define IDS_AX_MEDIA_CURRENT_TIME_DISPLAY_HELP 18996 -#define IDS_AX_MEDIA_TIME_REMAINING_DISPLAY_HELP 18997 -#define IDS_AX_MEDIA_STATUS_DISPLAY_HELP 18998 -#define IDS_AX_MEDIA_ENTER_FULL_SCREEN_BUTTON_HELP 18999 -#define IDS_AX_MEDIA_EXIT_FULL_SCREEN_BUTTON_HELP 19000 -#define IDS_AX_MEDIA_SHOW_CLOSED_CAPTIONS_BUTTON_HELP 19001 -#define IDS_AX_MEDIA_HIDE_CLOSED_CAPTIONS_BUTTON_HELP 19002 -#define IDS_AX_MEDIA_CAST_OFF_BUTTON_HELP 19003 -#define IDS_AX_MEDIA_CAST_ON_BUTTON_HELP 19004 -#define IDS_AX_MILLISECOND_FIELD_TEXT 19005 -#define IDS_AX_MINUTE_FIELD_TEXT 19006 -#define IDS_AX_MONTH_FIELD_TEXT 19007 -#define IDS_AX_SECOND_FIELD_TEXT 19008 -#define IDS_AX_WEEK_OF_YEAR_FIELD_TEXT 19009 -#define IDS_AX_YEAR_FIELD_TEXT 19010 -#define IDS_KEYGEN_HIGH_GRADE_KEY 19011 -#define IDS_KEYGEN_MED_GRADE_KEY 19012 -#define IDS_FORM_INPUT_WEEK_TEMPLATE 19013 -#define IDS_FORM_VALIDATION_VALUE_MISSING_MULTIPLE_FILE 19014 -#define IDS_FORM_VALIDATION_TYPE_MISMATCH 19015 -#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_EMPTY 19016 -#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_EMPTY_DOMAIN 19017 -#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_EMPTY_LOCAL 19018 -#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_INVALID_DOMAIN 19019 -#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_INVALID_DOTS 19020 -#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_INVALID_LOCAL 19021 -#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_NO_AT_SIGN 19022 -#define IDS_FORM_VALIDATION_TYPE_MISMATCH_MULTIPLE_EMAIL 19023 -#define IDS_FORM_VALIDATION_RANGE_UNDERFLOW 19024 -#define IDS_FORM_VALIDATION_RANGE_UNDERFLOW_DATETIME 19025 -#define IDS_FORM_VALIDATION_RANGE_OVERFLOW 19026 -#define IDS_FORM_VALIDATION_RANGE_OVERFLOW_DATETIME 19027 -#define IDS_FORM_VALIDATION_BAD_INPUT_DATETIME 19028 -#define IDS_FORM_VALIDATION_BAD_INPUT_NUMBER 19029 -#define IDS_FORM_VALIDATION_VALUE_MISSING 19030 -#define IDS_FORM_VALIDATION_VALUE_MISSING_CHECKBOX 19031 -#define IDS_FORM_VALIDATION_VALUE_MISSING_FILE 19032 -#define IDS_FORM_VALIDATION_VALUE_MISSING_RADIO 19033 -#define IDS_FORM_VALIDATION_VALUE_MISSING_SELECT 19034 -#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL 19035 -#define IDS_FORM_VALIDATION_TYPE_MISMATCH_URL 19036 -#define IDS_FORM_VALIDATION_PATTERN_MISMATCH 19037 -#define IDS_FORM_VALIDATION_STEP_MISMATCH 19038 -#define IDS_FORM_VALIDATION_STEP_MISMATCH_CLOSE_TO_LIMIT 19039 -#define IDS_FORM_VALIDATION_TOO_LONG 19040 -#define IDS_FORM_VALIDATION_TOO_SHORT 19041 -#define IDS_PLUGIN_INITIALIZATION_ERROR 19042 - -// --------------------------------------------------------------------------- -// From extensions_strings.h: - -#define IDS_EXTENSION_CONTAINS_PRIVATE_KEY 26150 -#define IDS_EXTENSION_LOAD_ABOUT_PAGE_FAILED 26151 -#define IDS_EXTENSION_LOAD_BACKGROUND_SCRIPT_FAILED 26152 -#define IDS_EXTENSION_LOAD_BACKGROUND_PAGE_FAILED 26153 -#define IDS_EXTENSION_LOAD_ICON_FAILED 26154 -#define IDS_EXTENSION_LOAD_LAUNCHER_PAGE_FAILED 26155 -#define IDS_EXTENSION_LOAD_OPTIONS_PAGE_FAILED 26156 -#define IDS_EXTENSION_LOCALES_NO_DEFAULT_LOCALE_SPECIFIED 26157 -#define IDS_EXTENSION_MANIFEST_UNREADABLE 26158 -#define IDS_EXTENSION_MANIFEST_INVALID 26159 -#define IDS_EXTENSION_PACKAGE_DIRECTORY_ERROR 26160 -#define IDS_EXTENSION_PACKAGE_IMAGE_PATH_ERROR 26161 -#define IDS_EXTENSION_PACKAGE_IMAGE_ERROR 26162 -#define IDS_EXTENSION_PACKAGE_UNZIP_ERROR 26163 -#define IDS_LOAD_STATE_PARAMETER_EXTENSION 26164 -#define IDS_EXTENSION_PROMPT_WARNING_HOST_AND_SUBDOMAIN 26165 -#define IDS_EXTENSION_PROMPT_WARNING_HOST_AND_SUBDOMAIN_LIST 26166 -#define IDS_EXTENSION_CANT_INSTALL_POLICY_BLOCKED 26167 -#define IDS_EXTENSION_CANT_MODIFY_POLICY_REQUIRED 26168 -#define IDS_EXTENSION_CANT_UNINSTALL_POLICY_REQUIRED 26169 -#define IDS_EXTENSION_DISABLED_UPDATE_REQUIRED_BY_POLICY 26170 -#define IDS_DEVICE_NAME_WITH_PRODUCT_SERIAL 26171 -#define IDS_DEVICE_NAME_WITH_PRODUCT_UNKNOWN_VENDOR 26172 -#define IDS_DEVICE_NAME_WITH_PRODUCT_UNKNOWN_VENDOR_SERIAL 26173 -#define IDS_DEVICE_NAME_WITH_PRODUCT_VENDOR 26174 -#define IDS_DEVICE_NAME_WITH_PRODUCT_VENDOR_SERIAL 26175 -#define IDS_DEVICE_NAME_WITH_UNKNOWN_PRODUCT_UNKNOWN_VENDOR 26176 -#define IDS_DEVICE_NAME_WITH_UNKNOWN_PRODUCT_UNKNOWN_VENDOR_SERIAL 26177 -#define IDS_DEVICE_NAME_WITH_UNKNOWN_PRODUCT_VENDOR 26178 -#define IDS_DEVICE_NAME_WITH_UNKNOWN_PRODUCT_VENDOR_SERIAL 26179 -#define IDS_DEVICE_PERMISSIONS_PROMPT 26180 -#define IDS_EXTENSION_USB_DEVICE_PRODUCT_NAME_AND_VENDOR 26181 -#define IDS_HID_DEVICE_PERMISSIONS_PROMPT_TITLE 26182 -#define IDS_USB_DEVICE_PERMISSIONS_PROMPT_TITLE 26183 -#define IDS_EXTENSION_TASK_MANAGER_APPVIEW_TAG_PREFIX 26184 -#define IDS_EXTENSION_TASK_MANAGER_EXTENSIONOPTIONS_TAG_PREFIX 26185 -#define IDS_EXTENSION_TASK_MANAGER_EXTENSIONVIEW_TAG_PREFIX 26186 -#define IDS_EXTENSION_TASK_MANAGER_MIMEHANDLERVIEW_TAG_PREFIX 26187 -#define IDS_EXTENSION_TASK_MANAGER_WEBVIEW_TAG_PREFIX 26188 -#define IDS_EXTENSION_WARNINGS_NETWORK_DELAY 26189 -#define IDS_EXTENSION_WARNINGS_NETWORK_CONFLICT 26190 -#define IDS_EXTENSION_WARNINGS_REDIRECT_CONFLICT 26191 -#define IDS_EXTENSION_WARNINGS_REQUEST_HEADER_CONFLICT 26192 -#define IDS_EXTENSION_WARNINGS_RESPONSE_HEADER_CONFLICT 26193 -#define IDS_EXTENSION_WARNINGS_CREDENTIALS_CONFLICT 26194 -#define IDS_EXTENSION_WARNINGS_DOWNLOAD_FILENAME_CONFLICT 26195 -#define IDS_EXTENSION_WARNING_RELOAD_TOO_FREQUENT 26196 -#define IDS_EXTENSION_INSTALL_PROCESS_CRASHED 26197 -#define IDS_EXTENSION_PACKAGE_ERROR_CODE 26198 -#define IDS_EXTENSION_PACKAGE_ERROR_MESSAGE 26199 -#define IDS_EXTENSION_PACKAGE_INSTALL_ERROR 26200 -#define IDS_EXTENSION_UNPACK_FAILED 26201 -#define IDS_UTILITY_PROCESS_EXTENSION_UNPACKER_NAME 26202 -#define IDS_UTILITY_PROCESS_MANIFEST_PARSER_NAME 26203 - -// --------------------------------------------------------------------------- -// From platform_locale_settings.h: - -#define IDS_STANDARD_FONT_FAMILY 10500 -#define IDS_FIXED_FONT_FAMILY 10501 -#define IDS_FIXED_FONT_FAMILY_ALT_WIN 10502 -#define IDS_SERIF_FONT_FAMILY 10503 -#define IDS_SANS_SERIF_FONT_FAMILY 10504 -#define IDS_CURSIVE_FONT_FAMILY 10505 -#define IDS_FANTASY_FONT_FAMILY 10506 -#define IDS_PICTOGRAPH_FONT_FAMILY 10507 -#define IDS_STANDARD_FONT_FAMILY_CYRILLIC 10508 -#define IDS_FIXED_FONT_FAMILY_ARABIC 10509 -#define IDS_FIXED_FONT_FAMILY_CYRILLIC 10510 -#define IDS_SANS_SERIF_FONT_FAMILY_ARABIC 10511 -#define IDS_SERIF_FONT_FAMILY_CYRILLIC 10512 -#define IDS_SANS_SERIF_FONT_FAMILY_CYRILLIC 10513 -#define IDS_STANDARD_FONT_FAMILY_GREEK 10514 -#define IDS_FIXED_FONT_FAMILY_GREEK 10515 -#define IDS_SERIF_FONT_FAMILY_GREEK 10516 -#define IDS_SANS_SERIF_FONT_FAMILY_GREEK 10517 -#define IDS_STANDARD_FONT_FAMILY_JAPANESE 10518 -#define IDS_FIXED_FONT_FAMILY_JAPANESE 10519 -#define IDS_SERIF_FONT_FAMILY_JAPANESE 10520 -#define IDS_SANS_SERIF_FONT_FAMILY_JAPANESE 10521 -#define IDS_STANDARD_FONT_FAMILY_KOREAN 10522 -#define IDS_FIXED_FONT_FAMILY_KOREAN 10523 -#define IDS_SERIF_FONT_FAMILY_KOREAN 10524 -#define IDS_SANS_SERIF_FONT_FAMILY_KOREAN 10525 -#define IDS_CURSIVE_FONT_FAMILY_KOREAN 10526 -#define IDS_STANDARD_FONT_FAMILY_SIMPLIFIED_HAN 10527 -#define IDS_FIXED_FONT_FAMILY_SIMPLIFIED_HAN 10528 -#define IDS_SERIF_FONT_FAMILY_SIMPLIFIED_HAN 10529 -#define IDS_SANS_SERIF_FONT_FAMILY_SIMPLIFIED_HAN 10530 -#define IDS_STANDARD_FONT_FAMILY_TRADITIONAL_HAN 10531 -#define IDS_FIXED_FONT_FAMILY_TRADITIONAL_HAN 10532 -#define IDS_SERIF_FONT_FAMILY_TRADITIONAL_HAN 10533 -#define IDS_SANS_SERIF_FONT_FAMILY_TRADITIONAL_HAN 10534 -#define IDS_DEFAULT_FONT_SIZE 10535 -#define IDS_DEFAULT_FIXED_FONT_SIZE 10536 -#define IDS_MINIMUM_FONT_SIZE 10537 -#define IDS_MINIMUM_LOGICAL_FONT_SIZE 10538 - -// --------------------------------------------------------------------------- -// From ui_strings.h: - -#define IDS_TIME_SECS 11000 -#define IDS_TIME_LONG_SECS 11001 -#define IDS_TIME_LONG_SECS_2ND 11002 -#define IDS_TIME_MINS 11003 -#define IDS_TIME_LONG_MINS 11004 -#define IDS_TIME_LONG_MINS_1ST 11005 -#define IDS_TIME_LONG_MINS_2ND 11006 -#define IDS_TIME_HOURS 11007 -#define IDS_TIME_HOURS_1ST 11008 -#define IDS_TIME_HOURS_2ND 11009 -#define IDS_TIME_DAYS 11010 -#define IDS_TIME_DAYS_1ST 11011 -#define IDS_TIME_REMAINING_SECS 11012 -#define IDS_TIME_REMAINING_LONG_SECS 11013 -#define IDS_TIME_REMAINING_MINS 11014 -#define IDS_TIME_REMAINING_LONG_MINS 11015 -#define IDS_TIME_REMAINING_HOURS 11016 -#define IDS_TIME_REMAINING_DAYS 11017 -#define IDS_TIME_ELAPSED_SECS 11018 -#define IDS_TIME_ELAPSED_MINS 11019 -#define IDS_TIME_ELAPSED_HOURS 11020 -#define IDS_TIME_ELAPSED_DAYS 11021 -#define IDS_PAST_TIME_TODAY 11022 -#define IDS_PAST_TIME_YESTERDAY 11023 -#define IDS_APP_MENU_EMPTY_SUBMENU 11024 -#define IDS_APP_UNTITLED_SHORTCUT_FILE_NAME 11025 -#define IDS_APP_SAVEAS_ALL_FILES 11026 -#define IDS_APP_SAVEAS_EXTENSION_FORMAT 11027 -#define IDS_SELECT_UPLOAD_FOLDER_DIALOG_TITLE 11028 -#define IDS_SELECT_FOLDER_DIALOG_TITLE 11031 -#define IDS_SAVE_AS_DIALOG_TITLE 11032 -#define IDS_OPEN_FILE_DIALOG_TITLE 11033 -#define IDS_OPEN_FILES_DIALOG_TITLE 11034 -#define IDS_SAVEAS_ALL_FILES 11035 -#define IDS_SELECT_UPLOAD_FOLDER_DIALOG_UPLOAD_BUTTON 11036 -#define IDS_APP_ACCACTION_PRESS 11037 -#define IDS_APP_ACCNAME_CLOSE 11038 -#define IDS_APP_ACCNAME_MINIMIZE 11039 -#define IDS_APP_ACCNAME_MAXIMIZE 11040 -#define IDS_APP_ACCNAME_RESTORE 11041 -#define IDS_APP_SCROLLBAR_CXMENU_SCROLLHERE 11042 -#define IDS_APP_SCROLLBAR_CXMENU_SCROLLLEFTEDGE 11043 -#define IDS_APP_SCROLLBAR_CXMENU_SCROLLRIGHTEDGE 11044 -#define IDS_APP_SCROLLBAR_CXMENU_SCROLLHOME 11045 -#define IDS_APP_SCROLLBAR_CXMENU_SCROLLEND 11046 -#define IDS_APP_SCROLLBAR_CXMENU_SCROLLPAGEUP 11047 -#define IDS_APP_SCROLLBAR_CXMENU_SCROLLPAGEDOWN 11048 -#define IDS_APP_SCROLLBAR_CXMENU_SCROLLLEFT 11049 -#define IDS_APP_SCROLLBAR_CXMENU_SCROLLRIGHT 11050 -#define IDS_APP_SCROLLBAR_CXMENU_SCROLLUP 11051 -#define IDS_APP_SCROLLBAR_CXMENU_SCROLLDOWN 11052 -#define IDS_APP_UNDO 11053 -#define IDS_APP_CUT 11054 -#define IDS_APP_COPY 11055 -#define IDS_APP_PASTE 11056 -#define IDS_APP_DELETE 11057 -#define IDS_APP_SELECT_ALL 11058 -#define IDS_DELETE_BACKWARD 11059 -#define IDS_DELETE_FORWARD 11060 -#define IDS_DELETE_TO_BEGINNING_OF_LINE 11061 -#define IDS_DELETE_TO_END_OF_LINE 11062 -#define IDS_DELETE_WORD_BACKWARD 11063 -#define IDS_DELETE_WORD_FORWARD 11064 -#define IDS_MOVE_DOWN 11065 -#define IDS_MOVE_LEFT 11066 -#define IDS_MOVE_LEFT_AND_MODIFY_SELECTION 11067 -#define IDS_MOVE_RIGHT 11068 -#define IDS_MOVE_RIGHT_AND_MODIFY_SELECTION 11069 -#define IDS_MOVE_WORD_LEFT 11070 -#define IDS_MOVE_WORD_LEFT_AND_MODIFY_SELECTION 11071 -#define IDS_MOVE_WORD_RIGHT 11072 -#define IDS_MOVE_WORD_RIGHT_AND_MODIFY_SELECTION 11073 -#define IDS_MOVE_TO_BEGINNING_OF_LINE 11074 -#define IDS_MOVE_TO_BEGINNING_OF_LINE_AND_MODIFY_SELECTION 11075 -#define IDS_MOVE_TO_END_OF_LINE 11076 -#define IDS_MOVE_TO_END_OF_LINE_AND_MODIFY_SELECTION 11077 -#define IDS_MOVE_UP 11078 -#define IDS_APP_REDO 11079 -#define IDS_APP_OK 11080 -#define IDS_APP_CANCEL 11081 -#define IDS_APP_CLOSE 11082 -#define IDS_APP_ESC_KEY 11083 -#define IDS_APP_TAB_KEY 11084 -#define IDS_APP_INSERT_KEY 11085 -#define IDS_APP_HOME_KEY 11086 -#define IDS_APP_DELETE_KEY 11087 -#define IDS_APP_END_KEY 11088 -#define IDS_APP_PAGEUP_KEY 11089 -#define IDS_APP_PAGEDOWN_KEY 11090 -#define IDS_APP_LEFT_ARROW_KEY 11091 -#define IDS_APP_RIGHT_ARROW_KEY 11092 -#define IDS_APP_UP_ARROW_KEY 11093 -#define IDS_APP_DOWN_ARROW_KEY 11094 -#define IDS_APP_ENTER_KEY 11095 -#define IDS_APP_SPACE_KEY 11096 -#define IDS_APP_F1_KEY 11097 -#define IDS_APP_F11_KEY 11098 -#define IDS_APP_BACKSPACE_KEY 11099 -#define IDS_APP_COMMA_KEY 11100 -#define IDS_APP_PERIOD_KEY 11101 -#define IDS_APP_MEDIA_NEXT_TRACK_KEY 11102 -#define IDS_APP_MEDIA_PLAY_PAUSE_KEY 11103 -#define IDS_APP_MEDIA_PREV_TRACK_KEY 11104 -#define IDS_APP_MEDIA_STOP_KEY 11105 -#define IDS_APP_CONTROL_MODIFIER 11106 -#define IDS_APP_ALT_MODIFIER 11107 -#define IDS_APP_SHIFT_MODIFIER 11108 -#define IDS_APP_COMMAND_MODIFIER 11109 -#define IDS_APP_SEARCH_MODIFIER 11110 -#define IDS_APP_BYTES 11111 -#define IDS_APP_KIBIBYTES 11112 -#define IDS_APP_MEBIBYTES 11113 -#define IDS_APP_GIBIBYTES 11114 -#define IDS_APP_TEBIBYTES 11115 -#define IDS_APP_PEBIBYTES 11116 -#define IDS_APP_BYTES_PER_SECOND 11117 -#define IDS_APP_KIBIBYTES_PER_SECOND 11118 -#define IDS_APP_MEBIBYTES_PER_SECOND 11119 -#define IDS_APP_GIBIBYTES_PER_SECOND 11120 -#define IDS_APP_TEBIBYTES_PER_SECOND 11121 -#define IDS_APP_PEBIBYTES_PER_SECOND 11122 -#define IDS_MESSAGE_CENTER_ACCESSIBLE_NAME 11123 -#define IDS_MESSAGE_CENTER_NOTIFIER_DISABLE 11124 -#define IDS_MESSAGE_CENTER_FOOTER_TITLE 11125 -#define IDS_MESSAGE_CENTER_SETTINGS_BUTTON_LABEL 11126 -#define IDS_MESSAGE_CENTER_SETTINGS_DIALOG_DESCRIPTION 11128 -#define IDS_MESSAGE_CENTER_SETTINGS_DESCRIPTION_MULTIUSER 11129 -#define IDS_MESSAGE_CENTER_SETTINGS 11130 -#define IDS_MESSAGE_CENTER_CLEAR_ALL 11131 -#define IDS_MESSAGE_CENTER_QUIET_MODE_BUTTON_TOOLTIP 11132 -#define IDS_MESSAGE_CENTER_NO_MESSAGES 11133 -#define IDS_MESSAGE_CENTER_QUIET_MODE 11134 -#define IDS_MESSAGE_CENTER_QUIET_MODE_1HOUR 11135 -#define IDS_MESSAGE_CENTER_QUIET_MODE_1DAY 11136 -#define IDS_MESSAGE_CENTER_CLOSE_NOTIFICATION_BUTTON_ACCESSIBLE_NAME 11137 -#define IDS_MESSAGE_NOTIFICATION_SETTINGS_BUTTON_ACCESSIBLE_NAME 11138 -#define IDS_APP_LIST_HELP 11141 -#define IDS_APP_LIST_OPEN_SETTINGS 11142 -#define IDS_APP_LIST_OPEN_FEEDBACK 11143 -#define IDS_APP_LIST_BACK 11144 -#define IDS_APP_LIST_ALL_APPS 11145 -#define IDS_APP_LIST_FOLDER_NAME_PLACEHOLDER 11146 -#define IDS_APP_LIST_FOLDER_BUTTON_ACCESSIBILE_NAME 11147 -#define IDS_APP_LIST_FOLDER_OPEN_FOLDER_ACCESSIBILE_NAME 11148 -#define IDS_APP_LIST_FOLDER_CLOSE_FOLDER_ACCESSIBILE_NAME 11149 -#define IDS_APP_LIST_SPEECH_HINT_TEXT 11150 -#define IDS_APP_LIST_SPEECH_NETWORK_ERROR_HINT_TEXT 11151 - -#endif // CEF_INCLUDE_CEF_PACK_STRINGS_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_parser.h b/tool_kits/cef/cef_wrapper/include/cef_parser.h deleted file mode 100644 index 46a9de5f..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_parser.h +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_PARSER_H_ -#define CEF_INCLUDE_CEF_PARSER_H_ -#pragma once - -#include - -#include "include/cef_base.h" -#include "include/cef_values.h" - -/// -// Parse the specified |url| into its component parts. -// Returns false if the URL is empty or invalid. -/// -/*--cef()--*/ -bool CefParseURL(const CefString& url, - CefURLParts& parts); - -/// -// Creates a URL from the specified |parts|, which must contain a non-empty -// spec or a non-empty host and path (at a minimum), but not both. -// Returns false if |parts| isn't initialized as described. -/// -/*--cef()--*/ -bool CefCreateURL(const CefURLParts& parts, - CefString& url); - -/// -// This is a convenience function for formatting a URL in a concise and human- -// 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 |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, - const CefString& languages); - -/// -// Returns the mime type for the specified file extension or an empty string if -// unknown. -/// -/*--cef()--*/ -CefString CefGetMimeType(const CefString& extension); - -/// -// Get the extensions associated with the given mime type. This should be passed -// in lower case. There could be multiple extensions for a given mime type, like -// "html,htm" for "text/html", or "txt,text,html,..." for "text/*". Any existing -// elements in the provided vector will not be erased. -/// -/*--cef()--*/ -void CefGetExtensionsForMimeType(const CefString& mime_type, - std::vector& extensions); - -/// -// Encodes |data| as a base64 string. -/// -/*--cef()--*/ -CefString CefBase64Encode(const void* data, size_t data_size); - -/// -// Decodes the base64 encoded string |data|. The returned value will be NULL if -// the decoding fails. -/// -/*--cef()--*/ -CefRefPtr CefBase64Decode(const CefString& data); - -/// -// Escapes characters in |text| which are unsuitable for use as a query -// parameter value. Everything except alphanumerics and -_.!~*'() will be -// converted to "%XX". If |use_plus| is true spaces will change to "+". The -// result is basically the same as encodeURIComponent in Javacript. -/// -/*--cef()--*/ -CefString CefURIEncode(const CefString& text, bool use_plus); - -/// -// Unescapes |text| and returns the result. Unescaping consists of looking for -// the exact pattern "%XX" where each X is a hex digit and converting to the -// character with the numerical value of those digits (e.g. "i%20=%203%3b" -// unescapes to "i = 3;"). If |convert_to_utf8| is true this function will -// attempt to interpret the initial decoded result as UTF-8. If the result is -// convertable into UTF-8 it will be returned as converted. Otherwise the -// initial decoded result will be returned. The |unescape_rule| parameter -// supports further customization the decoding process. -/// -/*--cef()--*/ -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. -/// -/*--cef()--*/ -CefRefPtr CefParseJSON(const CefString& json_string, - cef_json_parser_options_t options); - -/// -// Parses the specified |json_string| and returns a dictionary or list -// representation. If JSON parsing fails this method returns NULL and populates -// |error_code_out| and |error_msg_out| with an error code and a formatted error -// message respectively. -/// -/*--cef()--*/ -CefRefPtr CefParseJSONAndReturnError( - const CefString& json_string, - cef_json_parser_options_t options, - cef_json_parser_error_t& error_code_out, - CefString& error_msg_out); - -/// -// Generates a JSON string from the specified root |node| which should be a -// dictionary or list value. Returns an empty string on failure. This method -// requires exclusive access to |node| including any underlying data. -/// -/*--cef()--*/ -CefString CefWriteJSON(CefRefPtr node, - cef_json_writer_options_t options); - -#endif // CEF_INCLUDE_CEF_PARSER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_path_util.h b/tool_kits/cef/cef_wrapper/include/cef_path_util.h deleted file mode 100644 index 552f4ba5..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_path_util.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_PATH_UTIL_H_ -#define CEF_INCLUDE_CEF_PATH_UTIL_H_ -#pragma once - -#include "include/cef_base.h" - -typedef cef_path_key_t PathKey; - -/// -// Retrieve the path associated with the specified |key|. Returns true on -// success. Can be called on any thread in the browser process. -/// -/*--cef()--*/ -bool CefGetPath(PathKey key, CefString& path); - -#endif // CEF_INCLUDE_CEF_PATH_UTIL_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_print_handler.h b/tool_kits/cef/cef_wrapper/include/cef_print_handler.h deleted file mode 100644 index cac16244..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_print_handler.h +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) 2014 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_PRINT_HANDLER_H_ -#define CEF_INCLUDE_CEF_PRINT_HANDLER_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_browser.h" -#include "include/cef_print_settings.h" - -/// -// Callback interface for asynchronous continuation of print dialog requests. -/// -/*--cef(source=library)--*/ -class CefPrintDialogCallback : public virtual CefBase { - public: - /// - // Continue printing with the specified |settings|. - /// - /*--cef(capi_name=cont)--*/ - virtual void Continue(CefRefPtr settings) =0; - - /// - // Cancel the printing. - /// - /*--cef()--*/ - virtual void Cancel() =0; -}; - -/// -// Callback interface for asynchronous continuation of print job requests. -/// -/*--cef(source=library)--*/ -class CefPrintJobCallback : public virtual CefBase { - public: - /// - // Indicate completion of the print job. - /// - /*--cef(capi_name=cont)--*/ - virtual void Continue() =0; -}; - - -/// -// Implement this interface to handle printing on Linux. The methods of this -// class will be called on the browser process UI thread. -/// -/*--cef(source=client)--*/ -class CefPrintHandler : public virtual CefBase { - public: - /// - // Called when printing has started for the specified |browser|. This method - // will be called before the other OnPrint*() methods and irrespective of how - // printing was initiated (e.g. CefBrowserHost::Print(), JavaScript - // window.print() or PDF extension print button). - /// - /*--cef()--*/ - virtual void OnPrintStart(CefRefPtr browser) =0; - - /// - // Synchronize |settings| with client state. If |get_defaults| is true then - // populate |settings| with the default print settings. Do not keep a - // reference to |settings| outside of this callback. - /// - /*--cef()--*/ - virtual void OnPrintSettings(CefRefPtr settings, - bool get_defaults) =0; - - /// - // Show the print dialog. Execute |callback| once the dialog is dismissed. - // Return true if the dialog will be displayed or false to cancel the - // printing immediately. - /// - /*--cef()--*/ - virtual bool OnPrintDialog(bool has_selection, - CefRefPtr callback) =0; - - /// - // Send the print job to the printer. Execute |callback| once the job is - // completed. Return true if the job will proceed or false to cancel the job - // immediately. - /// - /*--cef()--*/ - virtual bool OnPrintJob(const CefString& document_name, - const CefString& pdf_file_path, - CefRefPtr callback) =0; - - /// - // Reset client state related to printing. - /// - /*--cef()--*/ - virtual void OnPrintReset() =0; - - /// - // Return the PDF paper size in device units. Used in combination with - // CefBrowserHost::PrintToPDF(). - /// - /*--cef()--*/ - virtual CefSize GetPdfPaperSize(int device_units_per_inch) { - return CefSize(); - } -}; - -#endif // CEF_INCLUDE_CEF_PRINT_HANDLER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_print_settings.h b/tool_kits/cef/cef_wrapper/include/cef_print_settings.h deleted file mode 100644 index af3fff4f..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_print_settings.h +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright (c) 2014 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_PRINT_SETTINGS_H_ -#define CEF_INCLUDE_CEF_PRINT_SETTINGS_H_ -#pragma once - -#include - -#include "include/cef_base.h" - -/// -// Class representing print settings. -/// -/*--cef(source=library)--*/ -class CefPrintSettings : public virtual CefBase { - public: - typedef cef_color_model_t ColorModel; - typedef cef_duplex_mode_t DuplexMode; - typedef std::vector PageRangeList; - - /// - // Create a new CefPrintSettings object. - /// - /*--cef()--*/ - static CefRefPtr Create(); - - /// - // Returns true if this object is valid. Do not call any other methods if this - // function returns false. - /// - /*--cef()--*/ - virtual bool IsValid() =0; - - /// - // Returns true if the values of this object are read-only. Some APIs may - // expose read-only objects. - /// - /*--cef()--*/ - virtual bool IsReadOnly() =0; - - /// - // Returns a writable copy of this object. - /// - /*--cef()--*/ - virtual CefRefPtr Copy() =0; - - /// - // Set the page orientation. - /// - /*--cef()--*/ - virtual void SetOrientation(bool landscape) =0; - - /// - // Returns true if the orientation is landscape. - /// - /*--cef()--*/ - virtual bool IsLandscape() =0; - - /// - // Set the printer printable area in device units. - // Some platforms already provide flipped area. Set |landscape_needs_flip| - // to false on those platforms to avoid double flipping. - /// - /*--cef()--*/ - virtual void SetPrinterPrintableArea( - const CefSize& physical_size_device_units, - const CefRect& printable_area_device_units, - bool landscape_needs_flip) =0; - - /// - // Set the device name. - /// - /*--cef(optional_param=name)--*/ - virtual void SetDeviceName(const CefString& name) =0; - - /// - // Get the device name. - /// - /*--cef()--*/ - virtual CefString GetDeviceName() =0; - - /// - // Set the DPI (dots per inch). - /// - /*--cef()--*/ - virtual void SetDPI(int dpi) =0; - - /// - // Get the DPI (dots per inch). - /// - /*--cef()--*/ - virtual int GetDPI() =0; - - /// - // Set the page ranges. - /// - /*--cef()--*/ - virtual void SetPageRanges(const PageRangeList& ranges) =0; - - /// - // Returns the number of page ranges that currently exist. - /// - /*--cef()--*/ - virtual size_t GetPageRangesCount() =0; - - /// - // Retrieve the page ranges. - /// - /*--cef(count_func=ranges:GetPageRangesCount)--*/ - virtual void GetPageRanges(PageRangeList& ranges) =0; - - /// - // Set whether only the selection will be printed. - /// - /*--cef()--*/ - virtual void SetSelectionOnly(bool selection_only) =0; - - /// - // Returns true if only the selection will be printed. - /// - /*--cef()--*/ - virtual bool IsSelectionOnly() =0; - - /// - // Set whether pages will be collated. - /// - /*--cef()--*/ - virtual void SetCollate(bool collate) =0; - - /// - // Returns true if pages will be collated. - /// - /*--cef()--*/ - virtual bool WillCollate() =0; - - /// - // Set the color model. - /// - /*--cef()--*/ - virtual void SetColorModel(ColorModel model) =0; - - /// - // Get the color model. - /// - /*--cef(default_retval=COLOR_MODEL_UNKNOWN)--*/ - virtual ColorModel GetColorModel() =0; - - /// - // Set the number of copies. - /// - /*--cef()--*/ - virtual void SetCopies(int copies) =0; - - /// - // Get the number of copies. - /// - /*--cef()--*/ - virtual int GetCopies() =0; - - /// - // Set the duplex mode. - /// - /*--cef()--*/ - virtual void SetDuplexMode(DuplexMode mode) =0; - - /// - // Get the duplex mode. - /// - /*--cef(default_retval=DUPLEX_MODE_UNKNOWN)--*/ - virtual DuplexMode GetDuplexMode() =0; -}; - -#endif // CEF_INCLUDE_CEF_PRINT_SETTINGS_H_ - diff --git a/tool_kits/cef/cef_wrapper/include/cef_process_message.h b/tool_kits/cef/cef_wrapper/include/cef_process_message.h deleted file mode 100644 index 1e27bd68..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_process_message.h +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_MESSAGE_H_ -#define CEF_INCLUDE_CEF_MESSAGE_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_values.h" - -typedef cef_process_id_t CefProcessId; - -/// -// Class representing a message. Can be used on any process and thread. -/// -/*--cef(source=library)--*/ -class CefProcessMessage : public virtual CefBase { - public: - /// - // Create a new CefProcessMessage object with the specified name. - /// - /*--cef()--*/ - static CefRefPtr Create(const CefString& name); - - /// - // Returns true if this object is valid. Do not call any other methods if this - // function returns false. - /// - /*--cef()--*/ - virtual bool IsValid() =0; - - /// - // Returns true if the values of this object are read-only. Some APIs may - // expose read-only objects. - /// - /*--cef()--*/ - virtual bool IsReadOnly() =0; - - /// - // Returns a writable copy of this object. - /// - /*--cef()--*/ - virtual CefRefPtr Copy() =0; - - /// - // Returns the message name. - /// - /*--cef()--*/ - virtual CefString GetName() =0; - - /// - // Returns the list of arguments. - /// - /*--cef()--*/ - virtual CefRefPtr GetArgumentList() =0; -}; - -#endif // CEF_INCLUDE_CEF_MESSAGE_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_process_util.h b/tool_kits/cef/cef_wrapper/include/cef_process_util.h deleted file mode 100644 index 4fce778e..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_process_util.h +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_PROCESS_UTIL_H_ -#define CEF_INCLUDE_CEF_PROCESS_UTIL_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_command_line.h" - -/// -// Launches the process specified via |command_line|. Returns true upon -// success. Must be called on the browser process TID_PROCESS_LAUNCHER thread. -// -// Unix-specific notes: -// - All file descriptors open in the parent process will be closed in the -// child process except for stdin, stdout, and stderr. -// - If the first argument on the command line does not contain a slash, -// PATH will be searched. (See man execvp.) -/// -/*--cef()--*/ -bool CefLaunchProcess(CefRefPtr command_line); - -#endif // CEF_INCLUDE_CEF_PROCESS_UTIL_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_render_handler.h b/tool_kits/cef/cef_wrapper/include/cef_render_handler.h deleted file mode 100644 index 636d72ea..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_render_handler.h +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_RENDER_HANDLER_H_ -#define CEF_INCLUDE_CEF_RENDER_HANDLER_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_browser.h" -#include "include/cef_drag_data.h" -#include - -/// -// Implement this interface to handle events when window rendering is disabled. -// The methods of this class will be called on the UI thread. -/// -/*--cef(source=client)--*/ -class CefRenderHandler : public virtual CefBase { - public: - typedef cef_cursor_type_t CursorType; - typedef cef_drag_operations_mask_t DragOperation; - typedef cef_drag_operations_mask_t DragOperationsMask; - typedef cef_paint_element_type_t PaintElementType; - typedef std::vector RectList; - - /// - // Called to retrieve the root window rectangle in screen coordinates. Return - // true if the rectangle was provided. - /// - /*--cef()--*/ - virtual bool GetRootScreenRect(CefRefPtr browser, - CefRect& rect) { return false; } - - /// - // Called to retrieve the view rectangle which is relative to screen - // coordinates. Return true if the rectangle was provided. - /// - /*--cef()--*/ - virtual bool GetViewRect(CefRefPtr browser, CefRect& rect) =0; - - /// - // Called to retrieve the translation from view coordinates to actual screen - // coordinates. Return true if the screen coordinates were provided. - /// - /*--cef()--*/ - virtual bool GetScreenPoint(CefRefPtr browser, - int viewX, - int viewY, - int& screenX, - int& screenY) { return false; } - - /// - // Called to allow the client to fill in the CefScreenInfo object with - // appropriate values. Return true if the |screen_info| structure has been - // modified. - // - // If the screen info rectangle is left empty the rectangle from GetViewRect - // will be used. If the rectangle is still empty or invalid popups may not be - // drawn correctly. - /// - /*--cef()--*/ - virtual bool GetScreenInfo(CefRefPtr browser, - CefScreenInfo& screen_info) { return false; } - - /// - // Called when the browser wants to show or hide the popup widget. The popup - // should be shown if |show| is true and hidden if |show| is false. - /// - /*--cef()--*/ - virtual void OnPopupShow(CefRefPtr browser, - bool show) {} - - /// - // Called when the browser wants to move or resize the popup widget. |rect| - // contains the new location and size in view coordinates. - /// - /*--cef()--*/ - virtual void OnPopupSize(CefRefPtr browser, - const CefRect& rect) {} - - /// - // Called when an element should be painted. Pixel values passed to this - // method are scaled relative to view coordinates based on the value of - // CefScreenInfo.device_scale_factor returned from GetScreenInfo. |type| - // indicates whether the element is the view or the popup widget. |buffer| - // contains the pixel data for the whole image. |dirtyRects| contains the set - // of rectangles in pixel coordinates that need to be repainted. |buffer| will - // be |width|*|height|*4 bytes in size and represents a BGRA image with an - // upper-left origin. - /// - /*--cef()--*/ - virtual void OnPaint(CefRefPtr browser, - PaintElementType type, - const RectList& dirtyRects, - const void* buffer, - int width, int height) =0; - - /// - // Called when the browser's cursor has changed. If |type| is CT_CUSTOM then - // |custom_cursor_info| will be populated with the custom cursor information. - /// - /*--cef()--*/ - virtual void OnCursorChange(CefRefPtr browser, - CefCursorHandle cursor, - CursorType type, - const CefCursorInfo& custom_cursor_info) {} - - /// - // Called when the user starts dragging content in the web view. Contextual - // information about the dragged content is supplied by |drag_data|. - // (|x|, |y|) is the drag start location in screen coordinates. - // OS APIs that run a system message loop may be used within the - // StartDragging call. - // - // Return false to abort the drag operation. Don't call any of - // CefBrowserHost::DragSource*Ended* methods after returning false. - // - // Return true to handle the drag operation. Call - // CefBrowserHost::DragSourceEndedAt and DragSourceSystemDragEnded either - // synchronously or asynchronously to inform the web view that the drag - // operation has ended. - /// - /*--cef()--*/ - virtual bool StartDragging(CefRefPtr browser, - CefRefPtr drag_data, - DragOperationsMask allowed_ops, - int x, int y) { return false; } - - /// - // Called when the web view wants to update the mouse cursor during a - // drag & drop operation. |operation| describes the allowed operation - // (none, move, copy, link). - /// - /*--cef()--*/ - virtual void UpdateDragCursor(CefRefPtr browser, - DragOperation operation) {} - - /// - // Called when the scroll offset has changed. - /// - /*--cef()--*/ - virtual void OnScrollOffsetChanged(CefRefPtr browser, - double x, - double y) {} -}; - -#endif // CEF_INCLUDE_CEF_RENDER_HANDLER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_render_process_handler.h b/tool_kits/cef/cef_wrapper/include/cef_render_process_handler.h deleted file mode 100644 index 98ab391b..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_render_process_handler.h +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (c) 2013 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_RENDER_PROCESS_HANDLER_H_ -#define CEF_INCLUDE_CEF_RENDER_PROCESS_HANDLER_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_browser.h" -#include "include/cef_dom.h" -#include "include/cef_frame.h" -#include "include/cef_load_handler.h" -#include "include/cef_process_message.h" -#include "include/cef_v8.h" -#include "include/cef_values.h" - -/// -// Class used to implement render process callbacks. The methods of this class -// will be called on the render process main thread (TID_RENDERER) unless -// otherwise indicated. -/// -/*--cef(source=client)--*/ -class CefRenderProcessHandler : public virtual CefBase { - public: - typedef cef_navigation_type_t NavigationType; - - /// - // Called after the render process main thread has been created. |extra_info| - // is a read-only value originating from - // CefBrowserProcessHandler::OnRenderProcessThreadCreated(). Do not keep a - // reference to |extra_info| outside of this method. - /// - /*--cef()--*/ - virtual void OnRenderThreadCreated(CefRefPtr extra_info) {} - - /// - // Called after WebKit has been initialized. - /// - /*--cef()--*/ - virtual void OnWebKitInitialized() {} - - /// - // Called after a browser has been created. When browsing cross-origin a new - // browser will be created before the old browser with the same identifier is - // destroyed. - /// - /*--cef()--*/ - virtual void OnBrowserCreated(CefRefPtr browser) {} - - /// - // Called before a browser is destroyed. - /// - /*--cef()--*/ - virtual void OnBrowserDestroyed(CefRefPtr browser) {} - - /// - // Return the handler for browser load status events. - /// - /*--cef()--*/ - virtual CefRefPtr GetLoadHandler() { - return NULL; - } - - /// - // Called before browser navigation. Return true to cancel the navigation or - // false to allow the navigation to proceed. The |request| object cannot be - // modified in this callback. - /// - /*--cef()--*/ - virtual bool OnBeforeNavigation(CefRefPtr browser, - CefRefPtr frame, - CefRefPtr request, - NavigationType navigation_type, - bool is_redirect) { return false; } - - /// - // Called immediately after the V8 context for a frame has been created. To - // retrieve the JavaScript 'window' object use the CefV8Context::GetGlobal() - // method. V8 handles can only be accessed from the thread on which they are - // created. A task runner for posting tasks on the associated thread can be - // retrieved via the CefV8Context::GetTaskRunner() method. - /// - /*--cef()--*/ - virtual void OnContextCreated(CefRefPtr browser, - CefRefPtr frame, - CefRefPtr context) {} - - /// - // Called immediately before the V8 context for a frame is released. No - // references to the context should be kept after this method is called. - /// - /*--cef()--*/ - virtual void OnContextReleased(CefRefPtr browser, - CefRefPtr frame, - CefRefPtr context) {} - - /// - // Called for global uncaught exceptions in a frame. Execution of this - // callback is disabled by default. To enable set - // CefSettings.uncaught_exception_stack_size > 0. - /// - /*--cef()--*/ - virtual void OnUncaughtException(CefRefPtr browser, - CefRefPtr frame, - CefRefPtr context, - CefRefPtr exception, - CefRefPtr stackTrace) {} - - /// - // Called when a new node in the the browser gets focus. The |node| value may - // be empty if no specific node has gained focus. The node object passed to - // this method represents a snapshot of the DOM at the time this method is - // executed. DOM objects are only valid for the scope of this method. Do not - // keep references to or attempt to access any DOM objects outside the scope - // of this method. - /// - /*--cef(optional_param=frame,optional_param=node)--*/ - virtual void OnFocusedNodeChanged(CefRefPtr browser, - CefRefPtr frame, - CefRefPtr node) {} - - /// - // Called when a new message is received from a different process. Return true - // if the message was handled or false otherwise. Do not keep a reference to - // or attempt to access the message outside of this callback. - /// - /*--cef()--*/ - virtual bool OnProcessMessageReceived(CefRefPtr browser, - CefProcessId source_process, - CefRefPtr message) { - return false; - } -}; - -#endif // CEF_INCLUDE_CEF_RENDER_PROCESS_HANDLER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_request.h b/tool_kits/cef/cef_wrapper/include/cef_request.h deleted file mode 100644 index a4626aa0..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_request.h +++ /dev/null @@ -1,337 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_REQUEST_H_ -#define CEF_INCLUDE_CEF_REQUEST_H_ -#pragma once - -#include "include/cef_base.h" -#include -#include - -class CefPostData; -class CefPostDataElement; - -/// -// Class used to represent a web request. The methods of this class may be -// called on any thread. -/// -/*--cef(source=library,no_debugct_check)--*/ -class CefRequest : public virtual CefBase { - public: - typedef std::multimap HeaderMap; - typedef cef_referrer_policy_t ReferrerPolicy; - typedef cef_resource_type_t ResourceType; - typedef cef_transition_type_t TransitionType; - - /// - // Create a new CefRequest object. - /// - /*--cef()--*/ - static CefRefPtr Create(); - - /// - // Returns true if this object is read-only. - /// - /*--cef()--*/ - virtual bool IsReadOnly() =0; - - /// - // Get the fully qualified URL. - /// - /*--cef()--*/ - virtual CefString GetURL() =0; - - /// - // Set the fully qualified URL. - /// - /*--cef()--*/ - virtual void SetURL(const CefString& url) =0; - - /// - // Get the request method type. The value will default to POST if post data - // is provided and GET otherwise. - /// - /*--cef()--*/ - virtual CefString GetMethod() =0; - - /// - // Set the request method type. - /// - /*--cef()--*/ - virtual void SetMethod(const CefString& method) =0; - - /// - // Set the referrer URL and policy. If non-empty the referrer URL must be - // fully qualified with an HTTP or HTTPS scheme component. Any username, - // password or ref component will be removed. - /// - /*--cef()--*/ - virtual void SetReferrer(const CefString& referrer_url, - ReferrerPolicy policy) =0; - - /// - // Get the referrer URL. - /// - /*--cef()--*/ - virtual CefString GetReferrerURL() =0; - - /// - // Get the referrer policy. - /// - /*--cef(default_retval=REFERRER_POLICY_DEFAULT)--*/ - virtual ReferrerPolicy GetReferrerPolicy() =0; - - /// - // Get the post data. - /// - /*--cef()--*/ - virtual CefRefPtr GetPostData() =0; - - /// - // Set the post data. - /// - /*--cef()--*/ - virtual void SetPostData(CefRefPtr postData) =0; - - /// - // Get the header values. Will not include the Referer value if any. - /// - /*--cef()--*/ - virtual void GetHeaderMap(HeaderMap& headerMap) =0; - - /// - // Set the header values. If a Referer value exists in the header map it will - // be removed and ignored. - /// - /*--cef()--*/ - virtual void SetHeaderMap(const HeaderMap& headerMap) =0; - - /// - // Set all values at one time. - /// - /*--cef(optional_param=postData)--*/ - virtual void Set(const CefString& url, - const CefString& method, - CefRefPtr postData, - const HeaderMap& headerMap) =0; - - /// - // Get the flags used in combination with CefURLRequest. See - // cef_urlrequest_flags_t for supported values. - /// - /*--cef(default_retval=UR_FLAG_NONE)--*/ - virtual int GetFlags() =0; - - /// - // Set the flags used in combination with CefURLRequest. See - // cef_urlrequest_flags_t for supported values. - /// - /*--cef()--*/ - virtual void SetFlags(int flags) =0; - - /// - // Set the URL to the first party for cookies used in combination with - // CefURLRequest. - /// - /*--cef()--*/ - virtual CefString GetFirstPartyForCookies() =0; - - /// - // Get the URL to the first party for cookies used in combination with - // CefURLRequest. - /// - /*--cef()--*/ - virtual void SetFirstPartyForCookies(const CefString& url) =0; - - /// - // Get the resource type for this request. Only available in the browser - // process. - /// - /*--cef(default_retval=RT_SUB_RESOURCE)--*/ - virtual ResourceType GetResourceType() =0; - - /// - // Get the transition type for this request. Only available in the browser - // process and only applies to requests that represent a main frame or - // sub-frame navigation. - /// - /*--cef(default_retval=TT_EXPLICIT)--*/ - virtual TransitionType GetTransitionType() =0; - - /// - // Returns the globally unique identifier for this request or 0 if not - // specified. Can be used by CefRequestHandler implementations in the browser - // process to track a single request across multiple callbacks. - /// - /*--cef()--*/ - virtual uint64 GetIdentifier() =0; -}; - - -/// -// Class used to represent post data for a web request. The methods of this -// class may be called on any thread. -/// -/*--cef(source=library,no_debugct_check)--*/ -class CefPostData : public virtual CefBase { - public: - typedef std::vector > ElementVector; - - /// - // Create a new CefPostData object. - /// - /*--cef()--*/ - static CefRefPtr Create(); - - /// - // Returns true if this object is read-only. - /// - /*--cef()--*/ - virtual bool IsReadOnly() =0; - - /// - // Returns true if the underlying POST data includes elements that are not - // represented by this CefPostData object (for example, multi-part file upload - // data). Modifying CefPostData objects with excluded elements may result in - // the request failing. - /// - /*--cef()--*/ - virtual bool HasExcludedElements() = 0; - - /// - // Returns the number of existing post data elements. - /// - /*--cef()--*/ - virtual size_t GetElementCount() =0; - - /// - // Retrieve the post data elements. - /// - /*--cef(count_func=elements:GetElementCount)--*/ - virtual void GetElements(ElementVector& elements) =0; - - /// - // Remove the specified post data element. Returns true if the removal - // succeeds. - /// - /*--cef()--*/ - virtual bool RemoveElement(CefRefPtr element) =0; - - /// - // Add the specified post data element. Returns true if the add succeeds. - /// - /*--cef()--*/ - virtual bool AddElement(CefRefPtr element) =0; - - /// - // Remove all existing post data elements. - /// - /*--cef()--*/ - virtual void RemoveElements() =0; -}; - - -/// -// Class used to represent a single element in the request post data. The -// methods of this class may be called on any thread. -/// -/*--cef(source=library,no_debugct_check)--*/ -class CefPostDataElement : public virtual CefBase { - public: - /// - // Post data elements may represent either bytes or files. - /// - typedef cef_postdataelement_type_t Type; - - /// - // Create a new CefPostDataElement object. - /// - /*--cef()--*/ - static CefRefPtr Create(); - - /// - // Returns true if this object is read-only. - /// - /*--cef()--*/ - virtual bool IsReadOnly() =0; - - /// - // Remove all contents from the post data element. - /// - /*--cef()--*/ - virtual void SetToEmpty() =0; - - /// - // The post data element will represent a file. - /// - /*--cef()--*/ - virtual void SetToFile(const CefString& fileName) =0; - - /// - // The post data element will represent bytes. The bytes passed - // in will be copied. - /// - /*--cef()--*/ - virtual void SetToBytes(size_t size, const void* bytes) =0; - - /// - // Return the type of this post data element. - /// - /*--cef(default_retval=PDE_TYPE_EMPTY)--*/ - virtual Type GetType() =0; - - /// - // Return the file name. - /// - /*--cef()--*/ - virtual CefString GetFile() =0; - - /// - // Return the number of bytes. - /// - /*--cef()--*/ - virtual size_t GetBytesCount() =0; - - /// - // Read up to |size| bytes into |bytes| and return the number of bytes - // actually read. - /// - /*--cef()--*/ - virtual size_t GetBytes(size_t size, void* bytes) =0; -}; - -#endif // CEF_INCLUDE_CEF_REQUEST_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_request_context.h b/tool_kits/cef/cef_wrapper/include/cef_request_context.h deleted file mode 100644 index d8cd5581..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_request_context.h +++ /dev/null @@ -1,286 +0,0 @@ -// Copyright (c) 2013 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_REQUEST_CONTEXT_H_ -#define CEF_INCLUDE_CEF_REQUEST_CONTEXT_H_ -#pragma once - -#include - -#include "include/cef_callback.h" -#include "include/cef_cookie.h" -#include "include/cef_request_context_handler.h" -#include "include/cef_values.h" - -class CefSchemeHandlerFactory; - - -/// -// Callback interface for CefRequestContext::ResolveHost. -/// -/*--cef(source=client)--*/ -class CefResolveCallback : public virtual CefBase { - public: - /// - // Called after the ResolveHost request has completed. |result| will be the - // result code. |resolved_ips| will be the list of resolved IP addresses or - // empty if the resolution failed. - /// - /*--cef(optional_param=resolved_ips)--*/ - virtual void OnResolveCompleted( - cef_errorcode_t result, - const std::vector& resolved_ips) =0; -}; - - -/// -// A request context provides request handling for a set of related browser -// or URL request objects. A request context can be specified when creating a -// new browser via the CefBrowserHost static factory methods or when creating a -// new URL request via the CefURLRequest static factory methods. Browser objects -// with different request contexts will never be hosted in the same render -// process. Browser objects with the same request context may or may not be -// hosted in the same render process depending on the process model. Browser -// objects created indirectly via the JavaScript window.open function or -// targeted links will share the same render process and the same request -// context as the source browser. When running in single-process mode there is -// only a single render process (the main process) and so all browsers created -// in single-process mode will share the same request context. This will be the -// first request context passed into a CefBrowserHost static factory method and -// all other request context objects will be ignored. -/// -/*--cef(source=library,no_debugct_check)--*/ -class CefRequestContext : public virtual CefBase { - public: - /// - // Returns the global context object. - /// - /*--cef()--*/ - static CefRefPtr GetGlobalContext(); - - /// - // Creates a new context object with the specified |settings| and optional - // |handler|. - /// - /*--cef(optional_param=handler)--*/ - static CefRefPtr CreateContext( - const CefRequestContextSettings& settings, - CefRefPtr handler); - - /// - // Creates a new context object that shares storage with |other| and uses an - // optional |handler|. - /// - /*--cef(capi_name=create_context_shared,optional_param=handler)--*/ - static CefRefPtr CreateContext( - CefRefPtr other, - CefRefPtr handler); - - /// - // Returns true if this object is pointing to the same context as |that| - // object. - /// - /*--cef()--*/ - virtual bool IsSame(CefRefPtr other) =0; - - /// - // Returns true if this object is sharing the same storage as |that| object. - /// - /*--cef()--*/ - virtual bool IsSharingWith(CefRefPtr other) =0; - - /// - // Returns true if this object is the global context. The global context is - // used by default when creating a browser or URL request with a NULL context - // argument. - /// - /*--cef()--*/ - virtual bool IsGlobal() =0; - - /// - // Returns the handler for this context if any. - /// - /*--cef()--*/ - virtual CefRefPtr GetHandler() =0; - - /// - // Returns the cache path for this object. If empty an "incognito mode" - // in-memory cache is being used. - /// - /*--cef()--*/ - virtual CefString GetCachePath() =0; - - /// - // Returns the default cookie manager for this object. This will be the global - // cookie manager if this object is the global request context. Otherwise, - // this will be the default cookie manager used when this request context does - // not receive a value via CefRequestContextHandler::GetCookieManager(). If - // |callback| is non-NULL it will be executed asnychronously on the IO thread - // after the manager's storage has been initialized. - /// - /*--cef(optional_param=callback)--*/ - virtual CefRefPtr GetDefaultCookieManager( - CefRefPtr callback) =0; - - /// - // Register a scheme handler factory for the specified |scheme_name| and - // optional |domain_name|. An empty |domain_name| value for a standard scheme - // will cause the factory to match all domain names. The |domain_name| value - // will be ignored for non-standard schemes. If |scheme_name| is a built-in - // scheme and no handler is returned by |factory| then the built-in scheme - // handler factory will be called. If |scheme_name| is a custom scheme then - // you must also implement the CefApp::OnRegisterCustomSchemes() method in all - // processes. This function may be called multiple times to change or remove - // the factory that matches the specified |scheme_name| and optional - // |domain_name|. Returns false if an error occurs. This function may be - // called on any thread in the browser process. - /// - /*--cef(optional_param=domain_name,optional_param=factory)--*/ - virtual bool RegisterSchemeHandlerFactory( - const CefString& scheme_name, - const CefString& domain_name, - CefRefPtr factory) =0; - - /// - // Clear all registered scheme handler factories. Returns false on error. This - // function may be called on any thread in the browser process. - /// - /*--cef()--*/ - virtual bool ClearSchemeHandlerFactories() =0; - - /// - // Tells all renderer processes associated with this context to throw away - // their plugin list cache. If |reload_pages| is true they will also reload - // all pages with plugins. CefRequestContextHandler::OnBeforePluginLoad may - // be called to rebuild the plugin list cache. - /// - /*--cef()--*/ - virtual void PurgePluginListCache(bool reload_pages) =0; - - /// - // Returns true if a preference with the specified |name| exists. This method - // must be called on the browser process UI thread. - /// - /*--cef()--*/ - virtual bool HasPreference(const CefString& name) =0; - - /// - // Returns the value for the preference with the specified |name|. Returns - // NULL if the preference does not exist. The returned object contains a copy - // of the underlying preference value and modifications to the returned object - // will not modify the underlying preference value. This method must be called - // on the browser process UI thread. - /// - /*--cef()--*/ - virtual CefRefPtr GetPreference(const CefString& name) =0; - - /// - // Returns all preferences as a dictionary. If |include_defaults| is true then - // preferences currently at their default value will be included. The returned - // object contains a copy of the underlying preference values and - // modifications to the returned object will not modify the underlying - // preference values. This method must be called on the browser process UI - // thread. - /// - /*--cef()--*/ - virtual CefRefPtr GetAllPreferences( - bool include_defaults) =0; - - /// - // Returns true if the preference with the specified |name| can be modified - // using SetPreference. As one example preferences set via the command-line - // usually cannot be modified. This method must be called on the browser - // process UI thread. - /// - /*--cef()--*/ - virtual bool CanSetPreference(const CefString& name) =0; - - /// - // Set the |value| associated with preference |name|. Returns true if the - // value is set successfully and false otherwise. If |value| is NULL the - // preference will be restored to its default value. If setting the preference - // fails then |error| will be populated with a detailed description of the - // problem. This method must be called on the browser process UI thread. - /// - /*--cef(optional_param=value)--*/ - virtual bool SetPreference(const CefString& name, - CefRefPtr value, - CefString& error) =0; - - /// - // Clears all certificate exceptions that were added as part of handling - // CefRequestHandler::OnCertificateError(). If you call this it is - // recommended that you also call CloseAllConnections() or you risk not - // being prompted again for server certificates if you reconnect quickly. - // If |callback| is non-NULL it will be executed on the UI thread after - // completion. - /// - /*--cef(optional_param=callback)--*/ - virtual void ClearCertificateExceptions( - CefRefPtr callback) =0; - - /// - // Clears all active and idle connections that Chromium currently has. - // This is only recommended if you have released all other CEF objects but - // don't yet want to call CefShutdown(). If |callback| is non-NULL it will be - // executed on the UI thread after completion. - /// - /*--cef(optional_param=callback)--*/ - virtual void CloseAllConnections( - CefRefPtr callback) =0; - - /// - // Attempts to resolve |origin| to a list of associated IP addresses. - // |callback| will be executed on the UI thread after completion. - /// - /*--cef()--*/ - virtual void ResolveHost( - const CefString& origin, - CefRefPtr callback) =0; - - /// - // Attempts to resolve |origin| to a list of associated IP addresses using - // cached data. |resolved_ips| will be populated with the list of resolved IP - // addresses or empty if no cached data is available. Returns ERR_NONE on - // success. This method must be called on the browser process IO thread. - /// - /*--cef(default_retval=ERR_FAILED)--*/ - virtual cef_errorcode_t ResolveHostCached( - const CefString& origin, - std::vector& resolved_ips) =0; -}; - -#endif // CEF_INCLUDE_CEF_REQUEST_CONTEXT_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_request_context_handler.h b/tool_kits/cef/cef_wrapper/include/cef_request_context_handler.h deleted file mode 100644 index c2d3c7af..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_request_context_handler.h +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) 2013 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_REQUEST_CONTEXT_HANDLER_H_ -#define CEF_INCLUDE_CEF_REQUEST_CONTEXT_HANDLER_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_cookie.h" -#include "include/cef_web_plugin.h" - -/// -// Implement this interface to provide handler implementations. The handler -// instance will not be released until all objects related to the context have -// been destroyed. -/// -/*--cef(source=client,no_debugct_check)--*/ -class CefRequestContextHandler : public virtual CefBase { - public: - typedef cef_plugin_policy_t PluginPolicy; - - /// - // Called on the browser process IO thread to retrieve the cookie manager. If - // this method returns NULL the default cookie manager retrievable via - // CefRequestContext::GetDefaultCookieManager() will be used. - /// - /*--cef()--*/ - virtual CefRefPtr GetCookieManager() { return NULL; } - - /// - // Called on multiple browser process threads before a plugin instance is - // loaded. |mime_type| is the mime type of the plugin that will be loaded. - // |plugin_url| is the content URL that the plugin will load and may be empty. - // |top_origin_url| is the URL for the top-level frame that contains the - // plugin when loading a specific plugin instance or empty when building the - // initial list of enabled plugins for 'navigator.plugins' JavaScript state. - // |plugin_info| includes additional information about the plugin that will be - // loaded. |plugin_policy| is the recommended policy. Modify |plugin_policy| - // and return true to change the policy. Return false to use the recommended - // policy. The default plugin policy can be set at runtime using the - // `--plugin-policy=[allow|detect|block]` command-line flag. Decisions to mark - // a plugin as disabled by setting |plugin_policy| to PLUGIN_POLICY_DISABLED - // may be cached when |top_origin_url| is empty. To purge the plugin list - // cache and potentially trigger new calls to this method call - // CefRequestContext::PurgePluginListCache. - /// - /*--cef(optional_param=plugin_url,optional_param=top_origin_url)--*/ - virtual bool OnBeforePluginLoad(const CefString& mime_type, - const CefString& plugin_url, - const CefString& top_origin_url, - CefRefPtr plugin_info, - PluginPolicy* plugin_policy) { - return false; - } -}; - -#endif // CEF_INCLUDE_CEF_REQUEST_CONTEXT_HANDLER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_request_handler.h b/tool_kits/cef/cef_wrapper/include/cef_request_handler.h deleted file mode 100644 index 5ffb3b9b..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_request_handler.h +++ /dev/null @@ -1,308 +0,0 @@ -// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// --------------------------------------------------------------------------- -// -// 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_REQUEST_HANDLER_H_ -#define CEF_INCLUDE_CEF_REQUEST_HANDLER_H_ -#pragma once - -#include "include/cef_auth_callback.h" -#include "include/cef_base.h" -#include "include/cef_browser.h" -#include "include/cef_frame.h" -#include "include/cef_resource_handler.h" -#include "include/cef_response.h" -#include "include/cef_response_filter.h" -#include "include/cef_request.h" -#include "include/cef_ssl_info.h" - - -/// -// Callback interface used for asynchronous continuation of url requests. -/// -/*--cef(source=library)--*/ -class CefRequestCallback : public virtual CefBase { - public: - /// - // Continue the url request. If |allow| is true the request will be continued. - // Otherwise, the request will be canceled. - /// - /*--cef(capi_name=cont)--*/ - virtual void Continue(bool allow) =0; - - /// - // Cancel the url request. - /// - /*--cef()--*/ - virtual void Cancel() =0; -}; - - -/// -// Implement this interface to handle events related to browser requests. The -// methods of this class will be called on the thread indicated. -/// -/*--cef(source=client)--*/ -class CefRequestHandler : public virtual CefBase { - public: - typedef cef_return_value_t ReturnValue; - typedef cef_termination_status_t TerminationStatus; - typedef cef_urlrequest_status_t URLRequestStatus; - typedef cef_window_open_disposition_t WindowOpenDisposition; - - /// - // Called on the UI thread before browser navigation. Return true to cancel - // the navigation or false to allow the navigation to proceed. The |request| - // object cannot be modified in this callback. - // CefLoadHandler::OnLoadingStateChange will be called twice in all cases. - // If the navigation is allowed CefLoadHandler::OnLoadStart and - // CefLoadHandler::OnLoadEnd will be called. If the navigation is canceled - // CefLoadHandler::OnLoadError will be called with an |errorCode| value of - // ERR_ABORTED. - /// - /*--cef()--*/ - virtual bool OnBeforeBrowse(CefRefPtr browser, - CefRefPtr frame, - CefRefPtr request, - bool is_redirect) { - return false; - } - - /// - // Called on the UI thread before OnBeforeBrowse in certain limited cases - // where navigating a new or different browser might be desirable. This - // includes user-initiated navigation that might open in a special way (e.g. - // links clicked via middle-click or ctrl + left-click) and certain types of - // cross-origin navigation initiated from the renderer process (e.g. - // navigating the top-level frame to/from a file URL). The |browser| and - // |frame| values represent the source of the navigation. The - // |target_disposition| value indicates where the user intended to navigate - // the browser based on standard Chromium behaviors (e.g. current tab, - // new tab, etc). The |user_gesture| value will be true if the browser - // navigated via explicit user gesture (e.g. clicking a link) or false if it - // navigated automatically (e.g. via the DomContentLoaded event). Return true - // to cancel the navigation or false to allow the navigation to proceed in the - // source browser's top-level frame. - /// - /*--cef()--*/ - virtual bool OnOpenURLFromTab(CefRefPtr browser, - CefRefPtr frame, - const CefString& target_url, - WindowOpenDisposition target_disposition, - bool user_gesture) { - return false; - } - - /// - // Called on the IO thread before a resource request is loaded. The |request| - // object may be modified. Return RV_CONTINUE to continue the request - // immediately. Return RV_CONTINUE_ASYNC and call CefRequestCallback:: - // Continue() at a later time to continue or cancel the request - // asynchronously. Return RV_CANCEL to cancel the request immediately. - // - /// - /*--cef(default_retval=RV_CONTINUE)--*/ - virtual ReturnValue OnBeforeResourceLoad( - CefRefPtr browser, - CefRefPtr frame, - CefRefPtr request, - CefRefPtr callback) { - return RV_CONTINUE; - } - - /// - // Called on the IO thread before a resource is loaded. To allow the resource - // to load normally return NULL. To specify a handler for the resource return - // a CefResourceHandler object. The |request| object should not be modified in - // this callback. - /// - /*--cef()--*/ - virtual CefRefPtr GetResourceHandler( - CefRefPtr browser, - CefRefPtr frame, - CefRefPtr request) { - return NULL; - } - - /// - // Called on the IO thread when a resource load is redirected. The |request| - // parameter will contain the old URL and other request-related information. - // The |new_url| parameter will contain the new URL and can be changed if - // desired. The |request| object cannot be modified in this callback. - /// - /*--cef()--*/ - virtual void OnResourceRedirect(CefRefPtr browser, - CefRefPtr frame, - CefRefPtr request, - CefString& new_url) {} - - /// - // Called on the IO thread when a resource response is received. To allow the - // resource to load normally return false. To redirect or retry the resource - // modify |request| (url, headers or post body) and return true. The - // |response| object cannot be modified in this callback. - /// - /*--cef()--*/ - virtual bool OnResourceResponse(CefRefPtr browser, - CefRefPtr frame, - CefRefPtr request, - CefRefPtr response) { - return false; - } - - /// - // Called on the IO thread to optionally filter resource response content. - // |request| and |response| represent the request and response respectively - // and cannot be modified in this callback. - /// - /*--cef()--*/ - virtual CefRefPtr GetResourceResponseFilter( - CefRefPtr browser, - CefRefPtr frame, - CefRefPtr request, - CefRefPtr response) { - return NULL; - } - - /// - // Called on the IO thread when a resource load has completed. |request| and - // |response| represent the request and response respectively and cannot be - // modified in this callback. |status| indicates the load completion status. - // |received_content_length| is the number of response bytes actually read. - /// - /*--cef()--*/ - virtual void OnResourceLoadComplete(CefRefPtr browser, - CefRefPtr frame, - CefRefPtr request, - CefRefPtr response, - URLRequestStatus status, - int64 received_content_length) {} - - /// - // Called on the IO thread when the browser needs credentials from the user. - // |isProxy| indicates whether the host is a proxy server. |host| contains the - // hostname and |port| contains the port number. |realm| is the realm of the - // challenge and may be empty. |scheme| is the authentication scheme used, - // such as "basic" or "digest", and will be empty if the source of the request - // is an FTP server. Return true to continue the request and call - // CefAuthCallback::Continue() either in this method or at a later time when - // the authentication information is available. Return false to cancel the - // request immediately. - /// - /*--cef(optional_param=realm,optional_param=scheme)--*/ - virtual bool GetAuthCredentials(CefRefPtr browser, - CefRefPtr frame, - bool isProxy, - const CefString& host, - int port, - const CefString& realm, - const CefString& scheme, - CefRefPtr callback) { - return false; - } - - /// - // Called on the IO thread when JavaScript requests a specific storage quota - // size via the webkitStorageInfo.requestQuota function. |origin_url| is the - // origin of the page making the request. |new_size| is the requested quota - // size in bytes. Return true to continue the request and call - // CefRequestCallback::Continue() either in this method or at a later time to - // grant or deny the request. Return false to cancel the request immediately. - /// - /*--cef()--*/ - virtual bool OnQuotaRequest(CefRefPtr browser, - const CefString& origin_url, - int64 new_size, - CefRefPtr callback) { - return false; - } - - /// - // Called on the UI thread to handle requests for URLs with an unknown - // protocol component. Set |allow_os_execution| to true to attempt execution - // via the registered OS protocol handler, if any. - // SECURITY WARNING: YOU SHOULD USE THIS METHOD TO ENFORCE RESTRICTIONS BASED - // ON SCHEME, HOST OR OTHER URL ANALYSIS BEFORE ALLOWING OS EXECUTION. - /// - /*--cef()--*/ - virtual void OnProtocolExecution(CefRefPtr browser, - const CefString& url, - bool& allow_os_execution) {} - - /// - // Called on the UI thread to handle requests for URLs with an invalid - // SSL certificate. Return true and call CefRequestCallback::Continue() either - // in this method or at a later time to continue or cancel the request. Return - // false to cancel the request immediately. If - // CefSettings.ignore_certificate_errors is set all invalid certificates will - // be accepted without calling this method. - /// - /*--cef()--*/ - virtual bool OnCertificateError( - CefRefPtr browser, - cef_errorcode_t cert_error, - const CefString& request_url, - CefRefPtr ssl_info, - CefRefPtr callback) { - return false; - } - - /// - // Called on the browser process UI thread when a plugin has crashed. - // |plugin_path| is the path of the plugin that crashed. - /// - /*--cef()--*/ - virtual void OnPluginCrashed(CefRefPtr browser, - const CefString& plugin_path) {} - - /// - // Called on the browser process UI thread when the render view associated - // with |browser| is ready to receive/handle IPC messages in the render - // process. - /// - /*--cef()--*/ - virtual void OnRenderViewReady(CefRefPtr browser) {} - - /// - // Called on the browser process UI thread when the render process - // terminates unexpectedly. |status| indicates how the process - // terminated. - /// - /*--cef()--*/ - virtual void OnRenderProcessTerminated(CefRefPtr browser, - TerminationStatus status) {} -}; - -#endif // CEF_INCLUDE_CEF_REQUEST_HANDLER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_resource_bundle.h b/tool_kits/cef/cef_wrapper/include/cef_resource_bundle.h deleted file mode 100644 index 3b064ffe..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_resource_bundle.h +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) 2015 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_RESOURCE_BUNDLE_H_ -#define CEF_INCLUDE_CEF_RESOURCE_BUNDLE_H_ -#pragma once - -#include "include/cef_base.h" - -/// -// Class used for retrieving resources from the resource bundle (*.pak) files -// loaded by CEF during startup or via the CefResourceBundleHandler returned -// from CefApp::GetResourceBundleHandler. See CefSettings for additional options -// related to resource bundle loading. The methods of this class may be called -// on any thread unless otherwise indicated. -/// -/*--cef(source=library,no_debugct_check)--*/ -class CefResourceBundle : public virtual CefBase { - public: - typedef cef_scale_factor_t ScaleFactor; - - /// - // Returns the global resource bundle instance. - /// - /*--cef()--*/ - static CefRefPtr GetGlobal(); - - /// - // Returns the localized string for the specified |string_id| or an empty - // string if the value is not found. Include cef_pack_strings.h for a listing - // of valid string ID values. - /// - /*--cef()--*/ - virtual CefString GetLocalizedString(int string_id) =0; - - /// - // Retrieves the contents of the specified scale independent |resource_id|. - // If the value is found then |data| and |data_size| will be populated and - // this method will return true. If the value is not found then this method - // will return false. The returned |data| pointer will remain resident in - // memory and should not be freed. Include cef_pack_resources.h for a listing - // of valid resource ID values. - /// - /*--cef()--*/ - virtual bool GetDataResource(int resource_id, - void*& data, - size_t& data_size) =0; - - /// - // Retrieves the contents of the specified |resource_id| nearest the scale - // factor |scale_factor|. Use a |scale_factor| value of SCALE_FACTOR_NONE for - // scale independent resources or call GetDataResource instead. If the value - // is found then |data| and |data_size| will be populated and this method will - // return true. If the value is not found then this method will return false. - // The returned |data| pointer will remain resident in memory and should not - // be freed. Include cef_pack_resources.h for a listing of valid resource ID - // values. - /// - /*--cef()--*/ - virtual bool GetDataResourceForScale(int resource_id, - ScaleFactor scale_factor, - void*& data, - size_t& data_size) =0; -}; - -#endif // CEF_INCLUDE_CEF_RESOURCE_BUNDLE_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_resource_bundle_handler.h b/tool_kits/cef/cef_wrapper/include/cef_resource_bundle_handler.h deleted file mode 100644 index afc46da7..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_resource_bundle_handler.h +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_RESOURCE_BUNDLE_HANDLER_H_ -#define CEF_INCLUDE_CEF_RESOURCE_BUNDLE_HANDLER_H_ -#pragma once - -#include "include/cef_base.h" - -/// -// Class used to implement a custom resource bundle interface. See CefSettings -// for additional options related to resource bundle loading. The methods of -// this class may be called on multiple threads. -/// -/*--cef(source=client)--*/ -class CefResourceBundleHandler : public virtual CefBase { - public: - typedef cef_scale_factor_t ScaleFactor; - - /// - // Called to retrieve a localized translation for the specified |string_id|. - // To provide the translation set |string| to the translation string and - // return true. To use the default translation return false. Include - // cef_pack_strings.h for a listing of valid string ID values. - /// - /*--cef()--*/ - virtual bool GetLocalizedString(int string_id, - CefString& string) =0; - - /// - // Called to retrieve data for the specified scale independent |resource_id|. - // To provide the resource data set |data| and |data_size| to the data pointer - // and size respectively and return true. To use the default resource data - // return false. The resource data will not be copied and must remain resident - // in memory. Include cef_pack_resources.h for a listing of valid resource ID - // values. - /// - /*--cef()--*/ - virtual bool GetDataResource(int resource_id, - void*& data, - size_t& data_size) =0; - - /// - // Called to retrieve data for the specified |resource_id| nearest the scale - // factor |scale_factor|. To provide the resource data set |data| and - // |data_size| to the data pointer and size respectively and return true. To - // use the default resource data return false. The resource data will not be - // copied and must remain resident in memory. Include cef_pack_resources.h for - // a listing of valid resource ID values. - /// - /*--cef()--*/ - virtual bool GetDataResourceForScale(int resource_id, - ScaleFactor scale_factor, - void*& data, - size_t& data_size) =0; -}; - -#endif // CEF_INCLUDE_CEF_RESOURCE_BUNDLE_HANDLER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_resource_handler.h b/tool_kits/cef/cef_wrapper/include/cef_resource_handler.h deleted file mode 100644 index 57c8b7fc..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_resource_handler.h +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_RESOURCE_HANDLER_H_ -#define CEF_INCLUDE_CEF_RESOURCE_HANDLER_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_browser.h" -#include "include/cef_callback.h" -#include "include/cef_cookie.h" -#include "include/cef_request.h" -#include "include/cef_response.h" - -/// -// Class used to implement a custom request handler interface. The methods of -// this class will always be called on the IO thread. -/// -/*--cef(source=client)--*/ -class CefResourceHandler : public virtual CefBase { - public: - /// - // Begin processing the request. To handle the request return true and call - // CefCallback::Continue() once the response header information is available - // (CefCallback::Continue() can also be called from inside this method if - // header information is available immediately). To cancel the request return - // false. - /// - /*--cef()--*/ - virtual bool ProcessRequest(CefRefPtr request, - CefRefPtr callback) =0; - - /// - // Retrieve response header information. If the response length is not known - // set |response_length| to -1 and ReadResponse() will be called until it - // returns false. If the response length is known set |response_length| - // to a positive value and ReadResponse() will be called until it returns - // 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. - /// - /*--cef()--*/ - virtual void GetResponseHeaders(CefRefPtr response, - int64& response_length, - CefString& redirectUrl) =0; - - /// - // Read response data. If data is available immediately copy up to - // |bytes_to_read| bytes into |data_out|, set |bytes_read| to the number of - // bytes copied, and return true. To read the data at a later time set - // |bytes_read| to 0, return true and call CefCallback::Continue() when the - // data is available. To indicate response completion return false. - /// - /*--cef()--*/ - virtual bool ReadResponse(void* data_out, - int bytes_to_read, - int& bytes_read, - CefRefPtr callback) =0; - - /// - // Return true if the specified cookie can be sent with the request or false - // otherwise. If false is returned for any cookie then no cookies will be sent - // with the request. - /// - /*--cef()--*/ - virtual bool CanGetCookie(const CefCookie& cookie) { return true; } - - /// - // Return true if the specified cookie returned with the response can be set - // or false otherwise. - /// - /*--cef()--*/ - virtual bool CanSetCookie(const CefCookie& cookie) { return true; } - - /// - // Request processing has been canceled. - /// - /*--cef()--*/ - virtual void Cancel() =0; -}; - -#endif // CEF_INCLUDE_CEF_RESOURCE_HANDLER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_response.h b/tool_kits/cef/cef_wrapper/include/cef_response.h deleted file mode 100644 index 32fbef1b..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_response.h +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_RESPONSE_H_ -#define CEF_INCLUDE_CEF_RESPONSE_H_ -#pragma once - -#include "include/cef_base.h" -#include - -/// -// Class used to represent a web response. The methods of this class may be -// called on any thread. -/// -/*--cef(source=library,no_debugct_check)--*/ -class CefResponse : public virtual CefBase { - public: - typedef std::multimap HeaderMap; - - /// - // Create a new CefResponse object. - /// - /*--cef()--*/ - static CefRefPtr Create(); - - /// - // Returns true if this object is read-only. - /// - /*--cef()--*/ - virtual bool IsReadOnly() =0; - - /// - // Get the response status code. - /// - /*--cef()--*/ - virtual int GetStatus() =0; - - /// - // Set the response status code. - /// - /*--cef()--*/ - virtual void SetStatus(int status) = 0; - - /// - // Get the response status text. - /// - /*--cef()--*/ - virtual CefString GetStatusText() =0; - - /// - // Set the response status text. - /// - /*--cef()--*/ - virtual void SetStatusText(const CefString& statusText) = 0; - - /// - // Get the response mime type. - /// - /*--cef()--*/ - virtual CefString GetMimeType() = 0; - - /// - // Set the response mime type. - /// - /*--cef()--*/ - virtual void SetMimeType(const CefString& mimeType) = 0; - - /// - // Get the value for the specified response header field. - /// - /*--cef()--*/ - virtual CefString GetHeader(const CefString& name) =0; - - /// - // Get all response header fields. - /// - /*--cef()--*/ - virtual void GetHeaderMap(HeaderMap& headerMap) =0; - - /// - // Set all response header fields. - /// - /*--cef()--*/ - virtual void SetHeaderMap(const HeaderMap& headerMap) =0; -}; - -#endif // CEF_INCLUDE_CEF_RESPONSE_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_response_filter.h b/tool_kits/cef/cef_wrapper/include/cef_response_filter.h deleted file mode 100644 index 594d4a98..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_response_filter.h +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) 2015 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_RESPONSE_FILTER_H_ -#define CEF_INCLUDE_CEF_RESPONSE_FILTER_H_ -#pragma once - -#include "include/cef_base.h" - -/// -// Implement this interface to filter resource response content. The methods of -// this class will be called on the browser process IO thread. -/// -/*--cef(source=client)--*/ -class CefResponseFilter : public virtual CefBase { - public: - typedef cef_response_filter_status_t FilterStatus; - - /// - // Initialize the response filter. Will only be called a single time. The - // filter will not be installed if this method returns false. - /// - /*--cef()--*/ - virtual bool InitFilter() =0; - - /// - // Called to filter a chunk of data. |data_in| is the input buffer containing - // |data_in_size| bytes of pre-filter data (|data_in| will be NULL if - // |data_in_size| is zero). |data_out| is the output buffer that can accept up - // to |data_out_size| bytes of filtered output data. Set |data_in_read| to the - // number of bytes that were read from |data_in|. Set |data_out_written| to - // the number of bytes that were written into |data_out|. If some or all of - // the pre-filter data was read successfully but more data is needed in order - // to continue filtering (filtered output is pending) return - // RESPONSE_FILTER_NEED_MORE_DATA. If some or all of the pre-filter data was - // read successfully and all available filtered output has been written return - // RESPONSE_FILTER_DONE. If an error occurs during filtering return - // RESPONSE_FILTER_ERROR. This method will be called repeatedly until there is - // no more data to filter (resource response is complete), |data_in_read| - // matches |data_in_size| (all available pre-filter bytes have been read), and - // the method returns RESPONSE_FILTER_DONE or RESPONSE_FILTER_ERROR. Do not - // keep a reference to the buffers passed to this method. - /// - /*--cef(optional_param=data_in,default_retval=RESPONSE_FILTER_ERROR)--*/ - virtual FilterStatus Filter(void* data_in, - size_t data_in_size, - size_t& data_in_read, - void* data_out, - size_t data_out_size, - size_t& data_out_written) =0; -}; - -#endif // CEF_INCLUDE_CEF_RESPONSE_FILTER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_runnable.h b/tool_kits/cef/cef_wrapper/include/cef_runnable.h deleted file mode 100644 index e8fbcdca..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_runnable.h +++ /dev/null @@ -1,333 +0,0 @@ -// 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 -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 CEF_DISABLE_RUNNABLE_METHOD_REFCOUNT(TypeName) \ - template <> \ - struct CefRunnableMethodTraits { \ - 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 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 traits_; - - IMPLEMENT_REFCOUNTING(CefRunnableMethod); -}; - -template -inline CefRefPtr NewCefRunnableMethod(T* object, Method method) { - return new CefRunnableMethod( - object, method, base::MakeTuple()); -} - -template -inline CefRefPtr NewCefRunnableMethod(T* object, Method method, - const A& a) { - return new CefRunnableMethod >( - object, method, base::MakeTuple(a)); -} - -template -inline CefRefPtr NewCefRunnableMethod(T* object, Method method, - const A& a, const B& b) { - return new CefRunnableMethod >( - object, method, base::MakeTuple(a, b)); -} - -template -inline CefRefPtr NewCefRunnableMethod(T* object, Method method, - const A& a, const B& b, - const C& c) { - return new CefRunnableMethod >( - object, method, base::MakeTuple(a, b, c)); -} - -template -inline CefRefPtr NewCefRunnableMethod(T* object, Method method, - const A& a, const B& b, - const C& c, const D& d) { - return new CefRunnableMethod >( - object, method, base::MakeTuple(a, b, c, d)); -} - -template -inline CefRefPtr NewCefRunnableMethod(T* object, Method method, - const A& a, const B& b, - const C& c, const D& d, - const E& e) { - return new CefRunnableMethod >( - object, method, base::MakeTuple(a, b, c, d, e)); -} - -template -inline CefRefPtr 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 >( - object, method, base::MakeTuple(a, b, c, d, e, f)); -} - -template -inline CefRefPtr 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 >( - object, method, base::MakeTuple(a, b, c, d, e, f, g)); -} - -// CefRunnableFunction and NewCefRunnableFunction implementation -------------- - -template -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 -inline CefRefPtr NewCefRunnableFunction(Function function) { - return new CefRunnableFunction( - function, base::MakeTuple()); -} - -template -inline CefRefPtr NewCefRunnableFunction(Function function, - const A& a) { - return new CefRunnableFunction >( - function, base::MakeTuple(a)); -} - -template -inline CefRefPtr NewCefRunnableFunction(Function function, - const A& a, const B& b) { - return new CefRunnableFunction >( - function, base::MakeTuple(a, b)); -} - -template -inline CefRefPtr NewCefRunnableFunction(Function function, - const A& a, const B& b, - const C& c) { - return new CefRunnableFunction >( - function, base::MakeTuple(a, b, c)); -} - -template -inline CefRefPtr NewCefRunnableFunction(Function function, - const A& a, const B& b, - const C& c, const D& d) { - return new CefRunnableFunction >( - function, base::MakeTuple(a, b, c, d)); -} - -template -inline CefRefPtr NewCefRunnableFunction(Function function, - const A& a, const B& b, - const C& c, const D& d, - const E& e) { - return new CefRunnableFunction >( - function, base::MakeTuple(a, b, c, d, e)); -} - -template -inline CefRefPtr 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::MakeTuple(a, b, c, d, e, f)); -} - -template -inline CefRefPtr 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::MakeTuple(a, b, c, d, e, f, g)); -} - -template -inline CefRefPtr 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::MakeTuple(a, b, c, d, e, f, g, h)); -} - -#endif // CEF_INCLUDE_CEF_RUNNABLE_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_sandbox_win.h b/tool_kits/cef/cef_wrapper/include/cef_sandbox_win.h deleted file mode 100644 index 9b6c48b0..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_sandbox_win.h +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CEF_INCLUDE_CEF_SANDBOX_WIN_H_ -#define CEF_INCLUDE_CEF_SANDBOX_WIN_H_ -#pragma once - -#include "include/cef_base.h" - -#if defined(OS_WIN) - -#ifdef __cplusplus -extern "C" { -#endif - -// The sandbox is used to restrict sub-processes (renderer, plugin, GPU, etc) -// from directly accessing system resources. This helps to protect the user -// from untrusted and potentially malicious Web content. -// See http://www.chromium.org/developers/design-documents/sandbox for -// complete details. -// -// To enable the sandbox on Windows the following requirements must be met: -// 1. Use the same executable for the browser process and all sub-processes. -// 2. Link the executable with the cef_sandbox static library. -// 3. Call the cef_sandbox_info_create() function from within the executable -// (not from a separate DLL) and pass the resulting pointer into both the -// CefExecutProcess() and CefInitialize() functions via the -// |windows_sandbox_info| parameter. - -/// -// Create the sandbox information object for this process. It is safe to create -// multiple of this object and to destroy the object immediately after passing -// into the CefExecutProcess() and/or CefInitialize() functions. -/// -void* cef_sandbox_info_create(); - -/// -// Destroy the specified sandbox information object. -/// -void cef_sandbox_info_destroy(void* sandbox_info); - -#ifdef __cplusplus -} - -/// -// Manages the life span of a sandbox information object. -/// -class CefScopedSandboxInfo { - public: - CefScopedSandboxInfo() { - sandbox_info_ = cef_sandbox_info_create(); - } - ~CefScopedSandboxInfo() { - cef_sandbox_info_destroy(sandbox_info_); - } - - void* sandbox_info() const { return sandbox_info_; } - - private: - void* sandbox_info_; -}; -#endif // __cplusplus - -#endif // defined(OS_WIN) - -#endif // CEF_INCLUDE_CEF_SANDBOX_WIN_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_scheme.h b/tool_kits/cef/cef_wrapper/include/cef_scheme.h deleted file mode 100644 index a966a9a7..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_scheme.h +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_SCHEME_H_ -#define CEF_INCLUDE_CEF_SCHEME_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_browser.h" -#include "include/cef_frame.h" -#include "include/cef_request.h" -#include "include/cef_response.h" -#include "include/cef_resource_handler.h" - -class CefSchemeHandlerFactory; - - -/// -// Register a scheme handler factory with the global request context. An empty -// |domain_name| value for a standard scheme will cause the factory to match all -// domain names. The |domain_name| value will be ignored for non-standard -// schemes. If |scheme_name| is a built-in scheme and no handler is returned by -// |factory| then the built-in scheme handler factory will be called. If -// |scheme_name| is a custom scheme then you must also implement the -// CefApp::OnRegisterCustomSchemes() method in all processes. This function may -// be called multiple times to change or remove the factory that matches the -// specified |scheme_name| and optional |domain_name|. Returns false if an error -// occurs. This function may be called on any thread in the browser process. -// Using this function is equivalent to calling -// CefRequestContext::GetGlobalContext()->RegisterSchemeHandlerFactory(). -/// -/*--cef(optional_param=domain_name,optional_param=factory)--*/ -bool CefRegisterSchemeHandlerFactory( - const CefString& scheme_name, - const CefString& domain_name, - CefRefPtr factory); - -/// -// Clear all scheme handler factories registered with the global request -// context. Returns false on error. This function may be called on any thread in -// the browser process. Using this function is equivalent to calling -// CefRequestContext::GetGlobalContext()->ClearSchemeHandlerFactories(). -/// -/*--cef()--*/ -bool CefClearSchemeHandlerFactories(); - - -/// -// Class that manages custom scheme registrations. -/// -/*--cef(source=library)--*/ -class CefSchemeRegistrar : public virtual CefBase { - public: - /// - // Register a custom scheme. This method should not be called for the built-in - // HTTP, HTTPS, FILE, FTP, ABOUT and DATA schemes. - // - // If |is_standard| is true the scheme will be treated as a standard scheme. - // Standard schemes are subject to URL canonicalization and parsing rules as - // defined in the Common Internet Scheme Syntax RFC 1738 Section 3.1 available - // at http://www.ietf.org/rfc/rfc1738.txt - // - // In particular, the syntax for standard scheme URLs must be of the form: - //
-  //  [scheme]://[username]:[password]@[host]:[port]/[url-path]
-  // 
- // Standard scheme URLs must have a host component that is a fully qualified - // domain name as defined in Section 3.5 of RFC 1034 [13] and Section 2.1 of - // RFC 1123. These URLs will be canonicalized to "scheme://host/path" in the - // simplest case and "scheme://username:password@host:port/path" in the most - // explicit case. For example, "scheme:host/path" and "scheme:///host/path" - // will both be canonicalized to "scheme://host/path". The origin of a - // standard scheme URL is the combination of scheme, host and port (i.e., - // "scheme://host:port" in the most explicit case). - // - // For non-standard scheme URLs only the "scheme:" component is parsed and - // canonicalized. The remainder of the URL will be passed to the handler - // as-is. For example, "scheme:///some%20text" will remain the same. - // Non-standard scheme URLs cannot be used as a target for form submission. - // - // If |is_local| is true the scheme will be treated as local (i.e., with the - // same security rules as those applied to "file" URLs). Normal pages cannot - // link to or access local URLs. Also, by default, local URLs can only perform - // XMLHttpRequest calls to the same URL (origin + path) that originated the - // request. To allow XMLHttpRequest calls from a local URL to other URLs with - // the same origin set the CefSettings.file_access_from_file_urls_allowed - // value to true. To allow XMLHttpRequest calls from a local URL to all - // origins set the CefSettings.universal_access_from_file_urls_allowed value - // to true. - // - // If |is_display_isolated| is true the scheme will be treated as display- - // isolated. This means that pages cannot display these URLs unless they are - // from the same scheme. For example, pages in another origin cannot create - // iframes or hyperlinks to URLs with this scheme. - // - // This function may be called on any thread. It should only be called once - // per unique |scheme_name| value. If |scheme_name| is already registered or - // if an error occurs this method will return false. - /// - /*--cef()--*/ - virtual bool AddCustomScheme(const CefString& scheme_name, - bool is_standard, - bool is_local, - bool is_display_isolated) =0; -}; - - -/// -// Class that creates CefResourceHandler instances for handling scheme requests. -// The methods of this class will always be called on the IO thread. -/// -/*--cef(source=client)--*/ -class CefSchemeHandlerFactory : public virtual CefBase { - public: - /// - // Return a new resource handler instance to handle the request or an empty - // reference to allow default handling of the request. |browser| and |frame| - // will be the browser window and frame respectively that originated the - // request or NULL if the request did not originate from a browser window - // (for example, if the request came from CefURLRequest). The |request| object - // passed to this method will not contain cookie data. - /// - /*--cef(optional_param=browser,optional_param=frame)--*/ - virtual CefRefPtr Create( - CefRefPtr browser, - CefRefPtr frame, - const CefString& scheme_name, - CefRefPtr request) =0; -}; - -#endif // CEF_INCLUDE_CEF_SCHEME_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_ssl_info.h b/tool_kits/cef/cef_wrapper/include/cef_ssl_info.h deleted file mode 100644 index 1ebc894e..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_ssl_info.h +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) 2015 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_SSL_INFO_H_ -#define CEF_INCLUDE_CEF_SSL_INFO_H_ -#pragma once - -#include - -#include "include/cef_base.h" -#include "include/cef_values.h" - -/// -// Class representing the issuer or subject field of an X.509 certificate. -/// -/*--cef(source=library)--*/ -class CefSSLCertPrincipal : public virtual CefBase { - public: - /// - // Returns a name that can be used to represent the issuer. It tries in this - // order: CN, O and OU and returns the first non-empty one found. - /// - /*--cef()--*/ - virtual CefString GetDisplayName() =0; - - /// - // Returns the common name. - /// - /*--cef()--*/ - virtual CefString GetCommonName() =0; - - /// - // Returns the locality name. - /// - /*--cef()--*/ - virtual CefString GetLocalityName() =0; - - /// - // Returns the state or province name. - /// - /*--cef()--*/ - virtual CefString GetStateOrProvinceName() =0; - - /// - // Returns the country name. - /// - /*--cef()--*/ - virtual CefString GetCountryName() =0; - - /// - // Retrieve the list of street addresses. - /// - /*--cef()--*/ - virtual void GetStreetAddresses(std::vector& addresses) =0; - - /// - // Retrieve the list of organization names. - /// - /*--cef()--*/ - virtual void GetOrganizationNames(std::vector& names) =0; - - /// - // Retrieve the list of organization unit names. - /// - /*--cef()--*/ - virtual void GetOrganizationUnitNames(std::vector& names) =0; - - /// - // Retrieve the list of domain components. - /// - /*--cef()--*/ - virtual void GetDomainComponents(std::vector& components) =0; -}; - -/// -// Class representing SSL information. -/// -/*--cef(source=library)--*/ -class CefSSLInfo : public virtual CefBase { - public: - typedef std::vector > IssuerChainBinaryList; - - /// - // Returns a bitmask containing any and all problems verifying the server - // certificate. - /// - /*--cef(default_retval=CERT_STATUS_NONE)--*/ - virtual cef_cert_status_t GetCertStatus() =0; - - /// - // Returns true if the certificate status has any error, major or minor. - /// - /*--cef()--*/ - virtual bool IsCertStatusError() =0; - - /// - // Returns true if the certificate status represents only minor errors - // (e.g. failure to verify certificate revocation). - /// - /*--cef()--*/ - virtual bool IsCertStatusMinorError() =0; - - /// - // Returns the subject of the X.509 certificate. For HTTPS server - // certificates this represents the web server. The common name of the - // subject should match the host name of the web server. - /// - /*--cef()--*/ - virtual CefRefPtr GetSubject() =0; - - /// - // Returns the issuer of the X.509 certificate. - /// - /*--cef()--*/ - virtual CefRefPtr GetIssuer() =0; - - /// - // Returns the DER encoded serial number for the X.509 certificate. The value - // possibly includes a leading 00 byte. - /// - /*--cef()--*/ - virtual CefRefPtr GetSerialNumber() =0; - - /// - // Returns the date before which the X.509 certificate is invalid. - // CefTime.GetTimeT() will return 0 if no date was specified. - /// - /*--cef()--*/ - virtual CefTime GetValidStart() =0; - - /// - // Returns the date after which the X.509 certificate is invalid. - // CefTime.GetTimeT() will return 0 if no date was specified. - /// - /*--cef()--*/ - virtual CefTime GetValidExpiry() =0; - - /// - // Returns the DER encoded data for the X.509 certificate. - /// - /*--cef()--*/ - virtual CefRefPtr GetDEREncoded() =0; - - /// - // Returns the PEM encoded data for the X.509 certificate. - /// - /*--cef()--*/ - virtual CefRefPtr GetPEMEncoded() =0; - - /// - // Returns the number of certificates in the issuer chain. - // If 0, the certificate is self-signed. - /// - /*--cef()--*/ - virtual size_t GetIssuerChainSize() =0; - - /// - // Returns the DER encoded data for the certificate issuer chain. - // If we failed to encode a certificate in the chain it is still - // present in the array but is an empty string. - /// - /*--cef(count_func=chain:GetIssuerChainSize)--*/ - virtual void GetDEREncodedIssuerChain(IssuerChainBinaryList& chain) =0; - - /// - // Returns the PEM encoded data for the certificate issuer chain. - // If we failed to encode a certificate in the chain it is still - // present in the array but is an empty string. - /// - /*--cef(count_func=chain:GetIssuerChainSize)--*/ - virtual void GetPEMEncodedIssuerChain(IssuerChainBinaryList& chain) =0; -}; - -#endif // CEF_INCLUDE_CEF_SSL_INFO_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_stream.h b/tool_kits/cef/cef_wrapper/include/cef_stream.h deleted file mode 100644 index 3d0633c2..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_stream.h +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_STREAM_H_ -#define CEF_INCLUDE_CEF_STREAM_H_ - -#include "include/cef_base.h" - -/// -// Interface the client can implement to provide a custom stream reader. The -// methods of this class may be called on any thread. -/// -/*--cef(source=client)--*/ -class CefReadHandler : public virtual CefBase { - public: - /// - // Read raw binary data. - /// - /*--cef()--*/ - virtual size_t Read(void* ptr, size_t size, size_t n) =0; - - /// - // Seek to the specified offset position. |whence| may be any one of - // SEEK_CUR, SEEK_END or SEEK_SET. Return zero on success and non-zero on - // failure. - /// - /*--cef()--*/ - virtual int Seek(int64 offset, int whence) =0; - - /// - // Return the current offset position. - /// - /*--cef()--*/ - virtual int64 Tell() =0; - - /// - // Return non-zero if at end of file. - /// - /*--cef()--*/ - virtual int Eof() =0; - - /// - // Return true if this handler performs work like accessing the file system - // which may block. Used as a hint for determining the thread to access the - // handler from. - /// - /*--cef()--*/ - virtual bool MayBlock() =0; -}; - - -/// -// Class used to read data from a stream. The methods of this class may be -// called on any thread. -/// -/*--cef(source=library)--*/ -class CefStreamReader : public virtual CefBase { - public: - /// - // Create a new CefStreamReader object from a file. - /// - /*--cef()--*/ - static CefRefPtr CreateForFile(const CefString& fileName); - /// - // Create a new CefStreamReader object from data. - /// - /*--cef()--*/ - static CefRefPtr CreateForData(void* data, size_t size); - /// - // Create a new CefStreamReader object from a custom handler. - /// - /*--cef()--*/ - static CefRefPtr CreateForHandler( - CefRefPtr handler); - - /// - // Read raw binary data. - /// - /*--cef()--*/ - virtual size_t Read(void* ptr, size_t size, size_t n) =0; - - /// - // Seek to the specified offset position. |whence| may be any one of - // SEEK_CUR, SEEK_END or SEEK_SET. Returns zero on success and non-zero on - // failure. - /// - /*--cef()--*/ - virtual int Seek(int64 offset, int whence) =0; - - /// - // Return the current offset position. - /// - /*--cef()--*/ - virtual int64 Tell() =0; - - /// - // Return non-zero if at end of file. - /// - /*--cef()--*/ - virtual int Eof() =0; - - /// - // Returns true if this reader performs work like accessing the file system - // which may block. Used as a hint for determining the thread to access the - // reader from. - /// - /*--cef()--*/ - virtual bool MayBlock() =0; -}; - - -/// -// Interface the client can implement to provide a custom stream writer. The -// methods of this class may be called on any thread. -/// -/*--cef(source=client)--*/ -class CefWriteHandler : public virtual CefBase { - public: - /// - // Write raw binary data. - /// - /*--cef()--*/ - virtual size_t Write(const void* ptr, size_t size, size_t n) =0; - - /// - // Seek to the specified offset position. |whence| may be any one of - // SEEK_CUR, SEEK_END or SEEK_SET. Return zero on success and non-zero on - // failure. - /// - /*--cef()--*/ - virtual int Seek(int64 offset, int whence) =0; - - /// - // Return the current offset position. - /// - /*--cef()--*/ - virtual int64 Tell() =0; - - /// - // Flush the stream. - /// - /*--cef()--*/ - virtual int Flush() =0; - - /// - // Return true if this handler performs work like accessing the file system - // which may block. Used as a hint for determining the thread to access the - // handler from. - /// - /*--cef()--*/ - virtual bool MayBlock() =0; -}; - - -/// -// Class used to write data to a stream. The methods of this class may be called -// on any thread. -/// -/*--cef(source=library)--*/ -class CefStreamWriter : public virtual CefBase { - public: - /// - // Create a new CefStreamWriter object for a file. - /// - /*--cef()--*/ - static CefRefPtr CreateForFile(const CefString& fileName); - /// - // Create a new CefStreamWriter object for a custom handler. - /// - /*--cef()--*/ - static CefRefPtr CreateForHandler( - CefRefPtr handler); - - /// - // Write raw binary data. - /// - /*--cef()--*/ - virtual size_t Write(const void* ptr, size_t size, size_t n) =0; - - /// - // Seek to the specified offset position. |whence| may be any one of - // SEEK_CUR, SEEK_END or SEEK_SET. Returns zero on success and non-zero on - // failure. - /// - /*--cef()--*/ - virtual int Seek(int64 offset, int whence) =0; - - /// - // Return the current offset position. - /// - /*--cef()--*/ - virtual int64 Tell() =0; - - /// - // Flush the stream. - /// - /*--cef()--*/ - virtual int Flush() =0; - - /// - // Returns true if this writer performs work like accessing the file system - // which may block. Used as a hint for determining the thread to access the - // writer from. - /// - /*--cef()--*/ - virtual bool MayBlock() =0; -}; - -#endif // CEF_INCLUDE_CEF_STREAM_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_string_visitor.h b/tool_kits/cef/cef_wrapper/include/cef_string_visitor.h deleted file mode 100644 index 54937147..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_string_visitor.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_STRING_VISITOR_H_ -#define CEF_INCLUDE_CEF_STRING_VISITOR_H_ - -#include "include/cef_base.h" - -/// -// Implement this interface to receive string values asynchronously. -/// -/*--cef(source=client)--*/ -class CefStringVisitor : public virtual CefBase { - public: - /// - // Method that will be executed. - /// - /*--cef(optional_param=string)--*/ - virtual void Visit(const CefString& string) =0; -}; - -#endif // CEF_INCLUDE_CEF_STRING_VISITOR_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_task.h b/tool_kits/cef/cef_wrapper/include/cef_task.h deleted file mode 100644 index 0ecaa752..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_task.h +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) 2013 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_TASK_H_ -#define CEF_INCLUDE_CEF_TASK_H_ - -#include "include/cef_base.h" - -typedef cef_thread_id_t CefThreadId; - -/// -// Implement this interface for asynchronous task execution. If the task is -// posted successfully and if the associated message loop is still running then -// the Execute() method will be called on the target thread. If the task fails -// to post then the task object may be destroyed on the source thread instead of -// the target thread. For this reason be cautious when performing work in the -// task object destructor. -/// -/*--cef(source=client)--*/ -class CefTask : public virtual CefBase { - public: - /// - // Method that will be executed on the target thread. - /// - /*--cef()--*/ - virtual void Execute() =0; -}; - -/// -// Class that asynchronously executes tasks on the associated thread. It is safe -// to call the methods of this class on any thread. -// -// CEF maintains multiple internal threads that are used for handling different -// types of tasks in different processes. The cef_thread_id_t definitions in -// cef_types.h list the common CEF threads. Task runners are also available for -// other CEF threads as appropriate (for example, V8 WebWorker threads). -/// -/*--cef(source=library)--*/ -class CefTaskRunner : public virtual CefBase { - public: - /// - // Returns the task runner for the current thread. Only CEF threads will have - // task runners. An empty reference will be returned if this method is called - // on an invalid thread. - /// - /*--cef()--*/ - static CefRefPtr GetForCurrentThread(); - - /// - // Returns the task runner for the specified CEF thread. - /// - /*--cef()--*/ - static CefRefPtr GetForThread(CefThreadId threadId); - - /// - // Returns true if this object is pointing to the same task runner as |that| - // object. - /// - /*--cef()--*/ - virtual bool IsSame(CefRefPtr that) =0; - - /// - // Returns true if this task runner belongs to the current thread. - /// - /*--cef()--*/ - virtual bool BelongsToCurrentThread() =0; - - /// - // Returns true if this task runner is for the specified CEF thread. - /// - /*--cef()--*/ - virtual bool BelongsToThread(CefThreadId threadId) =0; - - /// - // Post a task for execution on the thread associated with this task runner. - // Execution will occur asynchronously. - /// - /*--cef()--*/ - virtual bool PostTask(CefRefPtr task) =0; - - /// - // Post a task for delayed execution on the thread associated with this task - // runner. Execution will occur asynchronously. Delayed tasks are not - // supported on V8 WebWorker threads and will be executed without the - // specified delay. - /// - /*--cef()--*/ - virtual bool PostDelayedTask(CefRefPtr task, int64 delay_ms) =0; -}; - - -/// -// Returns true if called on the specified thread. Equivalent to using -// CefTaskRunner::GetForThread(threadId)->BelongsToCurrentThread(). -/// -/*--cef()--*/ -bool CefCurrentlyOn(CefThreadId threadId); - -/// -// Post a task for execution on the specified thread. Equivalent to -// using CefTaskRunner::GetForThread(threadId)->PostTask(task). -/// -/*--cef()--*/ -bool CefPostTask(CefThreadId threadId, CefRefPtr task); - -/// -// Post a task for delayed execution on the specified thread. Equivalent to -// using CefTaskRunner::GetForThread(threadId)->PostDelayedTask(task, delay_ms). -/// -/*--cef()--*/ -bool CefPostDelayedTask(CefThreadId threadId, CefRefPtr task, - int64 delay_ms); - - -#endif // CEF_INCLUDE_CEF_TASK_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_trace.h b/tool_kits/cef/cef_wrapper/include/cef_trace.h deleted file mode 100644 index 5b977c6e..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_trace.h +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. Portons copyright (c) 2012 -// 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 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. -// - -// See cef_trace_event.h for trace macros and additonal documentation. - -#ifndef CEF_INCLUDE_CEF_TRACE_H_ -#define CEF_INCLUDE_CEF_TRACE_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_callback.h" - -/// -// Implement this interface to receive notification when tracing has completed. -// The methods of this class will be called on the browser process UI thread. -/// -/*--cef(source=client)--*/ -class CefEndTracingCallback : public virtual CefBase { - public: - /// - // Called after all processes have sent their trace data. |tracing_file| is - // the path at which tracing data was written. The client is responsible for - // deleting |tracing_file|. - /// - /*--cef()--*/ - virtual void OnEndTracingComplete(const CefString& tracing_file) =0; -}; - - -/// -// Start tracing events on all processes. Tracing is initialized asynchronously -// and |callback| will be executed on the UI thread after initialization is -// complete. -// -// If CefBeginTracing was called previously, or if a CefEndTracingAsync call is -// pending, CefBeginTracing will fail and return false. -// -// |categories| is a comma-delimited list of category wildcards. A category can -// have an optional '-' prefix to make it an excluded category. Having both -// included and excluded categories in the same list is not supported. -// -// Example: "test_MyTest*" -// Example: "test_MyTest*,test_OtherStuff" -// Example: "-excluded_category1,-excluded_category2" -// -// This function must be called on the browser process UI thread. -/// -/*--cef(optional_param=categories,optional_param=callback)--*/ -bool CefBeginTracing(const CefString& categories, - CefRefPtr callback); - -/// -// Stop tracing events on all processes. -// -// This function will fail and return false if a previous call to -// CefEndTracingAsync is already pending or if CefBeginTracing was not called. -// -// |tracing_file| is the path at which tracing data will be written and -// |callback| is the callback that will be executed once all processes have -// sent their trace data. If |tracing_file| is empty a new temporary file path -// will be used. If |callback| is empty no trace data will be written. -// -// This function must be called on the browser process UI thread. -/// -/*--cef(optional_param=tracing_file,optional_param=callback)--*/ -bool CefEndTracing(const CefString& tracing_file, - CefRefPtr callback); - -/// -// Returns the current system trace time or, if none is defined, the current -// high-res time. Can be used by clients to synchronize with the time -// information in trace events. -/// -/*--cef()--*/ -int64 CefNowFromSystemTraceTime(); - -#endif // CEF_INCLUDE_CEF_TRACE_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_urlrequest.h b/tool_kits/cef/cef_wrapper/include/cef_urlrequest.h deleted file mode 100644 index 5b58b634..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_urlrequest.h +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_URLREQUEST_H_ -#define CEF_INCLUDE_CEF_URLREQUEST_H_ -#pragma once - -#include "include/cef_auth_callback.h" -#include "include/cef_base.h" -#include "include/cef_request.h" -#include "include/cef_request_context.h" -#include "include/cef_response.h" - -class CefURLRequestClient; - -/// -// Class used to make a URL request. URL requests are not associated with a -// browser instance so no CefClient callbacks will be executed. URL requests -// can be created on any valid CEF thread in either the browser or render -// process. Once created the methods of the URL request object must be accessed -// on the same thread that created it. -/// -/*--cef(source=library)--*/ -class CefURLRequest : public virtual CefBase { - public: - typedef cef_urlrequest_status_t Status; - typedef cef_errorcode_t ErrorCode; - - /// - // Create a new URL request. Only GET, POST, HEAD, DELETE and PUT request - // methods are supported. Multiple post data elements are not supported and - // elements of type PDE_TYPE_FILE are only supported for requests originating - // from the browser process. Requests originating from the render process will - // receive the same handling as requests originating from Web content -- if - // the response contains Content-Disposition or Mime-Type header values that - // would not normally be rendered then the response may receive special - // handling inside the browser (for example, via the file download code path - // instead of the URL request code path). The |request| object will be marked - // as read-only after calling this method. In the browser process if - // |request_context| is empty the global request context will be used. In the - // render process |request_context| must be empty and the context associated - // with the current renderer process' browser will be used. - /// - /*--cef(optional_param=request_context)--*/ - static CefRefPtr Create( - CefRefPtr request, - CefRefPtr client, - CefRefPtr request_context); - - /// - // Returns the request object used to create this URL request. The returned - // object is read-only and should not be modified. - /// - /*--cef()--*/ - virtual CefRefPtr GetRequest() =0; - - /// - // Returns the client. - /// - /*--cef()--*/ - virtual CefRefPtr GetClient() =0; - - /// - // Returns the request status. - /// - /*--cef(default_retval=UR_UNKNOWN)--*/ - virtual Status GetRequestStatus() =0; - - /// - // Returns the request error if status is UR_CANCELED or UR_FAILED, or 0 - // otherwise. - /// - /*--cef(default_retval=ERR_NONE)--*/ - virtual ErrorCode GetRequestError() =0; - - /// - // Returns the response, or NULL if no response information is available. - // Response information will only be available after the upload has completed. - // The returned object is read-only and should not be modified. - /// - /*--cef()--*/ - virtual CefRefPtr GetResponse() =0; - - /// - // Cancel the request. - /// - /*--cef()--*/ - virtual void Cancel() =0; -}; - -/// -// Interface that should be implemented by the CefURLRequest client. The -// methods of this class will be called on the same thread that created the -// request unless otherwise documented. -/// -/*--cef(source=client)--*/ -class CefURLRequestClient : public virtual CefBase { - public: - /// - // Notifies the client that the request has completed. Use the - // CefURLRequest::GetRequestStatus method to determine if the request was - // successful or not. - /// - /*--cef()--*/ - virtual void OnRequestComplete(CefRefPtr request) =0; - - /// - // Notifies the client of upload progress. |current| denotes the number of - // bytes sent so far and |total| is the total size of uploading data (or -1 if - // chunked upload is enabled). This method will only be called if the - // UR_FLAG_REPORT_UPLOAD_PROGRESS flag is set on the request. - /// - /*--cef()--*/ - virtual void OnUploadProgress(CefRefPtr request, - int64 current, - int64 total) =0; - - /// - // Notifies the client of download progress. |current| denotes the number of - // bytes received up to the call and |total| is the expected total size of the - // response (or -1 if not determined). - /// - /*--cef()--*/ - virtual void OnDownloadProgress(CefRefPtr request, - int64 current, - int64 total) =0; - - /// - // Called when some part of the response is read. |data| contains the current - // bytes received since the last call. This method will not be called if the - // UR_FLAG_NO_DOWNLOAD_DATA flag is set on the request. - /// - /*--cef()--*/ - virtual void OnDownloadData(CefRefPtr request, - const void* data, - size_t data_length) =0; - - /// - // Called on the IO thread when the browser needs credentials from the user. - // |isProxy| indicates whether the host is a proxy server. |host| contains the - // hostname and |port| contains the port number. Return true to continue the - // request and call CefAuthCallback::Continue() when the authentication - // information is available. Return false to cancel the request. This method - // will only be called for requests initiated from the browser process. - /// - /*--cef(optional_param=realm)--*/ - virtual bool GetAuthCredentials(bool isProxy, - const CefString& host, - int port, - const CefString& realm, - const CefString& scheme, - CefRefPtr callback) =0; -}; - -#endif // CEF_INCLUDE_CEF_URLREQUEST_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_v8.h b/tool_kits/cef/cef_wrapper/include/cef_v8.h deleted file mode 100644 index 070d4391..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_v8.h +++ /dev/null @@ -1,879 +0,0 @@ -// Copyright (c) 2013 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_V8_H_ -#define CEF_INCLUDE_CEF_V8_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_browser.h" -#include "include/cef_frame.h" -#include "include/cef_task.h" -#include - -class CefV8Exception; -class CefV8Handler; -class CefV8StackFrame; -class CefV8Value; - - -/// -// Register a new V8 extension with the specified JavaScript extension code and -// handler. Functions implemented by the handler are prototyped using the -// keyword 'native'. The calling of a native function is restricted to the scope -// in which the prototype of the native function is defined. This function may -// only be called on the render process main thread. -// -// Example JavaScript extension code: -//
-//   // create the 'example' global object if it doesn't already exist.
-//   if (!example)
-//     example = {};
-//   // create the 'example.test' global object if it doesn't already exist.
-//   if (!example.test)
-//     example.test = {};
-//   (function() {
-//     // Define the function 'example.test.myfunction'.
-//     example.test.myfunction = function() {
-//       // Call CefV8Handler::Execute() with the function name 'MyFunction'
-//       // and no arguments.
-//       native function MyFunction();
-//       return MyFunction();
-//     };
-//     // Define the getter function for parameter 'example.test.myparam'.
-//     example.test.__defineGetter__('myparam', function() {
-//       // Call CefV8Handler::Execute() with the function name 'GetMyParam'
-//       // and no arguments.
-//       native function GetMyParam();
-//       return GetMyParam();
-//     });
-//     // Define the setter function for parameter 'example.test.myparam'.
-//     example.test.__defineSetter__('myparam', function(b) {
-//       // Call CefV8Handler::Execute() with the function name 'SetMyParam'
-//       // and a single argument.
-//       native function SetMyParam();
-//       if(b) SetMyParam(b);
-//     });
-//
-//     // Extension definitions can also contain normal JavaScript variables
-//     // and functions.
-//     var myint = 0;
-//     example.test.increment = function() {
-//       myint += 1;
-//       return myint;
-//     };
-//   })();
-// 
-// Example usage in the page: -//
-//   // Call the function.
-//   example.test.myfunction();
-//   // Set the parameter.
-//   example.test.myparam = value;
-//   // Get the parameter.
-//   value = example.test.myparam;
-//   // Call another function.
-//   example.test.increment();
-// 
-/// -/*--cef(optional_param=handler)--*/ -bool CefRegisterExtension(const CefString& extension_name, - const CefString& javascript_code, - CefRefPtr handler); - - -/// -// Class representing a V8 context handle. V8 handles can only be accessed from -// the thread on which they are created. Valid threads for creating a V8 handle -// include the render process main thread (TID_RENDERER) and WebWorker threads. -// A task runner for posting tasks on the associated thread can be retrieved via -// the CefV8Context::GetTaskRunner() method. -/// -/*--cef(source=library)--*/ -class CefV8Context : public virtual CefBase { - public: - /// - // Returns the current (top) context object in the V8 context stack. - /// - /*--cef()--*/ - static CefRefPtr GetCurrentContext(); - - /// - // Returns the entered (bottom) context object in the V8 context stack. - /// - /*--cef()--*/ - static CefRefPtr GetEnteredContext(); - - /// - // Returns true if V8 is currently inside a context. - /// - /*--cef()--*/ - static bool InContext(); - - /// - // Returns the task runner associated with this context. V8 handles can only - // be accessed from the thread on which they are created. This method can be - // called on any render process thread. - /// - /*--cef()--*/ - virtual CefRefPtr GetTaskRunner() =0; - - /// - // Returns true if the underlying handle is valid and it can be accessed on - // the current thread. Do not call any other methods if this method returns - // false. - /// - /*--cef()--*/ - virtual bool IsValid() =0; - - /// - // Returns the browser for this context. This method will return an empty - // reference for WebWorker contexts. - /// - /*--cef()--*/ - virtual CefRefPtr GetBrowser() =0; - - /// - // Returns the frame for this context. This method will return an empty - // reference for WebWorker contexts. - /// - /*--cef()--*/ - virtual CefRefPtr GetFrame() =0; - - /// - // Returns the global object for this context. The context must be entered - // before calling this method. - /// - /*--cef()--*/ - virtual CefRefPtr GetGlobal() =0; - - /// - // Enter this context. A context must be explicitly entered before creating a - // V8 Object, Array, Function or Date asynchronously. Exit() must be called - // the same number of times as Enter() before releasing this context. V8 - // objects belong to the context in which they are created. Returns true if - // the scope was entered successfully. - /// - /*--cef()--*/ - virtual bool Enter() =0; - - /// - // Exit this context. Call this method only after calling Enter(). Returns - // true if the scope was exited successfully. - /// - /*--cef()--*/ - virtual bool Exit() =0; - - /// - // Returns true if this object is pointing to the same handle as |that| - // object. - /// - /*--cef()--*/ - virtual bool IsSame(CefRefPtr that) =0; - - /// - // Evaluates the specified JavaScript code using this context's global object. - // On success |retval| will be set to the return value, if any, and the - // function will return true. On failure |exception| will be set to the - // exception, if any, and the function will return false. - /// - /*--cef()--*/ - virtual bool Eval(const CefString& code, - CefRefPtr& retval, - CefRefPtr& exception) =0; -}; - - -typedef std::vector > CefV8ValueList; - -/// -// Interface that should be implemented to handle V8 function calls. The methods -// of this class will be called on the thread associated with the V8 function. -/// -/*--cef(source=client)--*/ -class CefV8Handler : public virtual CefBase { - public: - /// - // Handle execution of the function identified by |name|. |object| is the - // receiver ('this' object) of the function. |arguments| is the list of - // arguments passed to the function. If execution succeeds set |retval| to the - // function return value. If execution fails set |exception| to the exception - // that will be thrown. Return true if execution was handled. - /// - /*--cef()--*/ - virtual bool Execute(const CefString& name, - CefRefPtr object, - const CefV8ValueList& arguments, - CefRefPtr& retval, - CefString& exception) =0; -}; - -/// -// Interface that should be implemented to handle V8 accessor calls. Accessor -// identifiers are registered by calling CefV8Value::SetValue(). The methods -// of this class will be called on the thread associated with the V8 accessor. -/// -/*--cef(source=client)--*/ -class CefV8Accessor : public virtual CefBase { - public: - /// - // Handle retrieval the accessor value identified by |name|. |object| is the - // receiver ('this' object) of the accessor. If retrieval succeeds set - // |retval| to the return value. If retrieval fails set |exception| to the - // exception that will be thrown. Return true if accessor retrieval was - // handled. - /// - /*--cef()--*/ - virtual bool Get(const CefString& name, - const CefRefPtr object, - CefRefPtr& retval, - CefString& exception) =0; - - /// - // Handle assignment of the accessor value identified by |name|. |object| is - // the receiver ('this' object) of the accessor. |value| is the new value - // being assigned to the accessor. If assignment fails set |exception| to the - // exception that will be thrown. Return true if accessor assignment was - // handled. - /// - /*--cef()--*/ - virtual bool Set(const CefString& name, - const CefRefPtr object, - const CefRefPtr value, - CefString& exception) =0; -}; - -/// -// Class representing a V8 exception. The methods of this class may be called on -// any render process thread. -/// -/*--cef(source=library)--*/ -class CefV8Exception : public virtual CefBase { - public: - /// - // Returns the exception message. - /// - /*--cef()--*/ - virtual CefString GetMessage() =0; - - /// - // Returns the line of source code that the exception occurred within. - /// - /*--cef()--*/ - virtual CefString GetSourceLine() =0; - - /// - // Returns the resource name for the script from where the function causing - // the error originates. - /// - /*--cef()--*/ - virtual CefString GetScriptResourceName() =0; - - /// - // Returns the 1-based number of the line where the error occurred or 0 if the - // line number is unknown. - /// - /*--cef()--*/ - virtual int GetLineNumber() =0; - - /// - // Returns the index within the script of the first character where the error - // occurred. - /// - /*--cef()--*/ - virtual int GetStartPosition() =0; - - /// - // Returns the index within the script of the last character where the error - // occurred. - /// - /*--cef()--*/ - virtual int GetEndPosition() =0; - - /// - // Returns the index within the line of the first character where the error - // occurred. - /// - /*--cef()--*/ - virtual int GetStartColumn() =0; - - /// - // Returns the index within the line of the last character where the error - // occurred. - /// - /*--cef()--*/ - virtual int GetEndColumn() =0; -}; - -/// -// Class representing a V8 value handle. V8 handles can only be accessed from -// the thread on which they are created. Valid threads for creating a V8 handle -// include the render process main thread (TID_RENDERER) and WebWorker threads. -// A task runner for posting tasks on the associated thread can be retrieved via -// the CefV8Context::GetTaskRunner() method. -/// -/*--cef(source=library)--*/ -class CefV8Value : public virtual CefBase { - public: - typedef cef_v8_accesscontrol_t AccessControl; - typedef cef_v8_propertyattribute_t PropertyAttribute; - - /// - // Create a new CefV8Value object of type undefined. - /// - /*--cef()--*/ - static CefRefPtr CreateUndefined(); - - /// - // Create a new CefV8Value object of type null. - /// - /*--cef()--*/ - static CefRefPtr CreateNull(); - - /// - // Create a new CefV8Value object of type bool. - /// - /*--cef()--*/ - static CefRefPtr CreateBool(bool value); - - /// - // Create a new CefV8Value object of type int. - /// - /*--cef()--*/ - static CefRefPtr CreateInt(int32 value); - - /// - // Create a new CefV8Value object of type unsigned int. - /// - /*--cef()--*/ - static CefRefPtr CreateUInt(uint32 value); - - /// - // Create a new CefV8Value object of type double. - /// - /*--cef()--*/ - static CefRefPtr CreateDouble(double value); - - /// - // Create a new CefV8Value object of type Date. This method should only be - // called from within the scope of a CefRenderProcessHandler, CefV8Handler or - // CefV8Accessor callback, or in combination with calling Enter() and Exit() - // on a stored CefV8Context reference. - /// - /*--cef()--*/ - static CefRefPtr CreateDate(const CefTime& date); - - /// - // Create a new CefV8Value object of type string. - /// - /*--cef(optional_param=value)--*/ - static CefRefPtr CreateString(const CefString& value); - - /// - // Create a new CefV8Value object of type object with optional accessor. This - // method should only be called from within the scope of a - // CefRenderProcessHandler, CefV8Handler or CefV8Accessor callback, or in - // combination with calling Enter() and Exit() on a stored CefV8Context - // reference. - /// - /*--cef(optional_param=accessor)--*/ - static CefRefPtr CreateObject(CefRefPtr accessor); - - /// - // Create a new CefV8Value object of type array with the specified |length|. - // If |length| is negative the returned array will have length 0. This method - // should only be called from within the scope of a CefRenderProcessHandler, - // CefV8Handler or CefV8Accessor callback, or in combination with calling - // Enter() and Exit() on a stored CefV8Context reference. - /// - /*--cef()--*/ - static CefRefPtr CreateArray(int length); - - /// - // Create a new CefV8Value object of type function. This method should only be - // called from within the scope of a CefRenderProcessHandler, CefV8Handler or - // CefV8Accessor callback, or in combination with calling Enter() and Exit() - // on a stored CefV8Context reference. - /// - /*--cef()--*/ - static CefRefPtr CreateFunction(const CefString& name, - CefRefPtr handler); - - /// - // Returns true if the underlying handle is valid and it can be accessed on - // the current thread. Do not call any other methods if this method returns - // false. - /// - /*--cef()--*/ - virtual bool IsValid() =0; - - /// - // True if the value type is undefined. - /// - /*--cef()--*/ - virtual bool IsUndefined() =0; - - /// - // True if the value type is null. - /// - /*--cef()--*/ - virtual bool IsNull() =0; - - /// - // True if the value type is bool. - /// - /*--cef()--*/ - virtual bool IsBool() =0; - - /// - // True if the value type is int. - /// - /*--cef()--*/ - virtual bool IsInt() =0; - - /// - // True if the value type is unsigned int. - /// - /*--cef()--*/ - virtual bool IsUInt() =0; - - /// - // True if the value type is double. - /// - /*--cef()--*/ - virtual bool IsDouble() =0; - - /// - // True if the value type is Date. - /// - /*--cef()--*/ - virtual bool IsDate() =0; - - /// - // True if the value type is string. - /// - /*--cef()--*/ - virtual bool IsString() =0; - - /// - // True if the value type is object. - /// - /*--cef()--*/ - virtual bool IsObject() =0; - - /// - // True if the value type is array. - /// - /*--cef()--*/ - virtual bool IsArray() =0; - - /// - // True if the value type is function. - /// - /*--cef()--*/ - virtual bool IsFunction() =0; - - /// - // Returns true if this object is pointing to the same handle as |that| - // object. - /// - /*--cef()--*/ - virtual bool IsSame(CefRefPtr that) =0; - - /// - // Return a bool value. The underlying data will be converted to if - // necessary. - /// - /*--cef()--*/ - virtual bool GetBoolValue() =0; - - /// - // Return an int value. The underlying data will be converted to if - // necessary. - /// - /*--cef()--*/ - virtual int32 GetIntValue() =0; - - /// - // Return an unisgned int value. The underlying data will be converted to if - // necessary. - /// - /*--cef()--*/ - virtual uint32 GetUIntValue() =0; - - /// - // Return a double value. The underlying data will be converted to if - // necessary. - /// - /*--cef()--*/ - virtual double GetDoubleValue() =0; - - /// - // Return a Date value. The underlying data will be converted to if - // necessary. - /// - /*--cef()--*/ - virtual CefTime GetDateValue() =0; - - /// - // Return a string value. The underlying data will be converted to if - // necessary. - /// - /*--cef()--*/ - virtual CefString GetStringValue() =0; - - - // OBJECT METHODS - These methods are only available on objects. Arrays and - // functions are also objects. String- and integer-based keys can be used - // interchangably with the framework converting between them as necessary. - - /// - // Returns true if this is a user created object. - /// - /*--cef()--*/ - virtual bool IsUserCreated() =0; - - /// - // Returns true if the last method call resulted in an exception. This - // attribute exists only in the scope of the current CEF value object. - /// - /*--cef()--*/ - virtual bool HasException() =0; - - /// - // Returns the exception resulting from the last method call. This attribute - // exists only in the scope of the current CEF value object. - /// - /*--cef()--*/ - virtual CefRefPtr GetException() =0; - - /// - // Clears the last exception and returns true on success. - /// - /*--cef()--*/ - virtual bool ClearException() =0; - - /// - // Returns true if this object will re-throw future exceptions. This attribute - // exists only in the scope of the current CEF value object. - /// - /*--cef()--*/ - virtual bool WillRethrowExceptions() =0; - - /// - // Set whether this object will re-throw future exceptions. By default - // exceptions are not re-thrown. If a exception is re-thrown the current - // context should not be accessed again until after the exception has been - // caught and not re-thrown. Returns true on success. This attribute exists - // only in the scope of the current CEF value object. - /// - /*--cef()--*/ - virtual bool SetRethrowExceptions(bool rethrow) =0; - - /// - // Returns true if the object has a value with the specified identifier. - /// - /*--cef(capi_name=has_value_bykey,optional_param=key)--*/ - virtual bool HasValue(const CefString& key) =0; - - /// - // Returns true if the object has a value with the specified identifier. - /// - /*--cef(capi_name=has_value_byindex,index_param=index)--*/ - virtual bool HasValue(int index) =0; - - /// - // Deletes the value with the specified identifier and returns true on - // success. Returns false if this method is called incorrectly or an exception - // is thrown. For read-only and don't-delete values this method will return - // true even though deletion failed. - /// - /*--cef(capi_name=delete_value_bykey,optional_param=key)--*/ - virtual bool DeleteValue(const CefString& key) =0; - - /// - // Deletes the value with the specified identifier and returns true on - // success. Returns false if this method is called incorrectly, deletion fails - // or an exception is thrown. For read-only and don't-delete values this - // method will return true even though deletion failed. - /// - /*--cef(capi_name=delete_value_byindex,index_param=index)--*/ - virtual bool DeleteValue(int index) =0; - - /// - // Returns the value with the specified identifier on success. Returns NULL - // if this method is called incorrectly or an exception is thrown. - /// - /*--cef(capi_name=get_value_bykey,optional_param=key)--*/ - virtual CefRefPtr GetValue(const CefString& key) =0; - - /// - // Returns the value with the specified identifier on success. Returns NULL - // if this method is called incorrectly or an exception is thrown. - /// - /*--cef(capi_name=get_value_byindex,index_param=index)--*/ - virtual CefRefPtr GetValue(int index) =0; - - /// - // Associates a value with the specified identifier and returns true on - // success. Returns false if this method is called incorrectly or an exception - // is thrown. For read-only values this method will return true even though - // assignment failed. - /// - /*--cef(capi_name=set_value_bykey,optional_param=key)--*/ - virtual bool SetValue(const CefString& key, CefRefPtr value, - PropertyAttribute attribute) =0; - - /// - // Associates a value with the specified identifier and returns true on - // success. Returns false if this method is called incorrectly or an exception - // is thrown. For read-only values this method will return true even though - // assignment failed. - /// - /*--cef(capi_name=set_value_byindex,index_param=index)--*/ - virtual bool SetValue(int index, CefRefPtr value) =0; - - /// - // Registers an identifier and returns true on success. Access to the - // identifier will be forwarded to the CefV8Accessor instance passed to - // CefV8Value::CreateObject(). Returns false if this method is called - // incorrectly or an exception is thrown. For read-only values this method - // will return true even though assignment failed. - /// - /*--cef(capi_name=set_value_byaccessor,optional_param=key)--*/ - virtual bool SetValue(const CefString& key, AccessControl settings, - PropertyAttribute attribute) =0; - - /// - // Read the keys for the object's values into the specified vector. Integer- - // based keys will also be returned as strings. - /// - /*--cef()--*/ - virtual bool GetKeys(std::vector& keys) =0; - - /// - // Sets the user data for this object and returns true on success. Returns - // false if this method is called incorrectly. This method can only be called - // on user created objects. - /// - /*--cef(optional_param=user_data)--*/ - virtual bool SetUserData(CefRefPtr user_data) =0; - - /// - // Returns the user data, if any, assigned to this object. - /// - /*--cef()--*/ - virtual CefRefPtr GetUserData() =0; - - /// - // Returns the amount of externally allocated memory registered for the - // object. - /// - /*--cef()--*/ - virtual int GetExternallyAllocatedMemory() =0; - - /// - // Adjusts the amount of registered external memory for the object. Used to - // give V8 an indication of the amount of externally allocated memory that is - // kept alive by JavaScript objects. V8 uses this information to decide when - // to perform global garbage collection. Each CefV8Value tracks the amount of - // external memory associated with it and automatically decreases the global - // total by the appropriate amount on its destruction. |change_in_bytes| - // specifies the number of bytes to adjust by. This method returns the number - // of bytes associated with the object after the adjustment. This method can - // only be called on user created objects. - /// - /*--cef()--*/ - virtual int AdjustExternallyAllocatedMemory(int change_in_bytes) =0; - - - // ARRAY METHODS - These methods are only available on arrays. - - /// - // Returns the number of elements in the array. - /// - /*--cef()--*/ - virtual int GetArrayLength() =0; - - - // FUNCTION METHODS - These methods are only available on functions. - - /// - // Returns the function name. - /// - /*--cef()--*/ - virtual CefString GetFunctionName() =0; - - /// - // Returns the function handler or NULL if not a CEF-created function. - /// - /*--cef()--*/ - virtual CefRefPtr GetFunctionHandler() =0; - - /// - // Execute the function using the current V8 context. This method should only - // be called from within the scope of a CefV8Handler or CefV8Accessor - // callback, or in combination with calling Enter() and Exit() on a stored - // CefV8Context reference. |object| is the receiver ('this' object) of the - // function. If |object| is empty the current context's global object will be - // used. |arguments| is the list of arguments that will be passed to the - // function. Returns the function return value on success. Returns NULL if - // this method is called incorrectly or an exception is thrown. - /// - /*--cef(optional_param=object)--*/ - virtual CefRefPtr ExecuteFunction( - CefRefPtr object, - const CefV8ValueList& arguments) =0; - - /// - // Execute the function using the specified V8 context. |object| is the - // receiver ('this' object) of the function. If |object| is empty the - // specified context's global object will be used. |arguments| is the list of - // arguments that will be passed to the function. Returns the function return - // value on success. Returns NULL if this method is called incorrectly or an - // exception is thrown. - /// - /*--cef(optional_param=object)--*/ - virtual CefRefPtr ExecuteFunctionWithContext( - CefRefPtr context, - CefRefPtr object, - const CefV8ValueList& arguments) =0; -}; - -/// -// Class representing a V8 stack trace handle. V8 handles can only be accessed -// from the thread on which they are created. Valid threads for creating a V8 -// handle include the render process main thread (TID_RENDERER) and WebWorker -// threads. A task runner for posting tasks on the associated thread can be -// retrieved via the CefV8Context::GetTaskRunner() method. -/// -/*--cef(source=library)--*/ -class CefV8StackTrace : public virtual CefBase { - public: - /// - // Returns the stack trace for the currently active context. |frame_limit| is - // the maximum number of frames that will be captured. - /// - /*--cef()--*/ - static CefRefPtr GetCurrent(int frame_limit); - - /// - // Returns true if the underlying handle is valid and it can be accessed on - // the current thread. Do not call any other methods if this method returns - // false. - /// - /*--cef()--*/ - virtual bool IsValid() =0; - - /// - // Returns the number of stack frames. - /// - /*--cef()--*/ - virtual int GetFrameCount() =0; - - /// - // Returns the stack frame at the specified 0-based index. - /// - /*--cef()--*/ - virtual CefRefPtr GetFrame(int index) =0; -}; - -/// -// Class representing a V8 stack frame handle. V8 handles can only be accessed -// from the thread on which they are created. Valid threads for creating a V8 -// handle include the render process main thread (TID_RENDERER) and WebWorker -// threads. A task runner for posting tasks on the associated thread can be -// retrieved via the CefV8Context::GetTaskRunner() method. -/// -/*--cef(source=library)--*/ -class CefV8StackFrame : public virtual CefBase { - public: - /// - // Returns true if the underlying handle is valid and it can be accessed on - // the current thread. Do not call any other methods if this method returns - // false. - /// - /*--cef()--*/ - virtual bool IsValid() =0; - - /// - // Returns the name of the resource script that contains the function. - /// - /*--cef()--*/ - virtual CefString GetScriptName() =0; - - /// - // Returns the name of the resource script that contains the function or the - // sourceURL value if the script name is undefined and its source ends with - // a "//@ sourceURL=..." string. - /// - /*--cef()--*/ - virtual CefString GetScriptNameOrSourceURL() =0; - - /// - // Returns the name of the function. - /// - /*--cef()--*/ - virtual CefString GetFunctionName() =0; - - /// - // Returns the 1-based line number for the function call or 0 if unknown. - /// - /*--cef()--*/ - virtual int GetLineNumber() =0; - - /// - // Returns the 1-based column offset on the line for the function call or 0 if - // unknown. - /// - /*--cef()--*/ - virtual int GetColumn() =0; - - /// - // Returns true if the function was compiled using eval(). - /// - /*--cef()--*/ - virtual bool IsEval() =0; - - /// - // Returns true if the function was called as a constructor via "new". - /// - /*--cef()--*/ - virtual bool IsConstructor() =0; -}; - -#endif // CEF_INCLUDE_CEF_V8_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_values.h b/tool_kits/cef/cef_wrapper/include/cef_values.h deleted file mode 100644 index 6ab6adff..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_values.h +++ /dev/null @@ -1,752 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_VALUES_H_ -#define CEF_INCLUDE_CEF_VALUES_H_ -#pragma once - -#include -#include "include/cef_base.h" - -class CefBinaryValue; -class CefDictionaryValue; -class CefListValue; - -typedef cef_value_type_t CefValueType; - -/// -// Class that wraps other data value types. Complex types (binary, dictionary -// and list) will be referenced but not owned by this object. Can be used on any -// process and thread. -/// -/*--cef(source=library)--*/ -class CefValue : public virtual CefBase { - public: - /// - // Creates a new object. - /// - /*--cef()--*/ - static CefRefPtr Create(); - - /// - // Returns true if the underlying data is valid. This will always be true for - // simple types. For complex types (binary, dictionary and list) the - // underlying data may become invalid if owned by another object (e.g. list or - // dictionary) and that other object is then modified or destroyed. This value - // object can be re-used by calling Set*() even if the underlying data is - // invalid. - /// - /*--cef()--*/ - virtual bool IsValid() =0; - - /// - // Returns true if the underlying data is owned by another object. - /// - /*--cef()--*/ - virtual bool IsOwned() =0; - - /// - // Returns true if the underlying data is read-only. Some APIs may expose - // read-only objects. - /// - /*--cef()--*/ - virtual bool IsReadOnly() =0; - - /// - // Returns true if this object and |that| object have the same underlying - // data. If true modifications to this object will also affect |that| object - // and vice-versa. - /// - /*--cef()--*/ - virtual bool IsSame(CefRefPtr that) =0; - - /// - // Returns true if this object and |that| object have an equivalent underlying - // value but are not necessarily the same object. - /// - /*--cef()--*/ - virtual bool IsEqual(CefRefPtr that) =0; - - /// - // Returns a copy of this object. The underlying data will also be copied. - /// - /*--cef()--*/ - virtual CefRefPtr Copy() =0; - - /// - // Returns the underlying value type. - /// - /*--cef(default_retval=VTYPE_INVALID)--*/ - virtual CefValueType GetType() =0; - - /// - // Returns the underlying value as type bool. - /// - /*--cef()--*/ - virtual bool GetBool() =0; - - /// - // Returns the underlying value as type int. - /// - /*--cef()--*/ - virtual int GetInt() =0; - - /// - // Returns the underlying value as type double. - /// - /*--cef()--*/ - virtual double GetDouble() =0; - - /// - // Returns the underlying value as type string. - /// - /*--cef()--*/ - virtual CefString GetString() =0; - - /// - // Returns the underlying value as type binary. The returned reference may - // become invalid if the value is owned by another object or if ownership is - // transferred to another object in the future. To maintain a reference to - // the value after assigning ownership to a dictionary or list pass this - // object to the SetValue() method instead of passing the returned reference - // to SetBinary(). - /// - /*--cef()--*/ - virtual CefRefPtr GetBinary() =0; - - /// - // Returns the underlying value as type dictionary. The returned reference may - // become invalid if the value is owned by another object or if ownership is - // transferred to another object in the future. To maintain a reference to - // the value after assigning ownership to a dictionary or list pass this - // object to the SetValue() method instead of passing the returned reference - // to SetDictionary(). - /// - /*--cef()--*/ - virtual CefRefPtr GetDictionary() =0; - - /// - // Returns the underlying value as type list. The returned reference may - // become invalid if the value is owned by another object or if ownership is - // transferred to another object in the future. To maintain a reference to - // the value after assigning ownership to a dictionary or list pass this - // object to the SetValue() method instead of passing the returned reference - // to SetList(). - /// - /*--cef()--*/ - virtual CefRefPtr GetList() =0; - - /// - // Sets the underlying value as type null. Returns true if the value was set - // successfully. - /// - /*--cef()--*/ - virtual bool SetNull() =0; - - /// - // Sets the underlying value as type bool. Returns true if the value was set - // successfully. - /// - /*--cef()--*/ - virtual bool SetBool(bool value) =0; - - /// - // Sets the underlying value as type int. Returns true if the value was set - // successfully. - /// - /*--cef()--*/ - virtual bool SetInt(int value) =0; - - /// - // Sets the underlying value as type double. Returns true if the value was set - // successfully. - /// - /*--cef()--*/ - virtual bool SetDouble(double value) =0; - - /// - // Sets the underlying value as type string. Returns true if the value was set - // successfully. - /// - /*--cef(optional_param=value)--*/ - virtual bool SetString(const CefString& value) =0; - - /// - // Sets the underlying value as type binary. Returns true if the value was set - // successfully. This object keeps a reference to |value| and ownership of the - // underlying data remains unchanged. - /// - /*--cef()--*/ - virtual bool SetBinary(CefRefPtr value) =0; - - /// - // Sets the underlying value as type dict. Returns true if the value was set - // successfully. This object keeps a reference to |value| and ownership of the - // underlying data remains unchanged. - /// - /*--cef()--*/ - virtual bool SetDictionary(CefRefPtr value) =0; - - /// - // Sets the underlying value as type list. Returns true if the value was set - // successfully. This object keeps a reference to |value| and ownership of the - // underlying data remains unchanged. - /// - /*--cef()--*/ - virtual bool SetList(CefRefPtr value) =0; -}; - - -/// -// Class representing a binary value. Can be used on any process and thread. -/// -/*--cef(source=library)--*/ -class CefBinaryValue : public virtual CefBase { - public: - /// - // Creates a new object that is not owned by any other object. The specified - // |data| will be copied. - /// - /*--cef()--*/ - static CefRefPtr Create(const void* data, - size_t data_size); - - /// - // Returns true if this object is valid. This object may become invalid if - // the underlying data is owned by another object (e.g. list or dictionary) - // and that other object is then modified or destroyed. Do not call any other - // methods if this method returns false. - /// - /*--cef()--*/ - virtual bool IsValid() =0; - - /// - // Returns true if this object is currently owned by another object. - /// - /*--cef()--*/ - virtual bool IsOwned() =0; - - /// - // Returns true if this object and |that| object have the same underlying - // data. - /// - /*--cef()--*/ - virtual bool IsSame(CefRefPtr that) =0; - - /// - // Returns true if this object and |that| object have an equivalent underlying - // value but are not necessarily the same object. - /// - /*--cef()--*/ - virtual bool IsEqual(CefRefPtr that) =0; - - /// - // Returns a copy of this object. The data in this object will also be copied. - /// - /*--cef()--*/ - virtual CefRefPtr Copy() =0; - - /// - // Returns the data size. - /// - /*--cef()--*/ - virtual size_t GetSize() =0; - - /// - // Read up to |buffer_size| number of bytes into |buffer|. Reading begins at - // the specified byte |data_offset|. Returns the number of bytes read. - /// - /*--cef()--*/ - virtual size_t GetData(void* buffer, - size_t buffer_size, - size_t data_offset) =0; -}; - - -/// -// Class representing a dictionary value. Can be used on any process and thread. -/// -/*--cef(source=library)--*/ -class CefDictionaryValue : public virtual CefBase { - public: - typedef std::vector KeyList; - - /// - // Creates a new object that is not owned by any other object. - /// - /*--cef()--*/ - static CefRefPtr Create(); - - /// - // Returns true if this object is valid. This object may become invalid if - // the underlying data is owned by another object (e.g. list or dictionary) - // and that other object is then modified or destroyed. Do not call any other - // methods if this method returns false. - /// - /*--cef()--*/ - virtual bool IsValid() =0; - - /// - // Returns true if this object is currently owned by another object. - /// - /*--cef()--*/ - virtual bool IsOwned() =0; - - /// - // Returns true if the values of this object are read-only. Some APIs may - // expose read-only objects. - /// - /*--cef()--*/ - virtual bool IsReadOnly() =0; - - /// - // Returns true if this object and |that| object have the same underlying - // data. If true modifications to this object will also affect |that| object - // and vice-versa. - /// - /*--cef()--*/ - virtual bool IsSame(CefRefPtr that) =0; - - /// - // Returns true if this object and |that| object have an equivalent underlying - // value but are not necessarily the same object. - /// - /*--cef()--*/ - virtual bool IsEqual(CefRefPtr that) =0; - - /// - // Returns a writable copy of this object. If |exclude_empty_children| is true - // any empty dictionaries or lists will be excluded from the copy. - /// - /*--cef()--*/ - virtual CefRefPtr Copy(bool exclude_empty_children) =0; - - /// - // Returns the number of values. - /// - /*--cef()--*/ - virtual size_t GetSize() =0; - - /// - // Removes all values. Returns true on success. - /// - /*--cef()--*/ - virtual bool Clear() =0; - - /// - // Returns true if the current dictionary has a value for the given key. - /// - /*--cef()--*/ - virtual bool HasKey(const CefString& key) =0; - - /// - // Reads all keys for this dictionary into the specified vector. - /// - /*--cef()--*/ - virtual bool GetKeys(KeyList& keys) =0; - - /// - // Removes the value at the specified key. Returns true is the value was - // removed successfully. - /// - /*--cef()--*/ - virtual bool Remove(const CefString& key) =0; - - /// - // Returns the value type for the specified key. - /// - /*--cef(default_retval=VTYPE_INVALID)--*/ - virtual CefValueType GetType(const CefString& key) =0; - - /// - // Returns the value at the specified key. For simple types the returned - // value will copy existing data and modifications to the value will not - // modify this object. For complex types (binary, dictionary and list) the - // returned value will reference existing data and modifications to the value - // will modify this object. - /// - /*--cef()--*/ - virtual CefRefPtr GetValue(const CefString& key) =0; - - /// - // Returns the value at the specified key as type bool. - /// - /*--cef()--*/ - virtual bool GetBool(const CefString& key) =0; - - /// - // Returns the value at the specified key as type int. - /// - /*--cef()--*/ - virtual int GetInt(const CefString& key) =0; - - /// - // Returns the value at the specified key as type double. - /// - /*--cef()--*/ - virtual double GetDouble(const CefString& key) =0; - - /// - // Returns the value at the specified key as type string. - /// - /*--cef()--*/ - virtual CefString GetString(const CefString& key) =0; - - /// - // Returns the value at the specified key as type binary. The returned - // value will reference existing data. - /// - /*--cef()--*/ - virtual CefRefPtr GetBinary(const CefString& key) =0; - - /// - // Returns the value at the specified key as type dictionary. The returned - // value will reference existing data and modifications to the value will - // modify this object. - /// - /*--cef()--*/ - virtual CefRefPtr GetDictionary(const CefString& key) =0; - - /// - // Returns the value at the specified key as type list. The returned value - // will reference existing data and modifications to the value will modify - // this object. - /// - /*--cef()--*/ - virtual CefRefPtr GetList(const CefString& key) =0; - - /// - // Sets the value at the specified key. Returns true if the value was set - // successfully. If |value| represents simple data then the underlying data - // will be copied and modifications to |value| will not modify this object. If - // |value| represents complex data (binary, dictionary or list) then the - // underlying data will be referenced and modifications to |value| will modify - // this object. - /// - /*--cef()--*/ - virtual bool SetValue(const CefString& key, CefRefPtr value) =0; - - /// - // Sets the value at the specified key as type null. Returns true if the - // value was set successfully. - /// - /*--cef()--*/ - virtual bool SetNull(const CefString& key) =0; - - /// - // Sets the value at the specified key as type bool. Returns true if the - // value was set successfully. - /// - /*--cef()--*/ - virtual bool SetBool(const CefString& key, bool value) =0; - - /// - // Sets the value at the specified key as type int. Returns true if the - // value was set successfully. - /// - /*--cef()--*/ - virtual bool SetInt(const CefString& key, int value) =0; - - /// - // Sets the value at the specified key as type double. Returns true if the - // value was set successfully. - /// - /*--cef()--*/ - virtual bool SetDouble(const CefString& key, double value) =0; - - /// - // Sets the value at the specified key as type string. Returns true if the - // value was set successfully. - /// - /*--cef(optional_param=value)--*/ - virtual bool SetString(const CefString& key, const CefString& value) =0; - - /// - // Sets the value at the specified key as type binary. Returns true if the - // value was set successfully. If |value| is currently owned by another object - // then the value will be copied and the |value| reference will not change. - // Otherwise, ownership will be transferred to this object and the |value| - // reference will be invalidated. - /// - /*--cef()--*/ - virtual bool SetBinary(const CefString& key, - CefRefPtr value) =0; - - /// - // Sets the value at the specified key as type dict. Returns true if the - // value was set successfully. If |value| is currently owned by another object - // then the value will be copied and the |value| reference will not change. - // Otherwise, ownership will be transferred to this object and the |value| - // reference will be invalidated. - /// - /*--cef()--*/ - virtual bool SetDictionary(const CefString& key, - CefRefPtr value) =0; - - /// - // Sets the value at the specified key as type list. Returns true if the - // value was set successfully. If |value| is currently owned by another object - // then the value will be copied and the |value| reference will not change. - // Otherwise, ownership will be transferred to this object and the |value| - // reference will be invalidated. - /// - /*--cef()--*/ - virtual bool SetList(const CefString& key, - CefRefPtr value) =0; -}; - - -/// -// Class representing a list value. Can be used on any process and thread. -/// -/*--cef(source=library)--*/ -class CefListValue : public virtual CefBase { - public: - /// - // Creates a new object that is not owned by any other object. - /// - /*--cef()--*/ - static CefRefPtr Create(); - - /// - // Returns true if this object is valid. This object may become invalid if - // the underlying data is owned by another object (e.g. list or dictionary) - // and that other object is then modified or destroyed. Do not call any other - // methods if this method returns false. - /// - /*--cef()--*/ - virtual bool IsValid() =0; - - /// - // Returns true if this object is currently owned by another object. - /// - /*--cef()--*/ - virtual bool IsOwned() =0; - - /// - // Returns true if the values of this object are read-only. Some APIs may - // expose read-only objects. - /// - /*--cef()--*/ - virtual bool IsReadOnly() =0; - - /// - // Returns true if this object and |that| object have the same underlying - // data. If true modifications to this object will also affect |that| object - // and vice-versa. - /// - /*--cef()--*/ - virtual bool IsSame(CefRefPtr that) =0; - - /// - // Returns true if this object and |that| object have an equivalent underlying - // value but are not necessarily the same object. - /// - /*--cef()--*/ - virtual bool IsEqual(CefRefPtr that) =0; - - /// - // Returns a writable copy of this object. - /// - /*--cef()--*/ - virtual CefRefPtr Copy() =0; - - /// - // Sets the number of values. If the number of values is expanded all - // new value slots will default to type null. Returns true on success. - /// - /*--cef()--*/ - virtual bool SetSize(size_t size) =0; - - /// - // Returns the number of values. - /// - /*--cef()--*/ - virtual size_t GetSize() =0; - - /// - // Removes all values. Returns true on success. - /// - /*--cef()--*/ - virtual bool Clear() =0; - - /// - // Removes the value at the specified index. - /// - /*--cef(index_param=index)--*/ - virtual bool Remove(int index) =0; - - /// - // Returns the value type at the specified index. - /// - /*--cef(default_retval=VTYPE_INVALID,index_param=index)--*/ - virtual CefValueType GetType(int index) =0; - - /// - // Returns the value at the specified index. For simple types the returned - // value will copy existing data and modifications to the value will not - // modify this object. For complex types (binary, dictionary and list) the - // returned value will reference existing data and modifications to the value - // will modify this object. - /// - /*--cef(index_param=index)--*/ - virtual CefRefPtr GetValue(int index) =0; - - /// - // Returns the value at the specified index as type bool. - /// - /*--cef(index_param=index)--*/ - virtual bool GetBool(int index) =0; - - /// - // Returns the value at the specified index as type int. - /// - /*--cef(index_param=index)--*/ - virtual int GetInt(int index) =0; - - /// - // Returns the value at the specified index as type double. - /// - /*--cef(index_param=index)--*/ - virtual double GetDouble(int index) =0; - - /// - // Returns the value at the specified index as type string. - /// - /*--cef(index_param=index)--*/ - virtual CefString GetString(int index) =0; - - /// - // Returns the value at the specified index as type binary. The returned - // value will reference existing data. - /// - /*--cef(index_param=index)--*/ - virtual CefRefPtr GetBinary(int index) =0; - - /// - // Returns the value at the specified index as type dictionary. The returned - // value will reference existing data and modifications to the value will - // modify this object. - /// - /*--cef(index_param=index)--*/ - virtual CefRefPtr GetDictionary(int index) =0; - - /// - // Returns the value at the specified index as type list. The returned - // value will reference existing data and modifications to the value will - // modify this object. - /// - /*--cef(index_param=index)--*/ - virtual CefRefPtr GetList(int index) =0; - - /// - // Sets the value at the specified index. Returns true if the value was set - // successfully. If |value| represents simple data then the underlying data - // will be copied and modifications to |value| will not modify this object. If - // |value| represents complex data (binary, dictionary or list) then the - // underlying data will be referenced and modifications to |value| will modify - // this object. - /// - /*--cef(index_param=index)--*/ - virtual bool SetValue(int index, CefRefPtr value) =0; - - /// - // Sets the value at the specified index as type null. Returns true if the - // value was set successfully. - /// - /*--cef(index_param=index)--*/ - virtual bool SetNull(int index) =0; - - /// - // Sets the value at the specified index as type bool. Returns true if the - // value was set successfully. - /// - /*--cef(index_param=index)--*/ - virtual bool SetBool(int index, bool value) =0; - - /// - // Sets the value at the specified index as type int. Returns true if the - // value was set successfully. - /// - /*--cef(index_param=index)--*/ - virtual bool SetInt(int index, int value) =0; - - /// - // Sets the value at the specified index as type double. Returns true if the - // value was set successfully. - /// - /*--cef(index_param=index)--*/ - virtual bool SetDouble(int index, double value) =0; - - /// - // Sets the value at the specified index as type string. Returns true if the - // value was set successfully. - /// - /*--cef(optional_param=value,index_param=index)--*/ - virtual bool SetString(int index, const CefString& value) =0; - - /// - // Sets the value at the specified index as type binary. Returns true if the - // value was set successfully. If |value| is currently owned by another object - // then the value will be copied and the |value| reference will not change. - // Otherwise, ownership will be transferred to this object and the |value| - // reference will be invalidated. - /// - /*--cef(index_param=index)--*/ - virtual bool SetBinary(int index, CefRefPtr value) =0; - - /// - // Sets the value at the specified index as type dict. Returns true if the - // value was set successfully. If |value| is currently owned by another object - // then the value will be copied and the |value| reference will not change. - // Otherwise, ownership will be transferred to this object and the |value| - // reference will be invalidated. - /// - /*--cef(index_param=index)--*/ - virtual bool SetDictionary(int index, CefRefPtr value) =0; - - /// - // Sets the value at the specified index as type list. Returns true if the - // value was set successfully. If |value| is currently owned by another object - // then the value will be copied and the |value| reference will not change. - // Otherwise, ownership will be transferred to this object and the |value| - // reference will be invalidated. - /// - /*--cef(index_param=index)--*/ - virtual bool SetList(int index, CefRefPtr value) =0; -}; - -#endif // CEF_INCLUDE_CEF_VALUES_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_version.h b/tool_kits/cef/cef_wrapper/include/cef_version.h deleted file mode 100644 index 3c29e987..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_version.h +++ /dev/null @@ -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. -// -// --------------------------------------------------------------------------- -// -// This file is generated by the make_version_header.py tool. -// - -#ifndef CEF_INCLUDE_CEF_VERSION_H_ -#define CEF_INCLUDE_CEF_VERSION_H_ - -#define CEF_VERSION "3.2623.1401.gb90a3be" -#define CEF_VERSION_MAJOR 3 -#define CEF_COMMIT_NUMBER 1401 -#define CEF_COMMIT_HASH "b90a3be1860b0647e8a62c218ff7c054390365b1" -#define COPYRIGHT_YEAR 2016 - -#define CHROME_VERSION_MAJOR 49 -#define CHROME_VERSION_MINOR 0 -#define CHROME_VERSION_BUILD 2623 -#define CHROME_VERSION_PATCH 110 - -#define DO_MAKE_STRING(p) #p -#define MAKE_STRING(p) DO_MAKE_STRING(p) - -#ifndef APSTUDIO_HIDDEN_SYMBOLS - -#include "include/internal/cef_export.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// The API hash is created by analyzing CEF header files for C API type -// definitions. The hash value will change when header files are modified -// in a way that may cause binary incompatibility with other builds. The -// universal hash value will change if any platform is affected whereas the -// platform hash values will change only if that particular platform is -// affected. -#define CEF_API_HASH_UNIVERSAL "32c1d3523da124f2dea7b80b92c53c4d4a463c65" -#if defined(OS_WIN) -#define CEF_API_HASH_PLATFORM "64b27477b82b44b51ce817522f744fca6768cbbb" -#elif defined(OS_MACOSX) -#define CEF_API_HASH_PLATFORM "e3b9c36454ae5ae4fb3509e17fb6a7d2877c847d" -#elif defined(OS_LINUX) -#define CEF_API_HASH_PLATFORM "87a195efc055fb9f39c84f5ce8199cc8766290e3" -#endif - -// Returns CEF version information for the libcef library. The |entry| -// parameter describes which version component will be returned: -// 0 - CEF_VERSION_MAJOR -// 1 - CEF_COMMIT_NUMBER -// 2 - CHROME_VERSION_MAJOR -// 3 - CHROME_VERSION_MINOR -// 4 - CHROME_VERSION_BUILD -// 5 - CHROME_VERSION_PATCH -/// -CEF_EXPORT int cef_version_info(int entry); - -/// -// Returns CEF API hashes for the libcef library. The returned string is owned -// by the library and should not be freed. The |entry| parameter describes which -// hash value will be returned: -// 0 - CEF_API_HASH_PLATFORM -// 1 - CEF_API_HASH_UNIVERSAL -// 2 - CEF_COMMIT_HASH -/// -CEF_EXPORT const char* cef_api_hash(int entry); - -#ifdef __cplusplus -} -#endif - -#endif // APSTUDIO_HIDDEN_SYMBOLS - -#endif // CEF_INCLUDE_CEF_VERSION_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_web_plugin.h b/tool_kits/cef/cef_wrapper/include/cef_web_plugin.h deleted file mode 100644 index 9247a4d9..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_web_plugin.h +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_WEB_PLUGIN_H_ -#define CEF_INCLUDE_CEF_WEB_PLUGIN_H_ - -#include "include/cef_base.h" - -class CefBrowser; - -/// -// Information about a specific web plugin. -/// -/*--cef(source=library)--*/ -class CefWebPluginInfo : public virtual CefBase { - public: - /// - // Returns the plugin name (i.e. Flash). - /// - /*--cef()--*/ - virtual CefString GetName() =0; - - /// - // Returns the plugin file path (DLL/bundle/library). - /// - /*--cef()--*/ - virtual CefString GetPath() =0; - - /// - // Returns the version of the plugin (may be OS-specific). - /// - /*--cef()--*/ - virtual CefString GetVersion() =0; - - /// - // Returns a description of the plugin from the version information. - /// - /*--cef()--*/ - virtual CefString GetDescription() =0; -}; - -/// -// Interface to implement for visiting web plugin information. The methods of -// this class will be called on the browser process UI thread. -/// -/*--cef(source=client)--*/ -class CefWebPluginInfoVisitor : public virtual CefBase { - public: - /// - // Method that will be called once for each plugin. |count| is the 0-based - // index for the current plugin. |total| is the total number of plugins. - // Return false to stop visiting plugins. This method may never be called if - // no plugins are found. - /// - /*--cef()--*/ - virtual bool Visit(CefRefPtr info, int count, int total) =0; -}; - -/// -// Visit web plugin information. Can be called on any thread in the browser -// process. -/// -/*--cef()--*/ -void CefVisitWebPluginInfo(CefRefPtr visitor); - -/// -// Cause the plugin list to refresh the next time it is accessed regardless -// of whether it has already been loaded. Can be called on any thread in the -// browser process. -/// -/*--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 -// process. -/// -/*--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. -/// -/*--cef()--*/ -void CefRegisterWebPluginCrash(const CefString& path); - -/// -// Interface to implement for receiving unstable plugin information. The methods -// of this class will be called on the browser process IO thread. -/// -/*--cef(source=client)--*/ -class CefWebPluginUnstableCallback : public virtual CefBase { - public: - /// - // Method that will be called for the requested plugin. |unstable| will be - // true if the plugin has reached the crash count threshold of 3 times in 120 - // seconds. - /// - /*--cef()--*/ - virtual void IsUnstable(const CefString& path, - bool unstable) =0; -}; - -/// -// Query if a plugin is unstable. Can be called on any thread in the browser -// process. -/// -/*--cef()--*/ -void CefIsWebPluginUnstable(const CefString& path, - CefRefPtr callback); - - -#endif // CEF_INCLUDE_CEF_WEB_PLUGIN_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_xml_reader.h b/tool_kits/cef/cef_wrapper/include/cef_xml_reader.h deleted file mode 100644 index 86be8bac..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_xml_reader.h +++ /dev/null @@ -1,268 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_XML_READER_H_ -#define CEF_INCLUDE_CEF_XML_READER_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_stream.h" - -/// -// Class that supports the reading of XML data via the libxml streaming API. -// The methods of this class should only be called on the thread that creates -// the object. -/// -/*--cef(source=library)--*/ -class CefXmlReader : public virtual CefBase { - public: - typedef cef_xml_encoding_type_t EncodingType; - typedef cef_xml_node_type_t NodeType; - - /// - // Create a new CefXmlReader object. The returned object's methods can only - // be called from the thread that created the object. - /// - /*--cef()--*/ - static CefRefPtr Create(CefRefPtr stream, - EncodingType encodingType, - const CefString& URI); - - /// - // Moves the cursor to the next node in the document. This method must be - // called at least once to set the current cursor position. Returns true if - // the cursor position was set successfully. - /// - /*--cef()--*/ - virtual bool MoveToNextNode() =0; - - /// - // Close the document. This should be called directly to ensure that cleanup - // occurs on the correct thread. - /// - /*--cef()--*/ - virtual bool Close() =0; - - /// - // Returns true if an error has been reported by the XML parser. - /// - /*--cef()--*/ - virtual bool HasError() =0; - - /// - // Returns the error string. - /// - /*--cef()--*/ - virtual CefString GetError() =0; - - - // The below methods retrieve data for the node at the current cursor - // position. - - /// - // Returns the node type. - /// - /*--cef(default_retval=XML_NODE_UNSUPPORTED)--*/ - virtual NodeType GetType() =0; - - /// - // Returns the node depth. Depth starts at 0 for the root node. - /// - /*--cef()--*/ - virtual int GetDepth() =0; - - /// - // Returns the local name. See - // http://www.w3.org/TR/REC-xml-names/#NT-LocalPart for additional details. - /// - /*--cef()--*/ - virtual CefString GetLocalName() =0; - - /// - // Returns the namespace prefix. See http://www.w3.org/TR/REC-xml-names/ for - // additional details. - /// - /*--cef()--*/ - virtual CefString GetPrefix() =0; - - /// - // Returns the qualified name, equal to (Prefix:)LocalName. See - // http://www.w3.org/TR/REC-xml-names/#ns-qualnames for additional details. - /// - /*--cef()--*/ - virtual CefString GetQualifiedName() =0; - - /// - // Returns the URI defining the namespace associated with the node. See - // http://www.w3.org/TR/REC-xml-names/ for additional details. - /// - /*--cef()--*/ - virtual CefString GetNamespaceURI() =0; - - /// - // Returns the base URI of the node. See http://www.w3.org/TR/xmlbase/ for - // additional details. - /// - /*--cef()--*/ - virtual CefString GetBaseURI() =0; - - /// - // Returns the xml:lang scope within which the node resides. See - // http://www.w3.org/TR/REC-xml/#sec-lang-tag for additional details. - /// - /*--cef()--*/ - virtual CefString GetXmlLang() =0; - - /// - // Returns true if the node represents an empty element. is considered - // empty but is not. - /// - /*--cef()--*/ - virtual bool IsEmptyElement() =0; - - /// - // Returns true if the node has a text value. - /// - /*--cef()--*/ - virtual bool HasValue() =0; - - /// - // Returns the text value. - /// - /*--cef()--*/ - virtual CefString GetValue() =0; - - /// - // Returns true if the node has attributes. - /// - /*--cef()--*/ - virtual bool HasAttributes() =0; - - /// - // Returns the number of attributes. - /// - /*--cef()--*/ - virtual size_t GetAttributeCount() =0; - - /// - // Returns the value of the attribute at the specified 0-based index. - /// - /*--cef(capi_name=get_attribute_byindex,index_param=index)--*/ - virtual CefString GetAttribute(int index) =0; - - /// - // Returns the value of the attribute with the specified qualified name. - /// - /*--cef(capi_name=get_attribute_byqname)--*/ - virtual CefString GetAttribute(const CefString& qualifiedName) =0; - - /// - // Returns the value of the attribute with the specified local name and - // namespace URI. - /// - /*--cef(capi_name=get_attribute_bylname)--*/ - virtual CefString GetAttribute(const CefString& localName, - const CefString& namespaceURI) =0; - - /// - // Returns an XML representation of the current node's children. - /// - /*--cef()--*/ - virtual CefString GetInnerXml() =0; - - /// - // Returns an XML representation of the current node including its children. - /// - /*--cef()--*/ - virtual CefString GetOuterXml() =0; - - /// - // Returns the line number for the current node. - /// - /*--cef()--*/ - virtual int GetLineNumber() =0; - - - // Attribute nodes are not traversed by default. The below methods can be - // used to move the cursor to an attribute node. MoveToCarryingElement() can - // be called afterwards to return the cursor to the carrying element. The - // depth of an attribute node will be 1 + the depth of the carrying element. - - /// - // Moves the cursor to the attribute at the specified 0-based index. Returns - // true if the cursor position was set successfully. - /// - /*--cef(capi_name=move_to_attribute_byindex,index_param=index)--*/ - virtual bool MoveToAttribute(int index) =0; - - /// - // Moves the cursor to the attribute with the specified qualified name. - // Returns true if the cursor position was set successfully. - /// - /*--cef(capi_name=move_to_attribute_byqname)--*/ - virtual bool MoveToAttribute(const CefString& qualifiedName) =0; - - /// - // Moves the cursor to the attribute with the specified local name and - // namespace URI. Returns true if the cursor position was set successfully. - /// - /*--cef(capi_name=move_to_attribute_bylname)--*/ - virtual bool MoveToAttribute(const CefString& localName, - const CefString& namespaceURI) =0; - - /// - // Moves the cursor to the first attribute in the current element. Returns - // true if the cursor position was set successfully. - /// - /*--cef()--*/ - virtual bool MoveToFirstAttribute() =0; - - /// - // Moves the cursor to the next attribute in the current element. Returns - // true if the cursor position was set successfully. - /// - /*--cef()--*/ - virtual bool MoveToNextAttribute() =0; - - /// - // Moves the cursor back to the carrying element. Returns true if the cursor - // position was set successfully. - /// - /*--cef()--*/ - virtual bool MoveToCarryingElement() =0; -}; - -#endif // CEF_INCLUDE_CEF_XML_READER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/cef_zip_reader.h b/tool_kits/cef/cef_wrapper/include/cef_zip_reader.h deleted file mode 100644 index 5d8788e9..00000000 --- a/tool_kits/cef/cef_wrapper/include/cef_zip_reader.h +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// 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_ZIP_READER_H_ -#define CEF_INCLUDE_CEF_ZIP_READER_H_ - -#include "include/cef_base.h" -#include "include/cef_stream.h" - -/// -// Class that supports the reading of zip archives via the zlib unzip API. -// The methods of this class should only be called on the thread that creates -// the object. -/// -/*--cef(source=library)--*/ -class CefZipReader : public virtual CefBase { - public: - /// - // Create a new CefZipReader object. The returned object's methods can only - // be called from the thread that created the object. - /// - /*--cef()--*/ - static CefRefPtr Create(CefRefPtr stream); - - /// - // Moves the cursor to the first file in the archive. Returns true if the - // cursor position was set successfully. - /// - /*--cef()--*/ - virtual bool MoveToFirstFile() =0; - - /// - // Moves the cursor to the next file in the archive. Returns true if the - // cursor position was set successfully. - /// - /*--cef()--*/ - virtual bool MoveToNextFile() =0; - - /// - // Moves the cursor to the specified file in the archive. If |caseSensitive| - // is true then the search will be case sensitive. Returns true if the cursor - // position was set successfully. - /// - /*--cef()--*/ - virtual bool MoveToFile(const CefString& fileName, bool caseSensitive) =0; - - /// - // Closes the archive. This should be called directly to ensure that cleanup - // occurs on the correct thread. - /// - /*--cef()--*/ - virtual bool Close() =0; - - - // The below methods act on the file at the current cursor position. - - /// - // Returns the name of the file. - /// - /*--cef()--*/ - virtual CefString GetFileName() =0; - - /// - // Returns the uncompressed size of the file. - /// - /*--cef()--*/ - virtual int64 GetFileSize() =0; - - /// - // Returns the last modified timestamp for the file. - /// - /*--cef()--*/ - virtual CefTime GetFileLastModified() =0; - - /// - // Opens the file for reading of uncompressed data. A read password may - // optionally be specified. - /// - /*--cef(optional_param=password)--*/ - virtual bool OpenFile(const CefString& password) =0; - - /// - // Closes the file. - /// - /*--cef()--*/ - virtual bool CloseFile() =0; - - /// - // Read uncompressed file contents into the specified buffer. Returns < 0 if - // an error occurred, 0 if at the end of file, or the number of bytes read. - /// - /*--cef()--*/ - virtual int ReadFile(void* buffer, size_t bufferSize) =0; - - /// - // Returns the current offset in the uncompressed file contents. - /// - /*--cef()--*/ - virtual int64 Tell() =0; - - /// - // Returns true if at end of the file contents. - /// - /*--cef()--*/ - virtual bool Eof() =0; -}; - -#endif // CEF_INCLUDE_CEF_ZIP_READER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/internal/cef_export.h b/tool_kits/cef/cef_wrapper/include/internal/cef_export.h deleted file mode 100644 index 2813253b..00000000 --- a/tool_kits/cef/cef_wrapper/include/internal/cef_export.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2009 The Chromium Embedded Framework Authors. All rights -// reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_ -#define CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_ -#pragma once - -#include "include/base/cef_build.h" - -#if defined(COMPILER_MSVC) - -#ifdef BUILDING_CEF_SHARED -#define CEF_EXPORT __declspec(dllexport) -#elif USING_CEF_SHARED -#define CEF_EXPORT __declspec(dllimport) -#else -#define CEF_EXPORT -#endif -#define CEF_CALLBACK __stdcall - -#elif defined(COMPILER_GCC) - -#define CEF_EXPORT __attribute__ ((visibility("default"))) -#define CEF_CALLBACK - -#endif // COMPILER_GCC - -#endif // CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_ diff --git a/tool_kits/cef/cef_wrapper/include/internal/cef_logging_internal.h b/tool_kits/cef/cef_wrapper/include/internal/cef_logging_internal.h deleted file mode 100644 index c376d052..00000000 --- a/tool_kits/cef/cef_wrapper/include/internal/cef_logging_internal.h +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CEF_INCLUDE_INTERNAL_CEF_LOGGING_INTERNAL_H_ -#define CEF_INCLUDE_INTERNAL_CEF_LOGGING_INTERNAL_H_ -#pragma once - -#include "include/internal/cef_export.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// See include/base/cef_logging.h for macros and intended usage. - -/// -// Gets the current log level. -/// -CEF_EXPORT int cef_get_min_log_level(); - -/// -// Gets the current vlog level for the given file (usually taken from -// __FILE__). Note that |N| is the size *with* the null terminator. -/// -CEF_EXPORT int cef_get_vlog_level(const char* file_start, size_t N); - -/// -// Add a log message. See the LogSeverity defines for supported |severity| -// values. -/// -CEF_EXPORT void cef_log(const char* file, - int line, - int severity, - const char* message); - -#ifdef __cplusplus -} -#endif // __cplusplus - -#endif // CEF_INCLUDE_INTERNAL_CEF_LOGGING_INTERNAL_H_ diff --git a/tool_kits/cef/cef_wrapper/include/internal/cef_ptr.h b/tool_kits/cef/cef_wrapper/include/internal/cef_ptr.h deleted file mode 100644 index e3854391..00000000 --- a/tool_kits/cef/cef_wrapper/include/internal/cef_ptr.h +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -#ifndef CEF_INCLUDE_INTERNAL_CEF_PTR_H_ -#define CEF_INCLUDE_INTERNAL_CEF_PTR_H_ -#pragma once - -#include "include/base/cef_ref_counted.h" - -/// -// Smart pointer implementation that is an alias of scoped_refptr from -// include/base/cef_ref_counted.h. -//

-// A smart pointer class for reference counted objects. Use this class instead -// of calling AddRef and Release manually on a reference counted object to -// avoid common memory leaks caused by forgetting to Release an object -// reference. Sample usage: -//

-//   class MyFoo : public CefBase {
-//    ...
-//   };
-//
-//   void some_function() {
-//     // The MyFoo object that |foo| represents starts with a single
-//     // reference.
-//     CefRefPtr<MyFoo> foo = new MyFoo();
-//     foo->Method(param);
-//     // |foo| is released when this function returns
-//   }
-//
-//   void some_other_function() {
-//     CefRefPtr<MyFoo> foo = new MyFoo();
-//     ...
-//     foo = NULL;  // explicitly releases |foo|
-//     ...
-//     if (foo)
-//       foo->Method(param);
-//   }
-// 
-// The above examples show how CefRefPtr<T> acts like a pointer to T. -// Given two CefRefPtr<T> classes, it is also possible to exchange -// references between the two objects, like so: -//
-//   {
-//     CefRefPtr<MyFoo> a = new MyFoo();
-//     CefRefPtr<MyFoo> b;
-//
-//     b.swap(a);
-//     // now, |b| references the MyFoo object, and |a| references NULL.
-//   }
-// 
-// To make both |a| and |b| in the above example reference the same MyFoo -// object, simply use the assignment operator: -//
-//   {
-//     CefRefPtr<MyFoo> a = new MyFoo();
-//     CefRefPtr<MyFoo> b;
-//
-//     b = a;
-//     // now, |a| and |b| each own a reference to the same MyFoo object.
-//     // the reference count of the underlying MyFoo object will be 2.
-//   }
-// 
-// Reference counted objects can also be passed as function parameters and -// used as function return values: -//
-//   void some_func_with_param(CefRefPtr<MyFoo> param) {
-//     // A reference is added to the MyFoo object that |param| represents
-//     // during the scope of some_func_with_param() and released when
-//     // some_func_with_param() goes out of scope.
-//   }
-//
-//   CefRefPtr<MyFoo> some_func_with_retval() {
-//     // The MyFoo object that |foox| represents starts with a single
-//     // reference.
-//     CefRefPtr<MyFoo> foox = new MyFoo();
-//
-//     // Creating the return value adds an additional reference.
-//     return foox;
-//
-//     // When some_func_with_retval() goes out of scope the original |foox|
-//     // reference is released.
-//   }
-//
-//   void and_another_function() {
-//     CefRefPtr<MyFoo> foo = new MyFoo();
-//
-//     // pass |foo| as a parameter.
-//     some_function(foo);
-//
-//     CefRefPtr<MyFoo> foo2 = some_func_with_retval();
-//     // Now, since we kept a reference to the some_func_with_retval() return
-//     // value, |foo2| is the only class pointing to the MyFoo object created
-//     in some_func_with_retval(), and it has a reference count of 1.
-//
-//     some_func_with_retval();
-//     // Now, since we didn't keep a reference to the some_func_with_retval()
-//     // return value, the MyFoo object created in some_func_with_retval()
-//     // will automatically be released.
-//   }
-// 
-// And in standard containers: -//
-//   {
-//      // Create a vector that holds MyFoo objects.
-//      std::vector<CefRefPtr<MyFoo> > MyFooVec;
-//
-//     // The MyFoo object that |foo| represents starts with a single
-//     // reference.
-//     CefRefPtr<MyFoo> foo = new MyFoo();
-//
-//     // When the MyFoo object is added to |MyFooVec| the reference count
-//     // is increased to 2.
-//     MyFooVec.push_back(foo);
-//   }
-// 
-//

-/// -template -class CefRefPtr : public scoped_refptr { - public: - typedef scoped_refptr parent; - - CefRefPtr() : parent() {} - - CefRefPtr(T* p) : parent(p) {} - - CefRefPtr(const scoped_refptr& r) : parent(r) {} - - template - CefRefPtr(const scoped_refptr& r) : parent(r) {} -}; - -#endif // CEF_INCLUDE_INTERNAL_CEF_PTR_H_ diff --git a/tool_kits/cef/cef_wrapper/include/internal/cef_string.h b/tool_kits/cef/cef_wrapper/include/internal/cef_string.h deleted file mode 100644 index a7876fe5..00000000 --- a/tool_kits/cef/cef_wrapper/include/internal/cef_string.h +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) 2010 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CEF_INCLUDE_INTERNAL_CEF_STRING_H_ -#define CEF_INCLUDE_INTERNAL_CEF_STRING_H_ -#pragma once - -// The CEF interface is built with one string type as the default. Comment out -// all but one of the CEF_STRING_TYPE_* defines below to specify the default. -// If you change the default you MUST recompile all of CEF. - -// Build with the UTF8 string type as default. -// #define CEF_STRING_TYPE_UTF8 1 - -// Build with the UTF16 string type as default. -#define CEF_STRING_TYPE_UTF16 1 - -// Build with the wide string type as default. -// #define CEF_STRING_TYPE_WIDE 1 - - -#include "include/internal/cef_string_types.h" - -#ifdef __cplusplus -#include "include/internal/cef_string_wrappers.h" -#if defined(CEF_STRING_TYPE_UTF16) -typedef CefStringUTF16 CefString; -#elif defined(CEF_STRING_TYPE_UTF8) -typedef CefStringUTF8 CefString; -#elif defined(CEF_STRING_TYPE_WIDE) -typedef CefStringWide CefString; -#endif -#endif // __cplusplus - -#if defined(CEF_STRING_TYPE_UTF8) -typedef char cef_char_t; -typedef cef_string_utf8_t cef_string_t; -typedef cef_string_userfree_utf8_t cef_string_userfree_t; -#define cef_string_set cef_string_utf8_set -#define cef_string_copy cef_string_utf8_copy -#define cef_string_clear cef_string_utf8_clear -#define cef_string_userfree_alloc cef_string_userfree_utf8_alloc -#define cef_string_userfree_free cef_string_userfree_utf8_free -#define cef_string_from_ascii cef_string_utf8_copy -#define cef_string_to_utf8 cef_string_utf8_copy -#define cef_string_from_utf8 cef_string_utf8_copy -#define cef_string_to_utf16 cef_string_utf8_to_utf16 -#define cef_string_from_utf16 cef_string_utf16_to_utf8 -#define cef_string_to_wide cef_string_utf8_to_wide -#define cef_string_from_wide cef_string_wide_to_utf8 -#elif defined(CEF_STRING_TYPE_UTF16) -typedef char16 cef_char_t; -typedef cef_string_userfree_utf16_t cef_string_userfree_t; -typedef cef_string_utf16_t cef_string_t; -#define cef_string_set cef_string_utf16_set -#define cef_string_copy cef_string_utf16_copy -#define cef_string_clear cef_string_utf16_clear -#define cef_string_userfree_alloc cef_string_userfree_utf16_alloc -#define cef_string_userfree_free cef_string_userfree_utf16_free -#define cef_string_from_ascii cef_string_ascii_to_utf16 -#define cef_string_to_utf8 cef_string_utf16_to_utf8 -#define cef_string_from_utf8 cef_string_utf8_to_utf16 -#define cef_string_to_utf16 cef_string_utf16_copy -#define cef_string_from_utf16 cef_string_utf16_copy -#define cef_string_to_wide cef_string_utf16_to_wide -#define cef_string_from_wide cef_string_wide_to_utf16 -#elif defined(CEF_STRING_TYPE_WIDE) -typedef wchar_t cef_char_t; -typedef cef_string_wide_t cef_string_t; -typedef cef_string_userfree_wide_t cef_string_userfree_t; -#define cef_string_set cef_string_wide_set -#define cef_string_copy cef_string_wide_copy -#define cef_string_clear cef_string_wide_clear -#define cef_string_userfree_alloc cef_string_userfree_wide_alloc -#define cef_string_userfree_free cef_string_userfree_wide_free -#define cef_string_from_ascii cef_string_ascii_to_wide -#define cef_string_to_utf8 cef_string_wide_to_utf8 -#define cef_string_from_utf8 cef_string_utf8_to_wide -#define cef_string_to_utf16 cef_string_wide_to_utf16 -#define cef_string_from_utf16 cef_string_utf16_to_wide -#define cef_string_to_wide cef_string_wide_copy -#define cef_string_from_wide cef_string_wide_copy -#else -#error Please choose a string type. -#endif - -#endif // CEF_INCLUDE_INTERNAL_CEF_STRING_H_ diff --git a/tool_kits/cef/cef_wrapper/include/internal/cef_string_list.h b/tool_kits/cef/cef_wrapper/include/internal/cef_string_list.h deleted file mode 100644 index 52a0abf2..00000000 --- a/tool_kits/cef/cef_wrapper/include/internal/cef_string_list.h +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) 2009 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CEF_INCLUDE_INTERNAL_CEF_STRING_LIST_H_ -#define CEF_INCLUDE_INTERNAL_CEF_STRING_LIST_H_ -#pragma once - -#include "include/internal/cef_export.h" -#include "include/internal/cef_string.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/// -// CEF string maps are a set of key/value string pairs. -/// -typedef void* cef_string_list_t; - -/// -// Allocate a new string map. -/// -CEF_EXPORT cef_string_list_t cef_string_list_alloc(); - -/// -// Return the number of elements in the string list. -/// -CEF_EXPORT int cef_string_list_size(cef_string_list_t list); - -/// -// Retrieve the value at the specified zero-based string list index. Returns -// true (1) if the value was successfully retrieved. -/// -CEF_EXPORT int cef_string_list_value(cef_string_list_t list, - int index, cef_string_t* value); - -/// -// Append a new value at the end of the string list. -/// -CEF_EXPORT void cef_string_list_append(cef_string_list_t list, - const cef_string_t* value); - -/// -// Clear the string list. -/// -CEF_EXPORT void cef_string_list_clear(cef_string_list_t list); - -/// -// Free the string list. -/// -CEF_EXPORT void cef_string_list_free(cef_string_list_t list); - -/// -// Creates a copy of an existing string list. -/// -CEF_EXPORT cef_string_list_t cef_string_list_copy(cef_string_list_t list); - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_INTERNAL_CEF_STRING_LIST_H_ diff --git a/tool_kits/cef/cef_wrapper/include/internal/cef_string_map.h b/tool_kits/cef/cef_wrapper/include/internal/cef_string_map.h deleted file mode 100644 index 93eea2a5..00000000 --- a/tool_kits/cef/cef_wrapper/include/internal/cef_string_map.h +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) 2009 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CEF_INCLUDE_INTERNAL_CEF_STRING_MAP_H_ -#define CEF_INCLUDE_INTERNAL_CEF_STRING_MAP_H_ -#pragma once - -#include "include/internal/cef_export.h" -#include "include/internal/cef_string.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/// -// CEF string maps are a set of key/value string pairs. -/// -typedef void* cef_string_map_t; - -/// -// Allocate a new string map. -/// -CEF_EXPORT cef_string_map_t cef_string_map_alloc(); - -/// -// Return the number of elements in the string map. -/// -CEF_EXPORT int cef_string_map_size(cef_string_map_t map); - -/// -// Return the value assigned to the specified key. -/// -CEF_EXPORT int cef_string_map_find(cef_string_map_t map, - const cef_string_t* key, - cef_string_t* value); - -/// -// Return the key at the specified zero-based string map index. -/// -CEF_EXPORT int cef_string_map_key(cef_string_map_t map, int index, - cef_string_t* key); - -/// -// Return the value at the specified zero-based string map index. -/// -CEF_EXPORT int cef_string_map_value(cef_string_map_t map, int index, - cef_string_t* value); - -/// -// Append a new key/value pair at the end of the string map. -/// -CEF_EXPORT int cef_string_map_append(cef_string_map_t map, - const cef_string_t* key, - const cef_string_t* value); - -/// -// Clear the string map. -/// -CEF_EXPORT void cef_string_map_clear(cef_string_map_t map); - -/// -// Free the string map. -/// -CEF_EXPORT void cef_string_map_free(cef_string_map_t map); - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_INTERNAL_CEF_STRING_MAP_H_ diff --git a/tool_kits/cef/cef_wrapper/include/internal/cef_string_multimap.h b/tool_kits/cef/cef_wrapper/include/internal/cef_string_multimap.h deleted file mode 100644 index cd390424..00000000 --- a/tool_kits/cef/cef_wrapper/include/internal/cef_string_multimap.h +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CEF_INCLUDE_INTERNAL_CEF_STRING_MULTIMAP_H_ -#define CEF_INCLUDE_INTERNAL_CEF_STRING_MULTIMAP_H_ -#pragma once - -#include "include/internal/cef_export.h" -#include "include/internal/cef_string.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/// -// CEF string multimaps are a set of key/value string pairs. -// More than one value can be assigned to a single key. -/// -typedef void* cef_string_multimap_t; - -/// -// Allocate a new string multimap. -/// -CEF_EXPORT cef_string_multimap_t cef_string_multimap_alloc(); - -/// -// Return the number of elements in the string multimap. -/// -CEF_EXPORT int cef_string_multimap_size(cef_string_multimap_t map); - -/// -// Return the number of values with the specified key. -/// -CEF_EXPORT int cef_string_multimap_find_count(cef_string_multimap_t map, - const cef_string_t* key); - -/// -// Return the value_index-th value with the specified key. -/// -CEF_EXPORT int cef_string_multimap_enumerate(cef_string_multimap_t map, - const cef_string_t* key, - int value_index, - cef_string_t* value); - -/// -// Return the key at the specified zero-based string multimap index. -/// -CEF_EXPORT int cef_string_multimap_key(cef_string_multimap_t map, int index, - cef_string_t* key); - -/// -// Return the value at the specified zero-based string multimap index. -/// -CEF_EXPORT int cef_string_multimap_value(cef_string_multimap_t map, int index, - cef_string_t* value); - -/// -// Append a new key/value pair at the end of the string multimap. -/// -CEF_EXPORT int cef_string_multimap_append(cef_string_multimap_t map, - const cef_string_t* key, - const cef_string_t* value); - -/// -// Clear the string multimap. -/// -CEF_EXPORT void cef_string_multimap_clear(cef_string_multimap_t map); - -/// -// Free the string multimap. -/// -CEF_EXPORT void cef_string_multimap_free(cef_string_multimap_t map); - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_INTERNAL_CEF_STRING_MULTIMAP_H_ diff --git a/tool_kits/cef/cef_wrapper/include/internal/cef_string_types.h b/tool_kits/cef/cef_wrapper/include/internal/cef_string_types.h deleted file mode 100644 index ab21fe84..00000000 --- a/tool_kits/cef/cef_wrapper/include/internal/cef_string_types.h +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright (c) 2010 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CEF_INCLUDE_INTERNAL_CEF_STRING_TYPES_H_ -#define CEF_INCLUDE_INTERNAL_CEF_STRING_TYPES_H_ -#pragma once - -// CEF provides functions for converting between UTF-8, -16 and -32 strings. -// CEF string types are safe for reading from multiple threads but not for -// modification. It is the user's responsibility to provide synchronization if -// modifying CEF strings from multiple threads. - -#include - -#include "include/base/cef_basictypes.h" -#include "include/internal/cef_export.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// CEF string type definitions. Whomever allocates |str| is responsible for -// providing an appropriate |dtor| implementation that will free the string in -// the same memory space. When reusing an existing string structure make sure -// to call |dtor| for the old value before assigning new |str| and |dtor| -// values. Static strings will have a NULL |dtor| value. Using the below -// functions if you want this managed for you. - -typedef struct _cef_string_wide_t { - wchar_t* str; - size_t length; - void (*dtor)(wchar_t* str); -} cef_string_wide_t; - -typedef struct _cef_string_utf8_t { - char* str; - size_t length; - void (*dtor)(char* str); -} cef_string_utf8_t; - -typedef struct _cef_string_utf16_t { - char16* str; - size_t length; - void (*dtor)(char16* str); -} cef_string_utf16_t; - - -/// -// These functions set string values. If |copy| is true (1) the value will be -// copied instead of referenced. It is up to the user to properly manage -// the lifespan of references. -/// - -CEF_EXPORT int cef_string_wide_set(const wchar_t* src, size_t src_len, - cef_string_wide_t* output, int copy); -CEF_EXPORT int cef_string_utf8_set(const char* src, size_t src_len, - cef_string_utf8_t* output, int copy); -CEF_EXPORT int cef_string_utf16_set(const char16* src, size_t src_len, - cef_string_utf16_t* output, int copy); - - -/// -// Convenience macros for copying values. -/// - -#define cef_string_wide_copy(src, src_len, output) \ - cef_string_wide_set(src, src_len, output, true) -#define cef_string_utf8_copy(src, src_len, output) \ - cef_string_utf8_set(src, src_len, output, true) -#define cef_string_utf16_copy(src, src_len, output) \ - cef_string_utf16_set(src, src_len, output, true) - - -/// -// These functions clear string values. The structure itself is not freed. -/// - -CEF_EXPORT void cef_string_wide_clear(cef_string_wide_t* str); -CEF_EXPORT void cef_string_utf8_clear(cef_string_utf8_t* str); -CEF_EXPORT void cef_string_utf16_clear(cef_string_utf16_t* str); - - -/// -// These functions compare two string values with the same results as strcmp(). -/// - -CEF_EXPORT int cef_string_wide_cmp(const cef_string_wide_t* str1, - const cef_string_wide_t* str2); -CEF_EXPORT int cef_string_utf8_cmp(const cef_string_utf8_t* str1, - const cef_string_utf8_t* str2); -CEF_EXPORT int cef_string_utf16_cmp(const cef_string_utf16_t* str1, - const cef_string_utf16_t* str2); - - -/// -// These functions convert between UTF-8, -16, and -32 strings. They are -// potentially slow so unnecessary conversions should be avoided. The best -// possible result will always be written to |output| with the boolean return -// value indicating whether the conversion is 100% valid. -/// - -CEF_EXPORT int cef_string_wide_to_utf8(const wchar_t* src, size_t src_len, - cef_string_utf8_t* output); -CEF_EXPORT int cef_string_utf8_to_wide(const char* src, size_t src_len, - cef_string_wide_t* output); - -CEF_EXPORT int cef_string_wide_to_utf16(const wchar_t* src, size_t src_len, - cef_string_utf16_t* output); -CEF_EXPORT int cef_string_utf16_to_wide(const char16* src, size_t src_len, - cef_string_wide_t* output); - -CEF_EXPORT int cef_string_utf8_to_utf16(const char* src, size_t src_len, - cef_string_utf16_t* output); -CEF_EXPORT int cef_string_utf16_to_utf8(const char16* src, size_t src_len, - cef_string_utf8_t* output); - - -/// -// These functions convert an ASCII string, typically a hardcoded constant, to a -// Wide/UTF16 string. Use instead of the UTF8 conversion routines if you know -// the string is ASCII. -/// - -CEF_EXPORT int cef_string_ascii_to_wide(const char* src, size_t src_len, - cef_string_wide_t* output); -CEF_EXPORT int cef_string_ascii_to_utf16(const char* src, size_t src_len, - cef_string_utf16_t* output); - - - -/// -// It is sometimes necessary for the system to allocate string structures with -// the expectation that the user will free them. The userfree types act as a -// hint that the user is responsible for freeing the structure. -/// - -typedef cef_string_wide_t* cef_string_userfree_wide_t; -typedef cef_string_utf8_t* cef_string_userfree_utf8_t; -typedef cef_string_utf16_t* cef_string_userfree_utf16_t; - - -/// -// These functions allocate a new string structure. They must be freed by -// calling the associated free function. -/// - -CEF_EXPORT cef_string_userfree_wide_t cef_string_userfree_wide_alloc(); -CEF_EXPORT cef_string_userfree_utf8_t cef_string_userfree_utf8_alloc(); -CEF_EXPORT cef_string_userfree_utf16_t cef_string_userfree_utf16_alloc(); - - -/// -// These functions free the string structure allocated by the associated -// alloc function. Any string contents will first be cleared. -/// - -CEF_EXPORT void cef_string_userfree_wide_free(cef_string_userfree_wide_t str); -CEF_EXPORT void cef_string_userfree_utf8_free(cef_string_userfree_utf8_t str); -CEF_EXPORT void cef_string_userfree_utf16_free(cef_string_userfree_utf16_t str); - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_INTERNAL_CEF_STRING_TYPES_H_ diff --git a/tool_kits/cef/cef_wrapper/include/internal/cef_string_wrappers.h b/tool_kits/cef/cef_wrapper/include/internal/cef_string_wrappers.h deleted file mode 100644 index 48c90957..00000000 --- a/tool_kits/cef/cef_wrapper/include/internal/cef_string_wrappers.h +++ /dev/null @@ -1,730 +0,0 @@ -// Copyright (c) 2010 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CEF_INCLUDE_INTERNAL_CEF_STRING_WRAPPERS_H_ -#define CEF_INCLUDE_INTERNAL_CEF_STRING_WRAPPERS_H_ -#pragma once - -#include -#include - -#include "include/base/cef_string16.h" -#include "include/internal/cef_string_types.h" - -#if defined(BUILDING_CEF_SHARED) -#include "base/files/file_path.h" -#endif - -/// -// Traits implementation for wide character strings. -/// -struct CefStringTraitsWide { - typedef wchar_t char_type; - typedef cef_string_wide_t struct_type; - typedef cef_string_userfree_wide_t userfree_struct_type; - - static inline void clear(struct_type *s) { cef_string_wide_clear(s); } - static inline int set(const char_type* src, size_t src_size, - struct_type* output, int copy) { - return cef_string_wide_set(src, src_size, output, copy); - } - static inline int compare(const struct_type* s1, const struct_type* s2) { - return cef_string_wide_cmp(s1, s2); - } - static inline userfree_struct_type userfree_alloc() { - return cef_string_userfree_wide_alloc(); - } - static inline void userfree_free(userfree_struct_type ufs) { - return cef_string_userfree_wide_free(ufs); - } - - // Conversion methods. - static inline bool from_ascii(const char* str, size_t len, struct_type *s) { - return cef_string_ascii_to_wide(str, len, s) ? true : false; - } - static inline std::string to_string(const struct_type *s) { - cef_string_utf8_t cstr; - memset(&cstr, 0, sizeof(cstr)); - cef_string_wide_to_utf8(s->str, s->length, &cstr); - std::string str; - if (cstr.length > 0) - str = std::string(cstr.str, cstr.length); - cef_string_utf8_clear(&cstr); - return str; - } - static inline bool from_string(const std::string& str, struct_type *s) { - return cef_string_utf8_to_wide(str.c_str(), str.length(), s) ? true : false; - } - static inline std::wstring to_wstring(const struct_type *s) { - return std::wstring(s->str, s->length); - } - static inline bool from_wstring(const std::wstring& str, struct_type *s) { - return cef_string_wide_set(str.c_str(), str.length(), s, true) ? - true : false; - } -#if defined(WCHAR_T_IS_UTF32) - static inline base::string16 to_string16(const struct_type *s) { - cef_string_utf16_t cstr; - memset(&cstr, 0, sizeof(cstr)); - cef_string_wide_to_utf16(s->str, s->length, &cstr); - base::string16 str; - if (cstr.length > 0) - str = base::string16(cstr.str, cstr.length); - cef_string_utf16_clear(&cstr); - return str; - } - static inline bool from_string16(const base::string16& str, - struct_type *s) { - return cef_string_utf16_to_wide(str.c_str(), str.length(), s) ? - true : false; - } -#else // WCHAR_T_IS_UTF32 - static inline base::string16 to_string16(const struct_type *s) { - return base::string16(s->str, s->length); - } - static inline bool from_string16(const base::string16& str, struct_type *s) { - return cef_string_wide_set(str.c_str(), str.length(), s, true) ? - true : false; - } -#endif // WCHAR_T_IS_UTF32 -}; - -/// -// Traits implementation for utf8 character strings. -/// -struct CefStringTraitsUTF8 { - typedef char char_type; - typedef cef_string_utf8_t struct_type; - typedef cef_string_userfree_utf8_t userfree_struct_type; - - static inline void clear(struct_type *s) { cef_string_utf8_clear(s); } - static inline int set(const char_type* src, size_t src_size, - struct_type* output, int copy) { - return cef_string_utf8_set(src, src_size, output, copy); - } - static inline int compare(const struct_type* s1, const struct_type* s2) { - return cef_string_utf8_cmp(s1, s2); - } - static inline userfree_struct_type userfree_alloc() { - return cef_string_userfree_utf8_alloc(); - } - static inline void userfree_free(userfree_struct_type ufs) { - return cef_string_userfree_utf8_free(ufs); - } - - // Conversion methods. - static inline bool from_ascii(const char* str, size_t len, struct_type* s) { - return cef_string_utf8_copy(str, len, s) ? true : false; - } - static inline std::string to_string(const struct_type* s) { - return std::string(s->str, s->length); - } - static inline bool from_string(const std::string& str, struct_type* s) { - return cef_string_utf8_copy(str.c_str(), str.length(), s) ? true : false; - } - static inline std::wstring to_wstring(const struct_type* s) { - cef_string_wide_t cstr; - memset(&cstr, 0, sizeof(cstr)); - cef_string_utf8_to_wide(s->str, s->length, &cstr); - std::wstring str; - if (cstr.length > 0) - str = std::wstring(cstr.str, cstr.length); - cef_string_wide_clear(&cstr); - return str; - } - static inline bool from_wstring(const std::wstring& str, struct_type* s) { - return cef_string_wide_to_utf8(str.c_str(), str.length(), s) ? true : false; - } - static inline base::string16 to_string16(const struct_type* s) { - cef_string_utf16_t cstr; - memset(&cstr, 0, sizeof(cstr)); - cef_string_utf8_to_utf16(s->str, s->length, &cstr); - base::string16 str; - if (cstr.length > 0) - str = base::string16(cstr.str, cstr.length); - cef_string_utf16_clear(&cstr); - return str; - } - static inline bool from_string16(const base::string16& str, struct_type* s) { - return cef_string_utf16_to_utf8(str.c_str(), str.length(), s) ? - true : false; - } -}; - -/// -// Traits implementation for utf16 character strings. -/// -struct CefStringTraitsUTF16 { - typedef char16 char_type; - typedef cef_string_utf16_t struct_type; - typedef cef_string_userfree_utf16_t userfree_struct_type; - - static inline void clear(struct_type *s) { cef_string_utf16_clear(s); } - static inline int set(const char_type* src, size_t src_size, - struct_type* output, int copy) { - return cef_string_utf16_set(src, src_size, output, copy); - } - static inline int compare(const struct_type* s1, const struct_type* s2) { - return cef_string_utf16_cmp(s1, s2); - } - static inline userfree_struct_type userfree_alloc() { - return cef_string_userfree_utf16_alloc(); - } - static inline void userfree_free(userfree_struct_type ufs) { - return cef_string_userfree_utf16_free(ufs); - } - - // Conversion methods. - static inline bool from_ascii(const char* str, size_t len, struct_type* s) { - return cef_string_ascii_to_utf16(str, len, s) ? true : false; - } - static inline std::string to_string(const struct_type* s) { - cef_string_utf8_t cstr; - memset(&cstr, 0, sizeof(cstr)); - cef_string_utf16_to_utf8(s->str, s->length, &cstr); - std::string str; - if (cstr.length > 0) - str = std::string(cstr.str, cstr.length); - cef_string_utf8_clear(&cstr); - return str; - } - static inline bool from_string(const std::string& str, struct_type* s) { - return cef_string_utf8_to_utf16(str.c_str(), str.length(), s) ? - true : false; - } -#if defined(WCHAR_T_IS_UTF32) - static inline std::wstring to_wstring(const struct_type* s) { - cef_string_wide_t cstr; - memset(&cstr, 0, sizeof(cstr)); - cef_string_utf16_to_wide(s->str, s->length, &cstr); - std::wstring str; - if (cstr.length > 0) - str = std::wstring(cstr.str, cstr.length); - cef_string_wide_clear(&cstr); - return str; - } - static inline bool from_wstring(const std::wstring& str, struct_type* s) { - return cef_string_wide_to_utf16(str.c_str(), str.length(), s) ? - true : false; - } -#else // WCHAR_T_IS_UTF32 - static inline std::wstring to_wstring(const struct_type* s) { - return std::wstring(s->str, s->length); - } - static inline bool from_wstring(const std::wstring& str, struct_type* s) { - return cef_string_utf16_set(str.c_str(), str.length(), s, true) ? - true : false; - } -#endif // WCHAR_T_IS_UTF32 - static inline base::string16 to_string16(const struct_type* s) { - return base::string16(s->str, s->length); - } - static inline bool from_string16(const base::string16& str, struct_type* s) { - return cef_string_utf16_set(str.c_str(), str.length(), s, true) ? - true : false; - } -}; - -/// -// CEF string classes can convert between all supported string types. For -// example, the CefStringWide class uses wchar_t as the underlying character -// type and provides two approaches for converting data to/from a UTF8 string -// (std::string). -//

-// 1. Implicit conversion using the assignment operator overload. -//

-//   CefStringWide aCefString;
-//   std::string aUTF8String;
-//   aCefString = aUTF8String; // Assign std::string to CefStringWide
-//   aUTF8String = aCefString; // Assign CefStringWide to std::string
-// 
-// 2. Explicit conversion using the FromString/ToString methods. -//
-//   CefStringWide aCefString;
-//   std::string aUTF8String;
-//   aCefString.FromString(aUTF8String); // Assign std::string to CefStringWide
-//   aUTF8String = aCefString.ToString(); // Assign CefStringWide to std::string
-// 
-// Conversion will only occur if the assigned value is a different string type. -// Assigning a std::string to a CefStringUTF8, for example, will copy the data -// without performing a conversion. -//

-// CEF string classes are safe for reading from multiple threads but not for -// modification. It is the user's responsibility to provide synchronization if -// modifying CEF strings from multiple threads. -/// -template -class CefStringBase { - public: - typedef typename traits::char_type char_type; - typedef typename traits::struct_type struct_type; - typedef typename traits::userfree_struct_type userfree_struct_type; - - /// - // Default constructor. - /// - CefStringBase() : string_(NULL), owner_(false) {} - - /// - // Create a new string from an existing string. Data will always be copied. - /// - CefStringBase(const CefStringBase& str) - : string_(NULL), owner_(false) { - FromString(str.c_str(), str.length(), true); - } - - /// - // Create a new string from an existing std::string. Data will be always - // copied. Translation will occur if necessary based on the underlying string - // type. - /// - CefStringBase(const std::string& src) // NOLINT(runtime/explicit) - : string_(NULL), owner_(false) { - FromString(src); - } - CefStringBase(const char* src) // NOLINT(runtime/explicit) - : string_(NULL), owner_(false) { - if (src) - FromString(std::string(src)); - } - - /// - // Create a new string from an existing std::wstring. Data will be always - // copied. Translation will occur if necessary based on the underlying string - // type. - /// - CefStringBase(const std::wstring& src) // NOLINT(runtime/explicit) - : string_(NULL), owner_(false) { - FromWString(src); - } - CefStringBase(const wchar_t* src) // NOLINT(runtime/explicit) - : string_(NULL), owner_(false) { - if (src) - FromWString(std::wstring(src)); - } - -#if defined(WCHAR_T_IS_UTF32) - /// - // Create a new string from an existing string16. Data will be always - // copied. Translation will occur if necessary based on the underlying string - // type. - /// - CefStringBase(const base::string16& src) // NOLINT(runtime/explicit) - : string_(NULL), owner_(false) { - FromString16(src); - } - CefStringBase(const char16* src) // NOLINT(runtime/explicit) - : string_(NULL), owner_(false) { - if (src) - FromString16(base::string16(src)); - } -#endif // WCHAR_T_IS_UTF32 - - /// - // Create a new string from an existing character array. If |copy| is true - // this class will copy the data. Otherwise, this class will reference the - // existing data. Referenced data must exist for the lifetime of this class - // and will not be freed by this class. - /// - CefStringBase(const char_type* src, size_t src_len, bool copy) - : string_(NULL), owner_(false) { - if (src && src_len > 0) - FromString(src, src_len, copy); - } - - /// - // Create a new string referencing an existing string structure without taking - // ownership. Referenced structures must exist for the lifetime of this class - // and will not be freed by this class. - /// - CefStringBase(const struct_type* src) // NOLINT(runtime/explicit) - : string_(NULL), owner_(false) { - if (!src) - return; - // Reference the existing structure without taking ownership. - Attach(const_cast(src), false); - } - - virtual ~CefStringBase() { ClearAndFree(); } - - - // The following methods are named for compatibility with the standard library - // string template types. - - /// - // Return a read-only pointer to the string data. - /// - const char_type* c_str() const { return (string_ ? string_->str : NULL); } - - /// - // Return the length of the string data. - /// - size_t length() const { return (string_ ? string_->length : 0); } - - /// - // Return the length of the string data. - /// - inline size_t size() const { return length(); } - - /// - // Returns true if the string is empty. - /// - bool empty() const { return (string_ == NULL || string_->length == 0); } - - /// - // Compare this string to the specified string. - /// - int compare(const CefStringBase& str) const { - if (empty() && str.empty()) - return 0; - if (empty()) - return -1; - if (str.empty()) - return 1; - return traits::compare(string_, str.GetStruct()); - } - - /// - // Clear the string data. - /// - void clear() { - if (string_) - traits::clear(string_); - } - - /// - // Swap this string's contents with the specified string. - /// - void swap(CefStringBase& str) { - struct_type* tmp_string = string_; - bool tmp_owner = owner_; - string_ = str.string_; - owner_ = str.owner_; - str.string_ = tmp_string; - str.owner_ = tmp_owner; - } - - - // The following methods are unique to CEF string template types. - - /// - // Returns true if this class owns the underlying string structure. - /// - bool IsOwner() const { return owner_; } - - /// - // Returns a read-only pointer to the underlying string structure. May return - // NULL if no structure is currently allocated. - /// - const struct_type* GetStruct() const { return string_; } - - /// - // Returns a writable pointer to the underlying string structure. Will never - // return NULL. - /// - struct_type* GetWritableStruct() { - AllocIfNeeded(); - return string_; - } - - /// - // Clear the state of this class. The underlying string structure and data - // will be freed if this class owns the structure. - /// - void ClearAndFree() { - if (!string_) - return; - if (owner_) { - clear(); - delete string_; - } - string_ = NULL; - owner_ = false; - } - - /// - // Attach to the specified string structure. If |owner| is true this class - // will take ownership of the structure. - /// - void Attach(struct_type* str, bool owner) { - // Free the previous structure and data, if any. - ClearAndFree(); - - string_ = str; - owner_ = owner; - } - - /// - // Take ownership of the specified userfree structure's string data. The - // userfree structure itself will be freed. Only use this method with userfree - // structures. - /// - void AttachToUserFree(userfree_struct_type str) { - // Free the previous structure and data, if any. - ClearAndFree(); - - if (!str) - return; - - AllocIfNeeded(); - owner_ = true; - memcpy(string_, str, sizeof(struct_type)); - - // Free the |str| structure but not the data. - memset(str, 0, sizeof(struct_type)); - traits::userfree_free(str); - } - - /// - // Detach from the underlying string structure. To avoid memory leaks only use - // this method if you already hold a pointer to the underlying string - // structure. - /// - void Detach() { - string_ = NULL; - owner_ = false; - } - - /// - // Create a userfree structure and give it ownership of this class' string - // data. This class will be disassociated from the data. May return NULL if - // this string class currently contains no data. - /// - userfree_struct_type DetachToUserFree() { - if (empty()) - return NULL; - - userfree_struct_type str = traits::userfree_alloc(); - memcpy(str, string_, sizeof(struct_type)); - - // Free this class' structure but not the data. - memset(string_, 0, sizeof(struct_type)); - ClearAndFree(); - - return str; - } - - /// - // Set this string's data to the specified character array. If |copy| is true - // this class will copy the data. Otherwise, this class will reference the - // existing data. Referenced data must exist for the lifetime of this class - // and will not be freed by this class. - /// - bool FromString(const char_type* src, size_t src_len, bool copy) { - if (src == NULL || src_len == 0) { - clear(); - return true; - } - AllocIfNeeded(); - return traits::set(src, src_len, string_, copy) ? true : false; - } - - /// - // Set this string's data from an existing ASCII string. Data will be always - // copied. Translation will occur if necessary based on the underlying string - // type. - /// - bool FromASCII(const char* str) { - size_t len = str ? strlen(str) : 0; - if (len == 0) { - clear(); - return true; - } - AllocIfNeeded(); - return traits::from_ascii(str, len, string_); - } - - /// - // Return this string's data as a std::string. Translation will occur if - // necessary based on the underlying string type. - /// - std::string ToString() const { - if (empty()) - return std::string(); - return traits::to_string(string_); - } - - /// - // Set this string's data from an existing std::string. Data will be always - // copied. Translation will occur if necessary based on the underlying string - // type. - /// - bool FromString(const std::string& str) { - if (str.empty()) { - clear(); - return true; - } - AllocIfNeeded(); - return traits::from_string(str, string_); - } - - /// - // Return this string's data as a std::wstring. Translation will occur if - // necessary based on the underlying string type. - /// - std::wstring ToWString() const { - if (empty()) - return std::wstring(); - return traits::to_wstring(string_); - } - - /// - // Set this string's data from an existing std::wstring. Data will be always - // copied. Translation will occur if necessary based on the underlying string - // type. - /// - bool FromWString(const std::wstring& str) { - if (str.empty()) { - clear(); - return true; - } - AllocIfNeeded(); - return traits::from_wstring(str, string_); - } - - /// - // Return this string's data as a string16. Translation will occur if - // necessary based on the underlying string type. - /// - base::string16 ToString16() const { - if (empty()) - return base::string16(); - return traits::to_string16(string_); - } - - /// - // Set this string's data from an existing string16. Data will be always - // copied. Translation will occur if necessary based on the underlying string - // type. - /// - bool FromString16(const base::string16& str) { - if (str.empty()) { - clear(); - return true; - } - AllocIfNeeded(); - return traits::from_string16(str, string_); - } - - /// - // Comparison operator overloads. - /// - bool operator<(const CefStringBase& str) const { - return (compare(str) < 0); - } - bool operator<=(const CefStringBase& str) const { - return (compare(str) <= 0); - } - bool operator>(const CefStringBase& str) const { - return (compare(str) > 0); - } - bool operator>=(const CefStringBase& str) const { - return (compare(str) >= 0); - } - bool operator==(const CefStringBase& str) const { - return (compare(str) == 0); - } - bool operator!=(const CefStringBase& str) const { - return (compare(str) != 0); - } - - /// - // Assignment operator overloads. - /// - CefStringBase& operator=(const CefStringBase& str) { - FromString(str.c_str(), str.length(), true); - return *this; - } - operator std::string() const { - return ToString(); - } - CefStringBase& operator=(const std::string& str) { - FromString(str); - return *this; - } - CefStringBase& operator=(const char* str) { - FromString(std::string(str)); - return *this; - } - operator std::wstring() const { - return ToWString(); - } - CefStringBase& operator=(const std::wstring& str) { - FromWString(str); - return *this; - } - CefStringBase& operator=(const wchar_t* str) { - FromWString(std::wstring(str)); - return *this; - } -#if defined(WCHAR_T_IS_UTF32) - operator base::string16() const { - return ToString16(); - } - CefStringBase& operator=(const base::string16& str) { - FromString16(str); - return *this; - } - CefStringBase& operator=(const char16* str) { - FromString16(base::string16(str)); - return *this; - } -#endif // WCHAR_T_IS_UTF32 -#if defined(BUILDING_CEF_SHARED) - // The base::FilePath constructor is marked as explicit so provide the - // conversion here for convenience. - operator base::FilePath() const { -#if defined(OS_WIN) - return base::FilePath(ToWString()); -#else - return base::FilePath(ToString()); -#endif - } -#endif // BUILDING_CEF_SHARED - - private: - // Allocate the string structure if it doesn't already exist. - void AllocIfNeeded() { - if (string_ == NULL) { - string_ = new struct_type; - memset(string_, 0, sizeof(struct_type)); - owner_ = true; - } - } - - struct_type* string_; - bool owner_; -}; - - -typedef CefStringBase CefStringWide; -typedef CefStringBase CefStringUTF8; -typedef CefStringBase CefStringUTF16; - -#endif // CEF_INCLUDE_INTERNAL_CEF_STRING_WRAPPERS_H_ diff --git a/tool_kits/cef/cef_wrapper/include/internal/cef_thread_internal.h b/tool_kits/cef/cef_wrapper/include/internal/cef_thread_internal.h deleted file mode 100644 index eee2b2ae..00000000 --- a/tool_kits/cef/cef_wrapper/include/internal/cef_thread_internal.h +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CEF_INCLUDE_INTERNAL_CEF_THREAD_INTERNAL_H_ -#define CEF_INCLUDE_INTERNAL_CEF_THREAD_INTERNAL_H_ -#pragma once - -#if defined(OS_WIN) -#include -#elif defined(OS_POSIX) -#include -#include -#endif - -#include "include/internal/cef_export.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined(OS_WIN) -typedef DWORD cef_platform_thread_id_t; -#elif defined(OS_POSIX) -typedef pid_t cef_platform_thread_id_t; -#endif - -/// -// Returns the current platform thread ID. -/// -CEF_EXPORT cef_platform_thread_id_t cef_get_current_platform_thread_id(); - -#if defined(OS_WIN) -typedef DWORD cef_platform_thread_handle_t; -#elif defined(OS_POSIX) -typedef pthread_t cef_platform_thread_handle_t; -#endif - -/// -// Returns the current platform thread handle. -/// -CEF_EXPORT cef_platform_thread_handle_t - cef_get_current_platform_thread_handle(); - -#ifdef __cplusplus -} -#endif // __cplusplus - -#endif // CEF_INCLUDE_INTERNAL_CEF_THREAD_INTERNAL_H_ diff --git a/tool_kits/cef/cef_wrapper/include/internal/cef_time.h b/tool_kits/cef/cef_wrapper/include/internal/cef_time.h deleted file mode 100644 index 64e601fe..00000000 --- a/tool_kits/cef/cef_wrapper/include/internal/cef_time.h +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CEF_INCLUDE_INTERNAL_CEF_TIME_H_ -#define CEF_INCLUDE_INTERNAL_CEF_TIME_H_ -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -#include "include/internal/cef_export.h" -#include - -/// -// Time information. Values should always be in UTC. -/// -typedef struct _cef_time_t { - int year; // Four digit year "2007" - int month; // 1-based month (values 1 = January, etc.) - int day_of_week; // 0-based day of week (0 = Sunday, etc.) - int day_of_month; // 1-based day of month (1-31) - int hour; // Hour within the current day (0-23) - int minute; // Minute within the current hour (0-59) - int second; // Second within the current minute (0-59 plus leap - // seconds which may take it up to 60). - int millisecond; // Milliseconds within the current second (0-999) -} cef_time_t; - -/// -// Converts cef_time_t to/from time_t. Returns true (1) on success and false (0) -// on failure. -/// -CEF_EXPORT int cef_time_to_timet(const cef_time_t* cef_time, time_t* time); -CEF_EXPORT int cef_time_from_timet(time_t time, cef_time_t* cef_time); - -/// -// Converts cef_time_t to/from a double which is the number of seconds since -// epoch (Jan 1, 1970). Webkit uses this format to represent time. A value of 0 -// means "not initialized". Returns true (1) on success and false (0) on -// failure. -/// -CEF_EXPORT int cef_time_to_doublet(const cef_time_t* cef_time, double* time); -CEF_EXPORT int cef_time_from_doublet(double time, cef_time_t* cef_time); - -/// -// Retrieve the current system time. -// -CEF_EXPORT int cef_time_now(cef_time_t* cef_time); - -/// -// Retrieve the delta in milliseconds between two time values. -// -CEF_EXPORT int cef_time_delta(const cef_time_t* cef_time1, - const cef_time_t* cef_time2, - long long* delta); - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_INTERNAL_CEF_TIME_H_ diff --git a/tool_kits/cef/cef_wrapper/include/internal/cef_trace_event_internal.h b/tool_kits/cef/cef_wrapper/include/internal/cef_trace_event_internal.h deleted file mode 100644 index 6df87071..00000000 --- a/tool_kits/cef/cef_wrapper/include/internal/cef_trace_event_internal.h +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CEF_INCLUDE_INTERNAL_CEF_TRACE_EVENT_INTERNAL_H_ -#define CEF_INCLUDE_INTERNAL_CEF_TRACE_EVENT_INTERNAL_H_ -#pragma once - -#include "include/internal/cef_export.h" -#include "include/internal/cef_types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// See include/base/cef_trace_event.h for macros and intended usage. - -// Functions for tracing counters and functions; called from macros. -// - |category| string must have application lifetime (static or literal). They -// may not include "(quotes) chars. -// - |argX_name|, |argX_val|, |valueX_name|, |valeX_val| are optional parameters -// and represent pairs of name and values of arguments -// - |copy| is used to avoid memory scoping issues with the |name| and -// |arg_name| parameters by copying them -// - |id| is used to disambiguate counters with the same name, or match async -// trace events - -CEF_EXPORT void cef_trace_event_instant(const char* category, - const char* name, - const char* arg1_name, - uint64 arg1_val, - const char* arg2_name, - uint64 arg2_val, - int copy); -CEF_EXPORT void cef_trace_event_begin(const char* category, - const char* name, - const char* arg1_name, - uint64 arg1_val, - const char* arg2_name, - uint64 arg2_val, - int copy); -CEF_EXPORT void cef_trace_event_end(const char* category, - const char* name, - const char* arg1_name, - uint64 arg1_val, - const char* arg2_name, - uint64 arg2_val, - int copy); -CEF_EXPORT void cef_trace_counter(const char* category, - const char* name, - const char* value1_name, - uint64 value1_val, - const char* value2_name, - uint64 value2_val, - int copy); -CEF_EXPORT void cef_trace_counter_id(const char* category, - const char* name, - uint64 id, - const char* value1_name, - uint64 value1_val, - const char* value2_name, - uint64 value2_val, - int copy); -CEF_EXPORT void cef_trace_event_async_begin(const char* category, - const char* name, - uint64 id, - const char* arg1_name, - uint64 arg1_val, - const char* arg2_name, - uint64 arg2_val, - int copy); -CEF_EXPORT void cef_trace_event_async_step_into(const char* category, - const char* name, - uint64 id, - uint64 step, - const char* arg1_name, - uint64 arg1_val, - int copy); -CEF_EXPORT void cef_trace_event_async_step_past(const char* category, - const char* name, - uint64 id, - uint64 step, - const char* arg1_name, - uint64 arg1_val, - int copy); -CEF_EXPORT void cef_trace_event_async_end(const char* category, - const char* name, - uint64 id, - const char* arg1_name, - uint64 arg1_val, - const char* arg2_name, - uint64 arg2_val, - int copy); - -#ifdef __cplusplus -} -#endif // __cplusplus - -#endif // CEF_INCLUDE_INTERNAL_CEF_TRACE_EVENT_INTERNAL_H_ diff --git a/tool_kits/cef/cef_wrapper/include/internal/cef_types.h b/tool_kits/cef/cef_wrapper/include/internal/cef_types.h deleted file mode 100644 index aa1d7f9d..00000000 --- a/tool_kits/cef/cef_wrapper/include/internal/cef_types.h +++ /dev/null @@ -1,2419 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -#ifndef CEF_INCLUDE_INTERNAL_CEF_TYPES_H_ -#define CEF_INCLUDE_INTERNAL_CEF_TYPES_H_ -#pragma once - -#include "include/base/cef_basictypes.h" -#include "include/internal/cef_string.h" -#include "include/internal/cef_string_list.h" -#include "include/internal/cef_time.h" - -// Bring in platform-specific definitions. -#if defined(OS_WIN) -#include "include/internal/cef_types_win.h" -#elif defined(OS_MACOSX) -#include "include/internal/cef_types_mac.h" -#elif defined(OS_LINUX) -#include "include/internal/cef_types_linux.h" -#endif - -// 32-bit ARGB color value, not premultiplied. The color components are always -// in a known order. Equivalent to the SkColor type. -typedef uint32 cef_color_t; - -// Return the alpha byte from a cef_color_t value. -#define CefColorGetA(color) (((color) >> 24) & 0xFF) -// Return the red byte from a cef_color_t value. -#define CefColorGetR(color) (((color) >> 16) & 0xFF) -// Return the green byte from a cef_color_t value. -#define CefColorGetG(color) (((color) >> 8) & 0xFF) -// Return the blue byte from a cef_color_t value. -#define CefColorGetB(color) (((color) >> 0) & 0xFF) - -// Return an cef_color_t value with the specified byte component values. -#define CefColorSetARGB(a, r, g, b) \ - static_cast( \ - (static_cast(a) << 24) | \ - (static_cast(r) << 16) | \ - (static_cast(g) << 8) | \ - (static_cast(b) << 0)) - -// Return an int64 value with the specified low and high int32 component values. -#define CefInt64Set(int32_low, int32_high) \ - static_cast((static_cast(int32_low)) | \ - (static_cast(static_cast(int32_high))) << 32) - -// Return the low int32 value from an int64 value. -#define CefInt64GetLow(int64_val) static_cast(int64_val) -// Return the high int32 value from an int64 value. -#define CefInt64GetHigh(int64_val) \ - static_cast((static_cast(int64_val) >> 32) & 0xFFFFFFFFL) - - -#ifdef __cplusplus -extern "C" { -#endif - -/// -// Log severity levels. -/// -typedef enum { - /// - // Default logging (currently INFO logging). - /// - LOGSEVERITY_DEFAULT, - - /// - // Verbose logging. - /// - LOGSEVERITY_VERBOSE, - - /// - // INFO logging. - /// - LOGSEVERITY_INFO, - - /// - // WARNING logging. - /// - LOGSEVERITY_WARNING, - - /// - // ERROR logging. - /// - LOGSEVERITY_ERROR, - - /// - // Completely disable logging. - /// - LOGSEVERITY_DISABLE = 99 -} cef_log_severity_t; - -/// -// Represents the state of a setting. -/// -typedef enum { - /// - // Use the default state for the setting. - /// - STATE_DEFAULT = 0, - - /// - // Enable or allow the setting. - /// - STATE_ENABLED, - - /// - // Disable or disallow the setting. - /// - STATE_DISABLED, -} cef_state_t; - -/// -// Initialization settings. Specify NULL or 0 to get the recommended default -// values. Many of these and other settings can also configured using command- -// line switches. -/// -typedef struct _cef_settings_t { - /// - // Size of this structure. - /// - size_t size; - - /// - // Set to true (1) to use a single process for the browser and renderer. This - // run mode is not officially supported by Chromium and is less stable than - // the multi-process default. Also configurable using the "single-process" - // command-line switch. - /// - int single_process; - - /// - // Set to true (1) to disable the sandbox for sub-processes. See - // cef_sandbox_win.h for requirements to enable the sandbox on Windows. Also - // configurable using the "no-sandbox" command-line switch. - /// - int no_sandbox; - - /// - // The path to a separate executable that will be launched for sub-processes. - // By default the browser process executable is used. See the comments on - // CefExecuteProcess() for details. Also configurable using the - // "browser-subprocess-path" command-line switch. - /// - cef_string_t browser_subprocess_path; - - /// - // Set to true (1) to have the browser process message loop run in a separate - // thread. If false (0) than the CefDoMessageLoopWork() function must be - // called from your application message loop. This option is only supported on - // Windows. - /// - int multi_threaded_message_loop; - - /// - // Set to true (1) to enable windowless (off-screen) rendering support. Do not - // enable this value if the application does not use windowless rendering as - // it may reduce rendering performance on some systems. - /// - int windowless_rendering_enabled; - - /// - // Set to true (1) to disable configuration of browser process features using - // standard CEF and Chromium command-line arguments. Configuration can still - // be specified using CEF data structures or via the - // CefApp::OnBeforeCommandLineProcessing() method. - /// - int command_line_args_disabled; - - /// - // The location where cache data will be stored on disk. If empty then - // browsers will be created in "incognito mode" where in-memory caches are - // used for storage and no data is persisted to disk. HTML5 databases such as - // localStorage will only persist across sessions if a cache path is - // specified. Can be overridden for individual CefRequestContext instances via - // the CefRequestContextSettings.cache_path value. - /// - cef_string_t cache_path; - - /// - // The location where user data such as spell checking dictionary files will - // be stored on disk. If empty then the default platform-specific user data - // directory will be used ("~/.cef_user_data" directory on Linux, - // "~/Library/Application Support/CEF/User Data" directory on Mac OS X, - // "Local Settings\Application Data\CEF\User Data" directory under the user - // profile directory on Windows). - /// - cef_string_t user_data_path; - - /// - // To persist session cookies (cookies without an expiry date or validity - // interval) by default when using the global cookie manager set this value to - // true (1). Session cookies are generally intended to be transient and most - // Web browsers do not persist them. A |cache_path| value must also be - // specified to enable this feature. Also configurable using the - // "persist-session-cookies" command-line switch. Can be overridden for - // individual CefRequestContext instances via the - // CefRequestContextSettings.persist_session_cookies value. - /// - int persist_session_cookies; - - /// - // To persist user preferences as a JSON file in the cache path directory set - // this value to true (1). A |cache_path| value must also be specified - // to enable this feature. Also configurable using the - // "persist-user-preferences" command-line switch. Can be overridden for - // individual CefRequestContext instances via the - // CefRequestContextSettings.persist_user_preferences value. - /// - int persist_user_preferences; - - /// - // Value that will be returned as the User-Agent HTTP header. If empty the - // default User-Agent string will be used. Also configurable using the - // "user-agent" command-line switch. - /// - cef_string_t user_agent; - - /// - // Value that will be inserted as the product portion of the default - // User-Agent string. If empty the Chromium product version will be used. If - // |userAgent| is specified this value will be ignored. Also configurable - // using the "product-version" command-line switch. - /// - cef_string_t product_version; - - /// - // The locale string that will be passed to WebKit. If empty the default - // locale of "en-US" will be used. This value is ignored on Linux where locale - // is determined using environment variable parsing with the precedence order: - // LANGUAGE, LC_ALL, LC_MESSAGES and LANG. Also configurable using the "lang" - // command-line switch. - /// - cef_string_t locale; - - /// - // The directory and file name to use for the debug log. If empty a default - // log file name and location will be used. On Windows and Linux a "debug.log" - // file will be written in the main executable directory. On Mac OS X a - // "~/Library/Logs/_debug.log" file will be written where - // is the name of the main app executable. Also configurable using the - // "log-file" command-line switch. - /// - cef_string_t log_file; - - /// - // The log severity. Only messages of this severity level or higher will be - // logged. Also configurable using the "log-severity" command-line switch with - // a value of "verbose", "info", "warning", "error", "error-report" or - // "disable". - /// - cef_log_severity_t log_severity; - - /// - // Custom flags that will be used when initializing the V8 JavaScript engine. - // The consequences of using custom flags may not be well tested. Also - // configurable using the "js-flags" command-line switch. - /// - cef_string_t javascript_flags; - - /// - // The fully qualified path for the resources directory. If this value is - // empty the cef.pak and/or devtools_resources.pak files must be located in - // the module directory on Windows/Linux or the app bundle Resources directory - // on Mac OS X. Also configurable using the "resources-dir-path" command-line - // switch. - /// - cef_string_t resources_dir_path; - - /// - // The fully qualified path for the locales directory. If this value is empty - // the locales directory must be located in the module directory. This value - // is ignored on Mac OS X where pack files are always loaded from the app - // bundle Resources directory. Also configurable using the "locales-dir-path" - // command-line switch. - /// - cef_string_t locales_dir_path; - - /// - // Set to true (1) to disable loading of pack files for resources and locales. - // A resource bundle handler must be provided for the browser and render - // processes via CefApp::GetResourceBundleHandler() if loading of pack files - // is disabled. Also configurable using the "disable-pack-loading" command- - // line switch. - /// - int pack_loading_disabled; - - /// - // Set to a value between 1024 and 65535 to enable remote debugging on the - // specified port. For example, if 8080 is specified the remote debugging URL - // will be http://localhost:8080. CEF can be remotely debugged from any CEF or - // Chrome browser window. Also configurable using the "remote-debugging-port" - // command-line switch. - /// - int remote_debugging_port; - - /// - // The number of stack trace frames to capture for uncaught exceptions. - // Specify a positive value to enable the CefRenderProcessHandler:: - // OnUncaughtException() callback. Specify 0 (default value) and - // OnUncaughtException() will not be called. Also configurable using the - // "uncaught-exception-stack-size" command-line switch. - /// - int uncaught_exception_stack_size; - - /// - // By default CEF V8 references will be invalidated (the IsValid() method will - // return false) after the owning context has been released. This reduces the - // need for external record keeping and avoids crashes due to the use of V8 - // references after the associated context has been released. - // - // CEF currently offers two context safety implementations with different - // performance characteristics. The default implementation (value of 0) uses a - // map of hash values and should provide better performance in situations with - // a small number contexts. The alternate implementation (value of 1) uses a - // hidden value attached to each context and should provide better performance - // in situations with a large number of contexts. - // - // If you need better performance in the creation of V8 references and you - // plan to manually track context lifespan you can disable context safety by - // specifying a value of -1. - // - // Also configurable using the "context-safety-implementation" command-line - // switch. - /// - int context_safety_implementation; - - /// - // Set to true (1) to ignore errors related to invalid SSL certificates. - // Enabling this setting can lead to potential security vulnerabilities like - // "man in the middle" attacks. Applications that load content from the - // internet should not enable this setting. Also configurable using the - // "ignore-certificate-errors" command-line switch. Can be overridden for - // individual CefRequestContext instances via the - // CefRequestContextSettings.ignore_certificate_errors value. - /// - int ignore_certificate_errors; - - /// - // Opaque background color used for accelerated content. By default the - // background color will be white. Only the RGB compontents of the specified - // value will be used. The alpha component must greater than 0 to enable use - // of the background color but will be otherwise ignored. - /// - cef_color_t background_color; - - /// - // Comma delimited ordered list of language codes without any whitespace that - // will be used in the "Accept-Language" HTTP header. May be overridden on a - // per-browser basis using the CefBrowserSettings.accept_language_list value. - // If both values are empty then "en-US,en" will be used. Can be overridden - // for individual CefRequestContext instances via the - // CefRequestContextSettings.accept_language_list value. - /// - cef_string_t accept_language_list; -} cef_settings_t; - -/// -// Request context initialization settings. Specify NULL or 0 to get the -// recommended default values. -/// -typedef struct _cef_request_context_settings_t { - /// - // Size of this structure. - /// - size_t size; - - /// - // The location where cache data will be stored on disk. If empty then - // browsers will be created in "incognito mode" where in-memory caches are - // used for storage and no data is persisted to disk. HTML5 databases such as - // localStorage will only persist across sessions if a cache path is - // specified. To share the global browser cache and related configuration set - // this value to match the CefSettings.cache_path value. - /// - cef_string_t cache_path; - - /// - // To persist session cookies (cookies without an expiry date or validity - // interval) by default when using the global cookie manager set this value to - // true (1). Session cookies are generally intended to be transient and most - // Web browsers do not persist them. Can be set globally using the - // CefSettings.persist_session_cookies value. This value will be ignored if - // |cache_path| is empty or if it matches the CefSettings.cache_path value. - /// - int persist_session_cookies; - - /// - // To persist user preferences as a JSON file in the cache path directory set - // this value to true (1). Can be set globally using the - // CefSettings.persist_user_preferences value. This value will be ignored if - // |cache_path| is empty or if it matches the CefSettings.cache_path value. - /// - int persist_user_preferences; - - /// - // Set to true (1) to ignore errors related to invalid SSL certificates. - // Enabling this setting can lead to potential security vulnerabilities like - // "man in the middle" attacks. Applications that load content from the - // internet should not enable this setting. Can be set globally using the - // CefSettings.ignore_certificate_errors value. This value will be ignored if - // |cache_path| matches the CefSettings.cache_path value. - /// - int ignore_certificate_errors; - - /// - // Comma delimited ordered list of language codes without any whitespace that - // will be used in the "Accept-Language" HTTP header. Can be set globally - // using the CefSettings.accept_language_list value or overridden on a per- - // browser basis using the CefBrowserSettings.accept_language_list value. If - // all values are empty then "en-US,en" will be used. This value will be - // ignored if |cache_path| matches the CefSettings.cache_path value. - /// - cef_string_t accept_language_list; -} cef_request_context_settings_t; - -/// -// Browser initialization settings. Specify NULL or 0 to get the recommended -// default values. The consequences of using custom values may not be well -// tested. Many of these and other settings can also configured using command- -// line switches. -/// -typedef struct _cef_browser_settings_t { - /// - // Size of this structure. - /// - size_t size; - - /// - // The maximum rate in frames per second (fps) that CefRenderHandler::OnPaint - // will be called for a windowless browser. The actual fps may be lower if - // the browser cannot generate frames at the requested rate. The minimum - // value is 1 and the maximum value is 60 (default 30). This value can also be - // changed dynamically via CefBrowserHost::SetWindowlessFrameRate. - /// - int windowless_frame_rate; - - // The below values map to WebPreferences settings. - - /// - // Font settings. - /// - cef_string_t standard_font_family; - cef_string_t fixed_font_family; - cef_string_t serif_font_family; - cef_string_t sans_serif_font_family; - cef_string_t cursive_font_family; - cef_string_t fantasy_font_family; - int default_font_size; - int default_fixed_font_size; - int minimum_font_size; - int minimum_logical_font_size; - - /// - // Default encoding for Web content. If empty "ISO-8859-1" will be used. Also - // configurable using the "default-encoding" command-line switch. - /// - cef_string_t default_encoding; - - /// - // Controls the loading of fonts from remote sources. Also configurable using - // the "disable-remote-fonts" command-line switch. - /// - cef_state_t remote_fonts; - - /// - // Controls whether JavaScript can be executed. Also configurable using the - // "disable-javascript" command-line switch. - /// - cef_state_t javascript; - - /// - // Controls whether JavaScript can be used for opening windows. Also - // configurable using the "disable-javascript-open-windows" command-line - // switch. - /// - cef_state_t javascript_open_windows; - - /// - // Controls whether JavaScript can be used to close windows that were not - // opened via JavaScript. JavaScript can still be used to close windows that - // were opened via JavaScript or that have no back/forward history. Also - // configurable using the "disable-javascript-close-windows" command-line - // switch. - /// - cef_state_t javascript_close_windows; - - /// - // Controls whether JavaScript can access the clipboard. Also configurable - // using the "disable-javascript-access-clipboard" command-line switch. - /// - cef_state_t javascript_access_clipboard; - - /// - // Controls whether DOM pasting is supported in the editor via - // execCommand("paste"). The |javascript_access_clipboard| setting must also - // be enabled. Also configurable using the "disable-javascript-dom-paste" - // command-line switch. - /// - cef_state_t javascript_dom_paste; - - /// - // Controls whether the caret position will be drawn. Also configurable using - // the "enable-caret-browsing" command-line switch. - /// - cef_state_t caret_browsing; - - /// - // Controls whether any plugins will be loaded. Also configurable using the - // "disable-plugins" command-line switch. - /// - cef_state_t plugins; - - /// - // Controls whether file URLs will have access to all URLs. Also configurable - // using the "allow-universal-access-from-files" command-line switch. - /// - cef_state_t universal_access_from_file_urls; - - /// - // Controls whether file URLs will have access to other file URLs. Also - // configurable using the "allow-access-from-files" command-line switch. - /// - cef_state_t file_access_from_file_urls; - - /// - // Controls whether web security restrictions (same-origin policy) will be - // enforced. Disabling this setting is not recommend as it will allow risky - // security behavior such as cross-site scripting (XSS). Also configurable - // using the "disable-web-security" command-line switch. - /// - cef_state_t web_security; - - /// - // Controls whether image URLs will be loaded from the network. A cached image - // will still be rendered if requested. Also configurable using the - // "disable-image-loading" command-line switch. - /// - cef_state_t image_loading; - - /// - // Controls whether standalone images will be shrunk to fit the page. Also - // configurable using the "image-shrink-standalone-to-fit" command-line - // switch. - /// - cef_state_t image_shrink_standalone_to_fit; - - /// - // Controls whether text areas can be resized. Also configurable using the - // "disable-text-area-resize" command-line switch. - /// - cef_state_t text_area_resize; - - /// - // Controls whether the tab key can advance focus to links. Also configurable - // using the "disable-tab-to-links" command-line switch. - /// - cef_state_t tab_to_links; - - /// - // Controls whether local storage can be used. Also configurable using the - // "disable-local-storage" command-line switch. - /// - cef_state_t local_storage; - - /// - // Controls whether databases can be used. Also configurable using the - // "disable-databases" command-line switch. - /// - cef_state_t databases; - - /// - // Controls whether the application cache can be used. Also configurable using - // the "disable-application-cache" command-line switch. - /// - cef_state_t application_cache; - - /// - // Controls whether WebGL can be used. Note that WebGL requires hardware - // support and may not work on all systems even when enabled. Also - // configurable using the "disable-webgl" command-line switch. - /// - cef_state_t webgl; - - /// - // Opaque background color used for the browser before a document is loaded - // and when no document color is specified. By default the background color - // will be the same as CefSettings.background_color. Only the RGB compontents - // of the specified value will be used. The alpha component must greater than - // 0 to enable use of the background color but will be otherwise ignored. - /// - cef_color_t background_color; - - /// - // Comma delimited ordered list of language codes without any whitespace that - // will be used in the "Accept-Language" HTTP header. May be set globally - // using the CefBrowserSettings.accept_language_list value. If both values are - // empty then "en-US,en" will be used. - /// - cef_string_t accept_language_list; -} cef_browser_settings_t; - -/// -// Return value types. -/// -typedef enum { - /// - // Cancel immediately. - /// - RV_CANCEL = 0, - - /// - // Continue immediately. - /// - RV_CONTINUE, - - /// - // Continue asynchronously (usually via a callback). - /// - RV_CONTINUE_ASYNC, -} cef_return_value_t; - -/// -// URL component parts. -/// -typedef struct _cef_urlparts_t { - /// - // The complete URL specification. - /// - cef_string_t spec; - - /// - // Scheme component not including the colon (e.g., "http"). - /// - cef_string_t scheme; - - /// - // User name component. - /// - cef_string_t username; - - /// - // Password component. - /// - cef_string_t password; - - /// - // Host component. This may be a hostname, an IPv4 address or an IPv6 literal - // surrounded by square brackets (e.g., "[2001:db8::1]"). - /// - cef_string_t host; - - /// - // Port number component. - /// - cef_string_t port; - - /// - // Origin contains just the scheme, host, and port from a URL. Equivalent to - // clearing any username and password, replacing the path with a slash, and - // clearing everything after that. This value will be empty for non-standard - // URLs. - /// - cef_string_t origin; - - /// - // Path component including the first slash following the host. - /// - cef_string_t path; - - /// - // Query string component (i.e., everything following the '?'). - /// - cef_string_t query; -} cef_urlparts_t; - -/// -// Cookie information. -/// -typedef struct _cef_cookie_t { - /// - // The cookie name. - /// - cef_string_t name; - - /// - // The cookie value. - /// - cef_string_t value; - - /// - // If |domain| is empty a host cookie will be created instead of a domain - // cookie. Domain cookies are stored with a leading "." and are visible to - // sub-domains whereas host cookies are not. - /// - cef_string_t domain; - - /// - // If |path| is non-empty only URLs at or below the path will get the cookie - // value. - /// - cef_string_t path; - - /// - // If |secure| is true the cookie will only be sent for HTTPS requests. - /// - int secure; - - /// - // If |httponly| is true the cookie will only be sent for HTTP requests. - /// - int httponly; - - /// - // The cookie creation date. This is automatically populated by the system on - // cookie creation. - /// - cef_time_t creation; - - /// - // The cookie last access date. This is automatically populated by the system - // on access. - /// - cef_time_t last_access; - - /// - // The cookie expiration date is only valid if |has_expires| is true. - /// - int has_expires; - cef_time_t expires; -} cef_cookie_t; - -/// -// Process termination status values. -/// -typedef enum { - /// - // Non-zero exit status. - /// - TS_ABNORMAL_TERMINATION, - - /// - // SIGKILL or task manager kill. - /// - TS_PROCESS_WAS_KILLED, - - /// - // Segmentation fault. - /// - TS_PROCESS_CRASHED, -} cef_termination_status_t; - -/// -// Path key values. -/// -typedef enum { - /// - // Current directory. - /// - PK_DIR_CURRENT, - - /// - // Directory containing PK_FILE_EXE. - /// - PK_DIR_EXE, - - /// - // Directory containing PK_FILE_MODULE. - /// - PK_DIR_MODULE, - - /// - // Temporary directory. - /// - PK_DIR_TEMP, - - /// - // Path and filename of the current executable. - /// - PK_FILE_EXE, - - /// - // Path and filename of the module containing the CEF code (usually the libcef - // module). - /// - PK_FILE_MODULE, - - /// - // "Local Settings\Application Data" directory under the user profile - // directory on Windows. - /// - PK_LOCAL_APP_DATA, - - /// - // "Application Data" directory under the user profile directory on Windows - // and "~/Library/Application Support" directory on Mac OS X. - /// - PK_USER_DATA, -} cef_path_key_t; - -/// -// Storage types. -/// -typedef enum { - ST_LOCALSTORAGE = 0, - ST_SESSIONSTORAGE, -} cef_storage_type_t; - -/// -// Supported error code values. See net\base\net_error_list.h for complete -// descriptions of the error codes. -/// -typedef enum { - ERR_NONE = 0, - ERR_FAILED = -2, - ERR_ABORTED = -3, - ERR_INVALID_ARGUMENT = -4, - ERR_INVALID_HANDLE = -5, - ERR_FILE_NOT_FOUND = -6, - ERR_TIMED_OUT = -7, - ERR_FILE_TOO_BIG = -8, - ERR_UNEXPECTED = -9, - ERR_ACCESS_DENIED = -10, - ERR_NOT_IMPLEMENTED = -11, - ERR_CONNECTION_CLOSED = -100, - ERR_CONNECTION_RESET = -101, - ERR_CONNECTION_REFUSED = -102, - ERR_CONNECTION_ABORTED = -103, - ERR_CONNECTION_FAILED = -104, - ERR_NAME_NOT_RESOLVED = -105, - ERR_INTERNET_DISCONNECTED = -106, - ERR_SSL_PROTOCOL_ERROR = -107, - ERR_ADDRESS_INVALID = -108, - ERR_ADDRESS_UNREACHABLE = -109, - ERR_SSL_CLIENT_AUTH_CERT_NEEDED = -110, - ERR_TUNNEL_CONNECTION_FAILED = -111, - ERR_NO_SSL_VERSIONS_ENABLED = -112, - ERR_SSL_VERSION_OR_CIPHER_MISMATCH = -113, - ERR_SSL_RENEGOTIATION_REQUESTED = -114, - ERR_CERT_COMMON_NAME_INVALID = -200, - ERR_CERT_BEGIN = ERR_CERT_COMMON_NAME_INVALID, - ERR_CERT_DATE_INVALID = -201, - ERR_CERT_AUTHORITY_INVALID = -202, - ERR_CERT_CONTAINS_ERRORS = -203, - ERR_CERT_NO_REVOCATION_MECHANISM = -204, - ERR_CERT_UNABLE_TO_CHECK_REVOCATION = -205, - ERR_CERT_REVOKED = -206, - ERR_CERT_INVALID = -207, - ERR_CERT_WEAK_SIGNATURE_ALGORITHM = -208, - // -209 is available: was ERR_CERT_NOT_IN_DNS. - ERR_CERT_NON_UNIQUE_NAME = -210, - ERR_CERT_WEAK_KEY = -211, - ERR_CERT_NAME_CONSTRAINT_VIOLATION = -212, - ERR_CERT_VALIDITY_TOO_LONG = -213, - ERR_CERT_END = ERR_CERT_VALIDITY_TOO_LONG, - ERR_INVALID_URL = -300, - ERR_DISALLOWED_URL_SCHEME = -301, - ERR_UNKNOWN_URL_SCHEME = -302, - ERR_TOO_MANY_REDIRECTS = -310, - ERR_UNSAFE_REDIRECT = -311, - ERR_UNSAFE_PORT = -312, - ERR_INVALID_RESPONSE = -320, - ERR_INVALID_CHUNKED_ENCODING = -321, - ERR_METHOD_NOT_SUPPORTED = -322, - ERR_UNEXPECTED_PROXY_AUTH = -323, - ERR_EMPTY_RESPONSE = -324, - ERR_RESPONSE_HEADERS_TOO_BIG = -325, - ERR_CACHE_MISS = -400, - ERR_INSECURE_RESPONSE = -501, -} cef_errorcode_t; - -/// -// Supported certificate status code values. See net\cert\cert_status_flags.h -// for more information. CERT_STATUS_NONE is new in CEF because we use an -// enum while cert_status_flags.h uses a typedef and static const variables. -/// -typedef enum { - CERT_STATUS_NONE = 0, - CERT_STATUS_COMMON_NAME_INVALID = 1 << 0, - CERT_STATUS_DATE_INVALID = 1 << 1, - CERT_STATUS_AUTHORITY_INVALID = 1 << 2, - // 1 << 3 is reserved for ERR_CERT_CONTAINS_ERRORS (not useful with WinHTTP). - CERT_STATUS_NO_REVOCATION_MECHANISM = 1 << 4, - CERT_STATUS_UNABLE_TO_CHECK_REVOCATION = 1 << 5, - CERT_STATUS_REVOKED = 1 << 6, - CERT_STATUS_INVALID = 1 << 7, - CERT_STATUS_WEAK_SIGNATURE_ALGORITHM = 1 << 8, - // 1 << 9 was used for CERT_STATUS_NOT_IN_DNS - CERT_STATUS_NON_UNIQUE_NAME = 1 << 10, - CERT_STATUS_WEAK_KEY = 1 << 11, - // 1 << 12 was used for CERT_STATUS_WEAK_DH_KEY - CERT_STATUS_PINNED_KEY_MISSING = 1 << 13, - CERT_STATUS_NAME_CONSTRAINT_VIOLATION = 1 << 14, - CERT_STATUS_VALIDITY_TOO_LONG = 1 << 15, - - // Bits 16 to 31 are for non-error statuses. - CERT_STATUS_IS_EV = 1 << 16, - CERT_STATUS_REV_CHECKING_ENABLED = 1 << 17, - // Bit 18 was CERT_STATUS_IS_DNSSEC - CERT_STATUS_SHA1_SIGNATURE_PRESENT = 1 << 19, - CERT_STATUS_CT_COMPLIANCE_FAILED = 1 << 20, -} cef_cert_status_t; - -/// -// The manner in which a link click should be opened. -/// -typedef enum { - WOD_UNKNOWN, - WOD_SUPPRESS_OPEN, - WOD_CURRENT_TAB, - WOD_SINGLETON_TAB, - WOD_NEW_FOREGROUND_TAB, - WOD_NEW_BACKGROUND_TAB, - WOD_NEW_POPUP, - WOD_NEW_WINDOW, - WOD_SAVE_TO_DISK, - WOD_OFF_THE_RECORD, - WOD_IGNORE_ACTION -} cef_window_open_disposition_t; - -/// -// "Verb" of a drag-and-drop operation as negotiated between the source and -// destination. These constants match their equivalents in WebCore's -// DragActions.h and should not be renumbered. -/// -typedef enum { - DRAG_OPERATION_NONE = 0, - DRAG_OPERATION_COPY = 1, - DRAG_OPERATION_LINK = 2, - DRAG_OPERATION_GENERIC = 4, - DRAG_OPERATION_PRIVATE = 8, - DRAG_OPERATION_MOVE = 16, - DRAG_OPERATION_DELETE = 32, - DRAG_OPERATION_EVERY = UINT_MAX -} cef_drag_operations_mask_t; - -/// -// V8 access control values. -/// -typedef enum { - V8_ACCESS_CONTROL_DEFAULT = 0, - V8_ACCESS_CONTROL_ALL_CAN_READ = 1, - V8_ACCESS_CONTROL_ALL_CAN_WRITE = 1 << 1, - V8_ACCESS_CONTROL_PROHIBITS_OVERWRITING = 1 << 2 -} cef_v8_accesscontrol_t; - -/// -// V8 property attribute values. -/// -typedef enum { - V8_PROPERTY_ATTRIBUTE_NONE = 0, // Writeable, Enumerable, - // Configurable - V8_PROPERTY_ATTRIBUTE_READONLY = 1 << 0, // Not writeable - V8_PROPERTY_ATTRIBUTE_DONTENUM = 1 << 1, // Not enumerable - V8_PROPERTY_ATTRIBUTE_DONTDELETE = 1 << 2 // Not configurable -} cef_v8_propertyattribute_t; - -/// -// Post data elements may represent either bytes or files. -/// -typedef enum { - PDE_TYPE_EMPTY = 0, - PDE_TYPE_BYTES, - PDE_TYPE_FILE, -} cef_postdataelement_type_t; - -/// -// Resource type for a request. -/// -typedef enum { - /// - // Top level page. - /// - RT_MAIN_FRAME = 0, - - /// - // Frame or iframe. - /// - RT_SUB_FRAME, - - /// - // CSS stylesheet. - /// - RT_STYLESHEET, - - /// - // External script. - /// - RT_SCRIPT, - - /// - // Image (jpg/gif/png/etc). - /// - RT_IMAGE, - - /// - // Font. - /// - RT_FONT_RESOURCE, - - /// - // Some other subresource. This is the default type if the actual type is - // unknown. - /// - RT_SUB_RESOURCE, - - /// - // Object (or embed) tag for a plugin, or a resource that a plugin requested. - /// - RT_OBJECT, - - /// - // Media resource. - /// - RT_MEDIA, - - /// - // Main resource of a dedicated worker. - /// - RT_WORKER, - - /// - // Main resource of a shared worker. - /// - RT_SHARED_WORKER, - - /// - // Explicitly requested prefetch. - /// - RT_PREFETCH, - - /// - // Favicon. - /// - RT_FAVICON, - - /// - // XMLHttpRequest. - /// - RT_XHR, - - /// - // A request for a - /// - RT_PING, - - /// - // Main resource of a service worker. - /// - RT_SERVICE_WORKER, - - /// - // A report of Content Security Policy violations. - /// - RT_CSP_REPORT, - - /// - // A resource that a plugin requested. - /// - RT_PLUGIN_RESOURCE, -} cef_resource_type_t; - -/// -// Transition type for a request. Made up of one source value and 0 or more -// qualifiers. -/// -typedef enum { - /// - // Source is a link click or the JavaScript window.open function. This is - // also the default value for requests like sub-resource loads that are not - // navigations. - /// - TT_LINK = 0, - - /// - // Source is some other "explicit" navigation action such as creating a new - // browser or using the LoadURL function. This is also the default value - // for navigations where the actual type is unknown. - /// - TT_EXPLICIT = 1, - - /// - // Source is a subframe navigation. This is any content that is automatically - // loaded in a non-toplevel frame. For example, if a page consists of several - // frames containing ads, those ad URLs will have this transition type. - // The user may not even realize the content in these pages is a separate - // frame, so may not care about the URL. - /// - TT_AUTO_SUBFRAME = 3, - - /// - // Source is a subframe navigation explicitly requested by the user that will - // generate new navigation entries in the back/forward list. These are - // probably more important than frames that were automatically loaded in - // the background because the user probably cares about the fact that this - // link was loaded. - /// - TT_MANUAL_SUBFRAME = 4, - - /// - // Source is a form submission by the user. NOTE: In some situations - // submitting a form does not result in this transition type. This can happen - // if the form uses a script to submit the contents. - /// - TT_FORM_SUBMIT = 7, - - /// - // Source is a "reload" of the page via the Reload function or by re-visiting - // the same URL. NOTE: This is distinct from the concept of whether a - // particular load uses "reload semantics" (i.e. bypasses cached data). - /// - TT_RELOAD = 8, - - /// - // General mask defining the bits used for the source values. - /// - TT_SOURCE_MASK = 0xFF, - - // Qualifiers. - // Any of the core values above can be augmented by one or more qualifiers. - // These qualifiers further define the transition. - - /// - // Attempted to visit a URL but was blocked. - /// - TT_BLOCKED_FLAG = 0x00800000, - - /// - // Used the Forward or Back function to navigate among browsing history. - /// - TT_FORWARD_BACK_FLAG = 0x01000000, - - /// - // The beginning of a navigation chain. - /// - TT_CHAIN_START_FLAG = 0x10000000, - - /// - // The last transition in a redirect chain. - /// - TT_CHAIN_END_FLAG = 0x20000000, - - /// - // Redirects caused by JavaScript or a meta refresh tag on the page. - /// - TT_CLIENT_REDIRECT_FLAG = 0x40000000, - - /// - // Redirects sent from the server by HTTP headers. - /// - TT_SERVER_REDIRECT_FLAG = 0x80000000, - - /// - // Used to test whether a transition involves a redirect. - /// - TT_IS_REDIRECT_MASK = 0xC0000000, - - /// - // General mask defining the bits used for the qualifiers. - /// - TT_QUALIFIER_MASK = 0xFFFFFF00, -} cef_transition_type_t; - -/// -// Flags used to customize the behavior of CefURLRequest. -/// -typedef enum { - /// - // Default behavior. - /// - UR_FLAG_NONE = 0, - - /// - // If set the cache will be skipped when handling the request. - /// - UR_FLAG_SKIP_CACHE = 1 << 0, - - /// - // If set user name, password, and cookies may be sent with the request, and - // cookies may be saved from the response. - /// - UR_FLAG_ALLOW_CACHED_CREDENTIALS = 1 << 1, - - /// - // If set upload progress events will be generated when a request has a body. - /// - UR_FLAG_REPORT_UPLOAD_PROGRESS = 1 << 3, - - /// - // If set the CefURLRequestClient::OnDownloadData method will not be called. - /// - UR_FLAG_NO_DOWNLOAD_DATA = 1 << 6, - - /// - // If set 5XX redirect errors will be propagated to the observer instead of - // automatically re-tried. This currently only applies for requests - // originated in the browser process. - /// - UR_FLAG_NO_RETRY_ON_5XX = 1 << 7, -} cef_urlrequest_flags_t; - -/// -// Flags that represent CefURLRequest status. -/// -typedef enum { - /// - // Unknown status. - /// - UR_UNKNOWN = 0, - - /// - // Request succeeded. - /// - UR_SUCCESS, - - /// - // An IO request is pending, and the caller will be informed when it is - // completed. - /// - UR_IO_PENDING, - - /// - // Request was canceled programatically. - /// - UR_CANCELED, - - /// - // Request failed for some reason. - /// - UR_FAILED, -} cef_urlrequest_status_t; - -/// -// Structure representing a point. -/// -typedef struct _cef_point_t { - int x; - int y; -} cef_point_t; - -/// -// Structure representing a rectangle. -/// -typedef struct _cef_rect_t { - int x; - int y; - int width; - int height; -} cef_rect_t; - -/// -// Structure representing a size. -/// -typedef struct _cef_size_t { - int width; - int height; -} cef_size_t; - -/// -// Structure representing a draggable region. -/// -typedef struct _cef_draggable_region_t { - /// - // Bounds of the region. - /// - cef_rect_t bounds; - - /// - // True (1) this this region is draggable and false (0) otherwise. - /// - int draggable; -} cef_draggable_region_t; - -/// -// Existing process IDs. -/// -typedef enum { - /// - // Browser process. - /// - PID_BROWSER, - /// - // Renderer process. - /// - PID_RENDERER, -} cef_process_id_t; - -/// -// Existing thread IDs. -/// -typedef enum { -// BROWSER PROCESS THREADS -- Only available in the browser process. - - /// - // The main thread in the browser. This will be the same as the main - // application thread if CefInitialize() is called with a - // CefSettings.multi_threaded_message_loop value of false. - /// - TID_UI, - - /// - // Used to interact with the database. - /// - TID_DB, - - /// - // Used to interact with the file system. - /// - TID_FILE, - - /// - // Used for file system operations that block user interactions. - // Responsiveness of this thread affects users. - /// - TID_FILE_USER_BLOCKING, - - /// - // Used to launch and terminate browser processes. - /// - TID_PROCESS_LAUNCHER, - - /// - // Used to handle slow HTTP cache operations. - /// - TID_CACHE, - - /// - // Used to process IPC and network messages. - /// - TID_IO, - -// RENDER PROCESS THREADS -- Only available in the render process. - - /// - // The main thread in the renderer. Used for all WebKit and V8 interaction. - /// - TID_RENDERER, -} cef_thread_id_t; - -/// -// Supported value types. -/// -typedef enum { - VTYPE_INVALID = 0, - VTYPE_NULL, - VTYPE_BOOL, - VTYPE_INT, - VTYPE_DOUBLE, - VTYPE_STRING, - VTYPE_BINARY, - VTYPE_DICTIONARY, - VTYPE_LIST, -} cef_value_type_t; - -/// -// Supported JavaScript dialog types. -/// -typedef enum { - JSDIALOGTYPE_ALERT = 0, - JSDIALOGTYPE_CONFIRM, - JSDIALOGTYPE_PROMPT, -} cef_jsdialog_type_t; - -/// -// Screen information used when window rendering is disabled. This structure is -// passed as a parameter to CefRenderHandler::GetScreenInfo and should be filled -// in by the client. -/// -typedef struct _cef_screen_info_t { - /// - // Device scale factor. Specifies the ratio between physical and logical - // pixels. - /// - float device_scale_factor; - - /// - // The screen depth in bits per pixel. - /// - int depth; - - /// - // The bits per color component. This assumes that the colors are balanced - // equally. - /// - int depth_per_component; - - /// - // This can be true for black and white printers. - /// - int is_monochrome; - - /// - // This is set from the rcMonitor member of MONITORINFOEX, to whit: - // "A RECT structure that specifies the display monitor rectangle, - // expressed in virtual-screen coordinates. Note that if the monitor - // is not the primary display monitor, some of the rectangle's - // coordinates may be negative values." - // - // The |rect| and |available_rect| properties are used to determine the - // available surface for rendering popup views. - /// - cef_rect_t rect; - - /// - // This is set from the rcWork member of MONITORINFOEX, to whit: - // "A RECT structure that specifies the work area rectangle of the - // display monitor that can be used by applications, expressed in - // virtual-screen coordinates. Windows uses this rectangle to - // maximize an application on the monitor. The rest of the area in - // rcMonitor contains system windows such as the task bar and side - // bars. Note that if the monitor is not the primary display monitor, - // some of the rectangle's coordinates may be negative values". - // - // The |rect| and |available_rect| properties are used to determine the - // available surface for rendering popup views. - /// - cef_rect_t available_rect; -} cef_screen_info_t; - -/// -// Supported menu IDs. Non-English translations can be provided for the -// IDS_MENU_* strings in CefResourceBundleHandler::GetLocalizedString(). -/// -typedef enum { - // Navigation. - MENU_ID_BACK = 100, - MENU_ID_FORWARD = 101, - MENU_ID_RELOAD = 102, - MENU_ID_RELOAD_NOCACHE = 103, - MENU_ID_STOPLOAD = 104, - - // Editing. - MENU_ID_UNDO = 110, - MENU_ID_REDO = 111, - MENU_ID_CUT = 112, - MENU_ID_COPY = 113, - MENU_ID_PASTE = 114, - MENU_ID_DELETE = 115, - MENU_ID_SELECT_ALL = 116, - - // Miscellaneous. - MENU_ID_FIND = 130, - MENU_ID_PRINT = 131, - MENU_ID_VIEW_SOURCE = 132, - - // Spell checking word correction suggestions. - MENU_ID_SPELLCHECK_SUGGESTION_0 = 200, - MENU_ID_SPELLCHECK_SUGGESTION_1 = 201, - MENU_ID_SPELLCHECK_SUGGESTION_2 = 202, - MENU_ID_SPELLCHECK_SUGGESTION_3 = 203, - MENU_ID_SPELLCHECK_SUGGESTION_4 = 204, - MENU_ID_SPELLCHECK_SUGGESTION_LAST = 204, - MENU_ID_NO_SPELLING_SUGGESTIONS = 205, - MENU_ID_ADD_TO_DICTIONARY = 206, - - // Custom menu items originating from the renderer process. For example, - // plugin placeholder menu items or Flash menu items. - MENU_ID_CUSTOM_FIRST = 220, - MENU_ID_CUSTOM_LAST = 250, - - // All user-defined menu IDs should come between MENU_ID_USER_FIRST and - // MENU_ID_USER_LAST to avoid overlapping the Chromium and CEF ID ranges - // defined in the tools/gritsettings/resource_ids file. - MENU_ID_USER_FIRST = 26500, - MENU_ID_USER_LAST = 28500, -} cef_menu_id_t; - -/// -// Mouse button types. -/// -typedef enum { - MBT_LEFT = 0, - MBT_MIDDLE, - MBT_RIGHT, -} cef_mouse_button_type_t; - -/// -// Structure representing mouse event information. -/// -typedef struct _cef_mouse_event_t { - /// - // X coordinate relative to the left side of the view. - /// - int x; - - /// - // Y coordinate relative to the top side of the view. - /// - int y; - - /// - // Bit flags describing any pressed modifier keys. See - // cef_event_flags_t for values. - /// - uint32 modifiers; -} cef_mouse_event_t; - -/// -// Paint element types. -/// -typedef enum { - PET_VIEW = 0, - PET_POPUP, -} cef_paint_element_type_t; - -/// -// Supported event bit flags. -/// -typedef enum { - EVENTFLAG_NONE = 0, - EVENTFLAG_CAPS_LOCK_ON = 1 << 0, - EVENTFLAG_SHIFT_DOWN = 1 << 1, - EVENTFLAG_CONTROL_DOWN = 1 << 2, - EVENTFLAG_ALT_DOWN = 1 << 3, - EVENTFLAG_LEFT_MOUSE_BUTTON = 1 << 4, - EVENTFLAG_MIDDLE_MOUSE_BUTTON = 1 << 5, - EVENTFLAG_RIGHT_MOUSE_BUTTON = 1 << 6, - // Mac OS-X command key. - EVENTFLAG_COMMAND_DOWN = 1 << 7, - EVENTFLAG_NUM_LOCK_ON = 1 << 8, - EVENTFLAG_IS_KEY_PAD = 1 << 9, - EVENTFLAG_IS_LEFT = 1 << 10, - EVENTFLAG_IS_RIGHT = 1 << 11, -} cef_event_flags_t; - -/// -// Supported menu item types. -/// -typedef enum { - MENUITEMTYPE_NONE, - MENUITEMTYPE_COMMAND, - MENUITEMTYPE_CHECK, - MENUITEMTYPE_RADIO, - MENUITEMTYPE_SEPARATOR, - MENUITEMTYPE_SUBMENU, -} cef_menu_item_type_t; - -/// -// Supported context menu type flags. -/// -typedef enum { - /// - // No node is selected. - /// - CM_TYPEFLAG_NONE = 0, - /// - // The top page is selected. - /// - CM_TYPEFLAG_PAGE = 1 << 0, - /// - // A subframe page is selected. - /// - CM_TYPEFLAG_FRAME = 1 << 1, - /// - // A link is selected. - /// - CM_TYPEFLAG_LINK = 1 << 2, - /// - // A media node is selected. - /// - CM_TYPEFLAG_MEDIA = 1 << 3, - /// - // There is a textual or mixed selection that is selected. - /// - CM_TYPEFLAG_SELECTION = 1 << 4, - /// - // An editable element is selected. - /// - CM_TYPEFLAG_EDITABLE = 1 << 5, -} cef_context_menu_type_flags_t; - -/// -// Supported context menu media types. -/// -typedef enum { - /// - // No special node is in context. - /// - CM_MEDIATYPE_NONE, - /// - // An image node is selected. - /// - CM_MEDIATYPE_IMAGE, - /// - // A video node is selected. - /// - CM_MEDIATYPE_VIDEO, - /// - // An audio node is selected. - /// - CM_MEDIATYPE_AUDIO, - /// - // A file node is selected. - /// - CM_MEDIATYPE_FILE, - /// - // A plugin node is selected. - /// - CM_MEDIATYPE_PLUGIN, -} cef_context_menu_media_type_t; - -/// -// Supported context menu media state bit flags. -/// -typedef enum { - CM_MEDIAFLAG_NONE = 0, - CM_MEDIAFLAG_ERROR = 1 << 0, - CM_MEDIAFLAG_PAUSED = 1 << 1, - CM_MEDIAFLAG_MUTED = 1 << 2, - CM_MEDIAFLAG_LOOP = 1 << 3, - CM_MEDIAFLAG_CAN_SAVE = 1 << 4, - CM_MEDIAFLAG_HAS_AUDIO = 1 << 5, - CM_MEDIAFLAG_HAS_VIDEO = 1 << 6, - CM_MEDIAFLAG_CONTROL_ROOT_ELEMENT = 1 << 7, - CM_MEDIAFLAG_CAN_PRINT = 1 << 8, - CM_MEDIAFLAG_CAN_ROTATE = 1 << 9, -} cef_context_menu_media_state_flags_t; - -/// -// Supported context menu edit state bit flags. -/// -typedef enum { - CM_EDITFLAG_NONE = 0, - CM_EDITFLAG_CAN_UNDO = 1 << 0, - CM_EDITFLAG_CAN_REDO = 1 << 1, - CM_EDITFLAG_CAN_CUT = 1 << 2, - CM_EDITFLAG_CAN_COPY = 1 << 3, - CM_EDITFLAG_CAN_PASTE = 1 << 4, - CM_EDITFLAG_CAN_DELETE = 1 << 5, - CM_EDITFLAG_CAN_SELECT_ALL = 1 << 6, - CM_EDITFLAG_CAN_TRANSLATE = 1 << 7, -} cef_context_menu_edit_state_flags_t; - -/// -// Key event types. -/// -typedef enum { - /// - // Notification that a key transitioned from "up" to "down". - /// - KEYEVENT_RAWKEYDOWN = 0, - - /// - // Notification that a key was pressed. This does not necessarily correspond - // to a character depending on the key and language. Use KEYEVENT_CHAR for - // character input. - /// - KEYEVENT_KEYDOWN, - - /// - // Notification that a key was released. - /// - KEYEVENT_KEYUP, - - /// - // Notification that a character was typed. Use this for text input. Key - // down events may generate 0, 1, or more than one character event depending - // on the key, locale, and operating system. - /// - KEYEVENT_CHAR -} cef_key_event_type_t; - -/// -// Structure representing keyboard event information. -/// -typedef struct _cef_key_event_t { - /// - // The type of keyboard event. - /// - cef_key_event_type_t type; - - /// - // Bit flags describing any pressed modifier keys. See - // cef_event_flags_t for values. - /// - uint32 modifiers; - - /// - // The Windows key code for the key event. This value is used by the DOM - // specification. Sometimes it comes directly from the event (i.e. on - // Windows) and sometimes it's determined using a mapping function. See - // WebCore/platform/chromium/KeyboardCodes.h for the list of values. - /// - int windows_key_code; - - /// - // The actual key code genenerated by the platform. - /// - int native_key_code; - - /// - // Indicates whether the event is considered a "system key" event (see - // http://msdn.microsoft.com/en-us/library/ms646286(VS.85).aspx for details). - // This value will always be false on non-Windows platforms. - /// - int is_system_key; - - /// - // The character generated by the keystroke. - /// - char16 character; - - /// - // Same as |character| but unmodified by any concurrently-held modifiers - // (except shift). This is useful for working out shortcut keys. - /// - char16 unmodified_character; - - /// - // True if the focus is currently on an editable field on the page. This is - // useful for determining if standard key events should be intercepted. - /// - int focus_on_editable_field; -} cef_key_event_t; - -/// -// Focus sources. -/// -typedef enum { - /// - // The source is explicit navigation via the API (LoadURL(), etc). - /// - FOCUS_SOURCE_NAVIGATION = 0, - /// - // The source is a system-generated focus event. - /// - FOCUS_SOURCE_SYSTEM, -} cef_focus_source_t; - -/// -// Navigation types. -/// -typedef enum { - NAVIGATION_LINK_CLICKED = 0, - NAVIGATION_FORM_SUBMITTED, - NAVIGATION_BACK_FORWARD, - NAVIGATION_RELOAD, - NAVIGATION_FORM_RESUBMITTED, - NAVIGATION_OTHER, -} cef_navigation_type_t; - -/// -// Supported XML encoding types. The parser supports ASCII, ISO-8859-1, and -// UTF16 (LE and BE) by default. All other types must be translated to UTF8 -// before being passed to the parser. If a BOM is detected and the correct -// decoder is available then that decoder will be used automatically. -/// -typedef enum { - XML_ENCODING_NONE = 0, - XML_ENCODING_UTF8, - XML_ENCODING_UTF16LE, - XML_ENCODING_UTF16BE, - XML_ENCODING_ASCII, -} cef_xml_encoding_type_t; - -/// -// XML node types. -/// -typedef enum { - XML_NODE_UNSUPPORTED = 0, - XML_NODE_PROCESSING_INSTRUCTION, - XML_NODE_DOCUMENT_TYPE, - XML_NODE_ELEMENT_START, - XML_NODE_ELEMENT_END, - XML_NODE_ATTRIBUTE, - XML_NODE_TEXT, - XML_NODE_CDATA, - XML_NODE_ENTITY_REFERENCE, - XML_NODE_WHITESPACE, - XML_NODE_COMMENT, -} cef_xml_node_type_t; - -/// -// Popup window features. -/// -typedef struct _cef_popup_features_t { - int x; - int xSet; - int y; - int ySet; - int width; - int widthSet; - int height; - int heightSet; - - int menuBarVisible; - int statusBarVisible; - int toolBarVisible; - int locationBarVisible; - int scrollbarsVisible; - int resizable; - - int fullscreen; - int dialog; - cef_string_list_t additionalFeatures; -} cef_popup_features_t; - -/// -// DOM document types. -/// -typedef enum { - DOM_DOCUMENT_TYPE_UNKNOWN = 0, - DOM_DOCUMENT_TYPE_HTML, - DOM_DOCUMENT_TYPE_XHTML, - DOM_DOCUMENT_TYPE_PLUGIN, -} cef_dom_document_type_t; - -/// -// DOM event category flags. -/// -typedef enum { - DOM_EVENT_CATEGORY_UNKNOWN = 0x0, - DOM_EVENT_CATEGORY_UI = 0x1, - DOM_EVENT_CATEGORY_MOUSE = 0x2, - DOM_EVENT_CATEGORY_MUTATION = 0x4, - DOM_EVENT_CATEGORY_KEYBOARD = 0x8, - DOM_EVENT_CATEGORY_TEXT = 0x10, - DOM_EVENT_CATEGORY_COMPOSITION = 0x20, - DOM_EVENT_CATEGORY_DRAG = 0x40, - DOM_EVENT_CATEGORY_CLIPBOARD = 0x80, - DOM_EVENT_CATEGORY_MESSAGE = 0x100, - DOM_EVENT_CATEGORY_WHEEL = 0x200, - DOM_EVENT_CATEGORY_BEFORE_TEXT_INSERTED = 0x400, - DOM_EVENT_CATEGORY_OVERFLOW = 0x800, - DOM_EVENT_CATEGORY_PAGE_TRANSITION = 0x1000, - DOM_EVENT_CATEGORY_POPSTATE = 0x2000, - DOM_EVENT_CATEGORY_PROGRESS = 0x4000, - DOM_EVENT_CATEGORY_XMLHTTPREQUEST_PROGRESS = 0x8000, -} cef_dom_event_category_t; - -/// -// DOM event processing phases. -/// -typedef enum { - DOM_EVENT_PHASE_UNKNOWN = 0, - DOM_EVENT_PHASE_CAPTURING, - DOM_EVENT_PHASE_AT_TARGET, - DOM_EVENT_PHASE_BUBBLING, -} cef_dom_event_phase_t; - -/// -// DOM node types. -/// -typedef enum { - DOM_NODE_TYPE_UNSUPPORTED = 0, - DOM_NODE_TYPE_ELEMENT, - DOM_NODE_TYPE_ATTRIBUTE, - DOM_NODE_TYPE_TEXT, - DOM_NODE_TYPE_CDATA_SECTION, - DOM_NODE_TYPE_PROCESSING_INSTRUCTIONS, - DOM_NODE_TYPE_COMMENT, - DOM_NODE_TYPE_DOCUMENT, - DOM_NODE_TYPE_DOCUMENT_TYPE, - DOM_NODE_TYPE_DOCUMENT_FRAGMENT, -} cef_dom_node_type_t; - -/// -// Supported file dialog modes. -/// -typedef enum { - /// - // Requires that the file exists before allowing the user to pick it. - /// - FILE_DIALOG_OPEN = 0, - - /// - // Like Open, but allows picking multiple files to open. - /// - FILE_DIALOG_OPEN_MULTIPLE, - - /// - // Like Open, but selects a folder to open. - /// - FILE_DIALOG_OPEN_FOLDER, - - /// - // Allows picking a nonexistent file, and prompts to overwrite if the file - // already exists. - /// - FILE_DIALOG_SAVE, - - /// - // General mask defining the bits used for the type values. - /// - FILE_DIALOG_TYPE_MASK = 0xFF, - - // Qualifiers. - // Any of the type values above can be augmented by one or more qualifiers. - // These qualifiers further define the dialog behavior. - - /// - // Prompt to overwrite if the user selects an existing file with the Save - // dialog. - /// - FILE_DIALOG_OVERWRITEPROMPT_FLAG = 0x01000000, - - /// - // Do not display read-only files. - /// - FILE_DIALOG_HIDEREADONLY_FLAG = 0x02000000, -} cef_file_dialog_mode_t; - -/// -// Geoposition error codes. -/// -typedef enum { - GEOPOSITON_ERROR_NONE = 0, - GEOPOSITON_ERROR_PERMISSION_DENIED, - GEOPOSITON_ERROR_POSITION_UNAVAILABLE, - GEOPOSITON_ERROR_TIMEOUT, -} cef_geoposition_error_code_t; - -/// -// Structure representing geoposition information. The properties of this -// structure correspond to those of the JavaScript Position object although -// their types may differ. -/// -typedef struct _cef_geoposition_t { - /// - // Latitude in decimal degrees north (WGS84 coordinate frame). - /// - double latitude; - - /// - // Longitude in decimal degrees west (WGS84 coordinate frame). - /// - double longitude; - - /// - // Altitude in meters (above WGS84 datum). - /// - double altitude; - - /// - // Accuracy of horizontal position in meters. - /// - double accuracy; - - /// - // Accuracy of altitude in meters. - /// - double altitude_accuracy; - - /// - // Heading in decimal degrees clockwise from true north. - /// - double heading; - - /// - // Horizontal component of device velocity in meters per second. - /// - double speed; - - /// - // Time of position measurement in milliseconds since Epoch in UTC time. This - // is taken from the host computer's system clock. - /// - cef_time_t timestamp; - - /// - // Error code, see enum above. - /// - cef_geoposition_error_code_t error_code; - - /// - // Human-readable error message. - /// - cef_string_t error_message; -} cef_geoposition_t; - -/// -// Print job color mode values. -/// -typedef enum { - COLOR_MODEL_UNKNOWN, - COLOR_MODEL_GRAY, - COLOR_MODEL_COLOR, - COLOR_MODEL_CMYK, - COLOR_MODEL_CMY, - COLOR_MODEL_KCMY, - COLOR_MODEL_CMY_K, // CMY_K represents CMY+K. - COLOR_MODEL_BLACK, - COLOR_MODEL_GRAYSCALE, - COLOR_MODEL_RGB, - COLOR_MODEL_RGB16, - COLOR_MODEL_RGBA, - COLOR_MODEL_COLORMODE_COLOR, // Used in samsung printer ppds. - COLOR_MODEL_COLORMODE_MONOCHROME, // Used in samsung printer ppds. - COLOR_MODEL_HP_COLOR_COLOR, // Used in HP color printer ppds. - COLOR_MODEL_HP_COLOR_BLACK, // Used in HP color printer ppds. - COLOR_MODEL_PRINTOUTMODE_NORMAL, // Used in foomatic ppds. - COLOR_MODEL_PRINTOUTMODE_NORMAL_GRAY, // Used in foomatic ppds. - COLOR_MODEL_PROCESSCOLORMODEL_CMYK, // Used in canon printer ppds. - COLOR_MODEL_PROCESSCOLORMODEL_GREYSCALE, // Used in canon printer ppds. - COLOR_MODEL_PROCESSCOLORMODEL_RGB, // Used in canon printer ppds -} cef_color_model_t; - -/// -// Print job duplex mode values. -/// -typedef enum { - DUPLEX_MODE_UNKNOWN = -1, - DUPLEX_MODE_SIMPLEX, - DUPLEX_MODE_LONG_EDGE, - 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. -/// -typedef enum { - CT_POINTER = 0, - CT_CROSS, - CT_HAND, - CT_IBEAM, - CT_WAIT, - CT_HELP, - CT_EASTRESIZE, - CT_NORTHRESIZE, - CT_NORTHEASTRESIZE, - CT_NORTHWESTRESIZE, - CT_SOUTHRESIZE, - CT_SOUTHEASTRESIZE, - CT_SOUTHWESTRESIZE, - CT_WESTRESIZE, - CT_NORTHSOUTHRESIZE, - CT_EASTWESTRESIZE, - CT_NORTHEASTSOUTHWESTRESIZE, - CT_NORTHWESTSOUTHEASTRESIZE, - CT_COLUMNRESIZE, - CT_ROWRESIZE, - CT_MIDDLEPANNING, - CT_EASTPANNING, - CT_NORTHPANNING, - CT_NORTHEASTPANNING, - CT_NORTHWESTPANNING, - CT_SOUTHPANNING, - CT_SOUTHEASTPANNING, - CT_SOUTHWESTPANNING, - CT_WESTPANNING, - CT_MOVE, - CT_VERTICALTEXT, - CT_CELL, - CT_CONTEXTMENU, - CT_ALIAS, - CT_PROGRESS, - CT_NODROP, - CT_COPY, - CT_NONE, - CT_NOTALLOWED, - CT_ZOOMIN, - CT_ZOOMOUT, - CT_GRAB, - CT_GRABBING, - CT_CUSTOM, -} cef_cursor_type_t; - -/// -// Structure representing cursor information. |buffer| will be -// |size.width|*|size.height|*4 bytes in size and represents a BGRA image with -// an upper-left origin. -/// -typedef struct _cef_cursor_info_t { - cef_point_t hotspot; - float image_scale_factor; - void* buffer; - cef_size_t size; -} cef_cursor_info_t; - -/// -// URI unescape rules passed to CefURIDecode(). -/// -typedef enum { - /// - // Don't unescape anything at all. - /// - UU_NONE = 0, - - /// - // Don't unescape anything special, but all normal unescaping will happen. - // This is a placeholder and can't be combined with other flags (since it's - // just the absence of them). All other unescape rules imply "normal" in - // addition to their special meaning. Things like escaped letters, digits, - // and most symbols will get unescaped with this mode. - /// - UU_NORMAL = 1, - - /// - // Convert %20 to spaces. In some places where we're showing URLs, we may - // want this. In places where the URL may be copied and pasted out, then - // you wouldn't want this since it might not be interpreted in one piece - // by other applications. - /// - UU_SPACES = 2, - - /// - // Unescapes various characters that will change the meaning of URLs, - // 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 = 4, - - /// - // 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 CONTROL_CHARS if the URL is going to be displayed in the UI - // for security reasons. - /// - UU_CONTROL_CHARS = 8, - - /// - // URL queries use "+" for space. This flag controls that replacement. - /// - UU_REPLACE_PLUS_WITH_SPACE = 16, -} cef_uri_unescape_rule_t; - -/// -// Options that can be passed to CefParseJSON. -/// -typedef enum { - /// - // Parses the input strictly according to RFC 4627. See comments in Chromium's - // base/json/json_reader.h file for known limitations/deviations from the RFC. - /// - JSON_PARSER_RFC = 0, - - /// - // Allows commas to exist after the last element in structures. - /// - JSON_PARSER_ALLOW_TRAILING_COMMAS = 1 << 0, -} cef_json_parser_options_t; - -/// -// Error codes that can be returned from CefParseJSONAndReturnError. -/// -typedef enum { - JSON_NO_ERROR = 0, - JSON_INVALID_ESCAPE, - JSON_SYNTAX_ERROR, - JSON_UNEXPECTED_TOKEN, - JSON_TRAILING_COMMA, - JSON_TOO_MUCH_NESTING, - JSON_UNEXPECTED_DATA_AFTER_ROOT, - JSON_UNSUPPORTED_ENCODING, - JSON_UNQUOTED_DICTIONARY_KEY, - JSON_PARSE_ERROR_COUNT -} cef_json_parser_error_t; - -/// -// Options that can be passed to CefWriteJSON. -/// -typedef enum { - /// - // Default behavior. - /// - JSON_WRITER_DEFAULT = 0, - - /// - // This option instructs the writer that if a Binary value is encountered, - // the value (and key if within a dictionary) will be omitted from the - // output, and success will be returned. Otherwise, if a binary value is - // encountered, failure will be returned. - /// - JSON_WRITER_OMIT_BINARY_VALUES = 1 << 0, - - /// - // This option instructs the writer to write doubles that have no fractional - // part as a normal integer (i.e., without using exponential notation - // or appending a '.0') as long as the value is within the range of a - // 64-bit int. - /// - JSON_WRITER_OMIT_DOUBLE_TYPE_PRESERVATION = 1 << 1, - - /// - // Return a slightly nicer formatted json string (pads with whitespace to - // help with readability). - /// - JSON_WRITER_PRETTY_PRINT = 1 << 2, -} cef_json_writer_options_t; - -/// -// Margin type for PDF printing. -/// -typedef enum { - /// - // Default margins. - /// - PDF_PRINT_MARGIN_DEFAULT, - - /// - // No margins. - /// - PDF_PRINT_MARGIN_NONE, - - /// - // Minimum margins. - /// - PDF_PRINT_MARGIN_MINIMUM, - - /// - // Custom margins using the |margin_*| values from cef_pdf_print_settings_t. - /// - PDF_PRINT_MARGIN_CUSTOM, -} cef_pdf_print_margin_type_t; - -/// -// Structure representing PDF print settings. -/// -typedef struct _cef_pdf_print_settings_t { - /// - // Page title to display in the header. Only used if |header_footer_enabled| - // is set to true (1). - /// - cef_string_t header_footer_title; - - /// - // URL to display in the footer. Only used if |header_footer_enabled| is set - // to true (1). - /// - cef_string_t header_footer_url; - - /// - // Output page size in microns. If either of these values is less than or - // equal to zero then the default paper size (A4) will be used. - /// - int page_width; - int page_height; - - /// - // Margins in millimeters. Only used if |margin_type| is set to - // PDF_PRINT_MARGIN_CUSTOM. - /// - double margin_top; - double margin_right; - double margin_bottom; - double margin_left; - - /// - // Margin type. - /// - cef_pdf_print_margin_type_t margin_type; - - /// - // Set to true (1) to print headers and footers or false (0) to not print - // headers and footers. - /// - int header_footer_enabled; - - /// - // Set to true (1) to print the selection only or false (0) to print all. - /// - int selection_only; - - /// - // Set to true (1) for landscape mode or false (0) for portrait mode. - /// - int landscape; - - /// - // Set to true (1) to print background graphics or false (0) to not print - // background graphics. - /// - int backgrounds_enabled; - -} cef_pdf_print_settings_t; - -/// -// Supported UI scale factors for the platform. SCALE_FACTOR_NONE is used for -// density independent resources such as string, html/js files or an image that -// can be used for any scale factors (such as wallpapers). -/// -typedef enum { - SCALE_FACTOR_NONE = 0, - SCALE_FACTOR_100P, - SCALE_FACTOR_125P, - SCALE_FACTOR_133P, - SCALE_FACTOR_140P, - SCALE_FACTOR_150P, - SCALE_FACTOR_180P, - SCALE_FACTOR_200P, - SCALE_FACTOR_250P, - SCALE_FACTOR_300P, -} cef_scale_factor_t; - -/// -// Plugin policies supported by CefRequestContextHandler::OnBeforePluginLoad. -/// -typedef enum { - /// - // Allow the content. - /// - PLUGIN_POLICY_ALLOW, - - /// - // Allow important content and block unimportant content based on heuristics. - // The user can manually load blocked content. - /// - PLUGIN_POLICY_DETECT_IMPORTANT, - - /// - // Block the content. The user can manually load blocked content. - /// - PLUGIN_POLICY_BLOCK, - - /// - // Disable the content. The user cannot load disabled content. - /// - PLUGIN_POLICY_DISABLE, -} cef_plugin_policy_t; - -/// -// Policy for how the Referrer HTTP header value will be sent during navigation. -// If the `--no-referrers` command-line flag is specified then the policy value -// will be ignored and the Referrer value will never be sent. -/// -typedef enum { - /// - // Always send the complete Referrer value. - /// - REFERRER_POLICY_ALWAYS, - - /// - // Use the default policy. This is REFERRER_POLICY_ORIGIN_WHEN_CROSS_ORIGIN - // when the `--reduced-referrer-granularity` command-line flag is specified - // and REFERRER_POLICY_NO_REFERRER_WHEN_DOWNGRADE otherwise. - // - /// - REFERRER_POLICY_DEFAULT, - - /// - // When navigating from HTTPS to HTTP do not send the Referrer value. - // Otherwise, send the complete Referrer value. - /// - REFERRER_POLICY_NO_REFERRER_WHEN_DOWNGRADE, - - /// - // Never send the Referrer value. - /// - REFERRER_POLICY_NEVER, - - /// - // Only send the origin component of the Referrer value. - /// - REFERRER_POLICY_ORIGIN, - - /// - // When navigating cross-origin only send the origin component of the Referrer - // value. Otherwise, send the complete Referrer value. - /// - REFERRER_POLICY_ORIGIN_WHEN_CROSS_ORIGIN, -} cef_referrer_policy_t; - -/// -// Return values for CefResponseFilter::Filter(). -/// -typedef enum { - /// - // Some or all of the pre-filter data was read successfully but more data is - // needed in order to continue filtering (filtered output is pending). - /// - RESPONSE_FILTER_NEED_MORE_DATA, - - /// - // Some or all of the pre-filter data was read successfully and all available - // filtered output has been written. - /// - RESPONSE_FILTER_DONE, - - /// - // An error occurred during filtering. - /// - RESPONSE_FILTER_ERROR -} cef_response_filter_status_t; - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_H_ diff --git a/tool_kits/cef/cef_wrapper/include/internal/cef_types_win.h b/tool_kits/cef/cef_wrapper/include/internal/cef_types_win.h deleted file mode 100644 index 27bf6053..00000000 --- a/tool_kits/cef/cef_wrapper/include/internal/cef_types_win.h +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) 2009 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -#ifndef CEF_INCLUDE_INTERNAL_CEF_TYPES_WIN_H_ -#define CEF_INCLUDE_INTERNAL_CEF_TYPES_WIN_H_ -#pragma once - -#include "include/base/cef_build.h" - -#if defined(OS_WIN) -#include -#include "include/internal/cef_string.h" - -// Handle types. -#define cef_cursor_handle_t HCURSOR -#define cef_event_handle_t MSG* -#define cef_window_handle_t HWND -#define cef_text_input_context_t void* - -#define kNullCursorHandle NULL -#define kNullEventHandle NULL -#define kNullWindowHandle NULL - -#ifdef __cplusplus -extern "C" { -#endif - -/// -// Structure representing CefExecuteProcess arguments. -/// -typedef struct _cef_main_args_t { - HINSTANCE instance; -} cef_main_args_t; - -/// -// Structure representing window information. -/// -typedef struct _cef_window_info_t { - // Standard parameters required by CreateWindowEx() - DWORD ex_style; - cef_string_t window_name; - DWORD style; - int x; - int y; - int width; - int height; - cef_window_handle_t parent_window; - HMENU menu; - - /// - // Set to true (1) to create the browser using windowless (off-screen) - // rendering. No window will be created for the browser and all rendering will - // occur via the CefRenderHandler interface. The |parent_window| value will be - // used to identify monitor info and to act as the parent window for dialogs, - // context menus, etc. If |parent_window| is not provided then the main screen - // monitor will be used and some functionality that requires a parent window - // may not function correctly. In order to create windowless browsers the - // CefSettings.windowless_rendering_enabled value must be set to true. - /// - int windowless_rendering_enabled; - - /// - // Set to true (1) to enable transparent painting in combination with - // windowless rendering. When this value is true a transparent background - // color will be used (RGBA=0x00000000). When this value is false the - // background will be white and opaque. - /// - int transparent_painting_enabled; - - /// - // Handle for the new browser window. Only used with windowed rendering. - /// - cef_window_handle_t window; -} cef_window_info_t; - -#ifdef __cplusplus -} -#endif - -#endif // OS_WIN - -#endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_WIN_H_ diff --git a/tool_kits/cef/cef_wrapper/include/internal/cef_types_wrappers.h b/tool_kits/cef/cef_wrapper/include/internal/cef_types_wrappers.h deleted file mode 100644 index 83dae76e..00000000 --- a/tool_kits/cef/cef_wrapper/include/internal/cef_types_wrappers.h +++ /dev/null @@ -1,906 +0,0 @@ -// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CEF_INCLUDE_INTERNAL_CEF_TYPES_WRAPPERS_H_ -#define CEF_INCLUDE_INTERNAL_CEF_TYPES_WRAPPERS_H_ -#pragma once - -#include "include/internal/cef_string.h" -#include "include/internal/cef_string_list.h" -#include "include/internal/cef_types.h" - -/// -// Template class that provides common functionality for CEF structure wrapping. -/// -template -class CefStructBase : public traits::struct_type { - public: - typedef typename traits::struct_type struct_type; - - CefStructBase() : attached_to_(NULL) { - Init(); - } - virtual ~CefStructBase() { - // Only clear this object's data if it isn't currently attached to a - // structure. - if (!attached_to_) - Clear(this); - } - - CefStructBase(const CefStructBase& r) { - Init(); - *this = r; - } - CefStructBase(const struct_type& r) { // NOLINT(runtime/explicit) - Init(); - *this = r; - } - - /// - // Clear this object's values. - /// - void Reset() { - Clear(this); - Init(); - } - - /// - // Attach to the source structure's existing values. DetachTo() can be called - // to insert the values back into the existing structure. - /// - void AttachTo(struct_type& source) { - // Only clear this object's data if it isn't currently attached to a - // structure. - if (!attached_to_) - Clear(this); - - // This object is now attached to the new structure. - attached_to_ = &source; - - // Transfer ownership of the values from the source structure. - memcpy(static_cast(this), &source, sizeof(struct_type)); - } - - /// - // Relinquish ownership of values to the target structure. - /// - void DetachTo(struct_type& target) { - if (attached_to_ != &target) { - // Clear the target structure's values only if we are not currently - // attached to that structure. - Clear(&target); - } - - // Transfer ownership of the values to the target structure. - memcpy(&target, static_cast(this), sizeof(struct_type)); - - // Remove the references from this object. - Init(); - } - - /// - // Set this object's values. If |copy| is true the source structure's values - // will be copied instead of referenced. - /// - void Set(const struct_type& source, bool copy) { - traits::set(&source, this, copy); - } - - CefStructBase& operator=(const CefStructBase& s) { - return operator=(static_cast(s)); - } - - CefStructBase& operator=(const struct_type& s) { - Set(s, true); - return *this; - } - - protected: - void Init() { - memset(static_cast(this), 0, sizeof(struct_type)); - attached_to_ = NULL; - traits::init(this); - } - - static void Clear(struct_type* s) { traits::clear(s); } - - struct_type* attached_to_; -}; - - -struct CefPointTraits { - typedef cef_point_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 point. -/// -class CefPoint : public CefStructBase { - public: - typedef CefStructBase parent; - - CefPoint() : parent() {} - CefPoint(const cef_point_t& r) : parent(r) {} // NOLINT(runtime/explicit) - CefPoint(const CefPoint& r) : parent(r) {} // NOLINT(runtime/explicit) - CefPoint(int x, int y) : parent() { - Set(x, y); - } - - bool IsEmpty() const { return x <= 0 && y <= 0; } - void Set(int x_val, int y_val) { - x = x_val, y = y_val; - } -}; - -inline bool operator==(const CefPoint& a, const CefPoint& b) { - return a.x == b.x && a.y == b.y; -} - -inline bool operator!=(const CefPoint& a, const CefPoint& b) { - return !(a == b); -} - - -struct CefRectTraits { - typedef cef_rect_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 rectangle. -/// -class CefRect : public CefStructBase { - public: - typedef CefStructBase parent; - - CefRect() : parent() {} - CefRect(const cef_rect_t& r) : parent(r) {} // NOLINT(runtime/explicit) - CefRect(const CefRect& r) : parent(r) {} // NOLINT(runtime/explicit) - CefRect(int x, int y, int width, int height) : parent() { - Set(x, y, width, height); - } - - bool IsEmpty() const { return width <= 0 || height <= 0; } - void Set(int x_val, int y_val, int width_val, int height_val) { - x = x_val, y = y_val, width = width_val, height = height_val; - } -}; - -inline bool operator==(const CefRect& a, const CefRect& b) { - return a.x == b.x && a.y == b.y && a.width == b.width && a.height == b.height; -} - -inline bool operator!=(const CefRect& a, const CefRect& b) { - return !(a == b); -} - - -struct CefSizeTraits { - typedef cef_size_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 size. -/// -class CefSize : public CefStructBase { - public: - typedef CefStructBase parent; - - CefSize() : parent() {} - CefSize(const cef_size_t& r) : parent(r) {} // NOLINT(runtime/explicit) - CefSize(const CefSize& r) : parent(r) {} // NOLINT(runtime/explicit) - CefSize(int width, int height) : parent() { - Set(width, height); - } - - bool IsEmpty() const { return width <= 0 || height <= 0; } - void Set(int width_val, int height_val) { - width = width_val, height = height_val; - } -}; - -inline bool operator==(const CefSize& a, const CefSize& b) { - return a.width == b.width && a.height == b.height; -} - -inline bool operator!=(const CefSize& a, const CefSize& b) { - return !(a == b); -} - - -struct CefDraggableRegionTraits { - typedef cef_draggable_region_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 draggable region. -/// -class CefDraggableRegion : public CefStructBase { - public: - typedef CefStructBase parent; - - CefDraggableRegion() : parent() {} - CefDraggableRegion(const cef_draggable_region_t& r) // NOLINT(runtime/explicit) - : parent(r) {} - CefDraggableRegion(const CefDraggableRegion& r) // NOLINT(runtime/explicit) - : parent(r) {} - CefDraggableRegion(const CefRect& bounds, bool draggable) : parent() { - Set(bounds, draggable); - } - - void Set(const CefRect& bounds_val, bool draggable_val) { - bounds = bounds_val, draggable = draggable_val; - } -}; - -inline bool operator==(const CefDraggableRegion& a, - const CefDraggableRegion& b) { - return a.bounds == b.bounds && a.draggable == b.draggable; -} - -inline bool operator!=(const CefDraggableRegion& a, - const CefDraggableRegion& b) { - return !(a == b); -} - - -struct CefScreenInfoTraits { - typedef cef_screen_info_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->device_scale_factor = src->device_scale_factor; - target->depth = src->depth; - target->depth_per_component = src->depth_per_component; - target->is_monochrome = src->is_monochrome; - target->rect = src->rect; - target->available_rect = src->available_rect; - } -}; - -/// -// Class representing the virtual screen information for use when window -// rendering is disabled. -/// -class CefScreenInfo : public CefStructBase { - public: - typedef CefStructBase parent; - - CefScreenInfo() : parent() {} - CefScreenInfo(const cef_screen_info_t& r) : parent(r) {} // NOLINT(runtime/explicit) - CefScreenInfo(const CefScreenInfo& r) : parent(r) {} // NOLINT(runtime/explicit) - CefScreenInfo(float device_scale_factor, - int depth, - int depth_per_component, - bool is_monochrome, - const CefRect& rect, - const CefRect& available_rect) : parent() { - Set(device_scale_factor, depth, depth_per_component, - is_monochrome, rect, available_rect); - } - - void Set(float device_scale_factor_val, - int depth_val, - int depth_per_component_val, - bool is_monochrome_val, - const CefRect& rect_val, - const CefRect& available_rect_val) { - device_scale_factor = device_scale_factor_val; - depth = depth_val; - depth_per_component = depth_per_component_val; - is_monochrome = is_monochrome_val; - rect = rect_val; - available_rect = available_rect_val; - } -}; - - -struct CefKeyEventTraits { - typedef cef_key_event_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->type = src->type; - target->modifiers = src->modifiers; - target->windows_key_code = src->windows_key_code; - target->native_key_code = src->native_key_code; - target->is_system_key = src->is_system_key; - target->character = src->character; - target->unmodified_character = src->unmodified_character; - target->focus_on_editable_field = src->focus_on_editable_field; - } -}; - -/// -// Class representing a a keyboard event. -/// -typedef CefStructBase CefKeyEvent; - - -struct CefMouseEventTraits { - typedef cef_mouse_event_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->x = src->x; - target->y = src->y; - target->modifiers = src->modifiers; - } -}; - -/// -// Class representing a mouse event. -/// -typedef CefStructBase CefMouseEvent; - - -struct CefPopupFeaturesTraits { - typedef cef_popup_features_t struct_type; - - static inline void init(struct_type* s) { - s->menuBarVisible = true; - s->statusBarVisible = true; - s->toolBarVisible = true; - s->locationBarVisible = true; - s->scrollbarsVisible = true; - s->resizable = true; - } - - static inline void clear(struct_type* s) { - if (s->additionalFeatures) - cef_string_list_free(s->additionalFeatures); - } - - static inline void set(const struct_type* src, struct_type* target, - bool copy) { - if (target->additionalFeatures) - cef_string_list_free(target->additionalFeatures); - target->additionalFeatures = src->additionalFeatures ? - cef_string_list_copy(src->additionalFeatures) : NULL; - - target->x = src->x; - target->xSet = src->xSet; - target->y = src->y; - target->ySet = src->ySet; - target->width = src->width; - target->widthSet = src->widthSet; - target->height = src->height; - target->heightSet = src->heightSet; - target->menuBarVisible = src->menuBarVisible; - target->statusBarVisible = src->statusBarVisible; - target->toolBarVisible = src->toolBarVisible; - target->locationBarVisible = src->locationBarVisible; - target->scrollbarsVisible = src->scrollbarsVisible; - target->resizable = src->resizable; - target->fullscreen = src->fullscreen; - target->dialog = src->dialog; - } -}; - -/// -// Class representing popup window features. -/// -typedef CefStructBase CefPopupFeatures; - - -struct CefSettingsTraits { - typedef cef_settings_t struct_type; - - static inline void init(struct_type* s) { - s->size = sizeof(struct_type); - } - - static inline void clear(struct_type* s) { - cef_string_clear(&s->browser_subprocess_path); - cef_string_clear(&s->cache_path); - cef_string_clear(&s->user_data_path); - cef_string_clear(&s->user_agent); - cef_string_clear(&s->product_version); - cef_string_clear(&s->locale); - cef_string_clear(&s->log_file); - cef_string_clear(&s->javascript_flags); - cef_string_clear(&s->resources_dir_path); - cef_string_clear(&s->locales_dir_path); - cef_string_clear(&s->accept_language_list); - } - - static inline void set(const struct_type* src, struct_type* target, - bool copy) { - target->single_process = src->single_process; - target->no_sandbox = src->no_sandbox; - cef_string_set(src->browser_subprocess_path.str, - src->browser_subprocess_path.length, - &target->browser_subprocess_path, copy); - target->multi_threaded_message_loop = src->multi_threaded_message_loop; - target->windowless_rendering_enabled = src->windowless_rendering_enabled; - target->command_line_args_disabled = src->command_line_args_disabled; - - cef_string_set(src->cache_path.str, src->cache_path.length, - &target->cache_path, copy); - cef_string_set(src->user_data_path.str, src->user_data_path.length, - &target->user_data_path, copy); - target->persist_session_cookies = src->persist_session_cookies; - target->persist_user_preferences = src->persist_user_preferences; - - cef_string_set(src->user_agent.str, src->user_agent.length, - &target->user_agent, copy); - cef_string_set(src->product_version.str, src->product_version.length, - &target->product_version, copy); - cef_string_set(src->locale.str, src->locale.length, &target->locale, copy); - - cef_string_set(src->log_file.str, src->log_file.length, &target->log_file, - copy); - target->log_severity = src->log_severity; - cef_string_set(src->javascript_flags.str, src->javascript_flags.length, - &target->javascript_flags, copy); - - cef_string_set(src->resources_dir_path.str, src->resources_dir_path.length, - &target->resources_dir_path, copy); - cef_string_set(src->locales_dir_path.str, src->locales_dir_path.length, - &target->locales_dir_path, copy); - target->pack_loading_disabled = src->pack_loading_disabled; - target->remote_debugging_port = src->remote_debugging_port; - target->uncaught_exception_stack_size = src->uncaught_exception_stack_size; - target->context_safety_implementation = src->context_safety_implementation; - target->ignore_certificate_errors = src->ignore_certificate_errors; - target->background_color = src->background_color; - - cef_string_set(src->accept_language_list.str, - src->accept_language_list.length, &target->accept_language_list, copy); - } -}; - -/// -// Class representing initialization settings. -/// -typedef CefStructBase CefSettings; - - -struct CefRequestContextSettingsTraits { - typedef cef_request_context_settings_t struct_type; - - static inline void init(struct_type* s) { - s->size = sizeof(struct_type); - } - - static inline void clear(struct_type* s) { - cef_string_clear(&s->cache_path); - cef_string_clear(&s->accept_language_list); - } - - static inline void set(const struct_type* src, struct_type* target, - bool copy) { - cef_string_set(src->cache_path.str, src->cache_path.length, - &target->cache_path, copy); - target->persist_session_cookies = src->persist_session_cookies; - target->persist_user_preferences = src->persist_user_preferences; - target->ignore_certificate_errors = src->ignore_certificate_errors; - cef_string_set(src->accept_language_list.str, - src->accept_language_list.length, &target->accept_language_list, copy); - } -}; - -/// -// Class representing request context initialization settings. -/// -typedef CefStructBase - CefRequestContextSettings; - - -struct CefBrowserSettingsTraits { - typedef cef_browser_settings_t struct_type; - - static inline void init(struct_type* s) { - s->size = sizeof(struct_type); - } - - static inline void clear(struct_type* s) { - cef_string_clear(&s->standard_font_family); - cef_string_clear(&s->fixed_font_family); - cef_string_clear(&s->serif_font_family); - cef_string_clear(&s->sans_serif_font_family); - cef_string_clear(&s->cursive_font_family); - cef_string_clear(&s->fantasy_font_family); - cef_string_clear(&s->default_encoding); - cef_string_clear(&s->accept_language_list); - } - - static inline void set(const struct_type* src, struct_type* target, - bool copy) { - target->windowless_frame_rate = src->windowless_frame_rate; - - cef_string_set(src->standard_font_family.str, - src->standard_font_family.length, &target->standard_font_family, copy); - cef_string_set(src->fixed_font_family.str, src->fixed_font_family.length, - &target->fixed_font_family, copy); - cef_string_set(src->serif_font_family.str, src->serif_font_family.length, - &target->serif_font_family, copy); - cef_string_set(src->sans_serif_font_family.str, - src->sans_serif_font_family.length, &target->sans_serif_font_family, - copy); - cef_string_set(src->cursive_font_family.str, - src->cursive_font_family.length, &target->cursive_font_family, copy); - cef_string_set(src->fantasy_font_family.str, - src->fantasy_font_family.length, &target->fantasy_font_family, copy); - - target->default_font_size = src->default_font_size; - target->default_fixed_font_size = src->default_fixed_font_size; - target->minimum_font_size = src->minimum_font_size; - target->minimum_logical_font_size = src->minimum_logical_font_size; - - cef_string_set(src->default_encoding.str, src->default_encoding.length, - &target->default_encoding, copy); - - target->remote_fonts = src->remote_fonts; - target->javascript = src->javascript; - target->javascript_open_windows = src->javascript_open_windows; - target->javascript_close_windows = src->javascript_close_windows; - target->javascript_access_clipboard = src->javascript_access_clipboard; - target->javascript_dom_paste = src->javascript_dom_paste; - target->caret_browsing = src->caret_browsing; - target->plugins = src->plugins; - target->universal_access_from_file_urls = - src->universal_access_from_file_urls; - target->file_access_from_file_urls = src->file_access_from_file_urls; - target->web_security = src->web_security; - target->image_loading = src->image_loading; - target->image_shrink_standalone_to_fit = - src->image_shrink_standalone_to_fit; - target->text_area_resize = src->text_area_resize; - target->tab_to_links = src->tab_to_links; - target->local_storage = src->local_storage; - target->databases= src->databases; - target->application_cache = src->application_cache; - target->webgl = src->webgl; - - target->background_color = src->background_color; - - cef_string_set(src->accept_language_list.str, - src->accept_language_list.length, &target->accept_language_list, copy); - } -}; - -/// -// Class representing browser initialization settings. -/// -typedef CefStructBase CefBrowserSettings; - - -struct CefURLPartsTraits { - typedef cef_urlparts_t struct_type; - - static inline void init(struct_type* s) {} - - static inline void clear(struct_type* s) { - cef_string_clear(&s->spec); - cef_string_clear(&s->scheme); - cef_string_clear(&s->username); - cef_string_clear(&s->password); - cef_string_clear(&s->host); - cef_string_clear(&s->port); - cef_string_clear(&s->origin); - cef_string_clear(&s->path); - cef_string_clear(&s->query); - } - - static inline void set(const struct_type* src, struct_type* target, - bool copy) { - cef_string_set(src->spec.str, src->spec.length, &target->spec, copy); - cef_string_set(src->scheme.str, src->scheme.length, &target->scheme, copy); - cef_string_set(src->username.str, src->username.length, &target->username, - copy); - cef_string_set(src->password.str, src->password.length, &target->password, - copy); - cef_string_set(src->host.str, src->host.length, &target->host, copy); - cef_string_set(src->port.str, src->port.length, &target->port, copy); - cef_string_set(src->origin.str, src->origin.length, &target->origin, copy); - cef_string_set(src->path.str, src->path.length, &target->path, copy); - cef_string_set(src->query.str, src->query.length, &target->query, copy); - } -}; - -/// -// Class representing a URL's component parts. -/// -typedef CefStructBase CefURLParts; - - -struct CefTimeTraits { - typedef cef_time_t struct_type; - - static inline void init(struct_type* s) {} - - static inline void clear(struct_type* s) {} - - static inline void set(const struct_type* src, struct_type* target, - bool copy) { - *target = *src; - } -}; - -/// -// Class representing a time. -/// -class CefTime : public CefStructBase { - public: - typedef CefStructBase parent; - - CefTime() : parent() {} - CefTime(const cef_time_t& r) : parent(r) {} // NOLINT(runtime/explicit) - CefTime(const CefTime& r) : parent(r) {} // NOLINT(runtime/explicit) - explicit CefTime(time_t r) : parent() { SetTimeT(r); } - explicit CefTime(double r) : parent() { SetDoubleT(r); } - - // Converts to/from time_t. - void SetTimeT(time_t r) { - cef_time_from_timet(r, this); - } - time_t GetTimeT() const { - time_t time = 0; - cef_time_to_timet(this, &time); - return time; - } - - // Converts to/from a double which is the number of seconds since epoch - // (Jan 1, 1970). Webkit uses this format to represent time. A value of 0 - // means "not initialized". - void SetDoubleT(double r) { - cef_time_from_doublet(r, this); - } - double GetDoubleT() const { - double time = 0; - cef_time_to_doublet(this, &time); - return time; - } - - // Set this object to now. - void Now() { - cef_time_now(this); - } - - // Return the delta between this object and |other| in milliseconds. - long long Delta(const CefTime& other) { - long long delta = 0; - cef_time_delta(this, &other, &delta); - return delta; - } -}; - - -struct CefCookieTraits { - typedef cef_cookie_t struct_type; - - static inline void init(struct_type* s) {} - - static inline void clear(struct_type* s) { - cef_string_clear(&s->name); - cef_string_clear(&s->value); - cef_string_clear(&s->domain); - cef_string_clear(&s->path); - } - - static inline void set(const struct_type* src, struct_type* target, - bool copy) { - cef_string_set(src->name.str, src->name.length, &target->name, copy); - cef_string_set(src->value.str, src->value.length, &target->value, copy); - cef_string_set(src->domain.str, src->domain.length, &target->domain, copy); - cef_string_set(src->path.str, src->path.length, &target->path, copy); - target->secure = src->secure; - target->httponly = src->httponly; - target->creation = src->creation; - target->last_access = src->last_access; - target->has_expires = src->has_expires; - target->expires = src->expires; - } -}; - -/// -// Class representing a cookie. -/// -typedef CefStructBase CefCookie; - - -struct CefGeopositionTraits { - typedef cef_geoposition_t struct_type; - - static inline void init(struct_type* s) {} - - static inline void clear(struct_type* s) { - cef_string_clear(&s->error_message); - } - - static inline void set(const struct_type* src, struct_type* target, - bool copy) { - target->latitude = src->latitude; - target->longitude = src->longitude; - target->altitude = src->altitude; - target->accuracy = src->accuracy; - target->altitude_accuracy = src->altitude_accuracy; - target->heading = src->heading; - target->speed = src->speed; - target->timestamp = src->timestamp; - target->error_code = src->error_code; - cef_string_set(src->error_message.str, src->error_message.length, - &target->error_message, copy); - } -}; - -/// -// Class representing a geoposition. -/// -typedef CefStructBase 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 { - public: - typedef CefStructBase 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; - - 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->hotspot = src->hotspot; - target->image_scale_factor = src->image_scale_factor; - target->buffer = src->buffer; - target->size = src->size; - } -}; - -/// -// Class representing cursor information. -/// -typedef CefStructBase CefCursorInfo; - - -struct CefPdfPrintSettingsTraits { - typedef cef_pdf_print_settings_t struct_type; - - static inline void init(struct_type* s) {} - - static inline void clear(struct_type* s) { - cef_string_clear(&s->header_footer_title); - cef_string_clear(&s->header_footer_url); - } - - static inline void set(const struct_type* src, struct_type* target, - bool copy) { - - cef_string_set(src->header_footer_title.str, - src->header_footer_title.length, &target->header_footer_title, copy); - cef_string_set(src->header_footer_url.str, src->header_footer_url.length, - &target->header_footer_url, copy); - - target->page_width = src->page_width; - target->page_height = src->page_height; - - target->margin_top = src->margin_top; - target->margin_right = src->margin_right; - target->margin_bottom = src->margin_bottom; - target->margin_left = src->margin_left; - target->margin_type = src->margin_type; - - target->header_footer_enabled = src->header_footer_enabled; - target->selection_only = src->selection_only; - target->landscape = src->landscape; - target->backgrounds_enabled = src->backgrounds_enabled; - } -}; - -/// -// Class representing PDF print settings -/// -typedef CefStructBase CefPdfPrintSettings; - -#endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_WRAPPERS_H_ diff --git a/tool_kits/cef/cef_wrapper/include/internal/cef_win.h b/tool_kits/cef/cef_wrapper/include/internal/cef_win.h deleted file mode 100644 index 7361a3ce..00000000 --- a/tool_kits/cef/cef_wrapper/include/internal/cef_win.h +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) 2008 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -#ifndef CEF_INCLUDE_INTERNAL_CEF_WIN_H_ -#define CEF_INCLUDE_INTERNAL_CEF_WIN_H_ -#pragma once - -#include "include/internal/cef_types_win.h" -#include "include/internal/cef_types_wrappers.h" - -/// -// Handle types. -/// -#define CefCursorHandle cef_cursor_handle_t -#define CefEventHandle cef_event_handle_t -#define CefWindowHandle cef_window_handle_t -#define CefTextInputContext cef_text_input_context_t - -struct CefMainArgsTraits { - typedef cef_main_args_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->instance = src->instance; - } -}; - -// Class representing CefExecuteProcess arguments. -class CefMainArgs : public CefStructBase { - public: - typedef CefStructBase parent; - - CefMainArgs() : parent() {} - explicit CefMainArgs(const cef_main_args_t& r) : parent(r) {} - explicit CefMainArgs(const CefMainArgs& r) : parent(r) {} - explicit CefMainArgs(HINSTANCE hInstance) : parent() { - instance = hInstance; - } -}; - -struct CefWindowInfoTraits { - typedef cef_window_info_t struct_type; - - static inline void init(struct_type* s) {} - - static inline void clear(struct_type* s) { - cef_string_clear(&s->window_name); - } - - static inline void set(const struct_type* src, struct_type* target, - bool copy) { - target->ex_style = src->ex_style; - cef_string_set(src->window_name.str, src->window_name.length, - &target->window_name, copy); - target->style = src->style; - target->x = src->x; - target->y = src->y; - target->width = src->width; - target->height = src->height; - target->parent_window = src->parent_window; - target->menu = src->menu; - target->transparent_painting_enabled = src->transparent_painting_enabled; - target->windowless_rendering_enabled = src->windowless_rendering_enabled; - target->window = src->window; - } -}; - -/// -// Class representing window information. -/// -class CefWindowInfo : public CefStructBase { - public: - typedef CefStructBase parent; - - CefWindowInfo() : parent() {} - explicit CefWindowInfo(const cef_window_info_t& r) : parent(r) {} - explicit CefWindowInfo(const CefWindowInfo& r) : parent(r) {} - - /// - // Create the browser as a child window. - /// - void SetAsChild(CefWindowHandle parent, RECT windowRect) { - style = WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_TABSTOP | - WS_VISIBLE; - parent_window = parent; - x = windowRect.left; - y = windowRect.top; - width = windowRect.right - windowRect.left; - height = windowRect.bottom - windowRect.top; - } - - /// - // Create the browser as a popup window. - /// - void SetAsPopup(CefWindowHandle parent, const CefString& windowName) { - style = WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | - WS_VISIBLE; - parent_window = parent; - x = CW_USEDEFAULT; - y = CW_USEDEFAULT; - width = CW_USEDEFAULT; - height = CW_USEDEFAULT; - - cef_string_copy(windowName.c_str(), windowName.length(), &window_name); - } - - /// - // Create the browser using windowless (off-screen) rendering. No window - // will be created for the browser and all rendering will occur via the - // CefRenderHandler interface. The |parent| value will be used to identify - // monitor info and to act as the parent window for dialogs, context menus, - // etc. If |parent| is not provided then the main screen monitor will be used - // and some functionality that requires a parent window may not function - // correctly. If |transparent| is true a transparent background color will be - // used (RGBA=0x00000000). If |transparent| is false the background will be - // white and opaque. In order to create windowless browsers the - // CefSettings.windowless_rendering_enabled value must be set to true. - /// - void SetAsWindowless(CefWindowHandle parent, bool transparent) { - windowless_rendering_enabled = TRUE; - parent_window = parent; - transparent_painting_enabled = transparent; - } -}; - -#endif // CEF_INCLUDE_INTERNAL_CEF_WIN_H_ diff --git a/tool_kits/cef/cef_wrapper/include/wrapper/cef_byte_read_handler.h b/tool_kits/cef/cef_wrapper/include/wrapper/cef_byte_read_handler.h deleted file mode 100644 index 559cdd81..00000000 --- a/tool_kits/cef/cef_wrapper/include/wrapper/cef_byte_read_handler.h +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// --------------------------------------------------------------------------- -// -// The contents of this file are only available to applications that link -// against the libcef_dll_wrapper target. -// - -#ifndef CEF_INCLUDE_WRAPPER_CEF_BYTE_READ_HANDLER_H_ -#define CEF_INCLUDE_WRAPPER_CEF_BYTE_READ_HANDLER_H_ -#pragma once - -#include "include/base/cef_lock.h" -#include "include/base/cef_macros.h" -#include "include/cef_base.h" -#include "include/cef_stream.h" - -/// -// Thread safe implementation of the CefReadHandler class for reading an -// in-memory array of bytes. -/// -class CefByteReadHandler : public CefReadHandler { - public: - /// - // Create a new object for reading an array of bytes. An optional |source| - // reference can be kept to keep the underlying data source from being - // released while the reader exists. - /// - CefByteReadHandler(const unsigned char* bytes, - size_t size, - CefRefPtr source); - - // CefReadHandler methods. - virtual size_t Read(void* ptr, size_t size, size_t n) OVERRIDE; - virtual int Seek(int64 offset, int whence) OVERRIDE; - virtual int64 Tell() OVERRIDE; - virtual int Eof() OVERRIDE; - virtual bool MayBlock() OVERRIDE { return false; } - - private: - const unsigned char* bytes_; - int64 size_; - int64 offset_; - CefRefPtr source_; - - base::Lock lock_; - - IMPLEMENT_REFCOUNTING(CefByteReadHandler); - DISALLOW_COPY_AND_ASSIGN(CefByteReadHandler); -}; - -#endif // CEF_INCLUDE_WRAPPER_CEF_BYTE_READ_HANDLER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/wrapper/cef_closure_task.h b/tool_kits/cef/cef_wrapper/include/wrapper/cef_closure_task.h deleted file mode 100644 index 8828c656..00000000 --- a/tool_kits/cef/cef_wrapper/include/wrapper/cef_closure_task.h +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// --------------------------------------------------------------------------- -// -// The contents of this file are only available to applications that link -// against the libcef_dll_wrapper target. -// - -#ifndef CEF_INCLUDE_WRAPPER_CEF_CLOSURE_TASK_H_ -#define CEF_INCLUDE_WRAPPER_CEF_CLOSURE_TASK_H_ -#pragma once - -#include "include/base/cef_callback_forward.h" -#include "include/base/cef_macros.h" -#include "include/cef_task.h" - -/// -// Helpers for asynchronously executing a base::Closure (bound function or -// method) on a CEF thread. Creation of base::Closures can be facilitated using -// base::Bind. See include/base/cef_callback.h for complete usage instructions. -// -// TO use these helpers you should include this header and the header that -// defines base::Bind. -// -// #include "include/base/cef_bind.h" -// #include "include/wrapper/cef_closure_task.h" -// -// Example of executing a bound function: -// -// // Define a function. -// void MyFunc(int arg) { /* do something with |arg| on the UI thread */ } -// -// // Post a task that will execute MyFunc on the UI thread and pass an |arg| -// // value of 5. -// CefPostTask(TID_UI, base::Bind(&MyFunc, 5)); -// -// Example of executing a bound method: -// -// // Define a class. -// class MyClass : public CefBase { -// public: -// MyClass() {} -// void MyMethod(int arg) { /* do something with |arg| on the UI thread */ } -// private: -// IMPLEMENT_REFCOUNTING(MyClass); -// }; -// -// // Create an instance of MyClass. -// CefRefPtr instance = new MyClass(); -// -// // Post a task that will execute MyClass::MyMethod on the UI thread and pass -// // an |arg| value of 5. |instance| will be kept alive until after the task -// // completes. -// CefPostTask(TID_UI, base::Bind(&MyClass::MyMethod, instance, 5)); -/// - -/// -// Create a CefTask that wraps a base::Closure. Can be used in combination with -// CefTaskRunner. -/// -CefRefPtr CefCreateClosureTask(const base::Closure& closure); - -/// -// Post a Closure for execution on the specified thread. -/// -bool CefPostTask(CefThreadId threadId, const base::Closure& closure); - -/// -// Post a Closure for delayed execution on the specified thread. -/// -bool CefPostDelayedTask(CefThreadId threadId, const base::Closure& closure, - int64 delay_ms); - -#endif // CEF_INCLUDE_WRAPPER_CEF_CLOSURE_TASK_H_ diff --git a/tool_kits/cef/cef_wrapper/include/wrapper/cef_helpers.h b/tool_kits/cef/cef_wrapper/include/wrapper/cef_helpers.h deleted file mode 100644 index 639cde8c..00000000 --- a/tool_kits/cef/cef_wrapper/include/wrapper/cef_helpers.h +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// --------------------------------------------------------------------------- -// -// The contents of this file are only available to applications that link -// against the libcef_dll_wrapper target. -// - -#ifndef CEF_INCLUDE_WRAPPER_CEF_HELPERS_H_ -#define CEF_INCLUDE_WRAPPER_CEF_HELPERS_H_ -#pragma once - -#include -#include -#include - -#include "include/base/cef_bind.h" -#include "include/base/cef_logging.h" -#include "include/base/cef_macros.h" -#include "include/cef_task.h" - -#define CEF_REQUIRE_UI_THREAD() DCHECK(CefCurrentlyOn(TID_UI)); -#define CEF_REQUIRE_IO_THREAD() DCHECK(CefCurrentlyOn(TID_IO)); -#define CEF_REQUIRE_FILE_THREAD() DCHECK(CefCurrentlyOn(TID_FILE)); -#define CEF_REQUIRE_RENDERER_THREAD() DCHECK(CefCurrentlyOn(TID_RENDERER)); - - -// Use this struct in conjuction with refcounted types to ensure that an -// object is deleted on the specified thread. For example: -// -// class Foo : public base::RefCountedThreadSafe { -// public: -// Foo(); -// void DoSomething(); -// -// private: -// // Allow deletion via scoped_refptr only. -// friend struct CefDeleteOnThread; -// friend class base::RefCountedThreadSafe; -// -// virtual ~Foo() {} -// }; -// -// base::scoped_refptr foo = new Foo(); -// foo->DoSomething(); -// foo = NULL; // Deletion of |foo| will occur on the UI thread. -// -template -struct CefDeleteOnThread { - template - static void Destruct(const T* x) { - if (CefCurrentlyOn(thread)) { - delete x; - } else { - CefPostTask(thread, - base::Bind(&CefDeleteOnThread::Destruct, x)); - } - } -}; - -struct CefDeleteOnUIThread : public CefDeleteOnThread { }; -struct CefDeleteOnIOThread : public CefDeleteOnThread { }; -struct CefDeleteOnFileThread : public CefDeleteOnThread { }; -struct CefDeleteOnRendererThread : public CefDeleteOnThread { }; - - -/// -// Helper class to manage a scoped copy of |argv|. -/// -class CefScopedArgArray { - public: - CefScopedArgArray(int argc, char* argv[]) { - // argv should have (argc + 1) elements, the last one always being NULL. - array_ = new char*[argc + 1]; - for (int i = 0; i < argc; ++i) { - values_.push_back(argv[i]); - array_[i] = const_cast(values_[i].c_str()); - } - array_[argc] = NULL; - } - ~CefScopedArgArray() { - delete [] array_; - } - - char** array() const { return array_; } - - private: - char** array_; - - // Keep values in a vector separate from |array_| because various users may - // modify |array_| and we still want to clean up memory properly. - std::vector values_; - - DISALLOW_COPY_AND_ASSIGN(CefScopedArgArray); -}; - -#endif // CEF_INCLUDE_WRAPPER_CEF_HELPERS_H_ diff --git a/tool_kits/cef/cef_wrapper/include/wrapper/cef_message_router.h b/tool_kits/cef/cef_wrapper/include/wrapper/cef_message_router.h deleted file mode 100644 index 2a6fcfe6..00000000 --- a/tool_kits/cef/cef_wrapper/include/wrapper/cef_message_router.h +++ /dev/null @@ -1,428 +0,0 @@ -// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// --------------------------------------------------------------------------- -// -// The contents of this file are only available to applications that link -// against the libcef_dll_wrapper target. -// - -#ifndef CEF_INCLUDE_WRAPPER_CEF_MESSAGE_ROUTER_H_ -#define CEF_INCLUDE_WRAPPER_CEF_MESSAGE_ROUTER_H_ -#pragma once - -#include "include/base/cef_ref_counted.h" -#include "include/cef_base.h" -#include "include/cef_browser.h" -#include "include/cef_process_message.h" -#include "include/cef_v8.h" - -// The below classes implement support for routing aynchronous messages between -// JavaScript running in the renderer process and C++ running in the browser -// process. An application interacts with the router by passing it data from -// standard CEF C++ callbacks (OnBeforeBrowse, OnProcessMessageRecieved, -// OnContextCreated, etc). The renderer-side router supports generic JavaScript -// callback registration and execution while the browser-side router supports -// application-specific logic via one or more application-provided Handler -// instances. -// -// The renderer-side router implementation exposes a query function and a cancel -// function via the JavaScript 'window' object: -// -// // Create and send a new query. -// var request_id = window.cefQuery({ -// request: 'my_request', -// persistent: false, -// onSuccess: function(response) {}, -// onFailure: function(error_code, error_message) {} -// }); -// -// // Optionally cancel the query. -// window.cefQueryCancel(request_id); -// -// When |window.cefQuery| is executed the request is sent asynchronously to one -// or more C++ Handler objects registered in the browser process. Each C++ -// Handler can choose to either handle or ignore the query in the -// Handler::OnQuery callback. If a Handler chooses to handle the query then it -// should execute Callback::Success when a response is available or -// Callback::Failure if an error occurs. This will result in asynchronous -// execution of the associated JavaScript callback in the renderer process. Any -// queries unhandled by C++ code in the browser process will be automatically -// canceled and the associated JavaScript onFailure callback will be executed -// with an error code of -1. -// -// Queries can be either persistent or non-persistent. If the query is -// persistent than the callbacks will remain registered until one of the -// following conditions are met: -// -// A. The query is canceled in JavaScript using the |window.cefQueryCancel| -// function. -// B. The query is canceled in C++ code using the Callback::Failure function. -// C. The context associated with the query is released due to browser -// destruction, navigation or renderer process termination. -// -// If the query is non-persistent then the registration will be removed after -// the JavaScript callback is executed a single time. If a query is canceled for -// a reason other than Callback::Failure being executed then the associated -// Handler's OnQueryCanceled method will be called. -// -// Some possible usage patterns include: -// -// One-time Request. Use a non-persistent query to send a JavaScript request. -// The Handler evaluates the request and returns the response. The query is -// then discarded. -// -// Broadcast. Use a persistent query to register as a JavaScript broadcast -// receiver. The Handler keeps track of all registered Callbacks and executes -// them sequentially to deliver the broadcast message. -// -// Subscription. Use a persistent query to register as a JavaScript subscription -// receiver. The Handler initiates the subscription feed on the first request -// and delivers responses to all registered subscribers as they become -// available. The Handler cancels the subscription feed when there are no -// longer any registered JavaScript receivers. -// -// Message routing occurs on a per-browser and per-context basis. Consequently, -// additional application logic can be applied by restricting which browser or -// context instances are passed into the router. If you choose to use this -// approach do so cautiously. In order for the router to function correctly any -// browser or context instance passed into a single router callback must then -// be passed into all router callbacks. -// -// There is generally no need to have multiple renderer-side routers unless you -// wish to have multiple bindings with different JavaScript function names. It -// can be useful to have multiple browser-side routers with different client- -// provided Handler instances when implementing different behaviors on a per- -// browser basis. -// -// This implementation places no formatting restrictions on payload content. -// An application may choose to exchange anything from simple formatted -// strings to serialized XML or JSON data. -// -// -// EXAMPLE USAGE -// -// 1. Define the router configuration. You can optionally specify settings -// like the JavaScript function names. The configuration must be the same in -// both the browser and renderer processes. If using multiple routers in the -// same application make sure to specify unique function names for each -// router configuration. -// -// // Example config object showing the default values. -// CefMessageRouterConfig config; -// config.js_query_function = "cefQuery"; -// config.js_cancel_function = "cefQueryCancel"; -// -// 2. Create an instance of CefMessageRouterBrowserSide in the browser process. -// You might choose to make it a member of your CefClient implementation, -// for example. -// -// browser_side_router_ = CefMessageRouterBrowserSide::Create(config); -// -// 3. Register one or more Handlers. The Handler instances must either outlive -// the router or be removed from the router before they're deleted. -// -// browser_side_router_->AddHandler(my_handler); -// -// 4. Call all required CefMessageRouterBrowserSide methods from other callbacks -// in your CefClient implementation (OnBeforeClose, etc). See the -// CefMessageRouterBrowserSide class documentation for the complete list of -// methods. -// -// 5. Create an instance of CefMessageRouterRendererSide in the renderer process. -// You might choose to make it a member of your CefApp implementation, for -// example. -// -// renderer_side_router_ = CefMessageRouterRendererSide::Create(config); -// -// 6. Call all required CefMessageRouterRendererSide methods from other -// callbacks in your CefRenderProcessHandler implementation -// (OnContextCreated, etc). See the CefMessageRouterRendererSide class -// documentation for the complete list of methods. -// -// 7. Execute the query function from JavaScript code. -// -// window.cefQuery({request: 'my_request', -// persistent: false, -// onSuccess: function(response) { print(response); }, -// onFailure: function(error_code, error_message) {} }); -// -// 8. Handle the query in your Handler::OnQuery implementation and execute the -// appropriate callback either immediately or asynchronously. -// -// void MyHandler::OnQuery(int64 query_id, -// CefRefPtr browser, -// CefRefPtr frame, -// const CefString& request, -// bool persistent, -// CefRefPtr callback) { -// if (request == "my_request") { -// callback->Continue("my_response"); -// return true; -// } -// return false; // Not handled. -// } -// -// 9. Notice that the onSuccess callback is executed in JavaScript. - -/// -// Used to configure the query router. The same values must be passed to both -// CefMessageRouterBrowserSide and CefMessageRouterRendererSide. If using multiple -// router pairs make sure to choose values that do not conflict. -/// -struct CefMessageRouterConfig { - CefMessageRouterConfig(); - - // Name of the JavaScript function that will be added to the 'window' object - // for sending a query. The default value is "cefQuery". - CefString js_query_function; - - // Name of the JavaScript function that will be added to the 'window' object - // for canceling a pending query. The default value is "cefQueryCancel". - CefString js_cancel_function; -}; - -/// -// Implements the browser side of query routing. The methods of this class may -// be called on any browser process thread unless otherwise indicated. -/// -class CefMessageRouterBrowserSide : - public base::RefCountedThreadSafe { - public: - /// - // Callback associated with a single pending asynchronous query. Execute the - // Success or Failure method to send an asynchronous response to the - // associated JavaScript handler. It is a runtime error to destroy a Callback - // object associated with an uncanceled query without first executing one of - // the callback methods. The methods of this class may be called on any - // browser process thread. - /// - class Callback : public CefBase { - public: - /// - // Notify the associated JavaScript onSuccess callback that the query has - // completed successfully with the specified |response|. - /// - virtual void Success(const CefString& response) =0; - - /// - // Notify the associated JavaScript onFailure callback that the query has - // failed with the specified |error_code| and |error_message|. - /// - virtual void Failure(int error_code, const CefString& error_message) =0; - }; - - /// - // Implement this interface to handle queries. All methods will be executed on - // the browser process UI thread. - /// - class Handler { - public: - typedef CefMessageRouterBrowserSide::Callback Callback; - - /// - // Executed when a new query is received. |query_id| uniquely identifies the - // query for the life span of the router. Return true to handle the query - // or false to propagate the query to other registered handlers, if any. If - // no handlers return true from this method then the query will be - // automatically canceled with an error code of -1 delivered to the - // JavaScript onFailure callback. If this method returns true then a - // Callback method must be executed either in this method or asynchronously - // to complete the query. - /// - virtual bool OnQuery(CefRefPtr browser, - CefRefPtr frame, - int64 query_id, - const CefString& request, - bool persistent, - CefRefPtr callback) { - return false; - } - - /// - // Executed when a query has been canceled either explicitly using the - // JavaScript cancel function or implicitly due to browser destruction, - // navigation or renderer process termination. It will only be called for - // the single handler that returned true from OnQuery for the same - // |query_id|. No references to the associated Callback object should be - // kept after this method is called, nor should any Callback methods be - // executed. - /// - virtual void OnQueryCanceled(CefRefPtr browser, - CefRefPtr frame, - int64 query_id) {} - - virtual ~Handler() {} - }; - - /// - // Create a new router with the specified configuration. - /// - static CefRefPtr Create( - const CefMessageRouterConfig& config); - - /// - // Add a new query handler. If |first| is true it will be added as the first - // handler, otherwise it will be added as the last handler. Returns true if - // the handler is added successfully or false if the handler has already been - // added. Must be called on the browser process UI thread. The Handler object - // must either outlive the router or be removed before deletion. - /// - virtual bool AddHandler(Handler* handler, bool first) =0; - - /// - // Remove an existing query handler. Any pending queries associated with the - // handler will be canceled. Handler::OnQueryCanceled will be called and the - // associated JavaScript onFailure callback will be executed with an error - // code of -1. Returns true if the handler is removed successfully or false - // if the handler is not found. Must be called on the browser process UI - // thread. - /// - virtual bool RemoveHandler(Handler* handler) =0; - - /// - // Cancel all pending queries associated with either |browser| or |handler|. - // If both |browser| and |handler| are NULL all pending queries will be - // canceled. Handler::OnQueryCanceled will be called and the associated - // JavaScript onFailure callback will be executed in all cases with an error - // code of -1. - /// - virtual void CancelPending(CefRefPtr browser, - Handler* handler) =0; - - /// - // Returns the number of queries currently pending for the specified |browser| - // and/or |handler|. Either or both values may be empty. Must be called on the - // browser process UI thread. - /// - virtual int GetPendingCount(CefRefPtr browser, - Handler* handler) =0; - - - // The below methods should be called from other CEF handlers. They must be - // called exactly as documented for the router to function correctly. - - /// - // Call from CefLifeSpanHandler::OnBeforeClose. Any pending queries associated - // with |browser| will be canceled and Handler::OnQueryCanceled will be called. - // No JavaScript callbacks will be executed since this indicates destruction - // of the browser. - /// - virtual void OnBeforeClose(CefRefPtr browser) =0; - - /// - // Call from CefRequestHandler::OnRenderProcessTerminated. Any pending queries - // associated with |browser| will be canceled and Handler::OnQueryCanceled - // will be called. No JavaScript callbacks will be executed since this - // indicates destruction of the context. - /// - virtual void OnRenderProcessTerminated(CefRefPtr browser) =0; - - /// - // Call from CefRequestHandler::OnBeforeBrowse only if the navigation is - // allowed to proceed. If |frame| is the main frame then any pending queries - // associated with |browser| will be canceled and Handler::OnQueryCanceled - // will be called. No JavaScript callbacks will be executed since this - // indicates destruction of the context. - /// - virtual void OnBeforeBrowse(CefRefPtr browser, - CefRefPtr frame) =0; - - /// - // Call from CefClient::OnProcessMessageReceived. Returns true if the message - // is handled by this router or false otherwise. - /// - virtual bool OnProcessMessageReceived( - CefRefPtr browser, - CefProcessId source_process, - CefRefPtr message) =0; - - protected: - // Protect against accidental deletion of this object. - friend class base::RefCountedThreadSafe; - virtual ~CefMessageRouterBrowserSide() {} -}; - -/// -// Implements the renderer side of query routing. The methods of this class must -// be called on the render process main thread. -/// -class CefMessageRouterRendererSide : - public base::RefCountedThreadSafe { - public: - /// - // Create a new router with the specified configuration. - /// - static CefRefPtr Create( - const CefMessageRouterConfig& config); - - /// - // Returns the number of queries currently pending for the specified |browser| - // and/or |context|. Either or both values may be empty. - /// - virtual int GetPendingCount(CefRefPtr browser, - CefRefPtr context) =0; - - - // The below methods should be called from other CEF handlers. They must be - // called exactly as documented for the router to function correctly. - - /// - // Call from CefRenderProcessHandler::OnContextCreated. Registers the - // JavaScripts functions with the new context. - /// - virtual void OnContextCreated(CefRefPtr browser, - CefRefPtr frame, - CefRefPtr context) =0; - - /// - // Call from CefRenderProcessHandler::OnContextReleased. Any pending queries - // associated with the released context will be canceled and - // Handler::OnQueryCanceled will be called in the browser process. - /// - virtual void OnContextReleased(CefRefPtr browser, - CefRefPtr frame, - CefRefPtr context) =0; - - /// - // Call from CefRenderProcessHandler::OnProcessMessageReceived. Returns true - // if the message is handled by this router or false otherwise. - /// - virtual bool OnProcessMessageReceived( - CefRefPtr browser, - CefProcessId source_process, - CefRefPtr message) =0; - - protected: - // Protect against accidental deletion of this object. - friend class base::RefCountedThreadSafe; - virtual ~CefMessageRouterRendererSide() {} -}; - -#endif // CEF_INCLUDE_WRAPPER_CEF_MESSAGE_ROUTER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/wrapper/cef_resource_manager.h b/tool_kits/cef/cef_wrapper/include/wrapper/cef_resource_manager.h deleted file mode 100644 index c7c5918a..00000000 --- a/tool_kits/cef/cef_wrapper/include/wrapper/cef_resource_manager.h +++ /dev/null @@ -1,372 +0,0 @@ -// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// --------------------------------------------------------------------------- -// -// The contents of this file are only available to applications that link -// against the libcef_dll_wrapper target. -// - -#ifndef CEF_INCLUDE_WRAPPER_CEF_RESOURCE_MANAGER_H_ -#define CEF_INCLUDE_WRAPPER_CEF_RESOURCE_MANAGER_H_ -#pragma once - -#include - -#include "include/base/cef_macros.h" -#include "include/base/cef_ref_counted.h" -#include "include/base/cef_weak_ptr.h" -#include "include/cef_request_handler.h" -#include "include/wrapper/cef_closure_task.h" -#include "include/wrapper/cef_helpers.h" - -/// -// Class for managing multiple resource providers. For each resource request -// providers will be called in order and have the option to (a) handle the -// request by returning a CefResourceHandler, (b) pass the request to the next -// provider in order, or (c) stop handling the request. See comments on the -// Request object for additional usage information. The methods of this class -// may be called on any browser process thread unless otherwise indicated. -/// -class CefResourceManager : - public base::RefCountedThreadSafe { - public: - /// - // Provides an opportunity to modify |url| before it is passed to a provider. - // For example, the implementation could rewrite |url| to include a default - // file extension. |url| will be fully qualified and may contain query or - // fragment components. - /// - typedef base::Callback UrlFilter; - - /// - // Used to resolve mime types for URLs, usually based on the file extension. - // |url| will be fully qualified and may contain query or fragment components. - /// - typedef base::Callback MimeTypeResolver; - - private: - // Values that stay with a request as it moves between providers. - struct RequestParams { - std::string url_; - CefRefPtr browser_; - CefRefPtr frame_; - CefRefPtr request_; - UrlFilter url_filter_; - MimeTypeResolver mime_type_resolver_; - }; - - // Values that are associated with the pending request only. - struct RequestState; - - public: - /// - // Object representing a request. Each request object is used for a single - // call to Provider::OnRequest and will become detached (meaning the callbacks - // will no longer trigger) after Request::Continue or Request::Stop is called. - // A request passed to Provider::OnRequestCanceled will already have been - // detached. The methods of this class may be called on any browser process - // thread. - /// - class Request : public base::RefCountedThreadSafe { - public: - /// - // Returns the URL associated with this request. The returned value will be - // fully qualified but will not contain query or fragment components. It - // will already have been passed through the URL filter. - /// - std::string url() const { return params_.url_; } - - /// - // Returns the CefBrowser associated with this request. - /// - CefRefPtr browser() const { return params_.browser_; } - - /// - // Returns the CefFrame associated with this request. - /// - CefRefPtr frame() const { return params_.frame_; } - - /// - // Returns the CefRequest associated with this request. - /// - CefRefPtr request() const { return params_.request_; } - - /// - // Returns the current URL filter. - /// - const CefResourceManager::UrlFilter& url_filter() const { - return params_.url_filter_; - } - - /// - // Returns the current mime type resolver. - /// - const CefResourceManager::MimeTypeResolver& mime_type_resolver() const { - return params_.mime_type_resolver_; - } - - /// - // Continue handling the request. If |handler| is non-NULL then no - // additional providers will be called and the |handler| value will be - // returned via CefResourceManager::GetResourceHandler. If |handler| is NULL - // then the next provider in order, if any, will be called. If there are no - // additional providers then NULL will be returned via CefResourceManager:: - // GetResourceHandler. - /// - void Continue(CefRefPtr handler); - - /// - // Stop handling the request. No additional providers will be called and - // NULL will be returned via CefResourceManager::GetResourceHandler. - /// - void Stop(); - - private: - // Only allow deletion via scoped_refptr. - friend class base::RefCountedThreadSafe; - - friend class CefResourceManager; - - // The below methods are called on the browser process IO thread. - - explicit Request(scoped_ptr state); - - scoped_ptr SendRequest(); - bool HasState(); - - static void ContinueOnIOThread(scoped_ptr state, - CefRefPtr handler); - static void StopOnIOThread(scoped_ptr state); - - // Will be non-NULL while the request is pending. Only accessed on the - // browser process IO thread. - scoped_ptr state_; - - // Params that stay with this request object. Safe to access on any thread. - RequestParams params_; - - DISALLOW_COPY_AND_ASSIGN(Request); - }; - - typedef std::list > RequestList; - - - /// - // Interface implemented by resource providers. A provider may be created on - // any thread but the methods will be called on, and the object will be - // destroyed on, the browser process IO thread. - /// - class Provider { - public: - /// - // Called to handle a request. If the provider knows immediately that it - // will not handle the request return false. Otherwise, return true and call - // Request::Continue or Request::Stop either in this method or - // asynchronously to indicate completion. See comments on Request for - // additional usage information. - /// - virtual bool OnRequest(scoped_refptr request) =0; - - /// - // Called when a request has been canceled. It is still safe to dereference - // |request| but any calls to Request::Continue or Request::Stop will be - // ignored. - /// - virtual void OnRequestCanceled(scoped_refptr request) {} - - virtual ~Provider() {} - }; - - CefResourceManager(); - - /// - // Add a provider that maps requests for |url| to |content|. |url| should be - // fully qualified but not include a query or fragment component. If - // |mime_type| is empty the MimeTypeResolver will be used. See comments on - // AddProvider for usage of the |order| and |identifier| parameters. - /// - void AddContentProvider(const std::string& url, - const std::string& content, - const std::string& mime_type, - int order, - const std::string& identifier); - - /// - // Add a provider that maps requests that start with |url_path| to files under - // |directory_path|. |url_path| should include an origin and optional path - // component only. Files will be loaded when a matching URL is requested. - // See comments on AddProvider for usage of the |order| and |identifier| - // parameters. - /// - void AddDirectoryProvider(const std::string& url_path, - const std::string& directory_path, - int order, - const std::string& identifier); - - /// - // Add a provider that maps requests that start with |url_path| to files - // stored in the archive file at |archive_path|. |url_path| should include an - // origin and optional path component only. The archive file will be loaded - // when a matching URL is requested for the first time. See comments on - // AddProvider for usage of the |order| and |identifier| parameters. - /// - void AddArchiveProvider(const std::string& url_path, - const std::string& archive_path, - const std::string& password, - int order, - const std::string& identifier); - - /// - // Add a provider. This object takes ownership of |provider|. Providers will - // be called in ascending order based on the |order| value. Multiple providers - // sharing the same |order| value will be called in the order that they were - // added. The |identifier| value, which does not need to be unique, can be - // used to remove the provider at a later time. - /// - void AddProvider(Provider* provider, - int order, - const std::string& identifier); - - /// - // Remove all providers with the specified |identifier| value. If any removed - // providers have pending requests the Provider::OnRequestCancel method will - // be called. The removed providers may be deleted immediately or at a later - // time. - /// - void RemoveProviders(const std::string& identifier); - - /// - // Remove all providers. If any removed providers have pending requests the - // Provider::OnRequestCancel method will be called. The removed providers may - // be deleted immediately or at a later time. - /// - void RemoveAllProviders(); - - /// - // Set the url filter. If not set the default no-op filter will be used. - // Changes to this value will not affect currently pending requests. - /// - void SetUrlFilter(const UrlFilter& filter); - - /// - // Set the mime type resolver. If not set the default resolver will be used. - // Changes to this value will not affect currently pending requests. - /// - void SetMimeTypeResolver(const MimeTypeResolver& resolver); - - - // The below methods should be called from other CEF handlers. They must be - // called exactly as documented for the manager to function correctly. - - /// - // Called from CefRequestHandler::OnBeforeResourceLoad on the browser process - // IO thread. - /// - cef_return_value_t OnBeforeResourceLoad( - CefRefPtr browser, - CefRefPtr frame, - CefRefPtr request, - CefRefPtr callback); - - /// - // Called from CefRequestHandler::GetResourceHandler on the browser process - // IO thread. - /// - CefRefPtr GetResourceHandler( - CefRefPtr browser, - CefRefPtr frame, - CefRefPtr request); - - private: - // Only allow deletion via scoped_refptr. - friend struct CefDeleteOnThread; - friend class base::RefCountedThreadSafe; - - ~CefResourceManager(); - - // Provider and associated information. - struct ProviderEntry; - typedef std::list ProviderEntryList; - - // Values associated with the pending request only. Ownership will be passed - // between requests and the resource manager as request handling proceeds. - struct RequestState { - ~RequestState(); - - base::WeakPtr manager_; - - // Callback to execute once request handling is complete. - CefRefPtr callback_; - - // Position of the currently associated ProviderEntry in the |providers_| - // list. - ProviderEntryList::iterator current_entry_pos_; - - // Position of this request object in the currently associated - // ProviderEntry's |pending_requests_| list. - RequestList::iterator current_request_pos_; - - // Params that will be copied to each request object. - RequestParams params_; - }; - - // Methods that manage request state between requests. Called on the browser - // process IO thread. - bool SendRequest(scoped_ptr state); - void ContinueRequest(scoped_ptr state, - CefRefPtr handler); - void StopRequest(scoped_ptr state); - bool IncrementProvider(RequestState* state); - void DetachRequestFromProvider(RequestState* state); - void GetNextValidProvider(ProviderEntryList::iterator& iterator); - void DeleteProvider(ProviderEntryList::iterator& iterator, bool stop); - - // The below members are only accessed on the browser process IO thread. - - // List of providers including additional associated information. - ProviderEntryList providers_; - - // Map of response ID to pending CefResourceHandler object. - typedef std::map > PendingHandlersMap; - PendingHandlersMap pending_handlers_; - - UrlFilter url_filter_; - MimeTypeResolver mime_type_resolver_; - - // Must be the last member. Created and accessed on the IO thread. - scoped_ptr > weak_ptr_factory_; - - DISALLOW_COPY_AND_ASSIGN(CefResourceManager); -}; - -#endif // CEF_INCLUDE_WRAPPER_CEF_RESOURCE_MANAGER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/wrapper/cef_stream_resource_handler.h b/tool_kits/cef/cef_wrapper/include/wrapper/cef_stream_resource_handler.h deleted file mode 100644 index 6a9a6981..00000000 --- a/tool_kits/cef/cef_wrapper/include/wrapper/cef_stream_resource_handler.h +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// --------------------------------------------------------------------------- -// -// The contents of this file are only available to applications that link -// against the libcef_dll_wrapper target. -// - -#ifndef CEF_INCLUDE_WRAPPER_CEF_STREAM_RESOURCE_HANDLER_H_ -#define CEF_INCLUDE_WRAPPER_CEF_STREAM_RESOURCE_HANDLER_H_ -#pragma once - -#include "include/base/cef_macros.h" -#include "include/base/cef_scoped_ptr.h" -#include "include/cef_base.h" -#include "include/cef_resource_handler.h" -#include "include/cef_response.h" - -class CefStreamReader; - -/// -// Implementation of the CefResourceHandler class for reading from a CefStream. -/// -class CefStreamResourceHandler : public CefResourceHandler { - public: - /// - // Create a new object with default response values. - /// - CefStreamResourceHandler(const CefString& mime_type, - CefRefPtr stream); - /// - // Create a new object with explicit response values. - /// - CefStreamResourceHandler(int status_code, - const CefString& status_text, - const CefString& mime_type, - CefResponse::HeaderMap header_map, - CefRefPtr stream); - - virtual ~CefStreamResourceHandler(); - - // CefResourceHandler methods. - virtual bool ProcessRequest(CefRefPtr request, - CefRefPtr callback) OVERRIDE; - virtual void GetResponseHeaders(CefRefPtr response, - int64& response_length, - CefString& redirectUrl) OVERRIDE; - virtual bool ReadResponse(void* data_out, - int bytes_to_read, - int& bytes_read, - CefRefPtr callback) OVERRIDE; - virtual void Cancel() OVERRIDE; - - private: - void ReadOnFileThread(int bytes_to_read, - CefRefPtr callback); - - const int status_code_; - const CefString status_text_; - const CefString mime_type_; - const CefResponse::HeaderMap header_map_; - const CefRefPtr stream_; - bool read_on_file_thread_; - - class Buffer; - scoped_ptr buffer_; -#ifndef NDEBUG - // Used in debug builds to verify that |buffer_| isn't being accessed on - // multiple threads at the same time. - bool buffer_owned_by_file_thread_; -#endif - - IMPLEMENT_REFCOUNTING(CefStreamResourceHandler); - DISALLOW_COPY_AND_ASSIGN(CefStreamResourceHandler); -}; - -#endif // CEF_INCLUDE_WRAPPER_CEF_STREAM_RESOURCE_HANDLER_H_ diff --git a/tool_kits/cef/cef_wrapper/include/wrapper/cef_xml_object.h b/tool_kits/cef/cef_wrapper/include/wrapper/cef_xml_object.h deleted file mode 100644 index bf175543..00000000 --- a/tool_kits/cef/cef_wrapper/include/wrapper/cef_xml_object.h +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// --------------------------------------------------------------------------- -// -// The contents of this file are only available to applications that link -// against the libcef_dll_wrapper target. -// - -#ifndef CEF_INCLUDE_WRAPPER_CEF_XML_OBJECT_H_ -#define CEF_INCLUDE_WRAPPER_CEF_XML_OBJECT_H_ -#pragma once - -#include -#include - -#include "include/base/cef_lock.h" -#include "include/base/cef_macros.h" -#include "include/base/cef_ref_counted.h" -#include "include/cef_base.h" -#include "include/cef_xml_reader.h" - -class CefStreamReader; - -/// -// Thread safe class for representing XML data as a structured object. This -// class should not be used with large XML documents because all data will be -// resident in memory at the same time. This implementation supports a -// restricted set of XML features: -//
-// (1) Processing instructions, whitespace and comments are ignored.
-// (2) Elements and attributes must always be referenced using the fully
-//     qualified name (ie, namespace:localname).
-// (3) Empty elements () and elements with zero-length values ()
-//     are considered the same.
-// (4) Element nodes are considered part of a value if:
-//     (a) The element node follows a non-element node at the same depth
-//         (see 5), or
-//     (b) The element node does not have a namespace and the parent node does.
-// (5) Mixed node types at the same depth are combined into a single element
-//     value as follows:
-//     (a) All node values are concatenated to form a single string value.
-//     (b) Entity reference nodes are resolved to the corresponding entity
-//         value.
-//     (c) Element nodes are represented by their outer XML string.
-// 
-/// -class CefXmlObject : public base::RefCountedThreadSafe { - public: - typedef std::vector > ObjectVector; - typedef std::map AttributeMap; - - /// - // Create a new object with the specified name. An object name must always be - // at least one character long. - /// - explicit CefXmlObject(const CefString& name); - - /// - // Load the contents of the specified XML stream into this object. The - // existing children and attributes, if any, will first be cleared. - /// - bool Load(CefRefPtr stream, - CefXmlReader::EncodingType encodingType, - const CefString& URI, CefString* loadError); - - /// - // Set the name, children and attributes of this object to a duplicate of the - // specified object's contents. The existing children and attributes, if any, - // will first be cleared. - /// - void Set(CefRefPtr object); - - /// - // Append a duplicate of the children and attributes of the specified object - // to this object. If |overwriteAttributes| is true then any attributes in - // this object that also exist in the specified object will be overwritten - // with the new values. The name of this object is not changed. - /// - void Append(CefRefPtr object, bool overwriteAttributes); - - /// - // Return a new object with the same name, children and attributes as this - // object. The parent of the new object will be NULL. - /// - CefRefPtr Duplicate(); - - /// - // Clears this object's children and attributes. The name and parenting of - // this object are not changed. - /// - void Clear(); - - /// - // Access the object's name. An object name must always be at least one - // character long. - /// - CefString GetName(); - bool SetName(const CefString& name); - - /// - // Access the object's parent. The parent can be NULL if this object has not - // been added as the child on another object. - /// - bool HasParent(); - CefRefPtr GetParent(); - - /// - // Access the object's value. An object cannot have a value if it also has - // children. Attempting to set the value while children exist will fail. - /// - bool HasValue(); - CefString GetValue(); - bool SetValue(const CefString& value); - - /// - // Access the object's attributes. Attributes must have unique names. - /// - bool HasAttributes(); - size_t GetAttributeCount(); - bool HasAttribute(const CefString& name); - CefString GetAttributeValue(const CefString& name); - bool SetAttributeValue(const CefString& name, const CefString& value); - size_t GetAttributes(AttributeMap& attributes); - void ClearAttributes(); - - /// - // Access the object's children. Each object can only have one parent so - // attempting to add an object that already has a parent will fail. Removing a - // child will set the child's parent to NULL. Adding a child will set the - // child's parent to this object. This object's value, if any, will be cleared - // if a child is added. - /// - bool HasChildren(); - size_t GetChildCount(); - bool HasChild(CefRefPtr child); - bool AddChild(CefRefPtr child); - bool RemoveChild(CefRefPtr child); - size_t GetChildren(ObjectVector& children); - void ClearChildren(); - - /// - // Find the first child with the specified name. - /// - CefRefPtr FindChild(const CefString& name); - - /// - // Find all children with the specified name. - /// - size_t FindChildren(const CefString& name, ObjectVector& children); - - private: - // Protect against accidental deletion of this object. - friend class base::RefCountedThreadSafe; - ~CefXmlObject(); - - void SetParent(CefXmlObject* parent); - - CefString name_; - CefXmlObject* parent_; - CefString value_; - AttributeMap attributes_; - ObjectVector children_; - - base::Lock lock_; - - DISALLOW_COPY_AND_ASSIGN(CefXmlObject); -}; - -#endif // CEF_INCLUDE_WRAPPER_CEF_XML_OBJECT_H_ diff --git a/tool_kits/cef/cef_wrapper/include/wrapper/cef_zip_archive.h b/tool_kits/cef/cef_wrapper/include/wrapper/cef_zip_archive.h deleted file mode 100644 index 7ad10bda..00000000 --- a/tool_kits/cef/cef_wrapper/include/wrapper/cef_zip_archive.h +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// --------------------------------------------------------------------------- -// -// The contents of this file are only available to applications that link -// against the libcef_dll_wrapper target. -// - -#ifndef CEF_INCLUDE_WRAPPER_CEF_ZIP_ARCHIVE_H_ -#define CEF_INCLUDE_WRAPPER_CEF_ZIP_ARCHIVE_H_ -#pragma once - -#include - -#include "include/base/cef_lock.h" -#include "include/base/cef_macros.h" -#include "include/base/cef_ref_counted.h" -#include "include/cef_base.h" - -class CefStreamReader; - -/// -// Thread-safe class for accessing zip archive file contents. This class should -// not be used with large archive files because all data will be resident in -// memory at the same time. This implementation supports a restricted set of zip -// archive features: -// (1) All file names are stored and compared in lower case. -// (2) File ordering from the original zip archive is not maintained. This -// means that files from the same folder may not be located together in the -// file content map. -/// -class CefZipArchive : public base::RefCountedThreadSafe { - public: - /// - // Class representing a file in the archive. Accessing the file data from - // multiple threads is safe provided a reference to the File object is kept. - /// - class File : public CefBase { - public: - /// - // Returns the read-only data contained in the file. - /// - virtual const unsigned char* GetData() const =0; - - /// - // Returns the size of the data in the file. - /// - virtual size_t GetDataSize() const =0; - - /// - // Returns a CefStreamReader object for streaming the contents of the file. - /// - virtual CefRefPtr GetStreamReader() const =0; - }; - - typedef std::map > FileMap; - - /// - // Create a new object. - /// - CefZipArchive(); - - /// - // Load the contents of the specified zip archive stream into this object. - // If the zip archive requires a password then provide it via |password|. - // If |overwriteExisting| is true then any files in this object that also - // exist in the specified archive will be replaced with the new files. - // Returns the number of files successfully loaded. - /// - size_t Load(CefRefPtr stream, - const CefString& password, - bool overwriteExisting); - - /// - // Clears the contents of this object. - /// - void Clear(); - - /// - // Returns the number of files in the archive. - /// - size_t GetFileCount() const; - - /// - // Returns true if the specified file exists and has contents. - /// - bool HasFile(const CefString& fileName) const; - - /// - // Returns the specified file. - /// - CefRefPtr GetFile(const CefString& fileName) const; - - /// - // Removes the specified file. - /// - bool RemoveFile(const CefString& fileName); - - /// - // Returns the map of all files. - /// - size_t GetFiles(FileMap& map) const; - - private: - // Protect against accidental deletion of this object. - friend class base::RefCountedThreadSafe; - ~CefZipArchive(); - - FileMap contents_; - - mutable base::Lock lock_; - - DISALLOW_COPY_AND_ASSIGN(CefZipArchive); -}; - -#endif // CEF_INCLUDE_WRAPPER_CEF_ZIP_ARCHIVE_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_atomicops_x86_gcc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_atomicops_x86_gcc.cc deleted file mode 100644 index 4471eeda..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_atomicops_x86_gcc.cc +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// This module gets enough CPU information to optimize the -// atomicops module on x86. - -#include -#include - -#include "include/base/cef_atomicops.h" - -// This file only makes sense with atomicops_internals_x86_gcc.h -- it -// depends on structs that are defined in that file. If atomicops.h -// doesn't sub-include that file, then we aren't needed, and shouldn't -// try to do anything. -#ifdef CEF_INCLUDE_BASE_INTERNAL_CEF_ATOMICOPS_X86_GCC_H_ - -// Inline cpuid instruction. In PIC compilations, %ebx contains the address -// of the global offset table. To avoid breaking such executables, this code -// must preserve that register's value across cpuid instructions. -#if defined(__i386__) -#define cpuid(a, b, c, d, inp) \ - asm("mov %%ebx, %%edi\n" \ - "cpuid\n" \ - "xchg %%edi, %%ebx\n" \ - : "=a" (a), "=D" (b), "=c" (c), "=d" (d) : "a" (inp)) -#elif defined(__x86_64__) -#define cpuid(a, b, c, d, inp) \ - asm("mov %%rbx, %%rdi\n" \ - "cpuid\n" \ - "xchg %%rdi, %%rbx\n" \ - : "=a" (a), "=D" (b), "=c" (c), "=d" (d) : "a" (inp)) -#endif - -#if defined(cpuid) // initialize the struct only on x86 - -// Set the flags so that code will run correctly and conservatively, so even -// if we haven't been initialized yet, we're probably single threaded, and our -// default values should hopefully be pretty safe. -struct AtomicOps_x86CPUFeatureStruct AtomicOps_Internalx86CPUFeatures = { - false, // bug can't exist before process spawns multiple threads -}; - -namespace { - -// Initialize the AtomicOps_Internalx86CPUFeatures struct. -void AtomicOps_Internalx86CPUFeaturesInit() { - uint32_t eax; - uint32_t ebx; - uint32_t ecx; - uint32_t edx; - - // Get vendor string (issue CPUID with eax = 0) - cpuid(eax, ebx, ecx, edx, 0); - char vendor[13]; - memcpy(vendor, &ebx, 4); - memcpy(vendor + 4, &edx, 4); - memcpy(vendor + 8, &ecx, 4); - vendor[12] = 0; - - // get feature flags in ecx/edx, and family/model in eax - cpuid(eax, ebx, ecx, edx, 1); - - int family = (eax >> 8) & 0xf; // family and model fields - int model = (eax >> 4) & 0xf; - if (family == 0xf) { // use extended family and model fields - family += (eax >> 20) & 0xff; - model += ((eax >> 16) & 0xf) << 4; - } - - // Opteron Rev E has a bug in which on very rare occasions a locked - // instruction doesn't act as a read-acquire barrier if followed by a - // non-locked read-modify-write instruction. Rev F has this bug in - // pre-release versions, but not in versions released to customers, - // so we test only for Rev E, which is family 15, model 32..63 inclusive. - if (strcmp(vendor, "AuthenticAMD") == 0 && // AMD - family == 15 && - 32 <= model && model <= 63) { - AtomicOps_Internalx86CPUFeatures.has_amd_lock_mb_bug = true; - } else { - AtomicOps_Internalx86CPUFeatures.has_amd_lock_mb_bug = false; - } -} - -class AtomicOpsx86Initializer { - public: - AtomicOpsx86Initializer() { - AtomicOps_Internalx86CPUFeaturesInit(); - } -}; - -// A global to get use initialized on startup via static initialization :/ -AtomicOpsx86Initializer g_initer; - -} // namespace - -#endif // if x86 - -#endif // ifdef CEF_INCLUDE_BASE_CEF_ATOMICOPS_INTERNALS_X86_GCC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_bind_helpers.cc b/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_bind_helpers.cc deleted file mode 100644 index b65f5f31..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_bind_helpers.cc +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "include/base/cef_bind_helpers.h" - -#include "include/base/cef_callback.h" - -namespace base { - -void DoNothing() { -} - -} // namespace base diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_callback_helpers.cc b/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_callback_helpers.cc deleted file mode 100644 index 726104c7..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_callback_helpers.cc +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "include/base/cef_callback_helpers.h" - -#include "include/base/cef_callback.h" - -namespace base { - -ScopedClosureRunner::ScopedClosureRunner() { -} - -ScopedClosureRunner::ScopedClosureRunner(const Closure& closure) - : closure_(closure) { -} - -ScopedClosureRunner::~ScopedClosureRunner() { - if (!closure_.is_null()) - closure_.Run(); -} - -void ScopedClosureRunner::Reset() { - Closure old_closure = Release(); - if (!old_closure.is_null()) - old_closure.Run(); -} - -void ScopedClosureRunner::Reset(const Closure& closure) { - Closure old_closure = Release(); - closure_ = closure; - if (!old_closure.is_null()) - old_closure.Run(); -} - -Closure ScopedClosureRunner::Release() { - Closure result = closure_; - closure_.Reset(); - return result; -} - -} // namespace base diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_callback_internal.cc b/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_callback_internal.cc deleted file mode 100644 index c1044f64..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_callback_internal.cc +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "include/base/internal/cef_callback_internal.h" - -#include "include/base/cef_logging.h" - -namespace base { -namespace cef_internal { - -void BindStateBase::AddRef() { - AtomicRefCountInc(&ref_count_); -} - -void BindStateBase::Release() { - if (!AtomicRefCountDec(&ref_count_)) - destructor_(this); -} - -void CallbackBase::Reset() { - polymorphic_invoke_ = NULL; - // NULL the bind_state_ last, since it may be holding the last ref to whatever - // object owns us, and we may be deleted after that. - bind_state_ = NULL; -} - -bool CallbackBase::Equals(const CallbackBase& other) const { - return bind_state_.get() == other.bind_state_.get() && - polymorphic_invoke_ == other.polymorphic_invoke_; -} - -CallbackBase::CallbackBase(BindStateBase* bind_state) - : bind_state_(bind_state), - polymorphic_invoke_(NULL) { - DCHECK(!bind_state_.get() || bind_state_->ref_count_ == 1); -} - -CallbackBase::~CallbackBase() { -} - -} // namespace cef_internal -} // namespace base diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_lock.cc b/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_lock.cc deleted file mode 100644 index f0a2cd44..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_lock.cc +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// This file is used for debugging assertion support. The Lock class -// is functionally a wrapper around the LockImpl class, so the only -// real intelligence in the class is in the debugging logic. - -#if !defined(NDEBUG) - -#include "include/base/cef_lock.h" -#include "include/base/cef_logging.h" - -namespace base { - -Lock::Lock() : lock_() { -} - -Lock::~Lock() { - DCHECK(owning_thread_ref_.is_null()); -} - -void Lock::AssertAcquired() const { - DCHECK(owning_thread_ref_ == PlatformThread::CurrentRef()); -} - -void Lock::CheckHeldAndUnmark() { - DCHECK(owning_thread_ref_ == PlatformThread::CurrentRef()); - owning_thread_ref_ = PlatformThreadRef(); -} - -void Lock::CheckUnheldAndMark() { - // Hitting this DCHECK means that your code is trying to re-enter a lock that - // is already held. The Chromium Lock implementation is not reentrant. - // See "Why can the holder of a Lock not reacquire it?" at - // http://www.chromium.org/developers/lock-and-condition-variable for more - // information. - DCHECK(owning_thread_ref_.is_null()); - owning_thread_ref_ = PlatformThread::CurrentRef(); -} - -} // namespace base - -#endif // NDEBUG diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_lock_impl.cc b/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_lock_impl.cc deleted file mode 100644 index fa772e1f..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_lock_impl.cc +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "include/base/internal/cef_lock_impl.h" - -#if defined(OS_WIN) - -namespace base { -namespace cef_internal { - -LockImpl::LockImpl() { - // The second parameter is the spin count, for short-held locks it avoid the - // contending thread from going to sleep which helps performance greatly. - ::InitializeCriticalSectionAndSpinCount(&native_handle_, 2000); -} - -LockImpl::~LockImpl() { - ::DeleteCriticalSection(&native_handle_); -} - -bool LockImpl::Try() { - if (::TryEnterCriticalSection(&native_handle_) != FALSE) { - return true; - } - return false; -} - -void LockImpl::Lock() { - ::EnterCriticalSection(&native_handle_); -} - -void LockImpl::Unlock() { - ::LeaveCriticalSection(&native_handle_); -} - -} // namespace cef_internal -} // namespace base - -#elif defined(OS_POSIX) - -#include -#include - -#include "include/base/cef_logging.h" - -namespace base { -namespace cef_internal { - -LockImpl::LockImpl() { -#ifndef NDEBUG - // In debug, setup attributes for lock error checking. - pthread_mutexattr_t mta; - int rv = pthread_mutexattr_init(&mta); - DCHECK_EQ(rv, 0) << ". " << strerror(rv); - rv = pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_ERRORCHECK); - DCHECK_EQ(rv, 0) << ". " << strerror(rv); - rv = pthread_mutex_init(&native_handle_, &mta); - DCHECK_EQ(rv, 0) << ". " << strerror(rv); - rv = pthread_mutexattr_destroy(&mta); - DCHECK_EQ(rv, 0) << ". " << strerror(rv); -#else - // In release, go with the default lock attributes. - pthread_mutex_init(&native_handle_, NULL); -#endif -} - -LockImpl::~LockImpl() { - int rv = pthread_mutex_destroy(&native_handle_); - DCHECK_EQ(rv, 0) << ". " << strerror(rv); -} - -bool LockImpl::Try() { - int rv = pthread_mutex_trylock(&native_handle_); - DCHECK(rv == 0 || rv == EBUSY) << ". " << strerror(rv); - return rv == 0; -} - -void LockImpl::Lock() { - int rv = pthread_mutex_lock(&native_handle_); - DCHECK_EQ(rv, 0) << ". " << strerror(rv); -} - -void LockImpl::Unlock() { - int rv = pthread_mutex_unlock(&native_handle_); - DCHECK_EQ(rv, 0) << ". " << strerror(rv); -} - -} // namespace cef_internal -} // namespace base - -#endif // defined(OS_POSIX) diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_logging.cc b/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_logging.cc deleted file mode 100644 index a828b8fa..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_logging.cc +++ /dev/null @@ -1,259 +0,0 @@ -// Copyright (c) 2014 The Chromium Embedded Framework Authors. -// Portions copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "include/base/cef_logging.h" - -#if defined(OS_WIN) -#include -#include -#include -#elif defined(OS_POSIX) -#include -#include -#include -#endif - -#include "include/internal/cef_string_types.h" - -namespace cef { -namespace logging { - -namespace { - -#if defined(OS_POSIX) -// From base/safe_strerror_posix.cc. - -#define USE_HISTORICAL_STRERRO_R (defined(__GLIBC__) || defined(OS_NACL)) - -#if USE_HISTORICAL_STRERRO_R && defined(__GNUC__) -// GCC will complain about the unused second wrap function unless we tell it -// that we meant for them to be potentially unused, which is exactly what this -// attribute is for. -#define POSSIBLY_UNUSED __attribute__((unused)) -#else -#define POSSIBLY_UNUSED -#endif - -#if USE_HISTORICAL_STRERRO_R -// glibc has two strerror_r functions: a historical GNU-specific one that -// returns type char *, and a POSIX.1-2001 compliant one available since 2.3.4 -// that returns int. This wraps the GNU-specific one. -static void POSSIBLY_UNUSED wrap_posix_strerror_r( - char *(*strerror_r_ptr)(int, char *, size_t), - int err, - char *buf, - size_t len) { - // GNU version. - char *rc = (*strerror_r_ptr)(err, buf, len); - if (rc != buf) { - // glibc did not use buf and returned a static string instead. Copy it - // into buf. - buf[0] = '\0'; - strncat(buf, rc, len - 1); - } - // The GNU version never fails. Unknown errors get an "unknown error" message. - // The result is always null terminated. -} -#endif // USE_HISTORICAL_STRERRO_R - -// Wrapper for strerror_r functions that implement the POSIX interface. POSIX -// does not define the behaviour for some of the edge cases, so we wrap it to -// guarantee that they are handled. This is compiled on all POSIX platforms, but -// it will only be used on Linux if the POSIX strerror_r implementation is -// being used (see below). -static void POSSIBLY_UNUSED wrap_posix_strerror_r( - int (*strerror_r_ptr)(int, char *, size_t), - int err, - char *buf, - size_t len) { - int old_errno = errno; - // Have to cast since otherwise we get an error if this is the GNU version - // (but in such a scenario this function is never called). Sadly we can't use - // C++-style casts because the appropriate one is reinterpret_cast but it's - // considered illegal to reinterpret_cast a type to itself, so we get an - // error in the opposite case. - int result = (*strerror_r_ptr)(err, buf, len); - if (result == 0) { - // POSIX is vague about whether the string will be terminated, although - // it indirectly implies that typically ERANGE will be returned, instead - // of truncating the string. We play it safe by always terminating the - // string explicitly. - buf[len - 1] = '\0'; - } else { - // Error. POSIX is vague about whether the return value is itself a system - // error code or something else. On Linux currently it is -1 and errno is - // set. On BSD-derived systems it is a system error and errno is unchanged. - // We try and detect which case it is so as to put as much useful info as - // we can into our message. - int strerror_error; // The error encountered in strerror - int new_errno = errno; - if (new_errno != old_errno) { - // errno was changed, so probably the return value is just -1 or something - // else that doesn't provide any info, and errno is the error. - strerror_error = new_errno; - } else { - // Either the error from strerror_r was the same as the previous value, or - // errno wasn't used. Assume the latter. - strerror_error = result; - } - // snprintf truncates and always null-terminates. - snprintf(buf, - len, - "Error %d while retrieving error %d", - strerror_error, - err); - } - errno = old_errno; -} - -void safe_strerror_r(int err, char *buf, size_t len) { - if (buf == NULL || len <= 0) { - return; - } - // If using glibc (i.e., Linux), the compiler will automatically select the - // appropriate overloaded function based on the function type of strerror_r. - // The other one will be elided from the translation unit since both are - // static. - wrap_posix_strerror_r(&strerror_r, err, buf, len); -} - -std::string safe_strerror(int err) { - const int buffer_size = 256; - char buf[buffer_size]; - safe_strerror_r(err, buf, sizeof(buf)); - return std::string(buf); -} -#endif // defined(OS_POSIX) - -} // namespace - -// MSVC doesn't like complex extern templates and DLLs. -#if !defined(COMPILER_MSVC) -// Explicit instantiations for commonly used comparisons. -template std::string* MakeCheckOpString( - const int&, const int&, const char* names); -template std::string* MakeCheckOpString( - const unsigned long&, const unsigned long&, const char* names); -template std::string* MakeCheckOpString( - const unsigned long&, const unsigned int&, const char* names); -template std::string* MakeCheckOpString( - const unsigned int&, const unsigned long&, const char* names); -template std::string* MakeCheckOpString( - const std::string&, const std::string&, const char* name); -#endif - -#if defined(OS_WIN) -LogMessage::SaveLastError::SaveLastError() : last_error_(::GetLastError()) { -} - -LogMessage::SaveLastError::~SaveLastError() { - ::SetLastError(last_error_); -} -#endif // defined(OS_WIN) - -LogMessage::LogMessage(const char* file, int line, LogSeverity severity) - : severity_(severity), file_(file), line_(line) { -} - -LogMessage::LogMessage(const char* file, int line, std::string* result) - : severity_(LOG_FATAL), file_(file), line_(line) { - stream_ << "Check failed: " << *result; - delete result; -} - -LogMessage::LogMessage(const char* file, int line, LogSeverity severity, - std::string* result) - : severity_(severity), file_(file), line_(line) { - stream_ << "Check failed: " << *result; - delete result; -} - -LogMessage::~LogMessage() { - stream_ << std::endl; - std::string str_newline(stream_.str()); - cef_log(file_, line_, severity_, str_newline.c_str()); -} - -#if defined(OS_WIN) -// This has already been defined in the header, but defining it again as DWORD -// ensures that the type used in the header is equivalent to DWORD. If not, -// the redefinition is a compile error. -typedef DWORD SystemErrorCode; -#endif - -SystemErrorCode GetLastSystemErrorCode() { -#if defined(OS_WIN) - return ::GetLastError(); -#elif defined(OS_POSIX) - return errno; -#else -#error Not implemented -#endif -} - -#if defined(OS_WIN) -std::string SystemErrorCodeToString(SystemErrorCode error_code) { - const int error_message_buffer_size = 256; - char msgbuf[error_message_buffer_size]; - DWORD flags = FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS; - DWORD len = FormatMessageA(flags, NULL, error_code, 0, msgbuf, - arraysize(msgbuf), NULL); - std::stringstream ss; - if (len) { - std::string s(msgbuf); - // Messages returned by system end with line breaks. - s.erase(std::remove_if(s.begin(), s.end(), ::isspace), s.end()); - ss << s << " (0x" << std::hex << error_code << ")"; - } else { - ss << "Error (0x" << std::hex << GetLastError() << - ") while retrieving error. (0x" << error_code << ")"; - } - return ss.str(); -} -#elif defined(OS_POSIX) -std::string SystemErrorCodeToString(SystemErrorCode error_code) { - return safe_strerror(error_code); -} -#else -#error Not implemented -#endif - -#if defined(OS_WIN) -Win32ErrorLogMessage::Win32ErrorLogMessage(const char* file, - int line, - LogSeverity severity, - SystemErrorCode err) - : err_(err), - log_message_(file, line, severity) { -} - -Win32ErrorLogMessage::~Win32ErrorLogMessage() { - stream() << ": " << SystemErrorCodeToString(err_); -} -#elif defined(OS_POSIX) -ErrnoLogMessage::ErrnoLogMessage(const char* file, - int line, - LogSeverity severity, - SystemErrorCode err) - : err_(err), - log_message_(file, line, severity) { -} - -ErrnoLogMessage::~ErrnoLogMessage() { - stream() << ": " << SystemErrorCodeToString(err_); -} -#endif // OS_WIN - -std::ostream& operator<<(std::ostream& out, const wchar_t* wstr) { - cef_string_utf8_t str = {0}; - std::wstring tmp_str(wstr); - cef_string_wide_to_utf8(wstr, tmp_str.size(), &str); - out << str.str; - cef_string_utf8_clear(&str); - return out; -} - -} // namespace logging -} // namespace cef diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_ref_counted.cc b/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_ref_counted.cc deleted file mode 100644 index f894460a..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_ref_counted.cc +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "include/base/cef_ref_counted.h" -#include "include/base/cef_thread_collision_warner.h" - -namespace base { - -namespace cef_subtle { - -bool RefCountedThreadSafeBase::HasOneRef() const { - return AtomicRefCountIsOne( - &const_cast(this)->ref_count_); -} - -RefCountedThreadSafeBase::RefCountedThreadSafeBase() : ref_count_(0) { -#ifndef NDEBUG - in_dtor_ = false; -#endif -} - -RefCountedThreadSafeBase::~RefCountedThreadSafeBase() { -#ifndef NDEBUG - DCHECK(in_dtor_) << "RefCountedThreadSafe object deleted without " - "calling Release()"; -#endif -} - -void RefCountedThreadSafeBase::AddRef() const { -#ifndef NDEBUG - DCHECK(!in_dtor_); -#endif - AtomicRefCountInc(&ref_count_); -} - -bool RefCountedThreadSafeBase::Release() const { -#ifndef NDEBUG - DCHECK(!in_dtor_); - DCHECK(!AtomicRefCountIsZero(&ref_count_)); -#endif - if (!AtomicRefCountDec(&ref_count_)) { -#ifndef NDEBUG - in_dtor_ = true; -#endif - return true; - } - return false; -} - -} // namespace cef_subtle - -} // namespace base diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_string16.cc b/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_string16.cc deleted file mode 100644 index 2e5f0b82..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_string16.cc +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "include/base/cef_string16.h" - -#if defined(OS_POSIX) -#if defined(WCHAR_T_IS_UTF16) - -#error This file should not be used on 2-byte wchar_t systems -// If this winds up being needed on 2-byte wchar_t systems, either the -// definitions below can be used, or the host system's wide character -// functions like wmemcmp can be wrapped. - -#elif defined(WCHAR_T_IS_UTF32) - -#include -#include - -#include "include/internal/cef_string_types.h" - -namespace base { - -int c16memcmp(const char16* s1, const char16* s2, size_t n) { - // We cannot call memcmp because that changes the semantics. - while (n-- > 0) { - if (*s1 != *s2) { - // We cannot use (*s1 - *s2) because char16 is unsigned. - return ((*s1 < *s2) ? -1 : 1); - } - ++s1; - ++s2; - } - return 0; -} - -size_t c16len(const char16* s) { - const char16 *s_orig = s; - while (*s) { - ++s; - } - return s - s_orig; -} - -const char16* c16memchr(const char16* s, char16 c, size_t n) { - while (n-- > 0) { - if (*s == c) { - return s; - } - ++s; - } - return 0; -} - -char16* c16memmove(char16* s1, const char16* s2, size_t n) { - return static_cast(memmove(s1, s2, n * sizeof(char16))); -} - -char16* c16memcpy(char16* s1, const char16* s2, size_t n) { - return static_cast(memcpy(s1, s2, n * sizeof(char16))); -} - -char16* c16memset(char16* s, char16 c, size_t n) { - char16 *s_orig = s; - while (n-- > 0) { - *s = c; - ++s; - } - return s_orig; -} - -std::ostream& operator<<(std::ostream& out, const string16& str) { - cef_string_utf8_t cef_str = {0}; - cef_string_utf16_to_utf8(str.c_str(), str.size(), &cef_str); - out << cef_str.str; - cef_string_utf8_clear(&cef_str); - return out; -} - -void PrintTo(const string16& str, std::ostream* out) { - *out << str; -} - -} // namespace base - -template class std::basic_string; - -#endif // WCHAR_T_IS_UTF32 -#endif // OS_POSIX diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_thread_checker_impl.cc b/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_thread_checker_impl.cc deleted file mode 100644 index 65e884ef..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_thread_checker_impl.cc +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "include/base/internal/cef_thread_checker_impl.h" - -namespace base { -namespace cef_internal { - -ThreadCheckerImpl::ThreadCheckerImpl() - : valid_thread_id_() { - EnsureThreadIdAssigned(); -} - -ThreadCheckerImpl::~ThreadCheckerImpl() {} - -bool ThreadCheckerImpl::CalledOnValidThread() const { - EnsureThreadIdAssigned(); - AutoLock auto_lock(lock_); - return valid_thread_id_ == PlatformThread::CurrentRef(); -} - -void ThreadCheckerImpl::DetachFromThread() { - AutoLock auto_lock(lock_); - valid_thread_id_ = PlatformThreadRef(); -} - -void ThreadCheckerImpl::EnsureThreadIdAssigned() const { - AutoLock auto_lock(lock_); - if (valid_thread_id_.is_null()) { - valid_thread_id_ = PlatformThread::CurrentRef(); - } -} - -} // namespace cef_internal -} // namespace base diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_thread_collision_warner.cc b/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_thread_collision_warner.cc deleted file mode 100644 index 794ab64a..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_thread_collision_warner.cc +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "include/base/cef_thread_collision_warner.h" - -#include "include/base/cef_logging.h" -#include "include/internal/cef_thread_internal.h" - -namespace base { - -void DCheckAsserter::warn() { - NOTREACHED() << "Thread Collision"; -} - -static subtle::Atomic32 CurrentThread() { - const cef_platform_thread_id_t current_thread_id = - cef_get_current_platform_thread_id(); - // We need to get the thread id into an atomic data type. This might be a - // truncating conversion, but any loss-of-information just increases the - // chance of a fault negative, not a false positive. - const subtle::Atomic32 atomic_thread_id = - static_cast(current_thread_id); - - return atomic_thread_id; -} - -void ThreadCollisionWarner::EnterSelf() { - // If the active thread is 0 then I'll write the current thread ID - // if two or more threads arrive here only one will succeed to - // write on valid_thread_id_ the current thread ID. - subtle::Atomic32 current_thread_id = CurrentThread(); - - int previous_value = subtle::NoBarrier_CompareAndSwap(&valid_thread_id_, - 0, - current_thread_id); - if (previous_value != 0 && previous_value != current_thread_id) { - // gotcha! a thread is trying to use the same class and that is - // not current thread. - asserter_->warn(); - } - - subtle::NoBarrier_AtomicIncrement(&counter_, 1); -} - -void ThreadCollisionWarner::Enter() { - subtle::Atomic32 current_thread_id = CurrentThread(); - - if (subtle::NoBarrier_CompareAndSwap(&valid_thread_id_, - 0, - current_thread_id) != 0) { - // gotcha! another thread is trying to use the same class. - asserter_->warn(); - } - - subtle::NoBarrier_AtomicIncrement(&counter_, 1); -} - -void ThreadCollisionWarner::Leave() { - if (subtle::Barrier_AtomicIncrement(&counter_, -1) == 0) { - subtle::NoBarrier_Store(&valid_thread_id_, 0); - } -} - -} // namespace base diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_weak_ptr.cc b/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_weak_ptr.cc deleted file mode 100644 index 3c83a490..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/base/cef_weak_ptr.cc +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "include/base/cef_weak_ptr.h" - -namespace base { -namespace cef_internal { - -WeakReference::Flag::Flag() : is_valid_(true) { - // Flags only become bound when checked for validity, or invalidated, - // so that we can check that later validity/invalidation operations on - // the same Flag take place on the same thread. - thread_checker_.DetachFromThread(); -} - -void WeakReference::Flag::Invalidate() { - // The flag being invalidated with a single ref implies that there are no - // weak pointers in existence. Allow deletion on other thread in this case. - DCHECK(thread_checker_.CalledOnValidThread() || HasOneRef()) - << "WeakPtrs must be invalidated on the same thread."; - is_valid_ = false; -} - -bool WeakReference::Flag::IsValid() const { - DCHECK(thread_checker_.CalledOnValidThread()) - << "WeakPtrs must be checked on the same thread."; - return is_valid_; -} - -WeakReference::Flag::~Flag() { -} - -WeakReference::WeakReference() { -} - -WeakReference::WeakReference(const Flag* flag) : flag_(flag) { -} - -WeakReference::~WeakReference() { -} - -bool WeakReference::is_valid() const { return flag_.get() && flag_->IsValid(); } - -WeakReferenceOwner::WeakReferenceOwner() { -} - -WeakReferenceOwner::~WeakReferenceOwner() { - Invalidate(); -} - -WeakReference WeakReferenceOwner::GetRef() const { - // If we hold the last reference to the Flag then create a new one. - if (!HasRefs()) - flag_ = new WeakReference::Flag(); - - return WeakReference(flag_.get()); -} - -void WeakReferenceOwner::Invalidate() { - if (flag_.get()) { - flag_->Invalidate(); - flag_ = NULL; - } -} - -WeakPtrBase::WeakPtrBase() { -} - -WeakPtrBase::~WeakPtrBase() { -} - -WeakPtrBase::WeakPtrBase(const WeakReference& ref) : ref_(ref) { -} - -} // namespace cef_internal -} // namespace base diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/app_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/app_cpptoc.cc deleted file mode 100644 index 71c290f2..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/app_cpptoc.cc +++ /dev/null @@ -1,136 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/app_cpptoc.h" -#include "libcef_dll/cpptoc/browser_process_handler_cpptoc.h" -#include "libcef_dll/cpptoc/render_process_handler_cpptoc.h" -#include "libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h" -#include "libcef_dll/ctocpp/command_line_ctocpp.h" -#include "libcef_dll/ctocpp/scheme_registrar_ctocpp.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK app_on_before_command_line_processing(struct _cef_app_t* self, - const cef_string_t* process_type, - struct _cef_command_line_t* command_line) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: command_line; type: refptr_diff - DCHECK(command_line); - if (!command_line) - return; - // Unverified params: process_type - - // Execute - CefAppCppToC::Get(self)->OnBeforeCommandLineProcessing( - CefString(process_type), - CefCommandLineCToCpp::Wrap(command_line)); -} - -void CEF_CALLBACK app_on_register_custom_schemes(struct _cef_app_t* self, - struct _cef_scheme_registrar_t* registrar) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: registrar; type: refptr_diff - DCHECK(registrar); - if (!registrar) - return; - - // Execute - CefAppCppToC::Get(self)->OnRegisterCustomSchemes( - CefSchemeRegistrarCToCpp::Wrap(registrar)); -} - -struct _cef_resource_bundle_handler_t* CEF_CALLBACK app_get_resource_bundle_handler( - struct _cef_app_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefAppCppToC::Get( - self)->GetResourceBundleHandler(); - - // Return type: refptr_same - return CefResourceBundleHandlerCppToC::Wrap(_retval); -} - -struct _cef_browser_process_handler_t* CEF_CALLBACK app_get_browser_process_handler( - struct _cef_app_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefAppCppToC::Get( - self)->GetBrowserProcessHandler(); - - // Return type: refptr_same - return CefBrowserProcessHandlerCppToC::Wrap(_retval); -} - -struct _cef_render_process_handler_t* CEF_CALLBACK app_get_render_process_handler( - struct _cef_app_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefAppCppToC::Get( - self)->GetRenderProcessHandler(); - - // Return type: refptr_same - return CefRenderProcessHandlerCppToC::Wrap(_retval); -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefAppCppToC::CefAppCppToC() { - GetStruct()->on_before_command_line_processing = - app_on_before_command_line_processing; - GetStruct()->on_register_custom_schemes = app_on_register_custom_schemes; - GetStruct()->get_resource_bundle_handler = app_get_resource_bundle_handler; - GetStruct()->get_browser_process_handler = app_get_browser_process_handler; - GetStruct()->get_render_process_handler = app_get_render_process_handler; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived(CefWrapperType type, cef_app_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = WT_APP; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/app_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/app_cpptoc.h deleted file mode 100644 index 55026694..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/app_cpptoc.h +++ /dev/null @@ -1,34 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_APP_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_APP_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_app.h" -#include "include/capi/cef_app_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefAppCppToC - : public CefCppToC { - public: - CefAppCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_APP_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/base_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/base_cpptoc.cc deleted file mode 100644 index b7fe2cde..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/base_cpptoc.cc +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2015 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. - -#include "libcef_dll/cpptoc/base_cpptoc.h" - -CefBaseCppToC::CefBaseCppToC() { -} - -template<> CefRefPtr CefCppToC:: - UnwrapDerived(CefWrapperType type, cef_base_t* s) { - NOTREACHED(); - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC:: - kWrapperType = WT_BASE; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/base_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/base_cpptoc.h deleted file mode 100644 index c8c00b62..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/base_cpptoc.h +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2009 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. - -#ifndef CEF_LIBCEF_DLL_CPPTOC_BASE_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_BASE_CPPTOC_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/capi/cef_base_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -// Wrap a C++ class with a C structure. -class CefBaseCppToC - : public CefCppToC { - public: - CefBaseCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_BASE_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/browser_process_handler_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/browser_process_handler_cpptoc.cc deleted file mode 100644 index 95dc3880..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/browser_process_handler_cpptoc.cc +++ /dev/null @@ -1,116 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/browser_process_handler_cpptoc.h" -#include "libcef_dll/cpptoc/print_handler_cpptoc.h" -#include "libcef_dll/ctocpp/command_line_ctocpp.h" -#include "libcef_dll/ctocpp/list_value_ctocpp.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK browser_process_handler_on_context_initialized( - struct _cef_browser_process_handler_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefBrowserProcessHandlerCppToC::Get(self)->OnContextInitialized(); -} - -void CEF_CALLBACK browser_process_handler_on_before_child_process_launch( - struct _cef_browser_process_handler_t* self, - struct _cef_command_line_t* command_line) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: command_line; type: refptr_diff - DCHECK(command_line); - if (!command_line) - return; - - // Execute - CefBrowserProcessHandlerCppToC::Get(self)->OnBeforeChildProcessLaunch( - CefCommandLineCToCpp::Wrap(command_line)); -} - -void CEF_CALLBACK browser_process_handler_on_render_process_thread_created( - struct _cef_browser_process_handler_t* self, - struct _cef_list_value_t* extra_info) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: extra_info; type: refptr_diff - DCHECK(extra_info); - if (!extra_info) - return; - - // Execute - CefBrowserProcessHandlerCppToC::Get(self)->OnRenderProcessThreadCreated( - CefListValueCToCpp::Wrap(extra_info)); -} - -struct _cef_print_handler_t* CEF_CALLBACK browser_process_handler_get_print_handler( - struct _cef_browser_process_handler_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefBrowserProcessHandlerCppToC::Get( - self)->GetPrintHandler(); - - // Return type: refptr_same - return CefPrintHandlerCppToC::Wrap(_retval); -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefBrowserProcessHandlerCppToC::CefBrowserProcessHandlerCppToC() { - GetStruct()->on_context_initialized = - browser_process_handler_on_context_initialized; - GetStruct()->on_before_child_process_launch = - browser_process_handler_on_before_child_process_launch; - GetStruct()->on_render_process_thread_created = - browser_process_handler_on_render_process_thread_created; - GetStruct()->get_print_handler = browser_process_handler_get_print_handler; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived( - CefWrapperType type, cef_browser_process_handler_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = - WT_BROWSER_PROCESS_HANDLER; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/browser_process_handler_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/browser_process_handler_cpptoc.h deleted file mode 100644 index 725ca287..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/browser_process_handler_cpptoc.h +++ /dev/null @@ -1,35 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_BROWSER_PROCESS_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_BROWSER_PROCESS_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_browser_process_handler.h" -#include "include/capi/cef_browser_process_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefBrowserProcessHandlerCppToC - : public CefCppToC { - public: - CefBrowserProcessHandlerCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_BROWSER_PROCESS_HANDLER_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/client_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/client_cpptoc.cc deleted file mode 100644 index cf6f2261..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/client_cpptoc.cc +++ /dev/null @@ -1,322 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/client_cpptoc.h" -#include "libcef_dll/cpptoc/context_menu_handler_cpptoc.h" -#include "libcef_dll/cpptoc/dialog_handler_cpptoc.h" -#include "libcef_dll/cpptoc/display_handler_cpptoc.h" -#include "libcef_dll/cpptoc/download_handler_cpptoc.h" -#include "libcef_dll/cpptoc/drag_handler_cpptoc.h" -#include "libcef_dll/cpptoc/find_handler_cpptoc.h" -#include "libcef_dll/cpptoc/focus_handler_cpptoc.h" -#include "libcef_dll/cpptoc/geolocation_handler_cpptoc.h" -#include "libcef_dll/cpptoc/jsdialog_handler_cpptoc.h" -#include "libcef_dll/cpptoc/keyboard_handler_cpptoc.h" -#include "libcef_dll/cpptoc/life_span_handler_cpptoc.h" -#include "libcef_dll/cpptoc/load_handler_cpptoc.h" -#include "libcef_dll/cpptoc/render_handler_cpptoc.h" -#include "libcef_dll/cpptoc/request_handler_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/process_message_ctocpp.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -struct _cef_context_menu_handler_t* CEF_CALLBACK client_get_context_menu_handler( - struct _cef_client_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefClientCppToC::Get( - self)->GetContextMenuHandler(); - - // Return type: refptr_same - return CefContextMenuHandlerCppToC::Wrap(_retval); -} - -struct _cef_dialog_handler_t* CEF_CALLBACK client_get_dialog_handler( - struct _cef_client_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefClientCppToC::Get( - self)->GetDialogHandler(); - - // Return type: refptr_same - return CefDialogHandlerCppToC::Wrap(_retval); -} - -struct _cef_display_handler_t* CEF_CALLBACK client_get_display_handler( - struct _cef_client_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefClientCppToC::Get( - self)->GetDisplayHandler(); - - // Return type: refptr_same - return CefDisplayHandlerCppToC::Wrap(_retval); -} - -struct _cef_download_handler_t* CEF_CALLBACK client_get_download_handler( - struct _cef_client_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefClientCppToC::Get( - self)->GetDownloadHandler(); - - // Return type: refptr_same - return CefDownloadHandlerCppToC::Wrap(_retval); -} - -struct _cef_drag_handler_t* CEF_CALLBACK client_get_drag_handler( - struct _cef_client_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefClientCppToC::Get( - self)->GetDragHandler(); - - // Return type: refptr_same - return CefDragHandlerCppToC::Wrap(_retval); -} - -struct _cef_find_handler_t* CEF_CALLBACK client_get_find_handler( - struct _cef_client_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefClientCppToC::Get( - self)->GetFindHandler(); - - // Return type: refptr_same - return CefFindHandlerCppToC::Wrap(_retval); -} - -struct _cef_focus_handler_t* CEF_CALLBACK client_get_focus_handler( - struct _cef_client_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefClientCppToC::Get( - self)->GetFocusHandler(); - - // Return type: refptr_same - return CefFocusHandlerCppToC::Wrap(_retval); -} - -struct _cef_geolocation_handler_t* CEF_CALLBACK client_get_geolocation_handler( - struct _cef_client_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefClientCppToC::Get( - self)->GetGeolocationHandler(); - - // Return type: refptr_same - return CefGeolocationHandlerCppToC::Wrap(_retval); -} - -struct _cef_jsdialog_handler_t* CEF_CALLBACK client_get_jsdialog_handler( - struct _cef_client_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefClientCppToC::Get( - self)->GetJSDialogHandler(); - - // Return type: refptr_same - return CefJSDialogHandlerCppToC::Wrap(_retval); -} - -struct _cef_keyboard_handler_t* CEF_CALLBACK client_get_keyboard_handler( - struct _cef_client_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefClientCppToC::Get( - self)->GetKeyboardHandler(); - - // Return type: refptr_same - return CefKeyboardHandlerCppToC::Wrap(_retval); -} - -struct _cef_life_span_handler_t* CEF_CALLBACK client_get_life_span_handler( - struct _cef_client_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefClientCppToC::Get( - self)->GetLifeSpanHandler(); - - // Return type: refptr_same - return CefLifeSpanHandlerCppToC::Wrap(_retval); -} - -struct _cef_load_handler_t* CEF_CALLBACK client_get_load_handler( - struct _cef_client_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefClientCppToC::Get( - self)->GetLoadHandler(); - - // Return type: refptr_same - return CefLoadHandlerCppToC::Wrap(_retval); -} - -struct _cef_render_handler_t* CEF_CALLBACK client_get_render_handler( - struct _cef_client_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefClientCppToC::Get( - self)->GetRenderHandler(); - - // Return type: refptr_same - return CefRenderHandlerCppToC::Wrap(_retval); -} - -struct _cef_request_handler_t* CEF_CALLBACK client_get_request_handler( - struct _cef_client_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefClientCppToC::Get( - self)->GetRequestHandler(); - - // Return type: refptr_same - return CefRequestHandlerCppToC::Wrap(_retval); -} - -int CEF_CALLBACK client_on_process_message_received(struct _cef_client_t* self, - cef_browser_t* browser, cef_process_id_t source_process, - struct _cef_process_message_t* message) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: message; type: refptr_diff - DCHECK(message); - if (!message) - return 0; - - // Execute - bool _retval = CefClientCppToC::Get(self)->OnProcessMessageReceived( - CefBrowserCToCpp::Wrap(browser), - source_process, - CefProcessMessageCToCpp::Wrap(message)); - - // Return type: bool - return _retval; -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefClientCppToC::CefClientCppToC() { - GetStruct()->get_context_menu_handler = client_get_context_menu_handler; - GetStruct()->get_dialog_handler = client_get_dialog_handler; - GetStruct()->get_display_handler = client_get_display_handler; - GetStruct()->get_download_handler = client_get_download_handler; - GetStruct()->get_drag_handler = client_get_drag_handler; - GetStruct()->get_find_handler = client_get_find_handler; - GetStruct()->get_focus_handler = client_get_focus_handler; - GetStruct()->get_geolocation_handler = client_get_geolocation_handler; - GetStruct()->get_jsdialog_handler = client_get_jsdialog_handler; - GetStruct()->get_keyboard_handler = client_get_keyboard_handler; - GetStruct()->get_life_span_handler = client_get_life_span_handler; - GetStruct()->get_load_handler = client_get_load_handler; - GetStruct()->get_render_handler = client_get_render_handler; - GetStruct()->get_request_handler = client_get_request_handler; - GetStruct()->on_process_message_received = client_on_process_message_received; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived(CefWrapperType type, cef_client_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = WT_CLIENT; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/client_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/client_cpptoc.h deleted file mode 100644 index f06ce377..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/client_cpptoc.h +++ /dev/null @@ -1,34 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_CLIENT_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_CLIENT_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_client.h" -#include "include/capi/cef_client_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefClientCppToC - : public CefCppToC { - public: - CefClientCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_CLIENT_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/completion_callback_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/completion_callback_cpptoc.cc deleted file mode 100644 index 6e5fef47..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/completion_callback_cpptoc.cc +++ /dev/null @@ -1,55 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/completion_callback_cpptoc.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK completion_callback_on_complete( - struct _cef_completion_callback_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefCompletionCallbackCppToC::Get(self)->OnComplete(); -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefCompletionCallbackCppToC::CefCompletionCallbackCppToC() { - GetStruct()->on_complete = completion_callback_on_complete; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived( - CefWrapperType type, cef_completion_callback_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = - WT_COMPLETION_CALLBACK; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/completion_callback_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/completion_callback_cpptoc.h deleted file mode 100644 index bc06373d..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/completion_callback_cpptoc.h +++ /dev/null @@ -1,35 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_COMPLETION_CALLBACK_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_COMPLETION_CALLBACK_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_callback.h" -#include "include/capi/cef_callback_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefCompletionCallbackCppToC - : public CefCppToC { - public: - CefCompletionCallbackCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_COMPLETION_CALLBACK_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/context_menu_handler_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/context_menu_handler_cpptoc.cc deleted file mode 100644 index d07f7533..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/context_menu_handler_cpptoc.cc +++ /dev/null @@ -1,188 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/context_menu_handler_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/context_menu_params_ctocpp.h" -#include "libcef_dll/ctocpp/frame_ctocpp.h" -#include "libcef_dll/ctocpp/menu_model_ctocpp.h" -#include "libcef_dll/ctocpp/run_context_menu_callback_ctocpp.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK context_menu_handler_on_before_context_menu( - struct _cef_context_menu_handler_t* self, cef_browser_t* browser, - struct _cef_frame_t* frame, struct _cef_context_menu_params_t* params, - struct _cef_menu_model_t* model) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return; - // Verify param: params; type: refptr_diff - DCHECK(params); - if (!params) - return; - // Verify param: model; type: refptr_diff - DCHECK(model); - if (!model) - return; - - // Execute - CefContextMenuHandlerCppToC::Get(self)->OnBeforeContextMenu( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefContextMenuParamsCToCpp::Wrap(params), - CefMenuModelCToCpp::Wrap(model)); -} - -int CEF_CALLBACK context_menu_handler_run_context_menu( - struct _cef_context_menu_handler_t* self, cef_browser_t* browser, - struct _cef_frame_t* frame, struct _cef_context_menu_params_t* params, - struct _cef_menu_model_t* model, - cef_run_context_menu_callback_t* callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return 0; - // Verify param: params; type: refptr_diff - DCHECK(params); - if (!params) - return 0; - // Verify param: model; type: refptr_diff - DCHECK(model); - if (!model) - return 0; - // Verify param: callback; type: refptr_diff - DCHECK(callback); - if (!callback) - return 0; - - // Execute - bool _retval = CefContextMenuHandlerCppToC::Get(self)->RunContextMenu( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefContextMenuParamsCToCpp::Wrap(params), - CefMenuModelCToCpp::Wrap(model), - CefRunContextMenuCallbackCToCpp::Wrap(callback)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK context_menu_handler_on_context_menu_command( - struct _cef_context_menu_handler_t* self, cef_browser_t* browser, - struct _cef_frame_t* frame, struct _cef_context_menu_params_t* params, - int command_id, cef_event_flags_t event_flags) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return 0; - // Verify param: params; type: refptr_diff - DCHECK(params); - if (!params) - return 0; - - // Execute - bool _retval = CefContextMenuHandlerCppToC::Get(self)->OnContextMenuCommand( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefContextMenuParamsCToCpp::Wrap(params), - command_id, - event_flags); - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK context_menu_handler_on_context_menu_dismissed( - struct _cef_context_menu_handler_t* self, cef_browser_t* browser, - struct _cef_frame_t* frame) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return; - - // Execute - CefContextMenuHandlerCppToC::Get(self)->OnContextMenuDismissed( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame)); -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefContextMenuHandlerCppToC::CefContextMenuHandlerCppToC() { - GetStruct()->on_before_context_menu = - context_menu_handler_on_before_context_menu; - GetStruct()->run_context_menu = context_menu_handler_run_context_menu; - GetStruct()->on_context_menu_command = - context_menu_handler_on_context_menu_command; - GetStruct()->on_context_menu_dismissed = - context_menu_handler_on_context_menu_dismissed; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived( - CefWrapperType type, cef_context_menu_handler_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = - WT_CONTEXT_MENU_HANDLER; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/context_menu_handler_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/context_menu_handler_cpptoc.h deleted file mode 100644 index fa2ffbf6..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/context_menu_handler_cpptoc.h +++ /dev/null @@ -1,35 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_CONTEXT_MENU_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_CONTEXT_MENU_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_context_menu_handler.h" -#include "include/capi/cef_context_menu_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefContextMenuHandlerCppToC - : public CefCppToC { - public: - CefContextMenuHandlerCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_CONTEXT_MENU_HANDLER_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/cookie_visitor_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/cookie_visitor_cpptoc.cc deleted file mode 100644 index ecac53c0..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/cookie_visitor_cpptoc.cc +++ /dev/null @@ -1,81 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/cookie_visitor_cpptoc.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK cookie_visitor_visit(struct _cef_cookie_visitor_t* self, - const struct _cef_cookie_t* cookie, int count, int total, - int* deleteCookie) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: cookie; type: struct_byref_const - DCHECK(cookie); - if (!cookie) - return 0; - // Verify param: deleteCookie; type: bool_byref - DCHECK(deleteCookie); - if (!deleteCookie) - return 0; - - // Translate param: cookie; type: struct_byref_const - CefCookie cookieObj; - if (cookie) - cookieObj.Set(*cookie, false); - // Translate param: deleteCookie; type: bool_byref - bool deleteCookieBool = (deleteCookie && *deleteCookie)?true:false; - - // Execute - bool _retval = CefCookieVisitorCppToC::Get(self)->Visit( - cookieObj, - count, - total, - deleteCookieBool); - - // Restore param: deleteCookie; type: bool_byref - if (deleteCookie) - *deleteCookie = deleteCookieBool?true:false; - - // Return type: bool - return _retval; -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefCookieVisitorCppToC::CefCookieVisitorCppToC() { - GetStruct()->visit = cookie_visitor_visit; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived(CefWrapperType type, - cef_cookie_visitor_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = WT_COOKIE_VISITOR; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/cookie_visitor_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/cookie_visitor_cpptoc.h deleted file mode 100644 index 7e12965c..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/cookie_visitor_cpptoc.h +++ /dev/null @@ -1,35 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_COOKIE_VISITOR_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_COOKIE_VISITOR_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_cookie.h" -#include "include/capi/cef_cookie_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefCookieVisitorCppToC - : public CefCppToC { - public: - CefCookieVisitorCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_COOKIE_VISITOR_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/cpptoc.h deleted file mode 100644 index a3e094e5..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/cpptoc.h +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) 2009 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. - -#ifndef CEF_LIBCEF_DLL_CPPTOC_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_CPPTOC_H_ -#pragma once - -#include "include/base/cef_logging.h" -#include "include/base/cef_macros.h" -#include "include/cef_base.h" -#include "include/capi/cef_base_capi.h" -#include "libcef_dll/wrapper_types.h" - -// Wrap a C++ class with a C structure. This is used when the class -// implementation exists on this side of the DLL boundary but will have methods -// called from the other side of the DLL boundary. -template -class CefCppToC : public CefBase { - public: - // Create a new wrapper instance and associated structure reference for - // passing an object instance the other side. - static StructName* Wrap(CefRefPtr c) { - if (!c.get()) - return NULL; - - // Wrap our object with the CefCppToC class. - ClassName* wrapper = new ClassName(); - wrapper->wrapper_struct_.object_ = c.get(); - // Add a reference to our wrapper object that will be released once our - // structure arrives on the other side. - wrapper->AddRef(); - // Return the structure pointer that can now be passed to the other side. - return wrapper->GetStruct(); - } - - // Retrieve the underlying object instance for a structure reference passed - // back from the other side. - static CefRefPtr Unwrap(StructName* s) { - if (!s) - return NULL; - - // Cast our structure to the wrapper structure type. - WrapperStruct* wrapperStruct = GetWrapperStruct(s); - - // If the type does not match this object then we need to unwrap as the - // derived type. - if (wrapperStruct->type_ != kWrapperType) - return UnwrapDerived(wrapperStruct->type_, s); - - // Add the underlying object instance to a smart pointer. - CefRefPtr objectPtr(wrapperStruct->object_); - // Release the reference to our wrapper object that was added before the - // structure was passed back to us. - wrapperStruct->wrapper_->Release(); - // Return the underlying object instance. - return objectPtr; - } - - // Retrieve the underlying object instance from our own structure reference - // when the reference is passed as the required first parameter of a C API - // function call. No explicit reference counting is done in this case. - static CefRefPtr Get(StructName* s) { - DCHECK(s); - WrapperStruct* wrapperStruct = GetWrapperStruct(s); - // Verify that the wrapper offset was calculated correctly. - DCHECK_EQ(kWrapperType, wrapperStruct->type_); - return wrapperStruct->object_; - } - - // If returning the structure across the DLL boundary you should call - // AddRef() on this CefCppToC object. On the other side of the DLL boundary, - // call UnderlyingRelease() on the wrapping CefCToCpp object. - StructName* GetStruct() { return &wrapper_struct_.struct_; } - - // CefBase methods increment/decrement reference counts on both this object - // and the underlying wrapper class. - void AddRef() const { - UnderlyingAddRef(); - ref_count_.AddRef(); - } - bool Release() const { - UnderlyingRelease(); - if (ref_count_.Release()) { - delete this; - return true; - } - return false; - } - bool HasOneRef() const { return UnderlyingHasOneRef(); } - -#ifndef NDEBUG - // Simple tracking of allocated objects. - static base::AtomicRefCount DebugObjCt; // NOLINT(runtime/int) -#endif - - protected: - CefCppToC() { - wrapper_struct_.type_ = kWrapperType; - wrapper_struct_.wrapper_ = this; - memset(GetStruct(), 0, sizeof(StructName)); - - cef_base_t* base = reinterpret_cast(GetStruct()); - base->size = sizeof(StructName); - base->add_ref = struct_add_ref; - base->release = struct_release; - base->has_one_ref = struct_has_one_ref; - -#ifndef NDEBUG - base::AtomicRefCountInc(&DebugObjCt); -#endif - } - - virtual ~CefCppToC() { -#ifndef NDEBUG - base::AtomicRefCountDec(&DebugObjCt); -#endif - } - - private: - // Used to associate this wrapper object, the underlying object instance and - // the structure that will be passed to the other side. - struct WrapperStruct { - CefWrapperType type_; - BaseName* object_; - CefCppToC* wrapper_; - StructName struct_; - }; - - static WrapperStruct* GetWrapperStruct(StructName* s) { - // Offset using the WrapperStruct size instead of individual member sizes - // to avoid problems due to platform/compiler differences in structure - // padding. - return reinterpret_cast( - reinterpret_cast(s) - - (sizeof(WrapperStruct) - sizeof(StructName))); - } - - // Unwrap as the derived type. - static CefRefPtr UnwrapDerived(CefWrapperType type, StructName* s); - - // Increment/decrement reference counts on only the underlying class. - void UnderlyingAddRef() const { - wrapper_struct_.object_->AddRef(); - } - bool UnderlyingRelease() const { - return wrapper_struct_.object_->Release(); - } - bool UnderlyingHasOneRef() const { - return wrapper_struct_.object_->HasOneRef(); - } - - static void CEF_CALLBACK struct_add_ref(cef_base_t* base) { - DCHECK(base); - if (!base) - return; - - WrapperStruct* wrapperStruct = - GetWrapperStruct(reinterpret_cast(base)); - // Verify that the wrapper offset was calculated correctly. - DCHECK_EQ(kWrapperType, wrapperStruct->type_); - - wrapperStruct->wrapper_->AddRef(); - } - - static int CEF_CALLBACK struct_release(cef_base_t* base) { - DCHECK(base); - if (!base) - return 0; - - WrapperStruct* wrapperStruct = - GetWrapperStruct(reinterpret_cast(base)); - // Verify that the wrapper offset was calculated correctly. - DCHECK_EQ(kWrapperType, wrapperStruct->type_); - - return wrapperStruct->wrapper_->Release(); - } - - static int CEF_CALLBACK struct_has_one_ref(cef_base_t* base) { - DCHECK(base); - if (!base) - return 0; - - WrapperStruct* wrapperStruct = - GetWrapperStruct(reinterpret_cast(base)); - // Verify that the wrapper offset was calculated correctly. - DCHECK_EQ(kWrapperType, wrapperStruct->type_); - - return wrapperStruct->wrapper_->HasOneRef(); - } - - WrapperStruct wrapper_struct_; - CefRefCount ref_count_; - - static CefWrapperType kWrapperType; - - DISALLOW_COPY_AND_ASSIGN(CefCppToC); -}; - -#endif // CEF_LIBCEF_DLL_CPPTOC_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/delete_cookies_callback_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/delete_cookies_callback_cpptoc.cc deleted file mode 100644 index 71c0f1b9..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/delete_cookies_callback_cpptoc.cc +++ /dev/null @@ -1,56 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/delete_cookies_callback_cpptoc.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK delete_cookies_callback_on_complete( - struct _cef_delete_cookies_callback_t* self, int num_deleted) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefDeleteCookiesCallbackCppToC::Get(self)->OnComplete( - num_deleted); -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefDeleteCookiesCallbackCppToC::CefDeleteCookiesCallbackCppToC() { - GetStruct()->on_complete = delete_cookies_callback_on_complete; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived( - CefWrapperType type, cef_delete_cookies_callback_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = - WT_DELETE_COOKIES_CALLBACK; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/delete_cookies_callback_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/delete_cookies_callback_cpptoc.h deleted file mode 100644 index 52f7b8d7..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/delete_cookies_callback_cpptoc.h +++ /dev/null @@ -1,35 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_DELETE_COOKIES_CALLBACK_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_DELETE_COOKIES_CALLBACK_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_cookie.h" -#include "include/capi/cef_cookie_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefDeleteCookiesCallbackCppToC - : public CefCppToC { - public: - CefDeleteCookiesCallbackCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_DELETE_COOKIES_CALLBACK_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/dialog_handler_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/dialog_handler_cpptoc.cc deleted file mode 100644 index 0441a1c4..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/dialog_handler_cpptoc.cc +++ /dev/null @@ -1,87 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/dialog_handler_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/file_dialog_callback_ctocpp.h" -#include "libcef_dll/transfer_util.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK dialog_handler_on_file_dialog( - struct _cef_dialog_handler_t* self, cef_browser_t* browser, - cef_file_dialog_mode_t mode, const cef_string_t* title, - const cef_string_t* default_file_path, cef_string_list_t accept_filters, - int selected_accept_filter, cef_file_dialog_callback_t* callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: selected_accept_filter; type: simple_byval - DCHECK_GE(selected_accept_filter, 0); - if (selected_accept_filter < 0) - return 0; - // Verify param: callback; type: refptr_diff - DCHECK(callback); - if (!callback) - return 0; - // Unverified params: title, default_file_path, accept_filters - - // Translate param: accept_filters; type: string_vec_byref_const - std::vector accept_filtersList; - transfer_string_list_contents(accept_filters, accept_filtersList); - - // Execute - bool _retval = CefDialogHandlerCppToC::Get(self)->OnFileDialog( - CefBrowserCToCpp::Wrap(browser), - mode, - CefString(title), - CefString(default_file_path), - accept_filtersList, - selected_accept_filter, - CefFileDialogCallbackCToCpp::Wrap(callback)); - - // Return type: bool - return _retval; -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefDialogHandlerCppToC::CefDialogHandlerCppToC() { - GetStruct()->on_file_dialog = dialog_handler_on_file_dialog; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived(CefWrapperType type, - cef_dialog_handler_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = WT_DIALOG_HANDLER; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/dialog_handler_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/dialog_handler_cpptoc.h deleted file mode 100644 index e9c6fbb8..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/dialog_handler_cpptoc.h +++ /dev/null @@ -1,35 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_DIALOG_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_DIALOG_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_dialog_handler.h" -#include "include/capi/cef_dialog_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefDialogHandlerCppToC - : public CefCppToC { - public: - CefDialogHandlerCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_DIALOG_HANDLER_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/display_handler_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/display_handler_cpptoc.cc deleted file mode 100644 index 1a82ef78..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/display_handler_cpptoc.cc +++ /dev/null @@ -1,213 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/display_handler_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/frame_ctocpp.h" -#include "libcef_dll/transfer_util.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK display_handler_on_address_change( - struct _cef_display_handler_t* self, cef_browser_t* browser, - struct _cef_frame_t* frame, const cef_string_t* url) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return; - // Verify param: url; type: string_byref_const - DCHECK(url); - if (!url) - return; - - // Execute - CefDisplayHandlerCppToC::Get(self)->OnAddressChange( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefString(url)); -} - -void CEF_CALLBACK display_handler_on_title_change( - struct _cef_display_handler_t* self, cef_browser_t* browser, - const cef_string_t* title) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Unverified params: title - - // Execute - CefDisplayHandlerCppToC::Get(self)->OnTitleChange( - CefBrowserCToCpp::Wrap(browser), - CefString(title)); -} - -void CEF_CALLBACK display_handler_on_favicon_urlchange( - struct _cef_display_handler_t* self, cef_browser_t* browser, - cef_string_list_t icon_urls) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Unverified params: icon_urls - - // Translate param: icon_urls; type: string_vec_byref_const - std::vector icon_urlsList; - transfer_string_list_contents(icon_urls, icon_urlsList); - - // Execute - CefDisplayHandlerCppToC::Get(self)->OnFaviconURLChange( - CefBrowserCToCpp::Wrap(browser), - icon_urlsList); -} - -void CEF_CALLBACK display_handler_on_fullscreen_mode_change( - struct _cef_display_handler_t* self, cef_browser_t* browser, - int fullscreen) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - - // Execute - CefDisplayHandlerCppToC::Get(self)->OnFullscreenModeChange( - CefBrowserCToCpp::Wrap(browser), - fullscreen?true:false); -} - -int CEF_CALLBACK display_handler_on_tooltip(struct _cef_display_handler_t* self, - cef_browser_t* browser, cef_string_t* text) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Unverified params: text - - // Translate param: text; type: string_byref - CefString textStr(text); - - // Execute - bool _retval = CefDisplayHandlerCppToC::Get(self)->OnTooltip( - CefBrowserCToCpp::Wrap(browser), - textStr); - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK display_handler_on_status_message( - struct _cef_display_handler_t* self, cef_browser_t* browser, - const cef_string_t* value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Unverified params: value - - // Execute - CefDisplayHandlerCppToC::Get(self)->OnStatusMessage( - CefBrowserCToCpp::Wrap(browser), - CefString(value)); -} - -int CEF_CALLBACK display_handler_on_console_message( - struct _cef_display_handler_t* self, cef_browser_t* browser, - const cef_string_t* message, const cef_string_t* source, int line) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Unverified params: message, source - - // Execute - bool _retval = CefDisplayHandlerCppToC::Get(self)->OnConsoleMessage( - CefBrowserCToCpp::Wrap(browser), - CefString(message), - CefString(source), - line); - - // Return type: bool - return _retval; -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefDisplayHandlerCppToC::CefDisplayHandlerCppToC() { - GetStruct()->on_address_change = display_handler_on_address_change; - GetStruct()->on_title_change = display_handler_on_title_change; - GetStruct()->on_favicon_urlchange = display_handler_on_favicon_urlchange; - GetStruct()->on_fullscreen_mode_change = - display_handler_on_fullscreen_mode_change; - GetStruct()->on_tooltip = display_handler_on_tooltip; - GetStruct()->on_status_message = display_handler_on_status_message; - GetStruct()->on_console_message = display_handler_on_console_message; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived( - CefWrapperType type, cef_display_handler_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = WT_DISPLAY_HANDLER; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/display_handler_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/display_handler_cpptoc.h deleted file mode 100644 index 6798edd2..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/display_handler_cpptoc.h +++ /dev/null @@ -1,35 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_DISPLAY_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_DISPLAY_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_display_handler.h" -#include "include/capi/cef_display_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefDisplayHandlerCppToC - : public CefCppToC { - public: - CefDisplayHandlerCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_DISPLAY_HANDLER_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/domvisitor_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/domvisitor_cpptoc.cc deleted file mode 100644 index 1a54ba87..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/domvisitor_cpptoc.cc +++ /dev/null @@ -1,60 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/domvisitor_cpptoc.h" -#include "libcef_dll/ctocpp/domdocument_ctocpp.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK domvisitor_visit(struct _cef_domvisitor_t* self, - struct _cef_domdocument_t* document) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: document; type: refptr_diff - DCHECK(document); - if (!document) - return; - - // Execute - CefDOMVisitorCppToC::Get(self)->Visit( - CefDOMDocumentCToCpp::Wrap(document)); -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefDOMVisitorCppToC::CefDOMVisitorCppToC() { - GetStruct()->visit = domvisitor_visit; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived(CefWrapperType type, - cef_domvisitor_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = WT_DOMVISITOR; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/domvisitor_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/domvisitor_cpptoc.h deleted file mode 100644 index 82707117..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/domvisitor_cpptoc.h +++ /dev/null @@ -1,34 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_DOMVISITOR_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_DOMVISITOR_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_dom.h" -#include "include/capi/cef_dom_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefDOMVisitorCppToC - : public CefCppToC { - public: - CefDOMVisitorCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_DOMVISITOR_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/download_handler_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/download_handler_cpptoc.cc deleted file mode 100644 index 8c1bdd0b..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/download_handler_cpptoc.cc +++ /dev/null @@ -1,112 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/download_handler_cpptoc.h" -#include "libcef_dll/ctocpp/before_download_callback_ctocpp.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/download_item_ctocpp.h" -#include "libcef_dll/ctocpp/download_item_callback_ctocpp.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK download_handler_on_before_download( - struct _cef_download_handler_t* self, cef_browser_t* browser, - struct _cef_download_item_t* download_item, - const cef_string_t* suggested_name, - cef_before_download_callback_t* callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: download_item; type: refptr_diff - DCHECK(download_item); - if (!download_item) - return; - // Verify param: suggested_name; type: string_byref_const - DCHECK(suggested_name); - if (!suggested_name) - return; - // Verify param: callback; type: refptr_diff - DCHECK(callback); - if (!callback) - return; - - // Execute - CefDownloadHandlerCppToC::Get(self)->OnBeforeDownload( - CefBrowserCToCpp::Wrap(browser), - CefDownloadItemCToCpp::Wrap(download_item), - CefString(suggested_name), - CefBeforeDownloadCallbackCToCpp::Wrap(callback)); -} - -void CEF_CALLBACK download_handler_on_download_updated( - struct _cef_download_handler_t* self, cef_browser_t* browser, - struct _cef_download_item_t* download_item, - cef_download_item_callback_t* callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: download_item; type: refptr_diff - DCHECK(download_item); - if (!download_item) - return; - // Verify param: callback; type: refptr_diff - DCHECK(callback); - if (!callback) - return; - - // Execute - CefDownloadHandlerCppToC::Get(self)->OnDownloadUpdated( - CefBrowserCToCpp::Wrap(browser), - CefDownloadItemCToCpp::Wrap(download_item), - CefDownloadItemCallbackCToCpp::Wrap(callback)); -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefDownloadHandlerCppToC::CefDownloadHandlerCppToC() { - GetStruct()->on_before_download = download_handler_on_before_download; - GetStruct()->on_download_updated = download_handler_on_download_updated; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived( - CefWrapperType type, cef_download_handler_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = - WT_DOWNLOAD_HANDLER; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/download_handler_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/download_handler_cpptoc.h deleted file mode 100644 index 412ca7ae..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/download_handler_cpptoc.h +++ /dev/null @@ -1,35 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_download_handler.h" -#include "include/capi/cef_download_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefDownloadHandlerCppToC - : public CefCppToC { - public: - CefDownloadHandlerCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_HANDLER_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/drag_handler_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/drag_handler_cpptoc.cc deleted file mode 100644 index d7df02aa..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/drag_handler_cpptoc.cc +++ /dev/null @@ -1,105 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/drag_handler_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/drag_data_ctocpp.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK drag_handler_on_drag_enter(struct _cef_drag_handler_t* self, - cef_browser_t* browser, cef_drag_data_t* dragData, - cef_drag_operations_mask_t mask) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: dragData; type: refptr_diff - DCHECK(dragData); - if (!dragData) - return 0; - - // Execute - bool _retval = CefDragHandlerCppToC::Get(self)->OnDragEnter( - CefBrowserCToCpp::Wrap(browser), - CefDragDataCToCpp::Wrap(dragData), - mask); - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK drag_handler_on_draggable_regions_changed( - struct _cef_drag_handler_t* self, cef_browser_t* browser, - size_t regionsCount, cef_draggable_region_t const* regions) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: regions; type: simple_vec_byref_const - DCHECK(regionsCount == 0 || regions); - if (regionsCount > 0 && !regions) - return; - - // Translate param: regions; type: simple_vec_byref_const - std::vector regionsList; - if (regionsCount > 0) { - for (size_t i = 0; i < regionsCount; ++i) { - CefDraggableRegion regionsVal = regions[i]; - regionsList.push_back(regionsVal); - } - } - - // Execute - CefDragHandlerCppToC::Get(self)->OnDraggableRegionsChanged( - CefBrowserCToCpp::Wrap(browser), - regionsList); -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefDragHandlerCppToC::CefDragHandlerCppToC() { - GetStruct()->on_drag_enter = drag_handler_on_drag_enter; - GetStruct()->on_draggable_regions_changed = - drag_handler_on_draggable_regions_changed; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived(CefWrapperType type, - cef_drag_handler_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = WT_DRAG_HANDLER; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/drag_handler_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/drag_handler_cpptoc.h deleted file mode 100644 index f51d1bc7..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/drag_handler_cpptoc.h +++ /dev/null @@ -1,35 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_DRAG_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_DRAG_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_drag_handler.h" -#include "include/capi/cef_drag_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefDragHandlerCppToC - : public CefCppToC { - public: - CefDragHandlerCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_DRAG_HANDLER_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/end_tracing_callback_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/end_tracing_callback_cpptoc.cc deleted file mode 100644 index 05cfba1b..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/end_tracing_callback_cpptoc.cc +++ /dev/null @@ -1,62 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/end_tracing_callback_cpptoc.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK end_tracing_callback_on_end_tracing_complete( - struct _cef_end_tracing_callback_t* self, - const cef_string_t* tracing_file) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: tracing_file; type: string_byref_const - DCHECK(tracing_file); - if (!tracing_file) - return; - - // Execute - CefEndTracingCallbackCppToC::Get(self)->OnEndTracingComplete( - CefString(tracing_file)); -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefEndTracingCallbackCppToC::CefEndTracingCallbackCppToC() { - GetStruct()->on_end_tracing_complete = - end_tracing_callback_on_end_tracing_complete; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived( - CefWrapperType type, cef_end_tracing_callback_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = - WT_END_TRACING_CALLBACK; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/end_tracing_callback_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/end_tracing_callback_cpptoc.h deleted file mode 100644 index b731fedd..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/end_tracing_callback_cpptoc.h +++ /dev/null @@ -1,35 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_END_TRACING_CALLBACK_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_END_TRACING_CALLBACK_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_trace.h" -#include "include/capi/cef_trace_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefEndTracingCallbackCppToC - : public CefCppToC { - public: - CefEndTracingCallbackCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_END_TRACING_CALLBACK_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/find_handler_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/find_handler_cpptoc.cc deleted file mode 100644 index 0513ab51..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/find_handler_cpptoc.cc +++ /dev/null @@ -1,74 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/find_handler_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK find_handler_on_find_result(struct _cef_find_handler_t* self, - cef_browser_t* browser, int identifier, int count, - const cef_rect_t* selectionRect, int activeMatchOrdinal, - int finalUpdate) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: selectionRect; type: simple_byref_const - DCHECK(selectionRect); - if (!selectionRect) - return; - - // Translate param: selectionRect; type: simple_byref_const - CefRect selectionRectVal = selectionRect?*selectionRect:CefRect(); - - // Execute - CefFindHandlerCppToC::Get(self)->OnFindResult( - CefBrowserCToCpp::Wrap(browser), - identifier, - count, - selectionRectVal, - activeMatchOrdinal, - finalUpdate?true:false); -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefFindHandlerCppToC::CefFindHandlerCppToC() { - GetStruct()->on_find_result = find_handler_on_find_result; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived(CefWrapperType type, - cef_find_handler_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = WT_FIND_HANDLER; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/find_handler_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/find_handler_cpptoc.h deleted file mode 100644 index b10309ef..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/find_handler_cpptoc.h +++ /dev/null @@ -1,35 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_FIND_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_FIND_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_find_handler.h" -#include "include/capi/cef_find_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefFindHandlerCppToC - : public CefCppToC { - public: - CefFindHandlerCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_FIND_HANDLER_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/focus_handler_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/focus_handler_cpptoc.cc deleted file mode 100644 index 506a55ba..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/focus_handler_cpptoc.cc +++ /dev/null @@ -1,101 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/focus_handler_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK focus_handler_on_take_focus(struct _cef_focus_handler_t* self, - cef_browser_t* browser, int next) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - - // Execute - CefFocusHandlerCppToC::Get(self)->OnTakeFocus( - CefBrowserCToCpp::Wrap(browser), - next?true:false); -} - -int CEF_CALLBACK focus_handler_on_set_focus(struct _cef_focus_handler_t* self, - cef_browser_t* browser, cef_focus_source_t source) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - - // Execute - bool _retval = CefFocusHandlerCppToC::Get(self)->OnSetFocus( - CefBrowserCToCpp::Wrap(browser), - source); - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK focus_handler_on_got_focus(struct _cef_focus_handler_t* self, - cef_browser_t* browser) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - - // Execute - CefFocusHandlerCppToC::Get(self)->OnGotFocus( - CefBrowserCToCpp::Wrap(browser)); -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefFocusHandlerCppToC::CefFocusHandlerCppToC() { - GetStruct()->on_take_focus = focus_handler_on_take_focus; - GetStruct()->on_set_focus = focus_handler_on_set_focus; - GetStruct()->on_got_focus = focus_handler_on_got_focus; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived(CefWrapperType type, - cef_focus_handler_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = WT_FOCUS_HANDLER; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/focus_handler_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/focus_handler_cpptoc.h deleted file mode 100644 index a8ebf7ec..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/focus_handler_cpptoc.h +++ /dev/null @@ -1,35 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_FOCUS_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_FOCUS_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_focus_handler.h" -#include "include/capi/cef_focus_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefFocusHandlerCppToC - : public CefCppToC { - public: - CefFocusHandlerCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_FOCUS_HANDLER_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/geolocation_handler_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/geolocation_handler_cpptoc.cc deleted file mode 100644 index 8b857fb5..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/geolocation_handler_cpptoc.cc +++ /dev/null @@ -1,101 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/geolocation_handler_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/geolocation_callback_ctocpp.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK geolocation_handler_on_request_geolocation_permission( - struct _cef_geolocation_handler_t* self, cef_browser_t* browser, - const cef_string_t* requesting_url, int request_id, - cef_geolocation_callback_t* callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: requesting_url; type: string_byref_const - DCHECK(requesting_url); - if (!requesting_url) - return 0; - // Verify param: callback; type: refptr_diff - DCHECK(callback); - if (!callback) - return 0; - - // Execute - bool _retval = CefGeolocationHandlerCppToC::Get( - self)->OnRequestGeolocationPermission( - CefBrowserCToCpp::Wrap(browser), - CefString(requesting_url), - request_id, - CefGeolocationCallbackCToCpp::Wrap(callback)); - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK geolocation_handler_on_cancel_geolocation_permission( - struct _cef_geolocation_handler_t* self, cef_browser_t* browser, - int request_id) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - - // Execute - CefGeolocationHandlerCppToC::Get(self)->OnCancelGeolocationPermission( - CefBrowserCToCpp::Wrap(browser), - request_id); -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefGeolocationHandlerCppToC::CefGeolocationHandlerCppToC() { - GetStruct()->on_request_geolocation_permission = - geolocation_handler_on_request_geolocation_permission; - GetStruct()->on_cancel_geolocation_permission = - geolocation_handler_on_cancel_geolocation_permission; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived( - CefWrapperType type, cef_geolocation_handler_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = - WT_GEOLOCATION_HANDLER; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/geolocation_handler_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/geolocation_handler_cpptoc.h deleted file mode 100644 index 16463b85..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/geolocation_handler_cpptoc.h +++ /dev/null @@ -1,35 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_GEOLOCATION_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_GEOLOCATION_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_geolocation_handler.h" -#include "include/capi/cef_geolocation_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefGeolocationHandlerCppToC - : public CefCppToC { - public: - CefGeolocationHandlerCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_GEOLOCATION_HANDLER_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/get_geolocation_callback_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/get_geolocation_callback_cpptoc.cc deleted file mode 100644 index 23a34aba..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/get_geolocation_callback_cpptoc.cc +++ /dev/null @@ -1,67 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/get_geolocation_callback_cpptoc.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK get_geolocation_callback_on_location_update( - struct _cef_get_geolocation_callback_t* self, - const struct _cef_geoposition_t* position) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: position; type: struct_byref_const - DCHECK(position); - if (!position) - return; - - // Translate param: position; type: struct_byref_const - CefGeoposition positionObj; - if (position) - positionObj.Set(*position, false); - - // Execute - CefGetGeolocationCallbackCppToC::Get(self)->OnLocationUpdate( - positionObj); -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefGetGeolocationCallbackCppToC::CefGetGeolocationCallbackCppToC() { - GetStruct()->on_location_update = get_geolocation_callback_on_location_update; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived( - CefWrapperType type, cef_get_geolocation_callback_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = - 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = - WT_GET_GEOLOCATION_CALLBACK; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/get_geolocation_callback_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/get_geolocation_callback_cpptoc.h deleted file mode 100644 index 069a505e..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/get_geolocation_callback_cpptoc.h +++ /dev/null @@ -1,35 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_GET_GEOLOCATION_CALLBACK_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_GET_GEOLOCATION_CALLBACK_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_geolocation.h" -#include "include/capi/cef_geolocation_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefGetGeolocationCallbackCppToC - : public CefCppToC { - public: - CefGetGeolocationCallbackCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_GET_GEOLOCATION_CALLBACK_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/jsdialog_handler_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/jsdialog_handler_cpptoc.cc deleted file mode 100644 index 022e55af..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/jsdialog_handler_cpptoc.cc +++ /dev/null @@ -1,162 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/jsdialog_handler_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/jsdialog_callback_ctocpp.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK jsdialog_handler_on_jsdialog( - struct _cef_jsdialog_handler_t* self, cef_browser_t* browser, - const cef_string_t* origin_url, 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, cef_jsdialog_callback_t* callback, - int* suppress_message) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: callback; type: refptr_diff - DCHECK(callback); - if (!callback) - return 0; - // Verify param: suppress_message; type: bool_byref - DCHECK(suppress_message); - if (!suppress_message) - return 0; - // Unverified params: origin_url, accept_lang, message_text, - // default_prompt_text - - // Translate param: suppress_message; type: bool_byref - bool suppress_messageBool = ( - suppress_message && *suppress_message)?true:false; - - // Execute - bool _retval = CefJSDialogHandlerCppToC::Get(self)->OnJSDialog( - CefBrowserCToCpp::Wrap(browser), - CefString(origin_url), - CefString(accept_lang), - dialog_type, - CefString(message_text), - CefString(default_prompt_text), - CefJSDialogCallbackCToCpp::Wrap(callback), - suppress_messageBool); - - // Restore param: suppress_message; type: bool_byref - if (suppress_message) - *suppress_message = suppress_messageBool?true:false; - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK jsdialog_handler_on_before_unload_dialog( - struct _cef_jsdialog_handler_t* self, cef_browser_t* browser, - const cef_string_t* message_text, int is_reload, - cef_jsdialog_callback_t* callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: callback; type: refptr_diff - DCHECK(callback); - if (!callback) - return 0; - // Unverified params: message_text - - // Execute - bool _retval = CefJSDialogHandlerCppToC::Get(self)->OnBeforeUnloadDialog( - CefBrowserCToCpp::Wrap(browser), - CefString(message_text), - is_reload?true:false, - CefJSDialogCallbackCToCpp::Wrap(callback)); - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK jsdialog_handler_on_reset_dialog_state( - struct _cef_jsdialog_handler_t* self, cef_browser_t* browser) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - - // Execute - CefJSDialogHandlerCppToC::Get(self)->OnResetDialogState( - CefBrowserCToCpp::Wrap(browser)); -} - -void CEF_CALLBACK jsdialog_handler_on_dialog_closed( - struct _cef_jsdialog_handler_t* self, cef_browser_t* browser) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - - // Execute - CefJSDialogHandlerCppToC::Get(self)->OnDialogClosed( - CefBrowserCToCpp::Wrap(browser)); -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefJSDialogHandlerCppToC::CefJSDialogHandlerCppToC() { - GetStruct()->on_jsdialog = jsdialog_handler_on_jsdialog; - GetStruct()->on_before_unload_dialog = - jsdialog_handler_on_before_unload_dialog; - GetStruct()->on_reset_dialog_state = jsdialog_handler_on_reset_dialog_state; - GetStruct()->on_dialog_closed = jsdialog_handler_on_dialog_closed; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived( - CefWrapperType type, cef_jsdialog_handler_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = - WT_JSDIALOG_HANDLER; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/jsdialog_handler_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/jsdialog_handler_cpptoc.h deleted file mode 100644 index 5fc7df21..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/jsdialog_handler_cpptoc.h +++ /dev/null @@ -1,35 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_JSDIALOG_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_JSDIALOG_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_jsdialog_handler.h" -#include "include/capi/cef_jsdialog_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefJSDialogHandlerCppToC - : public CefCppToC { - public: - CefJSDialogHandlerCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_JSDIALOG_HANDLER_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/keyboard_handler_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/keyboard_handler_cpptoc.cc deleted file mode 100644 index 92058559..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/keyboard_handler_cpptoc.cc +++ /dev/null @@ -1,122 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/keyboard_handler_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK keyboard_handler_on_pre_key_event( - struct _cef_keyboard_handler_t* self, cef_browser_t* browser, - const struct _cef_key_event_t* event, cef_event_handle_t os_event, - int* is_keyboard_shortcut) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: event; type: struct_byref_const - DCHECK(event); - if (!event) - return 0; - // Verify param: is_keyboard_shortcut; type: bool_byaddr - DCHECK(is_keyboard_shortcut); - if (!is_keyboard_shortcut) - return 0; - - // Translate param: event; type: struct_byref_const - CefKeyEvent eventObj; - if (event) - eventObj.Set(*event, false); - // Translate param: is_keyboard_shortcut; type: bool_byaddr - bool is_keyboard_shortcutBool = ( - is_keyboard_shortcut && *is_keyboard_shortcut)?true:false; - - // Execute - bool _retval = CefKeyboardHandlerCppToC::Get(self)->OnPreKeyEvent( - CefBrowserCToCpp::Wrap(browser), - eventObj, - os_event, - &is_keyboard_shortcutBool); - - // Restore param: is_keyboard_shortcut; type: bool_byaddr - if (is_keyboard_shortcut) - *is_keyboard_shortcut = is_keyboard_shortcutBool?true:false; - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK keyboard_handler_on_key_event( - struct _cef_keyboard_handler_t* self, cef_browser_t* browser, - const struct _cef_key_event_t* event, cef_event_handle_t os_event) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: event; type: struct_byref_const - DCHECK(event); - if (!event) - return 0; - - // Translate param: event; type: struct_byref_const - CefKeyEvent eventObj; - if (event) - eventObj.Set(*event, false); - - // Execute - bool _retval = CefKeyboardHandlerCppToC::Get(self)->OnKeyEvent( - CefBrowserCToCpp::Wrap(browser), - eventObj, - os_event); - - // Return type: bool - return _retval; -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefKeyboardHandlerCppToC::CefKeyboardHandlerCppToC() { - GetStruct()->on_pre_key_event = keyboard_handler_on_pre_key_event; - GetStruct()->on_key_event = keyboard_handler_on_key_event; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived( - CefWrapperType type, cef_keyboard_handler_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = - WT_KEYBOARD_HANDLER; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/keyboard_handler_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/keyboard_handler_cpptoc.h deleted file mode 100644 index ace14267..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/keyboard_handler_cpptoc.h +++ /dev/null @@ -1,35 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_KEYBOARD_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_KEYBOARD_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_keyboard_handler.h" -#include "include/capi/cef_keyboard_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefKeyboardHandlerCppToC - : public CefCppToC { - public: - CefKeyboardHandlerCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_KEYBOARD_HANDLER_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/life_span_handler_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/life_span_handler_cpptoc.cc deleted file mode 100644 index aacd7358..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/life_span_handler_cpptoc.cc +++ /dev/null @@ -1,226 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/client_cpptoc.h" -#include "libcef_dll/cpptoc/life_span_handler_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/frame_ctocpp.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK life_span_handler_on_before_popup( - struct _cef_life_span_handler_t* self, cef_browser_t* browser, - cef_frame_t* frame, const cef_string_t* target_url, - const cef_string_t* target_frame_name, - cef_window_open_disposition_t target_disposition, int user_gesture, - const struct _cef_popup_features_t* popupFeatures, - cef_window_info_t* windowInfo, cef_client_t** client, - struct _cef_browser_settings_t* settings, int* no_javascript_access) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return 0; - // Verify param: popupFeatures; type: struct_byref_const - DCHECK(popupFeatures); - if (!popupFeatures) - return 0; - // Verify param: windowInfo; type: struct_byref - DCHECK(windowInfo); - if (!windowInfo) - return 0; - // Verify param: client; type: refptr_same_byref - DCHECK(client); - if (!client) - return 0; - // Verify param: settings; type: struct_byref - DCHECK(settings); - if (!settings) - return 0; - // Verify param: no_javascript_access; type: bool_byaddr - DCHECK(no_javascript_access); - if (!no_javascript_access) - return 0; - // Unverified params: target_url, target_frame_name - - // Translate param: popupFeatures; type: struct_byref_const - CefPopupFeatures popupFeaturesObj; - if (popupFeatures) - popupFeaturesObj.Set(*popupFeatures, false); - // Translate param: windowInfo; type: struct_byref - CefWindowInfo windowInfoObj; - if (windowInfo) - windowInfoObj.AttachTo(*windowInfo); - // Translate param: client; type: refptr_same_byref - CefRefPtr clientPtr; - if (client && *client) - clientPtr = CefClientCppToC::Unwrap(*client); - CefClient* clientOrig = clientPtr.get(); - // Translate param: settings; type: struct_byref - CefBrowserSettings settingsObj; - if (settings) - settingsObj.AttachTo(*settings); - // Translate param: no_javascript_access; type: bool_byaddr - bool no_javascript_accessBool = ( - no_javascript_access && *no_javascript_access)?true:false; - - // Execute - bool _retval = CefLifeSpanHandlerCppToC::Get(self)->OnBeforePopup( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefString(target_url), - CefString(target_frame_name), - target_disposition, - user_gesture?true:false, - popupFeaturesObj, - windowInfoObj, - clientPtr, - settingsObj, - &no_javascript_accessBool); - - // Restore param: windowInfo; type: struct_byref - if (windowInfo) - windowInfoObj.DetachTo(*windowInfo); - // Restore param: client; type: refptr_same_byref - if (client) { - if (clientPtr.get()) { - if (clientPtr.get() != clientOrig) { - *client = CefClientCppToC::Wrap(clientPtr); - } - } else { - *client = NULL; - } - } - // Restore param: settings; type: struct_byref - if (settings) - settingsObj.DetachTo(*settings); - // Restore param: no_javascript_access; type: bool_byaddr - if (no_javascript_access) - *no_javascript_access = no_javascript_accessBool?true:false; - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK life_span_handler_on_after_created( - struct _cef_life_span_handler_t* self, cef_browser_t* browser) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - - // Execute - CefLifeSpanHandlerCppToC::Get(self)->OnAfterCreated( - CefBrowserCToCpp::Wrap(browser)); -} - -int CEF_CALLBACK life_span_handler_run_modal( - struct _cef_life_span_handler_t* self, cef_browser_t* browser) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - - // Execute - bool _retval = CefLifeSpanHandlerCppToC::Get(self)->RunModal( - CefBrowserCToCpp::Wrap(browser)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK life_span_handler_do_close( - struct _cef_life_span_handler_t* self, cef_browser_t* browser) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - - // Execute - bool _retval = CefLifeSpanHandlerCppToC::Get(self)->DoClose( - CefBrowserCToCpp::Wrap(browser)); - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK life_span_handler_on_before_close( - struct _cef_life_span_handler_t* self, cef_browser_t* browser) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - - // Execute - CefLifeSpanHandlerCppToC::Get(self)->OnBeforeClose( - CefBrowserCToCpp::Wrap(browser)); -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefLifeSpanHandlerCppToC::CefLifeSpanHandlerCppToC() { - GetStruct()->on_before_popup = life_span_handler_on_before_popup; - GetStruct()->on_after_created = life_span_handler_on_after_created; - GetStruct()->run_modal = life_span_handler_run_modal; - GetStruct()->do_close = life_span_handler_do_close; - GetStruct()->on_before_close = life_span_handler_on_before_close; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived( - CefWrapperType type, cef_life_span_handler_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = - WT_LIFE_SPAN_HANDLER; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/life_span_handler_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/life_span_handler_cpptoc.h deleted file mode 100644 index f2b5ccf9..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/life_span_handler_cpptoc.h +++ /dev/null @@ -1,37 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_LIFE_SPAN_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_LIFE_SPAN_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_life_span_handler.h" -#include "include/capi/cef_life_span_handler_capi.h" -#include "include/cef_client.h" -#include "include/capi/cef_client_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefLifeSpanHandlerCppToC - : public CefCppToC { - public: - CefLifeSpanHandlerCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_LIFE_SPAN_HANDLER_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/load_handler_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/load_handler_cpptoc.cc deleted file mode 100644 index b128f9c8..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/load_handler_cpptoc.cc +++ /dev/null @@ -1,144 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/load_handler_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/frame_ctocpp.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK load_handler_on_loading_state_change( - struct _cef_load_handler_t* self, cef_browser_t* browser, int isLoading, - int canGoBack, int canGoForward) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - - // Execute - CefLoadHandlerCppToC::Get(self)->OnLoadingStateChange( - CefBrowserCToCpp::Wrap(browser), - isLoading?true:false, - canGoBack?true:false, - canGoForward?true:false); -} - -void CEF_CALLBACK load_handler_on_load_start(struct _cef_load_handler_t* self, - cef_browser_t* browser, cef_frame_t* frame) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return; - - // Execute - CefLoadHandlerCppToC::Get(self)->OnLoadStart( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame)); -} - -void CEF_CALLBACK load_handler_on_load_end(struct _cef_load_handler_t* self, - cef_browser_t* browser, cef_frame_t* frame, int httpStatusCode) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return; - - // Execute - CefLoadHandlerCppToC::Get(self)->OnLoadEnd( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - httpStatusCode); -} - -void CEF_CALLBACK load_handler_on_load_error(struct _cef_load_handler_t* self, - cef_browser_t* browser, cef_frame_t* frame, cef_errorcode_t errorCode, - const cef_string_t* errorText, const cef_string_t* failedUrl) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return; - // Verify param: failedUrl; type: string_byref_const - DCHECK(failedUrl); - if (!failedUrl) - return; - // Unverified params: errorText - - // Execute - CefLoadHandlerCppToC::Get(self)->OnLoadError( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - errorCode, - CefString(errorText), - CefString(failedUrl)); -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefLoadHandlerCppToC::CefLoadHandlerCppToC() { - GetStruct()->on_loading_state_change = load_handler_on_loading_state_change; - GetStruct()->on_load_start = load_handler_on_load_start; - GetStruct()->on_load_end = load_handler_on_load_end; - GetStruct()->on_load_error = load_handler_on_load_error; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived(CefWrapperType type, - cef_load_handler_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = WT_LOAD_HANDLER; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/load_handler_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/load_handler_cpptoc.h deleted file mode 100644 index 910d01e4..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/load_handler_cpptoc.h +++ /dev/null @@ -1,35 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_LOAD_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_LOAD_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_load_handler.h" -#include "include/capi/cef_load_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefLoadHandlerCppToC - : public CefCppToC { - public: - CefLoadHandlerCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_LOAD_HANDLER_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.cc deleted file mode 100644 index 0cabd0b8..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.cc +++ /dev/null @@ -1,70 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.h" -#include "libcef_dll/ctocpp/navigation_entry_ctocpp.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK navigation_entry_visitor_visit( - struct _cef_navigation_entry_visitor_t* self, - struct _cef_navigation_entry_t* entry, int current, int index, - int total) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: entry; type: refptr_diff - DCHECK(entry); - if (!entry) - return 0; - - // Execute - bool _retval = CefNavigationEntryVisitorCppToC::Get(self)->Visit( - CefNavigationEntryCToCpp::Wrap(entry), - current?true:false, - index, - total); - - // Return type: bool - return _retval; -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefNavigationEntryVisitorCppToC::CefNavigationEntryVisitorCppToC() { - GetStruct()->visit = navigation_entry_visitor_visit; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived( - CefWrapperType type, cef_navigation_entry_visitor_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = - 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = - WT_NAVIGATION_ENTRY_VISITOR; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.h deleted file mode 100644 index 5cd69145..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.h +++ /dev/null @@ -1,37 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_NAVIGATION_ENTRY_VISITOR_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_NAVIGATION_ENTRY_VISITOR_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_browser.h" -#include "include/capi/cef_browser_capi.h" -#include "include/cef_client.h" -#include "include/capi/cef_client_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefNavigationEntryVisitorCppToC - : public CefCppToC { - public: - CefNavigationEntryVisitorCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_NAVIGATION_ENTRY_VISITOR_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/pdf_print_callback_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/pdf_print_callback_cpptoc.cc deleted file mode 100644 index df561061..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/pdf_print_callback_cpptoc.cc +++ /dev/null @@ -1,61 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/pdf_print_callback_cpptoc.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK pdf_print_callback_on_pdf_print_finished( - struct _cef_pdf_print_callback_t* self, const cef_string_t* path, int ok) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: path; type: string_byref_const - DCHECK(path); - if (!path) - return; - - // Execute - CefPdfPrintCallbackCppToC::Get(self)->OnPdfPrintFinished( - CefString(path), - ok?true:false); -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefPdfPrintCallbackCppToC::CefPdfPrintCallbackCppToC() { - GetStruct()->on_pdf_print_finished = pdf_print_callback_on_pdf_print_finished; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived( - CefWrapperType type, cef_pdf_print_callback_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = - WT_PDF_PRINT_CALLBACK; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/pdf_print_callback_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/pdf_print_callback_cpptoc.h deleted file mode 100644 index 14382b04..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/pdf_print_callback_cpptoc.h +++ /dev/null @@ -1,37 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_PDF_PRINT_CALLBACK_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_PDF_PRINT_CALLBACK_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_browser.h" -#include "include/capi/cef_browser_capi.h" -#include "include/cef_client.h" -#include "include/capi/cef_client_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefPdfPrintCallbackCppToC - : public CefCppToC { - public: - CefPdfPrintCallbackCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_PDF_PRINT_CALLBACK_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/print_handler_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/print_handler_cpptoc.cc deleted file mode 100644 index 6d8002f5..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/print_handler_cpptoc.cc +++ /dev/null @@ -1,168 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/print_handler_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/print_dialog_callback_ctocpp.h" -#include "libcef_dll/ctocpp/print_job_callback_ctocpp.h" -#include "libcef_dll/ctocpp/print_settings_ctocpp.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK print_handler_on_print_start( - struct _cef_print_handler_t* self, cef_browser_t* browser) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - - // Execute - CefPrintHandlerCppToC::Get(self)->OnPrintStart( - CefBrowserCToCpp::Wrap(browser)); -} - -void CEF_CALLBACK print_handler_on_print_settings( - struct _cef_print_handler_t* self, struct _cef_print_settings_t* settings, - int get_defaults) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: settings; type: refptr_diff - DCHECK(settings); - if (!settings) - return; - - // Execute - CefPrintHandlerCppToC::Get(self)->OnPrintSettings( - CefPrintSettingsCToCpp::Wrap(settings), - get_defaults?true:false); -} - -int CEF_CALLBACK print_handler_on_print_dialog( - struct _cef_print_handler_t* self, int has_selection, - cef_print_dialog_callback_t* callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: callback; type: refptr_diff - DCHECK(callback); - if (!callback) - return 0; - - // Execute - bool _retval = CefPrintHandlerCppToC::Get(self)->OnPrintDialog( - has_selection?true:false, - CefPrintDialogCallbackCToCpp::Wrap(callback)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK print_handler_on_print_job(struct _cef_print_handler_t* self, - const cef_string_t* document_name, const cef_string_t* pdf_file_path, - cef_print_job_callback_t* callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: document_name; type: string_byref_const - DCHECK(document_name); - if (!document_name) - return 0; - // Verify param: pdf_file_path; type: string_byref_const - DCHECK(pdf_file_path); - if (!pdf_file_path) - return 0; - // Verify param: callback; type: refptr_diff - DCHECK(callback); - if (!callback) - return 0; - - // Execute - bool _retval = CefPrintHandlerCppToC::Get(self)->OnPrintJob( - CefString(document_name), - CefString(pdf_file_path), - CefPrintJobCallbackCToCpp::Wrap(callback)); - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK print_handler_on_print_reset( - struct _cef_print_handler_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefPrintHandlerCppToC::Get(self)->OnPrintReset(); -} - -cef_size_t CEF_CALLBACK print_handler_get_pdf_paper_size( - struct _cef_print_handler_t* self, int device_units_per_inch) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return CefSize(); - - // Execute - cef_size_t _retval = CefPrintHandlerCppToC::Get(self)->GetPdfPaperSize( - device_units_per_inch); - - // Return type: simple - return _retval; -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefPrintHandlerCppToC::CefPrintHandlerCppToC() { - GetStruct()->on_print_start = print_handler_on_print_start; - GetStruct()->on_print_settings = print_handler_on_print_settings; - GetStruct()->on_print_dialog = print_handler_on_print_dialog; - GetStruct()->on_print_job = print_handler_on_print_job; - GetStruct()->on_print_reset = print_handler_on_print_reset; - GetStruct()->get_pdf_paper_size = print_handler_get_pdf_paper_size; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived(CefWrapperType type, - cef_print_handler_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = WT_PRINT_HANDLER; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/print_handler_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/print_handler_cpptoc.h deleted file mode 100644 index 30a9aa5f..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/print_handler_cpptoc.h +++ /dev/null @@ -1,35 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_PRINT_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_PRINT_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_print_handler.h" -#include "include/capi/cef_print_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefPrintHandlerCppToC - : public CefCppToC { - public: - CefPrintHandlerCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_PRINT_HANDLER_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/read_handler_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/read_handler_cpptoc.cc deleted file mode 100644 index 36b35ee8..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/read_handler_cpptoc.cc +++ /dev/null @@ -1,127 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/read_handler_cpptoc.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -size_t CEF_CALLBACK read_handler_read(struct _cef_read_handler_t* self, - void* ptr, size_t size, size_t n) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: ptr; type: simple_byaddr - DCHECK(ptr); - if (!ptr) - return 0; - - // Execute - size_t _retval = CefReadHandlerCppToC::Get(self)->Read( - ptr, - size, - n); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK read_handler_seek(struct _cef_read_handler_t* self, - int64 offset, int whence) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefReadHandlerCppToC::Get(self)->Seek( - offset, - whence); - - // Return type: simple - return _retval; -} - -int64 CEF_CALLBACK read_handler_tell(struct _cef_read_handler_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int64 _retval = CefReadHandlerCppToC::Get(self)->Tell(); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK read_handler_eof(struct _cef_read_handler_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefReadHandlerCppToC::Get(self)->Eof(); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK read_handler_may_block(struct _cef_read_handler_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefReadHandlerCppToC::Get(self)->MayBlock(); - - // Return type: bool - return _retval; -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefReadHandlerCppToC::CefReadHandlerCppToC() { - GetStruct()->read = read_handler_read; - GetStruct()->seek = read_handler_seek; - GetStruct()->tell = read_handler_tell; - GetStruct()->eof = read_handler_eof; - GetStruct()->may_block = read_handler_may_block; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived(CefWrapperType type, - cef_read_handler_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = WT_READ_HANDLER; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/read_handler_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/read_handler_cpptoc.h deleted file mode 100644 index f9749350..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/read_handler_cpptoc.h +++ /dev/null @@ -1,35 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_READ_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_READ_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_stream.h" -#include "include/capi/cef_stream_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefReadHandlerCppToC - : public CefCppToC { - public: - CefReadHandlerCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_READ_HANDLER_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/render_handler_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/render_handler_cpptoc.cc deleted file mode 100644 index 9565b9bf..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/render_handler_cpptoc.cc +++ /dev/null @@ -1,386 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/render_handler_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/drag_data_ctocpp.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK render_handler_get_root_screen_rect( - struct _cef_render_handler_t* self, cef_browser_t* browser, - cef_rect_t* rect) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: rect; type: simple_byref - DCHECK(rect); - if (!rect) - return 0; - - // Translate param: rect; type: simple_byref - CefRect rectVal = rect?*rect:CefRect(); - - // Execute - bool _retval = CefRenderHandlerCppToC::Get(self)->GetRootScreenRect( - CefBrowserCToCpp::Wrap(browser), - rectVal); - - // Restore param: rect; type: simple_byref - if (rect) - *rect = rectVal; - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK render_handler_get_view_rect( - struct _cef_render_handler_t* self, cef_browser_t* browser, - cef_rect_t* rect) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: rect; type: simple_byref - DCHECK(rect); - if (!rect) - return 0; - - // Translate param: rect; type: simple_byref - CefRect rectVal = rect?*rect:CefRect(); - - // Execute - bool _retval = CefRenderHandlerCppToC::Get(self)->GetViewRect( - CefBrowserCToCpp::Wrap(browser), - rectVal); - - // Restore param: rect; type: simple_byref - if (rect) - *rect = rectVal; - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK render_handler_get_screen_point( - struct _cef_render_handler_t* self, cef_browser_t* browser, int viewX, - int viewY, int* screenX, int* screenY) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: screenX; type: simple_byref - DCHECK(screenX); - if (!screenX) - return 0; - // Verify param: screenY; type: simple_byref - DCHECK(screenY); - if (!screenY) - return 0; - - // Translate param: screenX; type: simple_byref - int screenXVal = screenX?*screenX:0; - // Translate param: screenY; type: simple_byref - int screenYVal = screenY?*screenY:0; - - // Execute - bool _retval = CefRenderHandlerCppToC::Get(self)->GetScreenPoint( - CefBrowserCToCpp::Wrap(browser), - viewX, - viewY, - screenXVal, - screenYVal); - - // Restore param: screenX; type: simple_byref - if (screenX) - *screenX = screenXVal; - // Restore param: screenY; type: simple_byref - if (screenY) - *screenY = screenYVal; - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK render_handler_get_screen_info( - struct _cef_render_handler_t* self, cef_browser_t* browser, - struct _cef_screen_info_t* screen_info) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: screen_info; type: struct_byref - DCHECK(screen_info); - if (!screen_info) - return 0; - - // Translate param: screen_info; type: struct_byref - CefScreenInfo screen_infoObj; - if (screen_info) - screen_infoObj.AttachTo(*screen_info); - - // Execute - bool _retval = CefRenderHandlerCppToC::Get(self)->GetScreenInfo( - CefBrowserCToCpp::Wrap(browser), - screen_infoObj); - - // Restore param: screen_info; type: struct_byref - if (screen_info) - screen_infoObj.DetachTo(*screen_info); - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK render_handler_on_popup_show( - struct _cef_render_handler_t* self, cef_browser_t* browser, int show) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - - // Execute - CefRenderHandlerCppToC::Get(self)->OnPopupShow( - CefBrowserCToCpp::Wrap(browser), - show?true:false); -} - -void CEF_CALLBACK render_handler_on_popup_size( - struct _cef_render_handler_t* self, cef_browser_t* browser, - const cef_rect_t* rect) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: rect; type: simple_byref_const - DCHECK(rect); - if (!rect) - return; - - // Translate param: rect; type: simple_byref_const - CefRect rectVal = rect?*rect:CefRect(); - - // Execute - CefRenderHandlerCppToC::Get(self)->OnPopupSize( - CefBrowserCToCpp::Wrap(browser), - rectVal); -} - -void CEF_CALLBACK render_handler_on_paint(struct _cef_render_handler_t* self, - cef_browser_t* browser, cef_paint_element_type_t type, - size_t dirtyRectsCount, cef_rect_t const* dirtyRects, const void* buffer, - int width, int height) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: dirtyRects; type: simple_vec_byref_const - DCHECK(dirtyRectsCount == 0 || dirtyRects); - if (dirtyRectsCount > 0 && !dirtyRects) - return; - // Verify param: buffer; type: simple_byaddr - DCHECK(buffer); - if (!buffer) - return; - - // Translate param: dirtyRects; type: simple_vec_byref_const - std::vector dirtyRectsList; - if (dirtyRectsCount > 0) { - for (size_t i = 0; i < dirtyRectsCount; ++i) { - CefRect dirtyRectsVal = dirtyRects[i]; - dirtyRectsList.push_back(dirtyRectsVal); - } - } - - // Execute - CefRenderHandlerCppToC::Get(self)->OnPaint( - CefBrowserCToCpp::Wrap(browser), - type, - dirtyRectsList, - buffer, - width, - height); -} - -void CEF_CALLBACK render_handler_on_cursor_change( - struct _cef_render_handler_t* self, cef_browser_t* browser, - cef_cursor_handle_t cursor, cef_cursor_type_t type, - const struct _cef_cursor_info_t* custom_cursor_info) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: custom_cursor_info; type: struct_byref_const - DCHECK(custom_cursor_info); - if (!custom_cursor_info) - return; - - // Translate param: custom_cursor_info; type: struct_byref_const - CefCursorInfo custom_cursor_infoObj; - if (custom_cursor_info) - custom_cursor_infoObj.Set(*custom_cursor_info, false); - - // Execute - CefRenderHandlerCppToC::Get(self)->OnCursorChange( - CefBrowserCToCpp::Wrap(browser), - cursor, - type, - custom_cursor_infoObj); -} - -int CEF_CALLBACK render_handler_start_dragging( - struct _cef_render_handler_t* self, cef_browser_t* browser, - cef_drag_data_t* drag_data, cef_drag_operations_mask_t allowed_ops, int x, - int y) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: drag_data; type: refptr_diff - DCHECK(drag_data); - if (!drag_data) - return 0; - - // Execute - bool _retval = CefRenderHandlerCppToC::Get(self)->StartDragging( - CefBrowserCToCpp::Wrap(browser), - CefDragDataCToCpp::Wrap(drag_data), - allowed_ops, - x, - y); - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK render_handler_update_drag_cursor( - struct _cef_render_handler_t* self, cef_browser_t* browser, - cef_drag_operations_mask_t operation) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - - // Execute - CefRenderHandlerCppToC::Get(self)->UpdateDragCursor( - CefBrowserCToCpp::Wrap(browser), - operation); -} - -void CEF_CALLBACK render_handler_on_scroll_offset_changed( - struct _cef_render_handler_t* self, cef_browser_t* browser, double x, - double y) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - - // Execute - CefRenderHandlerCppToC::Get(self)->OnScrollOffsetChanged( - CefBrowserCToCpp::Wrap(browser), - x, - y); -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefRenderHandlerCppToC::CefRenderHandlerCppToC() { - GetStruct()->get_root_screen_rect = render_handler_get_root_screen_rect; - GetStruct()->get_view_rect = render_handler_get_view_rect; - GetStruct()->get_screen_point = render_handler_get_screen_point; - GetStruct()->get_screen_info = render_handler_get_screen_info; - GetStruct()->on_popup_show = render_handler_on_popup_show; - GetStruct()->on_popup_size = render_handler_on_popup_size; - GetStruct()->on_paint = render_handler_on_paint; - GetStruct()->on_cursor_change = render_handler_on_cursor_change; - GetStruct()->start_dragging = render_handler_start_dragging; - GetStruct()->update_drag_cursor = render_handler_update_drag_cursor; - GetStruct()->on_scroll_offset_changed = - render_handler_on_scroll_offset_changed; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived(CefWrapperType type, - cef_render_handler_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = WT_RENDER_HANDLER; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/render_handler_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/render_handler_cpptoc.h deleted file mode 100644 index 189f1274..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/render_handler_cpptoc.h +++ /dev/null @@ -1,35 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_RENDER_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_RENDER_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_render_handler.h" -#include "include/capi/cef_render_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefRenderHandlerCppToC - : public CefCppToC { - public: - CefRenderHandlerCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_RENDER_HANDLER_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/render_process_handler_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/render_process_handler_cpptoc.cc deleted file mode 100644 index f5cc0f1f..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/render_process_handler_cpptoc.cc +++ /dev/null @@ -1,329 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/load_handler_cpptoc.h" -#include "libcef_dll/cpptoc/render_process_handler_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/domnode_ctocpp.h" -#include "libcef_dll/ctocpp/frame_ctocpp.h" -#include "libcef_dll/ctocpp/list_value_ctocpp.h" -#include "libcef_dll/ctocpp/process_message_ctocpp.h" -#include "libcef_dll/ctocpp/request_ctocpp.h" -#include "libcef_dll/ctocpp/v8context_ctocpp.h" -#include "libcef_dll/ctocpp/v8exception_ctocpp.h" -#include "libcef_dll/ctocpp/v8stack_trace_ctocpp.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK render_process_handler_on_render_thread_created( - struct _cef_render_process_handler_t* self, - struct _cef_list_value_t* extra_info) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: extra_info; type: refptr_diff - DCHECK(extra_info); - if (!extra_info) - return; - - // Execute - CefRenderProcessHandlerCppToC::Get(self)->OnRenderThreadCreated( - CefListValueCToCpp::Wrap(extra_info)); -} - -void CEF_CALLBACK render_process_handler_on_web_kit_initialized( - struct _cef_render_process_handler_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefRenderProcessHandlerCppToC::Get(self)->OnWebKitInitialized(); -} - -void CEF_CALLBACK render_process_handler_on_browser_created( - struct _cef_render_process_handler_t* self, cef_browser_t* browser) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - - // Execute - CefRenderProcessHandlerCppToC::Get(self)->OnBrowserCreated( - CefBrowserCToCpp::Wrap(browser)); -} - -void CEF_CALLBACK render_process_handler_on_browser_destroyed( - struct _cef_render_process_handler_t* self, cef_browser_t* browser) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - - // Execute - CefRenderProcessHandlerCppToC::Get(self)->OnBrowserDestroyed( - CefBrowserCToCpp::Wrap(browser)); -} - -cef_load_handler_t* CEF_CALLBACK render_process_handler_get_load_handler( - struct _cef_render_process_handler_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefRenderProcessHandlerCppToC::Get( - self)->GetLoadHandler(); - - // Return type: refptr_same - return CefLoadHandlerCppToC::Wrap(_retval); -} - -int CEF_CALLBACK render_process_handler_on_before_navigation( - struct _cef_render_process_handler_t* self, cef_browser_t* browser, - cef_frame_t* frame, struct _cef_request_t* request, - cef_navigation_type_t navigation_type, int is_redirect) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return 0; - // Verify param: request; type: refptr_diff - DCHECK(request); - if (!request) - return 0; - - // Execute - bool _retval = CefRenderProcessHandlerCppToC::Get(self)->OnBeforeNavigation( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefRequestCToCpp::Wrap(request), - navigation_type, - is_redirect?true:false); - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK render_process_handler_on_context_created( - struct _cef_render_process_handler_t* self, cef_browser_t* browser, - cef_frame_t* frame, struct _cef_v8context_t* context) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return; - // Verify param: context; type: refptr_diff - DCHECK(context); - if (!context) - return; - - // Execute - CefRenderProcessHandlerCppToC::Get(self)->OnContextCreated( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefV8ContextCToCpp::Wrap(context)); -} - -void CEF_CALLBACK render_process_handler_on_context_released( - struct _cef_render_process_handler_t* self, cef_browser_t* browser, - cef_frame_t* frame, struct _cef_v8context_t* context) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return; - // Verify param: context; type: refptr_diff - DCHECK(context); - if (!context) - return; - - // Execute - CefRenderProcessHandlerCppToC::Get(self)->OnContextReleased( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefV8ContextCToCpp::Wrap(context)); -} - -void CEF_CALLBACK render_process_handler_on_uncaught_exception( - struct _cef_render_process_handler_t* self, cef_browser_t* browser, - cef_frame_t* frame, struct _cef_v8context_t* context, - struct _cef_v8exception_t* exception, - struct _cef_v8stack_trace_t* stackTrace) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return; - // Verify param: context; type: refptr_diff - DCHECK(context); - if (!context) - return; - // Verify param: exception; type: refptr_diff - DCHECK(exception); - if (!exception) - return; - // Verify param: stackTrace; type: refptr_diff - DCHECK(stackTrace); - if (!stackTrace) - return; - - // Execute - CefRenderProcessHandlerCppToC::Get(self)->OnUncaughtException( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefV8ContextCToCpp::Wrap(context), - CefV8ExceptionCToCpp::Wrap(exception), - CefV8StackTraceCToCpp::Wrap(stackTrace)); -} - -void CEF_CALLBACK render_process_handler_on_focused_node_changed( - struct _cef_render_process_handler_t* self, cef_browser_t* browser, - cef_frame_t* frame, cef_domnode_t* node) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Unverified params: frame, node - - // Execute - CefRenderProcessHandlerCppToC::Get(self)->OnFocusedNodeChanged( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefDOMNodeCToCpp::Wrap(node)); -} - -int CEF_CALLBACK render_process_handler_on_process_message_received( - struct _cef_render_process_handler_t* self, cef_browser_t* browser, - cef_process_id_t source_process, cef_process_message_t* message) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: message; type: refptr_diff - DCHECK(message); - if (!message) - return 0; - - // Execute - bool _retval = CefRenderProcessHandlerCppToC::Get( - self)->OnProcessMessageReceived( - CefBrowserCToCpp::Wrap(browser), - source_process, - CefProcessMessageCToCpp::Wrap(message)); - - // Return type: bool - return _retval; -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefRenderProcessHandlerCppToC::CefRenderProcessHandlerCppToC() { - GetStruct()->on_render_thread_created = - render_process_handler_on_render_thread_created; - GetStruct()->on_web_kit_initialized = - render_process_handler_on_web_kit_initialized; - GetStruct()->on_browser_created = render_process_handler_on_browser_created; - GetStruct()->on_browser_destroyed = - render_process_handler_on_browser_destroyed; - GetStruct()->get_load_handler = render_process_handler_get_load_handler; - GetStruct()->on_before_navigation = - render_process_handler_on_before_navigation; - GetStruct()->on_context_created = render_process_handler_on_context_created; - GetStruct()->on_context_released = render_process_handler_on_context_released; - GetStruct()->on_uncaught_exception = - render_process_handler_on_uncaught_exception; - GetStruct()->on_focused_node_changed = - render_process_handler_on_focused_node_changed; - GetStruct()->on_process_message_received = - render_process_handler_on_process_message_received; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived( - CefWrapperType type, cef_render_process_handler_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = - WT_RENDER_PROCESS_HANDLER; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/render_process_handler_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/render_process_handler_cpptoc.h deleted file mode 100644 index 0fd1de19..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/render_process_handler_cpptoc.h +++ /dev/null @@ -1,35 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_RENDER_PROCESS_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_RENDER_PROCESS_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_render_process_handler.h" -#include "include/capi/cef_render_process_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefRenderProcessHandlerCppToC - : public CefCppToC { - public: - CefRenderProcessHandlerCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_RENDER_PROCESS_HANDLER_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/request_context_handler_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/request_context_handler_cpptoc.cc deleted file mode 100644 index 0aff8c19..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/request_context_handler_cpptoc.cc +++ /dev/null @@ -1,99 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/request_context_handler_cpptoc.h" -#include "libcef_dll/ctocpp/cookie_manager_ctocpp.h" -#include "libcef_dll/ctocpp/web_plugin_info_ctocpp.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -cef_cookie_manager_t* CEF_CALLBACK request_context_handler_get_cookie_manager( - struct _cef_request_context_handler_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefRequestContextHandlerCppToC::Get( - self)->GetCookieManager(); - - // Return type: refptr_diff - return CefCookieManagerCToCpp::Unwrap(_retval); -} - -int CEF_CALLBACK request_context_handler_on_before_plugin_load( - struct _cef_request_context_handler_t* self, const cef_string_t* mime_type, - const cef_string_t* plugin_url, const cef_string_t* top_origin_url, - struct _cef_web_plugin_info_t* plugin_info, - cef_plugin_policy_t* plugin_policy) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: mime_type; type: string_byref_const - DCHECK(mime_type); - if (!mime_type) - return 0; - // Verify param: plugin_info; type: refptr_diff - DCHECK(plugin_info); - if (!plugin_info) - return 0; - // Verify param: plugin_policy; type: simple_byaddr - DCHECK(plugin_policy); - if (!plugin_policy) - return 0; - // Unverified params: plugin_url, top_origin_url - - // Execute - bool _retval = CefRequestContextHandlerCppToC::Get(self)->OnBeforePluginLoad( - CefString(mime_type), - CefString(plugin_url), - CefString(top_origin_url), - CefWebPluginInfoCToCpp::Wrap(plugin_info), - plugin_policy); - - // Return type: bool - return _retval; -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefRequestContextHandlerCppToC::CefRequestContextHandlerCppToC() { - GetStruct()->get_cookie_manager = request_context_handler_get_cookie_manager; - GetStruct()->on_before_plugin_load = - request_context_handler_on_before_plugin_load; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived( - CefWrapperType type, cef_request_context_handler_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = - WT_REQUEST_CONTEXT_HANDLER; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/request_context_handler_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/request_context_handler_cpptoc.h deleted file mode 100644 index 9996027e..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/request_context_handler_cpptoc.h +++ /dev/null @@ -1,35 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_REQUEST_CONTEXT_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_REQUEST_CONTEXT_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_request_context_handler.h" -#include "include/capi/cef_request_context_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefRequestContextHandlerCppToC - : public CefCppToC { - public: - CefRequestContextHandlerCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_REQUEST_CONTEXT_HANDLER_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/request_handler_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/request_handler_cpptoc.cc deleted file mode 100644 index ae53d1ae..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/request_handler_cpptoc.cc +++ /dev/null @@ -1,562 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/request_handler_cpptoc.h" -#include "libcef_dll/cpptoc/resource_handler_cpptoc.h" -#include "libcef_dll/cpptoc/response_filter_cpptoc.h" -#include "libcef_dll/ctocpp/auth_callback_ctocpp.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/frame_ctocpp.h" -#include "libcef_dll/ctocpp/request_ctocpp.h" -#include "libcef_dll/ctocpp/request_callback_ctocpp.h" -#include "libcef_dll/ctocpp/response_ctocpp.h" -#include "libcef_dll/ctocpp/sslinfo_ctocpp.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK request_handler_on_before_browse( - struct _cef_request_handler_t* self, cef_browser_t* browser, - cef_frame_t* frame, cef_request_t* request, int is_redirect) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return 0; - // Verify param: request; type: refptr_diff - DCHECK(request); - if (!request) - return 0; - - // Execute - bool _retval = CefRequestHandlerCppToC::Get(self)->OnBeforeBrowse( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefRequestCToCpp::Wrap(request), - is_redirect?true:false); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK request_handler_on_open_urlfrom_tab( - struct _cef_request_handler_t* self, cef_browser_t* browser, - cef_frame_t* frame, const cef_string_t* target_url, - cef_window_open_disposition_t target_disposition, int user_gesture) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return 0; - // Verify param: target_url; type: string_byref_const - DCHECK(target_url); - if (!target_url) - return 0; - - // Execute - bool _retval = CefRequestHandlerCppToC::Get(self)->OnOpenURLFromTab( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefString(target_url), - target_disposition, - user_gesture?true:false); - - // Return type: bool - return _retval; -} - -cef_return_value_t CEF_CALLBACK request_handler_on_before_resource_load( - struct _cef_request_handler_t* self, cef_browser_t* browser, - cef_frame_t* frame, cef_request_t* request, - cef_request_callback_t* callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return RV_CONTINUE; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return RV_CONTINUE; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return RV_CONTINUE; - // Verify param: request; type: refptr_diff - DCHECK(request); - if (!request) - return RV_CONTINUE; - // Verify param: callback; type: refptr_diff - DCHECK(callback); - if (!callback) - return RV_CONTINUE; - - // Execute - cef_return_value_t _retval = CefRequestHandlerCppToC::Get( - self)->OnBeforeResourceLoad( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefRequestCToCpp::Wrap(request), - CefRequestCallbackCToCpp::Wrap(callback)); - - // Return type: simple - return _retval; -} - -struct _cef_resource_handler_t* CEF_CALLBACK request_handler_get_resource_handler( - struct _cef_request_handler_t* self, cef_browser_t* browser, - cef_frame_t* frame, cef_request_t* request) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return NULL; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return NULL; - // Verify param: request; type: refptr_diff - DCHECK(request); - if (!request) - return NULL; - - // Execute - CefRefPtr _retval = CefRequestHandlerCppToC::Get( - self)->GetResourceHandler( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefRequestCToCpp::Wrap(request)); - - // Return type: refptr_same - return CefResourceHandlerCppToC::Wrap(_retval); -} - -void CEF_CALLBACK request_handler_on_resource_redirect( - struct _cef_request_handler_t* self, cef_browser_t* browser, - cef_frame_t* frame, cef_request_t* request, cef_string_t* new_url) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return; - // Verify param: request; type: refptr_diff - DCHECK(request); - if (!request) - return; - // Verify param: new_url; type: string_byref - DCHECK(new_url); - if (!new_url) - return; - - // Translate param: new_url; type: string_byref - CefString new_urlStr(new_url); - - // Execute - CefRequestHandlerCppToC::Get(self)->OnResourceRedirect( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefRequestCToCpp::Wrap(request), - new_urlStr); -} - -int CEF_CALLBACK request_handler_on_resource_response( - struct _cef_request_handler_t* self, cef_browser_t* browser, - cef_frame_t* frame, cef_request_t* request, - struct _cef_response_t* response) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return 0; - // Verify param: request; type: refptr_diff - DCHECK(request); - if (!request) - return 0; - // Verify param: response; type: refptr_diff - DCHECK(response); - if (!response) - return 0; - - // Execute - bool _retval = CefRequestHandlerCppToC::Get(self)->OnResourceResponse( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefRequestCToCpp::Wrap(request), - CefResponseCToCpp::Wrap(response)); - - // Return type: bool - return _retval; -} - -struct _cef_response_filter_t* CEF_CALLBACK request_handler_get_resource_response_filter( - struct _cef_request_handler_t* self, cef_browser_t* browser, - cef_frame_t* frame, cef_request_t* request, - struct _cef_response_t* response) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return NULL; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return NULL; - // Verify param: request; type: refptr_diff - DCHECK(request); - if (!request) - return NULL; - // Verify param: response; type: refptr_diff - DCHECK(response); - if (!response) - return NULL; - - // Execute - CefRefPtr _retval = CefRequestHandlerCppToC::Get( - self)->GetResourceResponseFilter( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefRequestCToCpp::Wrap(request), - CefResponseCToCpp::Wrap(response)); - - // Return type: refptr_same - return CefResponseFilterCppToC::Wrap(_retval); -} - -void CEF_CALLBACK request_handler_on_resource_load_complete( - struct _cef_request_handler_t* self, cef_browser_t* browser, - cef_frame_t* frame, cef_request_t* request, - struct _cef_response_t* response, cef_urlrequest_status_t status, - int64 received_content_length) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return; - // Verify param: request; type: refptr_diff - DCHECK(request); - if (!request) - return; - // Verify param: response; type: refptr_diff - DCHECK(response); - if (!response) - return; - - // Execute - CefRequestHandlerCppToC::Get(self)->OnResourceLoadComplete( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefRequestCToCpp::Wrap(request), - CefResponseCToCpp::Wrap(response), - status, - received_content_length); -} - -int CEF_CALLBACK request_handler_get_auth_credentials( - struct _cef_request_handler_t* self, cef_browser_t* browser, - cef_frame_t* frame, int isProxy, const cef_string_t* host, int port, - const cef_string_t* realm, const cef_string_t* scheme, - cef_auth_callback_t* callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return 0; - // Verify param: host; type: string_byref_const - DCHECK(host); - if (!host) - return 0; - // Verify param: callback; type: refptr_diff - DCHECK(callback); - if (!callback) - return 0; - // Unverified params: realm, scheme - - // Execute - bool _retval = CefRequestHandlerCppToC::Get(self)->GetAuthCredentials( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - isProxy?true:false, - CefString(host), - port, - CefString(realm), - CefString(scheme), - CefAuthCallbackCToCpp::Wrap(callback)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK request_handler_on_quota_request( - struct _cef_request_handler_t* self, cef_browser_t* browser, - const cef_string_t* origin_url, int64 new_size, - cef_request_callback_t* callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: origin_url; type: string_byref_const - DCHECK(origin_url); - if (!origin_url) - return 0; - // Verify param: callback; type: refptr_diff - DCHECK(callback); - if (!callback) - return 0; - - // Execute - bool _retval = CefRequestHandlerCppToC::Get(self)->OnQuotaRequest( - CefBrowserCToCpp::Wrap(browser), - CefString(origin_url), - new_size, - CefRequestCallbackCToCpp::Wrap(callback)); - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK request_handler_on_protocol_execution( - struct _cef_request_handler_t* self, cef_browser_t* browser, - const cef_string_t* url, int* allow_os_execution) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: url; type: string_byref_const - DCHECK(url); - if (!url) - return; - // Verify param: allow_os_execution; type: bool_byref - DCHECK(allow_os_execution); - if (!allow_os_execution) - return; - - // Translate param: allow_os_execution; type: bool_byref - bool allow_os_executionBool = ( - allow_os_execution && *allow_os_execution)?true:false; - - // Execute - CefRequestHandlerCppToC::Get(self)->OnProtocolExecution( - CefBrowserCToCpp::Wrap(browser), - CefString(url), - allow_os_executionBool); - - // Restore param: allow_os_execution; type: bool_byref - if (allow_os_execution) - *allow_os_execution = allow_os_executionBool?true:false; -} - -int CEF_CALLBACK request_handler_on_certificate_error( - struct _cef_request_handler_t* self, cef_browser_t* browser, - cef_errorcode_t cert_error, const cef_string_t* request_url, - struct _cef_sslinfo_t* ssl_info, cef_request_callback_t* callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: request_url; type: string_byref_const - DCHECK(request_url); - if (!request_url) - return 0; - // Verify param: ssl_info; type: refptr_diff - DCHECK(ssl_info); - if (!ssl_info) - return 0; - // Verify param: callback; type: refptr_diff - DCHECK(callback); - if (!callback) - return 0; - - // Execute - bool _retval = CefRequestHandlerCppToC::Get(self)->OnCertificateError( - CefBrowserCToCpp::Wrap(browser), - cert_error, - CefString(request_url), - CefSSLInfoCToCpp::Wrap(ssl_info), - CefRequestCallbackCToCpp::Wrap(callback)); - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK request_handler_on_plugin_crashed( - struct _cef_request_handler_t* self, cef_browser_t* browser, - const cef_string_t* plugin_path) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: plugin_path; type: string_byref_const - DCHECK(plugin_path); - if (!plugin_path) - return; - - // Execute - CefRequestHandlerCppToC::Get(self)->OnPluginCrashed( - CefBrowserCToCpp::Wrap(browser), - CefString(plugin_path)); -} - -void CEF_CALLBACK request_handler_on_render_view_ready( - struct _cef_request_handler_t* self, cef_browser_t* browser) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - - // Execute - CefRequestHandlerCppToC::Get(self)->OnRenderViewReady( - CefBrowserCToCpp::Wrap(browser)); -} - -void CEF_CALLBACK request_handler_on_render_process_terminated( - struct _cef_request_handler_t* self, cef_browser_t* browser, - cef_termination_status_t status) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - - // Execute - CefRequestHandlerCppToC::Get(self)->OnRenderProcessTerminated( - CefBrowserCToCpp::Wrap(browser), - status); -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefRequestHandlerCppToC::CefRequestHandlerCppToC() { - GetStruct()->on_before_browse = request_handler_on_before_browse; - GetStruct()->on_open_urlfrom_tab = request_handler_on_open_urlfrom_tab; - GetStruct()->on_before_resource_load = - request_handler_on_before_resource_load; - GetStruct()->get_resource_handler = request_handler_get_resource_handler; - GetStruct()->on_resource_redirect = request_handler_on_resource_redirect; - GetStruct()->on_resource_response = request_handler_on_resource_response; - GetStruct()->get_resource_response_filter = - request_handler_get_resource_response_filter; - GetStruct()->on_resource_load_complete = - request_handler_on_resource_load_complete; - GetStruct()->get_auth_credentials = request_handler_get_auth_credentials; - GetStruct()->on_quota_request = request_handler_on_quota_request; - GetStruct()->on_protocol_execution = request_handler_on_protocol_execution; - GetStruct()->on_certificate_error = request_handler_on_certificate_error; - GetStruct()->on_plugin_crashed = request_handler_on_plugin_crashed; - GetStruct()->on_render_view_ready = request_handler_on_render_view_ready; - GetStruct()->on_render_process_terminated = - request_handler_on_render_process_terminated; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived( - CefWrapperType type, cef_request_handler_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = WT_REQUEST_HANDLER; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/request_handler_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/request_handler_cpptoc.h deleted file mode 100644 index 4542fa4c..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/request_handler_cpptoc.h +++ /dev/null @@ -1,35 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_REQUEST_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_REQUEST_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_request_handler.h" -#include "include/capi/cef_request_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefRequestHandlerCppToC - : public CefCppToC { - public: - CefRequestHandlerCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_REQUEST_HANDLER_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/resolve_callback_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/resolve_callback_cpptoc.cc deleted file mode 100644 index ba2153f9..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/resolve_callback_cpptoc.cc +++ /dev/null @@ -1,64 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/resolve_callback_cpptoc.h" -#include "libcef_dll/transfer_util.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK resolve_callback_on_resolve_completed( - struct _cef_resolve_callback_t* self, cef_errorcode_t result, - cef_string_list_t resolved_ips) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Unverified params: resolved_ips - - // Translate param: resolved_ips; type: string_vec_byref_const - std::vector resolved_ipsList; - transfer_string_list_contents(resolved_ips, resolved_ipsList); - - // Execute - CefResolveCallbackCppToC::Get(self)->OnResolveCompleted( - result, - resolved_ipsList); -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefResolveCallbackCppToC::CefResolveCallbackCppToC() { - GetStruct()->on_resolve_completed = resolve_callback_on_resolve_completed; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived( - CefWrapperType type, cef_resolve_callback_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = - WT_RESOLVE_CALLBACK; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/resolve_callback_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/resolve_callback_cpptoc.h deleted file mode 100644 index 954c0a47..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/resolve_callback_cpptoc.h +++ /dev/null @@ -1,37 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_RESOLVE_CALLBACK_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_RESOLVE_CALLBACK_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_request_context.h" -#include "include/capi/cef_request_context_capi.h" -#include "include/cef_scheme.h" -#include "include/capi/cef_scheme_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefResolveCallbackCppToC - : public CefCppToC { - public: - CefResolveCallbackCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_RESOLVE_CALLBACK_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.cc deleted file mode 100644 index 3113825c..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.cc +++ /dev/null @@ -1,152 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK resource_bundle_handler_get_localized_string( - struct _cef_resource_bundle_handler_t* self, int string_id, - cef_string_t* string) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: string; type: string_byref - DCHECK(string); - if (!string) - return 0; - - // Translate param: string; type: string_byref - CefString stringStr(string); - - // Execute - bool _retval = CefResourceBundleHandlerCppToC::Get(self)->GetLocalizedString( - string_id, - stringStr); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK resource_bundle_handler_get_data_resource( - struct _cef_resource_bundle_handler_t* self, int resource_id, void** data, - size_t* data_size) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: data; type: simple_byref - DCHECK(data); - if (!data) - return 0; - // Verify param: data_size; type: simple_byref - DCHECK(data_size); - if (!data_size) - return 0; - - // Translate param: data; type: simple_byref - void* dataVal = data?*data:NULL; - // Translate param: data_size; type: simple_byref - size_t data_sizeVal = data_size?*data_size:0; - - // Execute - bool _retval = CefResourceBundleHandlerCppToC::Get(self)->GetDataResource( - resource_id, - dataVal, - data_sizeVal); - - // Restore param: data; type: simple_byref - if (data) - *data = dataVal; - // Restore param: data_size; type: simple_byref - if (data_size) - *data_size = data_sizeVal; - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK resource_bundle_handler_get_data_resource_for_scale( - struct _cef_resource_bundle_handler_t* self, int resource_id, - cef_scale_factor_t scale_factor, void** data, size_t* data_size) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: data; type: simple_byref - DCHECK(data); - if (!data) - return 0; - // Verify param: data_size; type: simple_byref - DCHECK(data_size); - if (!data_size) - return 0; - - // Translate param: data; type: simple_byref - void* dataVal = data?*data:NULL; - // Translate param: data_size; type: simple_byref - size_t data_sizeVal = data_size?*data_size:0; - - // Execute - bool _retval = CefResourceBundleHandlerCppToC::Get( - self)->GetDataResourceForScale( - resource_id, - scale_factor, - dataVal, - data_sizeVal); - - // Restore param: data; type: simple_byref - if (data) - *data = dataVal; - // Restore param: data_size; type: simple_byref - if (data_size) - *data_size = data_sizeVal; - - // Return type: bool - return _retval; -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefResourceBundleHandlerCppToC::CefResourceBundleHandlerCppToC() { - GetStruct()->get_localized_string = - resource_bundle_handler_get_localized_string; - GetStruct()->get_data_resource = resource_bundle_handler_get_data_resource; - GetStruct()->get_data_resource_for_scale = - resource_bundle_handler_get_data_resource_for_scale; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived( - CefWrapperType type, cef_resource_bundle_handler_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = - WT_RESOURCE_BUNDLE_HANDLER; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h deleted file mode 100644 index 306be457..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h +++ /dev/null @@ -1,35 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_RESOURCE_BUNDLE_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_RESOURCE_BUNDLE_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_resource_bundle_handler.h" -#include "include/capi/cef_resource_bundle_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefResourceBundleHandlerCppToC - : public CefCppToC { - public: - CefResourceBundleHandlerCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_RESOURCE_BUNDLE_HANDLER_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/resource_handler_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/resource_handler_cpptoc.cc deleted file mode 100644 index 9a15e232..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/resource_handler_cpptoc.cc +++ /dev/null @@ -1,215 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/resource_handler_cpptoc.h" -#include "libcef_dll/ctocpp/callback_ctocpp.h" -#include "libcef_dll/ctocpp/request_ctocpp.h" -#include "libcef_dll/ctocpp/response_ctocpp.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK resource_handler_process_request( - struct _cef_resource_handler_t* self, cef_request_t* request, - cef_callback_t* callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: request; type: refptr_diff - DCHECK(request); - if (!request) - return 0; - // Verify param: callback; type: refptr_diff - DCHECK(callback); - if (!callback) - return 0; - - // Execute - bool _retval = CefResourceHandlerCppToC::Get(self)->ProcessRequest( - CefRequestCToCpp::Wrap(request), - CefCallbackCToCpp::Wrap(callback)); - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK resource_handler_get_response_headers( - struct _cef_resource_handler_t* self, struct _cef_response_t* response, - int64* response_length, cef_string_t* redirectUrl) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: response; type: refptr_diff - DCHECK(response); - if (!response) - return; - // Verify param: response_length; type: simple_byref - DCHECK(response_length); - if (!response_length) - return; - // Verify param: redirectUrl; type: string_byref - DCHECK(redirectUrl); - if (!redirectUrl) - return; - - // Translate param: response_length; type: simple_byref - int64 response_lengthVal = response_length?*response_length:0; - // Translate param: redirectUrl; type: string_byref - CefString redirectUrlStr(redirectUrl); - - // Execute - CefResourceHandlerCppToC::Get(self)->GetResponseHeaders( - CefResponseCToCpp::Wrap(response), - response_lengthVal, - redirectUrlStr); - - // Restore param: response_length; type: simple_byref - if (response_length) - *response_length = response_lengthVal; -} - -int CEF_CALLBACK resource_handler_read_response( - struct _cef_resource_handler_t* self, void* data_out, int bytes_to_read, - int* bytes_read, cef_callback_t* callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: data_out; type: simple_byaddr - DCHECK(data_out); - if (!data_out) - return 0; - // Verify param: bytes_read; type: simple_byref - DCHECK(bytes_read); - if (!bytes_read) - return 0; - // Verify param: callback; type: refptr_diff - DCHECK(callback); - if (!callback) - return 0; - - // Translate param: bytes_read; type: simple_byref - int bytes_readVal = bytes_read?*bytes_read:0; - - // Execute - bool _retval = CefResourceHandlerCppToC::Get(self)->ReadResponse( - data_out, - bytes_to_read, - bytes_readVal, - CefCallbackCToCpp::Wrap(callback)); - - // Restore param: bytes_read; type: simple_byref - if (bytes_read) - *bytes_read = bytes_readVal; - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK resource_handler_can_get_cookie( - struct _cef_resource_handler_t* self, const struct _cef_cookie_t* cookie) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: cookie; type: struct_byref_const - DCHECK(cookie); - if (!cookie) - return 0; - - // Translate param: cookie; type: struct_byref_const - CefCookie cookieObj; - if (cookie) - cookieObj.Set(*cookie, false); - - // Execute - bool _retval = CefResourceHandlerCppToC::Get(self)->CanGetCookie( - cookieObj); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK resource_handler_can_set_cookie( - struct _cef_resource_handler_t* self, const struct _cef_cookie_t* cookie) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: cookie; type: struct_byref_const - DCHECK(cookie); - if (!cookie) - return 0; - - // Translate param: cookie; type: struct_byref_const - CefCookie cookieObj; - if (cookie) - cookieObj.Set(*cookie, false); - - // Execute - bool _retval = CefResourceHandlerCppToC::Get(self)->CanSetCookie( - cookieObj); - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK resource_handler_cancel( - struct _cef_resource_handler_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefResourceHandlerCppToC::Get(self)->Cancel(); -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefResourceHandlerCppToC::CefResourceHandlerCppToC() { - GetStruct()->process_request = resource_handler_process_request; - GetStruct()->get_response_headers = resource_handler_get_response_headers; - GetStruct()->read_response = resource_handler_read_response; - GetStruct()->can_get_cookie = resource_handler_can_get_cookie; - GetStruct()->can_set_cookie = resource_handler_can_set_cookie; - GetStruct()->cancel = resource_handler_cancel; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived( - CefWrapperType type, cef_resource_handler_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = - WT_RESOURCE_HANDLER; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/resource_handler_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/resource_handler_cpptoc.h deleted file mode 100644 index a1f57baa..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/resource_handler_cpptoc.h +++ /dev/null @@ -1,35 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_RESOURCE_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_RESOURCE_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_resource_handler.h" -#include "include/capi/cef_resource_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefResourceHandlerCppToC - : public CefCppToC { - public: - CefResourceHandlerCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_RESOURCE_HANDLER_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/response_filter_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/response_filter_cpptoc.cc deleted file mode 100644 index 91461696..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/response_filter_cpptoc.cc +++ /dev/null @@ -1,107 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/response_filter_cpptoc.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK response_filter_init_filter( - struct _cef_response_filter_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefResponseFilterCppToC::Get(self)->InitFilter(); - - // Return type: bool - return _retval; -} - -cef_response_filter_status_t CEF_CALLBACK response_filter_filter( - struct _cef_response_filter_t* self, void* data_in, size_t data_in_size, - size_t* data_in_read, void* data_out, size_t data_out_size, - size_t* data_out_written) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return RESPONSE_FILTER_ERROR; - // Verify param: data_in_read; type: simple_byref - DCHECK(data_in_read); - if (!data_in_read) - return RESPONSE_FILTER_ERROR; - // Verify param: data_out; type: simple_byaddr - DCHECK(data_out); - if (!data_out) - return RESPONSE_FILTER_ERROR; - // Verify param: data_out_written; type: simple_byref - DCHECK(data_out_written); - if (!data_out_written) - return RESPONSE_FILTER_ERROR; - // Unverified params: data_in - - // Translate param: data_in_read; type: simple_byref - size_t data_in_readVal = data_in_read?*data_in_read:0; - // Translate param: data_out_written; type: simple_byref - size_t data_out_writtenVal = data_out_written?*data_out_written:0; - - // Execute - cef_response_filter_status_t _retval = CefResponseFilterCppToC::Get( - self)->Filter( - data_in, - data_in_size, - data_in_readVal, - data_out, - data_out_size, - data_out_writtenVal); - - // Restore param: data_in_read; type: simple_byref - if (data_in_read) - *data_in_read = data_in_readVal; - // Restore param: data_out_written; type: simple_byref - if (data_out_written) - *data_out_written = data_out_writtenVal; - - // Return type: simple - return _retval; -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefResponseFilterCppToC::CefResponseFilterCppToC() { - GetStruct()->init_filter = response_filter_init_filter; - GetStruct()->filter = response_filter_filter; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived( - CefWrapperType type, cef_response_filter_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = WT_RESPONSE_FILTER; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/response_filter_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/response_filter_cpptoc.h deleted file mode 100644 index cd22f726..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/response_filter_cpptoc.h +++ /dev/null @@ -1,35 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_RESPONSE_FILTER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_RESPONSE_FILTER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_response_filter.h" -#include "include/capi/cef_response_filter_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefResponseFilterCppToC - : public CefCppToC { - public: - CefResponseFilterCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_RESPONSE_FILTER_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.cc deleted file mode 100644 index d038a597..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.cc +++ /dev/null @@ -1,69 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h" -#include "libcef_dll/transfer_util.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK run_file_dialog_callback_on_file_dialog_dismissed( - struct _cef_run_file_dialog_callback_t* self, int selected_accept_filter, - cef_string_list_t file_paths) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: selected_accept_filter; type: simple_byval - DCHECK_GE(selected_accept_filter, 0); - if (selected_accept_filter < 0) - return; - // Unverified params: file_paths - - // Translate param: file_paths; type: string_vec_byref_const - std::vector file_pathsList; - transfer_string_list_contents(file_paths, file_pathsList); - - // Execute - CefRunFileDialogCallbackCppToC::Get(self)->OnFileDialogDismissed( - selected_accept_filter, - file_pathsList); -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefRunFileDialogCallbackCppToC::CefRunFileDialogCallbackCppToC() { - GetStruct()->on_file_dialog_dismissed = - run_file_dialog_callback_on_file_dialog_dismissed; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived( - CefWrapperType type, cef_run_file_dialog_callback_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = - WT_RUN_FILE_DIALOG_CALLBACK; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h deleted file mode 100644 index ded63d8c..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h +++ /dev/null @@ -1,37 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_RUN_FILE_DIALOG_CALLBACK_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_RUN_FILE_DIALOG_CALLBACK_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_browser.h" -#include "include/capi/cef_browser_capi.h" -#include "include/cef_client.h" -#include "include/capi/cef_client_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefRunFileDialogCallbackCppToC - : public CefCppToC { - public: - CefRunFileDialogCallbackCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_RUN_FILE_DIALOG_CALLBACK_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.cc deleted file mode 100644 index 50ebb44b..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.cc +++ /dev/null @@ -1,78 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/resource_handler_cpptoc.h" -#include "libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/frame_ctocpp.h" -#include "libcef_dll/ctocpp/request_ctocpp.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -cef_resource_handler_t* CEF_CALLBACK scheme_handler_factory_create( - struct _cef_scheme_handler_factory_t* self, cef_browser_t* browser, - cef_frame_t* frame, const cef_string_t* scheme_name, - cef_request_t* request) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - // Verify param: scheme_name; type: string_byref_const - DCHECK(scheme_name); - if (!scheme_name) - return NULL; - // Verify param: request; type: refptr_diff - DCHECK(request); - if (!request) - return NULL; - // Unverified params: browser, frame - - // Execute - CefRefPtr _retval = CefSchemeHandlerFactoryCppToC::Get( - self)->Create( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefString(scheme_name), - CefRequestCToCpp::Wrap(request)); - - // Return type: refptr_same - return CefResourceHandlerCppToC::Wrap(_retval); -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefSchemeHandlerFactoryCppToC::CefSchemeHandlerFactoryCppToC() { - GetStruct()->create = scheme_handler_factory_create; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived( - CefWrapperType type, cef_scheme_handler_factory_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = - WT_SCHEME_HANDLER_FACTORY; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h deleted file mode 100644 index 85e32a47..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h +++ /dev/null @@ -1,35 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_SCHEME_HANDLER_FACTORY_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_SCHEME_HANDLER_FACTORY_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_scheme.h" -#include "include/capi/cef_scheme_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefSchemeHandlerFactoryCppToC - : public CefCppToC { - public: - CefSchemeHandlerFactoryCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_SCHEME_HANDLER_FACTORY_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/set_cookie_callback_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/set_cookie_callback_cpptoc.cc deleted file mode 100644 index 094be1ce..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/set_cookie_callback_cpptoc.cc +++ /dev/null @@ -1,56 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/set_cookie_callback_cpptoc.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK set_cookie_callback_on_complete( - struct _cef_set_cookie_callback_t* self, int success) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefSetCookieCallbackCppToC::Get(self)->OnComplete( - success?true:false); -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefSetCookieCallbackCppToC::CefSetCookieCallbackCppToC() { - GetStruct()->on_complete = set_cookie_callback_on_complete; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived( - CefWrapperType type, cef_set_cookie_callback_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = - WT_SET_COOKIE_CALLBACK; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/set_cookie_callback_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/set_cookie_callback_cpptoc.h deleted file mode 100644 index 388ba0ad..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/set_cookie_callback_cpptoc.h +++ /dev/null @@ -1,35 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_SET_COOKIE_CALLBACK_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_SET_COOKIE_CALLBACK_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_cookie.h" -#include "include/capi/cef_cookie_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefSetCookieCallbackCppToC - : public CefCppToC { - public: - CefSetCookieCallbackCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_SET_COOKIE_CALLBACK_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/string_visitor_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/string_visitor_cpptoc.cc deleted file mode 100644 index 90691978..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/string_visitor_cpptoc.cc +++ /dev/null @@ -1,56 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/string_visitor_cpptoc.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK string_visitor_visit(struct _cef_string_visitor_t* self, - const cef_string_t* string) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Unverified params: string - - // Execute - CefStringVisitorCppToC::Get(self)->Visit( - CefString(string)); -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefStringVisitorCppToC::CefStringVisitorCppToC() { - GetStruct()->visit = string_visitor_visit; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived(CefWrapperType type, - cef_string_visitor_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = WT_STRING_VISITOR; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/string_visitor_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/string_visitor_cpptoc.h deleted file mode 100644 index 16eb7845..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/string_visitor_cpptoc.h +++ /dev/null @@ -1,35 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_STRING_VISITOR_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_STRING_VISITOR_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_string_visitor.h" -#include "include/capi/cef_string_visitor_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefStringVisitorCppToC - : public CefCppToC { - public: - CefStringVisitorCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_STRING_VISITOR_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/task_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/task_cpptoc.cc deleted file mode 100644 index f187d186..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/task_cpptoc.cc +++ /dev/null @@ -1,52 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/task_cpptoc.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK task_execute(struct _cef_task_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefTaskCppToC::Get(self)->Execute(); -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefTaskCppToC::CefTaskCppToC() { - GetStruct()->execute = task_execute; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived(CefWrapperType type, cef_task_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = WT_TASK; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/task_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/task_cpptoc.h deleted file mode 100644 index 544c153c..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/task_cpptoc.h +++ /dev/null @@ -1,34 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_TASK_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_TASK_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_task.h" -#include "include/capi/cef_task_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefTaskCppToC - : public CefCppToC { - public: - CefTaskCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_TASK_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/urlrequest_client_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/urlrequest_client_cpptoc.cc deleted file mode 100644 index 3d417a1c..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/urlrequest_client_cpptoc.cc +++ /dev/null @@ -1,166 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/urlrequest_client_cpptoc.h" -#include "libcef_dll/ctocpp/auth_callback_ctocpp.h" -#include "libcef_dll/ctocpp/urlrequest_ctocpp.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK urlrequest_client_on_request_complete( - struct _cef_urlrequest_client_t* self, cef_urlrequest_t* request) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: request; type: refptr_diff - DCHECK(request); - if (!request) - return; - - // Execute - CefURLRequestClientCppToC::Get(self)->OnRequestComplete( - CefURLRequestCToCpp::Wrap(request)); -} - -void CEF_CALLBACK urlrequest_client_on_upload_progress( - struct _cef_urlrequest_client_t* self, cef_urlrequest_t* request, - int64 current, int64 total) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: request; type: refptr_diff - DCHECK(request); - if (!request) - return; - - // Execute - CefURLRequestClientCppToC::Get(self)->OnUploadProgress( - CefURLRequestCToCpp::Wrap(request), - current, - total); -} - -void CEF_CALLBACK urlrequest_client_on_download_progress( - struct _cef_urlrequest_client_t* self, cef_urlrequest_t* request, - int64 current, int64 total) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: request; type: refptr_diff - DCHECK(request); - if (!request) - return; - - // Execute - CefURLRequestClientCppToC::Get(self)->OnDownloadProgress( - CefURLRequestCToCpp::Wrap(request), - current, - total); -} - -void CEF_CALLBACK urlrequest_client_on_download_data( - struct _cef_urlrequest_client_t* self, cef_urlrequest_t* request, - const void* data, size_t data_length) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: request; type: refptr_diff - DCHECK(request); - if (!request) - return; - // Verify param: data; type: simple_byaddr - DCHECK(data); - if (!data) - return; - - // Execute - CefURLRequestClientCppToC::Get(self)->OnDownloadData( - CefURLRequestCToCpp::Wrap(request), - data, - data_length); -} - -int CEF_CALLBACK urlrequest_client_get_auth_credentials( - struct _cef_urlrequest_client_t* self, int isProxy, - const cef_string_t* host, int port, const cef_string_t* realm, - const cef_string_t* scheme, cef_auth_callback_t* callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: host; type: string_byref_const - DCHECK(host); - if (!host) - return 0; - // Verify param: scheme; type: string_byref_const - DCHECK(scheme); - if (!scheme) - return 0; - // Verify param: callback; type: refptr_diff - DCHECK(callback); - if (!callback) - return 0; - // Unverified params: realm - - // Execute - bool _retval = CefURLRequestClientCppToC::Get(self)->GetAuthCredentials( - isProxy?true:false, - CefString(host), - port, - CefString(realm), - CefString(scheme), - CefAuthCallbackCToCpp::Wrap(callback)); - - // Return type: bool - return _retval; -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefURLRequestClientCppToC::CefURLRequestClientCppToC() { - GetStruct()->on_request_complete = urlrequest_client_on_request_complete; - GetStruct()->on_upload_progress = urlrequest_client_on_upload_progress; - GetStruct()->on_download_progress = urlrequest_client_on_download_progress; - GetStruct()->on_download_data = urlrequest_client_on_download_data; - GetStruct()->get_auth_credentials = urlrequest_client_get_auth_credentials; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived( - CefWrapperType type, cef_urlrequest_client_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = - WT_URLREQUEST_CLIENT; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/urlrequest_client_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/urlrequest_client_cpptoc.h deleted file mode 100644 index f2e72323..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/urlrequest_client_cpptoc.h +++ /dev/null @@ -1,35 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_URLREQUEST_CLIENT_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_URLREQUEST_CLIENT_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_urlrequest.h" -#include "include/capi/cef_urlrequest_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefURLRequestClientCppToC - : public CefCppToC { - public: - CefURLRequestClientCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_URLREQUEST_CLIENT_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/v8accessor_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/v8accessor_cpptoc.cc deleted file mode 100644 index f8c49c67..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/v8accessor_cpptoc.cc +++ /dev/null @@ -1,138 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/v8accessor_cpptoc.h" -#include "libcef_dll/ctocpp/v8value_ctocpp.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK v8accessor_get(struct _cef_v8accessor_t* self, - const cef_string_t* name, struct _cef_v8value_t* object, - struct _cef_v8value_t** retval, cef_string_t* exception) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: name; type: string_byref_const - DCHECK(name); - if (!name) - return 0; - // Verify param: object; type: refptr_diff - DCHECK(object); - if (!object) - return 0; - // Verify param: retval; type: refptr_diff_byref - DCHECK(retval); - if (!retval) - return 0; - // Verify param: exception; type: string_byref - DCHECK(exception); - if (!exception) - return 0; - - // Translate param: retval; type: refptr_diff_byref - CefRefPtr retvalPtr; - if (retval && *retval) - retvalPtr = CefV8ValueCToCpp::Wrap(*retval); - CefV8Value* retvalOrig = retvalPtr.get(); - // Translate param: exception; type: string_byref - CefString exceptionStr(exception); - - // Execute - bool _retval = CefV8AccessorCppToC::Get(self)->Get( - CefString(name), - CefV8ValueCToCpp::Wrap(object), - retvalPtr, - exceptionStr); - - // Restore param: retval; type: refptr_diff_byref - if (retval) { - if (retvalPtr.get()) { - if (retvalPtr.get() != retvalOrig) { - *retval = CefV8ValueCToCpp::Unwrap(retvalPtr); - } - } else { - *retval = NULL; - } - } - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK v8accessor_set(struct _cef_v8accessor_t* self, - const cef_string_t* name, struct _cef_v8value_t* object, - struct _cef_v8value_t* value, cef_string_t* exception) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: name; type: string_byref_const - DCHECK(name); - if (!name) - return 0; - // Verify param: object; type: refptr_diff - DCHECK(object); - if (!object) - return 0; - // Verify param: value; type: refptr_diff - DCHECK(value); - if (!value) - return 0; - // Verify param: exception; type: string_byref - DCHECK(exception); - if (!exception) - return 0; - - // Translate param: exception; type: string_byref - CefString exceptionStr(exception); - - // Execute - bool _retval = CefV8AccessorCppToC::Get(self)->Set( - CefString(name), - CefV8ValueCToCpp::Wrap(object), - CefV8ValueCToCpp::Wrap(value), - exceptionStr); - - // Return type: bool - return _retval; -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefV8AccessorCppToC::CefV8AccessorCppToC() { - GetStruct()->get = v8accessor_get; - GetStruct()->set = v8accessor_set; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived(CefWrapperType type, - cef_v8accessor_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = WT_V8ACCESSOR; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/v8accessor_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/v8accessor_cpptoc.h deleted file mode 100644 index be661f8b..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/v8accessor_cpptoc.h +++ /dev/null @@ -1,34 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_V8ACCESSOR_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_V8ACCESSOR_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_v8.h" -#include "include/capi/cef_v8_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefV8AccessorCppToC - : public CefCppToC { - public: - CefV8AccessorCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_V8ACCESSOR_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/v8handler_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/v8handler_cpptoc.cc deleted file mode 100644 index 7be3c5a8..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/v8handler_cpptoc.cc +++ /dev/null @@ -1,111 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/v8handler_cpptoc.h" -#include "libcef_dll/ctocpp/v8value_ctocpp.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK v8handler_execute(struct _cef_v8handler_t* self, - const cef_string_t* name, struct _cef_v8value_t* object, - size_t argumentsCount, struct _cef_v8value_t* const* arguments, - struct _cef_v8value_t** retval, cef_string_t* exception) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: name; type: string_byref_const - DCHECK(name); - if (!name) - return 0; - // Verify param: object; type: refptr_diff - DCHECK(object); - if (!object) - return 0; - // Verify param: arguments; type: refptr_vec_diff_byref_const - DCHECK(argumentsCount == 0 || arguments); - if (argumentsCount > 0 && !arguments) - return 0; - // Verify param: retval; type: refptr_diff_byref - DCHECK(retval); - if (!retval) - return 0; - // Verify param: exception; type: string_byref - DCHECK(exception); - if (!exception) - return 0; - - // Translate param: arguments; type: refptr_vec_diff_byref_const - std::vector > argumentsList; - if (argumentsCount > 0) { - for (size_t i = 0; i < argumentsCount; ++i) { - CefRefPtr argumentsVal = CefV8ValueCToCpp::Wrap(arguments[i]); - argumentsList.push_back(argumentsVal); - } - } - // Translate param: retval; type: refptr_diff_byref - CefRefPtr retvalPtr; - if (retval && *retval) - retvalPtr = CefV8ValueCToCpp::Wrap(*retval); - CefV8Value* retvalOrig = retvalPtr.get(); - // Translate param: exception; type: string_byref - CefString exceptionStr(exception); - - // Execute - bool _retval = CefV8HandlerCppToC::Get(self)->Execute( - CefString(name), - CefV8ValueCToCpp::Wrap(object), - argumentsList, - retvalPtr, - exceptionStr); - - // Restore param: retval; type: refptr_diff_byref - if (retval) { - if (retvalPtr.get()) { - if (retvalPtr.get() != retvalOrig) { - *retval = CefV8ValueCToCpp::Unwrap(retvalPtr); - } - } else { - *retval = NULL; - } - } - - // Return type: bool - return _retval; -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefV8HandlerCppToC::CefV8HandlerCppToC() { - GetStruct()->execute = v8handler_execute; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived(CefWrapperType type, cef_v8handler_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = WT_V8HANDLER; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/v8handler_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/v8handler_cpptoc.h deleted file mode 100644 index 3f278fd7..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/v8handler_cpptoc.h +++ /dev/null @@ -1,34 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_V8HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_V8HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_v8.h" -#include "include/capi/cef_v8_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefV8HandlerCppToC - : public CefCppToC { - public: - CefV8HandlerCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_V8HANDLER_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.cc deleted file mode 100644 index 744849ae..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.cc +++ /dev/null @@ -1,67 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h" -#include "libcef_dll/ctocpp/web_plugin_info_ctocpp.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK web_plugin_info_visitor_visit( - struct _cef_web_plugin_info_visitor_t* self, cef_web_plugin_info_t* info, - int count, int total) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: info; type: refptr_diff - DCHECK(info); - if (!info) - return 0; - - // Execute - bool _retval = CefWebPluginInfoVisitorCppToC::Get(self)->Visit( - CefWebPluginInfoCToCpp::Wrap(info), - count, - total); - - // Return type: bool - return _retval; -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefWebPluginInfoVisitorCppToC::CefWebPluginInfoVisitorCppToC() { - GetStruct()->visit = web_plugin_info_visitor_visit; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived( - CefWrapperType type, cef_web_plugin_info_visitor_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = - WT_WEB_PLUGIN_INFO_VISITOR; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h deleted file mode 100644 index b4e79f70..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h +++ /dev/null @@ -1,37 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_INFO_VISITOR_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_INFO_VISITOR_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_web_plugin.h" -#include "include/capi/cef_web_plugin_capi.h" -#include "include/cef_browser.h" -#include "include/capi/cef_browser_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefWebPluginInfoVisitorCppToC - : public CefCppToC { - public: - CefWebPluginInfoVisitorCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_INFO_VISITOR_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.cc deleted file mode 100644 index a60413f4..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.cc +++ /dev/null @@ -1,65 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK web_plugin_unstable_callback_is_unstable( - struct _cef_web_plugin_unstable_callback_t* self, const cef_string_t* path, - int unstable) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: path; type: string_byref_const - DCHECK(path); - if (!path) - return; - - // Execute - CefWebPluginUnstableCallbackCppToC::Get(self)->IsUnstable( - CefString(path), - unstable?true:false); -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefWebPluginUnstableCallbackCppToC::CefWebPluginUnstableCallbackCppToC() { - GetStruct()->is_unstable = web_plugin_unstable_callback_is_unstable; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived(CefWrapperType type, - cef_web_plugin_unstable_callback_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = - WT_WEB_PLUGIN_UNSTABLE_CALLBACK; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h deleted file mode 100644 index 8bdc8772..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h +++ /dev/null @@ -1,37 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_UNSTABLE_CALLBACK_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_UNSTABLE_CALLBACK_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_web_plugin.h" -#include "include/capi/cef_web_plugin_capi.h" -#include "include/cef_browser.h" -#include "include/capi/cef_browser_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefWebPluginUnstableCallbackCppToC - : public CefCppToC { - public: - CefWebPluginUnstableCallbackCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_UNSTABLE_CALLBACK_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/write_handler_cpptoc.cc b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/write_handler_cpptoc.cc deleted file mode 100644 index 27a9735f..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/write_handler_cpptoc.cc +++ /dev/null @@ -1,127 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/write_handler_cpptoc.h" - - -namespace { - -// MEMBER FUNCTIONS - Body may be edited by hand. - -size_t CEF_CALLBACK write_handler_write(struct _cef_write_handler_t* self, - const void* ptr, size_t size, size_t n) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: ptr; type: simple_byaddr - DCHECK(ptr); - if (!ptr) - return 0; - - // Execute - size_t _retval = CefWriteHandlerCppToC::Get(self)->Write( - ptr, - size, - n); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK write_handler_seek(struct _cef_write_handler_t* self, - int64 offset, int whence) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefWriteHandlerCppToC::Get(self)->Seek( - offset, - whence); - - // Return type: simple - return _retval; -} - -int64 CEF_CALLBACK write_handler_tell(struct _cef_write_handler_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int64 _retval = CefWriteHandlerCppToC::Get(self)->Tell(); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK write_handler_flush(struct _cef_write_handler_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefWriteHandlerCppToC::Get(self)->Flush(); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK write_handler_may_block(struct _cef_write_handler_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefWriteHandlerCppToC::Get(self)->MayBlock(); - - // Return type: bool - return _retval; -} - -} // namespace - - -// CONSTRUCTOR - Do not edit by hand. - -CefWriteHandlerCppToC::CefWriteHandlerCppToC() { - GetStruct()->write = write_handler_write; - GetStruct()->seek = write_handler_seek; - GetStruct()->tell = write_handler_tell; - GetStruct()->flush = write_handler_flush; - GetStruct()->may_block = write_handler_may_block; -} - -template<> CefRefPtr CefCppToC::UnwrapDerived(CefWrapperType type, - cef_write_handler_t* s) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCppToC::kWrapperType = WT_WRITE_HANDLER; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/write_handler_cpptoc.h b/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/write_handler_cpptoc.h deleted file mode 100644 index 973f18e2..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/cpptoc/write_handler_cpptoc.h +++ /dev/null @@ -1,35 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_WRITE_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_WRITE_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_stream.h" -#include "include/capi/cef_stream_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefWriteHandlerCppToC - : public CefCppToC { - public: - CefWriteHandlerCppToC(); -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_WRITE_HANDLER_CPPTOC_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/auth_callback_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/auth_callback_ctocpp.cc deleted file mode 100644 index 57ee856d..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/auth_callback_ctocpp.cc +++ /dev/null @@ -1,71 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/auth_callback_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefAuthCallbackCToCpp::Continue(const CefString& username, - const CefString& password) { - cef_auth_callback_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, cont)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: username; type: string_byref_const - DCHECK(!username.empty()); - if (username.empty()) - return; - // Verify param: password; type: string_byref_const - DCHECK(!password.empty()); - if (password.empty()) - return; - - // Execute - _struct->cont(_struct, - username.GetStruct(), - password.GetStruct()); -} - -void CefAuthCallbackCToCpp::Cancel() { - cef_auth_callback_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, cancel)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->cancel(_struct); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefAuthCallbackCToCpp::CefAuthCallbackCToCpp() { -} - -template<> cef_auth_callback_t* CefCToCpp::UnwrapDerived(CefWrapperType type, - CefAuthCallback* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_AUTH_CALLBACK; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/auth_callback_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/auth_callback_ctocpp.h deleted file mode 100644 index a8ad60fc..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/auth_callback_ctocpp.h +++ /dev/null @@ -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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_AUTH_CALLBACK_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_AUTH_CALLBACK_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_auth_callback.h" -#include "include/capi/cef_auth_callback_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefAuthCallbackCToCpp - : public CefCToCpp { - public: - CefAuthCallbackCToCpp(); - - // CefAuthCallback methods. - void Continue(const CefString& username, const CefString& password) OVERRIDE; - void Cancel() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_AUTH_CALLBACK_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/before_download_callback_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/before_download_callback_ctocpp.cc deleted file mode 100644 index 55265531..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/before_download_callback_ctocpp.cc +++ /dev/null @@ -1,55 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/before_download_callback_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefBeforeDownloadCallbackCToCpp::Continue(const CefString& download_path, - bool show_dialog) { - cef_before_download_callback_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, cont)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: download_path - - // Execute - _struct->cont(_struct, - download_path.GetStruct(), - show_dialog); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefBeforeDownloadCallbackCToCpp::CefBeforeDownloadCallbackCToCpp() { -} - -template<> cef_before_download_callback_t* CefCToCpp::UnwrapDerived( - CefWrapperType type, CefBeforeDownloadCallback* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = - 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = - WT_BEFORE_DOWNLOAD_CALLBACK; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/before_download_callback_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/before_download_callback_ctocpp.h deleted file mode 100644 index 5598c926..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/before_download_callback_ctocpp.h +++ /dev/null @@ -1,38 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_BEFORE_DOWNLOAD_CALLBACK_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_BEFORE_DOWNLOAD_CALLBACK_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_download_handler.h" -#include "include/capi/cef_download_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefBeforeDownloadCallbackCToCpp - : public CefCToCpp { - public: - CefBeforeDownloadCallbackCToCpp(); - - // CefBeforeDownloadCallback methods. - void Continue(const CefString& download_path, bool show_dialog) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_BEFORE_DOWNLOAD_CALLBACK_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/binary_value_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/binary_value_ctocpp.cc deleted file mode 100644 index 0b0a55fe..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/binary_value_ctocpp.cc +++ /dev/null @@ -1,177 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/binary_value_ctocpp.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefBinaryValue::Create(const void* data, - size_t data_size) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: data; type: simple_byaddr - DCHECK(data); - if (!data) - return NULL; - - // Execute - cef_binary_value_t* _retval = cef_binary_value_create( - data, - data_size); - - // Return type: refptr_same - return CefBinaryValueCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefBinaryValueCToCpp::IsValid() { - cef_binary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_valid)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_valid(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefBinaryValueCToCpp::IsOwned() { - cef_binary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_owned)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_owned(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefBinaryValueCToCpp::IsSame(CefRefPtr that) { - cef_binary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_same)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: that; type: refptr_same - DCHECK(that.get()); - if (!that.get()) - return false; - - // Execute - int _retval = _struct->is_same(_struct, - CefBinaryValueCToCpp::Unwrap(that)); - - // Return type: bool - return _retval?true:false; -} - -bool CefBinaryValueCToCpp::IsEqual(CefRefPtr that) { - cef_binary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_equal)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: that; type: refptr_same - DCHECK(that.get()); - if (!that.get()) - return false; - - // Execute - int _retval = _struct->is_equal(_struct, - CefBinaryValueCToCpp::Unwrap(that)); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefBinaryValueCToCpp::Copy() { - cef_binary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, copy)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_binary_value_t* _retval = _struct->copy(_struct); - - // Return type: refptr_same - return CefBinaryValueCToCpp::Wrap(_retval); -} - -size_t CefBinaryValueCToCpp::GetSize() { - cef_binary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_size)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - size_t _retval = _struct->get_size(_struct); - - // Return type: simple - return _retval; -} - -size_t CefBinaryValueCToCpp::GetData(void* buffer, size_t buffer_size, - size_t data_offset) { - cef_binary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_data)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: buffer; type: simple_byaddr - DCHECK(buffer); - if (!buffer) - return 0; - - // Execute - size_t _retval = _struct->get_data(_struct, - buffer, - buffer_size, - data_offset); - - // Return type: simple - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefBinaryValueCToCpp::CefBinaryValueCToCpp() { -} - -template<> cef_binary_value_t* CefCToCpp::UnwrapDerived(CefWrapperType type, - CefBinaryValue* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_BINARY_VALUE; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/binary_value_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/binary_value_ctocpp.h deleted file mode 100644 index 44a74e1d..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/binary_value_ctocpp.h +++ /dev/null @@ -1,44 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_BINARY_VALUE_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_BINARY_VALUE_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_values.h" -#include "include/capi/cef_values_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefBinaryValueCToCpp - : public CefCToCpp { - public: - CefBinaryValueCToCpp(); - - // CefBinaryValue methods. - bool IsValid() OVERRIDE; - bool IsOwned() OVERRIDE; - bool IsSame(CefRefPtr that) OVERRIDE; - bool IsEqual(CefRefPtr that) OVERRIDE; - CefRefPtr Copy() OVERRIDE; - size_t GetSize() OVERRIDE; - size_t GetData(void* buffer, size_t buffer_size, size_t data_offset) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_BINARY_VALUE_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/browser_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/browser_ctocpp.cc deleted file mode 100644 index ae3366e4..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/browser_ctocpp.cc +++ /dev/null @@ -1,374 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/browser_host_ctocpp.h" -#include "libcef_dll/ctocpp/frame_ctocpp.h" -#include "libcef_dll/ctocpp/process_message_ctocpp.h" -#include "libcef_dll/transfer_util.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -CefRefPtr CefBrowserCToCpp::GetHost() { - cef_browser_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_host)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_browser_host_t* _retval = _struct->get_host(_struct); - - // Return type: refptr_same - return CefBrowserHostCToCpp::Wrap(_retval); -} - -bool CefBrowserCToCpp::CanGoBack() { - cef_browser_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, can_go_back)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->can_go_back(_struct); - - // Return type: bool - return _retval?true:false; -} - -void CefBrowserCToCpp::GoBack() { - cef_browser_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, go_back)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->go_back(_struct); -} - -bool CefBrowserCToCpp::CanGoForward() { - cef_browser_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, can_go_forward)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->can_go_forward(_struct); - - // Return type: bool - return _retval?true:false; -} - -void CefBrowserCToCpp::GoForward() { - cef_browser_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, go_forward)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->go_forward(_struct); -} - -bool CefBrowserCToCpp::IsLoading() { - cef_browser_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_loading)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_loading(_struct); - - // Return type: bool - return _retval?true:false; -} - -void CefBrowserCToCpp::Reload() { - cef_browser_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, reload)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->reload(_struct); -} - -void CefBrowserCToCpp::ReloadIgnoreCache() { - cef_browser_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, reload_ignore_cache)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->reload_ignore_cache(_struct); -} - -void CefBrowserCToCpp::StopLoad() { - cef_browser_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, stop_load)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->stop_load(_struct); -} - -int CefBrowserCToCpp::GetIdentifier() { - cef_browser_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_identifier)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_identifier(_struct); - - // Return type: simple - return _retval; -} - -bool CefBrowserCToCpp::IsSame(CefRefPtr that) { - cef_browser_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_same)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: that; type: refptr_same - DCHECK(that.get()); - if (!that.get()) - return false; - - // Execute - int _retval = _struct->is_same(_struct, - CefBrowserCToCpp::Unwrap(that)); - - // Return type: bool - return _retval?true:false; -} - -bool CefBrowserCToCpp::IsPopup() { - cef_browser_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_popup)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_popup(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefBrowserCToCpp::HasDocument() { - cef_browser_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, has_document)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->has_document(_struct); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefBrowserCToCpp::GetMainFrame() { - cef_browser_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_main_frame)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_frame_t* _retval = _struct->get_main_frame(_struct); - - // Return type: refptr_same - return CefFrameCToCpp::Wrap(_retval); -} - -CefRefPtr CefBrowserCToCpp::GetFocusedFrame() { - cef_browser_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_focused_frame)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_frame_t* _retval = _struct->get_focused_frame(_struct); - - // Return type: refptr_same - return CefFrameCToCpp::Wrap(_retval); -} - -CefRefPtr CefBrowserCToCpp::GetFrame(int64 identifier) { - cef_browser_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_frame_byident)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_frame_t* _retval = _struct->get_frame_byident(_struct, - identifier); - - // Return type: refptr_same - return CefFrameCToCpp::Wrap(_retval); -} - -CefRefPtr CefBrowserCToCpp::GetFrame(const CefString& name) { - cef_browser_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_frame)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: name - - // Execute - cef_frame_t* _retval = _struct->get_frame(_struct, - name.GetStruct()); - - // Return type: refptr_same - return CefFrameCToCpp::Wrap(_retval); -} - -size_t CefBrowserCToCpp::GetFrameCount() { - cef_browser_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_frame_count)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - size_t _retval = _struct->get_frame_count(_struct); - - // Return type: simple - return _retval; -} - -void CefBrowserCToCpp::GetFrameIdentifiers(std::vector& identifiers) { - cef_browser_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_frame_identifiers)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: identifiers; type: simple_vec_byref - size_t identifiersSize = identifiers.size(); - size_t identifiersCount = std::max(GetFrameCount(), identifiersSize); - int64* identifiersList = NULL; - if (identifiersCount > 0) { - identifiersList = new int64[identifiersCount]; - DCHECK(identifiersList); - if (identifiersList) { - memset(identifiersList, 0, sizeof(int64)*identifiersCount); - } - if (identifiersList && identifiersSize > 0) { - for (size_t i = 0; i < identifiersSize; ++i) { - identifiersList[i] = identifiers[i]; - } - } - } - - // Execute - _struct->get_frame_identifiers(_struct, - &identifiersCount, - identifiersList); - - // Restore param:identifiers; type: simple_vec_byref - identifiers.clear(); - if (identifiersCount > 0 && identifiersList) { - for (size_t i = 0; i < identifiersCount; ++i) { - identifiers.push_back(identifiersList[i]); - } - delete [] identifiersList; - } -} - -void CefBrowserCToCpp::GetFrameNames(std::vector& names) { - cef_browser_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_frame_names)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: names; type: string_vec_byref - cef_string_list_t namesList = cef_string_list_alloc(); - DCHECK(namesList); - if (namesList) - transfer_string_list_contents(names, namesList); - - // Execute - _struct->get_frame_names(_struct, - namesList); - - // Restore param:names; type: string_vec_byref - if (namesList) { - names.clear(); - transfer_string_list_contents(namesList, names); - cef_string_list_free(namesList); - } -} - -bool CefBrowserCToCpp::SendProcessMessage(CefProcessId target_process, - CefRefPtr message) { - cef_browser_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, send_process_message)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: message; type: refptr_same - DCHECK(message.get()); - if (!message.get()) - return false; - - // Execute - int _retval = _struct->send_process_message(_struct, - target_process, - CefProcessMessageCToCpp::Unwrap(message)); - - // Return type: bool - return _retval?true:false; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefBrowserCToCpp::CefBrowserCToCpp() { -} - -template<> cef_browser_t* CefCToCpp::UnwrapDerived(CefWrapperType type, CefBrowser* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_BROWSER; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/browser_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/browser_ctocpp.h deleted file mode 100644 index c33b055e..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/browser_ctocpp.h +++ /dev/null @@ -1,61 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_BROWSER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_BROWSER_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include -#include "include/cef_browser.h" -#include "include/capi/cef_browser_capi.h" -#include "include/cef_client.h" -#include "include/capi/cef_client_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefBrowserCToCpp - : public CefCToCpp { - public: - CefBrowserCToCpp(); - - // CefBrowser methods. - CefRefPtr GetHost() OVERRIDE; - bool CanGoBack() OVERRIDE; - void GoBack() OVERRIDE; - bool CanGoForward() OVERRIDE; - void GoForward() OVERRIDE; - bool IsLoading() OVERRIDE; - void Reload() OVERRIDE; - void ReloadIgnoreCache() OVERRIDE; - void StopLoad() OVERRIDE; - int GetIdentifier() OVERRIDE; - bool IsSame(CefRefPtr that) OVERRIDE; - bool IsPopup() OVERRIDE; - bool HasDocument() OVERRIDE; - CefRefPtr GetMainFrame() OVERRIDE; - CefRefPtr GetFocusedFrame() OVERRIDE; - CefRefPtr GetFrame(int64 identifier) OVERRIDE; - CefRefPtr GetFrame(const CefString& name) OVERRIDE; - size_t GetFrameCount() OVERRIDE; - void GetFrameIdentifiers(std::vector& identifiers) OVERRIDE; - void GetFrameNames(std::vector& names) OVERRIDE; - bool SendProcessMessage(CefProcessId target_process, - CefRefPtr message) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_BROWSER_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/browser_host_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/browser_host_ctocpp.cc deleted file mode 100644 index 1629b6e9..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/browser_host_ctocpp.cc +++ /dev/null @@ -1,757 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/client_cpptoc.h" -#include "libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.h" -#include "libcef_dll/cpptoc/pdf_print_callback_cpptoc.h" -#include "libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/browser_host_ctocpp.h" -#include "libcef_dll/ctocpp/drag_data_ctocpp.h" -#include "libcef_dll/ctocpp/request_context_ctocpp.h" -#include "libcef_dll/transfer_util.h" - - -// STATIC METHODS - Body may be edited by hand. - -bool CefBrowserHost::CreateBrowser(const CefWindowInfo& windowInfo, - CefRefPtr client, const CefString& url, - const CefBrowserSettings& settings, - CefRefPtr request_context) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: client, url, request_context - - // Execute - int _retval = cef_browser_host_create_browser( - &windowInfo, - CefClientCppToC::Wrap(client), - url.GetStruct(), - &settings, - CefRequestContextCToCpp::Unwrap(request_context)); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefBrowserHost::CreateBrowserSync( - const CefWindowInfo& windowInfo, CefRefPtr client, - const CefString& url, const CefBrowserSettings& settings, - CefRefPtr request_context) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: client, url, request_context - - // Execute - cef_browser_t* _retval = cef_browser_host_create_browser_sync( - &windowInfo, - CefClientCppToC::Wrap(client), - url.GetStruct(), - &settings, - CefRequestContextCToCpp::Unwrap(request_context)); - - // Return type: refptr_same - return CefBrowserCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -CefRefPtr CefBrowserHostCToCpp::GetBrowser() { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_browser)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_browser_t* _retval = _struct->get_browser(_struct); - - // Return type: refptr_same - return CefBrowserCToCpp::Wrap(_retval); -} - -void CefBrowserHostCToCpp::CloseBrowser(bool force_close) { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, close_browser)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->close_browser(_struct, - force_close); -} - -void CefBrowserHostCToCpp::SetFocus(bool focus) { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_focus)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->set_focus(_struct, - focus); -} - -void CefBrowserHostCToCpp::SetWindowVisibility(bool visible) { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_window_visibility)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->set_window_visibility(_struct, - visible); -} - -CefWindowHandle CefBrowserHostCToCpp::GetWindowHandle() { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_window_handle)) - return kNullWindowHandle; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_window_handle_t _retval = _struct->get_window_handle(_struct); - - // Return type: simple - return _retval; -} - -CefWindowHandle CefBrowserHostCToCpp::GetOpenerWindowHandle() { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_opener_window_handle)) - return kNullWindowHandle; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_window_handle_t _retval = _struct->get_opener_window_handle(_struct); - - // Return type: simple - return _retval; -} - -CefRefPtr CefBrowserHostCToCpp::GetClient() { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_client)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_client_t* _retval = _struct->get_client(_struct); - - // Return type: refptr_diff - return CefClientCppToC::Unwrap(_retval); -} - -CefRefPtr CefBrowserHostCToCpp::GetRequestContext() { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_request_context)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_request_context_t* _retval = _struct->get_request_context(_struct); - - // Return type: refptr_same - return CefRequestContextCToCpp::Wrap(_retval); -} - -double CefBrowserHostCToCpp::GetZoomLevel() { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_zoom_level)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - double _retval = _struct->get_zoom_level(_struct); - - // Return type: simple - return _retval; -} - -void CefBrowserHostCToCpp::SetZoomLevel(double zoomLevel) { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_zoom_level)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->set_zoom_level(_struct, - zoomLevel); -} - -void CefBrowserHostCToCpp::RunFileDialog(FileDialogMode mode, - const CefString& title, const CefString& default_file_path, - const std::vector& accept_filters, int selected_accept_filter, - CefRefPtr callback) { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, run_file_dialog)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: selected_accept_filter; type: simple_byval - DCHECK_GE(selected_accept_filter, 0); - if (selected_accept_filter < 0) - return; - // Verify param: callback; type: refptr_diff - DCHECK(callback.get()); - if (!callback.get()) - return; - // Unverified params: title, default_file_path, accept_filters - - // Translate param: accept_filters; type: string_vec_byref_const - cef_string_list_t accept_filtersList = cef_string_list_alloc(); - DCHECK(accept_filtersList); - if (accept_filtersList) - transfer_string_list_contents(accept_filters, accept_filtersList); - - // Execute - _struct->run_file_dialog(_struct, - mode, - title.GetStruct(), - default_file_path.GetStruct(), - accept_filtersList, - selected_accept_filter, - CefRunFileDialogCallbackCppToC::Wrap(callback)); - - // Restore param:accept_filters; type: string_vec_byref_const - if (accept_filtersList) - cef_string_list_free(accept_filtersList); -} - -void CefBrowserHostCToCpp::StartDownload(const CefString& url) { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, start_download)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: url; type: string_byref_const - DCHECK(!url.empty()); - if (url.empty()) - return; - - // Execute - _struct->start_download(_struct, - url.GetStruct()); -} - -void CefBrowserHostCToCpp::Print() { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, print)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->print(_struct); -} - -void CefBrowserHostCToCpp::PrintToPDF(const CefString& path, - const CefPdfPrintSettings& settings, - CefRefPtr callback) { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, print_to_pdf)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: path; type: string_byref_const - DCHECK(!path.empty()); - if (path.empty()) - return; - // Unverified params: callback - - // Execute - _struct->print_to_pdf(_struct, - path.GetStruct(), - &settings, - CefPdfPrintCallbackCppToC::Wrap(callback)); -} - -void CefBrowserHostCToCpp::Find(int identifier, const CefString& searchText, - bool forward, bool matchCase, bool findNext) { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, find)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: searchText; type: string_byref_const - DCHECK(!searchText.empty()); - if (searchText.empty()) - return; - - // Execute - _struct->find(_struct, - identifier, - searchText.GetStruct(), - forward, - matchCase, - findNext); -} - -void CefBrowserHostCToCpp::StopFinding(bool clearSelection) { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, stop_finding)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->stop_finding(_struct, - clearSelection); -} - -void CefBrowserHostCToCpp::ShowDevTools(const CefWindowInfo& windowInfo, - CefRefPtr client, const CefBrowserSettings& settings, - const CefPoint& inspect_element_at) { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, show_dev_tools)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: client; type: refptr_diff - DCHECK(client.get()); - if (!client.get()) - return; - // Unverified params: inspect_element_at - - // Execute - _struct->show_dev_tools(_struct, - &windowInfo, - CefClientCppToC::Wrap(client), - &settings, - &inspect_element_at); -} - -void CefBrowserHostCToCpp::CloseDevTools() { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, close_dev_tools)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->close_dev_tools(_struct); -} - -void CefBrowserHostCToCpp::GetNavigationEntries( - CefRefPtr visitor, bool current_only) { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_navigation_entries)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: visitor; type: refptr_diff - DCHECK(visitor.get()); - if (!visitor.get()) - return; - - // Execute - _struct->get_navigation_entries(_struct, - CefNavigationEntryVisitorCppToC::Wrap(visitor), - current_only); -} - -void CefBrowserHostCToCpp::SetMouseCursorChangeDisabled(bool disabled) { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_mouse_cursor_change_disabled)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->set_mouse_cursor_change_disabled(_struct, - disabled); -} - -bool CefBrowserHostCToCpp::IsMouseCursorChangeDisabled() { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_mouse_cursor_change_disabled)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_mouse_cursor_change_disabled(_struct); - - // Return type: bool - return _retval?true:false; -} - -void CefBrowserHostCToCpp::ReplaceMisspelling(const CefString& word) { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, replace_misspelling)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: word; type: string_byref_const - DCHECK(!word.empty()); - if (word.empty()) - return; - - // Execute - _struct->replace_misspelling(_struct, - word.GetStruct()); -} - -void CefBrowserHostCToCpp::AddWordToDictionary(const CefString& word) { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, add_word_to_dictionary)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: word; type: string_byref_const - DCHECK(!word.empty()); - if (word.empty()) - return; - - // Execute - _struct->add_word_to_dictionary(_struct, - word.GetStruct()); -} - -bool CefBrowserHostCToCpp::IsWindowRenderingDisabled() { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_window_rendering_disabled)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_window_rendering_disabled(_struct); - - // Return type: bool - return _retval?true:false; -} - -void CefBrowserHostCToCpp::WasResized() { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, was_resized)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->was_resized(_struct); -} - -void CefBrowserHostCToCpp::WasHidden(bool hidden) { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, was_hidden)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->was_hidden(_struct, - hidden); -} - -void CefBrowserHostCToCpp::NotifyScreenInfoChanged() { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, notify_screen_info_changed)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->notify_screen_info_changed(_struct); -} - -void CefBrowserHostCToCpp::Invalidate(PaintElementType type) { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, invalidate)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->invalidate(_struct, - type); -} - -void CefBrowserHostCToCpp::SendKeyEvent(const CefKeyEvent& event) { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, send_key_event)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->send_key_event(_struct, - &event); -} - -void CefBrowserHostCToCpp::SendMouseClickEvent(const CefMouseEvent& event, - MouseButtonType type, bool mouseUp, int clickCount) { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, send_mouse_click_event)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->send_mouse_click_event(_struct, - &event, - type, - mouseUp, - clickCount); -} - -void CefBrowserHostCToCpp::SendMouseMoveEvent(const CefMouseEvent& event, - bool mouseLeave) { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, send_mouse_move_event)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->send_mouse_move_event(_struct, - &event, - mouseLeave); -} - -void CefBrowserHostCToCpp::SendMouseWheelEvent(const CefMouseEvent& event, - int deltaX, int deltaY) { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, send_mouse_wheel_event)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->send_mouse_wheel_event(_struct, - &event, - deltaX, - deltaY); -} - -void CefBrowserHostCToCpp::SendFocusEvent(bool setFocus) { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, send_focus_event)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->send_focus_event(_struct, - setFocus); -} - -void CefBrowserHostCToCpp::SendCaptureLostEvent() { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, send_capture_lost_event)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->send_capture_lost_event(_struct); -} - -void CefBrowserHostCToCpp::NotifyMoveOrResizeStarted() { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, notify_move_or_resize_started)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->notify_move_or_resize_started(_struct); -} - -int CefBrowserHostCToCpp::GetWindowlessFrameRate() { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_windowless_frame_rate)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_windowless_frame_rate(_struct); - - // Return type: simple - return _retval; -} - -void CefBrowserHostCToCpp::SetWindowlessFrameRate(int frame_rate) { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_windowless_frame_rate)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->set_windowless_frame_rate(_struct, - frame_rate); -} - -CefTextInputContext CefBrowserHostCToCpp::GetNSTextInputContext() { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_nstext_input_context)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_text_input_context_t _retval = _struct->get_nstext_input_context(_struct); - - // Return type: simple - return _retval; -} - -void CefBrowserHostCToCpp::HandleKeyEventBeforeTextInputClient( - CefEventHandle keyEvent) { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, handle_key_event_before_text_input_client)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->handle_key_event_before_text_input_client(_struct, - keyEvent); -} - -void CefBrowserHostCToCpp::HandleKeyEventAfterTextInputClient( - CefEventHandle keyEvent) { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, handle_key_event_after_text_input_client)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->handle_key_event_after_text_input_client(_struct, - keyEvent); -} - -void CefBrowserHostCToCpp::DragTargetDragEnter(CefRefPtr drag_data, - const CefMouseEvent& event, DragOperationsMask allowed_ops) { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, drag_target_drag_enter)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: drag_data; type: refptr_same - DCHECK(drag_data.get()); - if (!drag_data.get()) - return; - - // Execute - _struct->drag_target_drag_enter(_struct, - CefDragDataCToCpp::Unwrap(drag_data), - &event, - allowed_ops); -} - -void CefBrowserHostCToCpp::DragTargetDragOver(const CefMouseEvent& event, - DragOperationsMask allowed_ops) { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, drag_target_drag_over)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->drag_target_drag_over(_struct, - &event, - allowed_ops); -} - -void CefBrowserHostCToCpp::DragTargetDragLeave() { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, drag_target_drag_leave)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->drag_target_drag_leave(_struct); -} - -void CefBrowserHostCToCpp::DragTargetDrop(const CefMouseEvent& event) { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, drag_target_drop)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->drag_target_drop(_struct, - &event); -} - -void CefBrowserHostCToCpp::DragSourceEndedAt(int x, int y, - DragOperationsMask op) { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, drag_source_ended_at)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->drag_source_ended_at(_struct, - x, - y, - op); -} - -void CefBrowserHostCToCpp::DragSourceSystemDragEnded() { - cef_browser_host_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, drag_source_system_drag_ended)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->drag_source_system_drag_ended(_struct); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefBrowserHostCToCpp::CefBrowserHostCToCpp() { -} - -template<> cef_browser_host_t* CefCToCpp::UnwrapDerived(CefWrapperType type, - CefBrowserHost* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_BROWSER_HOST; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/browser_host_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/browser_host_ctocpp.h deleted file mode 100644 index e2a19acb..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/browser_host_ctocpp.h +++ /dev/null @@ -1,98 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_BROWSER_HOST_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_BROWSER_HOST_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include -#include "include/cef_browser.h" -#include "include/capi/cef_browser_capi.h" -#include "include/cef_client.h" -#include "include/capi/cef_client_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefBrowserHostCToCpp - : public CefCToCpp { - public: - CefBrowserHostCToCpp(); - - // CefBrowserHost methods. - CefRefPtr GetBrowser() OVERRIDE; - void CloseBrowser(bool force_close) OVERRIDE; - void SetFocus(bool focus) OVERRIDE; - void SetWindowVisibility(bool visible) OVERRIDE; - CefWindowHandle GetWindowHandle() OVERRIDE; - CefWindowHandle GetOpenerWindowHandle() OVERRIDE; - CefRefPtr GetClient() OVERRIDE; - CefRefPtr GetRequestContext() OVERRIDE; - double GetZoomLevel() OVERRIDE; - void SetZoomLevel(double zoomLevel) OVERRIDE; - void RunFileDialog(FileDialogMode mode, const CefString& title, - const CefString& default_file_path, - const std::vector& accept_filters, int selected_accept_filter, - CefRefPtr callback) OVERRIDE; - void StartDownload(const CefString& url) OVERRIDE; - void Print() OVERRIDE; - void PrintToPDF(const CefString& path, const CefPdfPrintSettings& settings, - CefRefPtr callback) OVERRIDE; - void Find(int identifier, const CefString& searchText, bool forward, - bool matchCase, bool findNext) OVERRIDE; - void StopFinding(bool clearSelection) OVERRIDE; - void ShowDevTools(const CefWindowInfo& windowInfo, - CefRefPtr client, const CefBrowserSettings& settings, - const CefPoint& inspect_element_at) OVERRIDE; - void CloseDevTools() OVERRIDE; - void GetNavigationEntries(CefRefPtr visitor, - bool current_only) OVERRIDE; - void SetMouseCursorChangeDisabled(bool disabled) OVERRIDE; - bool IsMouseCursorChangeDisabled() OVERRIDE; - void ReplaceMisspelling(const CefString& word) OVERRIDE; - void AddWordToDictionary(const CefString& word) OVERRIDE; - bool IsWindowRenderingDisabled() OVERRIDE; - void WasResized() OVERRIDE; - void WasHidden(bool hidden) OVERRIDE; - void NotifyScreenInfoChanged() OVERRIDE; - void Invalidate(PaintElementType type) OVERRIDE; - void SendKeyEvent(const CefKeyEvent& event) OVERRIDE; - void SendMouseClickEvent(const CefMouseEvent& event, MouseButtonType type, - bool mouseUp, int clickCount) OVERRIDE; - void SendMouseMoveEvent(const CefMouseEvent& event, bool mouseLeave) OVERRIDE; - void SendMouseWheelEvent(const CefMouseEvent& event, int deltaX, - int deltaY) OVERRIDE; - void SendFocusEvent(bool setFocus) OVERRIDE; - void SendCaptureLostEvent() OVERRIDE; - void NotifyMoveOrResizeStarted() OVERRIDE; - int GetWindowlessFrameRate() OVERRIDE; - void SetWindowlessFrameRate(int frame_rate) OVERRIDE; - CefTextInputContext GetNSTextInputContext() OVERRIDE; - void HandleKeyEventBeforeTextInputClient(CefEventHandle keyEvent) OVERRIDE; - void HandleKeyEventAfterTextInputClient(CefEventHandle keyEvent) OVERRIDE; - void DragTargetDragEnter(CefRefPtr drag_data, - const CefMouseEvent& event, DragOperationsMask allowed_ops) OVERRIDE; - void DragTargetDragOver(const CefMouseEvent& event, - DragOperationsMask allowed_ops) OVERRIDE; - void DragTargetDragLeave() OVERRIDE; - void DragTargetDrop(const CefMouseEvent& event) OVERRIDE; - void DragSourceEndedAt(int x, int y, DragOperationsMask op) OVERRIDE; - void DragSourceSystemDragEnded() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_BROWSER_HOST_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/callback_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/callback_ctocpp.cc deleted file mode 100644 index 0d527159..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/callback_ctocpp.cc +++ /dev/null @@ -1,58 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/callback_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefCallbackCToCpp::Continue() { - cef_callback_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, cont)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->cont(_struct); -} - -void CefCallbackCToCpp::Cancel() { - cef_callback_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, cancel)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->cancel(_struct); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefCallbackCToCpp::CefCallbackCToCpp() { -} - -template<> cef_callback_t* CefCToCpp::UnwrapDerived(CefWrapperType type, CefCallback* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_CALLBACK; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/callback_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/callback_ctocpp.h deleted file mode 100644 index e70543e4..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/callback_ctocpp.h +++ /dev/null @@ -1,38 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_CALLBACK_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_CALLBACK_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_callback.h" -#include "include/capi/cef_callback_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefCallbackCToCpp - : public CefCToCpp { - public: - CefCallbackCToCpp(); - - // CefCallback methods. - void Continue() OVERRIDE; - void Cancel() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_CALLBACK_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/command_line_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/command_line_ctocpp.cc deleted file mode 100644 index f4b8b850..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/command_line_ctocpp.cc +++ /dev/null @@ -1,432 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "include/cef_version.h" -#include "libcef_dll/ctocpp/command_line_ctocpp.h" -#include "libcef_dll/transfer_util.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefCommandLine::CreateCommandLine() { - const char* api_hash = cef_api_hash(0); - if (strcmp(api_hash, CEF_API_HASH_PLATFORM)) { - // The libcef API hash does not match the current header API hash. - NOTREACHED(); - return NULL; - } - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_command_line_t* _retval = cef_command_line_create(); - - // Return type: refptr_same - return CefCommandLineCToCpp::Wrap(_retval); -} - -CefRefPtr CefCommandLine::GetGlobalCommandLine() { - const char* api_hash = cef_api_hash(0); - if (strcmp(api_hash, CEF_API_HASH_PLATFORM)) { - // The libcef API hash does not match the current header API hash. - NOTREACHED(); - return NULL; - } - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_command_line_t* _retval = cef_command_line_get_global(); - - // Return type: refptr_same - return CefCommandLineCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefCommandLineCToCpp::IsValid() { - cef_command_line_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_valid)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_valid(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefCommandLineCToCpp::IsReadOnly() { - cef_command_line_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_read_only)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_read_only(_struct); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefCommandLineCToCpp::Copy() { - cef_command_line_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, copy)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_command_line_t* _retval = _struct->copy(_struct); - - // Return type: refptr_same - return CefCommandLineCToCpp::Wrap(_retval); -} - -void CefCommandLineCToCpp::InitFromArgv(int argc, const char* const* argv) { - cef_command_line_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, init_from_argv)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: argv; type: simple_byaddr - DCHECK(argv); - if (!argv) - return; - - // Execute - _struct->init_from_argv(_struct, - argc, - argv); -} - -void CefCommandLineCToCpp::InitFromString(const CefString& command_line) { - cef_command_line_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, init_from_string)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: command_line; type: string_byref_const - DCHECK(!command_line.empty()); - if (command_line.empty()) - return; - - // Execute - _struct->init_from_string(_struct, - command_line.GetStruct()); -} - -void CefCommandLineCToCpp::Reset() { - cef_command_line_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, reset)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->reset(_struct); -} - -void CefCommandLineCToCpp::GetArgv(std::vector& argv) { - cef_command_line_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_argv)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: argv; type: string_vec_byref - cef_string_list_t argvList = cef_string_list_alloc(); - DCHECK(argvList); - if (argvList) - transfer_string_list_contents(argv, argvList); - - // Execute - _struct->get_argv(_struct, - argvList); - - // Restore param:argv; type: string_vec_byref - if (argvList) { - argv.clear(); - transfer_string_list_contents(argvList, argv); - cef_string_list_free(argvList); - } -} - -CefString CefCommandLineCToCpp::GetCommandLineString() { - cef_command_line_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_command_line_string)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_command_line_string(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefCommandLineCToCpp::GetProgram() { - cef_command_line_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_program)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_program(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -void CefCommandLineCToCpp::SetProgram(const CefString& program) { - cef_command_line_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_program)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: program; type: string_byref_const - DCHECK(!program.empty()); - if (program.empty()) - return; - - // Execute - _struct->set_program(_struct, - program.GetStruct()); -} - -bool CefCommandLineCToCpp::HasSwitches() { - cef_command_line_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, has_switches)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->has_switches(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefCommandLineCToCpp::HasSwitch(const CefString& name) { - cef_command_line_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, has_switch)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: name; type: string_byref_const - DCHECK(!name.empty()); - if (name.empty()) - return false; - - // Execute - int _retval = _struct->has_switch(_struct, - name.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -CefString CefCommandLineCToCpp::GetSwitchValue(const CefString& name) { - cef_command_line_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_switch_value)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: name; type: string_byref_const - DCHECK(!name.empty()); - if (name.empty()) - return CefString(); - - // Execute - cef_string_userfree_t _retval = _struct->get_switch_value(_struct, - name.GetStruct()); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -void CefCommandLineCToCpp::GetSwitches(SwitchMap& switches) { - cef_command_line_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_switches)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: switches; type: string_map_single_byref - cef_string_map_t switchesMap = cef_string_map_alloc(); - DCHECK(switchesMap); - if (switchesMap) - transfer_string_map_contents(switches, switchesMap); - - // Execute - _struct->get_switches(_struct, - switchesMap); - - // Restore param:switches; type: string_map_single_byref - if (switchesMap) { - switches.clear(); - transfer_string_map_contents(switchesMap, switches); - cef_string_map_free(switchesMap); - } -} - -void CefCommandLineCToCpp::AppendSwitch(const CefString& name) { - cef_command_line_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, append_switch)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: name; type: string_byref_const - DCHECK(!name.empty()); - if (name.empty()) - return; - - // Execute - _struct->append_switch(_struct, - name.GetStruct()); -} - -void CefCommandLineCToCpp::AppendSwitchWithValue(const CefString& name, - const CefString& value) { - cef_command_line_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, append_switch_with_value)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: name; type: string_byref_const - DCHECK(!name.empty()); - if (name.empty()) - return; - // Verify param: value; type: string_byref_const - DCHECK(!value.empty()); - if (value.empty()) - return; - - // Execute - _struct->append_switch_with_value(_struct, - name.GetStruct(), - value.GetStruct()); -} - -bool CefCommandLineCToCpp::HasArguments() { - cef_command_line_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, has_arguments)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->has_arguments(_struct); - - // Return type: bool - return _retval?true:false; -} - -void CefCommandLineCToCpp::GetArguments(ArgumentList& arguments) { - cef_command_line_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_arguments)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: arguments; type: string_vec_byref - cef_string_list_t argumentsList = cef_string_list_alloc(); - DCHECK(argumentsList); - if (argumentsList) - transfer_string_list_contents(arguments, argumentsList); - - // Execute - _struct->get_arguments(_struct, - argumentsList); - - // Restore param:arguments; type: string_vec_byref - if (argumentsList) { - arguments.clear(); - transfer_string_list_contents(argumentsList, arguments); - cef_string_list_free(argumentsList); - } -} - -void CefCommandLineCToCpp::AppendArgument(const CefString& argument) { - cef_command_line_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, append_argument)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: argument; type: string_byref_const - DCHECK(!argument.empty()); - if (argument.empty()) - return; - - // Execute - _struct->append_argument(_struct, - argument.GetStruct()); -} - -void CefCommandLineCToCpp::PrependWrapper(const CefString& wrapper) { - cef_command_line_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, prepend_wrapper)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: wrapper; type: string_byref_const - DCHECK(!wrapper.empty()); - if (wrapper.empty()) - return; - - // Execute - _struct->prepend_wrapper(_struct, - wrapper.GetStruct()); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefCommandLineCToCpp::CefCommandLineCToCpp() { -} - -template<> cef_command_line_t* CefCToCpp::UnwrapDerived(CefWrapperType type, - CefCommandLine* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_COMMAND_LINE; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/command_line_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/command_line_ctocpp.h deleted file mode 100644 index fdb1f0da..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/command_line_ctocpp.h +++ /dev/null @@ -1,59 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_COMMAND_LINE_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_COMMAND_LINE_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include -#include "include/cef_command_line.h" -#include "include/capi/cef_command_line_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefCommandLineCToCpp - : public CefCToCpp { - public: - CefCommandLineCToCpp(); - - // CefCommandLine methods. - bool IsValid() OVERRIDE; - bool IsReadOnly() OVERRIDE; - CefRefPtr Copy() OVERRIDE; - void InitFromArgv(int argc, const char* const* argv) OVERRIDE; - void InitFromString(const CefString& command_line) OVERRIDE; - void Reset() OVERRIDE; - void GetArgv(std::vector& argv) OVERRIDE; - CefString GetCommandLineString() OVERRIDE; - CefString GetProgram() OVERRIDE; - void SetProgram(const CefString& program) OVERRIDE; - bool HasSwitches() OVERRIDE; - bool HasSwitch(const CefString& name) OVERRIDE; - CefString GetSwitchValue(const CefString& name) OVERRIDE; - void GetSwitches(SwitchMap& switches) OVERRIDE; - void AppendSwitch(const CefString& name) OVERRIDE; - void AppendSwitchWithValue(const CefString& name, - const CefString& value) OVERRIDE; - bool HasArguments() OVERRIDE; - void GetArguments(ArgumentList& arguments) OVERRIDE; - void AppendArgument(const CefString& argument) OVERRIDE; - void PrependWrapper(const CefString& wrapper) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_COMMAND_LINE_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/context_menu_params_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/context_menu_params_ctocpp.cc deleted file mode 100644 index 8f70f2c7..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/context_menu_params_ctocpp.cc +++ /dev/null @@ -1,354 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/context_menu_params_ctocpp.h" -#include "libcef_dll/transfer_util.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -int CefContextMenuParamsCToCpp::GetXCoord() { - cef_context_menu_params_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_xcoord)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_xcoord(_struct); - - // Return type: simple - return _retval; -} - -int CefContextMenuParamsCToCpp::GetYCoord() { - cef_context_menu_params_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_ycoord)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_ycoord(_struct); - - // Return type: simple - return _retval; -} - -CefContextMenuParams::TypeFlags CefContextMenuParamsCToCpp::GetTypeFlags() { - cef_context_menu_params_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_type_flags)) - return CM_TYPEFLAG_NONE; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_context_menu_type_flags_t _retval = _struct->get_type_flags(_struct); - - // Return type: simple - return _retval; -} - -CefString CefContextMenuParamsCToCpp::GetLinkUrl() { - cef_context_menu_params_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_link_url)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_link_url(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefContextMenuParamsCToCpp::GetUnfilteredLinkUrl() { - cef_context_menu_params_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_unfiltered_link_url)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_unfiltered_link_url(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefContextMenuParamsCToCpp::GetSourceUrl() { - cef_context_menu_params_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_source_url)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_source_url(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -bool CefContextMenuParamsCToCpp::HasImageContents() { - cef_context_menu_params_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, has_image_contents)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->has_image_contents(_struct); - - // Return type: bool - return _retval?true:false; -} - -CefString CefContextMenuParamsCToCpp::GetPageUrl() { - cef_context_menu_params_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_page_url)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_page_url(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefContextMenuParamsCToCpp::GetFrameUrl() { - cef_context_menu_params_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_frame_url)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_frame_url(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefContextMenuParamsCToCpp::GetFrameCharset() { - cef_context_menu_params_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_frame_charset)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_frame_charset(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefContextMenuParams::MediaType CefContextMenuParamsCToCpp::GetMediaType() { - cef_context_menu_params_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_media_type)) - return CM_MEDIATYPE_NONE; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_context_menu_media_type_t _retval = _struct->get_media_type(_struct); - - // Return type: simple - return _retval; -} - -CefContextMenuParams::MediaStateFlags CefContextMenuParamsCToCpp::GetMediaStateFlags( - ) { - cef_context_menu_params_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_media_state_flags)) - return CM_MEDIAFLAG_NONE; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_context_menu_media_state_flags_t _retval = _struct->get_media_state_flags( - _struct); - - // Return type: simple - return _retval; -} - -CefString CefContextMenuParamsCToCpp::GetSelectionText() { - cef_context_menu_params_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_selection_text)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_selection_text(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefContextMenuParamsCToCpp::GetMisspelledWord() { - cef_context_menu_params_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_misspelled_word)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_misspelled_word(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -bool CefContextMenuParamsCToCpp::GetDictionarySuggestions( - std::vector& suggestions) { - cef_context_menu_params_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_dictionary_suggestions)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: suggestions; type: string_vec_byref - cef_string_list_t suggestionsList = cef_string_list_alloc(); - DCHECK(suggestionsList); - if (suggestionsList) - transfer_string_list_contents(suggestions, suggestionsList); - - // Execute - int _retval = _struct->get_dictionary_suggestions(_struct, - suggestionsList); - - // Restore param:suggestions; type: string_vec_byref - if (suggestionsList) { - suggestions.clear(); - transfer_string_list_contents(suggestionsList, suggestions); - cef_string_list_free(suggestionsList); - } - - // Return type: bool - return _retval?true:false; -} - -bool CefContextMenuParamsCToCpp::IsEditable() { - cef_context_menu_params_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_editable)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_editable(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefContextMenuParamsCToCpp::IsSpellCheckEnabled() { - cef_context_menu_params_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_spell_check_enabled)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_spell_check_enabled(_struct); - - // Return type: bool - return _retval?true:false; -} - -CefContextMenuParams::EditStateFlags CefContextMenuParamsCToCpp::GetEditStateFlags( - ) { - cef_context_menu_params_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_edit_state_flags)) - return CM_EDITFLAG_NONE; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_context_menu_edit_state_flags_t _retval = _struct->get_edit_state_flags( - _struct); - - // Return type: simple - return _retval; -} - -bool CefContextMenuParamsCToCpp::IsCustomMenu() { - cef_context_menu_params_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_custom_menu)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_custom_menu(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefContextMenuParamsCToCpp::IsPepperMenu() { - cef_context_menu_params_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_pepper_menu)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_pepper_menu(_struct); - - // Return type: bool - return _retval?true:false; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefContextMenuParamsCToCpp::CefContextMenuParamsCToCpp() { -} - -template<> cef_context_menu_params_t* CefCToCpp::UnwrapDerived( - CefWrapperType type, CefContextMenuParams* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = - WT_CONTEXT_MENU_PARAMS; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/context_menu_params_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/context_menu_params_ctocpp.h deleted file mode 100644 index 24e8b8fa..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/context_menu_params_ctocpp.h +++ /dev/null @@ -1,58 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_CONTEXT_MENU_PARAMS_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_CONTEXT_MENU_PARAMS_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include -#include "include/cef_context_menu_handler.h" -#include "include/capi/cef_context_menu_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefContextMenuParamsCToCpp - : public CefCToCpp { - public: - CefContextMenuParamsCToCpp(); - - // CefContextMenuParams methods. - int GetXCoord() OVERRIDE; - int GetYCoord() OVERRIDE; - TypeFlags GetTypeFlags() OVERRIDE; - CefString GetLinkUrl() OVERRIDE; - CefString GetUnfilteredLinkUrl() OVERRIDE; - CefString GetSourceUrl() OVERRIDE; - bool HasImageContents() OVERRIDE; - CefString GetPageUrl() OVERRIDE; - CefString GetFrameUrl() OVERRIDE; - CefString GetFrameCharset() OVERRIDE; - MediaType GetMediaType() OVERRIDE; - MediaStateFlags GetMediaStateFlags() OVERRIDE; - CefString GetSelectionText() OVERRIDE; - CefString GetMisspelledWord() OVERRIDE; - bool GetDictionarySuggestions(std::vector& suggestions) OVERRIDE; - bool IsEditable() OVERRIDE; - bool IsSpellCheckEnabled() OVERRIDE; - EditStateFlags GetEditStateFlags() OVERRIDE; - bool IsCustomMenu() OVERRIDE; - bool IsPepperMenu() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_CONTEXT_MENU_PARAMS_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/cookie_manager_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/cookie_manager_ctocpp.cc deleted file mode 100644 index f3f8130b..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/cookie_manager_ctocpp.cc +++ /dev/null @@ -1,234 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/completion_callback_cpptoc.h" -#include "libcef_dll/cpptoc/cookie_visitor_cpptoc.h" -#include "libcef_dll/cpptoc/delete_cookies_callback_cpptoc.h" -#include "libcef_dll/cpptoc/set_cookie_callback_cpptoc.h" -#include "libcef_dll/ctocpp/cookie_manager_ctocpp.h" -#include "libcef_dll/transfer_util.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefCookieManager::GetGlobalManager( - CefRefPtr callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: callback - - // Execute - cef_cookie_manager_t* _retval = cef_cookie_manager_get_global_manager( - CefCompletionCallbackCppToC::Wrap(callback)); - - // Return type: refptr_same - return CefCookieManagerCToCpp::Wrap(_retval); -} - -CefRefPtr CefCookieManager::CreateManager( - const CefString& path, bool persist_session_cookies, - CefRefPtr callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: path, callback - - // Execute - cef_cookie_manager_t* _retval = cef_cookie_manager_create_manager( - path.GetStruct(), - persist_session_cookies, - CefCompletionCallbackCppToC::Wrap(callback)); - - // Return type: refptr_same - return CefCookieManagerCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefCookieManagerCToCpp::SetSupportedSchemes( - const std::vector& schemes, - CefRefPtr callback) { - cef_cookie_manager_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_supported_schemes)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: callback - - // Translate param: schemes; type: string_vec_byref_const - cef_string_list_t schemesList = cef_string_list_alloc(); - DCHECK(schemesList); - if (schemesList) - transfer_string_list_contents(schemes, schemesList); - - // Execute - _struct->set_supported_schemes(_struct, - schemesList, - CefCompletionCallbackCppToC::Wrap(callback)); - - // Restore param:schemes; type: string_vec_byref_const - if (schemesList) - cef_string_list_free(schemesList); -} - -bool CefCookieManagerCToCpp::VisitAllCookies( - CefRefPtr visitor) { - cef_cookie_manager_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, visit_all_cookies)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: visitor; type: refptr_diff - DCHECK(visitor.get()); - if (!visitor.get()) - return false; - - // Execute - int _retval = _struct->visit_all_cookies(_struct, - CefCookieVisitorCppToC::Wrap(visitor)); - - // Return type: bool - return _retval?true:false; -} - -bool CefCookieManagerCToCpp::VisitUrlCookies(const CefString& url, - bool includeHttpOnly, CefRefPtr visitor) { - cef_cookie_manager_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, visit_url_cookies)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: url; type: string_byref_const - DCHECK(!url.empty()); - if (url.empty()) - return false; - // Verify param: visitor; type: refptr_diff - DCHECK(visitor.get()); - if (!visitor.get()) - return false; - - // Execute - int _retval = _struct->visit_url_cookies(_struct, - url.GetStruct(), - includeHttpOnly, - CefCookieVisitorCppToC::Wrap(visitor)); - - // Return type: bool - return _retval?true:false; -} - -bool CefCookieManagerCToCpp::SetCookie(const CefString& url, - const CefCookie& cookie, CefRefPtr callback) { - cef_cookie_manager_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_cookie)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: url; type: string_byref_const - DCHECK(!url.empty()); - if (url.empty()) - return false; - // Unverified params: callback - - // Execute - int _retval = _struct->set_cookie(_struct, - url.GetStruct(), - &cookie, - CefSetCookieCallbackCppToC::Wrap(callback)); - - // Return type: bool - return _retval?true:false; -} - -bool CefCookieManagerCToCpp::DeleteCookies(const CefString& url, - const CefString& cookie_name, - CefRefPtr callback) { - cef_cookie_manager_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, delete_cookies)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: url, cookie_name, callback - - // Execute - int _retval = _struct->delete_cookies(_struct, - url.GetStruct(), - cookie_name.GetStruct(), - CefDeleteCookiesCallbackCppToC::Wrap(callback)); - - // Return type: bool - return _retval?true:false; -} - -bool CefCookieManagerCToCpp::SetStoragePath(const CefString& path, - bool persist_session_cookies, CefRefPtr callback) { - cef_cookie_manager_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_storage_path)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: path, callback - - // Execute - int _retval = _struct->set_storage_path(_struct, - path.GetStruct(), - persist_session_cookies, - CefCompletionCallbackCppToC::Wrap(callback)); - - // Return type: bool - return _retval?true:false; -} - -bool CefCookieManagerCToCpp::FlushStore( - CefRefPtr callback) { - cef_cookie_manager_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, flush_store)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: callback - - // Execute - int _retval = _struct->flush_store(_struct, - CefCompletionCallbackCppToC::Wrap(callback)); - - // Return type: bool - return _retval?true:false; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefCookieManagerCToCpp::CefCookieManagerCToCpp() { -} - -template<> cef_cookie_manager_t* CefCToCpp::UnwrapDerived(CefWrapperType type, - CefCookieManager* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_COOKIE_MANAGER; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/cookie_manager_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/cookie_manager_ctocpp.h deleted file mode 100644 index 6316282d..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/cookie_manager_ctocpp.h +++ /dev/null @@ -1,50 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_COOKIE_MANAGER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_COOKIE_MANAGER_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include -#include "include/cef_cookie.h" -#include "include/capi/cef_cookie_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefCookieManagerCToCpp - : public CefCToCpp { - public: - CefCookieManagerCToCpp(); - - // CefCookieManager methods. - void SetSupportedSchemes(const std::vector& schemes, - CefRefPtr callback) OVERRIDE; - bool VisitAllCookies(CefRefPtr visitor) OVERRIDE; - bool VisitUrlCookies(const CefString& url, bool includeHttpOnly, - CefRefPtr visitor) OVERRIDE; - bool SetCookie(const CefString& url, const CefCookie& cookie, - CefRefPtr callback) OVERRIDE; - bool DeleteCookies(const CefString& url, const CefString& cookie_name, - CefRefPtr callback) OVERRIDE; - bool SetStoragePath(const CefString& path, bool persist_session_cookies, - CefRefPtr callback) OVERRIDE; - bool FlushStore(CefRefPtr callback) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_COOKIE_MANAGER_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/ctocpp.h deleted file mode 100644 index f28f438d..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/ctocpp.h +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) 2009 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. - -#ifndef CEF_LIBCEF_DLL_CTOCPP_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_CTOCPP_H_ -#pragma once - -#include "include/base/cef_logging.h" -#include "include/base/cef_macros.h" -#include "include/cef_base.h" -#include "include/capi/cef_base_capi.h" -#include "libcef_dll/wrapper_types.h" - -// Wrap a C structure with a C++ class. This is used when the implementation -// exists on the other side of the DLL boundary but will have methods called on -// this side of the DLL boundary. -template -class CefCToCpp : public BaseName { - public: - // Create a new wrapper instance for a structure reference received from the - // other side. - static CefRefPtr Wrap(StructName* s); - - // Retrieve the underlying structure reference from a wrapper instance for - // return back to the other side. - static StructName* Unwrap(CefRefPtr c); - - // If returning the structure across the DLL boundary you should call - // UnderlyingAddRef() on this wrapping CefCToCpp object. On the other side of - // the DLL boundary, call Release() on the CefCppToC object. - StructName* GetStruct() const { - WrapperStruct* wrapperStruct = GetWrapperStruct(this); - // Verify that the wrapper offset was calculated correctly. - DCHECK_EQ(kWrapperType, wrapperStruct->type_); - return wrapperStruct->struct_; - } - - // CefBase methods increment/decrement reference counts on both this object - // and the underlying wrapped structure. - void AddRef() const { - UnderlyingAddRef(); - ref_count_.AddRef(); - } - bool Release() const; - bool HasOneRef() const { return UnderlyingHasOneRef(); } - -#ifndef NDEBUG - // Simple tracking of allocated objects. - static base::AtomicRefCount DebugObjCt; // NOLINT(runtime/int) -#endif - - protected: - CefCToCpp() { -#ifndef NDEBUG - base::AtomicRefCountInc(&DebugObjCt); -#endif - } - - virtual ~CefCToCpp() { -#ifndef NDEBUG - base::AtomicRefCountDec(&DebugObjCt); -#endif - } - - private: - // Used to associate this wrapper object and the structure reference received - // from the other side. - struct WrapperStruct; - - static WrapperStruct* GetWrapperStruct(const BaseName* obj); - - // Unwrap as the derived type. - static StructName* UnwrapDerived(CefWrapperType type, BaseName* c); - - // Increment/decrement reference counts on only the underlying class. - void UnderlyingAddRef() const { - cef_base_t* base = reinterpret_cast(GetStruct()); - if (base->add_ref) - base->add_ref(base); - } - - bool UnderlyingRelease() const { - cef_base_t* base = reinterpret_cast(GetStruct()); - if (!base->release) - return false; - return base->release(base) ? true : false; - } - - bool UnderlyingHasOneRef() const { - cef_base_t* base = reinterpret_cast(GetStruct()); - if (!base->has_one_ref) - return false; - return base->has_one_ref(base) ? true : false; - } - - CefRefCount ref_count_; - - static CefWrapperType kWrapperType; - - DISALLOW_COPY_AND_ASSIGN(CefCToCpp); -}; - -template -struct CefCToCpp::WrapperStruct { - CefWrapperType type_; - StructName* struct_; - ClassName wrapper_; -}; - -template -CefRefPtr - CefCToCpp::Wrap(StructName* s) { - if (!s) - return NULL; - - // Wrap their structure with the CefCToCpp object. - WrapperStruct* wrapperStruct = new WrapperStruct; - wrapperStruct->type_ = kWrapperType; - wrapperStruct->struct_ = s; - - // Put the wrapper object in a smart pointer. - CefRefPtr wrapperPtr(&wrapperStruct->wrapper_); - // Release the reference that was added to the CefCppToC wrapper object on - // the other side before their structure was passed to us. - wrapperStruct->wrapper_.UnderlyingRelease(); - // Return the smart pointer. - return wrapperPtr; -} - -template -StructName* - CefCToCpp::Unwrap(CefRefPtr c) { - if (!c.get()) - return NULL; - - WrapperStruct* wrapperStruct = GetWrapperStruct(c.get()); - - // If the type does not match this object then we need to unwrap as the - // derived type. - if (wrapperStruct->type_ != kWrapperType) - return UnwrapDerived(wrapperStruct->type_, c.get()); - - // Add a reference to the CefCppToC wrapper object on the other side that - // will be released once the structure is received. - wrapperStruct->wrapper_.UnderlyingAddRef(); - // Return their original structure. - return wrapperStruct->struct_; -} - -template -bool CefCToCpp::Release() const { - UnderlyingRelease(); - if (ref_count_.Release()) { - WrapperStruct* wrapperStruct = GetWrapperStruct(this); - // Verify that the wrapper offset was calculated correctly. - DCHECK_EQ(kWrapperType, wrapperStruct->type_); - delete wrapperStruct; - return true; - } - return false; -} - -template -typename CefCToCpp::WrapperStruct* - CefCToCpp::GetWrapperStruct( - const BaseName* obj) { - // Offset using the WrapperStruct size instead of individual member sizes to - // avoid problems due to platform/compiler differences in structure padding. - return reinterpret_cast( - reinterpret_cast(const_cast(obj)) - - (sizeof(WrapperStruct) - sizeof(ClassName))); -} - -#endif // CEF_LIBCEF_DLL_CTOCPP_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/dictionary_value_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/dictionary_value_ctocpp.cc deleted file mode 100644 index 0702830b..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/dictionary_value_ctocpp.cc +++ /dev/null @@ -1,644 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/binary_value_ctocpp.h" -#include "libcef_dll/ctocpp/dictionary_value_ctocpp.h" -#include "libcef_dll/ctocpp/list_value_ctocpp.h" -#include "libcef_dll/ctocpp/value_ctocpp.h" -#include "libcef_dll/transfer_util.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefDictionaryValue::Create() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_dictionary_value_t* _retval = cef_dictionary_value_create(); - - // Return type: refptr_same - return CefDictionaryValueCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefDictionaryValueCToCpp::IsValid() { - cef_dictionary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_valid)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_valid(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefDictionaryValueCToCpp::IsOwned() { - cef_dictionary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_owned)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_owned(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefDictionaryValueCToCpp::IsReadOnly() { - cef_dictionary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_read_only)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_read_only(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefDictionaryValueCToCpp::IsSame(CefRefPtr that) { - cef_dictionary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_same)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: that; type: refptr_same - DCHECK(that.get()); - if (!that.get()) - return false; - - // Execute - int _retval = _struct->is_same(_struct, - CefDictionaryValueCToCpp::Unwrap(that)); - - // Return type: bool - return _retval?true:false; -} - -bool CefDictionaryValueCToCpp::IsEqual(CefRefPtr that) { - cef_dictionary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_equal)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: that; type: refptr_same - DCHECK(that.get()); - if (!that.get()) - return false; - - // Execute - int _retval = _struct->is_equal(_struct, - CefDictionaryValueCToCpp::Unwrap(that)); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefDictionaryValueCToCpp::Copy( - bool exclude_empty_children) { - cef_dictionary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, copy)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_dictionary_value_t* _retval = _struct->copy(_struct, - exclude_empty_children); - - // Return type: refptr_same - return CefDictionaryValueCToCpp::Wrap(_retval); -} - -size_t CefDictionaryValueCToCpp::GetSize() { - cef_dictionary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_size)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - size_t _retval = _struct->get_size(_struct); - - // Return type: simple - return _retval; -} - -bool CefDictionaryValueCToCpp::Clear() { - cef_dictionary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, clear)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->clear(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefDictionaryValueCToCpp::HasKey(const CefString& key) { - cef_dictionary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, has_key)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return false; - - // Execute - int _retval = _struct->has_key(_struct, - key.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefDictionaryValueCToCpp::GetKeys(KeyList& keys) { - cef_dictionary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_keys)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: keys; type: string_vec_byref - cef_string_list_t keysList = cef_string_list_alloc(); - DCHECK(keysList); - if (keysList) - transfer_string_list_contents(keys, keysList); - - // Execute - int _retval = _struct->get_keys(_struct, - keysList); - - // Restore param:keys; type: string_vec_byref - if (keysList) { - keys.clear(); - transfer_string_list_contents(keysList, keys); - cef_string_list_free(keysList); - } - - // Return type: bool - return _retval?true:false; -} - -bool CefDictionaryValueCToCpp::Remove(const CefString& key) { - cef_dictionary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, remove)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return false; - - // Execute - int _retval = _struct->remove(_struct, - key.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -CefValueType CefDictionaryValueCToCpp::GetType(const CefString& key) { - cef_dictionary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_type)) - return VTYPE_INVALID; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return VTYPE_INVALID; - - // Execute - cef_value_type_t _retval = _struct->get_type(_struct, - key.GetStruct()); - - // Return type: simple - return _retval; -} - -CefRefPtr CefDictionaryValueCToCpp::GetValue(const CefString& key) { - cef_dictionary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_value)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return NULL; - - // Execute - cef_value_t* _retval = _struct->get_value(_struct, - key.GetStruct()); - - // Return type: refptr_same - return CefValueCToCpp::Wrap(_retval); -} - -bool CefDictionaryValueCToCpp::GetBool(const CefString& key) { - cef_dictionary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_bool)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return false; - - // Execute - int _retval = _struct->get_bool(_struct, - key.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -int CefDictionaryValueCToCpp::GetInt(const CefString& key) { - cef_dictionary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_int)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return 0; - - // Execute - int _retval = _struct->get_int(_struct, - key.GetStruct()); - - // Return type: simple - return _retval; -} - -double CefDictionaryValueCToCpp::GetDouble(const CefString& key) { - cef_dictionary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_double)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return 0; - - // Execute - double _retval = _struct->get_double(_struct, - key.GetStruct()); - - // Return type: simple - return _retval; -} - -CefString CefDictionaryValueCToCpp::GetString(const CefString& key) { - cef_dictionary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_string)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return CefString(); - - // Execute - cef_string_userfree_t _retval = _struct->get_string(_struct, - key.GetStruct()); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefRefPtr CefDictionaryValueCToCpp::GetBinary( - const CefString& key) { - cef_dictionary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_binary)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return NULL; - - // Execute - cef_binary_value_t* _retval = _struct->get_binary(_struct, - key.GetStruct()); - - // Return type: refptr_same - return CefBinaryValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefDictionaryValueCToCpp::GetDictionary( - const CefString& key) { - cef_dictionary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_dictionary)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return NULL; - - // Execute - cef_dictionary_value_t* _retval = _struct->get_dictionary(_struct, - key.GetStruct()); - - // Return type: refptr_same - return CefDictionaryValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefDictionaryValueCToCpp::GetList( - const CefString& key) { - cef_dictionary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_list)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return NULL; - - // Execute - cef_list_value_t* _retval = _struct->get_list(_struct, - key.GetStruct()); - - // Return type: refptr_same - return CefListValueCToCpp::Wrap(_retval); -} - -bool CefDictionaryValueCToCpp::SetValue(const CefString& key, - CefRefPtr value) { - cef_dictionary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_value)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return false; - // Verify param: value; type: refptr_same - DCHECK(value.get()); - if (!value.get()) - return false; - - // Execute - int _retval = _struct->set_value(_struct, - key.GetStruct(), - CefValueCToCpp::Unwrap(value)); - - // Return type: bool - return _retval?true:false; -} - -bool CefDictionaryValueCToCpp::SetNull(const CefString& key) { - cef_dictionary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_null)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return false; - - // Execute - int _retval = _struct->set_null(_struct, - key.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefDictionaryValueCToCpp::SetBool(const CefString& key, bool value) { - cef_dictionary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_bool)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return false; - - // Execute - int _retval = _struct->set_bool(_struct, - key.GetStruct(), - value); - - // Return type: bool - return _retval?true:false; -} - -bool CefDictionaryValueCToCpp::SetInt(const CefString& key, int value) { - cef_dictionary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_int)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return false; - - // Execute - int _retval = _struct->set_int(_struct, - key.GetStruct(), - value); - - // Return type: bool - return _retval?true:false; -} - -bool CefDictionaryValueCToCpp::SetDouble(const CefString& key, double value) { - cef_dictionary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_double)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return false; - - // Execute - int _retval = _struct->set_double(_struct, - key.GetStruct(), - value); - - // Return type: bool - return _retval?true:false; -} - -bool CefDictionaryValueCToCpp::SetString(const CefString& key, - const CefString& value) { - cef_dictionary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_string)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return false; - // Unverified params: value - - // Execute - int _retval = _struct->set_string(_struct, - key.GetStruct(), - value.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefDictionaryValueCToCpp::SetBinary(const CefString& key, - CefRefPtr value) { - cef_dictionary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_binary)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return false; - // Verify param: value; type: refptr_same - DCHECK(value.get()); - if (!value.get()) - return false; - - // Execute - int _retval = _struct->set_binary(_struct, - key.GetStruct(), - CefBinaryValueCToCpp::Unwrap(value)); - - // Return type: bool - return _retval?true:false; -} - -bool CefDictionaryValueCToCpp::SetDictionary(const CefString& key, - CefRefPtr value) { - cef_dictionary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_dictionary)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return false; - // Verify param: value; type: refptr_same - DCHECK(value.get()); - if (!value.get()) - return false; - - // Execute - int _retval = _struct->set_dictionary(_struct, - key.GetStruct(), - CefDictionaryValueCToCpp::Unwrap(value)); - - // Return type: bool - return _retval?true:false; -} - -bool CefDictionaryValueCToCpp::SetList(const CefString& key, - CefRefPtr value) { - cef_dictionary_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_list)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return false; - // Verify param: value; type: refptr_same - DCHECK(value.get()); - if (!value.get()) - return false; - - // Execute - int _retval = _struct->set_list(_struct, - key.GetStruct(), - CefListValueCToCpp::Unwrap(value)); - - // Return type: bool - return _retval?true:false; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefDictionaryValueCToCpp::CefDictionaryValueCToCpp() { -} - -template<> cef_dictionary_value_t* CefCToCpp::UnwrapDerived( - CefWrapperType type, CefDictionaryValue* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = - WT_DICTIONARY_VALUE; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/dictionary_value_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/dictionary_value_ctocpp.h deleted file mode 100644 index 496610cd..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/dictionary_value_ctocpp.h +++ /dev/null @@ -1,68 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_DICTIONARY_VALUE_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_DICTIONARY_VALUE_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_values.h" -#include "include/capi/cef_values_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefDictionaryValueCToCpp - : public CefCToCpp { - public: - CefDictionaryValueCToCpp(); - - // CefDictionaryValue methods. - bool IsValid() OVERRIDE; - bool IsOwned() OVERRIDE; - bool IsReadOnly() OVERRIDE; - bool IsSame(CefRefPtr that) OVERRIDE; - bool IsEqual(CefRefPtr that) OVERRIDE; - CefRefPtr Copy(bool exclude_empty_children) OVERRIDE; - size_t GetSize() OVERRIDE; - bool Clear() OVERRIDE; - bool HasKey(const CefString& key) OVERRIDE; - bool GetKeys(KeyList& keys) OVERRIDE; - bool Remove(const CefString& key) OVERRIDE; - CefValueType GetType(const CefString& key) OVERRIDE; - CefRefPtr GetValue(const CefString& key) OVERRIDE; - bool GetBool(const CefString& key) OVERRIDE; - int GetInt(const CefString& key) OVERRIDE; - double GetDouble(const CefString& key) OVERRIDE; - CefString GetString(const CefString& key) OVERRIDE; - CefRefPtr GetBinary(const CefString& key) OVERRIDE; - CefRefPtr GetDictionary(const CefString& key) OVERRIDE; - CefRefPtr GetList(const CefString& key) OVERRIDE; - bool SetValue(const CefString& key, CefRefPtr value) OVERRIDE; - bool SetNull(const CefString& key) OVERRIDE; - bool SetBool(const CefString& key, bool value) OVERRIDE; - bool SetInt(const CefString& key, int value) OVERRIDE; - bool SetDouble(const CefString& key, double value) OVERRIDE; - bool SetString(const CefString& key, const CefString& value) OVERRIDE; - bool SetBinary(const CefString& key, - CefRefPtr value) OVERRIDE; - bool SetDictionary(const CefString& key, - CefRefPtr value) OVERRIDE; - bool SetList(const CefString& key, CefRefPtr value) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_DICTIONARY_VALUE_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/domdocument_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/domdocument_ctocpp.cc deleted file mode 100644 index 0e3e35c2..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/domdocument_ctocpp.cc +++ /dev/null @@ -1,257 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/domdocument_ctocpp.h" -#include "libcef_dll/ctocpp/domnode_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -CefDOMDocument::Type CefDOMDocumentCToCpp::GetType() { - cef_domdocument_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_type)) - return DOM_DOCUMENT_TYPE_UNKNOWN; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_dom_document_type_t _retval = _struct->get_type(_struct); - - // Return type: simple - return _retval; -} - -CefRefPtr CefDOMDocumentCToCpp::GetDocument() { - cef_domdocument_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_document)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_domnode_t* _retval = _struct->get_document(_struct); - - // Return type: refptr_same - return CefDOMNodeCToCpp::Wrap(_retval); -} - -CefRefPtr CefDOMDocumentCToCpp::GetBody() { - cef_domdocument_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_body)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_domnode_t* _retval = _struct->get_body(_struct); - - // Return type: refptr_same - return CefDOMNodeCToCpp::Wrap(_retval); -} - -CefRefPtr CefDOMDocumentCToCpp::GetHead() { - cef_domdocument_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_head)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_domnode_t* _retval = _struct->get_head(_struct); - - // Return type: refptr_same - return CefDOMNodeCToCpp::Wrap(_retval); -} - -CefString CefDOMDocumentCToCpp::GetTitle() { - cef_domdocument_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_title)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_title(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefRefPtr CefDOMDocumentCToCpp::GetElementById( - const CefString& id) { - cef_domdocument_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_element_by_id)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: id; type: string_byref_const - DCHECK(!id.empty()); - if (id.empty()) - return NULL; - - // Execute - cef_domnode_t* _retval = _struct->get_element_by_id(_struct, - id.GetStruct()); - - // Return type: refptr_same - return CefDOMNodeCToCpp::Wrap(_retval); -} - -CefRefPtr CefDOMDocumentCToCpp::GetFocusedNode() { - cef_domdocument_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_focused_node)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_domnode_t* _retval = _struct->get_focused_node(_struct); - - // Return type: refptr_same - return CefDOMNodeCToCpp::Wrap(_retval); -} - -bool CefDOMDocumentCToCpp::HasSelection() { - cef_domdocument_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, has_selection)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->has_selection(_struct); - - // Return type: bool - return _retval?true:false; -} - -int CefDOMDocumentCToCpp::GetSelectionStartOffset() { - cef_domdocument_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_selection_start_offset)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_selection_start_offset(_struct); - - // Return type: simple - return _retval; -} - -int CefDOMDocumentCToCpp::GetSelectionEndOffset() { - cef_domdocument_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_selection_end_offset)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_selection_end_offset(_struct); - - // Return type: simple - return _retval; -} - -CefString CefDOMDocumentCToCpp::GetSelectionAsMarkup() { - cef_domdocument_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_selection_as_markup)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_selection_as_markup(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefDOMDocumentCToCpp::GetSelectionAsText() { - cef_domdocument_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_selection_as_text)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_selection_as_text(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefDOMDocumentCToCpp::GetBaseURL() { - cef_domdocument_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_base_url)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_base_url(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefDOMDocumentCToCpp::GetCompleteURL(const CefString& partialURL) { - cef_domdocument_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_complete_url)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: partialURL; type: string_byref_const - DCHECK(!partialURL.empty()); - if (partialURL.empty()) - return CefString(); - - // Execute - cef_string_userfree_t _retval = _struct->get_complete_url(_struct, - partialURL.GetStruct()); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefDOMDocumentCToCpp::CefDOMDocumentCToCpp() { -} - -template<> cef_domdocument_t* CefCToCpp::UnwrapDerived(CefWrapperType type, - CefDOMDocument* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_DOMDOCUMENT; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/domdocument_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/domdocument_ctocpp.h deleted file mode 100644 index d05a2670..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/domdocument_ctocpp.h +++ /dev/null @@ -1,51 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_DOMDOCUMENT_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_DOMDOCUMENT_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_dom.h" -#include "include/capi/cef_dom_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefDOMDocumentCToCpp - : public CefCToCpp { - public: - CefDOMDocumentCToCpp(); - - // CefDOMDocument methods. - Type GetType() OVERRIDE; - CefRefPtr GetDocument() OVERRIDE; - CefRefPtr GetBody() OVERRIDE; - CefRefPtr GetHead() OVERRIDE; - CefString GetTitle() OVERRIDE; - CefRefPtr GetElementById(const CefString& id) OVERRIDE; - CefRefPtr GetFocusedNode() OVERRIDE; - bool HasSelection() OVERRIDE; - int GetSelectionStartOffset() OVERRIDE; - int GetSelectionEndOffset() OVERRIDE; - CefString GetSelectionAsMarkup() OVERRIDE; - CefString GetSelectionAsText() OVERRIDE; - CefString GetBaseURL() OVERRIDE; - CefString GetCompleteURL(const CefString& partialURL) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_DOMDOCUMENT_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/domnode_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/domnode_ctocpp.cc deleted file mode 100644 index c327d80c..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/domnode_ctocpp.cc +++ /dev/null @@ -1,450 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/domdocument_ctocpp.h" -#include "libcef_dll/ctocpp/domnode_ctocpp.h" -#include "libcef_dll/transfer_util.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -CefDOMNode::Type CefDOMNodeCToCpp::GetType() { - cef_domnode_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_type)) - return DOM_NODE_TYPE_UNSUPPORTED; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_dom_node_type_t _retval = _struct->get_type(_struct); - - // Return type: simple - return _retval; -} - -bool CefDOMNodeCToCpp::IsText() { - cef_domnode_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_text)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_text(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefDOMNodeCToCpp::IsElement() { - cef_domnode_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_element)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_element(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefDOMNodeCToCpp::IsEditable() { - cef_domnode_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_editable)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_editable(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefDOMNodeCToCpp::IsFormControlElement() { - cef_domnode_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_form_control_element)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_form_control_element(_struct); - - // Return type: bool - return _retval?true:false; -} - -CefString CefDOMNodeCToCpp::GetFormControlElementType() { - cef_domnode_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_form_control_element_type)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_form_control_element_type( - _struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -bool CefDOMNodeCToCpp::IsSame(CefRefPtr that) { - cef_domnode_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_same)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: that; type: refptr_same - DCHECK(that.get()); - if (!that.get()) - return false; - - // Execute - int _retval = _struct->is_same(_struct, - CefDOMNodeCToCpp::Unwrap(that)); - - // Return type: bool - return _retval?true:false; -} - -CefString CefDOMNodeCToCpp::GetName() { - cef_domnode_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_name(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefDOMNodeCToCpp::GetValue() { - cef_domnode_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_value)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_value(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -bool CefDOMNodeCToCpp::SetValue(const CefString& value) { - cef_domnode_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_value)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: value; type: string_byref_const - DCHECK(!value.empty()); - if (value.empty()) - return false; - - // Execute - int _retval = _struct->set_value(_struct, - value.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -CefString CefDOMNodeCToCpp::GetAsMarkup() { - cef_domnode_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_as_markup)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_as_markup(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefRefPtr CefDOMNodeCToCpp::GetDocument() { - cef_domnode_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_document)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_domdocument_t* _retval = _struct->get_document(_struct); - - // Return type: refptr_same - return CefDOMDocumentCToCpp::Wrap(_retval); -} - -CefRefPtr CefDOMNodeCToCpp::GetParent() { - cef_domnode_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_parent)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_domnode_t* _retval = _struct->get_parent(_struct); - - // Return type: refptr_same - return CefDOMNodeCToCpp::Wrap(_retval); -} - -CefRefPtr CefDOMNodeCToCpp::GetPreviousSibling() { - cef_domnode_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_previous_sibling)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_domnode_t* _retval = _struct->get_previous_sibling(_struct); - - // Return type: refptr_same - return CefDOMNodeCToCpp::Wrap(_retval); -} - -CefRefPtr CefDOMNodeCToCpp::GetNextSibling() { - cef_domnode_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_next_sibling)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_domnode_t* _retval = _struct->get_next_sibling(_struct); - - // Return type: refptr_same - return CefDOMNodeCToCpp::Wrap(_retval); -} - -bool CefDOMNodeCToCpp::HasChildren() { - cef_domnode_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, has_children)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->has_children(_struct); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefDOMNodeCToCpp::GetFirstChild() { - cef_domnode_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_first_child)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_domnode_t* _retval = _struct->get_first_child(_struct); - - // Return type: refptr_same - return CefDOMNodeCToCpp::Wrap(_retval); -} - -CefRefPtr CefDOMNodeCToCpp::GetLastChild() { - cef_domnode_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_last_child)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_domnode_t* _retval = _struct->get_last_child(_struct); - - // Return type: refptr_same - return CefDOMNodeCToCpp::Wrap(_retval); -} - -CefString CefDOMNodeCToCpp::GetElementTagName() { - cef_domnode_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_element_tag_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_element_tag_name(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -bool CefDOMNodeCToCpp::HasElementAttributes() { - cef_domnode_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, has_element_attributes)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->has_element_attributes(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefDOMNodeCToCpp::HasElementAttribute(const CefString& attrName) { - cef_domnode_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, has_element_attribute)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: attrName; type: string_byref_const - DCHECK(!attrName.empty()); - if (attrName.empty()) - return false; - - // Execute - int _retval = _struct->has_element_attribute(_struct, - attrName.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -CefString CefDOMNodeCToCpp::GetElementAttribute(const CefString& attrName) { - cef_domnode_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_element_attribute)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: attrName; type: string_byref_const - DCHECK(!attrName.empty()); - if (attrName.empty()) - return CefString(); - - // Execute - cef_string_userfree_t _retval = _struct->get_element_attribute(_struct, - attrName.GetStruct()); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -void CefDOMNodeCToCpp::GetElementAttributes(AttributeMap& attrMap) { - cef_domnode_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_element_attributes)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: attrMap; type: string_map_single_byref - cef_string_map_t attrMapMap = cef_string_map_alloc(); - DCHECK(attrMapMap); - if (attrMapMap) - transfer_string_map_contents(attrMap, attrMapMap); - - // Execute - _struct->get_element_attributes(_struct, - attrMapMap); - - // Restore param:attrMap; type: string_map_single_byref - if (attrMapMap) { - attrMap.clear(); - transfer_string_map_contents(attrMapMap, attrMap); - cef_string_map_free(attrMapMap); - } -} - -bool CefDOMNodeCToCpp::SetElementAttribute(const CefString& attrName, - const CefString& value) { - cef_domnode_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_element_attribute)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: attrName; type: string_byref_const - DCHECK(!attrName.empty()); - if (attrName.empty()) - return false; - // Verify param: value; type: string_byref_const - DCHECK(!value.empty()); - if (value.empty()) - return false; - - // Execute - int _retval = _struct->set_element_attribute(_struct, - attrName.GetStruct(), - value.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -CefString CefDOMNodeCToCpp::GetElementInnerText() { - cef_domnode_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_element_inner_text)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_element_inner_text(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefDOMNodeCToCpp::CefDOMNodeCToCpp() { -} - -template<> cef_domnode_t* CefCToCpp::UnwrapDerived(CefWrapperType type, CefDOMNode* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_DOMNODE; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/domnode_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/domnode_ctocpp.h deleted file mode 100644 index 6321c920..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/domnode_ctocpp.h +++ /dev/null @@ -1,62 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_DOMNODE_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_DOMNODE_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_dom.h" -#include "include/capi/cef_dom_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefDOMNodeCToCpp - : public CefCToCpp { - public: - CefDOMNodeCToCpp(); - - // CefDOMNode methods. - Type GetType() OVERRIDE; - bool IsText() OVERRIDE; - bool IsElement() OVERRIDE; - bool IsEditable() OVERRIDE; - bool IsFormControlElement() OVERRIDE; - CefString GetFormControlElementType() OVERRIDE; - bool IsSame(CefRefPtr that) OVERRIDE; - CefString GetName() OVERRIDE; - CefString GetValue() OVERRIDE; - bool SetValue(const CefString& value) OVERRIDE; - CefString GetAsMarkup() OVERRIDE; - CefRefPtr GetDocument() OVERRIDE; - CefRefPtr GetParent() OVERRIDE; - CefRefPtr GetPreviousSibling() OVERRIDE; - CefRefPtr GetNextSibling() OVERRIDE; - bool HasChildren() OVERRIDE; - CefRefPtr GetFirstChild() OVERRIDE; - CefRefPtr GetLastChild() OVERRIDE; - CefString GetElementTagName() OVERRIDE; - bool HasElementAttributes() OVERRIDE; - bool HasElementAttribute(const CefString& attrName) OVERRIDE; - CefString GetElementAttribute(const CefString& attrName) OVERRIDE; - void GetElementAttributes(AttributeMap& attrMap) OVERRIDE; - bool SetElementAttribute(const CefString& attrName, - const CefString& value) OVERRIDE; - CefString GetElementInnerText() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_DOMNODE_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/download_item_callback_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/download_item_callback_ctocpp.cc deleted file mode 100644 index 2f6e0669..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/download_item_callback_ctocpp.cc +++ /dev/null @@ -1,71 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/download_item_callback_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefDownloadItemCallbackCToCpp::Cancel() { - cef_download_item_callback_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, cancel)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->cancel(_struct); -} - -void CefDownloadItemCallbackCToCpp::Pause() { - cef_download_item_callback_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, pause)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->pause(_struct); -} - -void CefDownloadItemCallbackCToCpp::Resume() { - cef_download_item_callback_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, resume)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->resume(_struct); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefDownloadItemCallbackCToCpp::CefDownloadItemCallbackCToCpp() { -} - -template<> cef_download_item_callback_t* CefCToCpp::UnwrapDerived( - CefWrapperType type, CefDownloadItemCallback* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = - WT_DOWNLOAD_ITEM_CALLBACK; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/download_item_callback_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/download_item_callback_ctocpp.h deleted file mode 100644 index 9d5301a7..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/download_item_callback_ctocpp.h +++ /dev/null @@ -1,40 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CALLBACK_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CALLBACK_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_download_handler.h" -#include "include/capi/cef_download_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefDownloadItemCallbackCToCpp - : public CefCToCpp { - public: - CefDownloadItemCallbackCToCpp(); - - // CefDownloadItemCallback methods. - void Cancel() OVERRIDE; - void Pause() OVERRIDE; - void Resume() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CALLBACK_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/download_item_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/download_item_ctocpp.cc deleted file mode 100644 index 65f5ffa8..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/download_item_ctocpp.cc +++ /dev/null @@ -1,287 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/download_item_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefDownloadItemCToCpp::IsValid() { - cef_download_item_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_valid)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_valid(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefDownloadItemCToCpp::IsInProgress() { - cef_download_item_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_in_progress)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_in_progress(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefDownloadItemCToCpp::IsComplete() { - cef_download_item_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_complete)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_complete(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefDownloadItemCToCpp::IsCanceled() { - cef_download_item_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_canceled)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_canceled(_struct); - - // Return type: bool - return _retval?true:false; -} - -int64 CefDownloadItemCToCpp::GetCurrentSpeed() { - cef_download_item_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_current_speed)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int64 _retval = _struct->get_current_speed(_struct); - - // Return type: simple - return _retval; -} - -int CefDownloadItemCToCpp::GetPercentComplete() { - cef_download_item_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_percent_complete)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_percent_complete(_struct); - - // Return type: simple - return _retval; -} - -int64 CefDownloadItemCToCpp::GetTotalBytes() { - cef_download_item_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_total_bytes)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int64 _retval = _struct->get_total_bytes(_struct); - - // Return type: simple - return _retval; -} - -int64 CefDownloadItemCToCpp::GetReceivedBytes() { - cef_download_item_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_received_bytes)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int64 _retval = _struct->get_received_bytes(_struct); - - // Return type: simple - return _retval; -} - -CefTime CefDownloadItemCToCpp::GetStartTime() { - cef_download_item_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_start_time)) - return CefTime(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_time_t _retval = _struct->get_start_time(_struct); - - // Return type: simple - return _retval; -} - -CefTime CefDownloadItemCToCpp::GetEndTime() { - cef_download_item_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_end_time)) - return CefTime(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_time_t _retval = _struct->get_end_time(_struct); - - // Return type: simple - return _retval; -} - -CefString CefDownloadItemCToCpp::GetFullPath() { - cef_download_item_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_full_path)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_full_path(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -uint32 CefDownloadItemCToCpp::GetId() { - cef_download_item_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_id)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - uint32 _retval = _struct->get_id(_struct); - - // Return type: simple - return _retval; -} - -CefString CefDownloadItemCToCpp::GetURL() { - cef_download_item_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_url)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_url(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefDownloadItemCToCpp::GetOriginalUrl() { - cef_download_item_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_original_url)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_original_url(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefDownloadItemCToCpp::GetSuggestedFileName() { - cef_download_item_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_suggested_file_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_suggested_file_name(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefDownloadItemCToCpp::GetContentDisposition() { - cef_download_item_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_content_disposition)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_content_disposition(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefDownloadItemCToCpp::GetMimeType() { - cef_download_item_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_mime_type)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_mime_type(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefDownloadItemCToCpp::CefDownloadItemCToCpp() { -} - -template<> cef_download_item_t* CefCToCpp::UnwrapDerived(CefWrapperType type, - CefDownloadItem* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_DOWNLOAD_ITEM; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/download_item_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/download_item_ctocpp.h deleted file mode 100644 index 616be105..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/download_item_ctocpp.h +++ /dev/null @@ -1,54 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_download_item.h" -#include "include/capi/cef_download_item_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefDownloadItemCToCpp - : public CefCToCpp { - public: - CefDownloadItemCToCpp(); - - // CefDownloadItem methods. - bool IsValid() OVERRIDE; - bool IsInProgress() OVERRIDE; - bool IsComplete() OVERRIDE; - bool IsCanceled() OVERRIDE; - int64 GetCurrentSpeed() OVERRIDE; - int GetPercentComplete() OVERRIDE; - int64 GetTotalBytes() OVERRIDE; - int64 GetReceivedBytes() OVERRIDE; - CefTime GetStartTime() OVERRIDE; - CefTime GetEndTime() OVERRIDE; - CefString GetFullPath() OVERRIDE; - uint32 GetId() OVERRIDE; - CefString GetURL() OVERRIDE; - CefString GetOriginalUrl() OVERRIDE; - CefString GetSuggestedFileName() OVERRIDE; - CefString GetContentDisposition() OVERRIDE; - CefString GetMimeType() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/drag_data_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/drag_data_ctocpp.cc deleted file mode 100644 index 08c3ef22..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/drag_data_ctocpp.cc +++ /dev/null @@ -1,393 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/drag_data_ctocpp.h" -#include "libcef_dll/ctocpp/stream_writer_ctocpp.h" -#include "libcef_dll/transfer_util.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefDragData::Create() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_drag_data_t* _retval = cef_drag_data_create(); - - // Return type: refptr_same - return CefDragDataCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -CefRefPtr CefDragDataCToCpp::Clone() { - cef_drag_data_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, clone)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_drag_data_t* _retval = _struct->clone(_struct); - - // Return type: refptr_same - return CefDragDataCToCpp::Wrap(_retval); -} - -bool CefDragDataCToCpp::IsReadOnly() { - cef_drag_data_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_read_only)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_read_only(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefDragDataCToCpp::IsLink() { - cef_drag_data_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_link)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_link(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefDragDataCToCpp::IsFragment() { - cef_drag_data_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_fragment)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_fragment(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefDragDataCToCpp::IsFile() { - cef_drag_data_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_file)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_file(_struct); - - // Return type: bool - return _retval?true:false; -} - -CefString CefDragDataCToCpp::GetLinkURL() { - cef_drag_data_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_link_url)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_link_url(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefDragDataCToCpp::GetLinkTitle() { - cef_drag_data_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_link_title)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_link_title(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefDragDataCToCpp::GetLinkMetadata() { - cef_drag_data_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_link_metadata)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_link_metadata(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefDragDataCToCpp::GetFragmentText() { - cef_drag_data_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_fragment_text)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_fragment_text(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefDragDataCToCpp::GetFragmentHtml() { - cef_drag_data_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_fragment_html)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_fragment_html(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefDragDataCToCpp::GetFragmentBaseURL() { - cef_drag_data_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_fragment_base_url)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_fragment_base_url(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefDragDataCToCpp::GetFileName() { - cef_drag_data_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_file_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_file_name(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -size_t CefDragDataCToCpp::GetFileContents(CefRefPtr writer) { - cef_drag_data_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_file_contents)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: writer - - // Execute - size_t _retval = _struct->get_file_contents(_struct, - CefStreamWriterCToCpp::Unwrap(writer)); - - // Return type: simple - return _retval; -} - -bool CefDragDataCToCpp::GetFileNames(std::vector& names) { - cef_drag_data_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_file_names)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: names; type: string_vec_byref - cef_string_list_t namesList = cef_string_list_alloc(); - DCHECK(namesList); - if (namesList) - transfer_string_list_contents(names, namesList); - - // Execute - int _retval = _struct->get_file_names(_struct, - namesList); - - // Restore param:names; type: string_vec_byref - if (namesList) { - names.clear(); - transfer_string_list_contents(namesList, names); - cef_string_list_free(namesList); - } - - // Return type: bool - return _retval?true:false; -} - -void CefDragDataCToCpp::SetLinkURL(const CefString& url) { - cef_drag_data_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_link_url)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: url - - // Execute - _struct->set_link_url(_struct, - url.GetStruct()); -} - -void CefDragDataCToCpp::SetLinkTitle(const CefString& title) { - cef_drag_data_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_link_title)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: title - - // Execute - _struct->set_link_title(_struct, - title.GetStruct()); -} - -void CefDragDataCToCpp::SetLinkMetadata(const CefString& data) { - cef_drag_data_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_link_metadata)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: data - - // Execute - _struct->set_link_metadata(_struct, - data.GetStruct()); -} - -void CefDragDataCToCpp::SetFragmentText(const CefString& text) { - cef_drag_data_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_fragment_text)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: text - - // Execute - _struct->set_fragment_text(_struct, - text.GetStruct()); -} - -void CefDragDataCToCpp::SetFragmentHtml(const CefString& html) { - cef_drag_data_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_fragment_html)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: html - - // Execute - _struct->set_fragment_html(_struct, - html.GetStruct()); -} - -void CefDragDataCToCpp::SetFragmentBaseURL(const CefString& base_url) { - cef_drag_data_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_fragment_base_url)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: base_url - - // Execute - _struct->set_fragment_base_url(_struct, - base_url.GetStruct()); -} - -void CefDragDataCToCpp::ResetFileContents() { - cef_drag_data_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, reset_file_contents)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->reset_file_contents(_struct); -} - -void CefDragDataCToCpp::AddFile(const CefString& path, - const CefString& display_name) { - cef_drag_data_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, add_file)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: path; type: string_byref_const - DCHECK(!path.empty()); - if (path.empty()) - return; - // Unverified params: display_name - - // Execute - _struct->add_file(_struct, - path.GetStruct(), - display_name.GetStruct()); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefDragDataCToCpp::CefDragDataCToCpp() { -} - -template<> cef_drag_data_t* CefCToCpp::UnwrapDerived(CefWrapperType type, CefDragData* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_DRAG_DATA; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/drag_data_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/drag_data_ctocpp.h deleted file mode 100644 index 225f57a1..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/drag_data_ctocpp.h +++ /dev/null @@ -1,59 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_DRAG_DATA_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_DRAG_DATA_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include -#include "include/cef_drag_data.h" -#include "include/capi/cef_drag_data_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefDragDataCToCpp - : public CefCToCpp { - public: - CefDragDataCToCpp(); - - // CefDragData methods. - CefRefPtr Clone() OVERRIDE; - bool IsReadOnly() OVERRIDE; - bool IsLink() OVERRIDE; - bool IsFragment() OVERRIDE; - bool IsFile() OVERRIDE; - CefString GetLinkURL() OVERRIDE; - CefString GetLinkTitle() OVERRIDE; - CefString GetLinkMetadata() OVERRIDE; - CefString GetFragmentText() OVERRIDE; - CefString GetFragmentHtml() OVERRIDE; - CefString GetFragmentBaseURL() OVERRIDE; - CefString GetFileName() OVERRIDE; - size_t GetFileContents(CefRefPtr writer) OVERRIDE; - bool GetFileNames(std::vector& names) OVERRIDE; - void SetLinkURL(const CefString& url) OVERRIDE; - void SetLinkTitle(const CefString& title) OVERRIDE; - void SetLinkMetadata(const CefString& data) OVERRIDE; - void SetFragmentText(const CefString& text) OVERRIDE; - void SetFragmentHtml(const CefString& html) OVERRIDE; - void SetFragmentBaseURL(const CefString& base_url) OVERRIDE; - void ResetFileContents() OVERRIDE; - void AddFile(const CefString& path, const CefString& display_name) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_DRAG_DATA_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/file_dialog_callback_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/file_dialog_callback_ctocpp.cc deleted file mode 100644 index cecebb21..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/file_dialog_callback_ctocpp.cc +++ /dev/null @@ -1,80 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/file_dialog_callback_ctocpp.h" -#include "libcef_dll/transfer_util.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefFileDialogCallbackCToCpp::Continue(int selected_accept_filter, - const std::vector& file_paths) { - cef_file_dialog_callback_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, cont)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: selected_accept_filter; type: simple_byval - DCHECK_GE(selected_accept_filter, 0); - if (selected_accept_filter < 0) - return; - // Unverified params: file_paths - - // Translate param: file_paths; type: string_vec_byref_const - cef_string_list_t file_pathsList = cef_string_list_alloc(); - DCHECK(file_pathsList); - if (file_pathsList) - transfer_string_list_contents(file_paths, file_pathsList); - - // Execute - _struct->cont(_struct, - selected_accept_filter, - file_pathsList); - - // Restore param:file_paths; type: string_vec_byref_const - if (file_pathsList) - cef_string_list_free(file_pathsList); -} - -void CefFileDialogCallbackCToCpp::Cancel() { - cef_file_dialog_callback_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, cancel)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->cancel(_struct); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefFileDialogCallbackCToCpp::CefFileDialogCallbackCToCpp() { -} - -template<> cef_file_dialog_callback_t* CefCToCpp::UnwrapDerived( - CefWrapperType type, CefFileDialogCallback* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = - WT_FILE_DIALOG_CALLBACK; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/file_dialog_callback_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/file_dialog_callback_ctocpp.h deleted file mode 100644 index bb98f15e..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/file_dialog_callback_ctocpp.h +++ /dev/null @@ -1,41 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_FILE_DIALOG_CALLBACK_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_FILE_DIALOG_CALLBACK_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include -#include "include/cef_dialog_handler.h" -#include "include/capi/cef_dialog_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefFileDialogCallbackCToCpp - : public CefCToCpp { - public: - CefFileDialogCallbackCToCpp(); - - // CefFileDialogCallback methods. - void Continue(int selected_accept_filter, - const std::vector& file_paths) OVERRIDE; - void Cancel() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_FILE_DIALOG_CALLBACK_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/frame_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/frame_ctocpp.cc deleted file mode 100644 index 7024adb6..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/frame_ctocpp.cc +++ /dev/null @@ -1,388 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/domvisitor_cpptoc.h" -#include "libcef_dll/cpptoc/string_visitor_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/frame_ctocpp.h" -#include "libcef_dll/ctocpp/request_ctocpp.h" -#include "libcef_dll/ctocpp/v8context_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefFrameCToCpp::IsValid() { - cef_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_valid)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_valid(_struct); - - // Return type: bool - return _retval?true:false; -} - -void CefFrameCToCpp::Undo() { - cef_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, undo)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->undo(_struct); -} - -void CefFrameCToCpp::Redo() { - cef_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, redo)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->redo(_struct); -} - -void CefFrameCToCpp::Cut() { - cef_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, cut)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->cut(_struct); -} - -void CefFrameCToCpp::Copy() { - cef_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, copy)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->copy(_struct); -} - -void CefFrameCToCpp::Paste() { - cef_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, paste)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->paste(_struct); -} - -void CefFrameCToCpp::Delete() { - cef_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, del)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->del(_struct); -} - -void CefFrameCToCpp::SelectAll() { - cef_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, select_all)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->select_all(_struct); -} - -void CefFrameCToCpp::ViewSource() { - cef_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, view_source)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->view_source(_struct); -} - -void CefFrameCToCpp::GetSource(CefRefPtr visitor) { - cef_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_source)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: visitor; type: refptr_diff - DCHECK(visitor.get()); - if (!visitor.get()) - return; - - // Execute - _struct->get_source(_struct, - CefStringVisitorCppToC::Wrap(visitor)); -} - -void CefFrameCToCpp::GetText(CefRefPtr visitor) { - cef_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_text)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: visitor; type: refptr_diff - DCHECK(visitor.get()); - if (!visitor.get()) - return; - - // Execute - _struct->get_text(_struct, - CefStringVisitorCppToC::Wrap(visitor)); -} - -void CefFrameCToCpp::LoadRequest(CefRefPtr request) { - cef_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, load_request)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: request; type: refptr_same - DCHECK(request.get()); - if (!request.get()) - return; - - // Execute - _struct->load_request(_struct, - CefRequestCToCpp::Unwrap(request)); -} - -void CefFrameCToCpp::LoadURL(const CefString& url) { - cef_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, load_url)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: url; type: string_byref_const - DCHECK(!url.empty()); - if (url.empty()) - return; - - // Execute - _struct->load_url(_struct, - url.GetStruct()); -} - -void CefFrameCToCpp::LoadString(const CefString& string_val, - const CefString& url) { - cef_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, load_string)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: string_val; type: string_byref_const - DCHECK(!string_val.empty()); - if (string_val.empty()) - return; - // Verify param: url; type: string_byref_const - DCHECK(!url.empty()); - if (url.empty()) - return; - - // Execute - _struct->load_string(_struct, - string_val.GetStruct(), - url.GetStruct()); -} - -void CefFrameCToCpp::ExecuteJavaScript(const CefString& code, - const CefString& script_url, int start_line) { - cef_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, execute_java_script)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: code; type: string_byref_const - DCHECK(!code.empty()); - if (code.empty()) - return; - // Unverified params: script_url - - // Execute - _struct->execute_java_script(_struct, - code.GetStruct(), - script_url.GetStruct(), - start_line); -} - -bool CefFrameCToCpp::IsMain() { - cef_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_main)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_main(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefFrameCToCpp::IsFocused() { - cef_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_focused)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_focused(_struct); - - // Return type: bool - return _retval?true:false; -} - -CefString CefFrameCToCpp::GetName() { - cef_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_name(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -int64 CefFrameCToCpp::GetIdentifier() { - cef_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_identifier)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int64 _retval = _struct->get_identifier(_struct); - - // Return type: simple - return _retval; -} - -CefRefPtr CefFrameCToCpp::GetParent() { - cef_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_parent)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_frame_t* _retval = _struct->get_parent(_struct); - - // Return type: refptr_same - return CefFrameCToCpp::Wrap(_retval); -} - -CefString CefFrameCToCpp::GetURL() { - cef_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_url)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_url(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefRefPtr CefFrameCToCpp::GetBrowser() { - cef_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_browser)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_browser_t* _retval = _struct->get_browser(_struct); - - // Return type: refptr_same - return CefBrowserCToCpp::Wrap(_retval); -} - -CefRefPtr CefFrameCToCpp::GetV8Context() { - cef_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_v8context)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8context_t* _retval = _struct->get_v8context(_struct); - - // Return type: refptr_same - return CefV8ContextCToCpp::Wrap(_retval); -} - -void CefFrameCToCpp::VisitDOM(CefRefPtr visitor) { - cef_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, visit_dom)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: visitor; type: refptr_diff - DCHECK(visitor.get()); - if (!visitor.get()) - return; - - // Execute - _struct->visit_dom(_struct, - CefDOMVisitorCppToC::Wrap(visitor)); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefFrameCToCpp::CefFrameCToCpp() { -} - -template<> cef_frame_t* CefCToCpp::UnwrapDerived(CefWrapperType type, CefFrame* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_FRAME; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/frame_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/frame_ctocpp.h deleted file mode 100644 index dde6c71d..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/frame_ctocpp.h +++ /dev/null @@ -1,65 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_FRAME_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_FRAME_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_frame.h" -#include "include/capi/cef_frame_capi.h" -#include "include/cef_browser.h" -#include "include/capi/cef_browser_capi.h" -#include "include/cef_v8.h" -#include "include/capi/cef_v8_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefFrameCToCpp - : public CefCToCpp { - public: - CefFrameCToCpp(); - - // CefFrame methods. - bool IsValid() OVERRIDE; - void Undo() OVERRIDE; - void Redo() OVERRIDE; - void Cut() OVERRIDE; - void Copy() OVERRIDE; - void Paste() OVERRIDE; - void Delete() OVERRIDE; - void SelectAll() OVERRIDE; - void ViewSource() OVERRIDE; - void GetSource(CefRefPtr visitor) OVERRIDE; - void GetText(CefRefPtr visitor) OVERRIDE; - void LoadRequest(CefRefPtr request) OVERRIDE; - void LoadURL(const CefString& url) OVERRIDE; - void LoadString(const CefString& string_val, const CefString& url) OVERRIDE; - void ExecuteJavaScript(const CefString& code, const CefString& script_url, - int start_line) OVERRIDE; - bool IsMain() OVERRIDE; - bool IsFocused() OVERRIDE; - CefString GetName() OVERRIDE; - int64 GetIdentifier() OVERRIDE; - CefRefPtr GetParent() OVERRIDE; - CefString GetURL() OVERRIDE; - CefRefPtr GetBrowser() OVERRIDE; - CefRefPtr GetV8Context() OVERRIDE; - void VisitDOM(CefRefPtr visitor) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_FRAME_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/geolocation_callback_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/geolocation_callback_ctocpp.cc deleted file mode 100644 index d9a0c39c..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/geolocation_callback_ctocpp.cc +++ /dev/null @@ -1,50 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/geolocation_callback_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefGeolocationCallbackCToCpp::Continue(bool allow) { - cef_geolocation_callback_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, cont)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->cont(_struct, - allow); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefGeolocationCallbackCToCpp::CefGeolocationCallbackCToCpp() { -} - -template<> cef_geolocation_callback_t* CefCToCpp::UnwrapDerived( - CefWrapperType type, CefGeolocationCallback* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = - WT_GEOLOCATION_CALLBACK; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/geolocation_callback_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/geolocation_callback_ctocpp.h deleted file mode 100644 index cdaa2a9a..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/geolocation_callback_ctocpp.h +++ /dev/null @@ -1,38 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_GEOLOCATION_CALLBACK_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_GEOLOCATION_CALLBACK_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_geolocation_handler.h" -#include "include/capi/cef_geolocation_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefGeolocationCallbackCToCpp - : public CefCToCpp { - public: - CefGeolocationCallbackCToCpp(); - - // CefGeolocationCallback methods. - void Continue(bool allow) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_GEOLOCATION_CALLBACK_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/jsdialog_callback_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/jsdialog_callback_ctocpp.cc deleted file mode 100644 index 14697b77..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/jsdialog_callback_ctocpp.cc +++ /dev/null @@ -1,54 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/jsdialog_callback_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefJSDialogCallbackCToCpp::Continue(bool success, - const CefString& user_input) { - cef_jsdialog_callback_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, cont)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: user_input - - // Execute - _struct->cont(_struct, - success, - user_input.GetStruct()); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefJSDialogCallbackCToCpp::CefJSDialogCallbackCToCpp() { -} - -template<> cef_jsdialog_callback_t* CefCToCpp::UnwrapDerived( - CefWrapperType type, CefJSDialogCallback* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = - WT_JSDIALOG_CALLBACK; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/jsdialog_callback_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/jsdialog_callback_ctocpp.h deleted file mode 100644 index 3acbf84a..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/jsdialog_callback_ctocpp.h +++ /dev/null @@ -1,38 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_JSDIALOG_CALLBACK_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_JSDIALOG_CALLBACK_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_jsdialog_handler.h" -#include "include/capi/cef_jsdialog_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefJSDialogCallbackCToCpp - : public CefCToCpp { - public: - CefJSDialogCallbackCToCpp(); - - // CefJSDialogCallback methods. - void Continue(bool success, const CefString& user_input) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_JSDIALOG_CALLBACK_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/list_value_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/list_value_ctocpp.cc deleted file mode 100644 index c60fe9e1..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/list_value_ctocpp.cc +++ /dev/null @@ -1,599 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/binary_value_ctocpp.h" -#include "libcef_dll/ctocpp/dictionary_value_ctocpp.h" -#include "libcef_dll/ctocpp/list_value_ctocpp.h" -#include "libcef_dll/ctocpp/value_ctocpp.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefListValue::Create() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_list_value_t* _retval = cef_list_value_create(); - - // Return type: refptr_same - return CefListValueCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefListValueCToCpp::IsValid() { - cef_list_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_valid)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_valid(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefListValueCToCpp::IsOwned() { - cef_list_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_owned)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_owned(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefListValueCToCpp::IsReadOnly() { - cef_list_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_read_only)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_read_only(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefListValueCToCpp::IsSame(CefRefPtr that) { - cef_list_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_same)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: that; type: refptr_same - DCHECK(that.get()); - if (!that.get()) - return false; - - // Execute - int _retval = _struct->is_same(_struct, - CefListValueCToCpp::Unwrap(that)); - - // Return type: bool - return _retval?true:false; -} - -bool CefListValueCToCpp::IsEqual(CefRefPtr that) { - cef_list_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_equal)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: that; type: refptr_same - DCHECK(that.get()); - if (!that.get()) - return false; - - // Execute - int _retval = _struct->is_equal(_struct, - CefListValueCToCpp::Unwrap(that)); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefListValueCToCpp::Copy() { - cef_list_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, copy)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_list_value_t* _retval = _struct->copy(_struct); - - // Return type: refptr_same - return CefListValueCToCpp::Wrap(_retval); -} - -bool CefListValueCToCpp::SetSize(size_t size) { - cef_list_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_size)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->set_size(_struct, - size); - - // Return type: bool - return _retval?true:false; -} - -size_t CefListValueCToCpp::GetSize() { - cef_list_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_size)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - size_t _retval = _struct->get_size(_struct); - - // Return type: simple - return _retval; -} - -bool CefListValueCToCpp::Clear() { - cef_list_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, clear)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->clear(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefListValueCToCpp::Remove(int index) { - cef_list_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, remove)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return false; - - // Execute - int _retval = _struct->remove(_struct, - index); - - // Return type: bool - return _retval?true:false; -} - -CefValueType CefListValueCToCpp::GetType(int index) { - cef_list_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_type)) - return VTYPE_INVALID; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return VTYPE_INVALID; - - // Execute - cef_value_type_t _retval = _struct->get_type(_struct, - index); - - // Return type: simple - return _retval; -} - -CefRefPtr CefListValueCToCpp::GetValue(int index) { - cef_list_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_value)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return NULL; - - // Execute - cef_value_t* _retval = _struct->get_value(_struct, - index); - - // Return type: refptr_same - return CefValueCToCpp::Wrap(_retval); -} - -bool CefListValueCToCpp::GetBool(int index) { - cef_list_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_bool)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return false; - - // Execute - int _retval = _struct->get_bool(_struct, - index); - - // Return type: bool - return _retval?true:false; -} - -int CefListValueCToCpp::GetInt(int index) { - cef_list_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_int)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return 0; - - // Execute - int _retval = _struct->get_int(_struct, - index); - - // Return type: simple - return _retval; -} - -double CefListValueCToCpp::GetDouble(int index) { - cef_list_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_double)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return 0; - - // Execute - double _retval = _struct->get_double(_struct, - index); - - // Return type: simple - return _retval; -} - -CefString CefListValueCToCpp::GetString(int index) { - cef_list_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_string)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return CefString(); - - // Execute - cef_string_userfree_t _retval = _struct->get_string(_struct, - index); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefRefPtr CefListValueCToCpp::GetBinary(int index) { - cef_list_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_binary)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return NULL; - - // Execute - cef_binary_value_t* _retval = _struct->get_binary(_struct, - index); - - // Return type: refptr_same - return CefBinaryValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefListValueCToCpp::GetDictionary(int index) { - cef_list_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_dictionary)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return NULL; - - // Execute - cef_dictionary_value_t* _retval = _struct->get_dictionary(_struct, - index); - - // Return type: refptr_same - return CefDictionaryValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefListValueCToCpp::GetList(int index) { - cef_list_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_list)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return NULL; - - // Execute - cef_list_value_t* _retval = _struct->get_list(_struct, - index); - - // Return type: refptr_same - return CefListValueCToCpp::Wrap(_retval); -} - -bool CefListValueCToCpp::SetValue(int index, CefRefPtr value) { - cef_list_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_value)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return false; - // Verify param: value; type: refptr_same - DCHECK(value.get()); - if (!value.get()) - return false; - - // Execute - int _retval = _struct->set_value(_struct, - index, - CefValueCToCpp::Unwrap(value)); - - // Return type: bool - return _retval?true:false; -} - -bool CefListValueCToCpp::SetNull(int index) { - cef_list_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_null)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return false; - - // Execute - int _retval = _struct->set_null(_struct, - index); - - // Return type: bool - return _retval?true:false; -} - -bool CefListValueCToCpp::SetBool(int index, bool value) { - cef_list_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_bool)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return false; - - // Execute - int _retval = _struct->set_bool(_struct, - index, - value); - - // Return type: bool - return _retval?true:false; -} - -bool CefListValueCToCpp::SetInt(int index, int value) { - cef_list_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_int)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return false; - - // Execute - int _retval = _struct->set_int(_struct, - index, - value); - - // Return type: bool - return _retval?true:false; -} - -bool CefListValueCToCpp::SetDouble(int index, double value) { - cef_list_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_double)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return false; - - // Execute - int _retval = _struct->set_double(_struct, - index, - value); - - // Return type: bool - return _retval?true:false; -} - -bool CefListValueCToCpp::SetString(int index, const CefString& value) { - cef_list_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_string)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return false; - // Unverified params: value - - // Execute - int _retval = _struct->set_string(_struct, - index, - value.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefListValueCToCpp::SetBinary(int index, CefRefPtr value) { - cef_list_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_binary)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return false; - // Verify param: value; type: refptr_same - DCHECK(value.get()); - if (!value.get()) - return false; - - // Execute - int _retval = _struct->set_binary(_struct, - index, - CefBinaryValueCToCpp::Unwrap(value)); - - // Return type: bool - return _retval?true:false; -} - -bool CefListValueCToCpp::SetDictionary(int index, - CefRefPtr value) { - cef_list_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_dictionary)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return false; - // Verify param: value; type: refptr_same - DCHECK(value.get()); - if (!value.get()) - return false; - - // Execute - int _retval = _struct->set_dictionary(_struct, - index, - CefDictionaryValueCToCpp::Unwrap(value)); - - // Return type: bool - return _retval?true:false; -} - -bool CefListValueCToCpp::SetList(int index, CefRefPtr value) { - cef_list_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_list)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return false; - // Verify param: value; type: refptr_same - DCHECK(value.get()); - if (!value.get()) - return false; - - // Execute - int _retval = _struct->set_list(_struct, - index, - CefListValueCToCpp::Unwrap(value)); - - // Return type: bool - return _retval?true:false; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefListValueCToCpp::CefListValueCToCpp() { -} - -template<> cef_list_value_t* CefCToCpp::UnwrapDerived(CefWrapperType type, CefListValue* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_LIST_VALUE; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/list_value_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/list_value_ctocpp.h deleted file mode 100644 index 91902148..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/list_value_ctocpp.h +++ /dev/null @@ -1,64 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_LIST_VALUE_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_LIST_VALUE_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_values.h" -#include "include/capi/cef_values_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefListValueCToCpp - : public CefCToCpp { - public: - CefListValueCToCpp(); - - // CefListValue methods. - bool IsValid() OVERRIDE; - bool IsOwned() OVERRIDE; - bool IsReadOnly() OVERRIDE; - bool IsSame(CefRefPtr that) OVERRIDE; - bool IsEqual(CefRefPtr that) OVERRIDE; - CefRefPtr Copy() OVERRIDE; - bool SetSize(size_t size) OVERRIDE; - size_t GetSize() OVERRIDE; - bool Clear() OVERRIDE; - bool Remove(int index) OVERRIDE; - CefValueType GetType(int index) OVERRIDE; - CefRefPtr GetValue(int index) OVERRIDE; - bool GetBool(int index) OVERRIDE; - int GetInt(int index) OVERRIDE; - double GetDouble(int index) OVERRIDE; - CefString GetString(int index) OVERRIDE; - CefRefPtr GetBinary(int index) OVERRIDE; - CefRefPtr GetDictionary(int index) OVERRIDE; - CefRefPtr GetList(int index) OVERRIDE; - bool SetValue(int index, CefRefPtr value) OVERRIDE; - bool SetNull(int index) OVERRIDE; - bool SetBool(int index, bool value) OVERRIDE; - bool SetInt(int index, int value) OVERRIDE; - bool SetDouble(int index, double value) OVERRIDE; - bool SetString(int index, const CefString& value) OVERRIDE; - bool SetBinary(int index, CefRefPtr value) OVERRIDE; - bool SetDictionary(int index, CefRefPtr value) OVERRIDE; - bool SetList(int index, CefRefPtr value) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_LIST_VALUE_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/menu_model_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/menu_model_ctocpp.cc deleted file mode 100644 index 24ac934c..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/menu_model_ctocpp.cc +++ /dev/null @@ -1,901 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/menu_model_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefMenuModelCToCpp::Clear() { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, clear)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->clear(_struct); - - // Return type: bool - return _retval?true:false; -} - -int CefMenuModelCToCpp::GetCount() { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_count)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_count(_struct); - - // Return type: simple - return _retval; -} - -bool CefMenuModelCToCpp::AddSeparator() { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, add_separator)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->add_separator(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::AddItem(int command_id, const CefString& label) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, add_item)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: label; type: string_byref_const - DCHECK(!label.empty()); - if (label.empty()) - return false; - - // Execute - int _retval = _struct->add_item(_struct, - command_id, - label.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::AddCheckItem(int command_id, const CefString& label) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, add_check_item)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: label; type: string_byref_const - DCHECK(!label.empty()); - if (label.empty()) - return false; - - // Execute - int _retval = _struct->add_check_item(_struct, - command_id, - label.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::AddRadioItem(int command_id, const CefString& label, - int group_id) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, add_radio_item)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: label; type: string_byref_const - DCHECK(!label.empty()); - if (label.empty()) - return false; - - // Execute - int _retval = _struct->add_radio_item(_struct, - command_id, - label.GetStruct(), - group_id); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefMenuModelCToCpp::AddSubMenu(int command_id, - const CefString& label) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, add_sub_menu)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: label; type: string_byref_const - DCHECK(!label.empty()); - if (label.empty()) - return NULL; - - // Execute - cef_menu_model_t* _retval = _struct->add_sub_menu(_struct, - command_id, - label.GetStruct()); - - // Return type: refptr_same - return CefMenuModelCToCpp::Wrap(_retval); -} - -bool CefMenuModelCToCpp::InsertSeparatorAt(int index) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, insert_separator_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->insert_separator_at(_struct, - index); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::InsertItemAt(int index, int command_id, - const CefString& label) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, insert_item_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: label; type: string_byref_const - DCHECK(!label.empty()); - if (label.empty()) - return false; - - // Execute - int _retval = _struct->insert_item_at(_struct, - index, - command_id, - label.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::InsertCheckItemAt(int index, int command_id, - const CefString& label) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, insert_check_item_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: label; type: string_byref_const - DCHECK(!label.empty()); - if (label.empty()) - return false; - - // Execute - int _retval = _struct->insert_check_item_at(_struct, - index, - command_id, - label.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::InsertRadioItemAt(int index, int command_id, - const CefString& label, int group_id) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, insert_radio_item_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: label; type: string_byref_const - DCHECK(!label.empty()); - if (label.empty()) - return false; - - // Execute - int _retval = _struct->insert_radio_item_at(_struct, - index, - command_id, - label.GetStruct(), - group_id); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefMenuModelCToCpp::InsertSubMenuAt(int index, - int command_id, const CefString& label) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, insert_sub_menu_at)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: label; type: string_byref_const - DCHECK(!label.empty()); - if (label.empty()) - return NULL; - - // Execute - cef_menu_model_t* _retval = _struct->insert_sub_menu_at(_struct, - index, - command_id, - label.GetStruct()); - - // Return type: refptr_same - return CefMenuModelCToCpp::Wrap(_retval); -} - -bool CefMenuModelCToCpp::Remove(int command_id) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, remove)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->remove(_struct, - command_id); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::RemoveAt(int index) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, remove_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->remove_at(_struct, - index); - - // Return type: bool - return _retval?true:false; -} - -int CefMenuModelCToCpp::GetIndexOf(int command_id) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_index_of)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_index_of(_struct, - command_id); - - // Return type: simple - return _retval; -} - -int CefMenuModelCToCpp::GetCommandIdAt(int index) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_command_id_at)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_command_id_at(_struct, - index); - - // Return type: simple - return _retval; -} - -bool CefMenuModelCToCpp::SetCommandIdAt(int index, int command_id) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_command_id_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->set_command_id_at(_struct, - index, - command_id); - - // Return type: bool - return _retval?true:false; -} - -CefString CefMenuModelCToCpp::GetLabel(int command_id) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_label)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_label(_struct, - command_id); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefMenuModelCToCpp::GetLabelAt(int index) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_label_at)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_label_at(_struct, - index); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -bool CefMenuModelCToCpp::SetLabel(int command_id, const CefString& label) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_label)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: label; type: string_byref_const - DCHECK(!label.empty()); - if (label.empty()) - return false; - - // Execute - int _retval = _struct->set_label(_struct, - command_id, - label.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::SetLabelAt(int index, const CefString& label) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_label_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: label; type: string_byref_const - DCHECK(!label.empty()); - if (label.empty()) - return false; - - // Execute - int _retval = _struct->set_label_at(_struct, - index, - label.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -CefMenuModel::MenuItemType CefMenuModelCToCpp::GetType(int command_id) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_type)) - return MENUITEMTYPE_NONE; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_menu_item_type_t _retval = _struct->get_type(_struct, - command_id); - - // Return type: simple - return _retval; -} - -CefMenuModel::MenuItemType CefMenuModelCToCpp::GetTypeAt(int index) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_type_at)) - return MENUITEMTYPE_NONE; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_menu_item_type_t _retval = _struct->get_type_at(_struct, - index); - - // Return type: simple - return _retval; -} - -int CefMenuModelCToCpp::GetGroupId(int command_id) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_group_id)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_group_id(_struct, - command_id); - - // Return type: simple - return _retval; -} - -int CefMenuModelCToCpp::GetGroupIdAt(int index) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_group_id_at)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_group_id_at(_struct, - index); - - // Return type: simple - return _retval; -} - -bool CefMenuModelCToCpp::SetGroupId(int command_id, int group_id) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_group_id)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->set_group_id(_struct, - command_id, - group_id); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::SetGroupIdAt(int index, int group_id) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_group_id_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->set_group_id_at(_struct, - index, - group_id); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefMenuModelCToCpp::GetSubMenu(int command_id) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_sub_menu)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_menu_model_t* _retval = _struct->get_sub_menu(_struct, - command_id); - - // Return type: refptr_same - return CefMenuModelCToCpp::Wrap(_retval); -} - -CefRefPtr CefMenuModelCToCpp::GetSubMenuAt(int index) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_sub_menu_at)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_menu_model_t* _retval = _struct->get_sub_menu_at(_struct, - index); - - // Return type: refptr_same - return CefMenuModelCToCpp::Wrap(_retval); -} - -bool CefMenuModelCToCpp::IsVisible(int command_id) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_visible)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_visible(_struct, - command_id); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::IsVisibleAt(int index) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_visible_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_visible_at(_struct, - index); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::SetVisible(int command_id, bool visible) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_visible)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->set_visible(_struct, - command_id, - visible); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::SetVisibleAt(int index, bool visible) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_visible_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->set_visible_at(_struct, - index, - visible); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::IsEnabled(int command_id) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_enabled)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_enabled(_struct, - command_id); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::IsEnabledAt(int index) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_enabled_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_enabled_at(_struct, - index); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::SetEnabled(int command_id, bool enabled) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_enabled)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->set_enabled(_struct, - command_id, - enabled); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::SetEnabledAt(int index, bool enabled) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_enabled_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->set_enabled_at(_struct, - index, - enabled); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::IsChecked(int command_id) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_checked)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_checked(_struct, - command_id); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::IsCheckedAt(int index) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_checked_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_checked_at(_struct, - index); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::SetChecked(int command_id, bool checked) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_checked)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->set_checked(_struct, - command_id, - checked); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::SetCheckedAt(int index, bool checked) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_checked_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->set_checked_at(_struct, - index, - checked); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::HasAccelerator(int command_id) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, has_accelerator)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->has_accelerator(_struct, - command_id); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::HasAcceleratorAt(int index) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, has_accelerator_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->has_accelerator_at(_struct, - index); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::SetAccelerator(int command_id, int key_code, - bool shift_pressed, bool ctrl_pressed, bool alt_pressed) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_accelerator)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->set_accelerator(_struct, - command_id, - key_code, - shift_pressed, - ctrl_pressed, - alt_pressed); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::SetAcceleratorAt(int index, int key_code, - bool shift_pressed, bool ctrl_pressed, bool alt_pressed) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_accelerator_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->set_accelerator_at(_struct, - index, - key_code, - shift_pressed, - ctrl_pressed, - alt_pressed); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::RemoveAccelerator(int command_id) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, remove_accelerator)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->remove_accelerator(_struct, - command_id); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::RemoveAcceleratorAt(int index) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, remove_accelerator_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->remove_accelerator_at(_struct, - index); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::GetAccelerator(int command_id, int& key_code, - bool& shift_pressed, bool& ctrl_pressed, bool& alt_pressed) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_accelerator)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: shift_pressed; type: bool_byref - int shift_pressedInt = shift_pressed; - // Translate param: ctrl_pressed; type: bool_byref - int ctrl_pressedInt = ctrl_pressed; - // Translate param: alt_pressed; type: bool_byref - int alt_pressedInt = alt_pressed; - - // Execute - int _retval = _struct->get_accelerator(_struct, - command_id, - &key_code, - &shift_pressedInt, - &ctrl_pressedInt, - &alt_pressedInt); - - // Restore param:shift_pressed; type: bool_byref - shift_pressed = shift_pressedInt?true:false; - // Restore param:ctrl_pressed; type: bool_byref - ctrl_pressed = ctrl_pressedInt?true:false; - // Restore param:alt_pressed; type: bool_byref - alt_pressed = alt_pressedInt?true:false; - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::GetAcceleratorAt(int index, int& key_code, - bool& shift_pressed, bool& ctrl_pressed, bool& alt_pressed) { - cef_menu_model_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_accelerator_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: shift_pressed; type: bool_byref - int shift_pressedInt = shift_pressed; - // Translate param: ctrl_pressed; type: bool_byref - int ctrl_pressedInt = ctrl_pressed; - // Translate param: alt_pressed; type: bool_byref - int alt_pressedInt = alt_pressed; - - // Execute - int _retval = _struct->get_accelerator_at(_struct, - index, - &key_code, - &shift_pressedInt, - &ctrl_pressedInt, - &alt_pressedInt); - - // Restore param:shift_pressed; type: bool_byref - shift_pressed = shift_pressedInt?true:false; - // Restore param:ctrl_pressed; type: bool_byref - ctrl_pressed = ctrl_pressedInt?true:false; - // Restore param:alt_pressed; type: bool_byref - alt_pressed = alt_pressedInt?true:false; - - // Return type: bool - return _retval?true:false; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefMenuModelCToCpp::CefMenuModelCToCpp() { -} - -template<> cef_menu_model_t* CefCToCpp::UnwrapDerived(CefWrapperType type, CefMenuModel* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_MENU_MODEL; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/menu_model_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/menu_model_ctocpp.h deleted file mode 100644 index 14585cfd..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/menu_model_ctocpp.h +++ /dev/null @@ -1,94 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_MENU_MODEL_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_MENU_MODEL_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_menu_model.h" -#include "include/capi/cef_menu_model_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefMenuModelCToCpp - : public CefCToCpp { - public: - CefMenuModelCToCpp(); - - // CefMenuModel methods. - bool Clear() OVERRIDE; - int GetCount() OVERRIDE; - bool AddSeparator() OVERRIDE; - bool AddItem(int command_id, const CefString& label) OVERRIDE; - bool AddCheckItem(int command_id, const CefString& label) OVERRIDE; - bool AddRadioItem(int command_id, const CefString& label, - int group_id) OVERRIDE; - CefRefPtr AddSubMenu(int command_id, - const CefString& label) OVERRIDE; - bool InsertSeparatorAt(int index) OVERRIDE; - bool InsertItemAt(int index, int command_id, const CefString& label) OVERRIDE; - bool InsertCheckItemAt(int index, int command_id, - const CefString& label) OVERRIDE; - bool InsertRadioItemAt(int index, int command_id, const CefString& label, - int group_id) OVERRIDE; - CefRefPtr InsertSubMenuAt(int index, int command_id, - const CefString& label) OVERRIDE; - bool Remove(int command_id) OVERRIDE; - bool RemoveAt(int index) OVERRIDE; - int GetIndexOf(int command_id) OVERRIDE; - int GetCommandIdAt(int index) OVERRIDE; - bool SetCommandIdAt(int index, int command_id) OVERRIDE; - CefString GetLabel(int command_id) OVERRIDE; - CefString GetLabelAt(int index) OVERRIDE; - bool SetLabel(int command_id, const CefString& label) OVERRIDE; - bool SetLabelAt(int index, const CefString& label) OVERRIDE; - MenuItemType GetType(int command_id) OVERRIDE; - MenuItemType GetTypeAt(int index) OVERRIDE; - int GetGroupId(int command_id) OVERRIDE; - int GetGroupIdAt(int index) OVERRIDE; - bool SetGroupId(int command_id, int group_id) OVERRIDE; - bool SetGroupIdAt(int index, int group_id) OVERRIDE; - CefRefPtr GetSubMenu(int command_id) OVERRIDE; - CefRefPtr GetSubMenuAt(int index) OVERRIDE; - bool IsVisible(int command_id) OVERRIDE; - bool IsVisibleAt(int index) OVERRIDE; - bool SetVisible(int command_id, bool visible) OVERRIDE; - bool SetVisibleAt(int index, bool visible) OVERRIDE; - bool IsEnabled(int command_id) OVERRIDE; - bool IsEnabledAt(int index) OVERRIDE; - bool SetEnabled(int command_id, bool enabled) OVERRIDE; - bool SetEnabledAt(int index, bool enabled) OVERRIDE; - bool IsChecked(int command_id) OVERRIDE; - bool IsCheckedAt(int index) OVERRIDE; - bool SetChecked(int command_id, bool checked) OVERRIDE; - bool SetCheckedAt(int index, bool checked) OVERRIDE; - bool HasAccelerator(int command_id) OVERRIDE; - bool HasAcceleratorAt(int index) OVERRIDE; - bool SetAccelerator(int command_id, int key_code, bool shift_pressed, - bool ctrl_pressed, bool alt_pressed) OVERRIDE; - bool SetAcceleratorAt(int index, int key_code, bool shift_pressed, - bool ctrl_pressed, bool alt_pressed) OVERRIDE; - bool RemoveAccelerator(int command_id) OVERRIDE; - bool RemoveAcceleratorAt(int index) OVERRIDE; - bool GetAccelerator(int command_id, int& key_code, bool& shift_pressed, - bool& ctrl_pressed, bool& alt_pressed) OVERRIDE; - bool GetAcceleratorAt(int index, int& key_code, bool& shift_pressed, - bool& ctrl_pressed, bool& alt_pressed) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_MENU_MODEL_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/navigation_entry_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/navigation_entry_ctocpp.cc deleted file mode 100644 index 286ee140..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/navigation_entry_ctocpp.cc +++ /dev/null @@ -1,173 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/navigation_entry_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefNavigationEntryCToCpp::IsValid() { - cef_navigation_entry_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_valid)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_valid(_struct); - - // Return type: bool - return _retval?true:false; -} - -CefString CefNavigationEntryCToCpp::GetURL() { - cef_navigation_entry_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_url)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_url(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefNavigationEntryCToCpp::GetDisplayURL() { - cef_navigation_entry_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_display_url)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_display_url(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefNavigationEntryCToCpp::GetOriginalURL() { - cef_navigation_entry_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_original_url)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_original_url(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefNavigationEntryCToCpp::GetTitle() { - cef_navigation_entry_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_title)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_title(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefNavigationEntry::TransitionType CefNavigationEntryCToCpp::GetTransitionType( - ) { - cef_navigation_entry_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_transition_type)) - return TT_EXPLICIT; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_transition_type_t _retval = _struct->get_transition_type(_struct); - - // Return type: simple - return _retval; -} - -bool CefNavigationEntryCToCpp::HasPostData() { - cef_navigation_entry_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, has_post_data)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->has_post_data(_struct); - - // Return type: bool - return _retval?true:false; -} - -CefTime CefNavigationEntryCToCpp::GetCompletionTime() { - cef_navigation_entry_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_completion_time)) - return CefTime(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_time_t _retval = _struct->get_completion_time(_struct); - - // Return type: simple - return _retval; -} - -int CefNavigationEntryCToCpp::GetHttpStatusCode() { - cef_navigation_entry_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_http_status_code)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_http_status_code(_struct); - - // Return type: simple - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefNavigationEntryCToCpp::CefNavigationEntryCToCpp() { -} - -template<> cef_navigation_entry_t* CefCToCpp::UnwrapDerived( - CefWrapperType type, CefNavigationEntry* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = - WT_NAVIGATION_ENTRY; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/navigation_entry_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/navigation_entry_ctocpp.h deleted file mode 100644 index 56df51e5..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/navigation_entry_ctocpp.h +++ /dev/null @@ -1,46 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_NAVIGATION_ENTRY_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_NAVIGATION_ENTRY_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_navigation_entry.h" -#include "include/capi/cef_navigation_entry_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefNavigationEntryCToCpp - : public CefCToCpp { - public: - CefNavigationEntryCToCpp(); - - // CefNavigationEntry methods. - bool IsValid() OVERRIDE; - CefString GetURL() OVERRIDE; - CefString GetDisplayURL() OVERRIDE; - CefString GetOriginalURL() OVERRIDE; - CefString GetTitle() OVERRIDE; - TransitionType GetTransitionType() OVERRIDE; - bool HasPostData() OVERRIDE; - CefTime GetCompletionTime() OVERRIDE; - int GetHttpStatusCode() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_NAVIGATION_ENTRY_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/post_data_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/post_data_ctocpp.cc deleted file mode 100644 index ee692084..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/post_data_ctocpp.cc +++ /dev/null @@ -1,183 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include -#include "libcef_dll/ctocpp/post_data_ctocpp.h" -#include "libcef_dll/ctocpp/post_data_element_ctocpp.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefPostData::Create() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_post_data_t* _retval = cef_post_data_create(); - - // Return type: refptr_same - return CefPostDataCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefPostDataCToCpp::IsReadOnly() { - cef_post_data_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_read_only)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_read_only(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefPostDataCToCpp::HasExcludedElements() { - cef_post_data_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, has_excluded_elements)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->has_excluded_elements(_struct); - - // Return type: bool - return _retval?true:false; -} - -size_t CefPostDataCToCpp::GetElementCount() { - cef_post_data_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_element_count)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - size_t _retval = _struct->get_element_count(_struct); - - // Return type: simple - return _retval; -} - -void CefPostDataCToCpp::GetElements(ElementVector& elements) { - cef_post_data_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_elements)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: elements; type: refptr_vec_same_byref - size_t elementsSize = elements.size(); - size_t elementsCount = std::max(GetElementCount(), elementsSize); - cef_post_data_element_t** elementsList = NULL; - if (elementsCount > 0) { - elementsList = new cef_post_data_element_t*[elementsCount]; - DCHECK(elementsList); - if (elementsList) { - memset(elementsList, 0, sizeof(cef_post_data_element_t*)*elementsCount); - } - if (elementsList && elementsSize > 0) { - for (size_t i = 0; i < elementsSize; ++i) { - elementsList[i] = CefPostDataElementCToCpp::Unwrap(elements[i]); - } - } - } - - // Execute - _struct->get_elements(_struct, - &elementsCount, - elementsList); - - // Restore param:elements; type: refptr_vec_same_byref - elements.clear(); - if (elementsCount > 0 && elementsList) { - for (size_t i = 0; i < elementsCount; ++i) { - elements.push_back(CefPostDataElementCToCpp::Wrap(elementsList[i])); - } - delete [] elementsList; - } -} - -bool CefPostDataCToCpp::RemoveElement(CefRefPtr element) { - cef_post_data_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, remove_element)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: element; type: refptr_same - DCHECK(element.get()); - if (!element.get()) - return false; - - // Execute - int _retval = _struct->remove_element(_struct, - CefPostDataElementCToCpp::Unwrap(element)); - - // Return type: bool - return _retval?true:false; -} - -bool CefPostDataCToCpp::AddElement(CefRefPtr element) { - cef_post_data_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, add_element)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: element; type: refptr_same - DCHECK(element.get()); - if (!element.get()) - return false; - - // Execute - int _retval = _struct->add_element(_struct, - CefPostDataElementCToCpp::Unwrap(element)); - - // Return type: bool - return _retval?true:false; -} - -void CefPostDataCToCpp::RemoveElements() { - cef_post_data_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, remove_elements)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->remove_elements(_struct); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefPostDataCToCpp::CefPostDataCToCpp() { -} - -template<> cef_post_data_t* CefCToCpp::UnwrapDerived(CefWrapperType type, CefPostData* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_POST_DATA; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/post_data_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/post_data_ctocpp.h deleted file mode 100644 index d57a0f87..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/post_data_ctocpp.h +++ /dev/null @@ -1,43 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_POST_DATA_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_POST_DATA_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_request.h" -#include "include/capi/cef_request_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefPostDataCToCpp - : public CefCToCpp { - public: - CefPostDataCToCpp(); - - // CefPostData methods. - bool IsReadOnly() OVERRIDE; - bool HasExcludedElements() OVERRIDE; - size_t GetElementCount() OVERRIDE; - void GetElements(ElementVector& elements) OVERRIDE; - bool RemoveElement(CefRefPtr element) OVERRIDE; - bool AddElement(CefRefPtr element) OVERRIDE; - void RemoveElements() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_POST_DATA_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/post_data_element_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/post_data_element_ctocpp.cc deleted file mode 100644 index 074bc4ff..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/post_data_element_ctocpp.cc +++ /dev/null @@ -1,176 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/post_data_element_ctocpp.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefPostDataElement::Create() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_post_data_element_t* _retval = cef_post_data_element_create(); - - // Return type: refptr_same - return CefPostDataElementCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefPostDataElementCToCpp::IsReadOnly() { - cef_post_data_element_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_read_only)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_read_only(_struct); - - // Return type: bool - return _retval?true:false; -} - -void CefPostDataElementCToCpp::SetToEmpty() { - cef_post_data_element_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_to_empty)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->set_to_empty(_struct); -} - -void CefPostDataElementCToCpp::SetToFile(const CefString& fileName) { - cef_post_data_element_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_to_file)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: fileName; type: string_byref_const - DCHECK(!fileName.empty()); - if (fileName.empty()) - return; - - // Execute - _struct->set_to_file(_struct, - fileName.GetStruct()); -} - -void CefPostDataElementCToCpp::SetToBytes(size_t size, const void* bytes) { - cef_post_data_element_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_to_bytes)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: bytes; type: simple_byaddr - DCHECK(bytes); - if (!bytes) - return; - - // Execute - _struct->set_to_bytes(_struct, - size, - bytes); -} - -CefPostDataElement::Type CefPostDataElementCToCpp::GetType() { - cef_post_data_element_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_type)) - return PDE_TYPE_EMPTY; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_postdataelement_type_t _retval = _struct->get_type(_struct); - - // Return type: simple - return _retval; -} - -CefString CefPostDataElementCToCpp::GetFile() { - cef_post_data_element_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_file)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_file(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -size_t CefPostDataElementCToCpp::GetBytesCount() { - cef_post_data_element_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_bytes_count)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - size_t _retval = _struct->get_bytes_count(_struct); - - // Return type: simple - return _retval; -} - -size_t CefPostDataElementCToCpp::GetBytes(size_t size, void* bytes) { - cef_post_data_element_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_bytes)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: bytes; type: simple_byaddr - DCHECK(bytes); - if (!bytes) - return 0; - - // Execute - size_t _retval = _struct->get_bytes(_struct, - size, - bytes); - - // Return type: simple - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefPostDataElementCToCpp::CefPostDataElementCToCpp() { -} - -template<> cef_post_data_element_t* CefCToCpp::UnwrapDerived( - CefWrapperType type, CefPostDataElement* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = - WT_POST_DATA_ELEMENT; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/post_data_element_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/post_data_element_ctocpp.h deleted file mode 100644 index 0a6f0498..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/post_data_element_ctocpp.h +++ /dev/null @@ -1,45 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_POST_DATA_ELEMENT_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_POST_DATA_ELEMENT_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_request.h" -#include "include/capi/cef_request_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefPostDataElementCToCpp - : public CefCToCpp { - public: - CefPostDataElementCToCpp(); - - // CefPostDataElement methods. - bool IsReadOnly() OVERRIDE; - void SetToEmpty() OVERRIDE; - void SetToFile(const CefString& fileName) OVERRIDE; - void SetToBytes(size_t size, const void* bytes) OVERRIDE; - Type GetType() OVERRIDE; - CefString GetFile() OVERRIDE; - size_t GetBytesCount() OVERRIDE; - size_t GetBytes(size_t size, void* bytes) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_POST_DATA_ELEMENT_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/print_dialog_callback_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/print_dialog_callback_ctocpp.cc deleted file mode 100644 index cc35c9d7..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/print_dialog_callback_ctocpp.cc +++ /dev/null @@ -1,68 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/print_dialog_callback_ctocpp.h" -#include "libcef_dll/ctocpp/print_settings_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefPrintDialogCallbackCToCpp::Continue( - CefRefPtr settings) { - cef_print_dialog_callback_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, cont)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: settings; type: refptr_same - DCHECK(settings.get()); - if (!settings.get()) - return; - - // Execute - _struct->cont(_struct, - CefPrintSettingsCToCpp::Unwrap(settings)); -} - -void CefPrintDialogCallbackCToCpp::Cancel() { - cef_print_dialog_callback_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, cancel)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->cancel(_struct); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefPrintDialogCallbackCToCpp::CefPrintDialogCallbackCToCpp() { -} - -template<> cef_print_dialog_callback_t* CefCToCpp::UnwrapDerived( - CefWrapperType type, CefPrintDialogCallback* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = - WT_PRINT_DIALOG_CALLBACK; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/print_dialog_callback_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/print_dialog_callback_ctocpp.h deleted file mode 100644 index 6da471b5..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/print_dialog_callback_ctocpp.h +++ /dev/null @@ -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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_PRINT_DIALOG_CALLBACK_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_PRINT_DIALOG_CALLBACK_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_print_handler.h" -#include "include/capi/cef_print_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefPrintDialogCallbackCToCpp - : public CefCToCpp { - public: - CefPrintDialogCallbackCToCpp(); - - // CefPrintDialogCallback methods. - void Continue(CefRefPtr settings) OVERRIDE; - void Cancel() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_PRINT_DIALOG_CALLBACK_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/print_job_callback_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/print_job_callback_ctocpp.cc deleted file mode 100644 index dc0eea7f..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/print_job_callback_ctocpp.cc +++ /dev/null @@ -1,49 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/print_job_callback_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefPrintJobCallbackCToCpp::Continue() { - cef_print_job_callback_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, cont)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->cont(_struct); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefPrintJobCallbackCToCpp::CefPrintJobCallbackCToCpp() { -} - -template<> cef_print_job_callback_t* CefCToCpp::UnwrapDerived( - CefWrapperType type, CefPrintJobCallback* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = - WT_PRINT_JOB_CALLBACK; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/print_job_callback_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/print_job_callback_ctocpp.h deleted file mode 100644 index 27491944..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/print_job_callback_ctocpp.h +++ /dev/null @@ -1,38 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_PRINT_JOB_CALLBACK_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_PRINT_JOB_CALLBACK_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_print_handler.h" -#include "include/capi/cef_print_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefPrintJobCallbackCToCpp - : public CefCToCpp { - public: - CefPrintJobCallbackCToCpp(); - - // CefPrintJobCallback methods. - void Continue() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_PRINT_JOB_CALLBACK_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/print_settings_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/print_settings_ctocpp.cc deleted file mode 100644 index afe55ad0..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/print_settings_ctocpp.cc +++ /dev/null @@ -1,404 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include -#include "libcef_dll/ctocpp/print_settings_ctocpp.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefPrintSettings::Create() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_print_settings_t* _retval = cef_print_settings_create(); - - // Return type: refptr_same - return CefPrintSettingsCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefPrintSettingsCToCpp::IsValid() { - cef_print_settings_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_valid)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_valid(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefPrintSettingsCToCpp::IsReadOnly() { - cef_print_settings_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_read_only)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_read_only(_struct); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefPrintSettingsCToCpp::Copy() { - cef_print_settings_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, copy)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_print_settings_t* _retval = _struct->copy(_struct); - - // Return type: refptr_same - return CefPrintSettingsCToCpp::Wrap(_retval); -} - -void CefPrintSettingsCToCpp::SetOrientation(bool landscape) { - cef_print_settings_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_orientation)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->set_orientation(_struct, - landscape); -} - -bool CefPrintSettingsCToCpp::IsLandscape() { - cef_print_settings_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_landscape)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_landscape(_struct); - - // Return type: bool - return _retval?true:false; -} - -void CefPrintSettingsCToCpp::SetPrinterPrintableArea( - const CefSize& physical_size_device_units, - const CefRect& printable_area_device_units, bool landscape_needs_flip) { - cef_print_settings_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_printer_printable_area)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->set_printer_printable_area(_struct, - &physical_size_device_units, - &printable_area_device_units, - landscape_needs_flip); -} - -void CefPrintSettingsCToCpp::SetDeviceName(const CefString& name) { - cef_print_settings_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_device_name)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: name - - // Execute - _struct->set_device_name(_struct, - name.GetStruct()); -} - -CefString CefPrintSettingsCToCpp::GetDeviceName() { - cef_print_settings_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_device_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_device_name(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -void CefPrintSettingsCToCpp::SetDPI(int dpi) { - cef_print_settings_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_dpi)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->set_dpi(_struct, - dpi); -} - -int CefPrintSettingsCToCpp::GetDPI() { - cef_print_settings_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_dpi)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_dpi(_struct); - - // Return type: simple - return _retval; -} - -void CefPrintSettingsCToCpp::SetPageRanges(const PageRangeList& ranges) { - cef_print_settings_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_page_ranges)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: ranges; type: simple_vec_byref_const - const size_t rangesCount = ranges.size(); - cef_page_range_t* rangesList = NULL; - if (rangesCount > 0) { - rangesList = new cef_page_range_t[rangesCount]; - DCHECK(rangesList); - if (rangesList) { - for (size_t i = 0; i < rangesCount; ++i) { - rangesList[i] = ranges[i]; - } - } - } - - // Execute - _struct->set_page_ranges(_struct, - rangesCount, - rangesList); - - // Restore param:ranges; type: simple_vec_byref_const - if (rangesList) - delete [] rangesList; -} - -size_t CefPrintSettingsCToCpp::GetPageRangesCount() { - cef_print_settings_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_page_ranges_count)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - size_t _retval = _struct->get_page_ranges_count(_struct); - - // Return type: simple - return _retval; -} - -void CefPrintSettingsCToCpp::GetPageRanges(PageRangeList& ranges) { - cef_print_settings_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_page_ranges)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: ranges; type: simple_vec_byref - size_t rangesSize = ranges.size(); - size_t rangesCount = std::max(GetPageRangesCount(), rangesSize); - cef_page_range_t* rangesList = NULL; - if (rangesCount > 0) { - rangesList = new cef_page_range_t[rangesCount]; - DCHECK(rangesList); - if (rangesList) { - memset(rangesList, 0, sizeof(cef_page_range_t)*rangesCount); - } - if (rangesList && rangesSize > 0) { - for (size_t i = 0; i < rangesSize; ++i) { - rangesList[i] = ranges[i]; - } - } - } - - // Execute - _struct->get_page_ranges(_struct, - &rangesCount, - rangesList); - - // Restore param:ranges; type: simple_vec_byref - ranges.clear(); - if (rangesCount > 0 && rangesList) { - for (size_t i = 0; i < rangesCount; ++i) { - ranges.push_back(rangesList[i]); - } - delete [] rangesList; - } -} - -void CefPrintSettingsCToCpp::SetSelectionOnly(bool selection_only) { - cef_print_settings_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_selection_only)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->set_selection_only(_struct, - selection_only); -} - -bool CefPrintSettingsCToCpp::IsSelectionOnly() { - cef_print_settings_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_selection_only)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_selection_only(_struct); - - // Return type: bool - return _retval?true:false; -} - -void CefPrintSettingsCToCpp::SetCollate(bool collate) { - cef_print_settings_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_collate)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->set_collate(_struct, - collate); -} - -bool CefPrintSettingsCToCpp::WillCollate() { - cef_print_settings_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, will_collate)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->will_collate(_struct); - - // Return type: bool - return _retval?true:false; -} - -void CefPrintSettingsCToCpp::SetColorModel(ColorModel model) { - cef_print_settings_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_color_model)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->set_color_model(_struct, - model); -} - -CefPrintSettings::ColorModel CefPrintSettingsCToCpp::GetColorModel() { - cef_print_settings_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_color_model)) - return COLOR_MODEL_UNKNOWN; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_color_model_t _retval = _struct->get_color_model(_struct); - - // Return type: simple - return _retval; -} - -void CefPrintSettingsCToCpp::SetCopies(int copies) { - cef_print_settings_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_copies)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->set_copies(_struct, - copies); -} - -int CefPrintSettingsCToCpp::GetCopies() { - cef_print_settings_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_copies)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_copies(_struct); - - // Return type: simple - return _retval; -} - -void CefPrintSettingsCToCpp::SetDuplexMode(DuplexMode mode) { - cef_print_settings_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_duplex_mode)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->set_duplex_mode(_struct, - mode); -} - -CefPrintSettings::DuplexMode CefPrintSettingsCToCpp::GetDuplexMode() { - cef_print_settings_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_duplex_mode)) - return DUPLEX_MODE_UNKNOWN; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_duplex_mode_t _retval = _struct->get_duplex_mode(_struct); - - // Return type: simple - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefPrintSettingsCToCpp::CefPrintSettingsCToCpp() { -} - -template<> cef_print_settings_t* CefCToCpp::UnwrapDerived(CefWrapperType type, - CefPrintSettings* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_PRINT_SETTINGS; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/print_settings_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/print_settings_ctocpp.h deleted file mode 100644 index 018be1a0..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/print_settings_ctocpp.h +++ /dev/null @@ -1,62 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_PRINT_SETTINGS_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_PRINT_SETTINGS_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_print_settings.h" -#include "include/capi/cef_print_settings_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefPrintSettingsCToCpp - : public CefCToCpp { - public: - CefPrintSettingsCToCpp(); - - // CefPrintSettings methods. - bool IsValid() OVERRIDE; - bool IsReadOnly() OVERRIDE; - CefRefPtr Copy() OVERRIDE; - void SetOrientation(bool landscape) OVERRIDE; - bool IsLandscape() OVERRIDE; - void SetPrinterPrintableArea(const CefSize& physical_size_device_units, - const CefRect& printable_area_device_units, - bool landscape_needs_flip) OVERRIDE; - void SetDeviceName(const CefString& name) OVERRIDE; - CefString GetDeviceName() OVERRIDE; - void SetDPI(int dpi) OVERRIDE; - int GetDPI() OVERRIDE; - void SetPageRanges(const PageRangeList& ranges) OVERRIDE; - size_t GetPageRangesCount() OVERRIDE; - void GetPageRanges(PageRangeList& ranges) OVERRIDE; - void SetSelectionOnly(bool selection_only) OVERRIDE; - bool IsSelectionOnly() OVERRIDE; - void SetCollate(bool collate) OVERRIDE; - bool WillCollate() OVERRIDE; - void SetColorModel(ColorModel model) OVERRIDE; - ColorModel GetColorModel() OVERRIDE; - void SetCopies(int copies) OVERRIDE; - int GetCopies() OVERRIDE; - void SetDuplexMode(DuplexMode mode) OVERRIDE; - DuplexMode GetDuplexMode() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_PRINT_SETTINGS_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/process_message_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/process_message_ctocpp.cc deleted file mode 100644 index 9d055f7f..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/process_message_ctocpp.cc +++ /dev/null @@ -1,129 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/list_value_ctocpp.h" -#include "libcef_dll/ctocpp/process_message_ctocpp.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefProcessMessage::Create(const CefString& name) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: name; type: string_byref_const - DCHECK(!name.empty()); - if (name.empty()) - return NULL; - - // Execute - cef_process_message_t* _retval = cef_process_message_create( - name.GetStruct()); - - // Return type: refptr_same - return CefProcessMessageCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefProcessMessageCToCpp::IsValid() { - cef_process_message_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_valid)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_valid(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefProcessMessageCToCpp::IsReadOnly() { - cef_process_message_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_read_only)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_read_only(_struct); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefProcessMessageCToCpp::Copy() { - cef_process_message_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, copy)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_process_message_t* _retval = _struct->copy(_struct); - - // Return type: refptr_same - return CefProcessMessageCToCpp::Wrap(_retval); -} - -CefString CefProcessMessageCToCpp::GetName() { - cef_process_message_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_name(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefRefPtr CefProcessMessageCToCpp::GetArgumentList() { - cef_process_message_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_argument_list)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_list_value_t* _retval = _struct->get_argument_list(_struct); - - // Return type: refptr_same - return CefListValueCToCpp::Wrap(_retval); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefProcessMessageCToCpp::CefProcessMessageCToCpp() { -} - -template<> cef_process_message_t* CefCToCpp::UnwrapDerived( - CefWrapperType type, CefProcessMessage* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_PROCESS_MESSAGE; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/process_message_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/process_message_ctocpp.h deleted file mode 100644 index 9abc2143..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/process_message_ctocpp.h +++ /dev/null @@ -1,42 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_PROCESS_MESSAGE_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_PROCESS_MESSAGE_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_process_message.h" -#include "include/capi/cef_process_message_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefProcessMessageCToCpp - : public CefCToCpp { - public: - CefProcessMessageCToCpp(); - - // CefProcessMessage methods. - bool IsValid() OVERRIDE; - bool IsReadOnly() OVERRIDE; - CefRefPtr Copy() OVERRIDE; - CefString GetName() OVERRIDE; - CefRefPtr GetArgumentList() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_PROCESS_MESSAGE_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/request_callback_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/request_callback_ctocpp.cc deleted file mode 100644 index 84d76024..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/request_callback_ctocpp.cc +++ /dev/null @@ -1,61 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/request_callback_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefRequestCallbackCToCpp::Continue(bool allow) { - cef_request_callback_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, cont)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->cont(_struct, - allow); -} - -void CefRequestCallbackCToCpp::Cancel() { - cef_request_callback_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, cancel)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->cancel(_struct); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefRequestCallbackCToCpp::CefRequestCallbackCToCpp() { -} - -template<> cef_request_callback_t* CefCToCpp::UnwrapDerived( - CefWrapperType type, CefRequestCallback* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = - WT_REQUEST_CALLBACK; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/request_callback_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/request_callback_ctocpp.h deleted file mode 100644 index 21314db9..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/request_callback_ctocpp.h +++ /dev/null @@ -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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_CALLBACK_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_REQUEST_CALLBACK_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_request_handler.h" -#include "include/capi/cef_request_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefRequestCallbackCToCpp - : public CefCToCpp { - public: - CefRequestCallbackCToCpp(); - - // CefRequestCallback methods. - void Continue(bool allow) OVERRIDE; - void Cancel() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_REQUEST_CALLBACK_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/request_context_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/request_context_ctocpp.cc deleted file mode 100644 index 0a44369d..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/request_context_ctocpp.cc +++ /dev/null @@ -1,437 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/completion_callback_cpptoc.h" -#include "libcef_dll/cpptoc/request_context_handler_cpptoc.h" -#include "libcef_dll/cpptoc/resolve_callback_cpptoc.h" -#include "libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h" -#include "libcef_dll/ctocpp/cookie_manager_ctocpp.h" -#include "libcef_dll/ctocpp/dictionary_value_ctocpp.h" -#include "libcef_dll/ctocpp/request_context_ctocpp.h" -#include "libcef_dll/ctocpp/value_ctocpp.h" -#include "libcef_dll/transfer_util.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefRequestContext::GetGlobalContext() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_request_context_t* _retval = cef_request_context_get_global_context(); - - // Return type: refptr_same - return CefRequestContextCToCpp::Wrap(_retval); -} - -CefRefPtr CefRequestContext::CreateContext( - const CefRequestContextSettings& settings, - CefRefPtr handler) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: handler - - // Execute - cef_request_context_t* _retval = cef_request_context_create_context( - &settings, - CefRequestContextHandlerCppToC::Wrap(handler)); - - // Return type: refptr_same - return CefRequestContextCToCpp::Wrap(_retval); -} - -CefRefPtr CefRequestContext::CreateContext( - CefRefPtr other, - CefRefPtr handler) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: other; type: refptr_same - DCHECK(other.get()); - if (!other.get()) - return NULL; - // Unverified params: handler - - // Execute - cef_request_context_t* _retval = create_context_shared( - CefRequestContextCToCpp::Unwrap(other), - CefRequestContextHandlerCppToC::Wrap(handler)); - - // Return type: refptr_same - return CefRequestContextCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefRequestContextCToCpp::IsSame(CefRefPtr other) { - cef_request_context_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_same)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: other; type: refptr_same - DCHECK(other.get()); - if (!other.get()) - return false; - - // Execute - int _retval = _struct->is_same(_struct, - CefRequestContextCToCpp::Unwrap(other)); - - // Return type: bool - return _retval?true:false; -} - -bool CefRequestContextCToCpp::IsSharingWith( - CefRefPtr other) { - cef_request_context_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_sharing_with)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: other; type: refptr_same - DCHECK(other.get()); - if (!other.get()) - return false; - - // Execute - int _retval = _struct->is_sharing_with(_struct, - CefRequestContextCToCpp::Unwrap(other)); - - // Return type: bool - return _retval?true:false; -} - -bool CefRequestContextCToCpp::IsGlobal() { - cef_request_context_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_global)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_global(_struct); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefRequestContextCToCpp::GetHandler() { - cef_request_context_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_handler)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_request_context_handler_t* _retval = _struct->get_handler(_struct); - - // Return type: refptr_diff - return CefRequestContextHandlerCppToC::Unwrap(_retval); -} - -CefString CefRequestContextCToCpp::GetCachePath() { - cef_request_context_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_cache_path)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_cache_path(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefRefPtr CefRequestContextCToCpp::GetDefaultCookieManager( - CefRefPtr callback) { - cef_request_context_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_default_cookie_manager)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: callback - - // Execute - cef_cookie_manager_t* _retval = _struct->get_default_cookie_manager(_struct, - CefCompletionCallbackCppToC::Wrap(callback)); - - // Return type: refptr_same - return CefCookieManagerCToCpp::Wrap(_retval); -} - -bool CefRequestContextCToCpp::RegisterSchemeHandlerFactory( - const CefString& scheme_name, const CefString& domain_name, - CefRefPtr factory) { - cef_request_context_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, register_scheme_handler_factory)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: scheme_name; type: string_byref_const - DCHECK(!scheme_name.empty()); - if (scheme_name.empty()) - return false; - // Unverified params: domain_name, factory - - // Execute - int _retval = _struct->register_scheme_handler_factory(_struct, - scheme_name.GetStruct(), - domain_name.GetStruct(), - CefSchemeHandlerFactoryCppToC::Wrap(factory)); - - // Return type: bool - return _retval?true:false; -} - -bool CefRequestContextCToCpp::ClearSchemeHandlerFactories() { - cef_request_context_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, clear_scheme_handler_factories)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->clear_scheme_handler_factories(_struct); - - // Return type: bool - return _retval?true:false; -} - -void CefRequestContextCToCpp::PurgePluginListCache(bool reload_pages) { - cef_request_context_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, purge_plugin_list_cache)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->purge_plugin_list_cache(_struct, - reload_pages); -} - -bool CefRequestContextCToCpp::HasPreference(const CefString& name) { - cef_request_context_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, has_preference)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: name; type: string_byref_const - DCHECK(!name.empty()); - if (name.empty()) - return false; - - // Execute - int _retval = _struct->has_preference(_struct, - name.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefRequestContextCToCpp::GetPreference( - const CefString& name) { - cef_request_context_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_preference)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: name; type: string_byref_const - DCHECK(!name.empty()); - if (name.empty()) - return NULL; - - // Execute - cef_value_t* _retval = _struct->get_preference(_struct, - name.GetStruct()); - - // Return type: refptr_same - return CefValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefRequestContextCToCpp::GetAllPreferences( - bool include_defaults) { - cef_request_context_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_all_preferences)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_dictionary_value_t* _retval = _struct->get_all_preferences(_struct, - include_defaults); - - // Return type: refptr_same - return CefDictionaryValueCToCpp::Wrap(_retval); -} - -bool CefRequestContextCToCpp::CanSetPreference(const CefString& name) { - cef_request_context_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, can_set_preference)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: name; type: string_byref_const - DCHECK(!name.empty()); - if (name.empty()) - return false; - - // Execute - int _retval = _struct->can_set_preference(_struct, - name.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefRequestContextCToCpp::SetPreference(const CefString& name, - CefRefPtr value, CefString& error) { - cef_request_context_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_preference)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: name; type: string_byref_const - DCHECK(!name.empty()); - if (name.empty()) - return false; - // Unverified params: value - - // Execute - int _retval = _struct->set_preference(_struct, - name.GetStruct(), - CefValueCToCpp::Unwrap(value), - error.GetWritableStruct()); - - // Return type: bool - return _retval?true:false; -} - -void CefRequestContextCToCpp::ClearCertificateExceptions( - CefRefPtr callback) { - cef_request_context_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, clear_certificate_exceptions)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: callback - - // Execute - _struct->clear_certificate_exceptions(_struct, - CefCompletionCallbackCppToC::Wrap(callback)); -} - -void CefRequestContextCToCpp::CloseAllConnections( - CefRefPtr callback) { - cef_request_context_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, close_all_connections)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: callback - - // Execute - _struct->close_all_connections(_struct, - CefCompletionCallbackCppToC::Wrap(callback)); -} - -void CefRequestContextCToCpp::ResolveHost(const CefString& origin, - CefRefPtr callback) { - cef_request_context_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, resolve_host)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: origin; type: string_byref_const - DCHECK(!origin.empty()); - if (origin.empty()) - return; - // Verify param: callback; type: refptr_diff - DCHECK(callback.get()); - if (!callback.get()) - return; - - // Execute - _struct->resolve_host(_struct, - origin.GetStruct(), - CefResolveCallbackCppToC::Wrap(callback)); -} - -cef_errorcode_t CefRequestContextCToCpp::ResolveHostCached( - const CefString& origin, std::vector& resolved_ips) { - cef_request_context_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, resolve_host_cached)) - return ERR_FAILED; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: origin; type: string_byref_const - DCHECK(!origin.empty()); - if (origin.empty()) - return ERR_FAILED; - - // Translate param: resolved_ips; type: string_vec_byref - cef_string_list_t resolved_ipsList = cef_string_list_alloc(); - DCHECK(resolved_ipsList); - if (resolved_ipsList) - transfer_string_list_contents(resolved_ips, resolved_ipsList); - - // Execute - cef_errorcode_t _retval = _struct->resolve_host_cached(_struct, - origin.GetStruct(), - resolved_ipsList); - - // Restore param:resolved_ips; type: string_vec_byref - if (resolved_ipsList) { - resolved_ips.clear(); - transfer_string_list_contents(resolved_ipsList, resolved_ips); - cef_string_list_free(resolved_ipsList); - } - - // Return type: simple - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefRequestContextCToCpp::CefRequestContextCToCpp() { -} - -template<> cef_request_context_t* CefCToCpp::UnwrapDerived( - CefWrapperType type, CefRequestContext* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_REQUEST_CONTEXT; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/request_context_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/request_context_ctocpp.h deleted file mode 100644 index bbce628c..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/request_context_ctocpp.h +++ /dev/null @@ -1,66 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_CONTEXT_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_REQUEST_CONTEXT_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include -#include "include/cef_request_context.h" -#include "include/capi/cef_request_context_capi.h" -#include "include/cef_scheme.h" -#include "include/capi/cef_scheme_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefRequestContextCToCpp - : public CefCToCpp { - public: - CefRequestContextCToCpp(); - - // CefRequestContext methods. - bool IsSame(CefRefPtr other) OVERRIDE; - bool IsSharingWith(CefRefPtr other) OVERRIDE; - bool IsGlobal() OVERRIDE; - CefRefPtr GetHandler() OVERRIDE; - CefString GetCachePath() OVERRIDE; - CefRefPtr GetDefaultCookieManager( - CefRefPtr callback) OVERRIDE; - bool RegisterSchemeHandlerFactory(const CefString& scheme_name, - const CefString& domain_name, - CefRefPtr factory) OVERRIDE; - bool ClearSchemeHandlerFactories() OVERRIDE; - void PurgePluginListCache(bool reload_pages) OVERRIDE; - bool HasPreference(const CefString& name) OVERRIDE; - CefRefPtr GetPreference(const CefString& name) OVERRIDE; - CefRefPtr GetAllPreferences( - bool include_defaults) OVERRIDE; - bool CanSetPreference(const CefString& name) OVERRIDE; - bool SetPreference(const CefString& name, CefRefPtr value, - CefString& error) OVERRIDE; - void ClearCertificateExceptions( - CefRefPtr callback) OVERRIDE; - void CloseAllConnections(CefRefPtr callback) OVERRIDE; - void ResolveHost(const CefString& origin, - CefRefPtr callback) OVERRIDE; - cef_errorcode_t ResolveHostCached(const CefString& origin, - std::vector& resolved_ips) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_REQUEST_CONTEXT_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/request_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/request_ctocpp.cc deleted file mode 100644 index 8a2ca24e..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/request_ctocpp.cc +++ /dev/null @@ -1,395 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/post_data_ctocpp.h" -#include "libcef_dll/ctocpp/request_ctocpp.h" -#include "libcef_dll/transfer_util.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefRequest::Create() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_request_t* _retval = cef_request_create(); - - // Return type: refptr_same - return CefRequestCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefRequestCToCpp::IsReadOnly() { - cef_request_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_read_only)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_read_only(_struct); - - // Return type: bool - return _retval?true:false; -} - -CefString CefRequestCToCpp::GetURL() { - cef_request_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_url)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_url(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -void CefRequestCToCpp::SetURL(const CefString& url) { - cef_request_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_url)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: url; type: string_byref_const - DCHECK(!url.empty()); - if (url.empty()) - return; - - // Execute - _struct->set_url(_struct, - url.GetStruct()); -} - -CefString CefRequestCToCpp::GetMethod() { - cef_request_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_method)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_method(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -void CefRequestCToCpp::SetMethod(const CefString& method) { - cef_request_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_method)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: method; type: string_byref_const - DCHECK(!method.empty()); - if (method.empty()) - return; - - // Execute - _struct->set_method(_struct, - method.GetStruct()); -} - -void CefRequestCToCpp::SetReferrer(const CefString& referrer_url, - ReferrerPolicy policy) { - cef_request_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_referrer)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: referrer_url; type: string_byref_const - DCHECK(!referrer_url.empty()); - if (referrer_url.empty()) - return; - - // Execute - _struct->set_referrer(_struct, - referrer_url.GetStruct(), - policy); -} - -CefString CefRequestCToCpp::GetReferrerURL() { - cef_request_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_referrer_url)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_referrer_url(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefRequest::ReferrerPolicy CefRequestCToCpp::GetReferrerPolicy() { - cef_request_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_referrer_policy)) - return REFERRER_POLICY_DEFAULT; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_referrer_policy_t _retval = _struct->get_referrer_policy(_struct); - - // Return type: simple - return _retval; -} - -CefRefPtr CefRequestCToCpp::GetPostData() { - cef_request_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_post_data)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_post_data_t* _retval = _struct->get_post_data(_struct); - - // Return type: refptr_same - return CefPostDataCToCpp::Wrap(_retval); -} - -void CefRequestCToCpp::SetPostData(CefRefPtr postData) { - cef_request_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_post_data)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: postData; type: refptr_same - DCHECK(postData.get()); - if (!postData.get()) - return; - - // Execute - _struct->set_post_data(_struct, - CefPostDataCToCpp::Unwrap(postData)); -} - -void CefRequestCToCpp::GetHeaderMap(HeaderMap& headerMap) { - cef_request_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_header_map)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: headerMap; type: string_map_multi_byref - cef_string_multimap_t headerMapMultimap = cef_string_multimap_alloc(); - DCHECK(headerMapMultimap); - if (headerMapMultimap) - transfer_string_multimap_contents(headerMap, headerMapMultimap); - - // Execute - _struct->get_header_map(_struct, - headerMapMultimap); - - // Restore param:headerMap; type: string_map_multi_byref - if (headerMapMultimap) { - headerMap.clear(); - transfer_string_multimap_contents(headerMapMultimap, headerMap); - cef_string_multimap_free(headerMapMultimap); - } -} - -void CefRequestCToCpp::SetHeaderMap(const HeaderMap& headerMap) { - cef_request_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_header_map)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: headerMap; type: string_map_multi_byref_const - cef_string_multimap_t headerMapMultimap = cef_string_multimap_alloc(); - DCHECK(headerMapMultimap); - if (headerMapMultimap) - transfer_string_multimap_contents(headerMap, headerMapMultimap); - - // Execute - _struct->set_header_map(_struct, - headerMapMultimap); - - // Restore param:headerMap; type: string_map_multi_byref_const - if (headerMapMultimap) - cef_string_multimap_free(headerMapMultimap); -} - -void CefRequestCToCpp::Set(const CefString& url, const CefString& method, - CefRefPtr postData, const HeaderMap& headerMap) { - cef_request_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: url; type: string_byref_const - DCHECK(!url.empty()); - if (url.empty()) - return; - // Verify param: method; type: string_byref_const - DCHECK(!method.empty()); - if (method.empty()) - return; - // Unverified params: postData - - // Translate param: headerMap; type: string_map_multi_byref_const - cef_string_multimap_t headerMapMultimap = cef_string_multimap_alloc(); - DCHECK(headerMapMultimap); - if (headerMapMultimap) - transfer_string_multimap_contents(headerMap, headerMapMultimap); - - // Execute - _struct->set(_struct, - url.GetStruct(), - method.GetStruct(), - CefPostDataCToCpp::Unwrap(postData), - headerMapMultimap); - - // Restore param:headerMap; type: string_map_multi_byref_const - if (headerMapMultimap) - cef_string_multimap_free(headerMapMultimap); -} - -int CefRequestCToCpp::GetFlags() { - cef_request_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_flags)) - return UR_FLAG_NONE; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_flags(_struct); - - // Return type: simple - return _retval; -} - -void CefRequestCToCpp::SetFlags(int flags) { - cef_request_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_flags)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->set_flags(_struct, - flags); -} - -CefString CefRequestCToCpp::GetFirstPartyForCookies() { - cef_request_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_first_party_for_cookies)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_first_party_for_cookies(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -void CefRequestCToCpp::SetFirstPartyForCookies(const CefString& url) { - cef_request_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_first_party_for_cookies)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: url; type: string_byref_const - DCHECK(!url.empty()); - if (url.empty()) - return; - - // Execute - _struct->set_first_party_for_cookies(_struct, - url.GetStruct()); -} - -CefRequest::ResourceType CefRequestCToCpp::GetResourceType() { - cef_request_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_resource_type)) - return RT_SUB_RESOURCE; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_resource_type_t _retval = _struct->get_resource_type(_struct); - - // Return type: simple - return _retval; -} - -CefRequest::TransitionType CefRequestCToCpp::GetTransitionType() { - cef_request_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_transition_type)) - return TT_EXPLICIT; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_transition_type_t _retval = _struct->get_transition_type(_struct); - - // Return type: simple - return _retval; -} - -uint64 CefRequestCToCpp::GetIdentifier() { - cef_request_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_identifier)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - uint64 _retval = _struct->get_identifier(_struct); - - // Return type: simple - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefRequestCToCpp::CefRequestCToCpp() { -} - -template<> cef_request_t* CefCToCpp::UnwrapDerived(CefWrapperType type, CefRequest* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_REQUEST; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/request_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/request_ctocpp.h deleted file mode 100644 index 663a8c37..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/request_ctocpp.h +++ /dev/null @@ -1,58 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_REQUEST_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_request.h" -#include "include/capi/cef_request_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefRequestCToCpp - : public CefCToCpp { - public: - CefRequestCToCpp(); - - // CefRequest methods. - bool IsReadOnly() OVERRIDE; - CefString GetURL() OVERRIDE; - void SetURL(const CefString& url) OVERRIDE; - CefString GetMethod() OVERRIDE; - void SetMethod(const CefString& method) OVERRIDE; - void SetReferrer(const CefString& referrer_url, - ReferrerPolicy policy) OVERRIDE; - CefString GetReferrerURL() OVERRIDE; - ReferrerPolicy GetReferrerPolicy() OVERRIDE; - CefRefPtr GetPostData() OVERRIDE; - void SetPostData(CefRefPtr postData) OVERRIDE; - void GetHeaderMap(HeaderMap& headerMap) OVERRIDE; - void SetHeaderMap(const HeaderMap& headerMap) OVERRIDE; - void Set(const CefString& url, const CefString& method, - CefRefPtr postData, const HeaderMap& headerMap) OVERRIDE; - int GetFlags() OVERRIDE; - void SetFlags(int flags) OVERRIDE; - CefString GetFirstPartyForCookies() OVERRIDE; - void SetFirstPartyForCookies(const CefString& url) OVERRIDE; - ResourceType GetResourceType() OVERRIDE; - TransitionType GetTransitionType() OVERRIDE; - uint64 GetIdentifier() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_REQUEST_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/resource_bundle_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/resource_bundle_ctocpp.cc deleted file mode 100644 index 1f8eb577..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/resource_bundle_ctocpp.cc +++ /dev/null @@ -1,104 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/resource_bundle_ctocpp.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefResourceBundle::GetGlobal() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_resource_bundle_t* _retval = cef_resource_bundle_get_global(); - - // Return type: refptr_same - return CefResourceBundleCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -CefString CefResourceBundleCToCpp::GetLocalizedString(int string_id) { - cef_resource_bundle_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_localized_string)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_localized_string(_struct, - string_id); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -bool CefResourceBundleCToCpp::GetDataResource(int resource_id, void*& data, - size_t& data_size) { - cef_resource_bundle_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_data_resource)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_data_resource(_struct, - resource_id, - &data, - &data_size); - - // Return type: bool - return _retval?true:false; -} - -bool CefResourceBundleCToCpp::GetDataResourceForScale(int resource_id, - ScaleFactor scale_factor, void*& data, size_t& data_size) { - cef_resource_bundle_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_data_resource_for_scale)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_data_resource_for_scale(_struct, - resource_id, - scale_factor, - &data, - &data_size); - - // Return type: bool - return _retval?true:false; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefResourceBundleCToCpp::CefResourceBundleCToCpp() { -} - -template<> cef_resource_bundle_t* CefCToCpp::UnwrapDerived( - CefWrapperType type, CefResourceBundle* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_RESOURCE_BUNDLE; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/resource_bundle_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/resource_bundle_ctocpp.h deleted file mode 100644 index 0ada75fa..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/resource_bundle_ctocpp.h +++ /dev/null @@ -1,42 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_RESOURCE_BUNDLE_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_RESOURCE_BUNDLE_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_resource_bundle.h" -#include "include/capi/cef_resource_bundle_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefResourceBundleCToCpp - : public CefCToCpp { - public: - CefResourceBundleCToCpp(); - - // CefResourceBundle methods. - CefString GetLocalizedString(int string_id) OVERRIDE; - bool GetDataResource(int resource_id, void*& data, - size_t& data_size) OVERRIDE; - bool GetDataResourceForScale(int resource_id, ScaleFactor scale_factor, - void*& data, size_t& data_size) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_RESOURCE_BUNDLE_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/response_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/response_ctocpp.cc deleted file mode 100644 index 3fd299fe..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/response_ctocpp.cc +++ /dev/null @@ -1,225 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/response_ctocpp.h" -#include "libcef_dll/transfer_util.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefResponse::Create() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_response_t* _retval = cef_response_create(); - - // Return type: refptr_same - return CefResponseCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefResponseCToCpp::IsReadOnly() { - cef_response_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_read_only)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_read_only(_struct); - - // Return type: bool - return _retval?true:false; -} - -int CefResponseCToCpp::GetStatus() { - cef_response_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_status)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_status(_struct); - - // Return type: simple - return _retval; -} - -void CefResponseCToCpp::SetStatus(int status) { - cef_response_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_status)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->set_status(_struct, - status); -} - -CefString CefResponseCToCpp::GetStatusText() { - cef_response_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_status_text)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_status_text(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -void CefResponseCToCpp::SetStatusText(const CefString& statusText) { - cef_response_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_status_text)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: statusText; type: string_byref_const - DCHECK(!statusText.empty()); - if (statusText.empty()) - return; - - // Execute - _struct->set_status_text(_struct, - statusText.GetStruct()); -} - -CefString CefResponseCToCpp::GetMimeType() { - cef_response_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_mime_type)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_mime_type(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -void CefResponseCToCpp::SetMimeType(const CefString& mimeType) { - cef_response_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_mime_type)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: mimeType; type: string_byref_const - DCHECK(!mimeType.empty()); - if (mimeType.empty()) - return; - - // Execute - _struct->set_mime_type(_struct, - mimeType.GetStruct()); -} - -CefString CefResponseCToCpp::GetHeader(const CefString& name) { - cef_response_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_header)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: name; type: string_byref_const - DCHECK(!name.empty()); - if (name.empty()) - return CefString(); - - // Execute - cef_string_userfree_t _retval = _struct->get_header(_struct, - name.GetStruct()); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -void CefResponseCToCpp::GetHeaderMap(HeaderMap& headerMap) { - cef_response_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_header_map)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: headerMap; type: string_map_multi_byref - cef_string_multimap_t headerMapMultimap = cef_string_multimap_alloc(); - DCHECK(headerMapMultimap); - if (headerMapMultimap) - transfer_string_multimap_contents(headerMap, headerMapMultimap); - - // Execute - _struct->get_header_map(_struct, - headerMapMultimap); - - // Restore param:headerMap; type: string_map_multi_byref - if (headerMapMultimap) { - headerMap.clear(); - transfer_string_multimap_contents(headerMapMultimap, headerMap); - cef_string_multimap_free(headerMapMultimap); - } -} - -void CefResponseCToCpp::SetHeaderMap(const HeaderMap& headerMap) { - cef_response_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_header_map)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: headerMap; type: string_map_multi_byref_const - cef_string_multimap_t headerMapMultimap = cef_string_multimap_alloc(); - DCHECK(headerMapMultimap); - if (headerMapMultimap) - transfer_string_multimap_contents(headerMap, headerMapMultimap); - - // Execute - _struct->set_header_map(_struct, - headerMapMultimap); - - // Restore param:headerMap; type: string_map_multi_byref_const - if (headerMapMultimap) - cef_string_multimap_free(headerMapMultimap); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefResponseCToCpp::CefResponseCToCpp() { -} - -template<> cef_response_t* CefCToCpp::UnwrapDerived(CefWrapperType type, CefResponse* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_RESPONSE; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/response_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/response_ctocpp.h deleted file mode 100644 index e2f2eeb7..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/response_ctocpp.h +++ /dev/null @@ -1,46 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_RESPONSE_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_RESPONSE_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_response.h" -#include "include/capi/cef_response_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefResponseCToCpp - : public CefCToCpp { - public: - CefResponseCToCpp(); - - // CefResponse methods. - bool IsReadOnly() OVERRIDE; - int GetStatus() OVERRIDE; - void SetStatus(int status) OVERRIDE; - CefString GetStatusText() OVERRIDE; - void SetStatusText(const CefString& statusText) OVERRIDE; - CefString GetMimeType() OVERRIDE; - void SetMimeType(const CefString& mimeType) OVERRIDE; - CefString GetHeader(const CefString& name) OVERRIDE; - void GetHeaderMap(HeaderMap& headerMap) OVERRIDE; - void SetHeaderMap(const HeaderMap& headerMap) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_RESPONSE_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/run_context_menu_callback_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/run_context_menu_callback_ctocpp.cc deleted file mode 100644 index 88e65959..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/run_context_menu_callback_ctocpp.cc +++ /dev/null @@ -1,64 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/run_context_menu_callback_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefRunContextMenuCallbackCToCpp::Continue(int command_id, - EventFlags event_flags) { - cef_run_context_menu_callback_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, cont)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->cont(_struct, - command_id, - event_flags); -} - -void CefRunContextMenuCallbackCToCpp::Cancel() { - cef_run_context_menu_callback_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, cancel)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->cancel(_struct); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefRunContextMenuCallbackCToCpp::CefRunContextMenuCallbackCToCpp() { -} - -template<> cef_run_context_menu_callback_t* CefCToCpp::UnwrapDerived( - CefWrapperType type, CefRunContextMenuCallback* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = - 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = - WT_RUN_CONTEXT_MENU_CALLBACK; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/run_context_menu_callback_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/run_context_menu_callback_ctocpp.h deleted file mode 100644 index a96acc6f..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/run_context_menu_callback_ctocpp.h +++ /dev/null @@ -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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_RUN_CONTEXT_MENU_CALLBACK_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_RUN_CONTEXT_MENU_CALLBACK_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_context_menu_handler.h" -#include "include/capi/cef_context_menu_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefRunContextMenuCallbackCToCpp - : public CefCToCpp { - public: - CefRunContextMenuCallbackCToCpp(); - - // CefRunContextMenuCallback methods. - void Continue(int command_id, EventFlags event_flags) OVERRIDE; - void Cancel() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_RUN_CONTEXT_MENU_CALLBACK_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/scheme_registrar_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/scheme_registrar_ctocpp.cc deleted file mode 100644 index a2d20c04..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/scheme_registrar_ctocpp.cc +++ /dev/null @@ -1,62 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/scheme_registrar_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefSchemeRegistrarCToCpp::AddCustomScheme(const CefString& scheme_name, - bool is_standard, bool is_local, bool is_display_isolated) { - cef_scheme_registrar_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, add_custom_scheme)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: scheme_name; type: string_byref_const - DCHECK(!scheme_name.empty()); - if (scheme_name.empty()) - return false; - - // Execute - int _retval = _struct->add_custom_scheme(_struct, - scheme_name.GetStruct(), - is_standard, - is_local, - is_display_isolated); - - // Return type: bool - return _retval?true:false; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefSchemeRegistrarCToCpp::CefSchemeRegistrarCToCpp() { -} - -template<> cef_scheme_registrar_t* CefCToCpp::UnwrapDerived( - CefWrapperType type, CefSchemeRegistrar* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = - WT_SCHEME_REGISTRAR; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/scheme_registrar_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/scheme_registrar_ctocpp.h deleted file mode 100644 index ea66e632..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/scheme_registrar_ctocpp.h +++ /dev/null @@ -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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_SCHEME_REGISTRAR_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_SCHEME_REGISTRAR_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_scheme.h" -#include "include/capi/cef_scheme_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefSchemeRegistrarCToCpp - : public CefCToCpp { - public: - CefSchemeRegistrarCToCpp(); - - // CefSchemeRegistrar methods. - bool AddCustomScheme(const CefString& scheme_name, bool is_standard, - bool is_local, bool is_display_isolated) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_SCHEME_REGISTRAR_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/sslcert_principal_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/sslcert_principal_ctocpp.cc deleted file mode 100644 index 90bb72b5..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/sslcert_principal_ctocpp.cc +++ /dev/null @@ -1,223 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/sslcert_principal_ctocpp.h" -#include "libcef_dll/transfer_util.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -CefString CefSSLCertPrincipalCToCpp::GetDisplayName() { - cef_sslcert_principal_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_display_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_display_name(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefSSLCertPrincipalCToCpp::GetCommonName() { - cef_sslcert_principal_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_common_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_common_name(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefSSLCertPrincipalCToCpp::GetLocalityName() { - cef_sslcert_principal_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_locality_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_locality_name(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefSSLCertPrincipalCToCpp::GetStateOrProvinceName() { - cef_sslcert_principal_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_state_or_province_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_state_or_province_name(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefSSLCertPrincipalCToCpp::GetCountryName() { - cef_sslcert_principal_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_country_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_country_name(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -void CefSSLCertPrincipalCToCpp::GetStreetAddresses( - std::vector& addresses) { - cef_sslcert_principal_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_street_addresses)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: addresses; type: string_vec_byref - cef_string_list_t addressesList = cef_string_list_alloc(); - DCHECK(addressesList); - if (addressesList) - transfer_string_list_contents(addresses, addressesList); - - // Execute - _struct->get_street_addresses(_struct, - addressesList); - - // Restore param:addresses; type: string_vec_byref - if (addressesList) { - addresses.clear(); - transfer_string_list_contents(addressesList, addresses); - cef_string_list_free(addressesList); - } -} - -void CefSSLCertPrincipalCToCpp::GetOrganizationNames( - std::vector& names) { - cef_sslcert_principal_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_organization_names)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: names; type: string_vec_byref - cef_string_list_t namesList = cef_string_list_alloc(); - DCHECK(namesList); - if (namesList) - transfer_string_list_contents(names, namesList); - - // Execute - _struct->get_organization_names(_struct, - namesList); - - // Restore param:names; type: string_vec_byref - if (namesList) { - names.clear(); - transfer_string_list_contents(namesList, names); - cef_string_list_free(namesList); - } -} - -void CefSSLCertPrincipalCToCpp::GetOrganizationUnitNames( - std::vector& names) { - cef_sslcert_principal_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_organization_unit_names)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: names; type: string_vec_byref - cef_string_list_t namesList = cef_string_list_alloc(); - DCHECK(namesList); - if (namesList) - transfer_string_list_contents(names, namesList); - - // Execute - _struct->get_organization_unit_names(_struct, - namesList); - - // Restore param:names; type: string_vec_byref - if (namesList) { - names.clear(); - transfer_string_list_contents(namesList, names); - cef_string_list_free(namesList); - } -} - -void CefSSLCertPrincipalCToCpp::GetDomainComponents( - std::vector& components) { - cef_sslcert_principal_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_domain_components)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: components; type: string_vec_byref - cef_string_list_t componentsList = cef_string_list_alloc(); - DCHECK(componentsList); - if (componentsList) - transfer_string_list_contents(components, componentsList); - - // Execute - _struct->get_domain_components(_struct, - componentsList); - - // Restore param:components; type: string_vec_byref - if (componentsList) { - components.clear(); - transfer_string_list_contents(componentsList, components); - cef_string_list_free(componentsList); - } -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefSSLCertPrincipalCToCpp::CefSSLCertPrincipalCToCpp() { -} - -template<> cef_sslcert_principal_t* CefCToCpp::UnwrapDerived( - CefWrapperType type, CefSSLCertPrincipal* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = - WT_SSLCERT_PRINCIPAL; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/sslcert_principal_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/sslcert_principal_ctocpp.h deleted file mode 100644 index 19ece7d2..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/sslcert_principal_ctocpp.h +++ /dev/null @@ -1,47 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_SSLCERT_PRINCIPAL_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_SSLCERT_PRINCIPAL_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include -#include "include/cef_ssl_info.h" -#include "include/capi/cef_ssl_info_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefSSLCertPrincipalCToCpp - : public CefCToCpp { - public: - CefSSLCertPrincipalCToCpp(); - - // CefSSLCertPrincipal methods. - CefString GetDisplayName() OVERRIDE; - CefString GetCommonName() OVERRIDE; - CefString GetLocalityName() OVERRIDE; - CefString GetStateOrProvinceName() OVERRIDE; - CefString GetCountryName() OVERRIDE; - void GetStreetAddresses(std::vector& addresses) OVERRIDE; - void GetOrganizationNames(std::vector& names) OVERRIDE; - void GetOrganizationUnitNames(std::vector& names) OVERRIDE; - void GetDomainComponents(std::vector& components) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_SSLCERT_PRINCIPAL_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/sslinfo_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/sslinfo_ctocpp.cc deleted file mode 100644 index 67155e83..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/sslinfo_ctocpp.cc +++ /dev/null @@ -1,271 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include -#include "libcef_dll/ctocpp/binary_value_ctocpp.h" -#include "libcef_dll/ctocpp/sslcert_principal_ctocpp.h" -#include "libcef_dll/ctocpp/sslinfo_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -cef_cert_status_t CefSSLInfoCToCpp::GetCertStatus() { - cef_sslinfo_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_cert_status)) - return CERT_STATUS_NONE; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_cert_status_t _retval = _struct->get_cert_status(_struct); - - // Return type: simple - return _retval; -} - -bool CefSSLInfoCToCpp::IsCertStatusError() { - cef_sslinfo_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_cert_status_error)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_cert_status_error(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefSSLInfoCToCpp::IsCertStatusMinorError() { - cef_sslinfo_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_cert_status_minor_error)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_cert_status_minor_error(_struct); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefSSLInfoCToCpp::GetSubject() { - cef_sslinfo_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_subject)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_sslcert_principal_t* _retval = _struct->get_subject(_struct); - - // Return type: refptr_same - return CefSSLCertPrincipalCToCpp::Wrap(_retval); -} - -CefRefPtr CefSSLInfoCToCpp::GetIssuer() { - cef_sslinfo_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_issuer)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_sslcert_principal_t* _retval = _struct->get_issuer(_struct); - - // Return type: refptr_same - return CefSSLCertPrincipalCToCpp::Wrap(_retval); -} - -CefRefPtr CefSSLInfoCToCpp::GetSerialNumber() { - cef_sslinfo_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_serial_number)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_binary_value_t* _retval = _struct->get_serial_number(_struct); - - // Return type: refptr_same - return CefBinaryValueCToCpp::Wrap(_retval); -} - -CefTime CefSSLInfoCToCpp::GetValidStart() { - cef_sslinfo_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_valid_start)) - return CefTime(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_time_t _retval = _struct->get_valid_start(_struct); - - // Return type: simple - return _retval; -} - -CefTime CefSSLInfoCToCpp::GetValidExpiry() { - cef_sslinfo_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_valid_expiry)) - return CefTime(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_time_t _retval = _struct->get_valid_expiry(_struct); - - // Return type: simple - return _retval; -} - -CefRefPtr CefSSLInfoCToCpp::GetDEREncoded() { - cef_sslinfo_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_derencoded)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_binary_value_t* _retval = _struct->get_derencoded(_struct); - - // Return type: refptr_same - return CefBinaryValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefSSLInfoCToCpp::GetPEMEncoded() { - cef_sslinfo_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_pemencoded)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_binary_value_t* _retval = _struct->get_pemencoded(_struct); - - // Return type: refptr_same - return CefBinaryValueCToCpp::Wrap(_retval); -} - -size_t CefSSLInfoCToCpp::GetIssuerChainSize() { - cef_sslinfo_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_issuer_chain_size)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - size_t _retval = _struct->get_issuer_chain_size(_struct); - - // Return type: simple - return _retval; -} - -void CefSSLInfoCToCpp::GetDEREncodedIssuerChain(IssuerChainBinaryList& chain) { - cef_sslinfo_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_derencoded_issuer_chain)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: chain; type: refptr_vec_same_byref - size_t chainSize = chain.size(); - size_t chainCount = std::max(GetIssuerChainSize(), chainSize); - cef_binary_value_t** chainList = NULL; - if (chainCount > 0) { - chainList = new cef_binary_value_t*[chainCount]; - DCHECK(chainList); - if (chainList) { - memset(chainList, 0, sizeof(cef_binary_value_t*)*chainCount); - } - if (chainList && chainSize > 0) { - for (size_t i = 0; i < chainSize; ++i) { - chainList[i] = CefBinaryValueCToCpp::Unwrap(chain[i]); - } - } - } - - // Execute - _struct->get_derencoded_issuer_chain(_struct, - &chainCount, - chainList); - - // Restore param:chain; type: refptr_vec_same_byref - chain.clear(); - if (chainCount > 0 && chainList) { - for (size_t i = 0; i < chainCount; ++i) { - chain.push_back(CefBinaryValueCToCpp::Wrap(chainList[i])); - } - delete [] chainList; - } -} - -void CefSSLInfoCToCpp::GetPEMEncodedIssuerChain(IssuerChainBinaryList& chain) { - cef_sslinfo_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_pemencoded_issuer_chain)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: chain; type: refptr_vec_same_byref - size_t chainSize = chain.size(); - size_t chainCount = std::max(GetIssuerChainSize(), chainSize); - cef_binary_value_t** chainList = NULL; - if (chainCount > 0) { - chainList = new cef_binary_value_t*[chainCount]; - DCHECK(chainList); - if (chainList) { - memset(chainList, 0, sizeof(cef_binary_value_t*)*chainCount); - } - if (chainList && chainSize > 0) { - for (size_t i = 0; i < chainSize; ++i) { - chainList[i] = CefBinaryValueCToCpp::Unwrap(chain[i]); - } - } - } - - // Execute - _struct->get_pemencoded_issuer_chain(_struct, - &chainCount, - chainList); - - // Restore param:chain; type: refptr_vec_same_byref - chain.clear(); - if (chainCount > 0 && chainList) { - for (size_t i = 0; i < chainCount; ++i) { - chain.push_back(CefBinaryValueCToCpp::Wrap(chainList[i])); - } - delete [] chainList; - } -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefSSLInfoCToCpp::CefSSLInfoCToCpp() { -} - -template<> cef_sslinfo_t* CefCToCpp::UnwrapDerived(CefWrapperType type, CefSSLInfo* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_SSLINFO; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/sslinfo_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/sslinfo_ctocpp.h deleted file mode 100644 index 7fc487c8..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/sslinfo_ctocpp.h +++ /dev/null @@ -1,49 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_SSLINFO_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_SSLINFO_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_ssl_info.h" -#include "include/capi/cef_ssl_info_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefSSLInfoCToCpp - : public CefCToCpp { - public: - CefSSLInfoCToCpp(); - - // CefSSLInfo methods. - cef_cert_status_t GetCertStatus() OVERRIDE; - bool IsCertStatusError() OVERRIDE; - bool IsCertStatusMinorError() OVERRIDE; - CefRefPtr GetSubject() OVERRIDE; - CefRefPtr GetIssuer() OVERRIDE; - CefRefPtr GetSerialNumber() OVERRIDE; - CefTime GetValidStart() OVERRIDE; - CefTime GetValidExpiry() OVERRIDE; - CefRefPtr GetDEREncoded() OVERRIDE; - CefRefPtr GetPEMEncoded() OVERRIDE; - size_t GetIssuerChainSize() OVERRIDE; - void GetDEREncodedIssuerChain(IssuerChainBinaryList& chain) OVERRIDE; - void GetPEMEncodedIssuerChain(IssuerChainBinaryList& chain) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_SSLINFO_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/stream_reader_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/stream_reader_ctocpp.cc deleted file mode 100644 index 1a9821eb..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/stream_reader_ctocpp.cc +++ /dev/null @@ -1,173 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/read_handler_cpptoc.h" -#include "libcef_dll/ctocpp/stream_reader_ctocpp.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefStreamReader::CreateForFile( - const CefString& fileName) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: fileName; type: string_byref_const - DCHECK(!fileName.empty()); - if (fileName.empty()) - return NULL; - - // Execute - cef_stream_reader_t* _retval = cef_stream_reader_create_for_file( - fileName.GetStruct()); - - // Return type: refptr_same - return CefStreamReaderCToCpp::Wrap(_retval); -} - -CefRefPtr CefStreamReader::CreateForData(void* data, - size_t size) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: data; type: simple_byaddr - DCHECK(data); - if (!data) - return NULL; - - // Execute - cef_stream_reader_t* _retval = cef_stream_reader_create_for_data( - data, - size); - - // Return type: refptr_same - return CefStreamReaderCToCpp::Wrap(_retval); -} - -CefRefPtr CefStreamReader::CreateForHandler( - CefRefPtr handler) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: handler; type: refptr_diff - DCHECK(handler.get()); - if (!handler.get()) - return NULL; - - // Execute - cef_stream_reader_t* _retval = cef_stream_reader_create_for_handler( - CefReadHandlerCppToC::Wrap(handler)); - - // Return type: refptr_same - return CefStreamReaderCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -size_t CefStreamReaderCToCpp::Read(void* ptr, size_t size, size_t n) { - cef_stream_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, read)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: ptr; type: simple_byaddr - DCHECK(ptr); - if (!ptr) - return 0; - - // Execute - size_t _retval = _struct->read(_struct, - ptr, - size, - n); - - // Return type: simple - return _retval; -} - -int CefStreamReaderCToCpp::Seek(int64 offset, int whence) { - cef_stream_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, seek)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->seek(_struct, - offset, - whence); - - // Return type: simple - return _retval; -} - -int64 CefStreamReaderCToCpp::Tell() { - cef_stream_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, tell)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int64 _retval = _struct->tell(_struct); - - // Return type: simple - return _retval; -} - -int CefStreamReaderCToCpp::Eof() { - cef_stream_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, eof)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->eof(_struct); - - // Return type: simple - return _retval; -} - -bool CefStreamReaderCToCpp::MayBlock() { - cef_stream_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, may_block)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->may_block(_struct); - - // Return type: bool - return _retval?true:false; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefStreamReaderCToCpp::CefStreamReaderCToCpp() { -} - -template<> cef_stream_reader_t* CefCToCpp::UnwrapDerived(CefWrapperType type, - CefStreamReader* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_STREAM_READER; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/stream_reader_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/stream_reader_ctocpp.h deleted file mode 100644 index 0751cd57..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/stream_reader_ctocpp.h +++ /dev/null @@ -1,42 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_STREAM_READER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_STREAM_READER_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_stream.h" -#include "include/capi/cef_stream_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefStreamReaderCToCpp - : public CefCToCpp { - public: - CefStreamReaderCToCpp(); - - // CefStreamReader methods. - size_t Read(void* ptr, size_t size, size_t n) OVERRIDE; - int Seek(int64 offset, int whence) OVERRIDE; - int64 Tell() OVERRIDE; - int Eof() OVERRIDE; - bool MayBlock() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_STREAM_READER_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/stream_writer_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/stream_writer_ctocpp.cc deleted file mode 100644 index 802b98d1..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/stream_writer_ctocpp.cc +++ /dev/null @@ -1,155 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/write_handler_cpptoc.h" -#include "libcef_dll/ctocpp/stream_writer_ctocpp.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefStreamWriter::CreateForFile( - const CefString& fileName) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: fileName; type: string_byref_const - DCHECK(!fileName.empty()); - if (fileName.empty()) - return NULL; - - // Execute - cef_stream_writer_t* _retval = cef_stream_writer_create_for_file( - fileName.GetStruct()); - - // Return type: refptr_same - return CefStreamWriterCToCpp::Wrap(_retval); -} - -CefRefPtr CefStreamWriter::CreateForHandler( - CefRefPtr handler) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: handler; type: refptr_diff - DCHECK(handler.get()); - if (!handler.get()) - return NULL; - - // Execute - cef_stream_writer_t* _retval = cef_stream_writer_create_for_handler( - CefWriteHandlerCppToC::Wrap(handler)); - - // Return type: refptr_same - return CefStreamWriterCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -size_t CefStreamWriterCToCpp::Write(const void* ptr, size_t size, size_t n) { - cef_stream_writer_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, write)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: ptr; type: simple_byaddr - DCHECK(ptr); - if (!ptr) - return 0; - - // Execute - size_t _retval = _struct->write(_struct, - ptr, - size, - n); - - // Return type: simple - return _retval; -} - -int CefStreamWriterCToCpp::Seek(int64 offset, int whence) { - cef_stream_writer_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, seek)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->seek(_struct, - offset, - whence); - - // Return type: simple - return _retval; -} - -int64 CefStreamWriterCToCpp::Tell() { - cef_stream_writer_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, tell)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int64 _retval = _struct->tell(_struct); - - // Return type: simple - return _retval; -} - -int CefStreamWriterCToCpp::Flush() { - cef_stream_writer_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, flush)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->flush(_struct); - - // Return type: simple - return _retval; -} - -bool CefStreamWriterCToCpp::MayBlock() { - cef_stream_writer_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, may_block)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->may_block(_struct); - - // Return type: bool - return _retval?true:false; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefStreamWriterCToCpp::CefStreamWriterCToCpp() { -} - -template<> cef_stream_writer_t* CefCToCpp::UnwrapDerived(CefWrapperType type, - CefStreamWriter* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_STREAM_WRITER; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/stream_writer_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/stream_writer_ctocpp.h deleted file mode 100644 index fb6ae06e..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/stream_writer_ctocpp.h +++ /dev/null @@ -1,42 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_STREAM_WRITER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_STREAM_WRITER_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_stream.h" -#include "include/capi/cef_stream_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefStreamWriterCToCpp - : public CefCToCpp { - public: - CefStreamWriterCToCpp(); - - // CefStreamWriter methods. - size_t Write(const void* ptr, size_t size, size_t n) OVERRIDE; - int Seek(int64 offset, int whence) OVERRIDE; - int64 Tell() OVERRIDE; - int Flush() OVERRIDE; - bool MayBlock() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_STREAM_WRITER_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/task_runner_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/task_runner_ctocpp.cc deleted file mode 100644 index 8744d9d3..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/task_runner_ctocpp.cc +++ /dev/null @@ -1,152 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/task_cpptoc.h" -#include "libcef_dll/ctocpp/task_runner_ctocpp.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefTaskRunner::GetForCurrentThread() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_task_runner_t* _retval = cef_task_runner_get_for_current_thread(); - - // Return type: refptr_same - return CefTaskRunnerCToCpp::Wrap(_retval); -} - -CefRefPtr CefTaskRunner::GetForThread(CefThreadId threadId) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_task_runner_t* _retval = cef_task_runner_get_for_thread( - threadId); - - // Return type: refptr_same - return CefTaskRunnerCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefTaskRunnerCToCpp::IsSame(CefRefPtr that) { - cef_task_runner_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_same)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: that; type: refptr_same - DCHECK(that.get()); - if (!that.get()) - return false; - - // Execute - int _retval = _struct->is_same(_struct, - CefTaskRunnerCToCpp::Unwrap(that)); - - // Return type: bool - return _retval?true:false; -} - -bool CefTaskRunnerCToCpp::BelongsToCurrentThread() { - cef_task_runner_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, belongs_to_current_thread)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->belongs_to_current_thread(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefTaskRunnerCToCpp::BelongsToThread(CefThreadId threadId) { - cef_task_runner_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, belongs_to_thread)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->belongs_to_thread(_struct, - threadId); - - // Return type: bool - return _retval?true:false; -} - -bool CefTaskRunnerCToCpp::PostTask(CefRefPtr task) { - cef_task_runner_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, post_task)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: task; type: refptr_diff - DCHECK(task.get()); - if (!task.get()) - return false; - - // Execute - int _retval = _struct->post_task(_struct, - CefTaskCppToC::Wrap(task)); - - // Return type: bool - return _retval?true:false; -} - -bool CefTaskRunnerCToCpp::PostDelayedTask(CefRefPtr task, - int64 delay_ms) { - cef_task_runner_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, post_delayed_task)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: task; type: refptr_diff - DCHECK(task.get()); - if (!task.get()) - return false; - - // Execute - int _retval = _struct->post_delayed_task(_struct, - CefTaskCppToC::Wrap(task), - delay_ms); - - // Return type: bool - return _retval?true:false; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefTaskRunnerCToCpp::CefTaskRunnerCToCpp() { -} - -template<> cef_task_runner_t* CefCToCpp::UnwrapDerived(CefWrapperType type, CefTaskRunner* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_TASK_RUNNER; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/task_runner_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/task_runner_ctocpp.h deleted file mode 100644 index 10a7b196..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/task_runner_ctocpp.h +++ /dev/null @@ -1,41 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_TASK_RUNNER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_TASK_RUNNER_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_task.h" -#include "include/capi/cef_task_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefTaskRunnerCToCpp - : public CefCToCpp { - public: - CefTaskRunnerCToCpp(); - - // CefTaskRunner methods. - bool IsSame(CefRefPtr that) OVERRIDE; - bool BelongsToCurrentThread() OVERRIDE; - bool BelongsToThread(CefThreadId threadId) OVERRIDE; - bool PostTask(CefRefPtr task) OVERRIDE; - bool PostDelayedTask(CefRefPtr task, int64 delay_ms) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_TASK_RUNNER_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/urlrequest_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/urlrequest_ctocpp.cc deleted file mode 100644 index e4e54c02..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/urlrequest_ctocpp.cc +++ /dev/null @@ -1,149 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/urlrequest_client_cpptoc.h" -#include "libcef_dll/ctocpp/request_ctocpp.h" -#include "libcef_dll/ctocpp/request_context_ctocpp.h" -#include "libcef_dll/ctocpp/response_ctocpp.h" -#include "libcef_dll/ctocpp/urlrequest_ctocpp.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefURLRequest::Create(CefRefPtr request, - CefRefPtr client, - CefRefPtr request_context) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: request; type: refptr_same - DCHECK(request.get()); - if (!request.get()) - return NULL; - // Verify param: client; type: refptr_diff - DCHECK(client.get()); - if (!client.get()) - return NULL; - // Unverified params: request_context - - // Execute - cef_urlrequest_t* _retval = cef_urlrequest_create( - CefRequestCToCpp::Unwrap(request), - CefURLRequestClientCppToC::Wrap(client), - CefRequestContextCToCpp::Unwrap(request_context)); - - // Return type: refptr_same - return CefURLRequestCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -CefRefPtr CefURLRequestCToCpp::GetRequest() { - cef_urlrequest_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_request)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_request_t* _retval = _struct->get_request(_struct); - - // Return type: refptr_same - return CefRequestCToCpp::Wrap(_retval); -} - -CefRefPtr CefURLRequestCToCpp::GetClient() { - cef_urlrequest_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_client)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_urlrequest_client_t* _retval = _struct->get_client(_struct); - - // Return type: refptr_diff - return CefURLRequestClientCppToC::Unwrap(_retval); -} - -CefURLRequest::Status CefURLRequestCToCpp::GetRequestStatus() { - cef_urlrequest_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_request_status)) - return UR_UNKNOWN; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_urlrequest_status_t _retval = _struct->get_request_status(_struct); - - // Return type: simple - return _retval; -} - -CefURLRequest::ErrorCode CefURLRequestCToCpp::GetRequestError() { - cef_urlrequest_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_request_error)) - return ERR_NONE; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_errorcode_t _retval = _struct->get_request_error(_struct); - - // Return type: simple - return _retval; -} - -CefRefPtr CefURLRequestCToCpp::GetResponse() { - cef_urlrequest_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_response)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_response_t* _retval = _struct->get_response(_struct); - - // Return type: refptr_same - return CefResponseCToCpp::Wrap(_retval); -} - -void CefURLRequestCToCpp::Cancel() { - cef_urlrequest_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, cancel)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - _struct->cancel(_struct); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefURLRequestCToCpp::CefURLRequestCToCpp() { -} - -template<> cef_urlrequest_t* CefCToCpp::UnwrapDerived(CefWrapperType type, CefURLRequest* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_URLREQUEST; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/urlrequest_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/urlrequest_ctocpp.h deleted file mode 100644 index 35bcb76e..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/urlrequest_ctocpp.h +++ /dev/null @@ -1,42 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_URLREQUEST_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_URLREQUEST_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_urlrequest.h" -#include "include/capi/cef_urlrequest_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefURLRequestCToCpp - : public CefCToCpp { - public: - CefURLRequestCToCpp(); - - // CefURLRequest methods. - CefRefPtr GetRequest() OVERRIDE; - CefRefPtr GetClient() OVERRIDE; - Status GetRequestStatus() OVERRIDE; - ErrorCode GetRequestError() OVERRIDE; - CefRefPtr GetResponse() OVERRIDE; - void Cancel() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_URLREQUEST_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/v8context_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/v8context_ctocpp.cc deleted file mode 100644 index 4f3779ea..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/v8context_ctocpp.cc +++ /dev/null @@ -1,243 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/frame_ctocpp.h" -#include "libcef_dll/ctocpp/task_runner_ctocpp.h" -#include "libcef_dll/ctocpp/v8context_ctocpp.h" -#include "libcef_dll/ctocpp/v8exception_ctocpp.h" -#include "libcef_dll/ctocpp/v8value_ctocpp.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefV8Context::GetCurrentContext() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8context_t* _retval = cef_v8context_get_current_context(); - - // Return type: refptr_same - return CefV8ContextCToCpp::Wrap(_retval); -} - -CefRefPtr CefV8Context::GetEnteredContext() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8context_t* _retval = cef_v8context_get_entered_context(); - - // Return type: refptr_same - return CefV8ContextCToCpp::Wrap(_retval); -} - -bool CefV8Context::InContext() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = cef_v8context_in_context(); - - // Return type: bool - return _retval?true:false; -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -CefRefPtr CefV8ContextCToCpp::GetTaskRunner() { - cef_v8context_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_task_runner)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_task_runner_t* _retval = _struct->get_task_runner(_struct); - - // Return type: refptr_same - return CefTaskRunnerCToCpp::Wrap(_retval); -} - -bool CefV8ContextCToCpp::IsValid() { - cef_v8context_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_valid)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_valid(_struct); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefV8ContextCToCpp::GetBrowser() { - cef_v8context_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_browser)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_browser_t* _retval = _struct->get_browser(_struct); - - // Return type: refptr_same - return CefBrowserCToCpp::Wrap(_retval); -} - -CefRefPtr CefV8ContextCToCpp::GetFrame() { - cef_v8context_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_frame)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_frame_t* _retval = _struct->get_frame(_struct); - - // Return type: refptr_same - return CefFrameCToCpp::Wrap(_retval); -} - -CefRefPtr CefV8ContextCToCpp::GetGlobal() { - cef_v8context_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_global)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8value_t* _retval = _struct->get_global(_struct); - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - -bool CefV8ContextCToCpp::Enter() { - cef_v8context_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, enter)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->enter(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ContextCToCpp::Exit() { - cef_v8context_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, exit)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->exit(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ContextCToCpp::IsSame(CefRefPtr that) { - cef_v8context_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_same)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: that; type: refptr_same - DCHECK(that.get()); - if (!that.get()) - return false; - - // Execute - int _retval = _struct->is_same(_struct, - CefV8ContextCToCpp::Unwrap(that)); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ContextCToCpp::Eval(const CefString& code, - CefRefPtr& retval, CefRefPtr& exception) { - cef_v8context_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, eval)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: code; type: string_byref_const - DCHECK(!code.empty()); - if (code.empty()) - return false; - - // Translate param: retval; type: refptr_same_byref - cef_v8value_t* retvalStruct = NULL; - if (retval.get()) - retvalStruct = CefV8ValueCToCpp::Unwrap(retval); - cef_v8value_t* retvalOrig = retvalStruct; - // Translate param: exception; type: refptr_same_byref - cef_v8exception_t* exceptionStruct = NULL; - if (exception.get()) - exceptionStruct = CefV8ExceptionCToCpp::Unwrap(exception); - cef_v8exception_t* exceptionOrig = exceptionStruct; - - // Execute - int _retval = _struct->eval(_struct, - code.GetStruct(), - &retvalStruct, - &exceptionStruct); - - // Restore param:retval; type: refptr_same_byref - if (retvalStruct) { - if (retvalStruct != retvalOrig) { - retval = CefV8ValueCToCpp::Wrap(retvalStruct); - } - } else { - retval = NULL; - } - // Restore param:exception; type: refptr_same_byref - if (exceptionStruct) { - if (exceptionStruct != exceptionOrig) { - exception = CefV8ExceptionCToCpp::Wrap(exceptionStruct); - } - } else { - exception = NULL; - } - - // Return type: bool - return _retval?true:false; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefV8ContextCToCpp::CefV8ContextCToCpp() { -} - -template<> cef_v8context_t* CefCToCpp::UnwrapDerived(CefWrapperType type, CefV8Context* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_V8CONTEXT; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/v8context_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/v8context_ctocpp.h deleted file mode 100644 index 4c5cd421..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/v8context_ctocpp.h +++ /dev/null @@ -1,46 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_V8CONTEXT_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_V8CONTEXT_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_v8.h" -#include "include/capi/cef_v8_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefV8ContextCToCpp - : public CefCToCpp { - public: - CefV8ContextCToCpp(); - - // CefV8Context methods. - CefRefPtr GetTaskRunner() OVERRIDE; - bool IsValid() OVERRIDE; - CefRefPtr GetBrowser() OVERRIDE; - CefRefPtr GetFrame() OVERRIDE; - CefRefPtr GetGlobal() OVERRIDE; - bool Enter() OVERRIDE; - bool Exit() OVERRIDE; - bool IsSame(CefRefPtr that) OVERRIDE; - bool Eval(const CefString& code, CefRefPtr& retval, - CefRefPtr& exception) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_V8CONTEXT_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/v8exception_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/v8exception_ctocpp.cc deleted file mode 100644 index 26819310..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/v8exception_ctocpp.cc +++ /dev/null @@ -1,155 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/v8exception_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -CefString CefV8ExceptionCToCpp::GetMessage() { - cef_v8exception_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_message)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_message(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefV8ExceptionCToCpp::GetSourceLine() { - cef_v8exception_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_source_line)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_source_line(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefV8ExceptionCToCpp::GetScriptResourceName() { - cef_v8exception_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_script_resource_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_script_resource_name(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -int CefV8ExceptionCToCpp::GetLineNumber() { - cef_v8exception_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_line_number)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_line_number(_struct); - - // Return type: simple - return _retval; -} - -int CefV8ExceptionCToCpp::GetStartPosition() { - cef_v8exception_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_start_position)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_start_position(_struct); - - // Return type: simple - return _retval; -} - -int CefV8ExceptionCToCpp::GetEndPosition() { - cef_v8exception_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_end_position)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_end_position(_struct); - - // Return type: simple - return _retval; -} - -int CefV8ExceptionCToCpp::GetStartColumn() { - cef_v8exception_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_start_column)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_start_column(_struct); - - // Return type: simple - return _retval; -} - -int CefV8ExceptionCToCpp::GetEndColumn() { - cef_v8exception_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_end_column)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_end_column(_struct); - - // Return type: simple - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefV8ExceptionCToCpp::CefV8ExceptionCToCpp() { -} - -template<> cef_v8exception_t* CefCToCpp::UnwrapDerived(CefWrapperType type, - CefV8Exception* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_V8EXCEPTION; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/v8exception_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/v8exception_ctocpp.h deleted file mode 100644 index 80470070..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/v8exception_ctocpp.h +++ /dev/null @@ -1,45 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_V8EXCEPTION_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_V8EXCEPTION_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_v8.h" -#include "include/capi/cef_v8_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefV8ExceptionCToCpp - : public CefCToCpp { - public: - CefV8ExceptionCToCpp(); - - // CefV8Exception methods. - CefString GetMessage() OVERRIDE; - CefString GetSourceLine() OVERRIDE; - CefString GetScriptResourceName() OVERRIDE; - int GetLineNumber() OVERRIDE; - int GetStartPosition() OVERRIDE; - int GetEndPosition() OVERRIDE; - int GetStartColumn() OVERRIDE; - int GetEndColumn() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_V8EXCEPTION_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/v8stack_frame_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/v8stack_frame_ctocpp.cc deleted file mode 100644 index ded7a07d..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/v8stack_frame_ctocpp.cc +++ /dev/null @@ -1,156 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/v8stack_frame_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefV8StackFrameCToCpp::IsValid() { - cef_v8stack_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_valid)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_valid(_struct); - - // Return type: bool - return _retval?true:false; -} - -CefString CefV8StackFrameCToCpp::GetScriptName() { - cef_v8stack_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_script_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_script_name(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefV8StackFrameCToCpp::GetScriptNameOrSourceURL() { - cef_v8stack_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_script_name_or_source_url)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_script_name_or_source_url( - _struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefV8StackFrameCToCpp::GetFunctionName() { - cef_v8stack_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_function_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_function_name(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -int CefV8StackFrameCToCpp::GetLineNumber() { - cef_v8stack_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_line_number)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_line_number(_struct); - - // Return type: simple - return _retval; -} - -int CefV8StackFrameCToCpp::GetColumn() { - cef_v8stack_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_column)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_column(_struct); - - // Return type: simple - return _retval; -} - -bool CefV8StackFrameCToCpp::IsEval() { - cef_v8stack_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_eval)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_eval(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8StackFrameCToCpp::IsConstructor() { - cef_v8stack_frame_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_constructor)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_constructor(_struct); - - // Return type: bool - return _retval?true:false; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefV8StackFrameCToCpp::CefV8StackFrameCToCpp() { -} - -template<> cef_v8stack_frame_t* CefCToCpp::UnwrapDerived(CefWrapperType type, - CefV8StackFrame* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_V8STACK_FRAME; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/v8stack_frame_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/v8stack_frame_ctocpp.h deleted file mode 100644 index cccca9e3..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/v8stack_frame_ctocpp.h +++ /dev/null @@ -1,45 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_V8STACK_FRAME_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_V8STACK_FRAME_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_v8.h" -#include "include/capi/cef_v8_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefV8StackFrameCToCpp - : public CefCToCpp { - public: - CefV8StackFrameCToCpp(); - - // CefV8StackFrame methods. - bool IsValid() OVERRIDE; - CefString GetScriptName() OVERRIDE; - CefString GetScriptNameOrSourceURL() OVERRIDE; - CefString GetFunctionName() OVERRIDE; - int GetLineNumber() OVERRIDE; - int GetColumn() OVERRIDE; - bool IsEval() OVERRIDE; - bool IsConstructor() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_V8STACK_FRAME_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/v8stack_trace_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/v8stack_trace_ctocpp.cc deleted file mode 100644 index 1efc3a38..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/v8stack_trace_ctocpp.cc +++ /dev/null @@ -1,95 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/v8stack_frame_ctocpp.h" -#include "libcef_dll/ctocpp/v8stack_trace_ctocpp.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefV8StackTrace::GetCurrent(int frame_limit) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8stack_trace_t* _retval = cef_v8stack_trace_get_current( - frame_limit); - - // Return type: refptr_same - return CefV8StackTraceCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefV8StackTraceCToCpp::IsValid() { - cef_v8stack_trace_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_valid)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_valid(_struct); - - // Return type: bool - return _retval?true:false; -} - -int CefV8StackTraceCToCpp::GetFrameCount() { - cef_v8stack_trace_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_frame_count)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_frame_count(_struct); - - // Return type: simple - return _retval; -} - -CefRefPtr CefV8StackTraceCToCpp::GetFrame(int index) { - cef_v8stack_trace_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_frame)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8stack_frame_t* _retval = _struct->get_frame(_struct, - index); - - // Return type: refptr_same - return CefV8StackFrameCToCpp::Wrap(_retval); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefV8StackTraceCToCpp::CefV8StackTraceCToCpp() { -} - -template<> cef_v8stack_trace_t* CefCToCpp::UnwrapDerived(CefWrapperType type, - CefV8StackTrace* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_V8STACK_TRACE; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/v8stack_trace_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/v8stack_trace_ctocpp.h deleted file mode 100644 index 068ef05c..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/v8stack_trace_ctocpp.h +++ /dev/null @@ -1,40 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_V8STACK_TRACE_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_V8STACK_TRACE_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_v8.h" -#include "include/capi/cef_v8_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefV8StackTraceCToCpp - : public CefCToCpp { - public: - CefV8StackTraceCToCpp(); - - // CefV8StackTrace methods. - bool IsValid() OVERRIDE; - int GetFrameCount() OVERRIDE; - CefRefPtr GetFrame(int index) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_V8STACK_TRACE_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/v8value_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/v8value_ctocpp.cc deleted file mode 100644 index 377e251d..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/v8value_ctocpp.cc +++ /dev/null @@ -1,931 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/base_cpptoc.h" -#include "libcef_dll/cpptoc/v8accessor_cpptoc.h" -#include "libcef_dll/cpptoc/v8handler_cpptoc.h" -#include "libcef_dll/ctocpp/v8context_ctocpp.h" -#include "libcef_dll/ctocpp/v8exception_ctocpp.h" -#include "libcef_dll/ctocpp/v8value_ctocpp.h" -#include "libcef_dll/transfer_util.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefV8Value::CreateUndefined() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8value_t* _retval = cef_v8value_create_undefined(); - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefV8Value::CreateNull() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8value_t* _retval = cef_v8value_create_null(); - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefV8Value::CreateBool(bool value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8value_t* _retval = cef_v8value_create_bool( - value); - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefV8Value::CreateInt(int32 value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8value_t* _retval = cef_v8value_create_int( - value); - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefV8Value::CreateUInt(uint32 value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8value_t* _retval = cef_v8value_create_uint( - value); - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefV8Value::CreateDouble(double value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8value_t* _retval = cef_v8value_create_double( - value); - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefV8Value::CreateDate(const CefTime& date) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8value_t* _retval = cef_v8value_create_date( - &date); - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefV8Value::CreateString(const CefString& value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: value - - // Execute - cef_v8value_t* _retval = cef_v8value_create_string( - value.GetStruct()); - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefV8Value::CreateObject( - CefRefPtr accessor) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: accessor - - // Execute - cef_v8value_t* _retval = cef_v8value_create_object( - CefV8AccessorCppToC::Wrap(accessor)); - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefV8Value::CreateArray(int length) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8value_t* _retval = cef_v8value_create_array( - length); - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefV8Value::CreateFunction(const CefString& name, - CefRefPtr handler) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: name; type: string_byref_const - DCHECK(!name.empty()); - if (name.empty()) - return NULL; - // Verify param: handler; type: refptr_diff - DCHECK(handler.get()); - if (!handler.get()) - return NULL; - - // Execute - cef_v8value_t* _retval = cef_v8value_create_function( - name.GetStruct(), - CefV8HandlerCppToC::Wrap(handler)); - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefV8ValueCToCpp::IsValid() { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_valid)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_valid(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::IsUndefined() { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_undefined)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_undefined(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::IsNull() { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_null)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_null(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::IsBool() { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_bool)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_bool(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::IsInt() { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_int)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_int(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::IsUInt() { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_uint)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_uint(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::IsDouble() { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_double)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_double(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::IsDate() { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_date)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_date(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::IsString() { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_string)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_string(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::IsObject() { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_object)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_object(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::IsArray() { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_array)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_array(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::IsFunction() { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_function)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_function(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::IsSame(CefRefPtr that) { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_same)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: that; type: refptr_same - DCHECK(that.get()); - if (!that.get()) - return false; - - // Execute - int _retval = _struct->is_same(_struct, - CefV8ValueCToCpp::Unwrap(that)); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::GetBoolValue() { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_bool_value)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_bool_value(_struct); - - // Return type: bool - return _retval?true:false; -} - -int32 CefV8ValueCToCpp::GetIntValue() { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_int_value)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int32 _retval = _struct->get_int_value(_struct); - - // Return type: simple - return _retval; -} - -uint32 CefV8ValueCToCpp::GetUIntValue() { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_uint_value)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - uint32 _retval = _struct->get_uint_value(_struct); - - // Return type: simple - return _retval; -} - -double CefV8ValueCToCpp::GetDoubleValue() { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_double_value)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - double _retval = _struct->get_double_value(_struct); - - // Return type: simple - return _retval; -} - -CefTime CefV8ValueCToCpp::GetDateValue() { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_date_value)) - return CefTime(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_time_t _retval = _struct->get_date_value(_struct); - - // Return type: simple - return _retval; -} - -CefString CefV8ValueCToCpp::GetStringValue() { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_string_value)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_string_value(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -bool CefV8ValueCToCpp::IsUserCreated() { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_user_created)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_user_created(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::HasException() { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, has_exception)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->has_exception(_struct); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefV8ValueCToCpp::GetException() { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_exception)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8exception_t* _retval = _struct->get_exception(_struct); - - // Return type: refptr_same - return CefV8ExceptionCToCpp::Wrap(_retval); -} - -bool CefV8ValueCToCpp::ClearException() { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, clear_exception)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->clear_exception(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::WillRethrowExceptions() { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, will_rethrow_exceptions)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->will_rethrow_exceptions(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::SetRethrowExceptions(bool rethrow) { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_rethrow_exceptions)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->set_rethrow_exceptions(_struct, - rethrow); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::HasValue(const CefString& key) { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, has_value_bykey)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: key - - // Execute - int _retval = _struct->has_value_bykey(_struct, - key.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::HasValue(int index) { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, has_value_byindex)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return false; - - // Execute - int _retval = _struct->has_value_byindex(_struct, - index); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::DeleteValue(const CefString& key) { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, delete_value_bykey)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: key - - // Execute - int _retval = _struct->delete_value_bykey(_struct, - key.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::DeleteValue(int index) { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, delete_value_byindex)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return false; - - // Execute - int _retval = _struct->delete_value_byindex(_struct, - index); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefV8ValueCToCpp::GetValue(const CefString& key) { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_value_bykey)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: key - - // Execute - cef_v8value_t* _retval = _struct->get_value_bykey(_struct, - key.GetStruct()); - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefV8ValueCToCpp::GetValue(int index) { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_value_byindex)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return NULL; - - // Execute - cef_v8value_t* _retval = _struct->get_value_byindex(_struct, - index); - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - -bool CefV8ValueCToCpp::SetValue(const CefString& key, - CefRefPtr value, PropertyAttribute attribute) { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_value_bykey)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: value; type: refptr_same - DCHECK(value.get()); - if (!value.get()) - return false; - // Unverified params: key - - // Execute - int _retval = _struct->set_value_bykey(_struct, - key.GetStruct(), - CefV8ValueCToCpp::Unwrap(value), - attribute); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::SetValue(int index, CefRefPtr value) { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_value_byindex)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return false; - // Verify param: value; type: refptr_same - DCHECK(value.get()); - if (!value.get()) - return false; - - // Execute - int _retval = _struct->set_value_byindex(_struct, - index, - CefV8ValueCToCpp::Unwrap(value)); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::SetValue(const CefString& key, AccessControl settings, - PropertyAttribute attribute) { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_value_byaccessor)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: key - - // Execute - int _retval = _struct->set_value_byaccessor(_struct, - key.GetStruct(), - settings, - attribute); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::GetKeys(std::vector& keys) { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_keys)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: keys; type: string_vec_byref - cef_string_list_t keysList = cef_string_list_alloc(); - DCHECK(keysList); - if (keysList) - transfer_string_list_contents(keys, keysList); - - // Execute - int _retval = _struct->get_keys(_struct, - keysList); - - // Restore param:keys; type: string_vec_byref - if (keysList) { - keys.clear(); - transfer_string_list_contents(keysList, keys); - cef_string_list_free(keysList); - } - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::SetUserData(CefRefPtr user_data) { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_user_data)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: user_data - - // Execute - int _retval = _struct->set_user_data(_struct, - CefBaseCppToC::Wrap(user_data)); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefV8ValueCToCpp::GetUserData() { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_user_data)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_base_t* _retval = _struct->get_user_data(_struct); - - // Return type: refptr_diff - return CefBaseCppToC::Unwrap(_retval); -} - -int CefV8ValueCToCpp::GetExternallyAllocatedMemory() { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_externally_allocated_memory)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_externally_allocated_memory(_struct); - - // Return type: simple - return _retval; -} - -int CefV8ValueCToCpp::AdjustExternallyAllocatedMemory(int change_in_bytes) { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, adjust_externally_allocated_memory)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->adjust_externally_allocated_memory(_struct, - change_in_bytes); - - // Return type: simple - return _retval; -} - -int CefV8ValueCToCpp::GetArrayLength() { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_array_length)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_array_length(_struct); - - // Return type: simple - return _retval; -} - -CefString CefV8ValueCToCpp::GetFunctionName() { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_function_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_function_name(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefRefPtr CefV8ValueCToCpp::GetFunctionHandler() { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_function_handler)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8handler_t* _retval = _struct->get_function_handler(_struct); - - // Return type: refptr_diff - return CefV8HandlerCppToC::Unwrap(_retval); -} - -CefRefPtr CefV8ValueCToCpp::ExecuteFunction( - CefRefPtr object, const CefV8ValueList& arguments) { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, execute_function)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: object - - // Translate param: arguments; type: refptr_vec_same_byref_const - const size_t argumentsCount = arguments.size(); - cef_v8value_t** argumentsList = NULL; - if (argumentsCount > 0) { - argumentsList = new cef_v8value_t*[argumentsCount]; - DCHECK(argumentsList); - if (argumentsList) { - for (size_t i = 0; i < argumentsCount; ++i) { - argumentsList[i] = CefV8ValueCToCpp::Unwrap(arguments[i]); - } - } - } - - // Execute - cef_v8value_t* _retval = _struct->execute_function(_struct, - CefV8ValueCToCpp::Unwrap(object), - argumentsCount, - argumentsList); - - // Restore param:arguments; type: refptr_vec_same_byref_const - if (argumentsList) - delete [] argumentsList; - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefV8ValueCToCpp::ExecuteFunctionWithContext( - CefRefPtr context, CefRefPtr object, - const CefV8ValueList& arguments) { - cef_v8value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, execute_function_with_context)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: context; type: refptr_same - DCHECK(context.get()); - if (!context.get()) - return NULL; - // Unverified params: object - - // Translate param: arguments; type: refptr_vec_same_byref_const - const size_t argumentsCount = arguments.size(); - cef_v8value_t** argumentsList = NULL; - if (argumentsCount > 0) { - argumentsList = new cef_v8value_t*[argumentsCount]; - DCHECK(argumentsList); - if (argumentsList) { - for (size_t i = 0; i < argumentsCount; ++i) { - argumentsList[i] = CefV8ValueCToCpp::Unwrap(arguments[i]); - } - } - } - - // Execute - cef_v8value_t* _retval = _struct->execute_function_with_context(_struct, - CefV8ContextCToCpp::Unwrap(context), - CefV8ValueCToCpp::Unwrap(object), - argumentsCount, - argumentsList); - - // Restore param:arguments; type: refptr_vec_same_byref_const - if (argumentsList) - delete [] argumentsList; - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefV8ValueCToCpp::CefV8ValueCToCpp() { -} - -template<> cef_v8value_t* CefCToCpp::UnwrapDerived(CefWrapperType type, CefV8Value* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_V8VALUE; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/v8value_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/v8value_ctocpp.h deleted file mode 100644 index e2300340..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/v8value_ctocpp.h +++ /dev/null @@ -1,86 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_V8VALUE_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_V8VALUE_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include -#include "include/cef_v8.h" -#include "include/capi/cef_v8_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefV8ValueCToCpp - : public CefCToCpp { - public: - CefV8ValueCToCpp(); - - // CefV8Value methods. - bool IsValid() OVERRIDE; - bool IsUndefined() OVERRIDE; - bool IsNull() OVERRIDE; - bool IsBool() OVERRIDE; - bool IsInt() OVERRIDE; - bool IsUInt() OVERRIDE; - bool IsDouble() OVERRIDE; - bool IsDate() OVERRIDE; - bool IsString() OVERRIDE; - bool IsObject() OVERRIDE; - bool IsArray() OVERRIDE; - bool IsFunction() OVERRIDE; - bool IsSame(CefRefPtr that) OVERRIDE; - bool GetBoolValue() OVERRIDE; - int32 GetIntValue() OVERRIDE; - uint32 GetUIntValue() OVERRIDE; - double GetDoubleValue() OVERRIDE; - CefTime GetDateValue() OVERRIDE; - CefString GetStringValue() OVERRIDE; - bool IsUserCreated() OVERRIDE; - bool HasException() OVERRIDE; - CefRefPtr GetException() OVERRIDE; - bool ClearException() OVERRIDE; - bool WillRethrowExceptions() OVERRIDE; - bool SetRethrowExceptions(bool rethrow) OVERRIDE; - bool HasValue(const CefString& key) OVERRIDE; - bool HasValue(int index) OVERRIDE; - bool DeleteValue(const CefString& key) OVERRIDE; - bool DeleteValue(int index) OVERRIDE; - CefRefPtr GetValue(const CefString& key) OVERRIDE; - CefRefPtr GetValue(int index) OVERRIDE; - bool SetValue(const CefString& key, CefRefPtr value, - PropertyAttribute attribute) OVERRIDE; - bool SetValue(int index, CefRefPtr value) OVERRIDE; - bool SetValue(const CefString& key, AccessControl settings, - PropertyAttribute attribute) OVERRIDE; - bool GetKeys(std::vector& keys) OVERRIDE; - bool SetUserData(CefRefPtr user_data) OVERRIDE; - CefRefPtr GetUserData() OVERRIDE; - int GetExternallyAllocatedMemory() OVERRIDE; - int AdjustExternallyAllocatedMemory(int change_in_bytes) OVERRIDE; - int GetArrayLength() OVERRIDE; - CefString GetFunctionName() OVERRIDE; - CefRefPtr GetFunctionHandler() OVERRIDE; - CefRefPtr ExecuteFunction(CefRefPtr object, - const CefV8ValueList& arguments) OVERRIDE; - CefRefPtr ExecuteFunctionWithContext( - CefRefPtr context, CefRefPtr object, - const CefV8ValueList& arguments) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_V8VALUE_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/value_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/value_ctocpp.cc deleted file mode 100644 index a7506217..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/value_ctocpp.cc +++ /dev/null @@ -1,398 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/binary_value_ctocpp.h" -#include "libcef_dll/ctocpp/dictionary_value_ctocpp.h" -#include "libcef_dll/ctocpp/list_value_ctocpp.h" -#include "libcef_dll/ctocpp/value_ctocpp.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefValue::Create() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_value_t* _retval = cef_value_create(); - - // Return type: refptr_same - return CefValueCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefValueCToCpp::IsValid() { - cef_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_valid)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_valid(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefValueCToCpp::IsOwned() { - cef_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_owned)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_owned(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefValueCToCpp::IsReadOnly() { - cef_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_read_only)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_read_only(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefValueCToCpp::IsSame(CefRefPtr that) { - cef_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_same)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: that; type: refptr_same - DCHECK(that.get()); - if (!that.get()) - return false; - - // Execute - int _retval = _struct->is_same(_struct, - CefValueCToCpp::Unwrap(that)); - - // Return type: bool - return _retval?true:false; -} - -bool CefValueCToCpp::IsEqual(CefRefPtr that) { - cef_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_equal)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: that; type: refptr_same - DCHECK(that.get()); - if (!that.get()) - return false; - - // Execute - int _retval = _struct->is_equal(_struct, - CefValueCToCpp::Unwrap(that)); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefValueCToCpp::Copy() { - cef_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, copy)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_value_t* _retval = _struct->copy(_struct); - - // Return type: refptr_same - return CefValueCToCpp::Wrap(_retval); -} - -CefValueType CefValueCToCpp::GetType() { - cef_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_type)) - return VTYPE_INVALID; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_value_type_t _retval = _struct->get_type(_struct); - - // Return type: simple - return _retval; -} - -bool CefValueCToCpp::GetBool() { - cef_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_bool)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_bool(_struct); - - // Return type: bool - return _retval?true:false; -} - -int CefValueCToCpp::GetInt() { - cef_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_int)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_int(_struct); - - // Return type: simple - return _retval; -} - -double CefValueCToCpp::GetDouble() { - cef_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_double)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - double _retval = _struct->get_double(_struct); - - // Return type: simple - return _retval; -} - -CefString CefValueCToCpp::GetString() { - cef_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_string)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_string(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefRefPtr CefValueCToCpp::GetBinary() { - cef_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_binary)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_binary_value_t* _retval = _struct->get_binary(_struct); - - // Return type: refptr_same - return CefBinaryValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefValueCToCpp::GetDictionary() { - cef_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_dictionary)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_dictionary_value_t* _retval = _struct->get_dictionary(_struct); - - // Return type: refptr_same - return CefDictionaryValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefValueCToCpp::GetList() { - cef_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_list)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_list_value_t* _retval = _struct->get_list(_struct); - - // Return type: refptr_same - return CefListValueCToCpp::Wrap(_retval); -} - -bool CefValueCToCpp::SetNull() { - cef_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_null)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->set_null(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefValueCToCpp::SetBool(bool value) { - cef_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_bool)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->set_bool(_struct, - value); - - // Return type: bool - return _retval?true:false; -} - -bool CefValueCToCpp::SetInt(int value) { - cef_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_int)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->set_int(_struct, - value); - - // Return type: bool - return _retval?true:false; -} - -bool CefValueCToCpp::SetDouble(double value) { - cef_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_double)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->set_double(_struct, - value); - - // Return type: bool - return _retval?true:false; -} - -bool CefValueCToCpp::SetString(const CefString& value) { - cef_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_string)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: value - - // Execute - int _retval = _struct->set_string(_struct, - value.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefValueCToCpp::SetBinary(CefRefPtr value) { - cef_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_binary)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: value; type: refptr_same - DCHECK(value.get()); - if (!value.get()) - return false; - - // Execute - int _retval = _struct->set_binary(_struct, - CefBinaryValueCToCpp::Unwrap(value)); - - // Return type: bool - return _retval?true:false; -} - -bool CefValueCToCpp::SetDictionary(CefRefPtr value) { - cef_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_dictionary)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: value; type: refptr_same - DCHECK(value.get()); - if (!value.get()) - return false; - - // Execute - int _retval = _struct->set_dictionary(_struct, - CefDictionaryValueCToCpp::Unwrap(value)); - - // Return type: bool - return _retval?true:false; -} - -bool CefValueCToCpp::SetList(CefRefPtr value) { - cef_value_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, set_list)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: value; type: refptr_same - DCHECK(value.get()); - if (!value.get()) - return false; - - // Execute - int _retval = _struct->set_list(_struct, - CefListValueCToCpp::Unwrap(value)); - - // Return type: bool - return _retval?true:false; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefValueCToCpp::CefValueCToCpp() { -} - -template<> cef_value_t* CefCToCpp::UnwrapDerived(CefWrapperType type, CefValue* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_VALUE; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/value_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/value_ctocpp.h deleted file mode 100644 index e4d76cfe..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/value_ctocpp.h +++ /dev/null @@ -1,58 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_VALUE_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_VALUE_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_values.h" -#include "include/capi/cef_values_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefValueCToCpp - : public CefCToCpp { - public: - CefValueCToCpp(); - - // CefValue methods. - bool IsValid() OVERRIDE; - bool IsOwned() OVERRIDE; - bool IsReadOnly() OVERRIDE; - bool IsSame(CefRefPtr that) OVERRIDE; - bool IsEqual(CefRefPtr that) OVERRIDE; - CefRefPtr Copy() OVERRIDE; - CefValueType GetType() OVERRIDE; - bool GetBool() OVERRIDE; - int GetInt() OVERRIDE; - double GetDouble() OVERRIDE; - CefString GetString() OVERRIDE; - CefRefPtr GetBinary() OVERRIDE; - CefRefPtr GetDictionary() OVERRIDE; - CefRefPtr GetList() OVERRIDE; - bool SetNull() OVERRIDE; - bool SetBool(bool value) OVERRIDE; - bool SetInt(int value) OVERRIDE; - bool SetDouble(double value) OVERRIDE; - bool SetString(const CefString& value) OVERRIDE; - bool SetBinary(CefRefPtr value) OVERRIDE; - bool SetDictionary(CefRefPtr value) OVERRIDE; - bool SetList(CefRefPtr value) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_VALUE_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/web_plugin_info_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/web_plugin_info_ctocpp.cc deleted file mode 100644 index 4bc17193..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/web_plugin_info_ctocpp.cc +++ /dev/null @@ -1,101 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/web_plugin_info_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -CefString CefWebPluginInfoCToCpp::GetName() { - cef_web_plugin_info_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_name(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefWebPluginInfoCToCpp::GetPath() { - cef_web_plugin_info_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_path)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_path(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefWebPluginInfoCToCpp::GetVersion() { - cef_web_plugin_info_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_version)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_version(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefWebPluginInfoCToCpp::GetDescription() { - cef_web_plugin_info_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_description)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_description(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefWebPluginInfoCToCpp::CefWebPluginInfoCToCpp() { -} - -template<> cef_web_plugin_info_t* CefCToCpp::UnwrapDerived( - CefWrapperType type, CefWebPluginInfo* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_WEB_PLUGIN_INFO; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/web_plugin_info_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/web_plugin_info_ctocpp.h deleted file mode 100644 index 96a65442..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/web_plugin_info_ctocpp.h +++ /dev/null @@ -1,43 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_WEB_PLUGIN_INFO_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_WEB_PLUGIN_INFO_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_web_plugin.h" -#include "include/capi/cef_web_plugin_capi.h" -#include "include/cef_browser.h" -#include "include/capi/cef_browser_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefWebPluginInfoCToCpp - : public CefCToCpp { - public: - CefWebPluginInfoCToCpp(); - - // CefWebPluginInfo methods. - CefString GetName() OVERRIDE; - CefString GetPath() OVERRIDE; - CefString GetVersion() OVERRIDE; - CefString GetDescription() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_WEB_PLUGIN_INFO_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/xml_reader_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/xml_reader_ctocpp.cc deleted file mode 100644 index a68ec9c2..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/xml_reader_ctocpp.cc +++ /dev/null @@ -1,543 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/stream_reader_ctocpp.h" -#include "libcef_dll/ctocpp/xml_reader_ctocpp.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefXmlReader::Create(CefRefPtr stream, - EncodingType encodingType, const CefString& URI) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: stream; type: refptr_same - DCHECK(stream.get()); - if (!stream.get()) - return NULL; - // Verify param: URI; type: string_byref_const - DCHECK(!URI.empty()); - if (URI.empty()) - return NULL; - - // Execute - cef_xml_reader_t* _retval = cef_xml_reader_create( - CefStreamReaderCToCpp::Unwrap(stream), - encodingType, - URI.GetStruct()); - - // Return type: refptr_same - return CefXmlReaderCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefXmlReaderCToCpp::MoveToNextNode() { - cef_xml_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, move_to_next_node)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->move_to_next_node(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefXmlReaderCToCpp::Close() { - cef_xml_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, close)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->close(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefXmlReaderCToCpp::HasError() { - cef_xml_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, has_error)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->has_error(_struct); - - // Return type: bool - return _retval?true:false; -} - -CefString CefXmlReaderCToCpp::GetError() { - cef_xml_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_error)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_error(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefXmlReader::NodeType CefXmlReaderCToCpp::GetType() { - cef_xml_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_type)) - return XML_NODE_UNSUPPORTED; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_xml_node_type_t _retval = _struct->get_type(_struct); - - // Return type: simple - return _retval; -} - -int CefXmlReaderCToCpp::GetDepth() { - cef_xml_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_depth)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_depth(_struct); - - // Return type: simple - return _retval; -} - -CefString CefXmlReaderCToCpp::GetLocalName() { - cef_xml_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_local_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_local_name(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefXmlReaderCToCpp::GetPrefix() { - cef_xml_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_prefix)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_prefix(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefXmlReaderCToCpp::GetQualifiedName() { - cef_xml_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_qualified_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_qualified_name(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefXmlReaderCToCpp::GetNamespaceURI() { - cef_xml_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_namespace_uri)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_namespace_uri(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefXmlReaderCToCpp::GetBaseURI() { - cef_xml_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_base_uri)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_base_uri(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefXmlReaderCToCpp::GetXmlLang() { - cef_xml_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_xml_lang)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_xml_lang(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -bool CefXmlReaderCToCpp::IsEmptyElement() { - cef_xml_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_empty_element)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_empty_element(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefXmlReaderCToCpp::HasValue() { - cef_xml_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, has_value)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->has_value(_struct); - - // Return type: bool - return _retval?true:false; -} - -CefString CefXmlReaderCToCpp::GetValue() { - cef_xml_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_value)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_value(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -bool CefXmlReaderCToCpp::HasAttributes() { - cef_xml_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, has_attributes)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->has_attributes(_struct); - - // Return type: bool - return _retval?true:false; -} - -size_t CefXmlReaderCToCpp::GetAttributeCount() { - cef_xml_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_attribute_count)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - size_t _retval = _struct->get_attribute_count(_struct); - - // Return type: simple - return _retval; -} - -CefString CefXmlReaderCToCpp::GetAttribute(int index) { - cef_xml_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_attribute_byindex)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return CefString(); - - // Execute - cef_string_userfree_t _retval = _struct->get_attribute_byindex(_struct, - index); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefXmlReaderCToCpp::GetAttribute(const CefString& qualifiedName) { - cef_xml_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_attribute_byqname)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: qualifiedName; type: string_byref_const - DCHECK(!qualifiedName.empty()); - if (qualifiedName.empty()) - return CefString(); - - // Execute - cef_string_userfree_t _retval = _struct->get_attribute_byqname(_struct, - qualifiedName.GetStruct()); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefXmlReaderCToCpp::GetAttribute(const CefString& localName, - const CefString& namespaceURI) { - cef_xml_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_attribute_bylname)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: localName; type: string_byref_const - DCHECK(!localName.empty()); - if (localName.empty()) - return CefString(); - // Verify param: namespaceURI; type: string_byref_const - DCHECK(!namespaceURI.empty()); - if (namespaceURI.empty()) - return CefString(); - - // Execute - cef_string_userfree_t _retval = _struct->get_attribute_bylname(_struct, - localName.GetStruct(), - namespaceURI.GetStruct()); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefXmlReaderCToCpp::GetInnerXml() { - cef_xml_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_inner_xml)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_inner_xml(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefXmlReaderCToCpp::GetOuterXml() { - cef_xml_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_outer_xml)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_outer_xml(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -int CefXmlReaderCToCpp::GetLineNumber() { - cef_xml_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_line_number)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->get_line_number(_struct); - - // Return type: simple - return _retval; -} - -bool CefXmlReaderCToCpp::MoveToAttribute(int index) { - cef_xml_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, move_to_attribute_byindex)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return false; - - // Execute - int _retval = _struct->move_to_attribute_byindex(_struct, - index); - - // Return type: bool - return _retval?true:false; -} - -bool CefXmlReaderCToCpp::MoveToAttribute(const CefString& qualifiedName) { - cef_xml_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, move_to_attribute_byqname)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: qualifiedName; type: string_byref_const - DCHECK(!qualifiedName.empty()); - if (qualifiedName.empty()) - return false; - - // Execute - int _retval = _struct->move_to_attribute_byqname(_struct, - qualifiedName.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefXmlReaderCToCpp::MoveToAttribute(const CefString& localName, - const CefString& namespaceURI) { - cef_xml_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, move_to_attribute_bylname)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: localName; type: string_byref_const - DCHECK(!localName.empty()); - if (localName.empty()) - return false; - // Verify param: namespaceURI; type: string_byref_const - DCHECK(!namespaceURI.empty()); - if (namespaceURI.empty()) - return false; - - // Execute - int _retval = _struct->move_to_attribute_bylname(_struct, - localName.GetStruct(), - namespaceURI.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefXmlReaderCToCpp::MoveToFirstAttribute() { - cef_xml_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, move_to_first_attribute)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->move_to_first_attribute(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefXmlReaderCToCpp::MoveToNextAttribute() { - cef_xml_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, move_to_next_attribute)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->move_to_next_attribute(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefXmlReaderCToCpp::MoveToCarryingElement() { - cef_xml_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, move_to_carrying_element)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->move_to_carrying_element(_struct); - - // Return type: bool - return _retval?true:false; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefXmlReaderCToCpp::CefXmlReaderCToCpp() { -} - -template<> cef_xml_reader_t* CefCToCpp::UnwrapDerived(CefWrapperType type, CefXmlReader* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_XML_READER; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/xml_reader_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/xml_reader_ctocpp.h deleted file mode 100644 index 84a8e17b..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/xml_reader_ctocpp.h +++ /dev/null @@ -1,67 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_XML_READER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_XML_READER_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_xml_reader.h" -#include "include/capi/cef_xml_reader_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefXmlReaderCToCpp - : public CefCToCpp { - public: - CefXmlReaderCToCpp(); - - // CefXmlReader methods. - bool MoveToNextNode() OVERRIDE; - bool Close() OVERRIDE; - bool HasError() OVERRIDE; - CefString GetError() OVERRIDE; - NodeType GetType() OVERRIDE; - int GetDepth() OVERRIDE; - CefString GetLocalName() OVERRIDE; - CefString GetPrefix() OVERRIDE; - CefString GetQualifiedName() OVERRIDE; - CefString GetNamespaceURI() OVERRIDE; - CefString GetBaseURI() OVERRIDE; - CefString GetXmlLang() OVERRIDE; - bool IsEmptyElement() OVERRIDE; - bool HasValue() OVERRIDE; - CefString GetValue() OVERRIDE; - bool HasAttributes() OVERRIDE; - size_t GetAttributeCount() OVERRIDE; - CefString GetAttribute(int index) OVERRIDE; - CefString GetAttribute(const CefString& qualifiedName) OVERRIDE; - CefString GetAttribute(const CefString& localName, - const CefString& namespaceURI) OVERRIDE; - CefString GetInnerXml() OVERRIDE; - CefString GetOuterXml() OVERRIDE; - int GetLineNumber() OVERRIDE; - bool MoveToAttribute(int index) OVERRIDE; - bool MoveToAttribute(const CefString& qualifiedName) OVERRIDE; - bool MoveToAttribute(const CefString& localName, - const CefString& namespaceURI) OVERRIDE; - bool MoveToFirstAttribute() OVERRIDE; - bool MoveToNextAttribute() OVERRIDE; - bool MoveToCarryingElement() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_XML_READER_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/zip_reader_ctocpp.cc b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/zip_reader_ctocpp.cc deleted file mode 100644 index 6a7a5661..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/zip_reader_ctocpp.cc +++ /dev/null @@ -1,245 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/stream_reader_ctocpp.h" -#include "libcef_dll/ctocpp/zip_reader_ctocpp.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefZipReader::Create( - CefRefPtr stream) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: stream; type: refptr_same - DCHECK(stream.get()); - if (!stream.get()) - return NULL; - - // Execute - cef_zip_reader_t* _retval = cef_zip_reader_create( - CefStreamReaderCToCpp::Unwrap(stream)); - - // Return type: refptr_same - return CefZipReaderCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefZipReaderCToCpp::MoveToFirstFile() { - cef_zip_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, move_to_first_file)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->move_to_first_file(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefZipReaderCToCpp::MoveToNextFile() { - cef_zip_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, move_to_next_file)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->move_to_next_file(_struct); - - // Return type: bool - return _retval?true:false; -} - -bool CefZipReaderCToCpp::MoveToFile(const CefString& fileName, - bool caseSensitive) { - cef_zip_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, move_to_file)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: fileName; type: string_byref_const - DCHECK(!fileName.empty()); - if (fileName.empty()) - return false; - - // Execute - int _retval = _struct->move_to_file(_struct, - fileName.GetStruct(), - caseSensitive); - - // Return type: bool - return _retval?true:false; -} - -bool CefZipReaderCToCpp::Close() { - cef_zip_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, close)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->close(_struct); - - // Return type: bool - return _retval?true:false; -} - -CefString CefZipReaderCToCpp::GetFileName() { - cef_zip_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_file_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_file_name(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -int64 CefZipReaderCToCpp::GetFileSize() { - cef_zip_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_file_size)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int64 _retval = _struct->get_file_size(_struct); - - // Return type: simple - return _retval; -} - -CefTime CefZipReaderCToCpp::GetFileLastModified() { - cef_zip_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_file_last_modified)) - return CefTime(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_time_t _retval = _struct->get_file_last_modified(_struct); - - // Return type: simple - return _retval; -} - -bool CefZipReaderCToCpp::OpenFile(const CefString& password) { - cef_zip_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, open_file)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: password - - // Execute - int _retval = _struct->open_file(_struct, - password.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefZipReaderCToCpp::CloseFile() { - cef_zip_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, close_file)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->close_file(_struct); - - // Return type: bool - return _retval?true:false; -} - -int CefZipReaderCToCpp::ReadFile(void* buffer, size_t bufferSize) { - cef_zip_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, read_file)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: buffer; type: simple_byaddr - DCHECK(buffer); - if (!buffer) - return 0; - - // Execute - int _retval = _struct->read_file(_struct, - buffer, - bufferSize); - - // Return type: simple - return _retval; -} - -int64 CefZipReaderCToCpp::Tell() { - cef_zip_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, tell)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int64 _retval = _struct->tell(_struct); - - // Return type: simple - return _retval; -} - -bool CefZipReaderCToCpp::Eof() { - cef_zip_reader_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, eof)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->eof(_struct); - - // Return type: bool - return _retval?true:false; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefZipReaderCToCpp::CefZipReaderCToCpp() { -} - -template<> cef_zip_reader_t* CefCToCpp::UnwrapDerived(CefWrapperType type, CefZipReader* c) { - NOTREACHED() << "Unexpected class type: " << type; - return NULL; -} - -#ifndef NDEBUG -template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; -#endif - -template<> CefWrapperType CefCToCpp::kWrapperType = WT_ZIP_READER; diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/zip_reader_ctocpp.h b/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/zip_reader_ctocpp.h deleted file mode 100644 index f2f6cffd..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/ctocpp/zip_reader_ctocpp.h +++ /dev/null @@ -1,48 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_ZIP_READER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_ZIP_READER_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_zip_reader.h" -#include "include/capi/cef_zip_reader_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefZipReaderCToCpp - : public CefCToCpp { - public: - CefZipReaderCToCpp(); - - // CefZipReader methods. - bool MoveToFirstFile() OVERRIDE; - bool MoveToNextFile() OVERRIDE; - bool MoveToFile(const CefString& fileName, bool caseSensitive) OVERRIDE; - bool Close() OVERRIDE; - CefString GetFileName() OVERRIDE; - int64 GetFileSize() OVERRIDE; - CefTime GetFileLastModified() OVERRIDE; - bool OpenFile(const CefString& password) OVERRIDE; - bool CloseFile() OVERRIDE; - int ReadFile(void* buffer, size_t bufferSize) OVERRIDE; - int64 Tell() OVERRIDE; - bool Eof() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_ZIP_READER_CTOCPP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/transfer_util.cc b/tool_kits/cef/cef_wrapper/libcef_dll/transfer_util.cc deleted file mode 100644 index e9d8d4e2..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/transfer_util.cc +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2009 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. - -#include "transfer_util.h" - -void transfer_string_list_contents(cef_string_list_t fromList, - StringList& toList) -{ - int size = cef_string_list_size(fromList); - CefString value; - - for(int i = 0; i < size; i++) { - cef_string_list_value(fromList, i, value.GetWritableStruct()); - toList.push_back(value); - } -} - -void transfer_string_list_contents(const StringList& fromList, - cef_string_list_t toList) -{ - size_t size = fromList.size(); - for(size_t i = 0; i < size; ++i) - cef_string_list_append(toList, fromList[i].GetStruct()); -} - -void transfer_string_map_contents(cef_string_map_t fromMap, - StringMap& toMap) -{ - int size = cef_string_map_size(fromMap); - CefString key, value; - - for(int i = 0; i < size; ++i) { - cef_string_map_key(fromMap, i, key.GetWritableStruct()); - cef_string_map_value(fromMap, i, value.GetWritableStruct()); - - toMap.insert(std::make_pair(key, value)); - } -} - -void transfer_string_map_contents(const StringMap& fromMap, - cef_string_map_t toMap) -{ - StringMap::const_iterator it = fromMap.begin(); - for(; it != fromMap.end(); ++it) - cef_string_map_append(toMap, it->first.GetStruct(), it->second.GetStruct()); -} - -void transfer_string_multimap_contents(cef_string_multimap_t fromMap, - StringMultimap& toMap) -{ - int size = cef_string_multimap_size(fromMap); - CefString key, value; - - for(int i = 0; i < size; ++i) { - cef_string_multimap_key(fromMap, i, key.GetWritableStruct()); - cef_string_multimap_value(fromMap, i, value.GetWritableStruct()); - - toMap.insert(std::make_pair(key, value)); - } -} - -void transfer_string_multimap_contents(const StringMultimap& fromMap, - cef_string_multimap_t toMap) -{ - StringMultimap::const_iterator it = fromMap.begin(); - for(; it != fromMap.end(); ++it) { - cef_string_multimap_append(toMap, - it->first.GetStruct(), - it->second.GetStruct()); - } -} diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/transfer_util.h b/tool_kits/cef/cef_wrapper/libcef_dll/transfer_util.h deleted file mode 100644 index 88dff1a3..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/transfer_util.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2009 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. - -#ifndef CEF_LIBCEF_DLL_TRANSFER_UTIL_H_ -#define CEF_LIBCEF_DLL_TRANSFER_UTIL_H_ -#pragma once - -#include -#include - -#include "include/internal/cef_string_list.h" -#include "include/internal/cef_string_map.h" -#include "include/internal/cef_string_multimap.h" - -// Copy contents from one list type to another. -typedef std::vector StringList; -void transfer_string_list_contents(cef_string_list_t fromList, - StringList& toList); -void transfer_string_list_contents(const StringList& fromList, - cef_string_list_t toList); - -// Copy contents from one map type to another. -typedef std::map StringMap; -void transfer_string_map_contents(cef_string_map_t fromMap, - StringMap& toMap); -void transfer_string_map_contents(const StringMap& fromMap, - cef_string_map_t toMap); - -// Copy contents from one map type to another. -typedef std::multimap StringMultimap; -void transfer_string_multimap_contents(cef_string_multimap_t fromMap, - StringMultimap& toMap); -void transfer_string_multimap_contents(const StringMultimap& fromMap, - cef_string_multimap_t toMap); - -#endif // CEF_LIBCEF_DLL_TRANSFER_UTIL_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/wrapper/cef_browser_info_map.h b/tool_kits/cef/cef_wrapper/libcef_dll/wrapper/cef_browser_info_map.h deleted file mode 100644 index 9cf1ab48..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/wrapper/cef_browser_info_map.h +++ /dev/null @@ -1,265 +0,0 @@ -// Copyright (c) 2014 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. - -#ifndef CEF_LIBCEF_DLL_WRAPPER_CEF_BROWSER_INFO_MAP_H_ -#define CEF_LIBCEF_DLL_WRAPPER_CEF_BROWSER_INFO_MAP_H_ -#pragma once - -#include - -#include "include/base/cef_logging.h" -#include "include/base/cef_macros.h" - -// Default traits for CefBrowserInfoMap. Override to provide different object -// destruction behavior. -template -struct DefaultCefBrowserInfoMapTraits { - static void Destruct(ObjectType info) { - delete info; - } -}; - -// Maps an arbitrary IdType to an arbitrary ObjectType on a per-browser basis. -template > -class CefBrowserInfoMap { - public: - // Implement this interface to visit and optionally delete objects in the map. - class Visitor { - public: - typedef IdType InfoIdType; - typedef ObjectType InfoObjectType; - - // Called once for each info object. Set |remove| to true to remove the - // object from the map. It is safe to destruct removed objects in this - // callback. Return true to continue iterating or false to stop iterating. - virtual bool OnNextInfo(int browser_id, - InfoIdType info_id, - InfoObjectType info, - bool* remove) =0; - - protected: - virtual ~Visitor() {} - }; - - CefBrowserInfoMap() {} - - ~CefBrowserInfoMap() { - clear(); - } - - // Add an object associated with the specified ID values. - void Add(int browser_id, IdType info_id, ObjectType info) { - InfoMap* info_map = NULL; - typename BrowserInfoMap::const_iterator it_browser = - browser_info_map_.find(browser_id); - if (it_browser == browser_info_map_.end()) { - // No InfoMap exists for the browser ID so create it. - info_map = new InfoMap; - browser_info_map_.insert(std::make_pair(browser_id, info_map)); - } else { - info_map = it_browser->second; - // The specified ID should not already exist in the map. - DCHECK(info_map->find(info_id) == info_map->end()); - } - - info_map->insert(std::make_pair(info_id, info)); - } - - // Find the object with the specified ID values. |visitor| can optionally be - // used to evaluate or remove the object at the same time. If the object is - // removed using the Visitor the caller is responsible for destroying it. - ObjectType Find(int browser_id, IdType info_id, Visitor* vistor) { - if (browser_info_map_.empty()) - return ObjectType(); - - typename BrowserInfoMap::iterator it_browser = - browser_info_map_.find(browser_id); - if (it_browser == browser_info_map_.end()) - return ObjectType(); - - InfoMap* info_map = it_browser->second; - typename InfoMap::iterator it_info = info_map->find(info_id); - if (it_info == info_map->end()) - return ObjectType(); - - ObjectType info = it_info->second; - - bool remove = false; - if (vistor) - vistor->OnNextInfo(browser_id, it_info->first, info, &remove); - if (remove) { - info_map->erase(it_info); - - if (info_map->empty()) { - // No more entries in the InfoMap so remove it. - browser_info_map_.erase(it_browser); - delete info_map; - } - } - - return info; - } - - // Find all objects. If any objects are removed using the Visitor the caller - // is responsible for destroying them. - void FindAll(Visitor* visitor) { - DCHECK(visitor); - - if (browser_info_map_.empty()) - return; - - bool remove, keepgoing = true; - - typename BrowserInfoMap::iterator it_browser = browser_info_map_.begin(); - while (it_browser != browser_info_map_.end()) { - InfoMap* info_map = it_browser->second; - - typename InfoMap::iterator it_info = info_map->begin(); - while (it_info != info_map->end()) { - remove = false; - keepgoing = visitor->OnNextInfo(it_browser->first, it_info->first, - it_info->second, &remove); - - if (remove) - info_map->erase(it_info++); - else - ++it_info; - - if (!keepgoing) - break; - } - - if (info_map->empty()) { - // No more entries in the InfoMap so remove it. - browser_info_map_.erase(it_browser++); - delete info_map; - } else { - ++it_browser; - } - - if (!keepgoing) - break; - } - } - - // Find all objects associated with the specified browser. If any objects are - // removed using the Visitor the caller is responsible for destroying them. - void FindAll(int browser_id, Visitor* visitor) { - DCHECK(visitor); - - if (browser_info_map_.empty()) - return; - - typename BrowserInfoMap::iterator it_browser = - browser_info_map_.find(browser_id); - if (it_browser == browser_info_map_.end()) - return; - - InfoMap* info_map = it_browser->second; - bool remove, keepgoing; - - typename InfoMap::iterator it_info = info_map->begin(); - while (it_info != info_map->end()) { - remove = false; - keepgoing = visitor->OnNextInfo(browser_id, it_info->first, - it_info->second, &remove); - - if (remove) - info_map->erase(it_info++); - else - ++it_info; - - if (!keepgoing) - break; - } - - if (info_map->empty()) { - // No more entries in the InfoMap so remove it. - browser_info_map_.erase(it_browser); - delete info_map; - } - } - - // Returns true if the map is empty. - bool empty() const { return browser_info_map_.empty(); } - - // Returns the number of objects in the map. - size_t size() const { - if (browser_info_map_.empty()) - return 0; - - size_t size = 0; - typename BrowserInfoMap::const_iterator it_browser = - browser_info_map_.begin(); - for (; it_browser != browser_info_map_.end(); ++it_browser) - size += it_browser->second->size(); - return size; - } - - // Returns the number of objects in the map that are associated with the - // specified browser. - size_t size(int browser_id) const { - if (browser_info_map_.empty()) - return 0; - - typename BrowserInfoMap::const_iterator it_browser = - browser_info_map_.find(browser_id); - if (it_browser != browser_info_map_.end()) - return it_browser->second->size(); - - return 0; - } - - // Remove all objects from the map. The objects will be destructed. - void clear() { - if (browser_info_map_.empty()) - return; - - typename BrowserInfoMap::const_iterator it_browser = - browser_info_map_.begin(); - for (; it_browser != browser_info_map_.end(); ++it_browser) { - InfoMap* info_map = it_browser->second; - typename InfoMap::const_iterator it_info = info_map->begin(); - for (; it_info != info_map->end(); ++it_info) - Traits::Destruct(it_info->second); - delete info_map; - } - browser_info_map_.clear(); - } - - // Remove all objects from the map that are associated with the specified - // browser. The objects will be destructed. - void clear(int browser_id) { - if (browser_info_map_.empty()) - return; - - typename BrowserInfoMap::iterator it_browser = - browser_info_map_.find(browser_id); - if (it_browser == browser_info_map_.end()) - return; - - InfoMap* info_map = it_browser->second; - typename InfoMap::const_iterator it_info = info_map->begin(); - for (; it_info != info_map->end(); ++it_info) - Traits::Destruct(it_info->second); - - browser_info_map_.erase(it_browser); - delete info_map; - } - - private: - // Map IdType to ObjectType instance. - typedef std::map InfoMap; - // Map browser ID to InfoMap instance. - typedef std::map BrowserInfoMap; - - BrowserInfoMap browser_info_map_; - - DISALLOW_COPY_AND_ASSIGN(CefBrowserInfoMap); -}; - - -#endif // CEF_LIBCEF_DLL_WRAPPER_CEF_BROWSER_INFO_MAP_H_ diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/wrapper/cef_byte_read_handler.cc b/tool_kits/cef/cef_wrapper/libcef_dll/wrapper/cef_byte_read_handler.cc deleted file mode 100644 index 3d29feeb..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/wrapper/cef_byte_read_handler.cc +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2010 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. - -#include "include/wrapper/cef_byte_read_handler.h" - -#include -#include -#include - -CefByteReadHandler::CefByteReadHandler(const unsigned char* bytes, size_t size, - CefRefPtr source) - : bytes_(bytes), size_(size), offset_(0), source_(source) { -} - -size_t CefByteReadHandler::Read(void* ptr, size_t size, size_t n) { - base::AutoLock lock_scope(lock_); - size_t s = static_cast(size_ - offset_) / size; - size_t ret = std::min(n, s); - memcpy(ptr, bytes_ + offset_, ret * size); - offset_ += ret * size; - return ret; -} - -int CefByteReadHandler::Seek(int64 offset, int whence) { - int rv = -1L; - base::AutoLock lock_scope(lock_); - switch (whence) { - case SEEK_CUR: - if (offset_ + offset > size_ || offset_ + offset < 0) - break; - offset_ += offset; - rv = 0; - break; - case SEEK_END: { -#if defined(OS_WIN) - int64 offset_abs = _abs64(offset); -#else - int64 offset_abs = std::abs(offset); -#endif - if (offset_abs > size_) - break; - offset_ = size_ - offset_abs; - rv = 0; - break; - } - case SEEK_SET: - if (offset > size_ || offset < 0) - break; - offset_ = offset; - rv = 0; - break; - } - - return rv; -} - -int64 CefByteReadHandler::Tell() { - base::AutoLock lock_scope(lock_); - return offset_; -} - -int CefByteReadHandler::Eof() { - base::AutoLock lock_scope(lock_); - return (offset_ >= size_); -} diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/wrapper/cef_closure_task.cc b/tool_kits/cef/cef_wrapper/libcef_dll/wrapper/cef_closure_task.cc deleted file mode 100644 index 0b493905..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/wrapper/cef_closure_task.cc +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2014 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. - -#include "include/wrapper/cef_closure_task.h" -#include "include/base/cef_callback.h" - -namespace { - -class CefClosureTask : public CefTask { - public: - explicit CefClosureTask(const base::Closure& closure) - : closure_(closure) { - } - - // CefTask method - virtual void Execute() OVERRIDE { - closure_.Run(); - closure_.Reset(); - } - - private: - base::Closure closure_; - - IMPLEMENT_REFCOUNTING(CefClosureTask); - DISALLOW_COPY_AND_ASSIGN(CefClosureTask); -}; - -} // namespace - -CefRefPtr CefCreateClosureTask(const base::Closure& closure) { - return new CefClosureTask(closure); -} - -bool CefPostTask(CefThreadId threadId, const base::Closure& closure) { - return CefPostTask(threadId, new CefClosureTask(closure)); -} - -bool CefPostDelayedTask(CefThreadId threadId, const base::Closure& closure, - int64 delay_ms) { - return CefPostDelayedTask(threadId, new CefClosureTask(closure), delay_ms); -} diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/wrapper/cef_message_router.cc b/tool_kits/cef/cef_wrapper/libcef_dll/wrapper/cef_message_router.cc deleted file mode 100644 index dc6af1c4..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/wrapper/cef_message_router.cc +++ /dev/null @@ -1,1160 +0,0 @@ -// Copyright (c) 2014 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. - -#include "include/wrapper/cef_message_router.h" - -#include -#include - -#include "include/base/cef_bind.h" -#include "include/base/cef_macros.h" -#include "include/cef_task.h" -#include "include/wrapper/cef_closure_task.h" -#include "include/wrapper/cef_helpers.h" -#include "libcef_dll/wrapper/cef_browser_info_map.h" - -namespace { - -// ID value reserved for internal use. -const int kReservedId = 0; - -// Appended to the JS function name for related IPC messages. -const char kMessageSuffix[] = "Msg"; - -// JS object member argument names for cefQuery. -const char kMemberRequest[] = "request"; -const char kMemberOnSuccess[] = "onSuccess"; -const char kMemberOnFailure[] = "onFailure"; -const char kMemberPersistent[] = "persistent"; - -// Default error information when a query is canceled. -const int kCanceledErrorCode = -1; -const char kCanceledErrorMessage[] = "The query has been canceled"; - -// Validate configuration settings. -bool ValidateConfig(CefMessageRouterConfig& config) { - // Must specify function names. - if (config.js_cancel_function.empty() || - config.js_query_function.empty()) { - return false; - } - - return true; -} - -// Helper template for generated ID values. -template -class IdGenerator { - public: - IdGenerator() : next_id_(kReservedId) {} - - T GetNextId() { - T id = ++next_id_; - if (id == kReservedId) // In case the integer value wraps. - id = ++next_id_; - return id; - } - - private: - T next_id_; - - DISALLOW_COPY_AND_ASSIGN(IdGenerator); -}; - -// Browser-side router implementation. -class CefMessageRouterBrowserSideImpl : public CefMessageRouterBrowserSide { - public: - // Implementation of the Callback interface. - class CallbackImpl : public CefMessageRouterBrowserSide::Callback { - public: - CallbackImpl(CefRefPtr router, - int browser_id, - int64 query_id, - bool persistent) - : router_(router), - browser_id_(browser_id), - query_id_(query_id), - persistent_(persistent) { - } - virtual ~CallbackImpl() { - // Hitting this DCHECK means that you didn't call Success or Failure - // on the Callback after returning true from Handler::OnQuery. You must - // call Failure to terminate persistent queries. - DCHECK(!router_); - } - - virtual void Success(const CefString& response) OVERRIDE { - if (!CefCurrentlyOn(TID_UI)) { - // Must execute on the UI thread to access member variables. - CefPostTask(TID_UI, - base::Bind(&CallbackImpl::Success, this, response)); - return; - } - - if (router_) { - CefPostTask(TID_UI, - base::Bind(&CefMessageRouterBrowserSideImpl::OnCallbackSuccess, - router_, browser_id_, query_id_, response)); - - if (!persistent_) { - // Non-persistent callbacks are only good for a single use. - router_ = NULL; - } - } - } - - virtual void Failure(int error_code, - const CefString& error_message) OVERRIDE { - if (!CefCurrentlyOn(TID_UI)) { - // Must execute on the UI thread to access member variables. - CefPostTask(TID_UI, - base::Bind(&CallbackImpl::Failure, this, - error_code, error_message)); - return; - } - - if (router_) { - CefPostTask(TID_UI, - base::Bind(&CefMessageRouterBrowserSideImpl::OnCallbackFailure, - router_, browser_id_, query_id_, error_code, - error_message)); - - // Failure always invalidates the callback. - router_ = NULL; - } - } - - void Detach() { - CEF_REQUIRE_UI_THREAD(); - router_ = NULL; - } - - private: - CefRefPtr router_; - const int browser_id_; - const int64 query_id_; - const bool persistent_; - - IMPLEMENT_REFCOUNTING(CallbackImpl); - }; - - explicit CefMessageRouterBrowserSideImpl(const CefMessageRouterConfig& config) - : config_(config), - query_message_name_( - config.js_query_function.ToString() + kMessageSuffix), - cancel_message_name_( - config.js_cancel_function.ToString() + kMessageSuffix) { - } - - virtual ~CefMessageRouterBrowserSideImpl() { - // There should be no pending queries when the router is deleted. - DCHECK(browser_query_info_map_.empty()); - } - - virtual bool AddHandler(Handler* handler, bool first) OVERRIDE { - CEF_REQUIRE_UI_THREAD(); - if (handler_set_.find(handler) == handler_set_.end()) { - handler_set_.insert( - first ? handler_set_.begin() : handler_set_.end(), handler); - return true; - } - return false; - } - - virtual bool RemoveHandler(Handler* handler) OVERRIDE { - CEF_REQUIRE_UI_THREAD(); - if (handler_set_.erase(handler) > 0) { - CancelPendingFor(NULL, handler, true); - return true; - } - return false; - } - - virtual void CancelPending(CefRefPtr browser, - Handler* handler) OVERRIDE { - CancelPendingFor(browser, handler, true); - } - - virtual int GetPendingCount(CefRefPtr browser, - Handler* handler) OVERRIDE { - CEF_REQUIRE_UI_THREAD(); - - if (browser_query_info_map_.empty()) - return 0; - - if (handler) { - // Need to iterate over each QueryInfo object to test the handler. - class Visitor : public BrowserQueryInfoMap::Visitor { - public: - explicit Visitor(Handler* handler) - : handler_(handler), - count_(0) {} - - virtual bool OnNextInfo(int browser_id, - InfoIdType info_id, - InfoObjectType info, - bool* remove) OVERRIDE { - if (info->handler == handler_) - count_++; - return true; - } - - int count() const { return count_; } - - private: - Handler* handler_; - int count_; - }; - - Visitor visitor(handler); - - if (browser.get()) { - // Count queries associated with the specified browser. - browser_query_info_map_.FindAll( - browser->GetIdentifier(), &visitor); - } else { - // Count all queries for all browsers. - browser_query_info_map_.FindAll(&visitor); - } - - return visitor.count(); - } else if (browser.get()) { - return static_cast( - browser_query_info_map_.size(browser->GetIdentifier())); - } else { - return static_cast(browser_query_info_map_.size()); - } - - return 0; - } - - virtual void OnBeforeClose(CefRefPtr browser) OVERRIDE { - CancelPendingFor(browser, NULL, false); - } - - virtual void OnRenderProcessTerminated( - CefRefPtr browser) OVERRIDE { - CancelPendingFor(browser, NULL, false); - } - - virtual void OnBeforeBrowse(CefRefPtr browser, - CefRefPtr frame) OVERRIDE { - if (frame->IsMain()) - CancelPendingFor(browser, NULL, false); - } - - virtual bool OnProcessMessageReceived( - CefRefPtr browser, - CefProcessId source_process, - CefRefPtr message) OVERRIDE { - CEF_REQUIRE_UI_THREAD(); - - const std::string& message_name = message->GetName(); - if (message_name == query_message_name_) { - CefRefPtr args = message->GetArgumentList(); - DCHECK_EQ(args->GetSize(), 7U); - - const int64 frame_id = CefInt64Set(args->GetInt(0), args->GetInt(1)); - const bool is_main_frame = args->GetBool(2); - const int context_id = args->GetInt(3); - const int request_id = args->GetInt(4); - const CefString& request = args->GetString(5); - const bool persistent = args->GetBool(6); - - if (handler_set_.empty()) { - // No handlers so cancel the query. - CancelUnhandledQuery(browser, context_id, request_id); - return true; - } - - const int browser_id = browser->GetIdentifier(); - const int64 query_id = query_id_generator_.GetNextId(); - - CefRefPtr frame; - if (is_main_frame) - frame = browser->GetMainFrame(); - else - frame = browser->GetFrame(frame_id); - CefRefPtr callback( - new CallbackImpl(this, browser_id, query_id, persistent)); - - // Make a copy of the handler list in case the user adds or removes a - // handler while we're iterating. - HandlerSet handler_set = handler_set_; - - bool handled = false; - HandlerSet::const_iterator it_handler = handler_set.begin(); - for (; it_handler != handler_set.end(); ++it_handler) { - handled = (*it_handler)->OnQuery(browser, frame, query_id, request, - persistent, callback.get()); - if (handled) - break; - } - - // If the query isn't handled nothing should be keeping a reference to - // the callback. - DCHECK(handled || callback->HasOneRef()); - - if (handled) { - // Persist the query information until the callback executes. - // It's safe to do this here because the callback will execute - // asynchronously. - QueryInfo* info = new QueryInfo; - info->browser = browser; - info->frame_id = frame_id; - info->is_main_frame = is_main_frame; - info->context_id = context_id; - info->request_id = request_id; - info->persistent = persistent; - info->callback = callback; - info->handler = *(it_handler); - browser_query_info_map_.Add(browser_id, query_id, info); - } else { - // Invalidate the callback. - callback->Detach(); - - // No one chose to handle the query so cancel it. - CancelUnhandledQuery(browser, context_id, request_id); - } - - return true; - } else if (message_name == cancel_message_name_) { - CefRefPtr args = message->GetArgumentList(); - DCHECK_EQ(args->GetSize(), 2U); - - const int browser_id = browser->GetIdentifier(); - const int context_id = args->GetInt(0); - const int request_id = args->GetInt(1); - - CancelPendingRequest(browser_id, context_id, request_id); - return true; - } - - return false; - } - - private: - // Structure representing a pending query. - struct QueryInfo { - // Browser and frame originated the query. - CefRefPtr browser; - int64 frame_id; - bool is_main_frame; - - // IDs that uniquely identify the query in the renderer process. These - // values are opaque to the browser process but must be returned with the - // response. - int context_id; - int request_id; - - // True if the query is persistent. - bool persistent; - - // Callback associated with the query that must be detached when the query - // is canceled. - CefRefPtr callback; - - // Handler that should be notified if the query is automatically canceled. - Handler* handler; - }; - - // Retrieve a QueryInfo object from the map based on the browser-side query - // ID. If |always_remove| is true then the QueryInfo object will always be - // removed from the map. Othewise, the QueryInfo object will only be removed - // if the query is non-persistent. If |removed| is true the caller is - // responsible for deleting the returned QueryInfo object. - QueryInfo* GetQueryInfo(int browser_id, - int64 query_id, - bool always_remove, - bool* removed) { - class Visitor : public BrowserQueryInfoMap::Visitor { - public: - explicit Visitor(bool always_remove) - : always_remove_(always_remove), - removed_(false) {} - - virtual bool OnNextInfo(int browser_id, - InfoIdType info_id, - InfoObjectType info, - bool* remove) OVERRIDE { - *remove = removed_ = (always_remove_ || !info->persistent); - return true; - } - - bool removed() const { return removed_; } - - private: - const bool always_remove_; - bool removed_; - }; - - Visitor visitor(always_remove); - QueryInfo* info = - browser_query_info_map_.Find(browser_id, query_id, &visitor); - if (info) - *removed = visitor.removed(); - return info; - } - - // Called by CallbackImpl on success. - void OnCallbackSuccess(int browser_id, - int64 query_id, - const CefString& response) { - CEF_REQUIRE_UI_THREAD(); - - bool removed; - QueryInfo* info = GetQueryInfo(browser_id, query_id, false, &removed); - if (info) { - SendQuerySuccess(info, response); - if (removed) - delete info; - } - } - - // Called by CallbackImpl on failure. - void OnCallbackFailure(int browser_id, - int64 query_id, - int error_code, - const CefString& error_message) { - CEF_REQUIRE_UI_THREAD(); - - bool removed; - QueryInfo* info = GetQueryInfo(browser_id, query_id, true, &removed); - if (info) { - SendQueryFailure(info, error_code, error_message); - DCHECK(removed); - delete info; - } - } - - void SendQuerySuccess(QueryInfo* info, - const CefString& response) { - SendQuerySuccess(info->browser, info->context_id, info->request_id, - response); - } - - void SendQuerySuccess(CefRefPtr browser, - int context_id, - int request_id, - const CefString& response) { - CefRefPtr message = - CefProcessMessage::Create(query_message_name_); - CefRefPtr args = message->GetArgumentList(); - args->SetInt(0, context_id); - args->SetInt(1, request_id); - args->SetBool(2, true); // Indicates a success result. - args->SetString(3, response); - browser->SendProcessMessage(PID_RENDERER, message); - } - - void SendQueryFailure(QueryInfo* info, - int error_code, - const CefString& error_message) { - SendQueryFailure(info->browser, info->context_id, info->request_id, - error_code, error_message); - } - - void SendQueryFailure(CefRefPtr browser, - int context_id, - int request_id, - int error_code, - const CefString& error_message) { - CefRefPtr message = - CefProcessMessage::Create(query_message_name_); - CefRefPtr args = message->GetArgumentList(); - args->SetInt(0, context_id); - args->SetInt(1, request_id); - args->SetBool(2, false); // Indicates a failure result. - args->SetInt(3, error_code); - args->SetString(4, error_message); - browser->SendProcessMessage(PID_RENDERER, message); - } - - // Cancel a query that has not been sent to a handler. - void CancelUnhandledQuery(CefRefPtr browser, int context_id, - int request_id) { - SendQueryFailure(browser, context_id, request_id, kCanceledErrorCode, - kCanceledErrorMessage); - } - - // Cancel a query that has already been sent to a handler. - void CancelQuery(int64 query_id, QueryInfo* info, bool notify_renderer) { - if (notify_renderer) - SendQueryFailure(info, kCanceledErrorCode, kCanceledErrorMessage); - - CefRefPtr frame; - if (info->is_main_frame) - frame = info->browser->GetMainFrame(); - else - frame = info->browser->GetFrame(info->frame_id); - info->handler->OnQueryCanceled(info->browser, frame, query_id); - - // Invalidate the callback. - info->callback->Detach(); - } - - // Cancel all pending queries associated with either |browser| or |handler|. - // If both |browser| and |handler| are NULL all pending queries will be - // canceled. Set |notify_renderer| to true if the renderer should be notified. - void CancelPendingFor(CefRefPtr browser, - Handler* handler, - bool notify_renderer) { - if (!CefCurrentlyOn(TID_UI)) { - // Must execute on the UI thread. - CefPostTask(TID_UI, - base::Bind(&CefMessageRouterBrowserSideImpl::CancelPendingFor, this, - browser, handler, notify_renderer)); - return; - } - - if (browser_query_info_map_.empty()) - return; - - class Visitor : public BrowserQueryInfoMap::Visitor { - public: - Visitor(CefMessageRouterBrowserSideImpl* router, - Handler* handler, - bool notify_renderer) - : router_(router), - handler_(handler), - notify_renderer_(notify_renderer) {} - - virtual bool OnNextInfo(int browser_id, - InfoIdType info_id, - InfoObjectType info, - bool* remove) OVERRIDE { - if (!handler_ || info->handler == handler_) { - *remove = true; - router_->CancelQuery(info_id, info, notify_renderer_); - delete info; - } - return true; - } - - private: - CefMessageRouterBrowserSideImpl* router_; - Handler* handler_; - const bool notify_renderer_; - }; - - Visitor visitor(this, handler, notify_renderer); - - if (browser.get()) { - // Cancel all queries associated with the specified browser. - browser_query_info_map_.FindAll( - browser->GetIdentifier(), &visitor); - } else { - // Cancel all queries for all browsers. - browser_query_info_map_.FindAll(&visitor); - } - } - - // Cancel a query based on the renderer-side IDs. If |request_id| is - // kReservedId all requests associated with |context_id| will be canceled. - void CancelPendingRequest(int browser_id, int context_id, int request_id) { - class Visitor : public BrowserQueryInfoMap::Visitor { - public: - Visitor(CefMessageRouterBrowserSideImpl* router, - int context_id, - int request_id) - : router_(router), - context_id_(context_id), - request_id_(request_id) {} - - virtual bool OnNextInfo(int browser_id, - InfoIdType info_id, - InfoObjectType info, - bool* remove) OVERRIDE { - if (info->context_id == context_id_ && - (request_id_ == kReservedId || info->request_id == request_id_)) { - *remove = true; - router_->CancelQuery(info_id, info, false); - delete info; - - // Stop iterating if only canceling a single request. - return (request_id_ == kReservedId); - } - return true; - } - - private: - CefMessageRouterBrowserSideImpl* router_; - const int context_id_; - const int request_id_; - }; - - Visitor visitor(this, context_id, request_id); - browser_query_info_map_.FindAll(browser_id, &visitor); - } - - const CefMessageRouterConfig config_; - const std::string query_message_name_; - const std::string cancel_message_name_; - - IdGenerator query_id_generator_; - - // Set of currently registered handlers. An entry is added when a handler is - // registered and removed when a handler is unregistered. - typedef std::set HandlerSet; - HandlerSet handler_set_; - - // Map of query ID to QueryInfo instance. An entry is added when a Handler - // indicates that it will handle the query and removed when either the query - // is completed via the Callback, the query is explicitly canceled from the - // renderer process, or the associated context is (or will be) released. - typedef CefBrowserInfoMap BrowserQueryInfoMap; - BrowserQueryInfoMap browser_query_info_map_; - - DISALLOW_COPY_AND_ASSIGN(CefMessageRouterBrowserSideImpl); -}; - -// Renderer-side router implementation. -class CefMessageRouterRendererSideImpl : public CefMessageRouterRendererSide { - public: - class V8HandlerImpl : public CefV8Handler { - public: - V8HandlerImpl( - CefRefPtr router, - const CefMessageRouterConfig& config) - : router_(router), - config_(config), - context_id_(kReservedId) { - } - - virtual bool Execute(const CefString& name, - CefRefPtr object, - const CefV8ValueList& arguments, - CefRefPtr& retval, - CefString& exception) OVERRIDE { - if (name == config_.js_query_function) { - if (arguments.size() != 1 || !arguments[0]->IsObject()) { - exception = "Invalid arguments; expecting a single object"; - return true; - } - - CefRefPtr arg = arguments[0]; - - CefRefPtr requestVal = arg->GetValue(kMemberRequest); - if (!requestVal.get() || !requestVal->IsString()) { - exception = "Invalid arguments; object member '"+ - std::string(kMemberRequest) +"' is required and must " - "have type string"; - return true; - } - - CefRefPtr successVal = NULL; - if (arg->HasValue(kMemberOnSuccess)) { - successVal = arg->GetValue(kMemberOnSuccess); - if (!successVal->IsFunction()) { - exception = "Invalid arguments; object member '"+ - std::string(kMemberOnSuccess) +"' must have type " - "function"; - return true; - } - } - - CefRefPtr failureVal = NULL; - if (arg->HasValue(kMemberOnFailure)) { - failureVal = arg->GetValue(kMemberOnFailure); - if (!failureVal->IsFunction()) { - exception = "Invalid arguments; object member '"+ - std::string(kMemberOnFailure) +"' must have type " - "function"; - return true; - } - } - - CefRefPtr persistentVal = NULL; - if (arg->HasValue(kMemberPersistent)) { - persistentVal = arg->GetValue(kMemberPersistent); - if (!persistentVal->IsBool()) { - exception = "Invalid arguments; object member '"+ - std::string(kMemberPersistent) +"' must have type " - "boolean"; - return true; - } - } - - CefRefPtr context = CefV8Context::GetCurrentContext(); - const int context_id = GetIDForContext(context); - const int64 frame_id = context->GetFrame()->GetIdentifier(); - const bool is_main_frame = context->GetFrame()->IsMain(); - const bool persistent = - (persistentVal.get() && persistentVal->GetBoolValue()); - - const int request_id = router_->SendQuery( - context->GetBrowser(), frame_id, is_main_frame, context_id, - requestVal->GetStringValue(), persistent, successVal, failureVal); - retval = CefV8Value::CreateInt(request_id); - return true; - } else if (name == config_.js_cancel_function) { - if (arguments.size() != 1 || !arguments[0]->IsInt()) { - exception = "Invalid arguments; expecting a single integer"; - return true; - } - - bool result = false; - const int request_id = arguments[0]->GetIntValue(); - if (request_id != kReservedId) { - CefRefPtr context = CefV8Context::GetCurrentContext(); - const int context_id = GetIDForContext(context); - result = router_->SendCancel(context->GetBrowser(), - context_id, request_id); - } - retval = CefV8Value::CreateBool(result); - return true; - } - - return false; - } - - private: - // Don't create the context ID until it's actually needed. - int GetIDForContext(CefRefPtr context) { - if (context_id_ == kReservedId) - context_id_ = router_->CreateIDForContext(context); - return context_id_; - } - - CefRefPtr router_; - const CefMessageRouterConfig config_; - int context_id_; - - IMPLEMENT_REFCOUNTING(V8HandlerImpl); - }; - - explicit CefMessageRouterRendererSideImpl(const CefMessageRouterConfig& config) - : config_(config), - query_message_name_( - config.js_query_function.ToString() + kMessageSuffix), - cancel_message_name_( - config.js_cancel_function.ToString() + kMessageSuffix) { - } - - virtual ~CefMessageRouterRendererSideImpl() { - } - - virtual int GetPendingCount(CefRefPtr browser, - CefRefPtr context) OVERRIDE { - CEF_REQUIRE_RENDERER_THREAD(); - - if (browser_request_info_map_.empty()) - return 0; - - if (context.get()) { - const int context_id = GetIDForContext(context, false); - if (context_id == kReservedId) - return 0; // Nothing associated with the specified context. - - // Need to iterate over each RequestInfo object to test the context. - class Visitor : public BrowserRequestInfoMap::Visitor { - public: - explicit Visitor(int context_id) - : context_id_(context_id), - count_(0) {} - - virtual bool OnNextInfo(int browser_id, - InfoIdType info_id, - InfoObjectType info, - bool* remove) OVERRIDE { - if (info_id.first == context_id_) - count_++; - return true; - } - - int count() const { return count_; } - - private: - int context_id_; - int count_; - }; - - Visitor visitor(context_id); - - if (browser.get()) { - // Count requests associated with the specified browser. - browser_request_info_map_.FindAll( - browser->GetIdentifier(), &visitor); - } else { - // Count all requests for all browsers. - browser_request_info_map_.FindAll(&visitor); - } - - return visitor.count(); - } else if (browser.get()) { - return static_cast( - browser_request_info_map_.size(browser->GetIdentifier())); - } else { - return static_cast(browser_request_info_map_.size()); - } - - return 0; - } - - virtual void OnContextCreated(CefRefPtr browser, - CefRefPtr frame, - CefRefPtr context) OVERRIDE { - CEF_REQUIRE_RENDERER_THREAD(); - - // Register function handlers with the 'window' object. - CefRefPtr window = context->GetGlobal(); - - CefRefPtr handler = new V8HandlerImpl(this, config_); - CefV8Value::PropertyAttribute attributes = - static_cast( - V8_PROPERTY_ATTRIBUTE_READONLY | - V8_PROPERTY_ATTRIBUTE_DONTENUM | - V8_PROPERTY_ATTRIBUTE_DONTDELETE); - - // Add the query function. - CefRefPtr query_func = - CefV8Value::CreateFunction(config_.js_query_function, handler.get()); - window->SetValue(config_.js_query_function, query_func, attributes); - - // Add the cancel function. - CefRefPtr cancel_func = - CefV8Value::CreateFunction(config_.js_cancel_function, handler.get()); - window->SetValue(config_.js_cancel_function, cancel_func, attributes); - } - - virtual void OnContextReleased(CefRefPtr browser, - CefRefPtr frame, - CefRefPtr context) OVERRIDE { - CEF_REQUIRE_RENDERER_THREAD(); - - // Get the context ID and remove the context from the map. - const int context_id = GetIDForContext(context, true); - if (context_id != kReservedId) { - // Cancel all pending requests for the context. - SendCancel(browser, context_id, kReservedId); - } - } - - virtual bool OnProcessMessageReceived( - CefRefPtr browser, - CefProcessId source_process, - CefRefPtr message) OVERRIDE { - CEF_REQUIRE_RENDERER_THREAD(); - - const std::string& message_name = message->GetName(); - if (message_name == query_message_name_) { - CefRefPtr args = message->GetArgumentList(); - DCHECK_GT(args->GetSize(), 3U); - - const int context_id = args->GetInt(0); - const int request_id = args->GetInt(1); - bool is_success = args->GetBool(2); - - if (is_success) { - DCHECK_EQ(args->GetSize(), 4U); - const CefString& response = args->GetString(3); - CefPostTask(TID_RENDERER, - base::Bind( - &CefMessageRouterRendererSideImpl::ExecuteSuccessCallback, this, - browser->GetIdentifier(), context_id, request_id, response)); - } else { - DCHECK_EQ(args->GetSize(), 5U); - int error_code = args->GetInt(3); - const CefString& error_message = args->GetString(4); - CefPostTask(TID_RENDERER, - base::Bind( - &CefMessageRouterRendererSideImpl::ExecuteFailureCallback, this, - browser->GetIdentifier(), context_id, request_id, error_code, - error_message)); - } - - return true; - } - - return false; - } - - private: - // Structure representing a pending request. - struct RequestInfo { - // True if the request is persistent. - bool persistent; - - // Success callback function. May be NULL. - CefRefPtr success_callback; - - // Failure callback function. May be NULL. - CefRefPtr failure_callback; - }; - - // Retrieve a RequestInfo object from the map based on the renderer-side - // IDs. If |always_remove| is true then the RequestInfo object will always be - // removed from the map. Othewise, the RequestInfo object will only be removed - // if the query is non-persistent. If |removed| is true the caller is - // responsible for deleting the returned QueryInfo object. - RequestInfo* GetRequestInfo(int browser_id, - int request_id, - int context_id, - bool always_remove, - bool* removed) { - class Visitor : public BrowserRequestInfoMap::Visitor { - public: - explicit Visitor(bool always_remove) - : always_remove_(always_remove), - removed_(false) {} - - virtual bool OnNextInfo(int browser_id, - InfoIdType info_id, - InfoObjectType info, - bool* remove) OVERRIDE { - *remove = removed_ = (always_remove_ || !info->persistent); - return true; - } - - bool removed() const { return removed_; } - - private: - const bool always_remove_; - bool removed_; - }; - - Visitor visitor(always_remove); - RequestInfo* info = browser_request_info_map_.Find(browser_id, - std::make_pair(request_id, context_id), &visitor); - if (info) - *removed = visitor.removed(); - return info; - } - - // Returns the new request ID. - int SendQuery(CefRefPtr browser, - int64 frame_id, - bool is_main_frame, - int context_id, - const CefString& request, - bool persistent, - CefRefPtr success_callback, - CefRefPtr failure_callback) { - CEF_REQUIRE_RENDERER_THREAD(); - - const int request_id = request_id_generator_.GetNextId(); - - RequestInfo* info = new RequestInfo; - info->persistent = persistent; - info->success_callback = success_callback; - info->failure_callback = failure_callback; - browser_request_info_map_.Add(browser->GetIdentifier(), - std::make_pair(context_id, request_id), info); - - CefRefPtr message = - CefProcessMessage::Create(query_message_name_); - - CefRefPtr args = message->GetArgumentList(); - args->SetInt(0, CefInt64GetLow(frame_id)); - args->SetInt(1, CefInt64GetHigh(frame_id)); - args->SetBool(2, is_main_frame); - args->SetInt(3, context_id); - args->SetInt(4, request_id); - args->SetString(5, request); - args->SetBool(6, persistent); - - browser->SendProcessMessage(PID_BROWSER, message); - - return request_id; - } - - // If |request_id| is kReservedId all requests associated with |context_id| - // will be canceled, otherwise only the specified |request_id| will be - // canceled. Returns true if any request was canceled. - bool SendCancel(CefRefPtr browser, - int context_id, - int request_id) { - CEF_REQUIRE_RENDERER_THREAD(); - - const int browser_id = browser->GetIdentifier(); - - int cancel_count = 0; - if (request_id != kReservedId) { - // Cancel a single request. - bool removed; - RequestInfo* info = - GetRequestInfo(browser_id, context_id, request_id, true, &removed); - if (info) { - DCHECK(removed); - delete info; - cancel_count = 1; - } - } else { - // Cancel all requests with the specified context ID. - class Visitor : public BrowserRequestInfoMap::Visitor { - public: - explicit Visitor(int context_id) - : context_id_(context_id), - cancel_count_(0) {} - - virtual bool OnNextInfo(int browser_id, - InfoIdType info_id, - InfoObjectType info, - bool* remove) OVERRIDE { - if (info_id.first == context_id_) { - *remove = true; - delete info; - cancel_count_++; - } - return true; - } - - int cancel_count() const { return cancel_count_; } - - private: - const int context_id_; - int cancel_count_; - }; - - Visitor visitor(context_id); - browser_request_info_map_.FindAll(browser_id, &visitor); - cancel_count = visitor.cancel_count(); - } - - if (cancel_count > 0) { - CefRefPtr message = - CefProcessMessage::Create(cancel_message_name_); - - CefRefPtr args = message->GetArgumentList(); - args->SetInt(0, context_id); - args->SetInt(1, request_id); - - browser->SendProcessMessage(PID_BROWSER, message); - return true; - } - - return false; - } - - // Execute the onSuccess JavaScript callback. - void ExecuteSuccessCallback(int browser_id, int context_id, int request_id, - const CefString& response) { - CEF_REQUIRE_RENDERER_THREAD(); - - bool removed; - RequestInfo* info = - GetRequestInfo(browser_id, context_id, request_id, false, &removed); - if (!info) - return; - - CefRefPtr context = GetContextByID(context_id); - if (context && info->success_callback) { - CefV8ValueList args; - args.push_back(CefV8Value::CreateString(response)); - info->success_callback->ExecuteFunctionWithContext(context, NULL, args); - } - - if (removed) - delete info; - } - - // Execute the onFailure JavaScript callback. - void ExecuteFailureCallback(int browser_id, int context_id, int request_id, - int error_code, const CefString& error_message) { - CEF_REQUIRE_RENDERER_THREAD(); - - bool removed; - RequestInfo* info = - GetRequestInfo(browser_id, context_id, request_id, true, &removed); - if (!info) - return; - - CefRefPtr context = GetContextByID(context_id); - if (context && info->failure_callback) { - CefV8ValueList args; - args.push_back(CefV8Value::CreateInt(error_code)); - args.push_back(CefV8Value::CreateString(error_message)); - info->failure_callback->ExecuteFunctionWithContext(context, NULL, args); - } - - DCHECK(removed); - delete info; - } - - int CreateIDForContext(CefRefPtr context) { - CEF_REQUIRE_RENDERER_THREAD(); - - // The context should not already have an associated ID. - DCHECK_EQ(GetIDForContext(context, false), kReservedId); - - const int context_id = context_id_generator_.GetNextId(); - context_map_.insert(std::make_pair(context_id, context)); - return context_id; - } - - // Retrieves the existing ID value associated with the specified |context|. - // If |remove| is true the context will also be removed from the map. - int GetIDForContext(CefRefPtr context, bool remove) { - CEF_REQUIRE_RENDERER_THREAD(); - - ContextMap::iterator it = context_map_.begin(); - for (; it != context_map_.end(); ++it) { - if (it->second->IsSame(context)) { - int context_id = it->first; - if (remove) - context_map_.erase(it); - return context_id; - } - } - - return kReservedId; - } - - CefRefPtr GetContextByID(int context_id) { - CEF_REQUIRE_RENDERER_THREAD(); - - ContextMap::const_iterator it = context_map_.find(context_id); - if (it != context_map_.end()) - return it->second; - return NULL; - } - - const CefMessageRouterConfig config_; - const std::string query_message_name_; - const std::string cancel_message_name_; - - IdGenerator context_id_generator_; - IdGenerator request_id_generator_; - - // Map of (request ID, context ID) to RequestInfo for pending queries. An - // entry is added when a request is initiated via the bound function and - // removed when either the request completes, is canceled via the bound - // function, or the associated context is released. - typedef CefBrowserInfoMap, RequestInfo*> - BrowserRequestInfoMap; - BrowserRequestInfoMap browser_request_info_map_; - - // Map of context ID to CefV8Context for existing contexts. An entry is added - // when a bound function is executed for the first time in the context and - // removed when the context is released. - typedef std::map > ContextMap; - ContextMap context_map_; - - DISALLOW_COPY_AND_ASSIGN(CefMessageRouterRendererSideImpl); -}; - -} // namespace - -CefMessageRouterConfig::CefMessageRouterConfig() - : js_query_function("cefQuery"), - js_cancel_function("cefQueryCancel") { -} - -// static -CefRefPtr CefMessageRouterBrowserSide::Create( - const CefMessageRouterConfig& config) { - CefMessageRouterConfig validated_config = config; - if (!ValidateConfig(validated_config)) - return NULL; - return new CefMessageRouterBrowserSideImpl(validated_config); -} - -// static -CefRefPtr CefMessageRouterRendererSide::Create( - const CefMessageRouterConfig& config) { - CefMessageRouterConfig validated_config = config; - if (!ValidateConfig(validated_config)) - return NULL; - return new CefMessageRouterRendererSideImpl(validated_config); -} diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/wrapper/cef_resource_manager.cc b/tool_kits/cef/cef_wrapper/libcef_dll/wrapper/cef_resource_manager.cc deleted file mode 100644 index 4ef45996..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/wrapper/cef_resource_manager.cc +++ /dev/null @@ -1,772 +0,0 @@ -// Copyright (c) 2015 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. - -#include "include/wrapper/cef_resource_manager.h" - -#include -#include - -#include "include/base/cef_macros.h" -#include "include/base/cef_weak_ptr.h" -#include "include/cef_parser.h" -#include "include/wrapper/cef_stream_resource_handler.h" -#include "include/wrapper/cef_zip_archive.h" - -namespace { - -#if defined(OS_WIN) -#define PATH_SEP '\\' -#else -#define PATH_SEP '/' -#endif - -// Returns |url| without the query or fragment components, if any. -std::string GetUrlWithoutQueryOrFragment(const std::string& url) { - // Find the first instance of '?' or '#'. - const size_t pos = std::min(url.find('?'), url.find('#')); - if (pos != std::string::npos) - return url.substr(0, pos); - - return url; -} - -// Determine the mime type based on the |url| file extension. -std::string GetMimeType(const std::string& url) { - std::string mime_type; - const std::string& url_without_query = GetUrlWithoutQueryOrFragment(url); - size_t sep = url_without_query.find_last_of("."); - if (sep != std::string::npos) { - mime_type = CefGetMimeType(url_without_query.substr(sep + 1)); - if (!mime_type.empty()) - return mime_type; - } - return "text/html"; -} - -// Default no-op filter. -std::string GetFilteredUrl(const std::string& url) { - return url; -} - - -// Provider of fixed contents. -class ContentProvider : public CefResourceManager::Provider { - public: - ContentProvider(const std::string& url, - const std::string& content, - const std::string& mime_type) - : url_(url), - content_(content), - mime_type_(mime_type) { - DCHECK(!url.empty()); - DCHECK(!content.empty()); - } - - bool OnRequest(scoped_refptr request) OVERRIDE { - CEF_REQUIRE_IO_THREAD(); - - const std::string& url = request->url(); - if (url != url_) { - // Not handled by this provider. - return false; - } - - CefRefPtr stream = - CefStreamReader::CreateForData( - static_cast(const_cast(content_.data())), - content_.length()); - - // Determine the mime type a single time if it isn't already set. - if (mime_type_.empty()) - mime_type_ = request->mime_type_resolver().Run(url); - - request->Continue(new CefStreamResourceHandler(mime_type_, stream)); - return true; - } - - private: - std::string url_; - std::string content_; - std::string mime_type_; - - DISALLOW_COPY_AND_ASSIGN(ContentProvider); -}; - - -// Provider of contents loaded from a directory on the file system. -class DirectoryProvider : public CefResourceManager::Provider { - public: - DirectoryProvider(const std::string& url_path, - const std::string& directory_path) - : url_path_(url_path), - directory_path_(directory_path) { - DCHECK(!url_path_.empty()); - DCHECK(!directory_path_.empty()); - - // Normalize the path values. - if (url_path_[url_path_.size() - 1] != '/') - url_path_ += '/'; - if (directory_path_[directory_path_.size() - 1] != PATH_SEP) - directory_path_ += PATH_SEP; - } - - bool OnRequest(scoped_refptr request) OVERRIDE { - CEF_REQUIRE_IO_THREAD(); - - const std::string& url = request->url(); - if (url.find(url_path_) != 0U) { - return false; - } - - const std::string& file_path = GetFilePath(url); - - // Open |file_path| on the FILE thread. - CefPostTask(TID_FILE, - base::Bind(&DirectoryProvider::OpenOnFileThread, file_path, request)); - - return true; - } - - private: - std::string GetFilePath(const std::string& url) { - std::string path_part = url.substr(url_path_.length()); -#if defined(OS_WIN) - std::replace(path_part.begin(), path_part.end(), '/', '\\'); -#endif - return directory_path_ + path_part; - } - - static void OpenOnFileThread( - const std::string& file_path, - scoped_refptr request) { - CEF_REQUIRE_FILE_THREAD(); - - CefRefPtr stream = - CefStreamReader::CreateForFile(file_path); - - // Continue loading on the IO thread. - CefPostTask(TID_IO, - base::Bind(&DirectoryProvider::ContinueOpenOnIOThread, request, - stream)); - } - - static void ContinueOpenOnIOThread( - scoped_refptr request, - CefRefPtr stream) { - CEF_REQUIRE_IO_THREAD(); - - CefRefPtr handler; - if (stream.get()) { - handler = new CefStreamResourceHandler( - request->mime_type_resolver().Run(request->url()), - stream); - } - request->Continue(handler); - } - - std::string url_path_; - std::string directory_path_; - - DISALLOW_COPY_AND_ASSIGN(DirectoryProvider); -}; - - -// Provider of contents loaded from an archive file. -class ArchiveProvider : public CefResourceManager::Provider { - public: - ArchiveProvider(const std::string& url_path, - const std::string& archive_path, - const std::string& password) - : url_path_(url_path), - archive_path_(archive_path), - password_(password), - archive_load_started_(false), - archive_load_ended_(false), - ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)) { - DCHECK(!url_path_.empty()); - DCHECK(!archive_path_.empty()); - - // Normalize the path values. - if (url_path_[url_path_.size() - 1] != '/') - url_path_ += '/'; - } - - bool OnRequest(scoped_refptr request) OVERRIDE { - CEF_REQUIRE_IO_THREAD(); - - const std::string& url = request->url(); - if (url.find(url_path_) != 0U) { - // Not handled by this provider. - return false; - } - - if (!archive_load_started_) { - // Initiate archive loading and queue the pending request. - archive_load_started_ = true; - pending_requests_.push_back(request); - - // Load the archive file on the FILE thread. - CefPostTask(TID_FILE, - base::Bind(&ArchiveProvider::LoadOnFileThread, - weak_ptr_factory_.GetWeakPtr(), archive_path_, password_)); - return true; - } - - if (archive_load_started_ && !archive_load_ended_) { - // The archive load has already started. Queue the pending request. - pending_requests_.push_back(request); - return true; - } - - // Archive loading is done. - return ContinueRequest(request); - } - - private: - static void LoadOnFileThread(base::WeakPtr ptr, - const std::string& archive_path, - const std::string& password) { - CEF_REQUIRE_FILE_THREAD(); - - CefRefPtr archive; - - CefRefPtr stream = - CefStreamReader::CreateForFile(archive_path); - if (stream.get()) { - archive = new CefZipArchive; - if (archive->Load(stream, password, true) == 0) { - DLOG(WARNING) << "Empty archive file: " << archive_path; - archive = NULL; - } - } else { - DLOG(WARNING) << "Failed to load archive file: " << archive_path; - } - - CefPostTask(TID_IO, - base::Bind(&ArchiveProvider::ContinueOnIOThread, ptr, archive)); - } - - void ContinueOnIOThread(CefRefPtr archive) { - CEF_REQUIRE_IO_THREAD(); - - archive_load_ended_ = true; - archive_ = archive; - - if (!pending_requests_.empty()) { - // Continue all pending requests. - PendingRequests::const_iterator it = pending_requests_.begin(); - for (; it != pending_requests_.end(); ++it) - ContinueRequest(*it); - pending_requests_.clear(); - } - } - - bool ContinueRequest(scoped_refptr request) { - CefRefPtr handler; - - // |archive_| will be NULL if the archive file failed to load or was empty. - if (archive_.get()) { - const std::string& url = request->url(); - const std::string& relative_path = url.substr(url_path_.length()); - CefRefPtr file = archive_->GetFile(relative_path); - if (file.get()) { - handler = new CefStreamResourceHandler( - request->mime_type_resolver().Run(url), - file->GetStreamReader()); - } - } - - if (!handler.get()) - return false; - - request->Continue(handler); - return true; - } - - std::string url_path_; - std::string archive_path_; - std::string password_; - - bool archive_load_started_; - bool archive_load_ended_; - CefRefPtr archive_; - - // List of requests that are pending while the archive is being loaded. - typedef std::vector > - PendingRequests; - PendingRequests pending_requests_; - - // Must be the last member. - base::WeakPtrFactory weak_ptr_factory_; - - DISALLOW_COPY_AND_ASSIGN(ArchiveProvider); -}; - -} // namespace - - -// CefResourceManager::ProviderEntry implementation. - -struct CefResourceManager::ProviderEntry { - ProviderEntry(Provider* provider, - int order, - const std::string& identifier) - : provider_(provider), - order_(order), - identifier_(identifier), - deletion_pending_(false) { - } - - scoped_ptr provider_; - int order_; - std::string identifier_; - - // List of pending requests currently associated with this provider. - RequestList pending_requests_; - - // True if deletion of this provider is pending. - bool deletion_pending_; -}; - - -// CefResourceManager::RequestState implementation. - -CefResourceManager::RequestState::~RequestState() { - // Always execute the callback. - if (callback_.get()) - callback_->Continue(true); -} - - -// CefResourceManager::Request implementation. - -void CefResourceManager::Request::Continue( - CefRefPtr handler) { - if (!CefCurrentlyOn(TID_IO)) { - CefPostTask(TID_IO, - base::Bind(&CefResourceManager::Request::Continue, this, handler)); - return; - } - - if (!state_.get()) - return; - - // Disassociate |state_| immediately so that Provider::OnRequestCanceled is - // not called unexpectedly if Provider::OnRequest calls this method and then - // calls CefResourceManager::Remove*. - CefPostTask(TID_IO, - base::Bind(&CefResourceManager::Request::ContinueOnIOThread, - base::Passed(&state_), handler)); -} - -void CefResourceManager::Request::Stop() { - if (!CefCurrentlyOn(TID_IO)) { - CefPostTask(TID_IO, - base::Bind(&CefResourceManager::Request::Stop, this)); - return; - } - - if (!state_.get()) - return; - - // Disassociate |state_| immediately so that Provider::OnRequestCanceled is - // not called unexpectedly if Provider::OnRequest calls this method and then - // calls CefResourceManager::Remove*. - CefPostTask(TID_IO, - base::Bind(&CefResourceManager::Request::StopOnIOThread, - base::Passed(&state_))); -} - -CefResourceManager::Request::Request(scoped_ptr state) - : state_(state.Pass()), - params_(state_->params_) { - CEF_REQUIRE_IO_THREAD(); - - ProviderEntry* entry = *(state_->current_entry_pos_); - // Should not be on a deleted entry. - DCHECK(!entry->deletion_pending_); - - // Add this request to the entry's pending request list. - entry->pending_requests_.push_back(this); - state_->current_request_pos_ = --entry->pending_requests_.end(); -} - -// Detaches and returns |state_| if the provider indicates that it will not -// handle the request. Note that |state_| may already be NULL if OnRequest -// executes a callback before returning, in which case execution will continue -// asynchronously in any case. -scoped_ptr - CefResourceManager::Request::SendRequest() { - CEF_REQUIRE_IO_THREAD(); - Provider* provider = (*state_->current_entry_pos_)->provider_.get(); - if (!provider->OnRequest(this)) - return state_.Pass(); - return scoped_ptr(); -} - -bool CefResourceManager::Request::HasState() { - CEF_REQUIRE_IO_THREAD(); - return (state_.get() != NULL); -} - -// static -void CefResourceManager::Request::ContinueOnIOThread( - scoped_ptr state, - CefRefPtr handler) { - CEF_REQUIRE_IO_THREAD(); - // The manager may already have been deleted. - base::WeakPtr manager = state->manager_; - if (manager) - manager->ContinueRequest(state.Pass(), handler); -} - -// static -void CefResourceManager::Request::StopOnIOThread( - scoped_ptr state) { - CEF_REQUIRE_IO_THREAD(); - // The manager may already have been deleted. - base::WeakPtr manager = state->manager_; - if (manager) - manager->StopRequest(state.Pass()); -} - - -// CefResourceManager implementation. - -CefResourceManager::CefResourceManager() - : url_filter_(base::Bind(GetFilteredUrl)), - mime_type_resolver_(base::Bind(GetMimeType)) { -} - -CefResourceManager::~CefResourceManager() { - CEF_REQUIRE_IO_THREAD(); - RemoveAllProviders(); - - // Delete all entryies now. Requests may still be pending but they will not - // call back into this manager due to the use of WeakPtr. - if (!providers_.empty()) { - ProviderEntryList::iterator it = providers_.begin(); - for (; it != providers_.end(); ++it) - delete *it; - providers_.clear(); - } -} - -void CefResourceManager::AddContentProvider(const std::string& url, - const std::string& content, - const std::string& mime_type, - int order, - const std::string& identifier) { - AddProvider(new ContentProvider(url, content, mime_type), order, identifier); -} - -void CefResourceManager::AddDirectoryProvider( - const std::string& url_path, - const std::string& directory_path, - int order, - const std::string& identifier) { - AddProvider(new DirectoryProvider(url_path, directory_path), - order, identifier); -} - -void CefResourceManager::AddArchiveProvider(const std::string& url_path, - const std::string& archive_path, - const std::string& password, - int order, - const std::string& identifier) { - AddProvider(new ArchiveProvider(url_path, archive_path, password), - order, identifier); -} - -void CefResourceManager::AddProvider(Provider* provider, - int order, - const std::string& identifier) { - DCHECK(provider); - if (!provider) - return; - - if (!CefCurrentlyOn(TID_IO)) { - CefPostTask(TID_IO, - base::Bind(&CefResourceManager::AddProvider, this, provider, order, - identifier)); - return; - } - - scoped_ptr new_entry( - new ProviderEntry(provider, order, identifier)); - - if (providers_.empty()) { - providers_.push_back(new_entry.release()); - return; - } - - // Insert before the first entry with a higher |order| value. - ProviderEntryList::iterator it = providers_.begin(); - for (; it != providers_.end(); ++it) { - if ((*it)->order_ > order) - break; - } - - providers_.insert(it, new_entry.release()); -} - -void CefResourceManager::RemoveProviders(const std::string& identifier) { - if (!CefCurrentlyOn(TID_IO)) { - CefPostTask(TID_IO, - base::Bind(&CefResourceManager::RemoveProviders, this, identifier)); - return; - } - - if (providers_.empty()) - return; - - ProviderEntryList::iterator it = providers_.begin(); - while (it != providers_.end()) { - if ((*it)->identifier_ == identifier) - DeleteProvider(it, false); - else - ++it; - } -} - -void CefResourceManager::RemoveAllProviders() { - if (!CefCurrentlyOn(TID_IO)) { - CefPostTask(TID_IO, - base::Bind(&CefResourceManager::RemoveAllProviders, this)); - return; - } - - if (providers_.empty()) - return; - - ProviderEntryList::iterator it = providers_.begin(); - while (it != providers_.end()) - DeleteProvider(it, true); -} - -void CefResourceManager::SetMimeTypeResolver(const MimeTypeResolver& resolver) { - if (!CefCurrentlyOn(TID_IO)) { - CefPostTask(TID_IO, - base::Bind(&CefResourceManager::SetMimeTypeResolver, this, resolver)); - return; - } - - if (!resolver.is_null()) - mime_type_resolver_ = resolver; - else - mime_type_resolver_ = base::Bind(GetMimeType); -} - -void CefResourceManager::SetUrlFilter(const UrlFilter& filter) { - if (!CefCurrentlyOn(TID_IO)) { - CefPostTask(TID_IO, - base::Bind(&CefResourceManager::SetUrlFilter, this, filter)); - return; - } - - if (!filter.is_null()) - url_filter_ = filter; - else - url_filter_ = base::Bind(GetFilteredUrl); -} - -cef_return_value_t CefResourceManager::OnBeforeResourceLoad( - CefRefPtr browser, - CefRefPtr frame, - CefRefPtr request, - CefRefPtr callback) { - CEF_REQUIRE_IO_THREAD(); - - // Find the first provider that is not pending deletion. - ProviderEntryList::iterator current_entry_pos = providers_.begin(); - GetNextValidProvider(current_entry_pos); - - if (current_entry_pos == providers_.end()) { - // No providers so continue the request immediately. - return RV_CONTINUE; - } - - scoped_ptr state(new RequestState); - - if (!weak_ptr_factory_.get()) { - // WeakPtrFactory instances need to be created and destroyed on the same - // thread. This object performs most of its work on the IO thread and will - // be destroyed on the IO thread so, now that we're on the IO thread, - // properly initialize the WeakPtrFactory. - weak_ptr_factory_.reset(new base::WeakPtrFactory(this)); - } - - state->manager_ = weak_ptr_factory_->GetWeakPtr(); - state->callback_ = callback; - - state->params_.url_ = - GetUrlWithoutQueryOrFragment(url_filter_.Run(request->GetURL())); - state->params_.browser_ = browser; - state->params_.frame_ = frame; - state->params_.request_ = request; - state->params_.url_filter_ = url_filter_; - state->params_.mime_type_resolver_ = mime_type_resolver_; - - state->current_entry_pos_ = current_entry_pos; - - // If the request is potentially handled we need to continue asynchronously. - return SendRequest(state.Pass()) ? RV_CONTINUE_ASYNC : RV_CONTINUE; -} - -CefRefPtr CefResourceManager::GetResourceHandler( - CefRefPtr browser, - CefRefPtr frame, - CefRefPtr request) { - CEF_REQUIRE_IO_THREAD(); - - if (pending_handlers_.empty()) - return NULL; - - CefRefPtr handler; - - PendingHandlersMap::iterator it = - pending_handlers_.find(request->GetIdentifier()); - if (it != pending_handlers_.end()) { - handler = it->second; - pending_handlers_.erase(it); - } - - return handler; -} - -// Send the request to providers in order until one potentially handles it or we -// run out of providers. Returns true if the request is potentially handled. -bool CefResourceManager::SendRequest(scoped_ptr state) { - bool potentially_handled = false; - - do { - // Should not be on the last provider entry. - DCHECK(state->current_entry_pos_ != providers_.end()); - scoped_refptr request = new Request(state.Pass()); - - // Give the provider an opportunity to handle the request. - state = request->SendRequest(); - if (state.get()) { - // The provider will not handle the request. Move to the next provider if - // any. - if (!IncrementProvider(state.get())) - StopRequest(state.Pass()); - } else { - potentially_handled = true; - } - } while (state.get()); - - return potentially_handled; -} - -void CefResourceManager::ContinueRequest( - scoped_ptr state, - CefRefPtr handler) { - CEF_REQUIRE_IO_THREAD(); - - if (handler.get()) { - // The request has been handled. Associate the request ID with the handler. - pending_handlers_.insert( - std::make_pair(state->params_.request_->GetIdentifier(), handler)); - StopRequest(state.Pass()); - } else { - // Move to the next provider if any. - if (IncrementProvider(state.get())) - SendRequest(state.Pass()); - else - StopRequest(state.Pass()); - } -} - -void CefResourceManager::StopRequest(scoped_ptr state) { - CEF_REQUIRE_IO_THREAD(); - - // Detach from the current provider. - DetachRequestFromProvider(state.get()); - - // Delete the state object and execute the callback. - state.reset(); -} - -// Move state to the next provider if any and return true if there are more -// providers. -bool CefResourceManager::IncrementProvider(RequestState* state) { - // Identify the next provider. - ProviderEntryList::iterator next_entry_pos = state->current_entry_pos_; - GetNextValidProvider(++next_entry_pos); - - // Detach from the current provider. - DetachRequestFromProvider(state); - - if (next_entry_pos != providers_.end()) { - // Update the state to reference the new provider entry. - state->current_entry_pos_ = next_entry_pos; - return true; - } - - return false; -} - -// The new provider, if any, should be determined before calling this method. -void CefResourceManager::DetachRequestFromProvider(RequestState* state) { - if (state->current_entry_pos_ != providers_.end()) { - // Remove the association from the current provider entry. - ProviderEntryList::iterator current_entry_pos = - state->current_entry_pos_; - ProviderEntry* current_entry = *(current_entry_pos); - current_entry->pending_requests_.erase(state->current_request_pos_); - - if (current_entry->deletion_pending_ && - current_entry->pending_requests_.empty()) { - // Delete the current provider entry now. - providers_.erase(current_entry_pos); - delete current_entry; - } - - // Set to the end for error checking purposes. - state->current_entry_pos_ = providers_.end(); - } -} - -// Move to the next provider that is not pending deletion. -void CefResourceManager::GetNextValidProvider( - ProviderEntryList::iterator& iterator) { - while (iterator != providers_.end() && (*iterator)->deletion_pending_) { - ++iterator; - } -} - -void CefResourceManager::DeleteProvider(ProviderEntryList::iterator& iterator, - bool stop) { - CEF_REQUIRE_IO_THREAD(); - - ProviderEntry* current_entry = *(iterator); - - if (current_entry->deletion_pending_) - return; - - if (!current_entry->pending_requests_.empty()) { - // Don't delete the provider entry until all pending requests have cleared. - current_entry->deletion_pending_ = true; - - // Continue pending requests immediately. - RequestList::iterator it = current_entry->pending_requests_.begin(); - for (; it != current_entry->pending_requests_.end(); ++it) { - const scoped_refptr& request = *it; - if (request->HasState()) { - if (stop) - request->Stop(); - else - request->Continue(NULL); - current_entry->provider_->OnRequestCanceled(request); - } - } - - ++iterator; - } else { - // Delete the provider entry now. - iterator = providers_.erase(iterator); - delete current_entry; - } -} diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/wrapper/cef_stream_resource_handler.cc b/tool_kits/cef/cef_wrapper/libcef_dll/wrapper/cef_stream_resource_handler.cc deleted file mode 100644 index 2e809517..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/wrapper/cef_stream_resource_handler.cc +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. - -#include "include/wrapper/cef_stream_resource_handler.h" - -#include - -#include "include/base/cef_bind.h" -#include "include/base/cef_logging.h" -#include "include/base/cef_macros.h" -#include "include/cef_callback.h" -#include "include/cef_request.h" -#include "include/cef_stream.h" -#include "include/wrapper/cef_closure_task.h" -#include "include/wrapper/cef_helpers.h" - -// Class that represents a readable/writable character buffer. -class CefStreamResourceHandler::Buffer { - public: - Buffer() - : size_(0), - bytes_requested_(0), - bytes_written_(0), - bytes_read_(0) { - } - - void Reset(int new_size) { - if (size_ < new_size) { - size_ = new_size; - buffer_.reset(new char[size_]); - DCHECK(buffer_); - } - bytes_requested_ = new_size; - bytes_written_ = 0; - bytes_read_ = 0; - } - - bool IsEmpty() const { - return (bytes_written_ == 0); - } - - bool CanRead() const { - return (bytes_read_ < bytes_written_); - } - - int WriteTo(void* data_out, int bytes_to_read) { - const int write_size = - std::min(bytes_to_read, bytes_written_ - bytes_read_); - if (write_size > 0) { - memcpy(data_out, buffer_ .get() + bytes_read_, write_size); - bytes_read_ += write_size; - } - return write_size; - } - - int ReadFrom(CefRefPtr reader) { - // Read until the buffer is full or until Read() returns 0 to indicate no - // more data. - int bytes_read; - do { - bytes_read = static_cast( - reader->Read(buffer_.get() + bytes_written_, 1, - bytes_requested_ - bytes_written_)); - bytes_written_ += bytes_read; - } while (bytes_read != 0 && bytes_written_ < bytes_requested_); - - return bytes_written_; - } - - private: - scoped_ptr buffer_; - int size_; - int bytes_requested_; - int bytes_written_; - int bytes_read_; - - DISALLOW_COPY_AND_ASSIGN(Buffer); -}; - -CefStreamResourceHandler::CefStreamResourceHandler( - const CefString& mime_type, - CefRefPtr stream) - : status_code_(200), - status_text_("OK"), - mime_type_(mime_type), - stream_(stream) -#ifndef NDEBUG - , buffer_owned_by_file_thread_(false) -#endif -{ - DCHECK(!mime_type_.empty()); - DCHECK(stream_.get()); - read_on_file_thread_ = stream_->MayBlock(); -} - -CefStreamResourceHandler::CefStreamResourceHandler( - int status_code, - const CefString& status_text, - const CefString& mime_type, - CefResponse::HeaderMap header_map, - CefRefPtr stream) - : status_code_(status_code), - status_text_(status_text), - mime_type_(mime_type), - header_map_(header_map), - stream_(stream) -#ifndef NDEBUG - , buffer_owned_by_file_thread_(false) -#endif -{ - DCHECK(!mime_type_.empty()); - DCHECK(stream_.get()); - read_on_file_thread_ = stream_->MayBlock(); -} - -CefStreamResourceHandler::~CefStreamResourceHandler() { -} - -bool CefStreamResourceHandler::ProcessRequest(CefRefPtr request, - CefRefPtr callback) { - callback->Continue(); - return true; -} - -void CefStreamResourceHandler::GetResponseHeaders( - CefRefPtr response, - int64& response_length, - CefString& redirectUrl) { - response->SetStatus(status_code_); - response->SetStatusText(status_text_); - response->SetMimeType(mime_type_); - - if (!header_map_.empty()) - response->SetHeaderMap(header_map_); - - response_length = -1; -} - -bool CefStreamResourceHandler::ReadResponse(void* data_out, - int bytes_to_read, - int& bytes_read, - CefRefPtr callback) { - DCHECK_GT(bytes_to_read, 0); - - if (read_on_file_thread_) { -#ifndef NDEBUG - DCHECK(!buffer_owned_by_file_thread_); -#endif - if (buffer_ && (buffer_->CanRead() || buffer_->IsEmpty())) { - if (buffer_->CanRead()) { - // Provide data from the buffer. - bytes_read = buffer_->WriteTo(data_out, bytes_to_read); - return (bytes_read > 0); - } else { - // End of the steam. - bytes_read = 0; - return false; - } - } else { - // Perform another read on the file thread. - bytes_read = 0; -#ifndef NDEBUG - buffer_owned_by_file_thread_ = true; -#endif - CefPostTask(TID_FILE, - base::Bind(&CefStreamResourceHandler::ReadOnFileThread, this, - bytes_to_read, callback)); - return true; - } - } else { - // Read until the buffer is full or until Read() returns 0 to indicate no - // more data. - bytes_read = 0; - int read = 0; - do { - read = static_cast( - stream_->Read(static_cast(data_out) + bytes_read, 1, - bytes_to_read - bytes_read)); - bytes_read += read; - } while (read != 0 && bytes_read < bytes_to_read); - - return (bytes_read > 0); - } -} - -void CefStreamResourceHandler::Cancel() { -} - -void CefStreamResourceHandler::ReadOnFileThread( - int bytes_to_read, - CefRefPtr callback) { - CEF_REQUIRE_FILE_THREAD(); -#ifndef NDEBUG - DCHECK(buffer_owned_by_file_thread_); -#endif - - if (!buffer_) - buffer_.reset(new Buffer()); - buffer_->Reset(bytes_to_read); - buffer_->ReadFrom(stream_); - -#ifndef NDEBUG - buffer_owned_by_file_thread_ = false; -#endif - callback->Continue(); -} diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/wrapper/cef_xml_object.cc b/tool_kits/cef/cef_wrapper/libcef_dll/wrapper/cef_xml_object.cc deleted file mode 100644 index 7e0d1712..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/wrapper/cef_xml_object.cc +++ /dev/null @@ -1,453 +0,0 @@ -// Copyright (c) 2010 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. - -#include "include/wrapper/cef_xml_object.h" - -#include - -#include "include/base/cef_logging.h" -#include "include/base/cef_macros.h" -#include "include/cef_stream.h" - -namespace { - -class CefXmlObjectLoader { - public: - explicit CefXmlObjectLoader(CefRefPtr root_object) - : root_object_(root_object) { - } - - bool Load(CefRefPtr stream, - CefXmlReader::EncodingType encodingType, - const CefString& URI) { - CefRefPtr reader( - CefXmlReader::Create(stream, encodingType, URI)); - if (!reader.get()) - return false; - - bool ret = reader->MoveToNextNode(); - if (ret) { - CefRefPtr cur_object(root_object_), new_object; - CefXmlObject::ObjectVector queue; - int cur_depth, value_depth = -1; - CefXmlReader::NodeType cur_type; - std::stringstream cur_value; - bool last_has_ns = false; - - queue.push_back(root_object_); - - do { - cur_depth = reader->GetDepth(); - if (value_depth >= 0 && cur_depth > value_depth) { - // The current node has already been parsed as part of a value. - continue; - } - - cur_type = reader->GetType(); - if (cur_type == XML_NODE_ELEMENT_START) { - if (cur_depth == value_depth) { - // Add to the current value. - cur_value << std::string(reader->GetOuterXml()); - continue; - } else if (last_has_ns && reader->GetPrefix().empty()) { - if (!cur_object->HasChildren()) { - // Start a new value because the last element has a namespace and - // this element does not. - value_depth = cur_depth; - cur_value << std::string(reader->GetOuterXml()); - } else { - // Value following a child element is not allowed. - std::stringstream ss; - ss << "Value following child element, line " << - reader->GetLineNumber(); - load_error_ = ss.str(); - ret = false; - break; - } - } else { - // Start a new element. - new_object = new CefXmlObject(reader->GetQualifiedName()); - cur_object->AddChild(new_object); - last_has_ns = !reader->GetPrefix().empty(); - - if (!reader->IsEmptyElement()) { - // The new element potentially has a value and/or children, so - // set the current object and add the object to the queue. - cur_object = new_object; - queue.push_back(cur_object); - } - - if (reader->HasAttributes() && reader->MoveToFirstAttribute()) { - // Read all object attributes. - do { - new_object->SetAttributeValue(reader->GetQualifiedName(), - reader->GetValue()); - } while (reader->MoveToNextAttribute()); - reader->MoveToCarryingElement(); - } - } - } else if (cur_type == XML_NODE_ELEMENT_END) { - if (cur_depth == value_depth) { - // Ending an element that is already in the value. - continue; - } else if (cur_depth < value_depth) { - // Done with parsing the value portion of the current element. - cur_object->SetValue(cur_value.str()); - cur_value.str(""); - value_depth = -1; - } - - // Pop the current element from the queue. - queue.pop_back(); - - if (queue.empty() || - cur_object->GetName() != reader->GetQualifiedName()) { - // Open tag without close tag or close tag without open tag should - // never occur (the parser catches this error). - NOTREACHED(); - std::stringstream ss; - ss << "Mismatched end tag for " << - std::string(cur_object->GetName()) << - ", line " << reader->GetLineNumber(); - load_error_ = ss.str(); - ret = false; - break; - } - - // Set the current object to the previous object in the queue. - cur_object = queue.back().get(); - } else if (cur_type == XML_NODE_TEXT || cur_type == XML_NODE_CDATA || - cur_type == XML_NODE_ENTITY_REFERENCE) { - if (cur_depth == value_depth) { - // Add to the current value. - cur_value << std::string(reader->GetValue()); - } else if (!cur_object->HasChildren()) { - // Start a new value. - value_depth = cur_depth; - cur_value << std::string(reader->GetValue()); - } else { - // Value following a child element is not allowed. - std::stringstream ss; - ss << "Value following child element, line " << - reader->GetLineNumber(); - load_error_ = ss.str(); - ret = false; - break; - } - } - } while (reader->MoveToNextNode()); - } - - if (reader->HasError()) { - load_error_ = reader->GetError(); - return false; - } - - return ret; - } - - CefString GetLoadError() { return load_error_; } - - private: - CefString load_error_; - CefRefPtr root_object_; - - DISALLOW_COPY_AND_ASSIGN(CefXmlObjectLoader); -}; - -} // namespace - -CefXmlObject::CefXmlObject(const CefString& name) - : name_(name), parent_(NULL) { -} - -CefXmlObject::~CefXmlObject() { -} - -bool CefXmlObject::Load(CefRefPtr stream, - CefXmlReader::EncodingType encodingType, - const CefString& URI, CefString* loadError) { - Clear(); - - CefXmlObjectLoader loader(this); - if (!loader.Load(stream, encodingType, URI)) { - if (loadError) - *loadError = loader.GetLoadError(); - return false; - } - return true; -} - -void CefXmlObject::Set(CefRefPtr object) { - DCHECK(object.get()); - - Clear(); - - name_ = object->GetName(); - Append(object, true); -} - -void CefXmlObject::Append(CefRefPtr object, - bool overwriteAttributes) { - DCHECK(object.get()); - - if (object->HasChildren()) { - ObjectVector children; - object->GetChildren(children); - ObjectVector::const_iterator it = children.begin(); - for (; it != children.end(); ++it) - AddChild((*it)->Duplicate()); - } - - if (object->HasAttributes()) { - AttributeMap attributes; - object->GetAttributes(attributes); - AttributeMap::const_iterator it = attributes.begin(); - for (; it != attributes.end(); ++it) { - if (overwriteAttributes || !HasAttribute(it->first)) - SetAttributeValue(it->first, it->second); - } - } -} - -CefRefPtr CefXmlObject::Duplicate() { - CefRefPtr new_obj; - { - base::AutoLock lock_scope(lock_); - new_obj = new CefXmlObject(name_); - new_obj->Append(this, true); - } - return new_obj; -} - -void CefXmlObject::Clear() { - ClearChildren(); - ClearAttributes(); -} - -CefString CefXmlObject::GetName() { - CefString name; - { - base::AutoLock lock_scope(lock_); - name = name_; - } - return name; -} - -bool CefXmlObject::SetName(const CefString& name) { - DCHECK(!name.empty()); - if (name.empty()) - return false; - - base::AutoLock lock_scope(lock_); - name_ = name; - return true; -} - -bool CefXmlObject::HasParent() { - base::AutoLock lock_scope(lock_); - return (parent_ != NULL); -} - -CefRefPtr CefXmlObject::GetParent() { - CefRefPtr parent; - { - base::AutoLock lock_scope(lock_); - parent = parent_; - } - return parent; -} - -bool CefXmlObject::HasValue() { - base::AutoLock lock_scope(lock_); - return !value_.empty(); -} - -CefString CefXmlObject::GetValue() { - CefString value; - { - base::AutoLock lock_scope(lock_); - value = value_; - } - return value; -} - -bool CefXmlObject::SetValue(const CefString& value) { - base::AutoLock lock_scope(lock_); - DCHECK(children_.empty()); - if (!children_.empty()) - return false; - value_ = value; - return true; -} - -bool CefXmlObject::HasAttributes() { - base::AutoLock lock_scope(lock_); - return !attributes_.empty(); -} - -size_t CefXmlObject::GetAttributeCount() { - base::AutoLock lock_scope(lock_); - return attributes_.size(); -} - -bool CefXmlObject::HasAttribute(const CefString& name) { - if (name.empty()) - return false; - - base::AutoLock lock_scope(lock_); - AttributeMap::const_iterator it = attributes_.find(name); - return (it != attributes_.end()); -} - -CefString CefXmlObject::GetAttributeValue(const CefString& name) { - DCHECK(!name.empty()); - CefString value; - if (!name.empty()) { - base::AutoLock lock_scope(lock_); - AttributeMap::const_iterator it = attributes_.find(name); - if (it != attributes_.end()) - value = it->second; - } - return value; -} - -bool CefXmlObject::SetAttributeValue(const CefString& name, - const CefString& value) { - DCHECK(!name.empty()); - if (name.empty()) - return false; - - base::AutoLock lock_scope(lock_); - AttributeMap::iterator it = attributes_.find(name); - if (it != attributes_.end()) { - it->second = value; - } else { - attributes_.insert(std::make_pair(name, value)); - } - return true; -} - -size_t CefXmlObject::GetAttributes(AttributeMap& attributes) { - base::AutoLock lock_scope(lock_); - attributes = attributes_; - return attributes_.size(); -} - -void CefXmlObject::ClearAttributes() { - base::AutoLock lock_scope(lock_); - attributes_.clear(); -} - -bool CefXmlObject::HasChildren() { - base::AutoLock lock_scope(lock_); - return !children_.empty(); -} - -size_t CefXmlObject::GetChildCount() { - base::AutoLock lock_scope(lock_); - return children_.size(); -} - -bool CefXmlObject::HasChild(CefRefPtr child) { - DCHECK(child.get()); - - base::AutoLock lock_scope(lock_); - ObjectVector::const_iterator it = children_.begin(); - for (; it != children_.end(); ++it) { - if ((*it).get() == child.get()) - return true; - } - return false; -} - -bool CefXmlObject::AddChild(CefRefPtr child) { - DCHECK(child.get()); - if (!child.get()) - return false; - - CefRefPtr parent = child->GetParent(); - DCHECK(!parent); - if (parent) - return false; - - base::AutoLock lock_scope(lock_); - - children_.push_back(child); - child->SetParent(this); - return true; -} - -bool CefXmlObject::RemoveChild(CefRefPtr child) { - DCHECK(child.get()); - - base::AutoLock lock_scope(lock_); - ObjectVector::iterator it = children_.begin(); - for (; it != children_.end(); ++it) { - if ((*it).get() == child.get()) { - children_.erase(it); - child->SetParent(NULL); - return true; - } - } - return false; -} - -size_t CefXmlObject::GetChildren(ObjectVector& children) { - base::AutoLock lock_scope(lock_); - children = children_; - return children_.size(); -} - -void CefXmlObject::ClearChildren() { - base::AutoLock lock_scope(lock_); - ObjectVector::iterator it = children_.begin(); - for (; it != children_.end(); ++it) - (*it)->SetParent(NULL); - children_.clear(); -} - -CefRefPtr CefXmlObject::FindChild(const CefString& name) { - DCHECK(!name.empty()); - if (name.empty()) - return NULL; - - base::AutoLock lock_scope(lock_); - ObjectVector::const_iterator it = children_.begin(); - for (; it != children_.end(); ++it) { - if ((*it)->GetName() == name) - return (*it); - } - return NULL; -} - -size_t CefXmlObject::FindChildren(const CefString& name, - ObjectVector& children) { - DCHECK(!name.empty()); - if (name.empty()) - return 0; - - size_t ct = 0; - - base::AutoLock lock_scope(lock_); - ObjectVector::const_iterator it = children_.begin(); - for (; it != children_.end(); ++it) { - if ((*it)->GetName() == name) { - children.push_back(*it); - ct++; - } - } - return ct; -} - -void CefXmlObject::SetParent(CefXmlObject* parent) { - base::AutoLock lock_scope(lock_); - if (parent) { - DCHECK(parent_ == NULL); - parent_ = parent; - } else { - DCHECK(parent_ != NULL); - parent_ = NULL; - } -} diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/wrapper/cef_zip_archive.cc b/tool_kits/cef/cef_wrapper/libcef_dll/wrapper/cef_zip_archive.cc deleted file mode 100644 index 8be28b61..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/wrapper/cef_zip_archive.cc +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) 2010 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. - -#include "include/wrapper/cef_zip_archive.h" - -#include - -#include "include/base/cef_logging.h" -#include "include/base/cef_macros.h" -#include "include/base/cef_scoped_ptr.h" -#include "include/cef_stream.h" -#include "include/cef_zip_reader.h" -#include "include/wrapper/cef_byte_read_handler.h" - -#if defined(OS_LINUX) -#include -#endif - -namespace { - -// Convert |str| to lowercase in a Unicode-friendly manner. -CefString ToLower(const CefString& str) { - std::wstring wstr = str; - std::transform(wstr.begin(), wstr.end(), wstr.begin(), towlower); - return wstr; -} - -class CefZipFile : public CefZipArchive::File { - public: - CefZipFile() : data_size_(0) {} - - bool Initialize(size_t data_size) { - data_.reset(new unsigned char[data_size]); - if (data_) { - data_size_ = data_size; - return true; - } else { - DLOG(ERROR) << "Failed to allocate " << data_size << " bytes of memory"; - data_size_ = 0; - return false; - } - } - - virtual const unsigned char* GetData() const OVERRIDE { return data_.get(); } - - virtual size_t GetDataSize() const OVERRIDE { return data_size_; } - - virtual CefRefPtr GetStreamReader() const OVERRIDE { - CefRefPtr handler( - new CefByteReadHandler(data_.get(), data_size_, - const_cast(this))); - return CefStreamReader::CreateForHandler(handler); - } - - unsigned char* data() { return data_.get(); } - - private: - size_t data_size_; - scoped_ptr data_; - - IMPLEMENT_REFCOUNTING(CefZipFile); - DISALLOW_COPY_AND_ASSIGN(CefZipFile); -}; - -} // namespace - -// CefZipArchive implementation - -CefZipArchive::CefZipArchive() { -} - -CefZipArchive::~CefZipArchive() { -} - -size_t CefZipArchive::Load(CefRefPtr stream, - const CefString& password, - bool overwriteExisting) { - base::AutoLock lock_scope(lock_); - - CefRefPtr reader(CefZipReader::Create(stream)); - if (!reader.get()) - return 0; - - if (!reader->MoveToFirstFile()) - return 0; - - FileMap::iterator it; - size_t count = 0; - - do { - const size_t size = static_cast(reader->GetFileSize()); - if (size == 0) { - // Skip directories and empty files. - continue; - } - - if (!reader->OpenFile(password)) - break; - - const CefString& name = ToLower(reader->GetFileName()); - - it = contents_.find(name); - if (it != contents_.end()) { - if (overwriteExisting) - contents_.erase(it); - else // Skip files that already exist. - continue; - } - - CefRefPtr contents = new CefZipFile(); - if (!contents->Initialize(size)) - continue; - unsigned char* data = contents->data(); - size_t offset = 0; - - // Read the file contents. - do { - offset += reader->ReadFile(data + offset, size - offset); - } while (offset < size && !reader->Eof()); - - DCHECK(offset == size); - - reader->CloseFile(); - count++; - - // Add the file to the map. - contents_.insert(std::make_pair(name, contents.get())); - } while (reader->MoveToNextFile()); - - return count; -} - -void CefZipArchive::Clear() { - base::AutoLock lock_scope(lock_); - contents_.clear(); -} - -size_t CefZipArchive::GetFileCount() const { - base::AutoLock lock_scope(lock_); - return contents_.size(); -} - -bool CefZipArchive::HasFile(const CefString& fileName) const { - base::AutoLock lock_scope(lock_); - FileMap::const_iterator it = contents_.find(ToLower(fileName)); - return (it != contents_.end()); -} - -CefRefPtr CefZipArchive::GetFile( - const CefString& fileName) const { - base::AutoLock lock_scope(lock_); - FileMap::const_iterator it = contents_.find(ToLower(fileName)); - if (it != contents_.end()) - return it->second; - return NULL; -} - -bool CefZipArchive::RemoveFile(const CefString& fileName) { - base::AutoLock lock_scope(lock_); - FileMap::iterator it = contents_.find(ToLower(fileName)); - if (it != contents_.end()) { - contents_.erase(it); - return true; - } - return false; -} - -size_t CefZipArchive::GetFiles(FileMap& map) const { - base::AutoLock lock_scope(lock_); - map = contents_; - return contents_.size(); -} diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/wrapper/libcef_dll_wrapper.cc b/tool_kits/cef/cef_wrapper/libcef_dll/wrapper/libcef_dll_wrapper.cc deleted file mode 100644 index a2fdeb6e..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/wrapper/libcef_dll_wrapper.cc +++ /dev/null @@ -1,935 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "include/cef_app.h" -#include "include/capi/cef_app_capi.h" -#include "include/cef_geolocation.h" -#include "include/capi/cef_geolocation_capi.h" -#include "include/cef_origin_whitelist.h" -#include "include/capi/cef_origin_whitelist_capi.h" -#include "include/cef_parser.h" -#include "include/capi/cef_parser_capi.h" -#include "include/cef_path_util.h" -#include "include/capi/cef_path_util_capi.h" -#include "include/cef_process_util.h" -#include "include/capi/cef_process_util_capi.h" -#include "include/cef_scheme.h" -#include "include/capi/cef_scheme_capi.h" -#include "include/cef_task.h" -#include "include/capi/cef_task_capi.h" -#include "include/cef_trace.h" -#include "include/capi/cef_trace_capi.h" -#include "include/cef_v8.h" -#include "include/capi/cef_v8_capi.h" -#include "include/cef_web_plugin.h" -#include "include/capi/cef_web_plugin_capi.h" -#include "include/cef_version.h" -#include "libcef_dll/cpptoc/app_cpptoc.h" -#include "libcef_dll/cpptoc/browser_process_handler_cpptoc.h" -#include "libcef_dll/cpptoc/completion_callback_cpptoc.h" -#include "libcef_dll/cpptoc/context_menu_handler_cpptoc.h" -#include "libcef_dll/cpptoc/cookie_visitor_cpptoc.h" -#include "libcef_dll/cpptoc/domvisitor_cpptoc.h" -#include "libcef_dll/cpptoc/delete_cookies_callback_cpptoc.h" -#include "libcef_dll/cpptoc/dialog_handler_cpptoc.h" -#include "libcef_dll/cpptoc/display_handler_cpptoc.h" -#include "libcef_dll/cpptoc/download_handler_cpptoc.h" -#include "libcef_dll/cpptoc/drag_handler_cpptoc.h" -#include "libcef_dll/cpptoc/end_tracing_callback_cpptoc.h" -#include "libcef_dll/cpptoc/find_handler_cpptoc.h" -#include "libcef_dll/cpptoc/focus_handler_cpptoc.h" -#include "libcef_dll/cpptoc/geolocation_handler_cpptoc.h" -#include "libcef_dll/cpptoc/get_geolocation_callback_cpptoc.h" -#include "libcef_dll/cpptoc/jsdialog_handler_cpptoc.h" -#include "libcef_dll/cpptoc/keyboard_handler_cpptoc.h" -#include "libcef_dll/cpptoc/life_span_handler_cpptoc.h" -#include "libcef_dll/cpptoc/load_handler_cpptoc.h" -#include "libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.h" -#include "libcef_dll/cpptoc/pdf_print_callback_cpptoc.h" -#include "libcef_dll/cpptoc/print_handler_cpptoc.h" -#include "libcef_dll/cpptoc/read_handler_cpptoc.h" -#include "libcef_dll/cpptoc/render_handler_cpptoc.h" -#include "libcef_dll/cpptoc/render_process_handler_cpptoc.h" -#include "libcef_dll/cpptoc/request_handler_cpptoc.h" -#include "libcef_dll/cpptoc/resolve_callback_cpptoc.h" -#include "libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h" -#include "libcef_dll/cpptoc/resource_handler_cpptoc.h" -#include "libcef_dll/cpptoc/response_filter_cpptoc.h" -#include "libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h" -#include "libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h" -#include "libcef_dll/cpptoc/set_cookie_callback_cpptoc.h" -#include "libcef_dll/cpptoc/string_visitor_cpptoc.h" -#include "libcef_dll/cpptoc/task_cpptoc.h" -#include "libcef_dll/cpptoc/urlrequest_client_cpptoc.h" -#include "libcef_dll/cpptoc/v8accessor_cpptoc.h" -#include "libcef_dll/cpptoc/v8handler_cpptoc.h" -#include "libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h" -#include "libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h" -#include "libcef_dll/cpptoc/write_handler_cpptoc.h" -#include "libcef_dll/ctocpp/auth_callback_ctocpp.h" -#include "libcef_dll/ctocpp/before_download_callback_ctocpp.h" -#include "libcef_dll/ctocpp/binary_value_ctocpp.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/browser_host_ctocpp.h" -#include "libcef_dll/ctocpp/callback_ctocpp.h" -#include "libcef_dll/ctocpp/command_line_ctocpp.h" -#include "libcef_dll/ctocpp/context_menu_params_ctocpp.h" -#include "libcef_dll/ctocpp/domdocument_ctocpp.h" -#include "libcef_dll/ctocpp/domnode_ctocpp.h" -#include "libcef_dll/ctocpp/dictionary_value_ctocpp.h" -#include "libcef_dll/ctocpp/download_item_ctocpp.h" -#include "libcef_dll/ctocpp/download_item_callback_ctocpp.h" -#include "libcef_dll/ctocpp/drag_data_ctocpp.h" -#include "libcef_dll/ctocpp/file_dialog_callback_ctocpp.h" -#include "libcef_dll/ctocpp/frame_ctocpp.h" -#include "libcef_dll/ctocpp/geolocation_callback_ctocpp.h" -#include "libcef_dll/ctocpp/jsdialog_callback_ctocpp.h" -#include "libcef_dll/ctocpp/list_value_ctocpp.h" -#include "libcef_dll/ctocpp/menu_model_ctocpp.h" -#include "libcef_dll/ctocpp/navigation_entry_ctocpp.h" -#include "libcef_dll/ctocpp/print_dialog_callback_ctocpp.h" -#include "libcef_dll/ctocpp/print_job_callback_ctocpp.h" -#include "libcef_dll/ctocpp/print_settings_ctocpp.h" -#include "libcef_dll/ctocpp/process_message_ctocpp.h" -#include "libcef_dll/ctocpp/request_callback_ctocpp.h" -#include "libcef_dll/ctocpp/run_context_menu_callback_ctocpp.h" -#include "libcef_dll/ctocpp/sslcert_principal_ctocpp.h" -#include "libcef_dll/ctocpp/sslinfo_ctocpp.h" -#include "libcef_dll/ctocpp/scheme_registrar_ctocpp.h" -#include "libcef_dll/ctocpp/stream_reader_ctocpp.h" -#include "libcef_dll/ctocpp/stream_writer_ctocpp.h" -#include "libcef_dll/ctocpp/task_runner_ctocpp.h" -#include "libcef_dll/ctocpp/urlrequest_ctocpp.h" -#include "libcef_dll/ctocpp/v8context_ctocpp.h" -#include "libcef_dll/ctocpp/v8exception_ctocpp.h" -#include "libcef_dll/ctocpp/v8stack_frame_ctocpp.h" -#include "libcef_dll/ctocpp/v8stack_trace_ctocpp.h" -#include "libcef_dll/ctocpp/v8value_ctocpp.h" -#include "libcef_dll/ctocpp/value_ctocpp.h" -#include "libcef_dll/ctocpp/web_plugin_info_ctocpp.h" -#include "libcef_dll/ctocpp/xml_reader_ctocpp.h" -#include "libcef_dll/ctocpp/zip_reader_ctocpp.h" -#include "libcef_dll/transfer_util.h" - -// Define used to facilitate parsing. -#define CEF_GLOBAL - - -// GLOBAL METHODS - Body may be edited by hand. - -CEF_GLOBAL int CefExecuteProcess(const CefMainArgs& args, - CefRefPtr application, void* windows_sandbox_info) { - const char* api_hash = cef_api_hash(0); - if (strcmp(api_hash, CEF_API_HASH_PLATFORM)) { - // The libcef API hash does not match the current header API hash. - NOTREACHED(); - return 0; - } - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: application, windows_sandbox_info - - // Execute - int _retval = cef_execute_process( - &args, - CefAppCppToC::Wrap(application), - windows_sandbox_info); - - // Return type: simple - return _retval; -} - -CEF_GLOBAL bool CefInitialize(const CefMainArgs& args, - const CefSettings& settings, CefRefPtr application, - void* windows_sandbox_info) { - const char* api_hash = cef_api_hash(0); - if (strcmp(api_hash, CEF_API_HASH_PLATFORM)) { - // The libcef API hash does not match the current header API hash. - NOTREACHED(); - return false; - } - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: application, windows_sandbox_info - - // Execute - int _retval = cef_initialize( - &args, - &settings, - CefAppCppToC::Wrap(application), - windows_sandbox_info); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL void CefShutdown() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_shutdown(); - -#ifndef NDEBUG - // Check that all wrapper objects have been destroyed - DCHECK(base::AtomicRefCountIsZero(&CefAuthCallbackCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero( - &CefBeforeDownloadCallbackCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefBinaryValueCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefBrowserCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefBrowserHostCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero( - &CefBrowserProcessHandlerCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefCallbackCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefCompletionCallbackCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefContextMenuHandlerCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefContextMenuParamsCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefCookieVisitorCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefDOMDocumentCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefDOMNodeCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefDOMVisitorCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero( - &CefDeleteCookiesCallbackCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefDialogHandlerCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefDictionaryValueCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefDisplayHandlerCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefDownloadHandlerCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefDownloadItemCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero( - &CefDownloadItemCallbackCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefDragDataCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefDragHandlerCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefEndTracingCallbackCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefFileDialogCallbackCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefFindHandlerCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefFocusHandlerCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefFrameCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefGeolocationCallbackCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefGeolocationHandlerCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero( - &CefGetGeolocationCallbackCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefJSDialogCallbackCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefJSDialogHandlerCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefKeyboardHandlerCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefLifeSpanHandlerCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefListValueCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefLoadHandlerCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefMenuModelCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefNavigationEntryCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero( - &CefNavigationEntryVisitorCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefPdfPrintCallbackCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefPrintDialogCallbackCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefPrintHandlerCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefPrintJobCallbackCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefPrintSettingsCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefProcessMessageCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefReadHandlerCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefRenderHandlerCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero( - &CefRenderProcessHandlerCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefRequestCallbackCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefRequestHandlerCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefResolveCallbackCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero( - &CefResourceBundleHandlerCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefResourceHandlerCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefResponseFilterCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero( - &CefRunContextMenuCallbackCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero( - &CefRunFileDialogCallbackCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefSSLCertPrincipalCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefSSLInfoCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero( - &CefSchemeHandlerFactoryCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefSchemeRegistrarCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefSetCookieCallbackCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefStreamReaderCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefStreamWriterCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefStringVisitorCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefTaskCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefTaskRunnerCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefURLRequestCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefURLRequestClientCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefV8AccessorCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefV8ContextCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefV8ExceptionCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefV8HandlerCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefV8StackFrameCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefV8StackTraceCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefV8ValueCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefValueCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefWebPluginInfoCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero( - &CefWebPluginInfoVisitorCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero( - &CefWebPluginUnstableCallbackCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefWriteHandlerCppToC::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefXmlReaderCToCpp::DebugObjCt)); - DCHECK(base::AtomicRefCountIsZero(&CefZipReaderCToCpp::DebugObjCt)); -#endif // !NDEBUG -} - -CEF_GLOBAL void CefDoMessageLoopWork() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_do_message_loop_work(); -} - -CEF_GLOBAL void CefRunMessageLoop() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_run_message_loop(); -} - -CEF_GLOBAL void CefQuitMessageLoop() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_quit_message_loop(); -} - -CEF_GLOBAL void CefSetOSModalLoop(bool osModalLoop) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_set_osmodal_loop( - osModalLoop); -} - -CEF_GLOBAL void CefEnableHighDPISupport() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_enable_highdpi_support(); -} - -CEF_GLOBAL bool CefGetGeolocation( - CefRefPtr callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: callback; type: refptr_diff - DCHECK(callback.get()); - if (!callback.get()) - return false; - - // Execute - int _retval = cef_get_geolocation( - CefGetGeolocationCallbackCppToC::Wrap(callback)); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL bool CefAddCrossOriginWhitelistEntry(const CefString& source_origin, - const CefString& target_protocol, const CefString& target_domain, - bool allow_target_subdomains) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: source_origin; type: string_byref_const - DCHECK(!source_origin.empty()); - if (source_origin.empty()) - return false; - // Verify param: target_protocol; type: string_byref_const - DCHECK(!target_protocol.empty()); - if (target_protocol.empty()) - return false; - // Unverified params: target_domain - - // Execute - int _retval = cef_add_cross_origin_whitelist_entry( - source_origin.GetStruct(), - target_protocol.GetStruct(), - target_domain.GetStruct(), - allow_target_subdomains); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL bool CefRemoveCrossOriginWhitelistEntry( - const CefString& source_origin, const CefString& target_protocol, - const CefString& target_domain, bool allow_target_subdomains) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: source_origin; type: string_byref_const - DCHECK(!source_origin.empty()); - if (source_origin.empty()) - return false; - // Verify param: target_protocol; type: string_byref_const - DCHECK(!target_protocol.empty()); - if (target_protocol.empty()) - return false; - // Unverified params: target_domain - - // Execute - int _retval = cef_remove_cross_origin_whitelist_entry( - source_origin.GetStruct(), - target_protocol.GetStruct(), - target_domain.GetStruct(), - allow_target_subdomains); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL bool CefClearCrossOriginWhitelist() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = cef_clear_cross_origin_whitelist(); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL bool CefParseURL(const CefString& url, CefURLParts& parts) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: url; type: string_byref_const - DCHECK(!url.empty()); - if (url.empty()) - return false; - - // Execute - int _retval = cef_parse_url( - url.GetStruct(), - &parts); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL bool CefCreateURL(const CefURLParts& parts, CefString& url) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = cef_create_url( - &parts, - url.GetWritableStruct()); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL CefString CefFormatUrlForSecurityDisplay(const CefString& origin_url, - const CefString& languages) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: origin_url; type: string_byref_const - DCHECK(!origin_url.empty()); - if (origin_url.empty()) - return CefString(); - // Unverified params: languages - - // Execute - cef_string_userfree_t _retval = cef_format_url_for_security_display( - origin_url.GetStruct(), - languages.GetStruct()); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CEF_GLOBAL CefString CefGetMimeType(const CefString& extension) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: extension; type: string_byref_const - DCHECK(!extension.empty()); - if (extension.empty()) - return CefString(); - - // Execute - cef_string_userfree_t _retval = cef_get_mime_type( - extension.GetStruct()); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CEF_GLOBAL void CefGetExtensionsForMimeType(const CefString& mime_type, - std::vector& extensions) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: mime_type; type: string_byref_const - DCHECK(!mime_type.empty()); - if (mime_type.empty()) - return; - - // Translate param: extensions; type: string_vec_byref - cef_string_list_t extensionsList = cef_string_list_alloc(); - DCHECK(extensionsList); - if (extensionsList) - transfer_string_list_contents(extensions, extensionsList); - - // Execute - cef_get_extensions_for_mime_type( - mime_type.GetStruct(), - extensionsList); - - // Restore param:extensions; type: string_vec_byref - if (extensionsList) { - extensions.clear(); - transfer_string_list_contents(extensionsList, extensions); - cef_string_list_free(extensionsList); - } -} - -CEF_GLOBAL CefString CefBase64Encode(const void* data, size_t data_size) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: data; type: simple_byaddr - DCHECK(data); - if (!data) - return CefString(); - - // Execute - cef_string_userfree_t _retval = cef_base64encode( - data, - data_size); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CEF_GLOBAL CefRefPtr CefBase64Decode(const CefString& data) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: data; type: string_byref_const - DCHECK(!data.empty()); - if (data.empty()) - return NULL; - - // Execute - cef_binary_value_t* _retval = cef_base64decode( - data.GetStruct()); - - // Return type: refptr_same - return CefBinaryValueCToCpp::Wrap(_retval); -} - -CEF_GLOBAL CefString CefURIEncode(const CefString& text, bool use_plus) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: text; type: string_byref_const - DCHECK(!text.empty()); - if (text.empty()) - return CefString(); - - // Execute - cef_string_userfree_t _retval = cef_uriencode( - text.GetStruct(), - use_plus); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CEF_GLOBAL CefString CefURIDecode(const CefString& text, bool convert_to_utf8, - cef_uri_unescape_rule_t unescape_rule) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: text; type: string_byref_const - DCHECK(!text.empty()); - if (text.empty()) - return CefString(); - - // Execute - cef_string_userfree_t _retval = cef_uridecode( - text.GetStruct(), - convert_to_utf8, - unescape_rule); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CEF_GLOBAL bool CefParseCSSColor(const CefString& string, bool strict, - cef_color_t& color) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: string; type: string_byref_const - DCHECK(!string.empty()); - if (string.empty()) - return false; - - // Execute - int _retval = cef_parse_csscolor( - string.GetStruct(), - strict, - &color); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL CefRefPtr CefParseJSON(const CefString& json_string, - cef_json_parser_options_t options) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: json_string; type: string_byref_const - DCHECK(!json_string.empty()); - if (json_string.empty()) - return NULL; - - // Execute - cef_value_t* _retval = cef_parse_json( - json_string.GetStruct(), - options); - - // Return type: refptr_same - return CefValueCToCpp::Wrap(_retval); -} - -CEF_GLOBAL CefRefPtr CefParseJSONAndReturnError( - const CefString& json_string, cef_json_parser_options_t options, - cef_json_parser_error_t& error_code_out, CefString& error_msg_out) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: json_string; type: string_byref_const - DCHECK(!json_string.empty()); - if (json_string.empty()) - return NULL; - - // Execute - cef_value_t* _retval = cef_parse_jsonand_return_error( - json_string.GetStruct(), - options, - &error_code_out, - error_msg_out.GetWritableStruct()); - - // Return type: refptr_same - return CefValueCToCpp::Wrap(_retval); -} - -CEF_GLOBAL CefString CefWriteJSON(CefRefPtr node, - cef_json_writer_options_t options) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: node; type: refptr_same - DCHECK(node.get()); - if (!node.get()) - return CefString(); - - // Execute - cef_string_userfree_t _retval = cef_write_json( - CefValueCToCpp::Unwrap(node), - options); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CEF_GLOBAL bool CefGetPath(PathKey key, CefString& path) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = cef_get_path( - key, - path.GetWritableStruct()); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL bool CefLaunchProcess(CefRefPtr command_line) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: command_line; type: refptr_same - DCHECK(command_line.get()); - if (!command_line.get()) - return false; - - // Execute - int _retval = cef_launch_process( - CefCommandLineCToCpp::Unwrap(command_line)); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL bool CefRegisterSchemeHandlerFactory(const CefString& scheme_name, - const CefString& domain_name, - CefRefPtr factory) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: scheme_name; type: string_byref_const - DCHECK(!scheme_name.empty()); - if (scheme_name.empty()) - return false; - // Unverified params: domain_name, factory - - // Execute - int _retval = cef_register_scheme_handler_factory( - scheme_name.GetStruct(), - domain_name.GetStruct(), - CefSchemeHandlerFactoryCppToC::Wrap(factory)); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL bool CefClearSchemeHandlerFactories() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = cef_clear_scheme_handler_factories(); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL bool CefCurrentlyOn(CefThreadId threadId) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = cef_currently_on( - threadId); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL bool CefPostTask(CefThreadId threadId, CefRefPtr task) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: task; type: refptr_diff - DCHECK(task.get()); - if (!task.get()) - return false; - - // Execute - int _retval = cef_post_task( - threadId, - CefTaskCppToC::Wrap(task)); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL bool CefPostDelayedTask(CefThreadId threadId, - CefRefPtr task, int64 delay_ms) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: task; type: refptr_diff - DCHECK(task.get()); - if (!task.get()) - return false; - - // Execute - int _retval = cef_post_delayed_task( - threadId, - CefTaskCppToC::Wrap(task), - delay_ms); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL bool CefBeginTracing(const CefString& categories, - CefRefPtr callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: categories, callback - - // Execute - int _retval = cef_begin_tracing( - categories.GetStruct(), - CefCompletionCallbackCppToC::Wrap(callback)); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL bool CefEndTracing(const CefString& tracing_file, - CefRefPtr callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: tracing_file, callback - - // Execute - int _retval = cef_end_tracing( - tracing_file.GetStruct(), - CefEndTracingCallbackCppToC::Wrap(callback)); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL int64 CefNowFromSystemTraceTime() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int64 _retval = cef_now_from_system_trace_time(); - - // Return type: simple - return _retval; -} - -CEF_GLOBAL bool CefRegisterExtension(const CefString& extension_name, - const CefString& javascript_code, CefRefPtr handler) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: extension_name; type: string_byref_const - DCHECK(!extension_name.empty()); - if (extension_name.empty()) - return false; - // Verify param: javascript_code; type: string_byref_const - DCHECK(!javascript_code.empty()); - if (javascript_code.empty()) - return false; - // Unverified params: handler - - // Execute - int _retval = cef_register_extension( - extension_name.GetStruct(), - javascript_code.GetStruct(), - CefV8HandlerCppToC::Wrap(handler)); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL void CefVisitWebPluginInfo( - CefRefPtr visitor) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: visitor; type: refptr_diff - DCHECK(visitor.get()); - if (!visitor.get()) - return; - - // Execute - cef_visit_web_plugin_info( - CefWebPluginInfoVisitorCppToC::Wrap(visitor)); -} - -CEF_GLOBAL void CefRefreshWebPlugins() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_refresh_web_plugins(); -} - -CEF_GLOBAL void CefAddWebPluginPath(const CefString& path) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: path; type: string_byref_const - DCHECK(!path.empty()); - if (path.empty()) - return; - - // Execute - cef_add_web_plugin_path( - path.GetStruct()); -} - -CEF_GLOBAL void CefAddWebPluginDirectory(const CefString& dir) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: dir; type: string_byref_const - DCHECK(!dir.empty()); - if (dir.empty()) - return; - - // Execute - cef_add_web_plugin_directory( - dir.GetStruct()); -} - -CEF_GLOBAL void CefRemoveWebPluginPath(const CefString& path) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: path; type: string_byref_const - DCHECK(!path.empty()); - if (path.empty()) - return; - - // Execute - cef_remove_web_plugin_path( - path.GetStruct()); -} - -CEF_GLOBAL void CefUnregisterInternalWebPlugin(const CefString& path) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: path; type: string_byref_const - DCHECK(!path.empty()); - if (path.empty()) - return; - - // Execute - cef_unregister_internal_web_plugin( - path.GetStruct()); -} - -CEF_GLOBAL void CefForceWebPluginShutdown(const CefString& path) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: path; type: string_byref_const - DCHECK(!path.empty()); - if (path.empty()) - return; - - // Execute - cef_force_web_plugin_shutdown( - path.GetStruct()); -} - -CEF_GLOBAL void CefRegisterWebPluginCrash(const CefString& path) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: path; type: string_byref_const - DCHECK(!path.empty()); - if (path.empty()) - return; - - // Execute - cef_register_web_plugin_crash( - path.GetStruct()); -} - -CEF_GLOBAL void CefIsWebPluginUnstable(const CefString& path, - CefRefPtr callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: path; type: string_byref_const - DCHECK(!path.empty()); - if (path.empty()) - return; - // Verify param: callback; type: refptr_diff - DCHECK(callback.get()); - if (!callback.get()) - return; - - // Execute - cef_is_web_plugin_unstable( - path.GetStruct(), - CefWebPluginUnstableCallbackCppToC::Wrap(callback)); -} - diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/wrapper/libcef_dll_wrapper2.cc b/tool_kits/cef/cef_wrapper/libcef_dll/wrapper/libcef_dll_wrapper2.cc deleted file mode 100644 index dc8ba7b0..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/wrapper/libcef_dll_wrapper2.cc +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2011 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. - diff --git a/tool_kits/cef/cef_wrapper/libcef_dll/wrapper_types.h b/tool_kits/cef/cef_wrapper/libcef_dll/wrapper_types.h deleted file mode 100644 index 5f89e8d8..00000000 --- a/tool_kits/cef/cef_wrapper/libcef_dll/wrapper_types.h +++ /dev/null @@ -1,121 +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 was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_WRAPPER_TYPES_H_ -#define CEF_LIBCEF_DLL_WRAPPER_TYPES_H_ -#pragma once - -enum CefWrapperType { - WT_BASE = 1, - WT_APP, - WT_AUTH_CALLBACK, - WT_BEFORE_DOWNLOAD_CALLBACK, - WT_BINARY_VALUE, - WT_BROWSER, - WT_BROWSER_HOST, - WT_BROWSER_PROCESS_HANDLER, - WT_CALLBACK, - WT_CLIENT, - WT_COMMAND_LINE, - WT_COMPLETION_CALLBACK, - WT_CONTEXT_MENU_HANDLER, - WT_CONTEXT_MENU_PARAMS, - WT_COOKIE_MANAGER, - WT_COOKIE_VISITOR, - WT_DOMDOCUMENT, - WT_DOMNODE, - WT_DOMVISITOR, - WT_DELETE_COOKIES_CALLBACK, - WT_DIALOG_HANDLER, - WT_DICTIONARY_VALUE, - WT_DISPLAY_HANDLER, - WT_DOWNLOAD_HANDLER, - WT_DOWNLOAD_ITEM, - WT_DOWNLOAD_ITEM_CALLBACK, - WT_DRAG_DATA, - WT_DRAG_HANDLER, - WT_END_TRACING_CALLBACK, - WT_FILE_DIALOG_CALLBACK, - WT_FIND_HANDLER, - WT_FOCUS_HANDLER, - WT_FRAME, - WT_GEOLOCATION_CALLBACK, - WT_GEOLOCATION_HANDLER, - WT_GET_GEOLOCATION_CALLBACK, - WT_JSDIALOG_CALLBACK, - WT_JSDIALOG_HANDLER, - WT_KEYBOARD_HANDLER, - WT_LIFE_SPAN_HANDLER, - WT_LIST_VALUE, - WT_LOAD_HANDLER, - WT_MENU_MODEL, - WT_NAVIGATION_ENTRY, - WT_NAVIGATION_ENTRY_VISITOR, - WT_PDF_PRINT_CALLBACK, - WT_POST_DATA, - WT_POST_DATA_ELEMENT, - WT_PRINT_DIALOG_CALLBACK, - WT_PRINT_HANDLER, - WT_PRINT_JOB_CALLBACK, - WT_PRINT_SETTINGS, - WT_PROCESS_MESSAGE, - WT_READ_HANDLER, - WT_RENDER_HANDLER, - WT_RENDER_PROCESS_HANDLER, - WT_REQUEST, - WT_REQUEST_CALLBACK, - WT_REQUEST_CONTEXT, - WT_REQUEST_CONTEXT_HANDLER, - WT_REQUEST_HANDLER, - WT_RESOLVE_CALLBACK, - WT_RESOURCE_BUNDLE, - WT_RESOURCE_BUNDLE_HANDLER, - WT_RESOURCE_HANDLER, - WT_RESPONSE, - WT_RESPONSE_FILTER, - WT_RUN_CONTEXT_MENU_CALLBACK, - WT_RUN_FILE_DIALOG_CALLBACK, - WT_SSLCERT_PRINCIPAL, - WT_SSLINFO, - WT_SCHEME_HANDLER_FACTORY, - WT_SCHEME_REGISTRAR, - WT_SET_COOKIE_CALLBACK, - WT_STREAM_READER, - WT_STREAM_WRITER, - WT_STRING_VISITOR, - WT_TASK, - WT_TASK_RUNNER, - WT_TRANSLATOR_TEST, - WT_TRANSLATOR_TEST_HANDLER, - WT_TRANSLATOR_TEST_HANDLER_CHILD, - WT_TRANSLATOR_TEST_OBJECT, - WT_TRANSLATOR_TEST_OBJECT_CHILD, - WT_TRANSLATOR_TEST_OBJECT_CHILD_CHILD, - WT_URLREQUEST, - WT_URLREQUEST_CLIENT, - WT_V8ACCESSOR, - WT_V8CONTEXT, - WT_V8EXCEPTION, - WT_V8HANDLER, - WT_V8STACK_FRAME, - WT_V8STACK_TRACE, - WT_V8VALUE, - WT_VALUE, - WT_WEB_PLUGIN_INFO, - WT_WEB_PLUGIN_INFO_VISITOR, - WT_WEB_PLUGIN_UNSTABLE_CALLBACK, - WT_WRITE_HANDLER, - WT_XML_READER, - WT_ZIP_READER, -}; - -#endif // CEF_LIBCEF_DLL_WRAPPER_TYPES_H_ diff --git a/tool_kits/db/CMakeLists.txt b/tool_kits/db/CMakeLists.txt index d3468cf1..dd035248 100644 --- a/tool_kits/db/CMakeLists.txt +++ b/tool_kits/db/CMakeLists.txt @@ -1,5 +1,3 @@ -MESSAGE("############# db #############") - SET(TARGET_NAME db) PROJECT(${TARGET_NAME}) diff --git a/tool_kits/duilib/CMakeLists.txt b/tool_kits/duilib/CMakeLists.txt index dd24213c..488c07a1 100644 --- a/tool_kits/duilib/CMakeLists.txt +++ b/tool_kits/duilib/CMakeLists.txt @@ -1,5 +1,3 @@ -MESSAGE("############# duilib #############") - SET(TARGET_NAME duilib) PROJECT(${TARGET_NAME}) diff --git a/tool_kits/shared/CMakeLists.txt b/tool_kits/shared/CMakeLists.txt index 97ef3034..707d2e50 100644 --- a/tool_kits/shared/CMakeLists.txt +++ b/tool_kits/shared/CMakeLists.txt @@ -1,5 +1,3 @@ -MESSAGE("############# shared #############") - SET(TARGET_NAME shared) PROJECT(${TARGET_NAME}) diff --git a/tool_kits/transfer_file/CMakeLists.txt b/tool_kits/transfer_file/CMakeLists.txt index 0ed2bd28..af191d26 100644 --- a/tool_kits/transfer_file/CMakeLists.txt +++ b/tool_kits/transfer_file/CMakeLists.txt @@ -1,5 +1,3 @@ -MESSAGE("############# transfer file P2P #############") - SET(TARGET_NAME transfer_file) PROJECT(${TARGET_NAME}) diff --git a/tool_kits/ui_component/av_kit/CMakeLists.txt b/tool_kits/ui_component/av_kit/CMakeLists.txt index f713d097..6ac389f6 100644 --- a/tool_kits/ui_component/av_kit/CMakeLists.txt +++ b/tool_kits/ui_component/av_kit/CMakeLists.txt @@ -1,5 +1,3 @@ -MESSAGE("############# av_kit #############") - SET(TARGET_NAME av_kit) PROJECT(${TARGET_NAME}) diff --git a/tool_kits/ui_component/capture_image/CMakeLists.txt b/tool_kits/ui_component/capture_image/CMakeLists.txt index 49e449b7..3d5371a1 100644 --- a/tool_kits/ui_component/capture_image/CMakeLists.txt +++ b/tool_kits/ui_component/capture_image/CMakeLists.txt @@ -1,5 +1,3 @@ -MESSAGE("############# capture_image #############") - SET(TARGET_NAME capture_image) PROJECT(${TARGET_NAME}) diff --git a/tool_kits/ui_component/g2_kit/CMakeLists.txt b/tool_kits/ui_component/g2_kit/CMakeLists.txt index 2b16702a..0d61c3a6 100644 --- a/tool_kits/ui_component/g2_kit/CMakeLists.txt +++ b/tool_kits/ui_component/g2_kit/CMakeLists.txt @@ -1,5 +1,3 @@ -MESSAGE("############# rtc_kit #############") - SET(TARGET_NAME rtc_kit) PROJECT(${TARGET_NAME}) diff --git a/tool_kits/ui_component/image_view/CMakeLists.txt b/tool_kits/ui_component/image_view/CMakeLists.txt index c3801f8b..9f6ce11e 100644 --- a/tool_kits/ui_component/image_view/CMakeLists.txt +++ b/tool_kits/ui_component/image_view/CMakeLists.txt @@ -1,5 +1,3 @@ -MESSAGE("############# image_view #############") - SET(TARGET_NAME image_view) PROJECT(${TARGET_NAME}) diff --git a/tool_kits/ui_component/nim_service/CMakeLists.txt b/tool_kits/ui_component/nim_service/CMakeLists.txt index 1bdf878a..d6dc31b2 100644 --- a/tool_kits/ui_component/nim_service/CMakeLists.txt +++ b/tool_kits/ui_component/nim_service/CMakeLists.txt @@ -1,5 +1,3 @@ -MESSAGE("############# nim_service #############") - SET(TARGET_NAME nim_service) PROJECT(${TARGET_NAME}) diff --git a/tool_kits/ui_component/ui_kit/CMakeLists.txt b/tool_kits/ui_component/ui_kit/CMakeLists.txt index 26e014af..58236729 100644 --- a/tool_kits/ui_component/ui_kit/CMakeLists.txt +++ b/tool_kits/ui_component/ui_kit/CMakeLists.txt @@ -1,5 +1,3 @@ -MESSAGE("############# ui_kit #############") - SET(TARGET_NAME ui_kit) PROJECT(${TARGET_NAME}) diff --git a/tool_kits/ui_component/ui_kit/gui/main/control/session_item.cpp b/tool_kits/ui_component/ui_kit/gui/main/control/session_item.cpp index 9873d604..c005474c 100644 --- a/tool_kits/ui_component/ui_kit/gui/main/control/session_item.cpp +++ b/tool_kits/ui_component/ui_kit/gui/main/control/session_item.cpp @@ -63,9 +63,11 @@ void SessionItem::InitMsg(const std::shared_ptr& msg) { #if 1 // 显示或隐藏 Top 标志 - label_session_item_top_->SetVisible(msg->placed_on_top_); + if (label_session_item_top_) + label_session_item_top_->SetVisible(msg->placed_on_top_); #else - label_session_item_top_->SetVisible(msg->stick_top_info_.top_); + if (label_session_item_top_) + label_session_item_top_->SetVisible(msg->stick_top_info_.top_); #endif //更新时间 diff --git a/tool_kits/uninstall/CMakeLists.txt b/tool_kits/uninstall/CMakeLists.txt index ae135c41..5f8db4dd 100644 --- a/tool_kits/uninstall/CMakeLists.txt +++ b/tool_kits/uninstall/CMakeLists.txt @@ -1,5 +1,3 @@ -MESSAGE("############# nim demo uninstaller #############") - SET(TARGET_NAME uninstall) PROJECT(${TARGET_NAME} DESCRIPTION "NetEase IM Demo Uninstaller")