mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Compare commits
21 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
a98cd4cdc0 | ||
|
2e23cedb41 | ||
|
9e367620cb | ||
|
8d6f4e38bc | ||
|
6f1563868d | ||
|
b950336a00 | ||
|
ca0a1134ea | ||
|
e874c768d7 | ||
|
496c871d1e | ||
|
414dbb1674 | ||
|
9ea9e58074 | ||
|
518ad36ac8 | ||
|
a614475a0e | ||
|
117413e2a3 | ||
|
8bc83a973d | ||
|
fba80ef0f9 | ||
|
7bc9b87d5e | ||
|
85c53029bf | ||
|
5050c3f0af | ||
|
7add4a33d4 | ||
|
e8fe3cfeaf |
35
.github/ISSUE_TEMPLATE/bug_report.md
vendored
35
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -1,35 +0,0 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen and what happened instead.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Versions (please complete the following information):**
|
||||
- OS: [e.g. Windows 10, MacOS 13.2, Ubuntu 22.10]
|
||||
- CEF Version: [e.g. 111.2.2]
|
||||
|
||||
**Additional context**
|
||||
Does the problem reproduce with the cefclient or cefsimple sample application at the same version?
|
||||
|
||||
Does the problem reproduce with Google Chrome at the same version?
|
||||
|
||||
Add any other context about the problem here.
|
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -1,20 +0,0 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
3
.gitignore.in → .gitignore
vendored
3
.gitignore.in → .gitignore
vendored
@@ -51,5 +51,6 @@ Thumbs.db
|
||||
/binary_distrib
|
||||
/docs
|
||||
# CEF generated files
|
||||
/include/cef_config.h
|
||||
/include/cef_version.h
|
||||
.ccls-cache/
|
||||
/cef_api_untracked.json
|
@@ -7,5 +7,6 @@
|
||||
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
|
||||
|
||||
{
|
||||
'chromium_checkout': 'refs/tags/137.0.7151.69'
|
||||
'chromium_checkout': 'refs/tags/108.0.5359.125',
|
||||
'depot_tools_checkout': '64b6175557'
|
||||
}
|
||||
|
@@ -27,8 +27,17 @@
|
||||
# Files in the chromium/src directory that should be evaluated for changes.
|
||||
# Similar changes may need to be applied to the CEF source code.
|
||||
'files': [
|
||||
'components/content_settings/core/common/content_settings_types.mojom',
|
||||
'components/permissions/request_type.h',
|
||||
'chrome/browser/browser_process.h',
|
||||
'chrome/browser/extensions/api/tabs/tabs_api.*',
|
||||
'chrome/browser/extensions/chrome_component_extension_resource_manager.*',
|
||||
'chrome/browser/extensions/chrome_extension_web_contents_observer.*',
|
||||
'chrome/browser/extensions/component_loader.*',
|
||||
'chrome/browser/extensions/extension_service.*',
|
||||
'chrome/browser/profiles/profile.h',
|
||||
'chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.*',
|
||||
'chrome/common/extensions/api/*_features.json',
|
||||
'chrome/renderer/chrome_content_renderer_client.*',
|
||||
'chrome/renderer/extensions/chrome_extensions_renderer_client.*',
|
||||
'content/browser/renderer_host/render_widget_host_view_base.*',
|
||||
'content/public/browser/content_browser_client.*',
|
||||
'content/public/browser/render_widget_host_view.h',
|
||||
|
@@ -12,8 +12,8 @@
|
||||
# distribution include:
|
||||
#
|
||||
# Linux: Ninja, GCC 7.5.0+, Unix Makefiles
|
||||
# MacOS: Ninja, Xcode 12.2 to 15.0
|
||||
# Windows: Ninja, Visual Studio 2022
|
||||
# MacOS: Ninja, Xcode 12.2 to 13.0
|
||||
# Windows: Ninja, Visual Studio 2019+
|
||||
#
|
||||
# Ninja is a cross-platform open-source tool for running fast builds using
|
||||
# pre-installed platform toolchains (GNU, clang, Xcode or MSVC). It can be
|
||||
@@ -36,7 +36,7 @@
|
||||
#
|
||||
# The below requirements must be met to build this CEF binary distribution.
|
||||
#
|
||||
# - CMake version 3.21 or newer.
|
||||
# - CMake version 3.19 or newer.
|
||||
#
|
||||
# - Linux requirements:
|
||||
# Currently supported distributions include Debian 10 (Buster), Ubuntu 18
|
||||
@@ -48,14 +48,15 @@
|
||||
# libgtk3.0-dev (required by the cefclient target only)
|
||||
#
|
||||
# - MacOS requirements:
|
||||
# Xcode 12.2 to 15.4 building on MacOS 11.0 (Big Sur) or newer. The Xcode
|
||||
# command-line tools must also be installed. Newer Xcode versions may not have
|
||||
# been been tested and are not recommended.
|
||||
# Xcode 12.2 to 13.4 building on MacOS 10.15.4 (Catalina) or newer. Only
|
||||
# 64-bit builds are supported. The Xcode command-line tools must also be
|
||||
# installed. Newer Xcode versions may not have been been tested and are not
|
||||
# recommended.
|
||||
#
|
||||
# - Windows requirements:
|
||||
# Visual Studio 2022 building on Windows 10 or newer. Windows 10/11 64-bit is
|
||||
# recommended. Newer versions will likely also work but may not have been
|
||||
# tested.
|
||||
# Visual Studio 2019 or newer building on Windows 7 or newer. Windows 10
|
||||
# 64-bit is recommended. Newer versions will likely also work but may not have
|
||||
# been tested.
|
||||
#
|
||||
# BUILD EXAMPLES
|
||||
#
|
||||
@@ -95,35 +96,35 @@
|
||||
# > ninja cefclient cefsimple
|
||||
#
|
||||
# To perform a Windows build using a 32-bit CEF binary distribution:
|
||||
# Using the Visual Studio 2022 IDE:
|
||||
# > cmake -G "Visual Studio 17" -A Win32 ..
|
||||
# Using the Visual Studio 2019 IDE:
|
||||
# > cmake -G "Visual Studio 16" -A Win32 ..
|
||||
# Open build\cef.sln in Visual Studio and select Build > Build Solution.
|
||||
#
|
||||
# Using Ninja with Visual Studio 2022 command-line tools:
|
||||
# Using Ninja with Visual Studio 2019 command-line tools:
|
||||
# (this path may be different depending on your Visual Studio installation)
|
||||
# > "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars32.bat"
|
||||
# > "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars32.bat"
|
||||
# > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug ..
|
||||
# > ninja cefclient cefsimple
|
||||
#
|
||||
# To perform a Windows build using a 64-bit CEF binary distribution:
|
||||
# Using the Visual Studio 2022 IDE:
|
||||
# > cmake -G "Visual Studio 17" -A x64 ..
|
||||
# Using the Visual Studio 2019 IDE:
|
||||
# > cmake -G "Visual Studio 16" -A x64 ..
|
||||
# Open build\cef.sln in Visual Studio and select Build > Build Solution.
|
||||
#
|
||||
# Using Ninja with Visual Studio 2022 command-line tools:
|
||||
# Using Ninja with Visual Studio 2019 command-line tools:
|
||||
# (this path may be different depending on your Visual Studio installation)
|
||||
# > "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars64.bat"
|
||||
# > "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat"
|
||||
# > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug ..
|
||||
# > ninja cefclient cefsimple
|
||||
#
|
||||
# To perform a Windows build using an ARM64 CEF binary distribution:
|
||||
# Using the Visual Studio 2022 IDE:
|
||||
# > cmake -G "Visual Studio 17" -A arm64 ..
|
||||
# Using the Visual Studio 2019 IDE:
|
||||
# > cmake -G "Visual Studio 16" -A arm64 ..
|
||||
# Open build\cef.sln in Visual Studio and select Build > Build Solution.
|
||||
#
|
||||
# Using Ninja with Visual Studio 2022 command-line tools:
|
||||
# Using Ninja with Visual Studio 2019 command-line tools:
|
||||
# (this path may be different depending on your Visual Studio installation)
|
||||
# > "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvarsamd64_arm64.bat"
|
||||
# > "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsamd64_arm64.bat"
|
||||
# > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug ..
|
||||
# > ninja cefsimple
|
||||
|
||||
@@ -131,8 +132,8 @@
|
||||
# Global setup.
|
||||
#
|
||||
|
||||
# For VS2022 and Xcode 12+ support.
|
||||
cmake_minimum_required(VERSION 3.21)
|
||||
# For VS2019 and Xcode 12+ support.
|
||||
cmake_minimum_required(VERSION 3.19)
|
||||
|
||||
# Only generate Debug and Release configuration types.
|
||||
set(CMAKE_CONFIGURATION_TYPES Debug Release)
|
||||
@@ -142,7 +143,7 @@ set(CMAKE_CONFIGURATION_TYPES Debug Release)
|
||||
project(cef)
|
||||
|
||||
# Use folders in the resulting project files.
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
set_property(GLOBAL PROPERTY OS_FOLDERS ON)
|
||||
|
||||
|
||||
#
|
||||
@@ -239,18 +240,16 @@ PRINT_CEF_CONFIG()
|
||||
# Define the API documentation target.
|
||||
#
|
||||
|
||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile")
|
||||
find_package(Doxygen)
|
||||
if(DOXYGEN_FOUND)
|
||||
add_custom_target(apidocs ALL
|
||||
# Generate documentation in the docs/html directory.
|
||||
COMMAND "${DOXYGEN_EXECUTABLE}" Doxyfile
|
||||
# Write a docs/index.html file.
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "<html><head><meta http-equiv=\"refresh\" content=\"0;URL='html/index.html'\"/></head></html>" > docs/index.html
|
||||
WORKING_DIRECTORY "${CEF_ROOT}"
|
||||
COMMENT "Generating API documentation with Doxygen..."
|
||||
VERBATIM )
|
||||
else()
|
||||
message(WARNING "Doxygen must be installed to generate API documentation.")
|
||||
endif()
|
||||
find_package(Doxygen)
|
||||
if(DOXYGEN_FOUND)
|
||||
add_custom_target(apidocs ALL
|
||||
# Generate documentation in the docs/html directory.
|
||||
COMMAND "${DOXYGEN_EXECUTABLE}" Doxyfile
|
||||
# Write a docs/index.html file.
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "<html><head><meta http-equiv=\"refresh\" content=\"0;URL='html/index.html'\"/></head></html>" > docs/index.html
|
||||
WORKING_DIRECTORY "${CEF_ROOT}"
|
||||
COMMENT "Generating API documentation with Doxygen..."
|
||||
VERBATIM )
|
||||
else()
|
||||
message(WARNING "Doxygen must be installed to generate API documentation.")
|
||||
endif()
|
||||
|
23
Doxyfile
23
Doxyfile
@@ -184,13 +184,7 @@ FULL_PATH_NAMES = YES
|
||||
# will be relative from the directory where doxygen is started.
|
||||
# This tag requires that the tag FULL_PATH_NAMES is set to YES.
|
||||
|
||||
# CEF NOTE: Intentionally keeping the 'gen' prefix for these includes in the
|
||||
# "File List" side panel to differentiate directories.
|
||||
# See https://github.com/doxygen/doxygen/issues/8318.
|
||||
|
||||
STRIP_FROM_PATH = . \
|
||||
../out/Release_GN_x64 \
|
||||
../out/Release_GN_arm64
|
||||
STRIP_FROM_PATH =
|
||||
|
||||
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
|
||||
# path mentioned in the documentation of a class, which tells the reader which
|
||||
@@ -915,9 +909,7 @@ WARN_LOGFILE =
|
||||
# Note: If this tag is empty the current directory is searched.
|
||||
|
||||
INPUT = README.md \
|
||||
include \
|
||||
../out/Release_GN_x64/gen/cef/include \
|
||||
../out/Release_GN_arm64/gen/cef/include
|
||||
include
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||
@@ -2337,7 +2329,7 @@ ENABLE_PREPROCESSING = YES
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
|
||||
|
||||
MACRO_EXPANSION = YES
|
||||
MACRO_EXPANSION = NO
|
||||
|
||||
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
|
||||
# the macro expansion is limited to the macros specified with the PREDEFINED and
|
||||
@@ -2345,7 +2337,7 @@ MACRO_EXPANSION = YES
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
|
||||
|
||||
EXPAND_ONLY_PREDEF = YES
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
|
||||
# If the SEARCH_INCLUDES tag is set to YES, the include files in the
|
||||
# INCLUDE_PATH will be searched if a #include is found.
|
||||
@@ -2384,12 +2376,7 @@ PREDEFINED = USING_CEF_SHARED \
|
||||
OS_LINUX \
|
||||
CEF_X11 \
|
||||
OS_MAC \
|
||||
__OBJC__ \
|
||||
OS_POSIX \
|
||||
ARCH_CPU_32_BITS \
|
||||
CEF_API_ADDED(v)=1 \
|
||||
CEF_API_REMOVED(v)=1 \
|
||||
CEF_API_RANGE(a,r)=1
|
||||
ARCH_CPU_32_BITS
|
||||
|
||||
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
|
||||
# tag can be used to specify a list of macro names that should be expanded. The
|
||||
|
@@ -9,7 +9,6 @@ The Chromium Embedded Framework (CEF) is a simple framework for embedding Chromi
|
||||
* Branches and Building - https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
|
||||
* Announcements - https://groups.google.com/forum/#!forum/cef-announce
|
||||
* Support Forum - http://www.magpcss.org/ceforum/
|
||||
* Issue Tracker - https://github.com/chromiumembedded/cef/issues
|
||||
* C++ API Docs - [Stable release docs](https://cef-builds.spotifycdn.com/docs/stable.html) / [Beta release docs](https://cef-builds.spotifycdn.com/docs/beta.html)
|
||||
* Downloads - https://cef-builds.spotifycdn.com/index.html
|
||||
* Donations - http://www.magpcss.org/ceforum/donate.php
|
||||
@@ -49,7 +48,6 @@ The base CEF framework includes support for the C and C++ programming languages.
|
||||
* Delphi - https://github.com/hgourvest/dcef3
|
||||
* Delphi - https://github.com/salvadordf/CEF4Delphi
|
||||
* Go - https://github.com/CzarekTomczak/cef2go
|
||||
* Go - https://github.com/energye/energy
|
||||
* Java - https://bitbucket.org/chromiumembedded/java-cef
|
||||
* Python - http://code.google.com/p/cefpython/
|
||||
|
||||
@@ -59,7 +57,7 @@ If you're the maintainer of a project not listed above and would like your proje
|
||||
|
||||
CEF is still very much a work in progress. Some ways that you can help out:
|
||||
|
||||
\- Vote for issues in the [CEF issue tracker](https://github.com/chromiumembedded/cef/issues) that are important to you. This helps with development prioritization.
|
||||
\- Vote for issues in the [CEF issue tracker](https://bitbucket.org/chromiumembedded/cef/issues?status=new&status=open) that are important to you. This helps with development prioritization.
|
||||
|
||||
\- Report any bugs that you find or feature requests that are important to you. Make sure to first search for existing issues before creating new ones. Please use the [CEF Forum](http://magpcss.org/ceforum) and not the issue tracker for usage questions. Each CEF issue should:
|
||||
|
||||
@@ -70,7 +68,7 @@ CEF is still very much a work in progress. Some ways that you can help out:
|
||||
|
||||
\- Write unit tests for new or existing functionality.
|
||||
|
||||
\- Pull requests and patches are welcome. View open issues in the [CEF issue tracker](https://github.com/chromiumembedded/cef/issues) or search for TODO(cef) in the source code for ideas.
|
||||
\- Pull requests and patches are welcome. View open issues in the [CEF issue tracker](https://bitbucket.org/chromiumembedded/cef/issues?status=new&status=open) or search for TODO(cef) in the source code for ideas.
|
||||
|
||||
If you would like to contribute source code changes to CEF please follow the below guidelines:
|
||||
|
||||
|
@@ -1,8 +0,0 @@
|
||||
# Copyright (c) 2024 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.
|
||||
|
||||
# Allow access from targets in other packages.
|
||||
package(default_visibility = [
|
||||
"//visibility:public",
|
||||
])
|
@@ -1,65 +0,0 @@
|
||||
# Copyright (c) 2024 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.
|
||||
|
||||
def _copy_filegroups_impl(ctx):
|
||||
inputs = ctx.files.filegroups
|
||||
remove_prefixes = ctx.attr.remove_prefixes
|
||||
add_prefix = ctx.attr.add_prefix
|
||||
|
||||
outputs = []
|
||||
for f in inputs:
|
||||
relative_path = f.path
|
||||
if relative_path.startswith("external/"):
|
||||
# Remove the "external/<repo>" component, if any.
|
||||
relative_path = "/".join(relative_path.split("/")[2:])
|
||||
|
||||
for prefix in remove_prefixes:
|
||||
# Add trailing forward slash if necessary.
|
||||
if prefix[-1] != "/":
|
||||
prefix += "/"
|
||||
if len(prefix) > 0 and relative_path.startswith(prefix):
|
||||
relative_path = relative_path[len(prefix):]
|
||||
break
|
||||
|
||||
if len(add_prefix) > 0:
|
||||
# Add trailing forward slash if necessary.
|
||||
if add_prefix[-1] != "/":
|
||||
add_prefix += "/"
|
||||
relative_path = add_prefix + relative_path
|
||||
|
||||
out = ctx.actions.declare_file(relative_path)
|
||||
outputs.append(out)
|
||||
|
||||
if relative_path.find("/") > 0:
|
||||
command="mkdir -p $(dirname {}) && cp {} {}".format(out.path, f.path, out.path)
|
||||
else:
|
||||
command="cp {} {}".format(f.path, out.path)
|
||||
|
||||
ctx.actions.run_shell(
|
||||
outputs=[out],
|
||||
inputs=depset([f]),
|
||||
command=command
|
||||
)
|
||||
|
||||
# Small sanity check
|
||||
if len(inputs) != len(outputs):
|
||||
fail("Output count should be 1-to-1 with input count.")
|
||||
|
||||
return DefaultInfo(
|
||||
files=depset(outputs),
|
||||
runfiles=ctx.runfiles(files=outputs)
|
||||
)
|
||||
|
||||
# Allows the file contents of |filegroups| to be copied next to a cc_binary
|
||||
# target via the |data| attribute.
|
||||
# Implementation based on https://stackoverflow.com/a/57983629
|
||||
copy_filegroups = rule(
|
||||
implementation=_copy_filegroups_impl,
|
||||
attrs={
|
||||
"filegroups": attr.label_list(),
|
||||
"remove_prefixes": attr.string_list(default = []),
|
||||
"add_prefix": attr.string(default = ""),
|
||||
},
|
||||
)
|
||||
|
@@ -1,90 +0,0 @@
|
||||
# Copyright (c) 2024 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.
|
||||
|
||||
load("//bazel/win:variables.bzl",
|
||||
WIN_COMMON_COPTS="COMMON_COPTS",
|
||||
WIN_COMMON_COPTS_RELEASE="COMMON_COPTS_RELEASE",
|
||||
WIN_COMMON_COPTS_DEBUG="COMMON_COPTS_DEBUG",
|
||||
WIN_COMMON_DEFINES="COMMON_DEFINES",
|
||||
WIN_COMMON_DEFINES_RELEASE="COMMON_DEFINES_RELEASE",
|
||||
WIN_COMMON_DEFINES_DEBUG="COMMON_DEFINES_DEBUG")
|
||||
load("//bazel/linux:variables.bzl",
|
||||
LINUX_COMMON_COPTS="COMMON_COPTS",
|
||||
LINUX_COMMON_COPTS_RELEASE="COMMON_COPTS_RELEASE",
|
||||
LINUX_COMMON_COPTS_DEBUG="COMMON_COPTS_DEBUG",
|
||||
LINUX_COMMON_DEFINES="COMMON_DEFINES",
|
||||
LINUX_COMMON_DEFINES_RELEASE="COMMON_DEFINES_RELEASE",
|
||||
LINUX_COMMON_DEFINES_DEBUG="COMMON_DEFINES_DEBUG")
|
||||
load("//bazel/mac:variables.bzl",
|
||||
MAC_COMMON_COPTS="COMMON_COPTS",
|
||||
MAC_COMMON_COPTS_RELEASE="COMMON_COPTS_RELEASE",
|
||||
MAC_COMMON_COPTS_DEBUG="COMMON_COPTS_DEBUG")
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library", "objc_library")
|
||||
|
||||
def declare_cc_library(copts=[], local_defines=[], **kwargs):
|
||||
"""
|
||||
cc_library wrapper that applies common copts and local_defines.
|
||||
"""
|
||||
# NOTE: objc_library does not support local_defines on MacOS, so on
|
||||
# that platform we put the defines in copts instead.
|
||||
cc_library(
|
||||
copts = select({
|
||||
"@platforms//os:windows": WIN_COMMON_COPTS,
|
||||
"@platforms//os:linux": LINUX_COMMON_COPTS,
|
||||
"@platforms//os:macos": MAC_COMMON_COPTS,
|
||||
"//conditions:default": None,
|
||||
}) + select({
|
||||
"@cef//:windows_opt": WIN_COMMON_COPTS_RELEASE,
|
||||
"@cef//:windows_dbg": WIN_COMMON_COPTS_DEBUG,
|
||||
"@cef//:windows_fastbuild": WIN_COMMON_COPTS_RELEASE,
|
||||
"@cef//:linux_opt": LINUX_COMMON_COPTS_RELEASE,
|
||||
"@cef//:linux_dbg": LINUX_COMMON_COPTS_DEBUG,
|
||||
"@cef//:linux_fastbuild": LINUX_COMMON_COPTS_RELEASE,
|
||||
"@cef//:macos_opt": MAC_COMMON_COPTS_RELEASE,
|
||||
"@cef//:macos_dbg": MAC_COMMON_COPTS_DEBUG,
|
||||
"@cef//:macos_fastbuild": MAC_COMMON_COPTS_RELEASE,
|
||||
"//conditions:default": None,
|
||||
}) + copts,
|
||||
local_defines = select({
|
||||
"@platforms//os:windows": WIN_COMMON_DEFINES,
|
||||
"@platforms//os:linux": LINUX_COMMON_DEFINES,
|
||||
"//conditions:default": None,
|
||||
}) + select({
|
||||
"@cef//:windows_opt": WIN_COMMON_DEFINES_RELEASE,
|
||||
"@cef//:windows_dbg": WIN_COMMON_DEFINES_DEBUG,
|
||||
"@cef//:windows_fastbuild": WIN_COMMON_DEFINES_RELEASE,
|
||||
"@cef//:linux_opt": LINUX_COMMON_DEFINES_RELEASE,
|
||||
"@cef//:linux_dbg": LINUX_COMMON_DEFINES_DEBUG,
|
||||
"@cef//:linux_fastbuild": LINUX_COMMON_DEFINES_RELEASE,
|
||||
"//conditions:default": None,
|
||||
}) + local_defines,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
def declare_objc_library(copts=[], **kwargs):
|
||||
"""
|
||||
objc_library wrapper that applies common copts.
|
||||
"""
|
||||
# NOTE: objc_library does not support local_defines on MacOS, so on
|
||||
# that platform we put the defines in copts instead.
|
||||
objc_library(
|
||||
copts = select({
|
||||
"@platforms//os:windows": WIN_COMMON_COPTS,
|
||||
"@platforms//os:linux": LINUX_COMMON_COPTS,
|
||||
"@platforms//os:macos": MAC_COMMON_COPTS,
|
||||
"//conditions:default": None,
|
||||
}) + select({
|
||||
"@cef//:windows_opt": WIN_COMMON_COPTS_RELEASE,
|
||||
"@cef//:windows_dbg": WIN_COMMON_COPTS_DEBUG,
|
||||
"@cef//:windows_fastbuild": WIN_COMMON_COPTS_RELEASE,
|
||||
"@cef//:linux_opt": LINUX_COMMON_COPTS_RELEASE,
|
||||
"@cef//:linux_dbg": LINUX_COMMON_COPTS_DEBUG,
|
||||
"@cef//:linux_fastbuild": LINUX_COMMON_COPTS_RELEASE,
|
||||
"@cef//:macos_opt": MAC_COMMON_COPTS_RELEASE,
|
||||
"@cef//:macos_dbg": MAC_COMMON_COPTS_DEBUG,
|
||||
"@cef//:macos_fastbuild": MAC_COMMON_COPTS_RELEASE,
|
||||
"//conditions:default": None,
|
||||
}) + copts,
|
||||
**kwargs
|
||||
)
|
@@ -1,8 +0,0 @@
|
||||
# Copyright (c) 2024 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.
|
||||
|
||||
# Allow access from targets in other packages.
|
||||
package(default_visibility = [
|
||||
"//visibility:public",
|
||||
])
|
@@ -1,63 +0,0 @@
|
||||
# Copyright (c) 2024 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.
|
||||
|
||||
load("//bazel:copy_filegroups.bzl", "copy_filegroups")
|
||||
load("//bazel/linux:fix_rpath.bzl", "fix_rpath")
|
||||
load("//bazel/linux:variables.bzl",
|
||||
"COMMON_LINKOPTS",
|
||||
"COMMON_COPTS", "COMMON_COPTS_RELEASE", "COMMON_COPTS_DEBUG",
|
||||
"COMMON_DEFINES", "COMMON_DEFINES_RELEASE", "COMMON_DEFINES_DEBUG")
|
||||
load("@rules_cc//cc:defs.bzl", "cc_binary")
|
||||
|
||||
def declare_exe(name, srcs=[], deps=[], linkopts=[], copts=[], local_defines=[], data=[], **kwargs):
|
||||
# Copy SOs and resources into the current project.
|
||||
copy_target = "{}_sos_and_resources".format(name)
|
||||
copy_filegroups(
|
||||
name = copy_target,
|
||||
filegroups = [
|
||||
"@cef//:sos",
|
||||
"@cef//:resources",
|
||||
],
|
||||
remove_prefixes = [
|
||||
"Debug",
|
||||
"Release",
|
||||
"Resources",
|
||||
],
|
||||
)
|
||||
|
||||
# Executable target.
|
||||
binary_target = "{}_incorrect_rpath".format(name)
|
||||
cc_binary(
|
||||
name = binary_target,
|
||||
srcs = srcs,
|
||||
deps = [
|
||||
"@cef//:cef_wrapper",
|
||||
"@cef//:cef",
|
||||
"@cef//:cef_sandbox",
|
||||
] + deps,
|
||||
linkopts = COMMON_LINKOPTS + linkopts,
|
||||
copts = COMMON_COPTS + select({
|
||||
"@cef//:linux_dbg": COMMON_COPTS_DEBUG,
|
||||
"//conditions:default": COMMON_COPTS_RELEASE,
|
||||
}) + copts,
|
||||
local_defines = COMMON_DEFINES + select({
|
||||
"@cef//:linux_dbg": COMMON_DEFINES_DEBUG,
|
||||
"//conditions:default": COMMON_DEFINES_RELEASE,
|
||||
}) + local_defines,
|
||||
data = [
|
||||
":{}".format(copy_target),
|
||||
] + data,
|
||||
target_compatible_with = ["@platforms//os:linux"],
|
||||
**kwargs
|
||||
)
|
||||
|
||||
# Set rpath to $ORIGIN so that libraries can be loaded from next to the
|
||||
# executable.
|
||||
fix_rpath(
|
||||
name = "{}_fixed_rpath".format(name),
|
||||
src = ":{}".format(binary_target),
|
||||
out = name,
|
||||
target_compatible_with = ["@platforms//os:linux"],
|
||||
)
|
||||
|
@@ -1,41 +0,0 @@
|
||||
# Copyright (c) 2024 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.
|
||||
|
||||
def _fix_rpath_impl(ctx):
|
||||
inputs = ctx.runfiles(files = [ctx.file.src])
|
||||
# Bring over 'data' dependencies from the input.
|
||||
inputs = inputs.merge_all([ctx.attr.src[DefaultInfo].default_runfiles])
|
||||
|
||||
src = ctx.file.src.path
|
||||
out = ctx.outputs.out.path
|
||||
|
||||
ctx.actions.run_shell(
|
||||
outputs = [ctx.outputs.out],
|
||||
inputs = inputs.files,
|
||||
arguments = [src, out],
|
||||
command = "cp $1 $2 && " +
|
||||
"chmod +w $2 && " +
|
||||
"patchelf --remove-rpath $2 && " +
|
||||
"patchelf --set-rpath '$ORIGIN' $2"
|
||||
)
|
||||
|
||||
return [DefaultInfo(files = depset([ctx.outputs.out]))]
|
||||
|
||||
# Set rpath to $ORIGIN so that libraries can be loaded from next to the
|
||||
# executable. The result can be confirmed with:
|
||||
# $ objdump -x ./bazel-bin/path/to/binary | grep 'R.*PATH'
|
||||
#
|
||||
# Alternatively, define a custom CC toolchain that overrides
|
||||
# 'runtime_library_search_directories'.
|
||||
#
|
||||
# This rule requires preinstallation of the patchelf package:
|
||||
# $ sudo apt install patchelf
|
||||
fix_rpath = rule(
|
||||
implementation = _fix_rpath_impl,
|
||||
attrs = {
|
||||
"src": attr.label(allow_single_file = True),
|
||||
"out": attr.output(mandatory = True),
|
||||
},
|
||||
)
|
||||
|
@@ -1,7 +0,0 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
exports_files([
|
||||
"pkg_config.bzl",
|
||||
"BUILD.tmpl",
|
||||
])
|
||||
|
@@ -1,32 +0,0 @@
|
||||
# vi: ft=bzl
|
||||
package(default_visibility = ["//visibility:private"])
|
||||
|
||||
_imports = [p[:len(p)-2] for p in glob(["{}/**/*.a".format(d) for d in [%{deps}]])]
|
||||
[cc_import(
|
||||
name = i.replace("/", "_"),
|
||||
hdrs = glob([%{hdrs}]),
|
||||
# TODO: library extension for platform.
|
||||
static_library = "{}.a".format(i),
|
||||
shared_library = "{}.dylib".format(i),
|
||||
) for i in _imports]
|
||||
|
||||
cc_library(
|
||||
name = "internal_lib",
|
||||
hdrs = glob([%{hdrs}]),
|
||||
copts = [%{copts}],
|
||||
includes = [%{includes}],
|
||||
linkopts = [%{linkopts}],
|
||||
deps = [(":" + i.replace("/", "_")) for i in _imports],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "lib",
|
||||
hdrs = glob(["%{strip_include}/**/*.h"]),
|
||||
copts = [%{extra_copts}],
|
||||
linkopts = [%{extra_linkopts}],
|
||||
deps = [":internal_lib"] + [%{extra_deps}],
|
||||
visibility = ["//visibility:public"],
|
||||
strip_include_prefix = "%{strip_include}",
|
||||
include_prefix = "%{include_prefix}",
|
||||
)
|
||||
|
@@ -1,11 +0,0 @@
|
||||
Name: pkg_config
|
||||
URL: https://github.com/cherrry/bazel_pkg_config
|
||||
Version: 284219a
|
||||
|
||||
Description:
|
||||
Bazel rules for pkg-config tools.
|
||||
|
||||
CEF-specific changes:
|
||||
- Fix failure with duplicate symlinks.
|
||||
- Remove `--static` flag from pkg-config invocation.
|
||||
|
@@ -1,2 +0,0 @@
|
||||
workspace(name = "pkg_config")
|
||||
|
@@ -1,194 +0,0 @@
|
||||
def _success(value):
|
||||
return struct(error = None, value = value)
|
||||
|
||||
def _error(message):
|
||||
return struct(error = message, value = None)
|
||||
|
||||
def _split(result, delimeter = " "):
|
||||
if result.error != None:
|
||||
return result
|
||||
return _success([arg for arg in result.value.strip().split(delimeter) if arg])
|
||||
|
||||
def _find_binary(ctx, binary_name):
|
||||
binary = ctx.which(binary_name)
|
||||
if binary == None:
|
||||
return _error("Unable to find binary: {}".format(binary_name))
|
||||
return _success(binary)
|
||||
|
||||
def _execute(ctx, binary, args):
|
||||
result = ctx.execute([binary] + args)
|
||||
if result.return_code != 0:
|
||||
return _error("Failed execute {} {}".format(binary, args))
|
||||
return _success(result.stdout)
|
||||
|
||||
def _pkg_config(ctx, pkg_config, pkg_name, args):
|
||||
return _execute(ctx, pkg_config, [pkg_name] + args)
|
||||
|
||||
def _check(ctx, pkg_config, pkg_name):
|
||||
exist = _pkg_config(ctx, pkg_config, pkg_name, ["--exists"])
|
||||
if exist.error != None:
|
||||
return _error("Package {} does not exist".format(pkg_name))
|
||||
|
||||
if ctx.attr.version != "":
|
||||
version = _pkg_config(ctx, pkg_config, pkg_name, ["--exact-version", ctx.attr.version])
|
||||
if version.error != None:
|
||||
return _error("Require {} version = {}".format(pkg_name, ctx.attr.version))
|
||||
|
||||
if ctx.attr.min_version != "":
|
||||
version = _pkg_config(ctx, pkg_config, pkg_name, ["--atleast-version", ctx.attr.min_version])
|
||||
if version.error != None:
|
||||
return _error("Require {} version >= {}".format(pkg_name, ctx.attr.min_version))
|
||||
|
||||
if ctx.attr.max_version != "":
|
||||
version = _pkg_config(ctx, pkg_config, pkg_name, ["--max-version", ctx.attr.max_version])
|
||||
if version.error != None:
|
||||
return _error("Require {} version <= {}".format(pkg_name, ctx.attr.max_version))
|
||||
|
||||
return _success(None)
|
||||
|
||||
def _extract_prefix(flags, prefix, strip = True):
|
||||
stripped, remain = [], []
|
||||
for arg in flags:
|
||||
if arg.startswith(prefix):
|
||||
if strip:
|
||||
stripped += [arg[len(prefix):]]
|
||||
else:
|
||||
stripped += [arg]
|
||||
else:
|
||||
remain += [arg]
|
||||
return stripped, remain
|
||||
|
||||
def _includes(ctx, pkg_config, pkg_name):
|
||||
includes = _split(_pkg_config(ctx, pkg_config, pkg_name, ["--cflags-only-I"]))
|
||||
if includes.error != None:
|
||||
return includes
|
||||
includes, unused = _extract_prefix(includes.value, "-I", strip = True)
|
||||
return _success(includes)
|
||||
|
||||
def _copts(ctx, pkg_config, pkg_name):
|
||||
return _split(_pkg_config(ctx, pkg_config, pkg_name, [
|
||||
"--cflags-only-other",
|
||||
"--libs-only-L",
|
||||
]))
|
||||
|
||||
def _linkopts(ctx, pkg_config, pkg_name):
|
||||
return _split(_pkg_config(ctx, pkg_config, pkg_name, [
|
||||
"--libs-only-other",
|
||||
"--libs-only-l",
|
||||
]))
|
||||
|
||||
def _ignore_opts(opts, ignore_opts):
|
||||
remain = []
|
||||
for opt in opts:
|
||||
if opt not in ignore_opts:
|
||||
remain += [opt]
|
||||
return remain
|
||||
|
||||
def _symlinks(ctx, basename, srcpaths):
|
||||
result = []
|
||||
root = ctx.path("")
|
||||
base = root.get_child(basename)
|
||||
rootlen = len(str(base)) - len(basename)
|
||||
for src in [ctx.path(p) for p in srcpaths]:
|
||||
dest = base.get_child(src.basename)
|
||||
if not dest.exists:
|
||||
ctx.symlink(src, dest)
|
||||
result += [str(dest)[rootlen:]]
|
||||
return result
|
||||
|
||||
def _deps(ctx, pkg_config, pkg_name):
|
||||
deps = _split(_pkg_config(ctx, pkg_config, pkg_name, [
|
||||
"--libs-only-L",
|
||||
"--static",
|
||||
]))
|
||||
if deps.error != None:
|
||||
return deps
|
||||
deps, unused = _extract_prefix(deps.value, "-L", strip = True)
|
||||
result = []
|
||||
for dep in {dep: True for dep in deps}.keys():
|
||||
base = "deps_" + dep.replace("/", "_").replace(".", "_")
|
||||
result += _symlinks(ctx, base, [dep])
|
||||
return _success(result)
|
||||
|
||||
def _fmt_array(array):
|
||||
return ",".join(['"{}"'.format(a) for a in array])
|
||||
|
||||
def _fmt_glob(array):
|
||||
return _fmt_array(["{}/**/*.h".format(a) for a in array])
|
||||
|
||||
def _pkg_config_impl(ctx):
|
||||
pkg_name = ctx.attr.pkg_name
|
||||
if pkg_name == "":
|
||||
pkg_name = ctx.attr.name
|
||||
|
||||
pkg_config = _find_binary(ctx, "pkg-config")
|
||||
if pkg_config.error != None:
|
||||
return pkg_config
|
||||
pkg_config = pkg_config.value
|
||||
|
||||
check = _check(ctx, pkg_config, pkg_name)
|
||||
if check.error != None:
|
||||
return check
|
||||
|
||||
includes = _includes(ctx, pkg_config, pkg_name)
|
||||
if includes.error != None:
|
||||
return includes
|
||||
includes = includes.value
|
||||
includes = _symlinks(ctx, "includes", includes)
|
||||
strip_include = "includes"
|
||||
if len(includes) == 1:
|
||||
strip_include = includes[0]
|
||||
if ctx.attr.strip_include != "":
|
||||
strip_include += "/" + ctx.attr.strip_include
|
||||
|
||||
ignore_opts = ctx.attr.ignore_opts
|
||||
copts = _copts(ctx, pkg_config, pkg_name)
|
||||
if copts.error != None:
|
||||
return copts
|
||||
copts = _ignore_opts(copts.value, ignore_opts)
|
||||
|
||||
linkopts = _linkopts(ctx, pkg_config, pkg_name)
|
||||
if linkopts.error != None:
|
||||
return linkopts
|
||||
linkopts = _ignore_opts(linkopts.value, ignore_opts)
|
||||
|
||||
deps = _deps(ctx, pkg_config, pkg_name)
|
||||
if deps.error != None:
|
||||
return deps
|
||||
deps = deps.value
|
||||
|
||||
include_prefix = ctx.attr.name
|
||||
if ctx.attr.include_prefix != "":
|
||||
include_prefix = ctx.attr.include_prefix + "/" + ctx.attr.name
|
||||
|
||||
build = ctx.template("BUILD", Label("//:BUILD.tmpl"), substitutions = {
|
||||
"%{name}": ctx.attr.name,
|
||||
"%{hdrs}": _fmt_glob(includes),
|
||||
"%{includes}": _fmt_array(includes),
|
||||
"%{copts}": _fmt_array(copts),
|
||||
"%{extra_copts}": _fmt_array(ctx.attr.copts),
|
||||
"%{deps}": _fmt_array(deps),
|
||||
"%{extra_deps}": _fmt_array(ctx.attr.deps),
|
||||
"%{linkopts}": _fmt_array(linkopts),
|
||||
"%{extra_linkopts}": _fmt_array(ctx.attr.linkopts),
|
||||
"%{strip_include}": strip_include,
|
||||
"%{include_prefix}": include_prefix,
|
||||
}, executable = False)
|
||||
|
||||
pkg_config = repository_rule(
|
||||
attrs = {
|
||||
"pkg_name": attr.string(doc = "Package name for pkg-config query, default to name."),
|
||||
"include_prefix": attr.string(doc = "Additional prefix when including file, e.g. third_party. Compatible with strip_include option to produce desired include paths."),
|
||||
"strip_include": attr.string(doc = "Strip prefix when including file, e.g. libs, files not included will be invisible. Compatible with include_prefix option to produce desired include paths."),
|
||||
"version": attr.string(doc = "Exact package version."),
|
||||
"min_version": attr.string(doc = "Minimum package version."),
|
||||
"max_version": attr.string(doc = "Maximum package version."),
|
||||
"deps": attr.string_list(doc = "Dependency targets."),
|
||||
"linkopts": attr.string_list(doc = "Extra linkopts value."),
|
||||
"copts": attr.string_list(doc = "Extra copts value."),
|
||||
"ignore_opts": attr.string_list(doc = "Ignore listed opts in copts or linkopts."),
|
||||
},
|
||||
local = True,
|
||||
implementation = _pkg_config_impl,
|
||||
)
|
||||
|
@@ -1,68 +0,0 @@
|
||||
# Copyright (c) 2024 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.
|
||||
|
||||
#
|
||||
# Distribution SOs.
|
||||
#
|
||||
|
||||
SOS = [
|
||||
"libcef.so",
|
||||
"libEGL.so",
|
||||
"libGLESv2.so",
|
||||
"libvk_swiftshader.so",
|
||||
"libvulkan.so.1",
|
||||
]
|
||||
|
||||
#
|
||||
# Common 'linkopts' for cc_binary targets.
|
||||
#
|
||||
|
||||
# Standard link libraries.
|
||||
STANDARD_LIBS = [
|
||||
"X11",
|
||||
]
|
||||
|
||||
COMMON_LINKOPTS_DEBUG = [
|
||||
]
|
||||
|
||||
COMMON_LINKOPTS_RELEASE = [
|
||||
]
|
||||
|
||||
COMMON_LINKOPTS = [
|
||||
"-l{}".format(lib) for lib in STANDARD_LIBS
|
||||
] + select({
|
||||
"@cef//:linux_dbg": COMMON_LINKOPTS_DEBUG,
|
||||
"//conditions:default": COMMON_LINKOPTS_RELEASE,
|
||||
})
|
||||
|
||||
#
|
||||
# Common 'copts' for cc_libary and cc_binary targets.
|
||||
#
|
||||
|
||||
COMMON_COPTS = [
|
||||
]
|
||||
|
||||
COMMON_COPTS_DEBUG = [
|
||||
]
|
||||
|
||||
COMMON_COPTS_RELEASE = [
|
||||
]
|
||||
|
||||
#
|
||||
# Common 'defines' for cc_libary targets.
|
||||
#
|
||||
|
||||
COMMON_DEFINES = [
|
||||
# Used by apps to test if the sandbox is enabled
|
||||
"CEF_USE_SANDBOX",
|
||||
]
|
||||
|
||||
COMMON_DEFINES_DEBUG = [
|
||||
]
|
||||
|
||||
COMMON_DEFINES_RELEASE = [
|
||||
# Not a debug build
|
||||
"NDEBUG",
|
||||
]
|
||||
|
@@ -1,8 +0,0 @@
|
||||
# Copyright (c) 2024 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.
|
||||
|
||||
# Allow access from targets in other packages.
|
||||
package(default_visibility = [
|
||||
"//visibility:public",
|
||||
])
|
@@ -1,113 +0,0 @@
|
||||
# Copyright (c) 2024 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.
|
||||
|
||||
load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
|
||||
load("@build_bazel_rules_apple//apple:macos.bzl", "macos_application")
|
||||
load("//bazel:variables.bzl", "VERSION_PLIST")
|
||||
load("//bazel/mac:variables.bzl",
|
||||
"MACOS_DEPLOYMENT_TARGET",
|
||||
"MACOS_BUNDLE_ID_BASE",
|
||||
"CEF_FRAMEWORK_NAME",
|
||||
"COMMON_LINKOPTS")
|
||||
|
||||
def _declare_helper_app(name, info_plist, deps, helper_base_name, helper_suffix, **kwargs):
|
||||
"""
|
||||
Creates a Helper .app target.
|
||||
"""
|
||||
helper_name = "{} Helper".format(name)
|
||||
bundle_id_suffix = ""
|
||||
|
||||
if helper_suffix:
|
||||
helper_name += " ({})".format(helper_suffix)
|
||||
bundle_id_suffix += ".{}".format(helper_suffix.lower())
|
||||
|
||||
# Helper app bundle Info.plist.
|
||||
expand_template(
|
||||
name = "{}_InfoPList".format(helper_base_name),
|
||||
template = info_plist,
|
||||
out = "{}Info.plist".format(helper_base_name),
|
||||
substitutions = {
|
||||
"${EXECUTABLE_NAME}": helper_name,
|
||||
"${PRODUCT_NAME}": name,
|
||||
"${BUNDLE_ID_SUFFIX}": bundle_id_suffix,
|
||||
"${VERSION_SHORT}": VERSION_PLIST,
|
||||
"${VERSION_LONG}": VERSION_PLIST,
|
||||
},
|
||||
)
|
||||
|
||||
# Helper app bundle.
|
||||
macos_application(
|
||||
name = helper_base_name,
|
||||
bundle_name = helper_name,
|
||||
bundle_id = "{}.{}.helper{}".format(MACOS_BUNDLE_ID_BASE, name.lower(), bundle_id_suffix),
|
||||
infoplists = [":{}_InfoPList".format(helper_base_name)],
|
||||
minimum_os_version = MACOS_DEPLOYMENT_TARGET,
|
||||
deps = [
|
||||
"@cef//:cef_sandbox",
|
||||
] + deps,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
HELPERS = {
|
||||
"HelperBase": "",
|
||||
"HelperAlerts": "Alerts",
|
||||
"HelperGPU": "GPU",
|
||||
"HelperPlugin": "Plugin",
|
||||
"HelperRenderer": "Renderer",
|
||||
}
|
||||
|
||||
def declare_all_helper_apps(name, info_plist, deps, **kwargs):
|
||||
"""
|
||||
Creates all Helper .app targets.
|
||||
"""
|
||||
[_declare_helper_app(
|
||||
name = name,
|
||||
info_plist = info_plist,
|
||||
deps = deps,
|
||||
helper_base_name = h,
|
||||
helper_suffix = v,
|
||||
**kwargs,
|
||||
) for h, v in HELPERS.items()]
|
||||
|
||||
def declare_main_app(name, info_plist, deps, resources, linkopts=[], **kwargs):
|
||||
"""
|
||||
Creates the main .app target.
|
||||
"""
|
||||
|
||||
# Main app bundle Info.plist.
|
||||
expand_template(
|
||||
name = "InfoPList",
|
||||
template = info_plist,
|
||||
out = "Info.plist",
|
||||
substitutions = {
|
||||
"${EXECUTABLE_NAME}": name,
|
||||
"${PRODUCT_NAME}": name,
|
||||
"${VERSION_SHORT}": VERSION_PLIST,
|
||||
"${VERSION_LONG}": VERSION_PLIST,
|
||||
},
|
||||
)
|
||||
|
||||
# Main app bindle.
|
||||
macos_application(
|
||||
name = name,
|
||||
additional_contents = {
|
||||
":HelperBase": "Frameworks",
|
||||
":HelperAlerts": "Frameworks",
|
||||
":HelperGPU": "Frameworks",
|
||||
":HelperPlugin": "Frameworks",
|
||||
":HelperRenderer": "Frameworks",
|
||||
"@cef//:cef_framework": "Frameworks/{}.framework".format(CEF_FRAMEWORK_NAME),
|
||||
},
|
||||
bundle_name = name,
|
||||
bundle_id = "{}.{}".format(MACOS_BUNDLE_ID_BASE, name.lower()),
|
||||
infoplists = [":InfoPList"],
|
||||
linkopts = COMMON_LINKOPTS + linkopts,
|
||||
minimum_os_version = MACOS_DEPLOYMENT_TARGET,
|
||||
resources = resources,
|
||||
target_compatible_with = [
|
||||
"@platforms//os:macos",
|
||||
],
|
||||
deps = deps,
|
||||
**kwargs,
|
||||
)
|
@@ -1,52 +0,0 @@
|
||||
# Copyright (c) 2024 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.
|
||||
|
||||
MACOS_DEPLOYMENT_TARGET="11.0"
|
||||
MACOS_BUNDLE_ID_BASE="org.cef"
|
||||
CEF_FRAMEWORK_NAME="Chromium Embedded Framework"
|
||||
|
||||
#
|
||||
# Common 'linkopts' for macos_application targets.
|
||||
#
|
||||
|
||||
# Standard link frameworks.
|
||||
STANDARD_FRAMEWORKS = [
|
||||
"AppKit",
|
||||
]
|
||||
|
||||
COMMON_LINKOPTS_DEBUG = [
|
||||
]
|
||||
|
||||
COMMON_LINKOPTS_RELEASE = [
|
||||
]
|
||||
|
||||
COMMON_LINKOPTS = [
|
||||
"-framework {}".format(lib) for lib in STANDARD_FRAMEWORKS
|
||||
] + select({
|
||||
"@cef//:macos_dbg": COMMON_LINKOPTS_DEBUG,
|
||||
"//conditions:default": COMMON_LINKOPTS_RELEASE,
|
||||
})
|
||||
|
||||
#
|
||||
# Common 'copts' for cc_libary, objc_library and macos_application targets.
|
||||
# We include defines in 'copts' because objc_library does not support
|
||||
# 'local_defines'. See https://github.com/bazelbuild/bazel/issues/17482.
|
||||
#
|
||||
|
||||
COMMON_COPTS = [
|
||||
"-Wno-undefined-var-template",
|
||||
"-Wno-missing-field-initializers",
|
||||
"-Wno-deprecated-copy",
|
||||
|
||||
# Used by apps to test if the sandbox is enabled
|
||||
"-DCEF_USE_SANDBOX",
|
||||
]
|
||||
|
||||
COMMON_COPTS_DEBUG = [
|
||||
]
|
||||
|
||||
COMMON_COPTS_RELEASE = [
|
||||
# Not a debug build
|
||||
"-DNDEBUG",
|
||||
]
|
@@ -1,8 +0,0 @@
|
||||
# Copyright (c) 2024 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.
|
||||
|
||||
# Allow access from targets in other packages.
|
||||
package(default_visibility = [
|
||||
"//visibility:public",
|
||||
])
|
@@ -1,33 +0,0 @@
|
||||
# Copyright (c) 2024 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.
|
||||
|
||||
load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain", _use_cpp_toolchain="use_cpp_toolchain")
|
||||
load("@rules_cc//cc:action_names.bzl", "CPP_COMPILE_ACTION_NAME")
|
||||
|
||||
# Since we need windows.h and other headers, we should ensure we have the same
|
||||
# development environment as a regular cl.exe call. So use the current toolchain
|
||||
# to grab environment variables to feed into the actual rc.exe call
|
||||
# Much of this is taken from:
|
||||
# https://github.com/bazelbuild/rules_cc/blob/main/examples/my_c_archive/my_c_archive.bzl
|
||||
def collect_compilation_env(ctx):
|
||||
cc_toolchain = find_cpp_toolchain(ctx)
|
||||
feature_configuration = cc_common.configure_features(
|
||||
ctx = ctx,
|
||||
cc_toolchain = cc_toolchain,
|
||||
requested_features = ctx.features,
|
||||
unsupported_features = ctx.disabled_features,
|
||||
)
|
||||
|
||||
compiler_variables = cc_common.create_compile_variables(
|
||||
feature_configuration = feature_configuration,
|
||||
cc_toolchain = cc_toolchain,
|
||||
)
|
||||
|
||||
return cc_common.get_environment_variables(
|
||||
feature_configuration = feature_configuration,
|
||||
action_name = CPP_COMPILE_ACTION_NAME,
|
||||
variables = compiler_variables,
|
||||
)
|
||||
|
||||
use_cpp_toolchain=_use_cpp_toolchain
|
@@ -1,83 +0,0 @@
|
||||
# Copyright (c) 2024 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.
|
||||
|
||||
load("//bazel:copy_filegroups.bzl", "copy_filegroups")
|
||||
load("//bazel/win:mt.bzl", "add_manifest")
|
||||
load("//bazel/win:rc.bzl", "compile_rc")
|
||||
load("//bazel/win:variables.bzl",
|
||||
"COMMON_LINKOPTS",
|
||||
"COMMON_COPTS", "COMMON_COPTS_RELEASE", "COMMON_COPTS_DEBUG",
|
||||
"COMMON_DEFINES", "COMMON_DEFINES_RELEASE", "COMMON_DEFINES_DEBUG")
|
||||
load("@rules_cc//cc:defs.bzl", "cc_binary")
|
||||
|
||||
def declare_exe(name, srcs, manifest_srcs, rc_file, resources_srcs, resources_deps=[],
|
||||
deps=[], linkopts=[], copts=[], local_defines=[], data=[],
|
||||
additional_linker_inputs=[], features=[], **kwargs):
|
||||
# Resource file.
|
||||
res_target = "{}_res".format(name)
|
||||
compile_rc(
|
||||
name = res_target,
|
||||
rc_file = rc_file,
|
||||
srcs = resources_srcs,
|
||||
deps = resources_deps,
|
||||
out = "{}.res".format(name),
|
||||
target_compatible_with = ["@platforms//os:windows"],
|
||||
)
|
||||
|
||||
# Copy DLLs and resources into the current project.
|
||||
copy_target = "{}_dlls_and_resources".format(name)
|
||||
copy_filegroups(
|
||||
name = copy_target,
|
||||
filegroups = [
|
||||
"@cef//:dlls",
|
||||
"@cef//:resources",
|
||||
],
|
||||
remove_prefixes = [
|
||||
"Debug",
|
||||
"Release",
|
||||
"Resources",
|
||||
],
|
||||
)
|
||||
|
||||
# Executable target.
|
||||
binary_target = "{}_no_manifest".format(name)
|
||||
cc_binary(
|
||||
name = binary_target,
|
||||
srcs = srcs,
|
||||
deps = [
|
||||
"@cef//:cef_wrapper",
|
||||
"@cef//:cef_sandbox",
|
||||
] + deps,
|
||||
linkopts = [
|
||||
"$(location @cef//:cef_lib)",
|
||||
"$(location :{})".format(res_target),
|
||||
] + COMMON_LINKOPTS + linkopts,
|
||||
copts = COMMON_COPTS + select({
|
||||
"@cef//:windows_dbg": COMMON_COPTS_DEBUG,
|
||||
"//conditions:default": COMMON_COPTS_RELEASE,
|
||||
}) + copts,
|
||||
local_defines = COMMON_DEFINES + select({
|
||||
"@cef//:windows_dbg": COMMON_DEFINES_DEBUG,
|
||||
"//conditions:default": COMMON_DEFINES_RELEASE,
|
||||
}) + local_defines,
|
||||
additional_linker_inputs = [
|
||||
"@cef//:cef_lib",
|
||||
":{}".format(res_target),
|
||||
] + additional_linker_inputs,
|
||||
data = [
|
||||
":{}".format(copy_target),
|
||||
] + data,
|
||||
features = ["generate_pdb_file"] + features,
|
||||
target_compatible_with = ["@platforms//os:windows"],
|
||||
**kwargs
|
||||
)
|
||||
|
||||
# Add manifest and rename to final executable.
|
||||
add_manifest(
|
||||
name = name,
|
||||
mt_files = manifest_srcs,
|
||||
in_binary = ":{}".format(binary_target),
|
||||
out_binary = "{}.exe".format(name),
|
||||
target_compatible_with = ["@platforms//os:windows"],
|
||||
)
|
@@ -1,72 +0,0 @@
|
||||
# Copyright (c) 2024 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.
|
||||
|
||||
load("//bazel/win:cc_env.bzl", "collect_compilation_env", "use_cpp_toolchain")
|
||||
|
||||
# Copy exe and pdb file without tracking the destination as an output.
|
||||
# Based on https://github.com/bazelbuild/bazel-skylib/blob/main/rules/private/copy_file_private.bzl
|
||||
def _write_copy_cmd(ctx, src, dst):
|
||||
# Most Windows binaries built with MSVC use a certain argument quoting
|
||||
# scheme. Bazel uses that scheme too to quote arguments. However,
|
||||
# cmd.exe uses different semantics, so Bazel's quoting is wrong here.
|
||||
# To fix that we write the command to a .bat file so no command line
|
||||
# quoting or escaping is required.
|
||||
bat = ctx.actions.declare_file(ctx.label.name + "-cmd.bat")
|
||||
src_path = src.path.replace("/", "\\")
|
||||
dst_path = dst.path.replace("/", "\\")
|
||||
ctx.actions.write(
|
||||
output = bat,
|
||||
# Do not use lib/shell.bzl's shell.quote() method, because that uses
|
||||
# Bash quoting syntax, which is different from cmd.exe's syntax.
|
||||
content = "@copy /Y \"%s\" \"%s\" >NUL\n@copy /Y \"%s\" \"%s\" >NUL" % (
|
||||
src_path,
|
||||
dst_path,
|
||||
src_path.replace(".exe", ".pdb"),
|
||||
dst_path.replace(".exe", ".pdb"),
|
||||
),
|
||||
is_executable = True,
|
||||
)
|
||||
return bat
|
||||
|
||||
def _add_mt_impl(ctx):
|
||||
mt_files = ctx.files.mt_files
|
||||
input = ctx.attr.in_binary[DebugPackageInfo].unstripped_file
|
||||
output = ctx.outputs.out_binary
|
||||
bat = _write_copy_cmd(ctx, input, output)
|
||||
|
||||
inputs = mt_files + [input, bat]
|
||||
|
||||
# Bring over 'data' dependencies from the input.
|
||||
deps_inputs = ctx.runfiles(files = inputs)
|
||||
deps_inputs = deps_inputs.merge_all([ctx.attr.in_binary[DefaultInfo].default_runfiles])
|
||||
|
||||
ctx.actions.run(
|
||||
executable = ctx.executable._tool,
|
||||
inputs = deps_inputs.files,
|
||||
outputs = [output],
|
||||
env = collect_compilation_env(ctx),
|
||||
# The bat file will be executed before the tool command.
|
||||
arguments = [bat.path, "-nologo", "-manifest"] + [f.path for f in mt_files] +
|
||||
["-outputresource:{}".format(output.path)],
|
||||
mnemonic = "AddMT"
|
||||
)
|
||||
|
||||
return DefaultInfo(files = depset([output]))
|
||||
|
||||
add_manifest = rule(
|
||||
implementation = _add_mt_impl,
|
||||
attrs = {
|
||||
"mt_files": attr.label_list(allow_files = [".manifest"]),
|
||||
"in_binary": attr.label(providers = [CcInfo], allow_single_file = True),
|
||||
"out_binary": attr.output(),
|
||||
"_cc_toolchain": attr.label(default = Label("@bazel_tools//tools/cpp:current_cc_toolchain")),
|
||||
"_tool": attr.label(
|
||||
default = "@winsdk//:mt_pybin",
|
||||
executable = True,
|
||||
cfg = "exec"
|
||||
)
|
||||
},
|
||||
fragments = ["cpp"],
|
||||
toolchains = use_cpp_toolchain(),
|
||||
)
|
@@ -1,50 +0,0 @@
|
||||
# Copyright (c) 2024 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.
|
||||
|
||||
load("//bazel/win:cc_env.bzl", "collect_compilation_env", "use_cpp_toolchain")
|
||||
|
||||
def _compile_rc_impl(ctx):
|
||||
rc_file = ctx.file.rc_file
|
||||
output = ctx.outputs.out
|
||||
|
||||
inputs = [rc_file] + ctx.files.srcs
|
||||
includes = ["/i{}/{}".format(ctx.label.package, i) for i in ctx.attr.includes]
|
||||
|
||||
# Grab all include paths/files required for the run
|
||||
for dep in ctx.attr.deps:
|
||||
comp_ctx = dep[CcInfo].compilation_context
|
||||
|
||||
includes += ["/i{}".format(i) for i in comp_ctx.quote_includes.to_list()]
|
||||
includes += ["/i{}".format(i) for i in comp_ctx.system_includes.to_list()]
|
||||
inputs += comp_ctx.headers.to_list()
|
||||
|
||||
ctx.actions.run(
|
||||
executable = ctx.executable._tool,
|
||||
inputs = inputs,
|
||||
outputs = [output],
|
||||
env = collect_compilation_env(ctx),
|
||||
arguments = includes + ["/fo", output.path, rc_file.path],
|
||||
mnemonic = "CompileRC"
|
||||
)
|
||||
|
||||
return DefaultInfo(files = depset([output]))
|
||||
|
||||
compile_rc = rule(
|
||||
implementation = _compile_rc_impl,
|
||||
attrs = {
|
||||
"rc_file": attr.label(allow_single_file = [".rc"]),
|
||||
"srcs": attr.label_list(allow_files = True),
|
||||
"deps": attr.label_list(providers = [CcInfo]),
|
||||
"includes": attr.string_list(),
|
||||
"out": attr.output(),
|
||||
"_cc_toolchain": attr.label(default = Label("@bazel_tools//tools/cpp:current_cc_toolchain")),
|
||||
"_tool": attr.label(
|
||||
default = "@winsdk//:rc_pybin",
|
||||
executable = True,
|
||||
cfg = "exec"
|
||||
)
|
||||
},
|
||||
fragments = ["cpp"],
|
||||
toolchains = use_cpp_toolchain(),
|
||||
)
|
@@ -1,124 +0,0 @@
|
||||
# Copyright (c) 2024 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.
|
||||
|
||||
load("@bazel_tools//tools/cpp:windows_cc_configure.bzl", "find_vc_path", "setup_vc_env_vars")
|
||||
|
||||
def _get_arch(rctx):
|
||||
if rctx.os.arch == "amd64":
|
||||
return "x64"
|
||||
|
||||
def _is_windows(rctx):
|
||||
return rctx.os.name.find("windows") != -1
|
||||
|
||||
# Tools in the form <Target>: [<Tool>, <Other files needed for that target>]
|
||||
TOOLS = {
|
||||
"mt": {
|
||||
"tool": "mt.exe",
|
||||
"deps": [],
|
||||
},
|
||||
"rc": {
|
||||
"tool": "rc.exe",
|
||||
"deps": ["rcdll.dll"],
|
||||
},
|
||||
}
|
||||
|
||||
def _setup_tools(rctx, sdk_bin_path, sdk_metadata_path):
|
||||
contents = ""
|
||||
|
||||
rctx.symlink(sdk_metadata_path, "VerUnionMetadata")
|
||||
contents += """
|
||||
exports_files(["VerUnionMetadata"])
|
||||
"""
|
||||
|
||||
for toolname, toolcfg in TOOLS.items():
|
||||
toolexec = toolcfg["tool"]
|
||||
deps = toolcfg["deps"]
|
||||
direct_deps = [toolexec] + deps
|
||||
shared_deps = toolcfg.get("shared_deps", [])
|
||||
|
||||
# Symlink any tools into the right places
|
||||
for dep in direct_deps:
|
||||
rctx.symlink(
|
||||
"{}/{}".format(sdk_bin_path, dep),
|
||||
dep,
|
||||
)
|
||||
|
||||
# Setting up a filegroup for those dependents
|
||||
contents += """
|
||||
filegroup(
|
||||
name = "{}_deps",
|
||||
srcs = {},
|
||||
)
|
||||
""".format(toolname, direct_deps + shared_deps)
|
||||
|
||||
# Now create a wrapper for this tool that simply calls it
|
||||
rctx.template(
|
||||
"{}_wrapper.py".format(toolname),
|
||||
Label("//bazel/win:wrapper.py.tpl"),
|
||||
substitutions = {
|
||||
"${binary}": toolexec,
|
||||
},
|
||||
executable = True,
|
||||
)
|
||||
|
||||
# And add that newly created wrapper to the BUILD.bazel file
|
||||
contents += """
|
||||
py_binary(
|
||||
name = "{0}_pybin",
|
||||
srcs = ["{0}_wrapper.py"],
|
||||
main = "{0}_wrapper.py",
|
||||
data = [
|
||||
"@rules_python//python/runfiles",
|
||||
":{0}_deps"
|
||||
],
|
||||
python_version = "PY3",
|
||||
)
|
||||
""".format(toolname)
|
||||
|
||||
return contents
|
||||
|
||||
def _setup_vc_debug_runtime(rctx, sdk_bin_path):
|
||||
ucrtbased_dll = "ucrtbased.dll"
|
||||
rctx.symlink("{}/ucrt/{}".format(sdk_bin_path, ucrtbased_dll), ucrtbased_dll)
|
||||
|
||||
contents = """
|
||||
filegroup(
|
||||
name = "vc_debug_runtime",
|
||||
srcs = ["{}"],
|
||||
)
|
||||
""".format(ucrtbased_dll)
|
||||
|
||||
return contents
|
||||
|
||||
def _windows_sdk_impl(rctx):
|
||||
# We only support Windows
|
||||
if not _is_windows(rctx):
|
||||
fail("This rule only supports Windows")
|
||||
|
||||
# Figure out where the SDK is, which is based on a registry key.
|
||||
vc_path = find_vc_path(rctx)
|
||||
env = setup_vc_env_vars(rctx, vc_path, envvars = ["WINDOWSSDKVERBINPATH", "WindowsSdkDir", "WindowsSDKVersion"])
|
||||
sdk_bin_path = "{}{}".format(env["WINDOWSSDKVERBINPATH"], _get_arch(rctx))
|
||||
sdk_metadata_path = "{}UnionMetadata/{}".format(env["WindowsSdkDir"], env["WindowsSDKVersion"])
|
||||
|
||||
# Start with some pre-amble
|
||||
contents = """# Autogenerated by //bazel/win:sdk.bzl
|
||||
load("@rules_python//python:defs.bzl", "py_binary")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
"""
|
||||
|
||||
# Handle setting up tools from our list
|
||||
contents += _setup_tools(rctx, sdk_bin_path, sdk_metadata_path)
|
||||
|
||||
contents += _setup_vc_debug_runtime(rctx, sdk_bin_path)
|
||||
|
||||
rctx.file("BUILD.bazel", contents)
|
||||
|
||||
setup_sdk = repository_rule(
|
||||
attrs = {},
|
||||
local = True,
|
||||
configure = True,
|
||||
implementation = _windows_sdk_impl,
|
||||
)
|
@@ -1,199 +0,0 @@
|
||||
# Copyright (c) 2024 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.
|
||||
|
||||
#
|
||||
# Distribution DLLs.
|
||||
#
|
||||
|
||||
DLLS = [
|
||||
"chrome_elf.dll",
|
||||
"d3dcompiler_47.dll",
|
||||
"libcef.dll",
|
||||
"libEGL.dll",
|
||||
"libGLESv2.dll",
|
||||
"vk_swiftshader.dll",
|
||||
"vulkan-1.dll",
|
||||
]
|
||||
|
||||
DLLS_X64 = [
|
||||
"dxil.dll",
|
||||
"dxcompiler.dll",
|
||||
]
|
||||
|
||||
#
|
||||
# Common 'linkopts' for cc_binary targets.
|
||||
#
|
||||
|
||||
# Windows delayload DLLs.
|
||||
# Delayload most libraries as the DLLs are simply not required at startup (or
|
||||
# at all, depending on the process type). Some dlls open handles when they are
|
||||
# loaded, and we may not want them to be loaded in renderers or other sandboxed
|
||||
# processes. Conversely, some DLLs must be loaded before sandbox lockdown. In
|
||||
# unsandboxed processes they will load when first needed. The linker will
|
||||
# automatically ignore anything which is not linked to the binary at all (it is
|
||||
# harmless to have an unmatched /delayload). This list should be kept in sync
|
||||
# with Chromium's "delayloads" target from the //build/config/win/BUILD.gn file.
|
||||
DELAYLOAD_DLLS = [
|
||||
"api-ms-win-core-winrt-error-l1-1-0.dll",
|
||||
"api-ms-win-core-winrt-l1-1-0.dll",
|
||||
"api-ms-win-core-winrt-string-l1-1-0.dll",
|
||||
"advapi32.dll",
|
||||
"comctl32.dll",
|
||||
"comdlg32.dll",
|
||||
"credui.dll",
|
||||
"cryptui.dll",
|
||||
"d3d11.dll",
|
||||
"d3d9.dll",
|
||||
"dwmapi.dll",
|
||||
"dxgi.dll",
|
||||
"dxva2.dll",
|
||||
"esent.dll",
|
||||
"gdi32.dll",
|
||||
"hid.dll",
|
||||
"imagehlp.dll",
|
||||
"imm32.dll",
|
||||
"msi.dll",
|
||||
"netapi32.dll",
|
||||
"ncrypt.dll",
|
||||
"ole32.dll",
|
||||
"oleacc.dll",
|
||||
"propsys.dll",
|
||||
"psapi.dll",
|
||||
"rpcrt4.dll",
|
||||
"rstrtmgr.dll",
|
||||
"setupapi.dll",
|
||||
"shell32.dll",
|
||||
"shlwapi.dll",
|
||||
"uiautomationcore.dll",
|
||||
"urlmon.dll",
|
||||
"user32.dll",
|
||||
"usp10.dll",
|
||||
"uxtheme.dll",
|
||||
"wer.dll",
|
||||
"wevtapi.dll",
|
||||
"wininet.dll",
|
||||
"winusb.dll",
|
||||
"wsock32.dll",
|
||||
"wtsapi32.dll",
|
||||
]
|
||||
|
||||
# Standard link libraries.
|
||||
STANDARD_LIBS = [
|
||||
"comctl32.lib",
|
||||
"gdi32.lib",
|
||||
"rpcrt4.lib",
|
||||
"shlwapi.lib",
|
||||
"user32.lib",
|
||||
"ws2_32.lib",
|
||||
]
|
||||
|
||||
# Sandbox link libraries.
|
||||
SANDBOX_LIBS = [
|
||||
"Advapi32.lib",
|
||||
"dbghelp.lib",
|
||||
"Delayimp.lib",
|
||||
"ntdll.lib",
|
||||
"OleAut32.lib",
|
||||
"PowrProf.lib",
|
||||
"Propsys.lib",
|
||||
"psapi.lib",
|
||||
"SetupAPI.lib",
|
||||
"Shcore.lib",
|
||||
"Shell32.lib",
|
||||
"Userenv.lib",
|
||||
"version.lib",
|
||||
"wbemuuid.lib",
|
||||
"WindowsApp.lib",
|
||||
"winmm.lib",
|
||||
]
|
||||
|
||||
COMMON_LINKOPTS_DEBUG = [
|
||||
]
|
||||
|
||||
COMMON_LINKOPTS_RELEASE = [
|
||||
]
|
||||
|
||||
COMMON_LINKOPTS = [
|
||||
# No default manifest (see compile_rc target).
|
||||
"/MANIFEST:NO",
|
||||
# Allow 32-bit processes to access 3GB of RAM.
|
||||
"/LARGEADDRESSAWARE",
|
||||
# Generate Debug information.
|
||||
# TODO: Remove after fixing opt builds to work without it.
|
||||
"/DEBUG",
|
||||
] + [
|
||||
"/DELAYLOAD:{}".format(dll) for dll in DELAYLOAD_DLLS
|
||||
] + [
|
||||
"/DEFAULTLIB:{}".format(lib) for lib in STANDARD_LIBS
|
||||
] + select({
|
||||
# Set the initial stack size to 0.5MiB, instead of the 1.5MiB minimum
|
||||
# needed by CEF's main thread. This saves significant memory on threads
|
||||
# (like those in the Windows thread pool, and others) whose stack size we
|
||||
# can only control through this setting. The main thread (in 32-bit builds
|
||||
# only) uses fibers to switch to a 4MiB stack at runtime via
|
||||
# CefRunWinMainWithPreferredStackSize().
|
||||
"@cef//:windows_32": ["/STACK:0x80000"],
|
||||
# Increase the initial stack size to 8MiB from the default 1MiB.
|
||||
"//conditions:default": ["/STACK:0x800000"],
|
||||
}) + select({
|
||||
"@cef//:windows_dbg": COMMON_LINKOPTS_DEBUG,
|
||||
"//conditions:default": COMMON_LINKOPTS_RELEASE,
|
||||
})
|
||||
|
||||
#
|
||||
# Common 'copts' for cc_libary and cc_binary targets.
|
||||
#
|
||||
|
||||
COMMON_COPTS = [
|
||||
]
|
||||
|
||||
COMMON_COPTS_DEBUG = [
|
||||
]
|
||||
|
||||
COMMON_COPTS_RELEASE = [
|
||||
]
|
||||
|
||||
#
|
||||
# Common 'defines' for cc_libary targets.
|
||||
#
|
||||
|
||||
COMMON_DEFINES = [
|
||||
# Windows platform
|
||||
"WIN32",
|
||||
"_WIN32",
|
||||
"_WINDOWS",
|
||||
# Unicode build
|
||||
"UNICODE",
|
||||
"_UNICODE",
|
||||
# Targeting Windows 10. We can't say `=_WIN32_WINNT_WIN10` here because
|
||||
# some files do `#if WINVER < 0x0600` without including windows.h before,
|
||||
# and then _WIN32_WINNT_WIN10 isn't yet known to be 0x0A00.
|
||||
"WINVER=0x0A00",
|
||||
"_WIN32_WINNT=0x0A00",
|
||||
"NTDDI_VERSION=NTDDI_WIN10_FE",
|
||||
# Use the standard's templated min/max
|
||||
"NOMINMAX",
|
||||
# Exclude less common API declarations
|
||||
"WIN32_LEAN_AND_MEAN",
|
||||
# Disable exceptions
|
||||
"_HAS_EXCEPTIONS=0",
|
||||
|
||||
# Required by cef_sandbox.lib
|
||||
"PSAPI_VERSION=1",
|
||||
# Used by apps to test if the sandbox is enabled
|
||||
"CEF_USE_SANDBOX",
|
||||
]
|
||||
|
||||
COMMON_DEFINES_DEBUG = [
|
||||
# Required by cef_sandbox.lib
|
||||
# Disable iterator debugging
|
||||
"HAS_ITERATOR_DEBUGGING=0",
|
||||
"_ITERATOR_DEBUG_LEVEL=0",
|
||||
]
|
||||
|
||||
COMMON_DEFINES_RELEASE = [
|
||||
# Not a debug build
|
||||
"NDEBUG",
|
||||
"_NDEBUG",
|
||||
]
|
@@ -1,69 +0,0 @@
|
||||
# Copyright (c) 2024 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.
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
from rules_python.python.runfiles import runfiles
|
||||
|
||||
REPLACEMENTS = {
|
||||
"XXX_GETCWD_XXX": os.getcwd(),
|
||||
}
|
||||
|
||||
def replace_in_str(input):
|
||||
output = input
|
||||
for placeholder, replacement in REPLACEMENTS.items():
|
||||
if placeholder in output:
|
||||
output = output.replace(placeholder, replacement)
|
||||
return output
|
||||
|
||||
def print_error(str):
|
||||
print(str, file=sys.stderr)
|
||||
|
||||
r = runfiles.Create()
|
||||
wrapped_binary = r.Rlocation("winsdk/${binary}")
|
||||
args = list(map(replace_in_str, sys.argv[1:]))
|
||||
|
||||
# Optionally execute a script before tool execution.
|
||||
if args[0].endswith('.bat') or args[0].endswith('.cmd'):
|
||||
if sys.platform != 'win32':
|
||||
raise RuntimeError("Error running bat file; unsupported platform")
|
||||
|
||||
# Execute the .bat file first.
|
||||
bat_file = args[0].replace('/', '\\')
|
||||
p = subprocess.run(
|
||||
bat_file, shell=True,
|
||||
stdout = subprocess.PIPE,
|
||||
stderr = subprocess.STDOUT,
|
||||
text=True)
|
||||
if p.returncode != 0:
|
||||
print_error("[Generated python wrapper] Error running bat file:")
|
||||
print_error(f"CWD: {os.getcwd()}")
|
||||
print_error(f"EXEC: {bat_file}")
|
||||
print_error(f"Exec output:")
|
||||
print_error(p.stdout)
|
||||
raise RuntimeError(f"Error running bat file; {bat_file}")
|
||||
|
||||
args = args[1:]
|
||||
|
||||
try:
|
||||
p = subprocess.run(
|
||||
[wrapped_binary] + args,
|
||||
stdout = subprocess.PIPE,
|
||||
stderr = subprocess.STDOUT,
|
||||
text=True)
|
||||
if p.returncode != 0:
|
||||
print_error("[Generated python wrapper] Error running command:")
|
||||
print_error(f"CWD: {os.getcwd()}")
|
||||
print_error(f"EXEC: {wrapped_binary}")
|
||||
print_error(f"ARGS: {args}")
|
||||
print_error(f"Exec output:")
|
||||
print_error(p.stdout)
|
||||
raise RuntimeError(f"Error running wrapped command; {wrapped_binary}")
|
||||
except OSError as e:
|
||||
print_error("[Generated python wrapper] Error running command:")
|
||||
print_error(f"CWD: {os.getcwd()}")
|
||||
print_error(f"EXEC: {wrapped_binary}")
|
||||
print_error(f"ARGS: {args}")
|
||||
raise
|
@@ -1,72 +0,0 @@
|
||||
{
|
||||
"hashes": {
|
||||
"13300": {
|
||||
"comment": "Added February 21, 2025.",
|
||||
"linux": "2508f3f0b0e5dfa191036fa6c04f8dcfa18c94b9",
|
||||
"mac": "80c0b59ba9dd783aa71fae0aa5f7dad64620e8c9",
|
||||
"windows": "45d39c3669ba75467e3e609f626c31506c0eae22"
|
||||
},
|
||||
"13301": {
|
||||
"comment": "Added February 21, 2025.",
|
||||
"linux": "aa073dd1c586812503ca293c718358460d8c2dd6",
|
||||
"mac": "fda40a5df44628cac50a589ff979c0746011591e",
|
||||
"windows": "7109702038d51512d35dd2ed77231f9100e38214"
|
||||
},
|
||||
"13302": {
|
||||
"comment": "Added February 21, 2025.",
|
||||
"linux": "d5597ebfa30081953425e897209a8387b9584205",
|
||||
"mac": "4aa24470ba3a4bd9c06bc0e4a201b896394a86b5",
|
||||
"windows": "18799961f4461a9cbae2aed89ac04b73ab7c37f3"
|
||||
},
|
||||
"13303": {
|
||||
"comment": "Added February 21, 2025.",
|
||||
"linux": "f3a696ee30ce1e00490a58df017393c126c89709",
|
||||
"mac": "f2cdce2b9a4b635c28b5b92c42c35625a937380c",
|
||||
"windows": "20016fd6a9b87ef4c539cd1f42bf1ca09b6903ca"
|
||||
},
|
||||
"13304": {
|
||||
"comment": "Added February 21, 2025.",
|
||||
"linux": "f1ababb4ff51ecbf77c481cee3721ef0eca9c8ca",
|
||||
"mac": "98964c37b8917d83da4b173e22905503d38ad08f",
|
||||
"windows": "19c014af0082aa901398e006381b6980e4f806e9"
|
||||
},
|
||||
"13400": {
|
||||
"comment": "Added February 21, 2025.",
|
||||
"linux": "ea2106b5bc012c25d735521e0c7fb719d433ea4a",
|
||||
"mac": "ba5ab71db4f9447f19eb7b1943024981c88064dd",
|
||||
"windows": "6ab74b90e88b7397aab9911baac5484f12466eef"
|
||||
},
|
||||
"13401": {
|
||||
"comment": "Added March 10, 2025.",
|
||||
"linux": "b14bee2c0fd250da67faea421f620b58e5dea9a2",
|
||||
"mac": "b54732b528bc2669481ec0cf17c7b97b033720b9",
|
||||
"windows": "751255204f006b8b883a8baf552a2da792f8aa44"
|
||||
},
|
||||
"13500": {
|
||||
"comment": "Added March 12, 2025.",
|
||||
"linux": "5b7c2284ed2542cf6212981d62ca9122fb2a4e88",
|
||||
"mac": "9862177631e8059a497d6086058168dd47477ab7",
|
||||
"windows": "3e78b6fe5fd31d69049499450849ada17a720a53"
|
||||
},
|
||||
"13600": {
|
||||
"comment": "Added April 07, 2025.",
|
||||
"linux": "eb353ba7b8b9bcbef890217971cd8ec41efeaa75",
|
||||
"mac": "22c77d1f2305de8a6147f14e52f074b4a4e5222c",
|
||||
"windows": "a8832519b4eb058567d68b65be1e1c9e80aae566"
|
||||
},
|
||||
"13601": {
|
||||
"comment": "Added April 22, 2025.",
|
||||
"linux": "40b224f295a20694241c5db49721bc90a3796f30",
|
||||
"mac": "ff885fe921f9eae1a5ce6a71b30b0c37b306bf56",
|
||||
"windows": "116a4153047ee1ee67f17fc938f084ee72b24e54"
|
||||
},
|
||||
"13700": {
|
||||
"comment": "Added May 07, 2025.",
|
||||
"linux": "e5ac12b1bd88b9ece6ceaa57848aaba61ab85242",
|
||||
"mac": "9e84009c92c25aa80935727b5e4526b23439a575",
|
||||
"windows": "65c7157dd3e8eba9bcc38db2bd7f26508c717f3e"
|
||||
}
|
||||
},
|
||||
"last": "13700",
|
||||
"min": "13300"
|
||||
}
|
@@ -1,2 +1,2 @@
|
||||
@echo off
|
||||
python3.bat tools\gclient_hook.py
|
||||
python.bat tools\gclient_hook.py
|
||||
|
881
cef_paths.gypi
Normal file
881
cef_paths.gypi
Normal file
@@ -0,0 +1,881 @@
|
||||
# Copyright (c) 2022 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 and should not edited
|
||||
# by hand. See the translator.README.txt file in the tools directory for
|
||||
# more information.
|
||||
#
|
||||
# $hash=0373d7e3fc02d16a128a5891aac70af56fb9ddc1$
|
||||
#
|
||||
|
||||
{
|
||||
'variables': {
|
||||
'autogen_cpp_includes': [
|
||||
'include/cef_accessibility_handler.h',
|
||||
'include/cef_app.h',
|
||||
'include/cef_audio_handler.h',
|
||||
'include/cef_auth_callback.h',
|
||||
'include/cef_browser.h',
|
||||
'include/cef_browser_process_handler.h',
|
||||
'include/cef_callback.h',
|
||||
'include/cef_client.h',
|
||||
'include/cef_command_handler.h',
|
||||
'include/cef_command_line.h',
|
||||
'include/cef_context_menu_handler.h',
|
||||
'include/cef_cookie.h',
|
||||
'include/cef_crash_util.h',
|
||||
'include/cef_devtools_message_observer.h',
|
||||
'include/cef_dialog_handler.h',
|
||||
'include/cef_display_handler.h',
|
||||
'include/cef_dom.h',
|
||||
'include/cef_download_handler.h',
|
||||
'include/cef_download_item.h',
|
||||
'include/cef_drag_data.h',
|
||||
'include/cef_drag_handler.h',
|
||||
'include/cef_extension.h',
|
||||
'include/cef_extension_handler.h',
|
||||
'include/cef_file_util.h',
|
||||
'include/cef_find_handler.h',
|
||||
'include/cef_focus_handler.h',
|
||||
'include/cef_frame.h',
|
||||
'include/cef_frame_handler.h',
|
||||
'include/cef_i18n_util.h',
|
||||
'include/cef_image.h',
|
||||
'include/cef_jsdialog_handler.h',
|
||||
'include/cef_keyboard_handler.h',
|
||||
'include/cef_life_span_handler.h',
|
||||
'include/cef_load_handler.h',
|
||||
'include/cef_media_router.h',
|
||||
'include/cef_menu_model.h',
|
||||
'include/cef_menu_model_delegate.h',
|
||||
'include/cef_navigation_entry.h',
|
||||
'include/cef_origin_whitelist.h',
|
||||
'include/cef_parser.h',
|
||||
'include/cef_path_util.h',
|
||||
'include/cef_permission_handler.h',
|
||||
'include/cef_preference.h',
|
||||
'include/cef_print_handler.h',
|
||||
'include/cef_print_settings.h',
|
||||
'include/cef_process_message.h',
|
||||
'include/cef_process_util.h',
|
||||
'include/cef_registration.h',
|
||||
'include/cef_render_handler.h',
|
||||
'include/cef_render_process_handler.h',
|
||||
'include/cef_request.h',
|
||||
'include/cef_request_context.h',
|
||||
'include/cef_request_context_handler.h',
|
||||
'include/cef_request_handler.h',
|
||||
'include/cef_resource_bundle.h',
|
||||
'include/cef_resource_bundle_handler.h',
|
||||
'include/cef_resource_handler.h',
|
||||
'include/cef_resource_request_handler.h',
|
||||
'include/cef_response.h',
|
||||
'include/cef_response_filter.h',
|
||||
'include/cef_scheme.h',
|
||||
'include/cef_server.h',
|
||||
'include/cef_shared_memory_region.h',
|
||||
'include/cef_shared_process_message_builder.h',
|
||||
'include/cef_ssl_info.h',
|
||||
'include/cef_ssl_status.h',
|
||||
'include/cef_stream.h',
|
||||
'include/cef_string_visitor.h',
|
||||
'include/cef_task.h',
|
||||
'include/cef_thread.h',
|
||||
'include/cef_trace.h',
|
||||
'include/cef_urlrequest.h',
|
||||
'include/cef_v8.h',
|
||||
'include/cef_values.h',
|
||||
'include/cef_waitable_event.h',
|
||||
'include/cef_x509_certificate.h',
|
||||
'include/cef_xml_reader.h',
|
||||
'include/cef_zip_reader.h',
|
||||
'include/test/cef_test_helpers.h',
|
||||
'include/test/cef_test_server.h',
|
||||
'include/test/cef_translator_test.h',
|
||||
'include/views/cef_box_layout.h',
|
||||
'include/views/cef_browser_view.h',
|
||||
'include/views/cef_browser_view_delegate.h',
|
||||
'include/views/cef_button.h',
|
||||
'include/views/cef_button_delegate.h',
|
||||
'include/views/cef_display.h',
|
||||
'include/views/cef_fill_layout.h',
|
||||
'include/views/cef_label_button.h',
|
||||
'include/views/cef_layout.h',
|
||||
'include/views/cef_menu_button.h',
|
||||
'include/views/cef_menu_button_delegate.h',
|
||||
'include/views/cef_overlay_controller.h',
|
||||
'include/views/cef_panel.h',
|
||||
'include/views/cef_panel_delegate.h',
|
||||
'include/views/cef_scroll_view.h',
|
||||
'include/views/cef_textfield.h',
|
||||
'include/views/cef_textfield_delegate.h',
|
||||
'include/views/cef_view.h',
|
||||
'include/views/cef_view_delegate.h',
|
||||
'include/views/cef_window.h',
|
||||
'include/views/cef_window_delegate.h',
|
||||
],
|
||||
'autogen_capi_includes': [
|
||||
'include/capi/cef_accessibility_handler_capi.h',
|
||||
'include/capi/cef_app_capi.h',
|
||||
'include/capi/cef_audio_handler_capi.h',
|
||||
'include/capi/cef_auth_callback_capi.h',
|
||||
'include/capi/cef_browser_capi.h',
|
||||
'include/capi/cef_browser_process_handler_capi.h',
|
||||
'include/capi/cef_callback_capi.h',
|
||||
'include/capi/cef_client_capi.h',
|
||||
'include/capi/cef_command_handler_capi.h',
|
||||
'include/capi/cef_command_line_capi.h',
|
||||
'include/capi/cef_context_menu_handler_capi.h',
|
||||
'include/capi/cef_cookie_capi.h',
|
||||
'include/capi/cef_crash_util_capi.h',
|
||||
'include/capi/cef_devtools_message_observer_capi.h',
|
||||
'include/capi/cef_dialog_handler_capi.h',
|
||||
'include/capi/cef_display_handler_capi.h',
|
||||
'include/capi/cef_dom_capi.h',
|
||||
'include/capi/cef_download_handler_capi.h',
|
||||
'include/capi/cef_download_item_capi.h',
|
||||
'include/capi/cef_drag_data_capi.h',
|
||||
'include/capi/cef_drag_handler_capi.h',
|
||||
'include/capi/cef_extension_capi.h',
|
||||
'include/capi/cef_extension_handler_capi.h',
|
||||
'include/capi/cef_file_util_capi.h',
|
||||
'include/capi/cef_find_handler_capi.h',
|
||||
'include/capi/cef_focus_handler_capi.h',
|
||||
'include/capi/cef_frame_capi.h',
|
||||
'include/capi/cef_frame_handler_capi.h',
|
||||
'include/capi/cef_i18n_util_capi.h',
|
||||
'include/capi/cef_image_capi.h',
|
||||
'include/capi/cef_jsdialog_handler_capi.h',
|
||||
'include/capi/cef_keyboard_handler_capi.h',
|
||||
'include/capi/cef_life_span_handler_capi.h',
|
||||
'include/capi/cef_load_handler_capi.h',
|
||||
'include/capi/cef_media_router_capi.h',
|
||||
'include/capi/cef_menu_model_capi.h',
|
||||
'include/capi/cef_menu_model_delegate_capi.h',
|
||||
'include/capi/cef_navigation_entry_capi.h',
|
||||
'include/capi/cef_origin_whitelist_capi.h',
|
||||
'include/capi/cef_parser_capi.h',
|
||||
'include/capi/cef_path_util_capi.h',
|
||||
'include/capi/cef_permission_handler_capi.h',
|
||||
'include/capi/cef_preference_capi.h',
|
||||
'include/capi/cef_print_handler_capi.h',
|
||||
'include/capi/cef_print_settings_capi.h',
|
||||
'include/capi/cef_process_message_capi.h',
|
||||
'include/capi/cef_process_util_capi.h',
|
||||
'include/capi/cef_registration_capi.h',
|
||||
'include/capi/cef_render_handler_capi.h',
|
||||
'include/capi/cef_render_process_handler_capi.h',
|
||||
'include/capi/cef_request_capi.h',
|
||||
'include/capi/cef_request_context_capi.h',
|
||||
'include/capi/cef_request_context_handler_capi.h',
|
||||
'include/capi/cef_request_handler_capi.h',
|
||||
'include/capi/cef_resource_bundle_capi.h',
|
||||
'include/capi/cef_resource_bundle_handler_capi.h',
|
||||
'include/capi/cef_resource_handler_capi.h',
|
||||
'include/capi/cef_resource_request_handler_capi.h',
|
||||
'include/capi/cef_response_capi.h',
|
||||
'include/capi/cef_response_filter_capi.h',
|
||||
'include/capi/cef_scheme_capi.h',
|
||||
'include/capi/cef_server_capi.h',
|
||||
'include/capi/cef_shared_memory_region_capi.h',
|
||||
'include/capi/cef_shared_process_message_builder_capi.h',
|
||||
'include/capi/cef_ssl_info_capi.h',
|
||||
'include/capi/cef_ssl_status_capi.h',
|
||||
'include/capi/cef_stream_capi.h',
|
||||
'include/capi/cef_string_visitor_capi.h',
|
||||
'include/capi/cef_task_capi.h',
|
||||
'include/capi/cef_thread_capi.h',
|
||||
'include/capi/cef_trace_capi.h',
|
||||
'include/capi/cef_urlrequest_capi.h',
|
||||
'include/capi/cef_v8_capi.h',
|
||||
'include/capi/cef_values_capi.h',
|
||||
'include/capi/cef_waitable_event_capi.h',
|
||||
'include/capi/cef_x509_certificate_capi.h',
|
||||
'include/capi/cef_xml_reader_capi.h',
|
||||
'include/capi/cef_zip_reader_capi.h',
|
||||
'include/capi/test/cef_test_helpers_capi.h',
|
||||
'include/capi/test/cef_test_server_capi.h',
|
||||
'include/capi/test/cef_translator_test_capi.h',
|
||||
'include/capi/views/cef_box_layout_capi.h',
|
||||
'include/capi/views/cef_browser_view_capi.h',
|
||||
'include/capi/views/cef_browser_view_delegate_capi.h',
|
||||
'include/capi/views/cef_button_capi.h',
|
||||
'include/capi/views/cef_button_delegate_capi.h',
|
||||
'include/capi/views/cef_display_capi.h',
|
||||
'include/capi/views/cef_fill_layout_capi.h',
|
||||
'include/capi/views/cef_label_button_capi.h',
|
||||
'include/capi/views/cef_layout_capi.h',
|
||||
'include/capi/views/cef_menu_button_capi.h',
|
||||
'include/capi/views/cef_menu_button_delegate_capi.h',
|
||||
'include/capi/views/cef_overlay_controller_capi.h',
|
||||
'include/capi/views/cef_panel_capi.h',
|
||||
'include/capi/views/cef_panel_delegate_capi.h',
|
||||
'include/capi/views/cef_scroll_view_capi.h',
|
||||
'include/capi/views/cef_textfield_capi.h',
|
||||
'include/capi/views/cef_textfield_delegate_capi.h',
|
||||
'include/capi/views/cef_view_capi.h',
|
||||
'include/capi/views/cef_view_delegate_capi.h',
|
||||
'include/capi/views/cef_window_capi.h',
|
||||
'include/capi/views/cef_window_delegate_capi.h',
|
||||
],
|
||||
'autogen_library_side': [
|
||||
'libcef_dll/ctocpp/accessibility_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/accessibility_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/app_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/app_ctocpp.h',
|
||||
'libcef_dll/ctocpp/audio_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/audio_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/auth_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/auth_callback_cpptoc.h',
|
||||
'libcef_dll/cpptoc/before_download_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/before_download_callback_cpptoc.h',
|
||||
'libcef_dll/cpptoc/binary_value_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/binary_value_cpptoc.h',
|
||||
'libcef_dll/cpptoc/views/box_layout_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/box_layout_cpptoc.h',
|
||||
'libcef_dll/cpptoc/browser_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/browser_cpptoc.h',
|
||||
'libcef_dll/cpptoc/browser_host_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/browser_host_cpptoc.h',
|
||||
'libcef_dll/ctocpp/browser_process_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/browser_process_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/views/browser_view_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/browser_view_cpptoc.h',
|
||||
'libcef_dll/ctocpp/views/browser_view_delegate_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/browser_view_delegate_ctocpp.h',
|
||||
'libcef_dll/cpptoc/views/button_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/button_cpptoc.h',
|
||||
'libcef_dll/ctocpp/views/button_delegate_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/button_delegate_ctocpp.h',
|
||||
'libcef_dll/cpptoc/callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/client_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/client_ctocpp.h',
|
||||
'libcef_dll/ctocpp/command_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/command_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/command_line_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/command_line_cpptoc.h',
|
||||
'libcef_dll/ctocpp/completion_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/completion_callback_ctocpp.h',
|
||||
'libcef_dll/ctocpp/context_menu_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/context_menu_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/context_menu_params_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/context_menu_params_cpptoc.h',
|
||||
'libcef_dll/ctocpp/cookie_access_filter_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/cookie_access_filter_ctocpp.h',
|
||||
'libcef_dll/cpptoc/cookie_manager_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/cookie_manager_cpptoc.h',
|
||||
'libcef_dll/ctocpp/cookie_visitor_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/cookie_visitor_ctocpp.h',
|
||||
'libcef_dll/cpptoc/domdocument_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/domdocument_cpptoc.h',
|
||||
'libcef_dll/cpptoc/domnode_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/domnode_cpptoc.h',
|
||||
'libcef_dll/ctocpp/domvisitor_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/domvisitor_ctocpp.h',
|
||||
'libcef_dll/ctocpp/delete_cookies_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/delete_cookies_callback_ctocpp.h',
|
||||
'libcef_dll/ctocpp/dev_tools_message_observer_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/dev_tools_message_observer_ctocpp.h',
|
||||
'libcef_dll/ctocpp/dialog_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/dialog_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/dictionary_value_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/dictionary_value_cpptoc.h',
|
||||
'libcef_dll/cpptoc/views/display_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/display_cpptoc.h',
|
||||
'libcef_dll/ctocpp/display_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/display_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/download_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/download_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/download_image_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/download_image_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/download_item_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/download_item_cpptoc.h',
|
||||
'libcef_dll/cpptoc/download_item_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/download_item_callback_cpptoc.h',
|
||||
'libcef_dll/cpptoc/drag_data_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/drag_data_cpptoc.h',
|
||||
'libcef_dll/ctocpp/drag_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/drag_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/end_tracing_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/end_tracing_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/extension_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/extension_cpptoc.h',
|
||||
'libcef_dll/ctocpp/extension_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/extension_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/file_dialog_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/file_dialog_callback_cpptoc.h',
|
||||
'libcef_dll/cpptoc/views/fill_layout_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/fill_layout_cpptoc.h',
|
||||
'libcef_dll/ctocpp/find_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/find_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/focus_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/focus_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/frame_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/frame_cpptoc.h',
|
||||
'libcef_dll/ctocpp/frame_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/frame_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/get_extension_resource_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/get_extension_resource_callback_cpptoc.h',
|
||||
'libcef_dll/cpptoc/image_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/image_cpptoc.h',
|
||||
'libcef_dll/cpptoc/jsdialog_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/jsdialog_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/jsdialog_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/jsdialog_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/keyboard_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/keyboard_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/views/label_button_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/label_button_cpptoc.h',
|
||||
'libcef_dll/cpptoc/views/layout_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/layout_cpptoc.h',
|
||||
'libcef_dll/ctocpp/life_span_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/life_span_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/list_value_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/list_value_cpptoc.h',
|
||||
'libcef_dll/ctocpp/load_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/load_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/media_access_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/media_access_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/media_observer_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/media_observer_ctocpp.h',
|
||||
'libcef_dll/cpptoc/media_route_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/media_route_cpptoc.h',
|
||||
'libcef_dll/ctocpp/media_route_create_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/media_route_create_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/media_router_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/media_router_cpptoc.h',
|
||||
'libcef_dll/cpptoc/media_sink_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/media_sink_cpptoc.h',
|
||||
'libcef_dll/ctocpp/media_sink_device_info_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/media_sink_device_info_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/media_source_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/media_source_cpptoc.h',
|
||||
'libcef_dll/cpptoc/views/menu_button_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/menu_button_cpptoc.h',
|
||||
'libcef_dll/ctocpp/views/menu_button_delegate_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/menu_button_delegate_ctocpp.h',
|
||||
'libcef_dll/cpptoc/views/menu_button_pressed_lock_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/menu_button_pressed_lock_cpptoc.h',
|
||||
'libcef_dll/cpptoc/menu_model_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/menu_model_cpptoc.h',
|
||||
'libcef_dll/ctocpp/menu_model_delegate_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/menu_model_delegate_ctocpp.h',
|
||||
'libcef_dll/cpptoc/navigation_entry_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/navigation_entry_cpptoc.h',
|
||||
'libcef_dll/ctocpp/navigation_entry_visitor_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/navigation_entry_visitor_ctocpp.h',
|
||||
'libcef_dll/cpptoc/views/overlay_controller_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/overlay_controller_cpptoc.h',
|
||||
'libcef_dll/cpptoc/views/panel_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/panel_cpptoc.h',
|
||||
'libcef_dll/ctocpp/views/panel_delegate_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/panel_delegate_ctocpp.h',
|
||||
'libcef_dll/ctocpp/pdf_print_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/pdf_print_callback_ctocpp.h',
|
||||
'libcef_dll/ctocpp/permission_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/permission_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/permission_prompt_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/permission_prompt_callback_cpptoc.h',
|
||||
'libcef_dll/cpptoc/post_data_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/post_data_cpptoc.h',
|
||||
'libcef_dll/cpptoc/post_data_element_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/post_data_element_cpptoc.h',
|
||||
'libcef_dll/cpptoc/preference_manager_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/preference_manager_cpptoc.h',
|
||||
'libcef_dll/cpptoc/preference_registrar_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/preference_registrar_cpptoc.h',
|
||||
'libcef_dll/cpptoc/print_dialog_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/print_dialog_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/print_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/print_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/print_job_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/print_job_callback_cpptoc.h',
|
||||
'libcef_dll/cpptoc/print_settings_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/print_settings_cpptoc.h',
|
||||
'libcef_dll/cpptoc/process_message_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/process_message_cpptoc.h',
|
||||
'libcef_dll/ctocpp/read_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/read_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/registration_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/registration_cpptoc.h',
|
||||
'libcef_dll/ctocpp/render_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/render_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/render_process_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/render_process_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/request_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/request_cpptoc.h',
|
||||
'libcef_dll/cpptoc/request_context_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/request_context_cpptoc.h',
|
||||
'libcef_dll/ctocpp/request_context_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/request_context_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/request_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/request_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/resolve_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/resolve_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/resource_bundle_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/resource_bundle_cpptoc.h',
|
||||
'libcef_dll/ctocpp/resource_bundle_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/resource_bundle_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/resource_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/resource_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/resource_read_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/resource_read_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/resource_request_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/resource_request_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/resource_skip_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/resource_skip_callback_cpptoc.h',
|
||||
'libcef_dll/cpptoc/response_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/response_cpptoc.h',
|
||||
'libcef_dll/ctocpp/response_filter_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/response_filter_ctocpp.h',
|
||||
'libcef_dll/cpptoc/run_context_menu_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/run_context_menu_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/run_quick_menu_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/run_quick_menu_callback_cpptoc.h',
|
||||
'libcef_dll/cpptoc/sslinfo_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/sslinfo_cpptoc.h',
|
||||
'libcef_dll/cpptoc/sslstatus_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/sslstatus_cpptoc.h',
|
||||
'libcef_dll/ctocpp/scheme_handler_factory_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/scheme_handler_factory_ctocpp.h',
|
||||
'libcef_dll/cpptoc/scheme_registrar_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/scheme_registrar_cpptoc.h',
|
||||
'libcef_dll/cpptoc/views/scroll_view_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/scroll_view_cpptoc.h',
|
||||
'libcef_dll/cpptoc/select_client_certificate_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/select_client_certificate_callback_cpptoc.h',
|
||||
'libcef_dll/cpptoc/server_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/server_cpptoc.h',
|
||||
'libcef_dll/ctocpp/server_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/server_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/set_cookie_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/set_cookie_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/shared_memory_region_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/shared_memory_region_cpptoc.h',
|
||||
'libcef_dll/cpptoc/shared_process_message_builder_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/shared_process_message_builder_cpptoc.h',
|
||||
'libcef_dll/cpptoc/stream_reader_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/stream_reader_cpptoc.h',
|
||||
'libcef_dll/cpptoc/stream_writer_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/stream_writer_cpptoc.h',
|
||||
'libcef_dll/ctocpp/string_visitor_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/string_visitor_ctocpp.h',
|
||||
'libcef_dll/ctocpp/task_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/task_ctocpp.h',
|
||||
'libcef_dll/cpptoc/task_runner_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/task_runner_cpptoc.h',
|
||||
'libcef_dll/cpptoc/test/test_server_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/test/test_server_cpptoc.h',
|
||||
'libcef_dll/cpptoc/test/test_server_connection_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/test/test_server_connection_cpptoc.h',
|
||||
'libcef_dll/ctocpp/test/test_server_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/test/test_server_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/views/textfield_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/textfield_cpptoc.h',
|
||||
'libcef_dll/ctocpp/views/textfield_delegate_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/textfield_delegate_ctocpp.h',
|
||||
'libcef_dll/cpptoc/thread_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/thread_cpptoc.h',
|
||||
'libcef_dll/cpptoc/test/translator_test_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/test/translator_test_cpptoc.h',
|
||||
'libcef_dll/ctocpp/test/translator_test_ref_ptr_client_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/test/translator_test_ref_ptr_client_ctocpp.h',
|
||||
'libcef_dll/ctocpp/test/translator_test_ref_ptr_client_child_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/test/translator_test_ref_ptr_client_child_ctocpp.h',
|
||||
'libcef_dll/cpptoc/test/translator_test_ref_ptr_library_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/test/translator_test_ref_ptr_library_cpptoc.h',
|
||||
'libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_cpptoc.h',
|
||||
'libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_child_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_child_cpptoc.h',
|
||||
'libcef_dll/ctocpp/test/translator_test_scoped_client_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/test/translator_test_scoped_client_ctocpp.h',
|
||||
'libcef_dll/ctocpp/test/translator_test_scoped_client_child_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/test/translator_test_scoped_client_child_ctocpp.h',
|
||||
'libcef_dll/cpptoc/test/translator_test_scoped_library_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/test/translator_test_scoped_library_cpptoc.h',
|
||||
'libcef_dll/cpptoc/test/translator_test_scoped_library_child_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/test/translator_test_scoped_library_child_cpptoc.h',
|
||||
'libcef_dll/cpptoc/test/translator_test_scoped_library_child_child_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/test/translator_test_scoped_library_child_child_cpptoc.h',
|
||||
'libcef_dll/cpptoc/urlrequest_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/urlrequest_cpptoc.h',
|
||||
'libcef_dll/ctocpp/urlrequest_client_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/urlrequest_client_ctocpp.h',
|
||||
'libcef_dll/ctocpp/v8accessor_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/v8accessor_ctocpp.h',
|
||||
'libcef_dll/ctocpp/v8array_buffer_release_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/v8array_buffer_release_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/v8context_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/v8context_cpptoc.h',
|
||||
'libcef_dll/cpptoc/v8exception_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/v8exception_cpptoc.h',
|
||||
'libcef_dll/ctocpp/v8handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/v8handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/v8interceptor_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/v8interceptor_ctocpp.h',
|
||||
'libcef_dll/cpptoc/v8stack_frame_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/v8stack_frame_cpptoc.h',
|
||||
'libcef_dll/cpptoc/v8stack_trace_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/v8stack_trace_cpptoc.h',
|
||||
'libcef_dll/cpptoc/v8value_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/v8value_cpptoc.h',
|
||||
'libcef_dll/cpptoc/value_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/value_cpptoc.h',
|
||||
'libcef_dll/cpptoc/views/view_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/view_cpptoc.h',
|
||||
'libcef_dll/ctocpp/views/view_delegate_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/view_delegate_ctocpp.h',
|
||||
'libcef_dll/cpptoc/waitable_event_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/waitable_event_cpptoc.h',
|
||||
'libcef_dll/cpptoc/views/window_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/window_cpptoc.h',
|
||||
'libcef_dll/ctocpp/views/window_delegate_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/window_delegate_ctocpp.h',
|
||||
'libcef_dll/ctocpp/write_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/write_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/x509cert_principal_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/x509cert_principal_cpptoc.h',
|
||||
'libcef_dll/cpptoc/x509certificate_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/x509certificate_cpptoc.h',
|
||||
'libcef_dll/cpptoc/xml_reader_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/xml_reader_cpptoc.h',
|
||||
'libcef_dll/cpptoc/zip_reader_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/zip_reader_cpptoc.h',
|
||||
],
|
||||
'autogen_client_side': [
|
||||
'libcef_dll/cpptoc/accessibility_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/accessibility_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/app_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/app_cpptoc.h',
|
||||
'libcef_dll/cpptoc/audio_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/audio_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/auth_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/auth_callback_ctocpp.h',
|
||||
'libcef_dll/ctocpp/before_download_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/before_download_callback_ctocpp.h',
|
||||
'libcef_dll/ctocpp/binary_value_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/binary_value_ctocpp.h',
|
||||
'libcef_dll/ctocpp/views/box_layout_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/box_layout_ctocpp.h',
|
||||
'libcef_dll/ctocpp/browser_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/browser_ctocpp.h',
|
||||
'libcef_dll/ctocpp/browser_host_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/browser_host_ctocpp.h',
|
||||
'libcef_dll/cpptoc/browser_process_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/browser_process_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/views/browser_view_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/browser_view_ctocpp.h',
|
||||
'libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.h',
|
||||
'libcef_dll/ctocpp/views/button_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/button_ctocpp.h',
|
||||
'libcef_dll/cpptoc/views/button_delegate_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/button_delegate_cpptoc.h',
|
||||
'libcef_dll/ctocpp/callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/client_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/client_cpptoc.h',
|
||||
'libcef_dll/cpptoc/command_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/command_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/command_line_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/command_line_ctocpp.h',
|
||||
'libcef_dll/cpptoc/completion_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/completion_callback_cpptoc.h',
|
||||
'libcef_dll/cpptoc/context_menu_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/context_menu_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/context_menu_params_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/context_menu_params_ctocpp.h',
|
||||
'libcef_dll/cpptoc/cookie_access_filter_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/cookie_access_filter_cpptoc.h',
|
||||
'libcef_dll/ctocpp/cookie_manager_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/cookie_manager_ctocpp.h',
|
||||
'libcef_dll/cpptoc/cookie_visitor_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/cookie_visitor_cpptoc.h',
|
||||
'libcef_dll/ctocpp/domdocument_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/domdocument_ctocpp.h',
|
||||
'libcef_dll/ctocpp/domnode_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/domnode_ctocpp.h',
|
||||
'libcef_dll/cpptoc/domvisitor_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/domvisitor_cpptoc.h',
|
||||
'libcef_dll/cpptoc/delete_cookies_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/delete_cookies_callback_cpptoc.h',
|
||||
'libcef_dll/cpptoc/dev_tools_message_observer_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/dev_tools_message_observer_cpptoc.h',
|
||||
'libcef_dll/cpptoc/dialog_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/dialog_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/dictionary_value_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/dictionary_value_ctocpp.h',
|
||||
'libcef_dll/ctocpp/views/display_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/display_ctocpp.h',
|
||||
'libcef_dll/cpptoc/display_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/display_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/download_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/download_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/download_image_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/download_image_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/download_item_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/download_item_ctocpp.h',
|
||||
'libcef_dll/ctocpp/download_item_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/download_item_callback_ctocpp.h',
|
||||
'libcef_dll/ctocpp/drag_data_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/drag_data_ctocpp.h',
|
||||
'libcef_dll/cpptoc/drag_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/drag_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/end_tracing_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/end_tracing_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/extension_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/extension_ctocpp.h',
|
||||
'libcef_dll/cpptoc/extension_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/extension_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/file_dialog_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/file_dialog_callback_ctocpp.h',
|
||||
'libcef_dll/ctocpp/views/fill_layout_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/fill_layout_ctocpp.h',
|
||||
'libcef_dll/cpptoc/find_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/find_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/focus_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/focus_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/frame_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/frame_ctocpp.h',
|
||||
'libcef_dll/cpptoc/frame_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/frame_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/get_extension_resource_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/get_extension_resource_callback_ctocpp.h',
|
||||
'libcef_dll/ctocpp/image_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/image_ctocpp.h',
|
||||
'libcef_dll/ctocpp/jsdialog_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/jsdialog_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/jsdialog_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/jsdialog_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/keyboard_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/keyboard_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/views/label_button_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/label_button_ctocpp.h',
|
||||
'libcef_dll/ctocpp/views/layout_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/layout_ctocpp.h',
|
||||
'libcef_dll/cpptoc/life_span_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/life_span_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/list_value_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/list_value_ctocpp.h',
|
||||
'libcef_dll/cpptoc/load_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/load_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/media_access_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/media_access_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/media_observer_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/media_observer_cpptoc.h',
|
||||
'libcef_dll/ctocpp/media_route_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/media_route_ctocpp.h',
|
||||
'libcef_dll/cpptoc/media_route_create_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/media_route_create_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/media_router_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/media_router_ctocpp.h',
|
||||
'libcef_dll/ctocpp/media_sink_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/media_sink_ctocpp.h',
|
||||
'libcef_dll/cpptoc/media_sink_device_info_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/media_sink_device_info_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/media_source_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/media_source_ctocpp.h',
|
||||
'libcef_dll/ctocpp/views/menu_button_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/menu_button_ctocpp.h',
|
||||
'libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.h',
|
||||
'libcef_dll/ctocpp/views/menu_button_pressed_lock_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/menu_button_pressed_lock_ctocpp.h',
|
||||
'libcef_dll/ctocpp/menu_model_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/menu_model_ctocpp.h',
|
||||
'libcef_dll/cpptoc/menu_model_delegate_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/menu_model_delegate_cpptoc.h',
|
||||
'libcef_dll/ctocpp/navigation_entry_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/navigation_entry_ctocpp.h',
|
||||
'libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.h',
|
||||
'libcef_dll/ctocpp/views/overlay_controller_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/overlay_controller_ctocpp.h',
|
||||
'libcef_dll/ctocpp/views/panel_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/panel_ctocpp.h',
|
||||
'libcef_dll/cpptoc/views/panel_delegate_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/panel_delegate_cpptoc.h',
|
||||
'libcef_dll/cpptoc/pdf_print_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/pdf_print_callback_cpptoc.h',
|
||||
'libcef_dll/cpptoc/permission_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/permission_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/permission_prompt_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/permission_prompt_callback_ctocpp.h',
|
||||
'libcef_dll/ctocpp/post_data_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/post_data_ctocpp.h',
|
||||
'libcef_dll/ctocpp/post_data_element_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/post_data_element_ctocpp.h',
|
||||
'libcef_dll/ctocpp/preference_manager_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/preference_manager_ctocpp.h',
|
||||
'libcef_dll/ctocpp/preference_registrar_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/preference_registrar_ctocpp.h',
|
||||
'libcef_dll/ctocpp/print_dialog_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/print_dialog_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/print_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/print_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/print_job_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/print_job_callback_ctocpp.h',
|
||||
'libcef_dll/ctocpp/print_settings_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/print_settings_ctocpp.h',
|
||||
'libcef_dll/ctocpp/process_message_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/process_message_ctocpp.h',
|
||||
'libcef_dll/cpptoc/read_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/read_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/registration_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/registration_ctocpp.h',
|
||||
'libcef_dll/cpptoc/render_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/render_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/render_process_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/render_process_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/request_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/request_ctocpp.h',
|
||||
'libcef_dll/ctocpp/request_context_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/request_context_ctocpp.h',
|
||||
'libcef_dll/cpptoc/request_context_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/request_context_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/request_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/request_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/resolve_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/resolve_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/resource_bundle_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/resource_bundle_ctocpp.h',
|
||||
'libcef_dll/cpptoc/resource_bundle_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/resource_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/resource_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/resource_read_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/resource_read_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/resource_request_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/resource_request_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/resource_skip_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/resource_skip_callback_ctocpp.h',
|
||||
'libcef_dll/ctocpp/response_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/response_ctocpp.h',
|
||||
'libcef_dll/cpptoc/response_filter_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/response_filter_cpptoc.h',
|
||||
'libcef_dll/ctocpp/run_context_menu_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/run_context_menu_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/run_quick_menu_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/run_quick_menu_callback_ctocpp.h',
|
||||
'libcef_dll/ctocpp/sslinfo_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/sslinfo_ctocpp.h',
|
||||
'libcef_dll/ctocpp/sslstatus_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/sslstatus_ctocpp.h',
|
||||
'libcef_dll/cpptoc/scheme_handler_factory_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h',
|
||||
'libcef_dll/ctocpp/scheme_registrar_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/scheme_registrar_ctocpp.h',
|
||||
'libcef_dll/ctocpp/views/scroll_view_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/scroll_view_ctocpp.h',
|
||||
'libcef_dll/ctocpp/select_client_certificate_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/select_client_certificate_callback_ctocpp.h',
|
||||
'libcef_dll/ctocpp/server_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/server_ctocpp.h',
|
||||
'libcef_dll/cpptoc/server_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/server_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/set_cookie_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/set_cookie_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/shared_memory_region_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/shared_memory_region_ctocpp.h',
|
||||
'libcef_dll/ctocpp/shared_process_message_builder_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/shared_process_message_builder_ctocpp.h',
|
||||
'libcef_dll/ctocpp/stream_reader_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/stream_reader_ctocpp.h',
|
||||
'libcef_dll/ctocpp/stream_writer_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/stream_writer_ctocpp.h',
|
||||
'libcef_dll/cpptoc/string_visitor_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/string_visitor_cpptoc.h',
|
||||
'libcef_dll/cpptoc/task_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/task_cpptoc.h',
|
||||
'libcef_dll/ctocpp/task_runner_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/task_runner_ctocpp.h',
|
||||
'libcef_dll/ctocpp/test/test_server_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/test/test_server_ctocpp.h',
|
||||
'libcef_dll/ctocpp/test/test_server_connection_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/test/test_server_connection_ctocpp.h',
|
||||
'libcef_dll/cpptoc/test/test_server_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/test/test_server_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/views/textfield_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/textfield_ctocpp.h',
|
||||
'libcef_dll/cpptoc/views/textfield_delegate_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/textfield_delegate_cpptoc.h',
|
||||
'libcef_dll/ctocpp/thread_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/thread_ctocpp.h',
|
||||
'libcef_dll/ctocpp/test/translator_test_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/test/translator_test_ctocpp.h',
|
||||
'libcef_dll/cpptoc/test/translator_test_ref_ptr_client_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/test/translator_test_ref_ptr_client_cpptoc.h',
|
||||
'libcef_dll/cpptoc/test/translator_test_ref_ptr_client_child_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/test/translator_test_ref_ptr_client_child_cpptoc.h',
|
||||
'libcef_dll/ctocpp/test/translator_test_ref_ptr_library_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/test/translator_test_ref_ptr_library_ctocpp.h',
|
||||
'libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_ctocpp.h',
|
||||
'libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_child_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_child_ctocpp.h',
|
||||
'libcef_dll/cpptoc/test/translator_test_scoped_client_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/test/translator_test_scoped_client_cpptoc.h',
|
||||
'libcef_dll/cpptoc/test/translator_test_scoped_client_child_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/test/translator_test_scoped_client_child_cpptoc.h',
|
||||
'libcef_dll/ctocpp/test/translator_test_scoped_library_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/test/translator_test_scoped_library_ctocpp.h',
|
||||
'libcef_dll/ctocpp/test/translator_test_scoped_library_child_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/test/translator_test_scoped_library_child_ctocpp.h',
|
||||
'libcef_dll/ctocpp/test/translator_test_scoped_library_child_child_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/test/translator_test_scoped_library_child_child_ctocpp.h',
|
||||
'libcef_dll/ctocpp/urlrequest_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/urlrequest_ctocpp.h',
|
||||
'libcef_dll/cpptoc/urlrequest_client_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/urlrequest_client_cpptoc.h',
|
||||
'libcef_dll/cpptoc/v8accessor_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/v8accessor_cpptoc.h',
|
||||
'libcef_dll/cpptoc/v8array_buffer_release_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/v8array_buffer_release_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/v8context_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/v8context_ctocpp.h',
|
||||
'libcef_dll/ctocpp/v8exception_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/v8exception_ctocpp.h',
|
||||
'libcef_dll/cpptoc/v8handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/v8handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/v8interceptor_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/v8interceptor_cpptoc.h',
|
||||
'libcef_dll/ctocpp/v8stack_frame_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/v8stack_frame_ctocpp.h',
|
||||
'libcef_dll/ctocpp/v8stack_trace_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/v8stack_trace_ctocpp.h',
|
||||
'libcef_dll/ctocpp/v8value_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/v8value_ctocpp.h',
|
||||
'libcef_dll/ctocpp/value_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/value_ctocpp.h',
|
||||
'libcef_dll/ctocpp/views/view_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/view_ctocpp.h',
|
||||
'libcef_dll/cpptoc/views/view_delegate_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/view_delegate_cpptoc.h',
|
||||
'libcef_dll/ctocpp/waitable_event_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/waitable_event_ctocpp.h',
|
||||
'libcef_dll/ctocpp/views/window_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/window_ctocpp.h',
|
||||
'libcef_dll/cpptoc/views/window_delegate_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/window_delegate_cpptoc.h',
|
||||
'libcef_dll/cpptoc/write_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/write_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/x509cert_principal_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/x509cert_principal_ctocpp.h',
|
||||
'libcef_dll/ctocpp/x509certificate_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/x509certificate_ctocpp.h',
|
||||
'libcef_dll/ctocpp/xml_reader_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/xml_reader_ctocpp.h',
|
||||
'libcef_dll/ctocpp/zip_reader_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/zip_reader_ctocpp.h',
|
||||
],
|
||||
},
|
||||
}
|
117
cef_paths2.gypi
117
cef_paths2.gypi
@@ -8,6 +8,7 @@
|
||||
'include/base/cef_atomic_flag.h',
|
||||
'include/base/cef_atomic_ref_count.h',
|
||||
'include/base/cef_auto_reset.h',
|
||||
'include/base/cef_basictypes.h',
|
||||
'include/base/cef_bind.h',
|
||||
'include/base/cef_build.h',
|
||||
'include/base/cef_callback.h',
|
||||
@@ -16,26 +17,27 @@
|
||||
'include/base/cef_callback_list.h',
|
||||
'include/base/cef_cancelable_callback.h',
|
||||
'include/base/cef_compiler_specific.h',
|
||||
'include/base/cef_dump_without_crashing.h',
|
||||
'include/base/cef_lock.h',
|
||||
'include/base/cef_logging.h',
|
||||
'include/base/cef_macros.h',
|
||||
'include/base/cef_platform_thread.h',
|
||||
'include/base/cef_ptr_util.h',
|
||||
'include/base/cef_ref_counted.h',
|
||||
'include/base/cef_scoped_refptr.h',
|
||||
'include/base/cef_template_util.h',
|
||||
'include/base/cef_thread_checker.h',
|
||||
'include/base/cef_trace_event.h',
|
||||
'include/base/cef_tuple.h',
|
||||
'include/base/cef_weak_ptr.h',
|
||||
'include/base/internal/cef_bind_internal.h',
|
||||
'include/base/internal/cef_callback_internal.h',
|
||||
'include/base/internal/cef_color_id_macros.inc',
|
||||
'include/base/internal/cef_lock_impl.h',
|
||||
'include/base/internal/cef_raw_scoped_refptr_mismatch_checker.h',
|
||||
'include/base/internal/cef_scoped_policy.h',
|
||||
'include/base/internal/cef_thread_checker_impl.h',
|
||||
'include/cef_api_hash.h',
|
||||
'include/cef_base.h',
|
||||
'include/cef_version.h',
|
||||
'include/internal/cef_export.h',
|
||||
'include/internal/cef_ptr.h',
|
||||
'include/internal/cef_string_wrappers.h',
|
||||
@@ -43,9 +45,6 @@
|
||||
'include/internal/cef_types_wrappers.h',
|
||||
],
|
||||
'includes_common_capi': [
|
||||
'include/cef_id_mappers.h',
|
||||
'include/cef_version_info.h',
|
||||
'include/internal/cef_dump_without_crashing_internal.h',
|
||||
'include/internal/cef_logging_internal.h',
|
||||
'include/internal/cef_string.h',
|
||||
'include/internal/cef_string_list.h',
|
||||
@@ -56,11 +55,7 @@
|
||||
'include/internal/cef_time.h',
|
||||
'include/internal/cef_trace_event_internal.h',
|
||||
'include/internal/cef_types.h',
|
||||
'include/internal/cef_types_color.h',
|
||||
'include/internal/cef_types_content_settings.h',
|
||||
'include/internal/cef_types_geometry.h',
|
||||
'include/internal/cef_types_osr.h',
|
||||
'include/internal/cef_types_runtime.h',
|
||||
],
|
||||
'includes_capi': [
|
||||
'include/capi/cef_base_capi.h',
|
||||
@@ -127,7 +122,6 @@
|
||||
'libcef_dll/base/cef_atomic_flag.cc',
|
||||
'libcef_dll/base/cef_callback_helpers.cc',
|
||||
'libcef_dll/base/cef_callback_internal.cc',
|
||||
'libcef_dll/base/cef_dump_without_crashing.cc',
|
||||
'libcef_dll/base/cef_lock.cc',
|
||||
'libcef_dll/base/cef_lock_impl.cc',
|
||||
'libcef_dll/base/cef_logging.cc',
|
||||
@@ -154,8 +148,6 @@
|
||||
'libcef_dll/wrapper/cef_byte_read_handler.cc',
|
||||
'libcef_dll/wrapper/cef_closure_task.cc',
|
||||
'libcef_dll/wrapper/cef_message_router.cc',
|
||||
'libcef_dll/wrapper/cef_message_router_utils.cc',
|
||||
'libcef_dll/wrapper/cef_message_router_utils.h',
|
||||
'libcef_dll/wrapper/cef_resource_manager.cc',
|
||||
'libcef_dll/wrapper/cef_scoped_temp_dir.cc',
|
||||
'libcef_dll/wrapper/cef_stream_resource_handler.cc',
|
||||
@@ -171,6 +163,8 @@
|
||||
'shared_sources_browser': [
|
||||
'tests/shared/browser/client_app_browser.cc',
|
||||
'tests/shared/browser/client_app_browser.h',
|
||||
'tests/shared/browser/extension_util.cc',
|
||||
'tests/shared/browser/extension_util.h',
|
||||
'tests/shared/browser/file_util.cc',
|
||||
'tests/shared/browser/file_util.h',
|
||||
'tests/shared/browser/geometry_util.cc',
|
||||
@@ -225,10 +219,6 @@
|
||||
'tests/shared/browser/util_win.h',
|
||||
],
|
||||
'cefclient_sources_browser': [
|
||||
'tests/cefclient/browser/base_client_handler.cc',
|
||||
'tests/cefclient/browser/base_client_handler.h',
|
||||
'tests/cefclient/browser/binary_transfer_test.cc',
|
||||
'tests/cefclient/browser/binary_transfer_test.h',
|
||||
'tests/cefclient/browser/binding_test.cc',
|
||||
'tests/cefclient/browser/binding_test.h',
|
||||
'tests/cefclient/browser/browser_window.cc',
|
||||
@@ -247,14 +237,8 @@
|
||||
'tests/cefclient/browser/client_prefs.cc',
|
||||
'tests/cefclient/browser/client_prefs.h',
|
||||
'tests/cefclient/browser/client_types.h',
|
||||
'tests/cefclient/browser/config_test.cc',
|
||||
'tests/cefclient/browser/config_test.h',
|
||||
'tests/cefclient/browser/default_client_handler.cc',
|
||||
'tests/cefclient/browser/default_client_handler.h',
|
||||
'tests/cefclient/browser/dialog_test.cc',
|
||||
'tests/cefclient/browser/dialog_test.h',
|
||||
'tests/cefclient/browser/hang_test.cc',
|
||||
'tests/cefclient/browser/hang_test.h',
|
||||
'tests/cefclient/browser/image_cache.cc',
|
||||
'tests/cefclient/browser/image_cache.h',
|
||||
'tests/cefclient/browser/main_context.cc',
|
||||
@@ -283,8 +267,6 @@
|
||||
'tests/cefclient/browser/scheme_test.h',
|
||||
'tests/cefclient/browser/server_test.cc',
|
||||
'tests/cefclient/browser/server_test.h',
|
||||
'tests/cefclient/browser/task_manager_test.cc',
|
||||
'tests/cefclient/browser/task_manager_test.h',
|
||||
'tests/cefclient/browser/temp_window.h',
|
||||
'tests/cefclient/browser/test_runner.cc',
|
||||
'tests/cefclient/browser/test_runner.h',
|
||||
@@ -292,8 +274,6 @@
|
||||
'tests/cefclient/browser/urlrequest_test.h',
|
||||
'tests/cefclient/browser/views_menu_bar.cc',
|
||||
'tests/cefclient/browser/views_menu_bar.h',
|
||||
'tests/cefclient/browser/views_overlay_browser.cc',
|
||||
'tests/cefclient/browser/views_overlay_browser.h',
|
||||
'tests/cefclient/browser/views_overlay_controls.cc',
|
||||
'tests/cefclient/browser/views_overlay_controls.h',
|
||||
'tests/cefclient/browser/views_style.cc',
|
||||
@@ -324,12 +304,9 @@
|
||||
'tests/cefclient/renderer/performance_test_tests.cc',
|
||||
],
|
||||
'cefclient_sources_resources': [
|
||||
'tests/cefclient/resources/binary_transfer.html',
|
||||
'tests/cefclient/resources/binding.html',
|
||||
'tests/cefclient/resources/config.html',
|
||||
'tests/cefclient/resources/dialogs.html',
|
||||
'tests/cefclient/resources/draggable.html',
|
||||
'tests/cefclient/resources/hang.html',
|
||||
'tests/cefclient/resources/ipc_performance.html',
|
||||
'tests/cefclient/resources/localstorage.html',
|
||||
'tests/cefclient/resources/logo.png',
|
||||
@@ -342,13 +319,19 @@
|
||||
'tests/cefclient/resources/preferences.html',
|
||||
'tests/cefclient/resources/response_filter.html',
|
||||
'tests/cefclient/resources/server.html',
|
||||
'tests/cefclient/resources/task_manager.html',
|
||||
'tests/cefclient/resources/transparency.html',
|
||||
'tests/cefclient/resources/urlrequest.html',
|
||||
'tests/cefclient/resources/websocket.html',
|
||||
'tests/cefclient/resources/window.html',
|
||||
'tests/cefclient/resources/xmlhttprequest.html',
|
||||
],
|
||||
'cefclient_sources_resources_extensions_set_page_color': [
|
||||
'tests/cefclient/resources/extensions/set_page_color/icon.png',
|
||||
'tests/cefclient/resources/extensions/set_page_color/manifest.json',
|
||||
'tests/cefclient/resources/extensions/set_page_color/popup.html',
|
||||
'tests/cefclient/resources/extensions/set_page_color/popup.js',
|
||||
'tests/cefclient/resources/extensions/set_page_color/README.md',
|
||||
],
|
||||
'cefclient_sources_win': [
|
||||
'tests/cefclient/browser/browser_window_osr_win.cc',
|
||||
'tests/cefclient/browser/browser_window_osr_win.h',
|
||||
@@ -384,14 +367,12 @@
|
||||
'tests/cefclient/browser/window_test_runner_win.cc',
|
||||
'tests/cefclient/browser/window_test_runner_win.h',
|
||||
'tests/cefclient/cefclient_win.cc',
|
||||
'tests/cefclient/resources/win/cefclient.rc',
|
||||
],
|
||||
'cefclient_sources_resources_win': [
|
||||
'tests/cefclient/win/cefclient.exe.manifest',
|
||||
'tests/cefclient/win/cefclient.ico',
|
||||
'tests/cefclient/win/small.ico',
|
||||
],
|
||||
'cefclient_sources_resources_win_rc': [
|
||||
'tests/cefclient/win/cefclient.rc',
|
||||
'tests/cefclient/resources/win/cefclient.exe.manifest',
|
||||
'tests/cefclient/resources/win/cefclient.ico',
|
||||
'tests/cefclient/resources/win/small.ico',
|
||||
],
|
||||
'cefclient_sources_mac': [
|
||||
'tests/cefclient/browser/browser_window_osr_mac.h',
|
||||
@@ -410,18 +391,15 @@
|
||||
'tests/cefclient/browser/temp_window_mac.mm',
|
||||
'tests/cefclient/browser/text_input_client_osr_mac.h',
|
||||
'tests/cefclient/browser/text_input_client_osr_mac.mm',
|
||||
'tests/cefclient/browser/util_mac.h',
|
||||
'tests/cefclient/browser/util_mac.mm',
|
||||
'tests/cefclient/browser/views_window_mac.mm',
|
||||
'tests/cefclient/browser/window_test_runner_mac.h',
|
||||
'tests/cefclient/browser/window_test_runner_mac.mm',
|
||||
'tests/cefclient/cefclient_mac.mm',
|
||||
],
|
||||
],
|
||||
'cefclient_bundle_resources_mac': [
|
||||
'tests/cefclient/mac/cefclient.icns',
|
||||
'tests/cefclient/mac/English.lproj/InfoPlist.strings',
|
||||
'tests/cefclient/mac/English.lproj/MainMenu.xib',
|
||||
'tests/cefclient/mac/Info.plist.in',
|
||||
'tests/cefclient/resources/mac/cefclient.icns',
|
||||
'tests/cefclient/resources/mac/English.lproj/InfoPlist.strings',
|
||||
'tests/cefclient/resources/mac/English.lproj/MainMenu.xib',
|
||||
'tests/cefclient/resources/mac/Info.plist',
|
||||
],
|
||||
'cefclient_sources_linux': [
|
||||
'tests/cefclient/browser/browser_window_osr_gtk.cc',
|
||||
@@ -453,17 +431,15 @@
|
||||
'tests/cefsimple/simple_handler.h',
|
||||
],
|
||||
'cefsimple_sources_win': [
|
||||
'tests/cefsimple/cefsimple.rc',
|
||||
'tests/cefsimple/cefsimple_win.cc',
|
||||
'tests/cefsimple/resource.h',
|
||||
'tests/cefsimple/simple_handler_win.cc',
|
||||
'tests/cefsimple/resource.h',
|
||||
],
|
||||
'cefsimple_sources_resources_win': [
|
||||
'tests/cefsimple/win/cefsimple.exe.manifest',
|
||||
'tests/cefsimple/win/cefsimple.ico',
|
||||
'tests/cefsimple/win/small.ico',
|
||||
],
|
||||
'cefsimple_sources_resources_win_rc': [
|
||||
'tests/cefsimple/win/cefsimple.rc',
|
||||
'tests/cefsimple/cefsimple.exe.manifest',
|
||||
'tests/cefsimple/res/cefsimple.ico',
|
||||
'tests/cefsimple/res/small.ico',
|
||||
],
|
||||
'cefsimple_sources_mac': [
|
||||
'tests/cefsimple/cefsimple_mac.mm',
|
||||
@@ -476,7 +452,7 @@
|
||||
'tests/cefsimple/mac/cefsimple.icns',
|
||||
'tests/cefsimple/mac/English.lproj/InfoPlist.strings',
|
||||
'tests/cefsimple/mac/English.lproj/MainMenu.xib',
|
||||
'tests/cefsimple/mac/Info.plist.in',
|
||||
'tests/cefsimple/mac/Info.plist',
|
||||
],
|
||||
'cefsimple_sources_linux': [
|
||||
'tests/cefsimple/cefsimple_linux.cc',
|
||||
@@ -489,7 +465,6 @@
|
||||
'tests/ceftests/resources/net/data/ssl/certificates/root_ca_cert.pem',
|
||||
],
|
||||
'ceftests_sources_common': [
|
||||
'tests/ceftests/api_version_unittest.cc',
|
||||
'tests/ceftests/audio_output_unittest.cc',
|
||||
'tests/ceftests/browser_info_map_unittest.cc',
|
||||
'tests/ceftests/certificate_error_unittest.cc',
|
||||
@@ -502,6 +477,13 @@
|
||||
'tests/ceftests/dom_unittest.cc',
|
||||
'tests/ceftests/download_unittest.cc',
|
||||
'tests/ceftests/draggable_regions_unittest.cc',
|
||||
'tests/ceftests/extensions/background_unittest.cc',
|
||||
'tests/ceftests/extensions/chrome_alarms_unittest.cc',
|
||||
'tests/ceftests/extensions/chrome_storage_unittest.cc',
|
||||
'tests/ceftests/extensions/chrome_tabs_unittest.cc',
|
||||
'tests/ceftests/extensions/extension_test_handler.cc',
|
||||
'tests/ceftests/extensions/extension_test_handler.h',
|
||||
'tests/ceftests/extensions/view_unittest.cc',
|
||||
'tests/ceftests/file_util_unittest.cc',
|
||||
'tests/ceftests/frame_handler_unittest.cc',
|
||||
'tests/ceftests/frame_unittest.cc',
|
||||
@@ -512,7 +494,6 @@
|
||||
'tests/ceftests/jsdialog_unittest.cc',
|
||||
'tests/ceftests/life_span_unittest.cc',
|
||||
'tests/ceftests/media_access_unittest.cc',
|
||||
'tests/ceftests/message_router_binary_unittest.cc',
|
||||
'tests/ceftests/message_router_harness_unittest.cc',
|
||||
'tests/ceftests/message_router_multi_query_unittest.cc',
|
||||
'tests/ceftests/message_router_single_query_unittest.cc',
|
||||
@@ -528,7 +509,6 @@
|
||||
'tests/ceftests/permission_prompt_unittest.cc',
|
||||
'tests/ceftests/preference_unittest.cc',
|
||||
'tests/ceftests/print_unittest.cc',
|
||||
'tests/ceftests/print_to_pdf_unittest.cc',
|
||||
'tests/ceftests/process_message_unittest.cc',
|
||||
'tests/ceftests/request_context_unittest.cc',
|
||||
'tests/ceftests/request_handler_unittest.cc',
|
||||
@@ -596,32 +576,24 @@
|
||||
'ceftests_sources_win': [
|
||||
'tests/ceftests/resource_util_win_dir.cc',
|
||||
'tests/ceftests/resource_util_win_idmap.cc',
|
||||
'tests/ceftests/resources/win/ceftests.rc',
|
||||
],
|
||||
'ceftests_sources_resources_win': [
|
||||
'tests/ceftests/win/ceftests.exe.manifest',
|
||||
'tests/ceftests/win/ceftests.ico',
|
||||
'tests/ceftests/win/small.ico',
|
||||
],
|
||||
'ceftests_sources_resources_win_rc': [
|
||||
'tests/ceftests/win/ceftests.rc',
|
||||
'tests/ceftests/resources/win/ceftests.exe.manifest',
|
||||
'tests/ceftests/resources/win/ceftests.ico',
|
||||
'tests/ceftests/resources/win/small.ico',
|
||||
],
|
||||
'ceftests_sources_mac': [
|
||||
'tests/ceftests/os_rendering_unittest_mac.h',
|
||||
'tests/ceftests/os_rendering_unittest_mac.mm',
|
||||
'tests/ceftests/run_all_unittests_mac.mm',
|
||||
],
|
||||
'ceftests_sources_mac_browser_shared': [
|
||||
'tests/shared/renderer/client_app_renderer.h',
|
||||
],
|
||||
'ceftests_sources_mac_helper_shared': [
|
||||
'tests/shared/browser/client_app_browser.h',
|
||||
'ceftests_sources_mac_helper': [
|
||||
'tests/shared/browser/file_util.cc',
|
||||
'tests/shared/browser/file_util.h',
|
||||
'tests/shared/browser/resource_util.h',
|
||||
'tests/shared/browser/resource_util_mac.mm',
|
||||
'tests/shared/browser/resource_util_posix.cc',
|
||||
],
|
||||
'ceftests_sources_mac_helper': [
|
||||
'tests/ceftests/audio_output_unittest.cc',
|
||||
'tests/ceftests/client_app_delegates.cc',
|
||||
'tests/ceftests/cookie_unittest.cc',
|
||||
@@ -629,7 +601,6 @@
|
||||
'tests/ceftests/dom_unittest.cc',
|
||||
'tests/ceftests/frame_unittest.cc',
|
||||
'tests/ceftests/media_access_unittest.cc',
|
||||
'tests/ceftests/message_router_binary_unittest.cc',
|
||||
'tests/ceftests/message_router_harness_unittest.cc',
|
||||
'tests/ceftests/message_router_multi_query_unittest.cc',
|
||||
'tests/ceftests/message_router_single_query_unittest.cc',
|
||||
@@ -677,10 +648,10 @@
|
||||
'tests/ceftests/v8_unittest.cc',
|
||||
],
|
||||
'ceftests_bundle_resources_mac': [
|
||||
'tests/ceftests/mac/ceftests.icns',
|
||||
'tests/ceftests/mac/English.lproj/InfoPlist.strings',
|
||||
'tests/ceftests/mac/English.lproj/MainMenu.xib',
|
||||
'tests/ceftests/mac/Info.plist.in',
|
||||
'tests/ceftests/resources/mac/ceftests.icns',
|
||||
'tests/ceftests/resources/mac/English.lproj/InfoPlist.strings',
|
||||
'tests/ceftests/resources/mac/English.lproj/MainMenu.xib',
|
||||
'tests/ceftests/resources/mac/Info.plist',
|
||||
],
|
||||
'ceftests_sources_linux': [
|
||||
'tests/ceftests/resource_util_linux.cc',
|
||||
|
@@ -271,17 +271,6 @@ macro(ADD_WINDOWS_MANIFEST manifest_path target extension)
|
||||
)
|
||||
endmacro()
|
||||
|
||||
# Set LPAC ACLs required for Windows sandbox support.
|
||||
# See https://github.com/chromiumembedded/cef/issues/3791#issuecomment-2664128961
|
||||
macro(SET_LPAC_ACLS target)
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND "icacls" "${CEF_TARGET_OUT_DIR}" "/grant" "*S-1-15-2-2:(OI)(CI)(RX)"
|
||||
COMMENT "Setting LPAC ACLs..."
|
||||
)
|
||||
endmacro()
|
||||
|
||||
endif(OS_WINDOWS)
|
||||
|
||||
|
||||
|
@@ -26,14 +26,18 @@ endif()
|
||||
|
||||
# Determine the project architecture.
|
||||
if(NOT DEFINED PROJECT_ARCH)
|
||||
if(("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "arm64") OR
|
||||
("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "ARM64"))
|
||||
if(OS_WINDOWS AND "${CMAKE_GENERATOR_PLATFORM}" STREQUAL "arm64")
|
||||
set(PROJECT_ARCH "arm64")
|
||||
elseif(CMAKE_SIZEOF_VOID_P MATCHES 8)
|
||||
set(PROJECT_ARCH "x86_64")
|
||||
else()
|
||||
set(PROJECT_ARCH "x86")
|
||||
endif()
|
||||
|
||||
if(OS_MAC)
|
||||
# PROJECT_ARCH should be specified on Mac OS X.
|
||||
message(WARNING "No PROJECT_ARCH value specified, using ${PROJECT_ARCH}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(${CMAKE_GENERATOR} STREQUAL "Ninja")
|
||||
@@ -59,7 +63,7 @@ set(CEF_LIBCEF_DLL_WRAPPER_PATH "${_CEF_ROOT}/libcef_dll")
|
||||
|
||||
# Shared compiler/linker flags.
|
||||
list(APPEND CEF_COMPILER_DEFINES
|
||||
# Allow C++ programs to use stdint.h macros specified in the C99 standard that aren't
|
||||
# Allow C++ programs to use stdint.h macros specified in the C99 standard that aren't
|
||||
# in the C++ standard (e.g. UINT8_MAX, INT64_MIN, etc)
|
||||
__STDC_CONSTANT_MACROS __STDC_FORMAT_MACROS
|
||||
)
|
||||
@@ -69,20 +73,6 @@ list(APPEND CEF_COMPILER_DEFINES
|
||||
option(USE_SANDBOX "Enable or disable use of the sandbox." ON)
|
||||
|
||||
|
||||
# Optionally configure the CEF API version by adding `-D api_version=XXXXX` to the
|
||||
# cmake command-line where XXXXX is the desired version number. For background see
|
||||
# https://bitbucket.org/chromiumembedded/cef/wiki/ApiVersioning.md
|
||||
if(DEFINED api_version)
|
||||
string(LENGTH "${api_version}" length)
|
||||
if (NOT length EQUAL 5 OR NOT api_version MATCHES "^[0-9]+$")
|
||||
message(FATAL_ERROR "Expected a 5 digit number for api_version, got '${api_version}'")
|
||||
endif()
|
||||
list(APPEND CEF_COMPILER_DEFINES
|
||||
CEF_API_VERSION=${api_version}
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
#
|
||||
# Linux configuration.
|
||||
#
|
||||
@@ -186,8 +176,6 @@ if(OS_LINUX)
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
list(APPEND CEF_CXX_COMPILER_FLAGS
|
||||
-Wno-attributes # The cfi-icall attribute is not supported by the GNU C++ compiler
|
||||
-Wno-array-bounds # Silence "is partly outside array bounds" errors with runtime size check in wrapper
|
||||
-Wno-stringop-overflow # Silence "overflows the destination" errors with runtime size check in wrapper
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -236,6 +224,7 @@ if(OS_LINUX)
|
||||
libGLESv2.so
|
||||
libvk_swiftshader.so
|
||||
libvulkan.so.1
|
||||
snapshot_blob.bin
|
||||
v8_context_snapshot.bin
|
||||
vk_swiftshader_icd.json
|
||||
)
|
||||
@@ -319,14 +308,13 @@ if(OS_MAC)
|
||||
# Standard libraries.
|
||||
set(CEF_STANDARD_LIBS
|
||||
-lpthread
|
||||
"-framework AppKit"
|
||||
"-framework Cocoa"
|
||||
"-framework IOSurface"
|
||||
"-framework AppKit"
|
||||
)
|
||||
|
||||
# Find the newest available base SDK.
|
||||
execute_process(COMMAND xcode-select --print-path OUTPUT_VARIABLE XCODE_PATH OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
foreach(OS_VERSION 14.2 14.0 11.0)
|
||||
foreach(OS_VERSION 10.15 10.14 10.13)
|
||||
set(SDK "${XCODE_PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${OS_VERSION}.sdk")
|
||||
if(NOT "${CMAKE_OSX_SYSROOT}" AND EXISTS "${SDK}" AND IS_DIRECTORY "${SDK}")
|
||||
set(CMAKE_OSX_SYSROOT ${SDK})
|
||||
@@ -334,7 +322,7 @@ if(OS_MAC)
|
||||
endforeach()
|
||||
|
||||
# Target SDK.
|
||||
set(CEF_TARGET_SDK "11.0")
|
||||
set(CEF_TARGET_SDK "10.13")
|
||||
list(APPEND CEF_COMPILER_FLAGS
|
||||
-mmacosx-version-min=${CEF_TARGET_SDK}
|
||||
)
|
||||
@@ -362,10 +350,6 @@ if(OS_MAC)
|
||||
CEF_USE_SANDBOX # Used by apps to test if the sandbox is enabled
|
||||
)
|
||||
|
||||
list(APPEND CEF_STANDARD_LIBS
|
||||
-lsandbox
|
||||
)
|
||||
|
||||
# CEF sandbox library paths.
|
||||
set(CEF_SANDBOX_LIB_DEBUG "${CEF_BINARY_DIR_DEBUG}/cef_sandbox.a")
|
||||
set(CEF_SANDBOX_LIB_RELEASE "${CEF_BINARY_DIR_RELEASE}/cef_sandbox.a")
|
||||
@@ -375,7 +359,6 @@ if(OS_MAC)
|
||||
# Format is "<name suffix>:<target suffix>:<plist suffix>".
|
||||
set(CEF_HELPER_APP_SUFFIXES
|
||||
"::"
|
||||
" (Alerts):_alerts:.alerts"
|
||||
" (GPU):_gpu:.gpu"
|
||||
" (Plugin):_plugin:.plugin"
|
||||
" (Renderer):_renderer:.renderer"
|
||||
@@ -452,66 +435,11 @@ if(OS_WINDOWS)
|
||||
list(APPEND CEF_EXE_LINKER_FLAGS
|
||||
/MANIFEST:NO # No default manifest (see ADD_WINDOWS_MANIFEST macro usage)
|
||||
/LARGEADDRESSAWARE # Allow 32-bit processes to access 3GB of RAM
|
||||
|
||||
# Delayload most libraries as the dlls are simply not required at startup (or
|
||||
# at all, depending on the process type). Some dlls open handles when they are
|
||||
# loaded, and we may not want them to be loaded in renderers or other sandboxed
|
||||
# processes. Conversely, some dlls must be loaded before sandbox lockdown. In
|
||||
# unsandboxed processes they will load when first needed. The linker will
|
||||
# automatically ignore anything which is not linked to the binary at all (it is
|
||||
# harmless to have an unmatched /delayload). This list should be kept in sync
|
||||
# with Chromium's "delayloads" target from the //build/config/win/BUILD.gn file.
|
||||
/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll
|
||||
/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll
|
||||
/DELAYLOAD:api-ms-win-core-winrt-string-l1-1-0.dll
|
||||
/DELAYLOAD:advapi32.dll
|
||||
/DELAYLOAD:comctl32.dll
|
||||
/DELAYLOAD:comdlg32.dll
|
||||
/DELAYLOAD:credui.dll
|
||||
/DELAYLOAD:cryptui.dll
|
||||
/DELAYLOAD:d3d11.dll
|
||||
/DELAYLOAD:d3d9.dll
|
||||
/DELAYLOAD:dwmapi.dll
|
||||
/DELAYLOAD:dxgi.dll
|
||||
/DELAYLOAD:dxva2.dll
|
||||
/DELAYLOAD:esent.dll
|
||||
/DELAYLOAD:gdi32.dll
|
||||
/DELAYLOAD:hid.dll
|
||||
/DELAYLOAD:imagehlp.dll
|
||||
/DELAYLOAD:imm32.dll
|
||||
/DELAYLOAD:msi.dll
|
||||
/DELAYLOAD:netapi32.dll
|
||||
/DELAYLOAD:ncrypt.dll
|
||||
/DELAYLOAD:ole32.dll
|
||||
/DELAYLOAD:oleacc.dll
|
||||
/DELAYLOAD:propsys.dll
|
||||
/DELAYLOAD:psapi.dll
|
||||
/DELAYLOAD:rpcrt4.dll
|
||||
/DELAYLOAD:rstrtmgr.dll
|
||||
/DELAYLOAD:setupapi.dll
|
||||
/DELAYLOAD:shell32.dll
|
||||
/DELAYLOAD:shlwapi.dll
|
||||
/DELAYLOAD:uiautomationcore.dll
|
||||
/DELAYLOAD:urlmon.dll
|
||||
/DELAYLOAD:user32.dll
|
||||
/DELAYLOAD:usp10.dll
|
||||
/DELAYLOAD:uxtheme.dll
|
||||
/DELAYLOAD:wer.dll
|
||||
/DELAYLOAD:wevtapi.dll
|
||||
/DELAYLOAD:wininet.dll
|
||||
/DELAYLOAD:winusb.dll
|
||||
/DELAYLOAD:wsock32.dll
|
||||
/DELAYLOAD:wtsapi32.dll
|
||||
)
|
||||
list(APPEND CEF_COMPILER_DEFINES
|
||||
WIN32 _WIN32 _WINDOWS # Windows platform
|
||||
UNICODE _UNICODE # Unicode build
|
||||
# Targeting Windows 10. We can't say `=_WIN32_WINNT_WIN10` here because
|
||||
# some files do `#if WINVER < 0x0600` without including windows.h before,
|
||||
# and then _WIN32_WINNT_WIN10 isn't yet known to be 0x0A00.
|
||||
WINVER=0x0A00
|
||||
_WIN32_WINNT=0x0A00
|
||||
NTDDI_VERSION=NTDDI_WIN10_FE
|
||||
WINVER=0x0601 _WIN32_WINNT=0x601 # Targeting Windows 7
|
||||
NOMINMAX # Use the standard's templated min/max
|
||||
WIN32_LEAN_AND_MEAN # Exclude less common API declarations
|
||||
_HAS_EXCEPTIONS=0 # Disable exceptions
|
||||
@@ -528,7 +456,7 @@ if(OS_WINDOWS)
|
||||
# only) uses fibers to switch to a 4MiB stack at runtime via
|
||||
# CefRunWinMainWithPreferredStackSize().
|
||||
list(APPEND CEF_EXE_LINKER_FLAGS
|
||||
/STACK:0x80000
|
||||
/STACK:0x8000
|
||||
)
|
||||
else()
|
||||
# Increase the initial stack size to 8MiB from the default 1MiB.
|
||||
@@ -559,20 +487,19 @@ if(OS_WINDOWS)
|
||||
# List of CEF binary files.
|
||||
set(CEF_BINARY_FILES
|
||||
chrome_elf.dll
|
||||
d3dcompiler_47.dll
|
||||
libcef.dll
|
||||
libEGL.dll
|
||||
libGLESv2.dll
|
||||
snapshot_blob.bin
|
||||
v8_context_snapshot.bin
|
||||
vk_swiftshader.dll
|
||||
vk_swiftshader_icd.json
|
||||
vulkan-1.dll
|
||||
)
|
||||
|
||||
if(PROJECT_ARCH STREQUAL "x86_64")
|
||||
if(NOT PROJECT_ARCH STREQUAL "arm64")
|
||||
list(APPEND CEF_BINARY_FILES
|
||||
dxil.dll
|
||||
dxcompiler.dll
|
||||
d3dcompiler_47.dll
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -599,18 +526,14 @@ if(OS_WINDOWS)
|
||||
Advapi32.lib
|
||||
dbghelp.lib
|
||||
Delayimp.lib
|
||||
ntdll.lib
|
||||
OleAut32.lib
|
||||
PowrProf.lib
|
||||
Propsys.lib
|
||||
psapi.lib
|
||||
SetupAPI.lib
|
||||
Shell32.lib
|
||||
Shcore.lib
|
||||
Userenv.lib
|
||||
version.lib
|
||||
wbemuuid.lib
|
||||
WindowsApp.lib
|
||||
winmm.lib
|
||||
)
|
||||
|
||||
|
@@ -73,9 +73,8 @@ class AutoReset {
|
||||
}
|
||||
|
||||
~AutoReset() {
|
||||
if (scoped_variable_) {
|
||||
if (scoped_variable_)
|
||||
*scoped_variable_ = std::move(original_value_);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
86
include/base/cef_basictypes.h
Normal file
86
include/base/cef_basictypes.h
Normal file
@@ -0,0 +1,86 @@
|
||||
// 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 <limits.h> // For UINT_MAX
|
||||
#include <stddef.h> // 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
|
||||
// <inttypes.h> format macros even in the LP64 model.
|
||||
#if defined(__LP64__) && !defined(OS_MAC) && !defined(OS_OPENBSD)
|
||||
typedef long int64;
|
||||
typedef unsigned long uint64;
|
||||
#else
|
||||
typedef long long int64;
|
||||
typedef unsigned long long uint64;
|
||||
#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
|
||||
|
||||
#ifndef _INT16
|
||||
#define _INT16
|
||||
typedef short int16;
|
||||
#endif
|
||||
|
||||
#ifndef _UINT16
|
||||
#define _UINT16
|
||||
typedef unsigned short uint16;
|
||||
#endif
|
||||
|
||||
// UTF-16 character type.
|
||||
#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_
|
@@ -71,7 +71,7 @@
|
||||
|
||||
#if defined(USING_CHROMIUM_INCLUDES)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/bind.h"
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
@@ -84,6 +84,7 @@
|
||||
|
||||
#include "include/base/cef_build.h"
|
||||
#include "include/base/cef_compiler_specific.h"
|
||||
#include "include/base/cef_template_util.h"
|
||||
#include "include/base/internal/cef_bind_internal.h"
|
||||
|
||||
#if defined(OS_APPLE) && !HAS_FEATURE(objc_arc)
|
||||
@@ -96,34 +97,35 @@ namespace base {
|
||||
/// Bind as OnceCallback.
|
||||
///
|
||||
template <typename Functor, typename... Args>
|
||||
inline OnceCallback<cef_internal::MakeUnboundRunType<Functor, Args...>>
|
||||
BindOnce(Functor&& functor, Args&&... args) {
|
||||
static_assert(!cef_internal::IsOnceCallback<std::decay_t<Functor>>() ||
|
||||
inline OnceCallback<internal::MakeUnboundRunType<Functor, Args...>> BindOnce(
|
||||
Functor&& functor,
|
||||
Args&&... args) {
|
||||
static_assert(!internal::IsOnceCallback<std::decay_t<Functor>>() ||
|
||||
(std::is_rvalue_reference<Functor&&>() &&
|
||||
!std::is_const<std::remove_reference_t<Functor>>()),
|
||||
"BindOnce requires non-const rvalue for OnceCallback binding."
|
||||
" I.e.: base::BindOnce(std::move(callback)).");
|
||||
static_assert(
|
||||
std::conjunction<cef_internal::AssertBindArgIsNotBasePassed<
|
||||
std::decay_t<Args>>...>::value,
|
||||
conjunction<
|
||||
internal::AssertBindArgIsNotBasePassed<std::decay_t<Args>>...>::value,
|
||||
"Use std::move() instead of base::Passed() with base::BindOnce()");
|
||||
|
||||
return cef_internal::BindImpl<OnceCallback>(std::forward<Functor>(functor),
|
||||
std::forward<Args>(args)...);
|
||||
return internal::BindImpl<OnceCallback>(std::forward<Functor>(functor),
|
||||
std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
///
|
||||
/// Bind as RepeatingCallback.
|
||||
///
|
||||
template <typename Functor, typename... Args>
|
||||
inline RepeatingCallback<cef_internal::MakeUnboundRunType<Functor, Args...>>
|
||||
inline RepeatingCallback<internal::MakeUnboundRunType<Functor, Args...>>
|
||||
BindRepeating(Functor&& functor, Args&&... args) {
|
||||
static_assert(
|
||||
!cef_internal::IsOnceCallback<std::decay_t<Functor>>(),
|
||||
!internal::IsOnceCallback<std::decay_t<Functor>>(),
|
||||
"BindRepeating cannot bind OnceCallback. Use BindOnce with std::move().");
|
||||
|
||||
return cef_internal::BindImpl<RepeatingCallback>(
|
||||
std::forward<Functor>(functor), std::forward<Args>(args)...);
|
||||
return internal::BindImpl<RepeatingCallback>(std::forward<Functor>(functor),
|
||||
std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
///
|
||||
@@ -173,8 +175,8 @@ RepeatingCallback<Signature> BindRepeating(
|
||||
/// to compile because Foo does not support the AddRef() and Release() methods.
|
||||
///
|
||||
template <typename T>
|
||||
inline cef_internal::UnretainedWrapper<T> Unretained(T* o) {
|
||||
return cef_internal::UnretainedWrapper<T>(o);
|
||||
inline internal::UnretainedWrapper<T> Unretained(T* o) {
|
||||
return internal::UnretainedWrapper<T>(o);
|
||||
}
|
||||
|
||||
///
|
||||
@@ -199,12 +201,12 @@ inline cef_internal::UnretainedWrapper<T> Unretained(T* o) {
|
||||
/// </pre>
|
||||
///
|
||||
template <typename T>
|
||||
inline cef_internal::RetainedRefWrapper<T> RetainedRef(T* o) {
|
||||
return cef_internal::RetainedRefWrapper<T>(o);
|
||||
inline internal::RetainedRefWrapper<T> RetainedRef(T* o) {
|
||||
return internal::RetainedRefWrapper<T>(o);
|
||||
}
|
||||
template <typename T>
|
||||
inline cef_internal::RetainedRefWrapper<T> RetainedRef(scoped_refptr<T> o) {
|
||||
return cef_internal::RetainedRefWrapper<T>(std::move(o));
|
||||
inline internal::RetainedRefWrapper<T> RetainedRef(scoped_refptr<T> o) {
|
||||
return internal::RetainedRefWrapper<T>(std::move(o));
|
||||
}
|
||||
|
||||
///
|
||||
@@ -232,14 +234,14 @@ inline cef_internal::RetainedRefWrapper<T> RetainedRef(scoped_refptr<T> o) {
|
||||
/// reference to the callback is deleted.
|
||||
///
|
||||
template <typename T>
|
||||
inline cef_internal::OwnedWrapper<T> Owned(T* o) {
|
||||
return cef_internal::OwnedWrapper<T>(o);
|
||||
inline internal::OwnedWrapper<T> Owned(T* o) {
|
||||
return internal::OwnedWrapper<T>(o);
|
||||
}
|
||||
|
||||
template <typename T, typename Deleter>
|
||||
inline cef_internal::OwnedWrapper<T, Deleter> Owned(
|
||||
inline internal::OwnedWrapper<T, Deleter> Owned(
|
||||
std::unique_ptr<T, Deleter>&& ptr) {
|
||||
return cef_internal::OwnedWrapper<T, Deleter>(std::move(ptr));
|
||||
return internal::OwnedWrapper<T, Deleter>(std::move(ptr));
|
||||
}
|
||||
|
||||
///
|
||||
@@ -275,8 +277,8 @@ inline cef_internal::OwnedWrapper<T, Deleter> Owned(
|
||||
/// an object owned by the callback.
|
||||
///
|
||||
template <typename T>
|
||||
cef_internal::OwnedRefWrapper<std::decay_t<T>> OwnedRef(T&& t) {
|
||||
return cef_internal::OwnedRefWrapper<std::decay_t<T>>(std::forward<T>(t));
|
||||
internal::OwnedRefWrapper<std::decay_t<T>> OwnedRef(T&& t) {
|
||||
return internal::OwnedRefWrapper<std::decay_t<T>>(std::forward<T>(t));
|
||||
}
|
||||
|
||||
///
|
||||
@@ -327,12 +329,12 @@ cef_internal::OwnedRefWrapper<std::decay_t<T>> OwnedRef(T&& t) {
|
||||
///
|
||||
template <typename T,
|
||||
std::enable_if_t<!std::is_lvalue_reference<T>::value>* = nullptr>
|
||||
inline cef_internal::PassedWrapper<T> Passed(T&& scoper) {
|
||||
return cef_internal::PassedWrapper<T>(std::move(scoper));
|
||||
inline internal::PassedWrapper<T> Passed(T&& scoper) {
|
||||
return internal::PassedWrapper<T>(std::move(scoper));
|
||||
}
|
||||
template <typename T>
|
||||
inline cef_internal::PassedWrapper<T> Passed(T* scoper) {
|
||||
return cef_internal::PassedWrapper<T>(std::move(*scoper));
|
||||
inline internal::PassedWrapper<T> Passed(T* scoper) {
|
||||
return internal::PassedWrapper<T>(std::move(*scoper));
|
||||
}
|
||||
|
||||
///
|
||||
@@ -355,8 +357,8 @@ inline cef_internal::PassedWrapper<T> Passed(T* scoper) {
|
||||
/// </pre>
|
||||
///
|
||||
template <typename T>
|
||||
inline cef_internal::IgnoreResultHelper<T> IgnoreResult(T data) {
|
||||
return cef_internal::IgnoreResultHelper<T>(std::move(data));
|
||||
inline internal::IgnoreResultHelper<T> IgnoreResult(T data) {
|
||||
return internal::IgnoreResultHelper<T>(std::move(data));
|
||||
}
|
||||
|
||||
#if defined(OS_APPLE) && !HAS_FEATURE(objc_arc)
|
||||
|
@@ -69,27 +69,7 @@
|
||||
#if defined(USING_CHROMIUM_INCLUDES)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "build/build_config.h"
|
||||
#include "cef/libcef/features/features.h"
|
||||
|
||||
// The following #defines are used in cef/include/ headers and CEF client-side
|
||||
// code. CEF library-side code should use BUILDFLAG checks directly instead of
|
||||
// these #defines. CEF client-side code will get these #defines from
|
||||
// cef_config.h so any changes must also be reflected in
|
||||
// tools/make_config_header.py.
|
||||
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
#include "ui/base/ozone_buildflags.h"
|
||||
#if BUILDFLAG(IS_OZONE_X11)
|
||||
#define CEF_X11 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
|
||||
#if !defined(GENERATING_CEF_API_HASH)
|
||||
#include "include/cef_config.h"
|
||||
#endif
|
||||
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
@@ -252,19 +232,19 @@
|
||||
|
||||
// Type detection for wchar_t.
|
||||
#if defined(OS_WIN)
|
||||
#define WCHAR_T_IS_16_BIT
|
||||
#define WCHAR_T_IS_UTF16
|
||||
#elif defined(OS_FUCHSIA)
|
||||
#define WCHAR_T_IS_32_BIT
|
||||
#define WCHAR_T_IS_UTF32
|
||||
#elif defined(OS_POSIX) && defined(COMPILER_GCC) && defined(__WCHAR_MAX__) && \
|
||||
(__WCHAR_MAX__ == 0x7fffffff || __WCHAR_MAX__ == 0xffffffff)
|
||||
#define WCHAR_T_IS_32_BIT
|
||||
#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_16_BIT
|
||||
#define WCHAR_T_IS_UTF16
|
||||
#else
|
||||
#error Please add support for your compiler in include/base/cef_build.h
|
||||
#endif
|
||||
@@ -273,7 +253,7 @@
|
||||
// The compiler thinks std::string::const_iterator and "const char*" are
|
||||
// equivalent types.
|
||||
#define STD_STRING_ITERATOR_IS_CHAR_POINTER
|
||||
// The compiler thinks std::u16string::const_iterator and "char16_t*" are
|
||||
// The compiler thinks std::u16string::const_iterator and "char16*" are
|
||||
// equivalent types.
|
||||
#define BASE_STRING16_ITERATOR_IS_CHAR16_POINTER
|
||||
#endif
|
||||
|
@@ -67,7 +67,7 @@
|
||||
|
||||
#if defined(USING_CHROMIUM_INCLUDES)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/functional/callback.h"
|
||||
#include "base/callback.h"
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
@@ -83,18 +83,18 @@
|
||||
namespace base {
|
||||
|
||||
template <typename R, typename... Args>
|
||||
class OnceCallback<R(Args...)> : public cef_internal::CallbackBase {
|
||||
class OnceCallback<R(Args...)> : public internal::CallbackBase {
|
||||
public:
|
||||
using ResultType = R;
|
||||
using RunType = R(Args...);
|
||||
using PolymorphicInvoke = R (*)(cef_internal::BindStateBase*,
|
||||
cef_internal::PassingType<Args>...);
|
||||
using PolymorphicInvoke = R (*)(internal::BindStateBase*,
|
||||
internal::PassingType<Args>...);
|
||||
|
||||
constexpr OnceCallback() = default;
|
||||
OnceCallback(std::nullptr_t) = delete;
|
||||
|
||||
explicit OnceCallback(cef_internal::BindStateBase* bind_state)
|
||||
: cef_internal::CallbackBase(bind_state) {}
|
||||
explicit OnceCallback(internal::BindStateBase* bind_state)
|
||||
: internal::CallbackBase(bind_state) {}
|
||||
|
||||
OnceCallback(const OnceCallback&) = delete;
|
||||
OnceCallback& operator=(const OnceCallback&) = delete;
|
||||
@@ -103,10 +103,10 @@ class OnceCallback<R(Args...)> : public cef_internal::CallbackBase {
|
||||
OnceCallback& operator=(OnceCallback&&) noexcept = default;
|
||||
|
||||
OnceCallback(RepeatingCallback<RunType> other)
|
||||
: cef_internal::CallbackBase(std::move(other)) {}
|
||||
: internal::CallbackBase(std::move(other)) {}
|
||||
|
||||
OnceCallback& operator=(RepeatingCallback<RunType> other) {
|
||||
static_cast<cef_internal::CallbackBase&>(*this) = std::move(other);
|
||||
static_cast<internal::CallbackBase&>(*this) = std::move(other);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ class OnceCallback<R(Args...)> : public cef_internal::CallbackBase {
|
||||
OnceCallback<ThenR(Args...)> Then(OnceCallback<ThenR(ThenArgs...)> then) && {
|
||||
CHECK(then);
|
||||
return BindOnce(
|
||||
cef_internal::ThenHelper<
|
||||
internal::ThenHelper<
|
||||
OnceCallback, OnceCallback<ThenR(ThenArgs...)>>::CreateTrampoline(),
|
||||
std::move(*this), std::move(then));
|
||||
}
|
||||
@@ -155,7 +155,7 @@ class OnceCallback<R(Args...)> : public cef_internal::CallbackBase {
|
||||
RepeatingCallback<ThenR(ThenArgs...)> then) && {
|
||||
CHECK(then);
|
||||
return BindOnce(
|
||||
cef_internal::ThenHelper<
|
||||
internal::ThenHelper<
|
||||
OnceCallback,
|
||||
RepeatingCallback<ThenR(ThenArgs...)>>::CreateTrampoline(),
|
||||
std::move(*this), std::move(then));
|
||||
@@ -163,19 +163,18 @@ class OnceCallback<R(Args...)> : public cef_internal::CallbackBase {
|
||||
};
|
||||
|
||||
template <typename R, typename... Args>
|
||||
class RepeatingCallback<R(Args...)>
|
||||
: public cef_internal::CallbackBaseCopyable {
|
||||
class RepeatingCallback<R(Args...)> : public internal::CallbackBaseCopyable {
|
||||
public:
|
||||
using ResultType = R;
|
||||
using RunType = R(Args...);
|
||||
using PolymorphicInvoke = R (*)(cef_internal::BindStateBase*,
|
||||
cef_internal::PassingType<Args>...);
|
||||
using PolymorphicInvoke = R (*)(internal::BindStateBase*,
|
||||
internal::PassingType<Args>...);
|
||||
|
||||
constexpr RepeatingCallback() = default;
|
||||
RepeatingCallback(std::nullptr_t) = delete;
|
||||
|
||||
explicit RepeatingCallback(cef_internal::BindStateBase* bind_state)
|
||||
: cef_internal::CallbackBaseCopyable(bind_state) {}
|
||||
explicit RepeatingCallback(internal::BindStateBase* bind_state)
|
||||
: internal::CallbackBaseCopyable(bind_state) {}
|
||||
|
||||
// Copyable and movable.
|
||||
RepeatingCallback(const RepeatingCallback&) = default;
|
||||
@@ -225,7 +224,7 @@ class RepeatingCallback<R(Args...)>
|
||||
RepeatingCallback<ThenR(ThenArgs...)> then) const& {
|
||||
CHECK(then);
|
||||
return BindRepeating(
|
||||
cef_internal::ThenHelper<
|
||||
internal::ThenHelper<
|
||||
RepeatingCallback,
|
||||
RepeatingCallback<ThenR(ThenArgs...)>>::CreateTrampoline(),
|
||||
*this, std::move(then));
|
||||
@@ -236,7 +235,7 @@ class RepeatingCallback<R(Args...)>
|
||||
RepeatingCallback<ThenR(ThenArgs...)> then) && {
|
||||
CHECK(then);
|
||||
return BindRepeating(
|
||||
cef_internal::ThenHelper<
|
||||
internal::ThenHelper<
|
||||
RepeatingCallback,
|
||||
RepeatingCallback<ThenR(ThenArgs...)>>::CreateTrampoline(),
|
||||
std::move(*this), std::move(then));
|
||||
|
@@ -34,7 +34,7 @@
|
||||
|
||||
#if defined(USING_CHROMIUM_INCLUDES)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/functional/callback_forward.h"
|
||||
#include "base/callback_forward.h"
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
|
@@ -39,7 +39,7 @@
|
||||
|
||||
#if defined(USING_CHROMIUM_INCLUDES)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/functional/callback_helpers.h"
|
||||
#include "base/callback_helpers.h"
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
|
@@ -86,7 +86,7 @@
|
||||
|
||||
#if defined(USING_CHROMIUM_INCLUDES)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/functional/callback_list.h"
|
||||
#include "base/callback_list.h"
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
@@ -242,9 +242,8 @@ class CallbackListBase {
|
||||
// the reentrant Notify() call.
|
||||
template <typename... RunArgs>
|
||||
void Notify(RunArgs&&... args) {
|
||||
if (empty()) {
|
||||
if (empty())
|
||||
return; // Nothing to do.
|
||||
}
|
||||
|
||||
{
|
||||
AutoReset<bool> iterating(&iterating_, true);
|
||||
@@ -258,20 +257,18 @@ class CallbackListBase {
|
||||
});
|
||||
};
|
||||
for (auto it = next_valid(callbacks_.begin()); it != callbacks_.end();
|
||||
it = next_valid(it)) {
|
||||
it = next_valid(it))
|
||||
// NOTE: Intentionally does not call std::forward<RunArgs>(args)...,
|
||||
// since that would allow move-only arguments.
|
||||
static_cast<CallbackListImpl*>(this)->RunCallback(it++, args...);
|
||||
}
|
||||
}
|
||||
|
||||
// Re-entrant invocations shouldn't prune anything from the list. This can
|
||||
// invalidate iterators from underneath higher call frames. It's safe to
|
||||
// simply do nothing, since the outermost frame will continue through here
|
||||
// and prune all null callbacks below.
|
||||
if (iterating_) {
|
||||
if (iterating_)
|
||||
return;
|
||||
}
|
||||
|
||||
// Any null callbacks remaining in the list were canceled due to
|
||||
// Subscription destruction during iteration, and can safely be erased now.
|
||||
@@ -285,9 +282,8 @@ class CallbackListBase {
|
||||
// that were executed above have all been removed regardless of whether
|
||||
// they're counted in |erased_callbacks_|.
|
||||
if (removal_callback_ &&
|
||||
(erased_callbacks || IsOnceCallback<CallbackType>::value)) {
|
||||
(erased_callbacks || IsOnceCallback<CallbackType>::value))
|
||||
removal_callback_.Run(); // May delete |this|!
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
@@ -299,9 +295,8 @@ class CallbackListBase {
|
||||
private:
|
||||
// Cancels the callback pointed to by |it|, which is guaranteed to be valid.
|
||||
void CancelCallback(const typename Callbacks::iterator& it) {
|
||||
if (static_cast<CallbackListImpl*>(this)->CancelNullCallback(it)) {
|
||||
if (static_cast<CallbackListImpl*>(this)->CancelNullCallback(it))
|
||||
return;
|
||||
}
|
||||
|
||||
if (iterating_) {
|
||||
// Calling erase() here is unsafe, since the loop in Notify() may be
|
||||
@@ -311,9 +306,8 @@ class CallbackListBase {
|
||||
it->Reset();
|
||||
} else {
|
||||
callbacks_.erase(it);
|
||||
if (removal_callback_) {
|
||||
if (removal_callback_)
|
||||
removal_callback_.Run(); // May delete |this|!
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -133,9 +133,8 @@ class CancelableCallbackImpl {
|
||||
|
||||
// Returns a callback that can be disabled by calling Cancel().
|
||||
CallbackType callback() const {
|
||||
if (!callback_) {
|
||||
if (!callback_)
|
||||
return CallbackType();
|
||||
}
|
||||
CallbackType forwarder;
|
||||
MakeForwarder(&forwarder);
|
||||
return forwarder;
|
||||
|
@@ -251,6 +251,13 @@
|
||||
#define HAS_FEATURE(FEATURE) 0
|
||||
#endif
|
||||
|
||||
// Macro for telling -Wimplicit-fallthrough that a fallthrough is intentional.
|
||||
#if defined(__clang__)
|
||||
#define FALLTHROUGH [[clang::fallthrough]]
|
||||
#else
|
||||
#define FALLTHROUGH
|
||||
#endif
|
||||
|
||||
#if defined(COMPILER_GCC)
|
||||
#define PRETTY_FUNCTION __PRETTY_FUNCTION__
|
||||
#elif defined(COMPILER_MSVC)
|
||||
@@ -313,30 +320,6 @@
|
||||
#define STACK_UNINITIALIZED
|
||||
#endif
|
||||
|
||||
// Attribute "no_stack_protector" disables -fstack-protector for the specified
|
||||
// function.
|
||||
//
|
||||
// "stack_protector" is enabled on most POSIX builds. The flag adds a canary
|
||||
// to each stack frame, which on function return is checked against a reference
|
||||
// canary. If the canaries do not match, it's likely that a stack buffer
|
||||
// overflow has occurred, so immediately crashing will prevent exploitation in
|
||||
// many cases.
|
||||
//
|
||||
// In some cases it's desirable to remove this, e.g. on hot functions, or if
|
||||
// we have purposely changed the reference canary.
|
||||
//
|
||||
// On Linux systems the reference canary will be purposely changed when forking
|
||||
// sub-processes (see https://crbug.com/40181003). To avoid sub-process shutdown
|
||||
// crashes the NO_STACK_PROTECTOR annotation must be added to all functions in
|
||||
// the call stack leading to CefExecuteProcess(). Applications that cannot add
|
||||
// this annotation must instead pass the `--change-stack-guard-on-fork=disable`
|
||||
// command-line flag.
|
||||
#if defined(COMPILER_GCC) || defined(__clang__)
|
||||
#define NO_STACK_PROTECTOR __attribute__((no_stack_protector))
|
||||
#else
|
||||
#define NO_STACK_PROTECTOR
|
||||
#endif
|
||||
|
||||
// The ANALYZER_ASSUME_TRUE(bool arg) macro adds compiler-specific hints
|
||||
// to Clang which control what code paths are statically analyzed,
|
||||
// and is meant to be used in conjunction with assert & assert-like functions.
|
||||
|
@@ -1,92 +0,0 @@
|
||||
// Copyright (c) 2024 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.
|
||||
|
||||
///
|
||||
/// \file
|
||||
/// Provides functions for generating crash dumps.
|
||||
///
|
||||
/// NOTE: The contents of this file are only available to applications that link
|
||||
/// against the libcef_dll_wrapper target.
|
||||
///
|
||||
/// NOTE: Ensure crash reporting is configured before use. See
|
||||
/// https://bitbucket.org/chromiumembedded/cef/wiki/CrashReporting.md for more
|
||||
/// information
|
||||
///
|
||||
/// WARNING: Crash reporting should not be used in the main/browser process
|
||||
/// before calling CefInitialize or in sub-processes before CefExecuteProcess.
|
||||
///
|
||||
|
||||
#ifndef CEF_INCLUDE_BASE_CEF_DUMP_WITHOUT_CRASHING_H_
|
||||
#define CEF_INCLUDE_BASE_CEF_DUMP_WITHOUT_CRASHING_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_api_hash.h"
|
||||
|
||||
constexpr long long kOneDayInMilliseconds = 86400000;
|
||||
|
||||
///
|
||||
/// This function allows for generating of crash dumps with a throttling
|
||||
/// mechanism, preventing frequent dumps from being generated in a short period
|
||||
/// of time from the same location. If should only be called after CefInitialize
|
||||
/// has been successfully called. The |function_name|, |file_name|, and
|
||||
/// |line_number| parameters specify the origin location of the dump. The
|
||||
/// |mseconds_between_dumps| is an interval between consecutive dumps in
|
||||
/// milliseconds from the same location.
|
||||
///
|
||||
/// Returns true if the dump was successfully generated, false otherwise.
|
||||
///
|
||||
/// For detailed behavior, usage instructions, and considerations, refer to the
|
||||
/// documentation of DumpWithoutCrashing in base/debug/dump_without_crashing.h.
|
||||
///
|
||||
bool CefDumpWithoutCrashing(
|
||||
long long mseconds_between_dumps = kOneDayInMilliseconds,
|
||||
const char* function_name = __builtin_FUNCTION(),
|
||||
const char* file_name = __builtin_FILE(),
|
||||
int line_number = __builtin_LINE());
|
||||
|
||||
#if CEF_API_REMOVED(13500)
|
||||
///
|
||||
/// This function allows for generating of crash dumps without any throttling
|
||||
/// constraints. If should also only be called after CefInitialize has been
|
||||
/// successfully called.
|
||||
///
|
||||
/// Returns true if the dump was successfully generated, false otherwise.
|
||||
///
|
||||
/// For detailed behavior, usage instructions, and considerations, refer to the
|
||||
/// documentation of DumpWithoutCrashingUnthrottled in
|
||||
/// base/debug/dump_without_crashing.h.
|
||||
///
|
||||
/// This function is removed in API version 13500. Use CefDumpWithoutCrashing()
|
||||
/// instead.
|
||||
///
|
||||
bool CefDumpWithoutCrashingUnthrottled();
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_CEF_DUMP_WITHOUT_CRASHING_H_
|
@@ -723,13 +723,6 @@ 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();
|
||||
}
|
||||
#if defined(WCHAR_T_IS_32_BIT)
|
||||
std::ostream& operator<<(std::ostream& out, const char16_t* wstr);
|
||||
#elif defined(WCHAR_T_IS_16_BIT)
|
||||
inline std::ostream& operator<<(std::ostream& out, const char16_t* wstr) {
|
||||
return operator<<(out, reinterpret_cast<const wchar_t*>(wstr));
|
||||
}
|
||||
#endif
|
||||
|
||||
// The NOTIMPLEMENTED() macro annotates codepaths which have
|
||||
// not been implemented yet.
|
||||
|
@@ -43,6 +43,7 @@
|
||||
// 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"
|
||||
|
||||
|
60
include/base/cef_ptr_util.h
Normal file
60
include/base/cef_ptr_util.h
Normal file
@@ -0,0 +1,60 @@
|
||||
// Copyright (c) 2021 Marshall A. Greenblatt. Portions copyright (c) 2015
|
||||
// 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_PTR_UTIL_H_
|
||||
#define INCLUDE_BASE_CEF_PTR_UTIL_H_
|
||||
#pragma once
|
||||
|
||||
#if defined(USING_CHROMIUM_INCLUDES)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/memory/ptr_util.h"
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
namespace base {
|
||||
|
||||
///
|
||||
/// Helper to transfer ownership of a raw pointer to a std::unique_ptr<T>.
|
||||
/// Note that std::unique_ptr<T> has very different semantics from
|
||||
/// std::unique_ptr<T[]>: do not use this helper for array allocations.
|
||||
///
|
||||
template <typename T>
|
||||
std::unique_ptr<T> WrapUnique(T* ptr) {
|
||||
return std::unique_ptr<T>(ptr);
|
||||
}
|
||||
|
||||
} // namespace base
|
||||
|
||||
#endif // INCLUDE_BASE_CEF_PTR_UTIL_H_
|
@@ -50,6 +50,7 @@
|
||||
#include "include/base/cef_compiler_specific.h"
|
||||
#include "include/base/cef_logging.h"
|
||||
#include "include/base/cef_scoped_refptr.h"
|
||||
#include "include/base/cef_template_util.h"
|
||||
#include "include/base/cef_thread_checker.h"
|
||||
|
||||
namespace base {
|
||||
@@ -104,16 +105,13 @@ class RefCountedBase {
|
||||
|
||||
#if DCHECK_IS_ON()
|
||||
DCHECK(!in_dtor_);
|
||||
if (ref_count_ == 0) {
|
||||
if (ref_count_ == 0)
|
||||
in_dtor_ = true;
|
||||
}
|
||||
|
||||
if (ref_count_ >= 1) {
|
||||
if (ref_count_ >= 1)
|
||||
DCHECK(CalledOnValidThread());
|
||||
}
|
||||
if (ref_count_ == 1) {
|
||||
if (ref_count_ == 1)
|
||||
thread_checker_.DetachFromThread();
|
||||
}
|
||||
#endif
|
||||
|
||||
return ref_count_ == 0;
|
||||
@@ -484,7 +482,7 @@ class RefCountedData
|
||||
RefCountedData(const T& in_value) : data(in_value) {}
|
||||
RefCountedData(T&& in_value) : data(std::move(in_value)) {}
|
||||
template <typename... Args>
|
||||
explicit RefCountedData(std::in_place_t, Args&&... args)
|
||||
explicit RefCountedData(in_place_t, Args&&... args)
|
||||
: data(std::forward<Args>(args)...) {}
|
||||
|
||||
T data;
|
||||
|
@@ -229,9 +229,8 @@ class TRIVIAL_ABI scoped_refptr {
|
||||
// should move or copy construct from an existing scoped_refptr<T> to the
|
||||
// ref-counted object.
|
||||
scoped_refptr(T* p) : ptr_(p) {
|
||||
if (ptr_) {
|
||||
if (ptr_)
|
||||
AddRef(ptr_);
|
||||
}
|
||||
}
|
||||
|
||||
// Copy constructor. This is required in addition to the copy conversion
|
||||
@@ -262,9 +261,8 @@ class TRIVIAL_ABI scoped_refptr {
|
||||
"It's unsafe to override the ref count preference."
|
||||
" Please remove REQUIRE_ADOPTION_FOR_REFCOUNTED_TYPE"
|
||||
" from subclasses.");
|
||||
if (ptr_) {
|
||||
if (ptr_)
|
||||
Release(ptr_);
|
||||
}
|
||||
}
|
||||
|
||||
T* get() const { return ptr_; }
|
||||
|
@@ -97,24 +97,21 @@ class ScopedTypeRef {
|
||||
element_type object = Traits::InvalidValue(),
|
||||
base::scoped_policy::OwnershipPolicy policy = base::scoped_policy::ASSUME)
|
||||
: object_(object) {
|
||||
if (object_ && policy == base::scoped_policy::RETAIN) {
|
||||
if (object_ && policy == base::scoped_policy::RETAIN)
|
||||
object_ = Traits::Retain(object_);
|
||||
}
|
||||
}
|
||||
|
||||
ScopedTypeRef(const ScopedTypeRef<T, Traits>& that) : object_(that.object_) {
|
||||
if (object_) {
|
||||
if (object_)
|
||||
object_ = Traits::Retain(object_);
|
||||
}
|
||||
}
|
||||
|
||||
// This allows passing an object to a function that takes its superclass.
|
||||
template <typename R, typename RTraits>
|
||||
explicit ScopedTypeRef(const ScopedTypeRef<R, RTraits>& that_as_subclass)
|
||||
: object_(that_as_subclass.get()) {
|
||||
if (object_) {
|
||||
if (object_)
|
||||
object_ = Traits::Retain(object_);
|
||||
}
|
||||
}
|
||||
|
||||
ScopedTypeRef(ScopedTypeRef<T, Traits>&& that) : object_(that.object_) {
|
||||
@@ -122,9 +119,8 @@ class ScopedTypeRef {
|
||||
}
|
||||
|
||||
~ScopedTypeRef() {
|
||||
if (object_) {
|
||||
if (object_)
|
||||
Traits::Release(object_);
|
||||
}
|
||||
}
|
||||
|
||||
ScopedTypeRef& operator=(const ScopedTypeRef<T, Traits>& that) {
|
||||
@@ -147,12 +143,10 @@ class ScopedTypeRef {
|
||||
void reset(element_type object = Traits::InvalidValue(),
|
||||
base::scoped_policy::OwnershipPolicy policy =
|
||||
base::scoped_policy::ASSUME) {
|
||||
if (object && policy == base::scoped_policy::RETAIN) {
|
||||
if (object && policy == base::scoped_policy::RETAIN)
|
||||
object = Traits::Retain(object);
|
||||
}
|
||||
if (object_) {
|
||||
if (object_)
|
||||
Traits::Release(object_);
|
||||
}
|
||||
object_ = object;
|
||||
}
|
||||
|
||||
|
414
include/base/cef_template_util.h
Normal file
414
include/base/cef_template_util.h
Normal file
@@ -0,0 +1,414 @@
|
||||
// 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(USING_CHROMIUM_INCLUDES)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/template_util.h"
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
|
||||
#include <stddef.h>
|
||||
#include <iosfwd>
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "include/base/cef_build.h"
|
||||
|
||||
// Some versions of libstdc++ have partial support for type_traits, but misses
|
||||
// a smaller subset while removing some of the older non-standard stuff. Assume
|
||||
// that all versions below 5.0 fall in this category, along with one 5.0
|
||||
// experimental release. Test for this by consulting compiler major version,
|
||||
// the only reliable option available, so theoretically this could fail should
|
||||
// you attempt to mix an earlier version of libstdc++ with >= GCC5. But
|
||||
// that's unlikely to work out, especially as GCC5 changed ABI.
|
||||
#define CR_GLIBCXX_5_0_0 20150123
|
||||
#if (defined(__GNUC__) && __GNUC__ < 5) || \
|
||||
(defined(__GLIBCXX__) && __GLIBCXX__ == CR_GLIBCXX_5_0_0)
|
||||
#define CR_USE_FALLBACKS_FOR_OLD_EXPERIMENTAL_GLIBCXX
|
||||
#endif
|
||||
|
||||
// This hacks around using gcc with libc++ which has some incompatibilies.
|
||||
// - is_trivially_* doesn't work: https://llvm.org/bugs/show_bug.cgi?id=27538
|
||||
// TODO(danakj): Remove this when android builders are all using a newer version
|
||||
// of gcc, or the android ndk is updated to a newer libc++ that works with older
|
||||
// gcc versions.
|
||||
#if !defined(__clang__) && defined(_LIBCPP_VERSION)
|
||||
#define CR_USE_FALLBACKS_FOR_GCC_WITH_LIBCXX
|
||||
#endif
|
||||
|
||||
namespace base {
|
||||
|
||||
template <class T> struct is_non_const_reference : std::false_type {};
|
||||
template <class T> struct is_non_const_reference<T&> : std::true_type {};
|
||||
template <class T> struct is_non_const_reference<const T&> : std::false_type {};
|
||||
|
||||
namespace internal {
|
||||
|
||||
// Implementation detail of base::void_t below.
|
||||
template <typename...>
|
||||
struct make_void {
|
||||
using type = void;
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
||||
// base::void_t is an implementation of std::void_t from C++17.
|
||||
//
|
||||
// We use |base::internal::make_void| as a helper struct to avoid a C++14
|
||||
// defect:
|
||||
// http://en.cppreference.com/w/cpp/types/void_t
|
||||
// http://open-std.org/JTC1/SC22/WG21/docs/cwg_defects.html#1558
|
||||
template <typename... Ts>
|
||||
using void_t = typename ::base::internal::make_void<Ts...>::type;
|
||||
|
||||
namespace internal {
|
||||
|
||||
// Uses expression SFINAE to detect whether using operator<< would work.
|
||||
template <typename T, typename = void>
|
||||
struct SupportsOstreamOperator : std::false_type {};
|
||||
template <typename T>
|
||||
struct SupportsOstreamOperator<T,
|
||||
decltype(void(std::declval<std::ostream&>()
|
||||
<< std::declval<T>()))>
|
||||
: std::true_type {};
|
||||
|
||||
template <typename T, typename = void>
|
||||
struct SupportsToString : std::false_type {};
|
||||
template <typename T>
|
||||
struct SupportsToString<T, decltype(void(std::declval<T>().ToString()))>
|
||||
: std::true_type {};
|
||||
|
||||
// Used to detect whether the given type is an iterator. This is normally used
|
||||
// with std::enable_if to provide disambiguation for functions that take
|
||||
// templatzed iterators as input.
|
||||
template <typename T, typename = void>
|
||||
struct is_iterator : std::false_type {};
|
||||
|
||||
template <typename T>
|
||||
struct is_iterator<T,
|
||||
void_t<typename std::iterator_traits<T>::iterator_category>>
|
||||
: std::true_type {};
|
||||
|
||||
// Helper to express preferences in an overload set. If more than one overload
|
||||
// are available for a given set of parameters the overload with the higher
|
||||
// priority will be chosen.
|
||||
template <size_t I>
|
||||
struct priority_tag : priority_tag<I - 1> {};
|
||||
|
||||
template <>
|
||||
struct priority_tag<0> {};
|
||||
|
||||
} // namespace internal
|
||||
|
||||
// is_trivially_copyable is especially hard to get right.
|
||||
// - Older versions of libstdc++ will fail to have it like they do for other
|
||||
// type traits. This has become a subset of the second point, but used to be
|
||||
// handled independently.
|
||||
// - An experimental release of gcc includes most of type_traits but misses
|
||||
// is_trivially_copyable, so we still have to avoid using libstdc++ in this
|
||||
// case, which is covered by CR_USE_FALLBACKS_FOR_OLD_EXPERIMENTAL_GLIBCXX.
|
||||
// - When compiling libc++ from before r239653, with a gcc compiler, the
|
||||
// std::is_trivially_copyable can fail. So we need to work around that by not
|
||||
// using the one in libc++ in this case. This is covered by the
|
||||
// CR_USE_FALLBACKS_FOR_GCC_WITH_LIBCXX define, and is discussed in
|
||||
// https://llvm.org/bugs/show_bug.cgi?id=27538#c1 where they point out that
|
||||
// in libc++'s commit r239653 this is fixed by libc++ checking for gcc 5.1.
|
||||
// - In both of the above cases we are using the gcc compiler. When defining
|
||||
// this ourselves on compiler intrinsics, the __is_trivially_copyable()
|
||||
// intrinsic is not available on gcc before version 5.1 (see the discussion in
|
||||
// https://llvm.org/bugs/show_bug.cgi?id=27538#c1 again), so we must check for
|
||||
// that version.
|
||||
// - When __is_trivially_copyable() is not available because we are on gcc older
|
||||
// than 5.1, we need to fall back to something, so we use __has_trivial_copy()
|
||||
// instead based on what was done one-off in bit_cast() previously.
|
||||
|
||||
// TODO(crbug.com/554293): Remove this when all platforms have this in the std
|
||||
// namespace and it works with gcc as needed.
|
||||
#if defined(CR_USE_FALLBACKS_FOR_OLD_EXPERIMENTAL_GLIBCXX) || \
|
||||
defined(CR_USE_FALLBACKS_FOR_GCC_WITH_LIBCXX)
|
||||
template <typename T>
|
||||
struct is_trivially_copyable {
|
||||
// TODO(danakj): Remove this when android builders are all using a newer version
|
||||
// of gcc, or the android ndk is updated to a newer libc++ that does this for
|
||||
// us.
|
||||
#if _GNUC_VER >= 501
|
||||
static constexpr bool value = __is_trivially_copyable(T);
|
||||
#else
|
||||
static constexpr bool value =
|
||||
__has_trivial_copy(T) && __has_trivial_destructor(T);
|
||||
#endif
|
||||
};
|
||||
#else
|
||||
template <class T>
|
||||
using is_trivially_copyable = std::is_trivially_copyable<T>;
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ <= 7
|
||||
// Workaround for g++7 and earlier family.
|
||||
// Due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80654, without this
|
||||
// Optional<std::vector<T>> where T is non-copyable causes a compile error.
|
||||
// As we know it is not trivially copy constructible, explicitly declare so.
|
||||
template <typename T>
|
||||
struct is_trivially_copy_constructible
|
||||
: std::is_trivially_copy_constructible<T> {};
|
||||
|
||||
template <typename... T>
|
||||
struct is_trivially_copy_constructible<std::vector<T...>> : std::false_type {};
|
||||
#else
|
||||
// Otherwise use std::is_trivially_copy_constructible as is.
|
||||
template <typename T>
|
||||
using is_trivially_copy_constructible = std::is_trivially_copy_constructible<T>;
|
||||
#endif
|
||||
|
||||
// base::in_place_t is an implementation of std::in_place_t from
|
||||
// C++17. A tag type used to request in-place construction in template vararg
|
||||
// constructors.
|
||||
|
||||
// Specification:
|
||||
// https://en.cppreference.com/w/cpp/utility/in_place
|
||||
struct in_place_t {};
|
||||
constexpr in_place_t in_place = {};
|
||||
|
||||
// base::in_place_type_t is an implementation of std::in_place_type_t from
|
||||
// C++17. A tag type used for in-place construction when the type to construct
|
||||
// needs to be specified, such as with base::unique_any, designed to be a
|
||||
// drop-in replacement.
|
||||
|
||||
// Specification:
|
||||
// http://en.cppreference.com/w/cpp/utility/in_place
|
||||
template <typename T>
|
||||
struct in_place_type_t {};
|
||||
|
||||
template <typename T>
|
||||
struct is_in_place_type_t {
|
||||
static constexpr bool value = false;
|
||||
};
|
||||
|
||||
template <typename... Ts>
|
||||
struct is_in_place_type_t<in_place_type_t<Ts...>> {
|
||||
static constexpr bool value = true;
|
||||
};
|
||||
|
||||
// C++14 implementation of C++17's std::bool_constant.
|
||||
//
|
||||
// Reference: https://en.cppreference.com/w/cpp/types/integral_constant
|
||||
// Specification: https://wg21.link/meta.type.synop
|
||||
template <bool B>
|
||||
using bool_constant = std::integral_constant<bool, B>;
|
||||
|
||||
// C++14 implementation of C++17's std::conjunction.
|
||||
//
|
||||
// Reference: https://en.cppreference.com/w/cpp/types/conjunction
|
||||
// Specification: https://wg21.link/meta.logical#1.itemdecl:1
|
||||
template <typename...>
|
||||
struct conjunction : std::true_type {};
|
||||
|
||||
template <typename B1>
|
||||
struct conjunction<B1> : B1 {};
|
||||
|
||||
template <typename B1, typename... Bn>
|
||||
struct conjunction<B1, Bn...>
|
||||
: std::conditional_t<static_cast<bool>(B1::value), conjunction<Bn...>, B1> {
|
||||
};
|
||||
|
||||
// C++14 implementation of C++17's std::disjunction.
|
||||
//
|
||||
// Reference: https://en.cppreference.com/w/cpp/types/disjunction
|
||||
// Specification: https://wg21.link/meta.logical#itemdecl:2
|
||||
template <typename...>
|
||||
struct disjunction : std::false_type {};
|
||||
|
||||
template <typename B1>
|
||||
struct disjunction<B1> : B1 {};
|
||||
|
||||
template <typename B1, typename... Bn>
|
||||
struct disjunction<B1, Bn...>
|
||||
: std::conditional_t<static_cast<bool>(B1::value), B1, disjunction<Bn...>> {
|
||||
};
|
||||
|
||||
// C++14 implementation of C++17's std::negation.
|
||||
//
|
||||
// Reference: https://en.cppreference.com/w/cpp/types/negation
|
||||
// Specification: https://wg21.link/meta.logical#itemdecl:3
|
||||
template <typename B>
|
||||
struct negation : bool_constant<!static_cast<bool>(B::value)> {};
|
||||
|
||||
// Implementation of C++17's invoke_result.
|
||||
//
|
||||
// This implementation adds references to `Functor` and `Args` to work around
|
||||
// some quirks of std::result_of. See the #Notes section of [1] for details.
|
||||
//
|
||||
// References:
|
||||
// [1] https://en.cppreference.com/w/cpp/types/result_of
|
||||
// [2] https://wg21.link/meta.trans.other#lib:invoke_result
|
||||
#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
|
||||
template <typename Functor, typename... Args>
|
||||
using invoke_result = std::invoke_result<Functor, Args...>;
|
||||
#else
|
||||
template <typename Functor, typename... Args>
|
||||
using invoke_result = std::result_of<Functor && (Args && ...)>;
|
||||
#endif
|
||||
|
||||
// Implementation of C++17's std::invoke_result_t.
|
||||
//
|
||||
// Reference: https://wg21.link/meta.type.synop#lib:invoke_result_t
|
||||
template <typename Functor, typename... Args>
|
||||
using invoke_result_t = typename invoke_result<Functor, Args...>::type;
|
||||
|
||||
namespace internal {
|
||||
|
||||
// Base case, `InvokeResult` does not have a nested type member. This means `F`
|
||||
// could not be invoked with `Args...` and thus is not invocable.
|
||||
template <typename InvokeResult, typename R, typename = void>
|
||||
struct IsInvocableImpl : std::false_type {};
|
||||
|
||||
// Happy case, `InvokeResult` does have a nested type member. Now check whether
|
||||
// `InvokeResult::type` is convertible to `R`. Short circuit in case
|
||||
// `std::is_void<R>`.
|
||||
template <typename InvokeResult, typename R>
|
||||
struct IsInvocableImpl<InvokeResult, R, void_t<typename InvokeResult::type>>
|
||||
: disjunction<std::is_void<R>,
|
||||
std::is_convertible<typename InvokeResult::type, R>> {};
|
||||
|
||||
} // namespace internal
|
||||
|
||||
// Implementation of C++17's std::is_invocable_r.
|
||||
//
|
||||
// Returns whether `F` can be invoked with `Args...` and the result is
|
||||
// convertible to `R`.
|
||||
//
|
||||
// Reference: https://wg21.link/meta.rel#lib:is_invocable_r
|
||||
template <typename R, typename F, typename... Args>
|
||||
struct is_invocable_r
|
||||
: internal::IsInvocableImpl<invoke_result<F, Args...>, R> {};
|
||||
|
||||
// Implementation of C++17's std::is_invocable.
|
||||
//
|
||||
// Returns whether `F` can be invoked with `Args...`.
|
||||
//
|
||||
// Reference: https://wg21.link/meta.rel#lib:is_invocable
|
||||
template <typename F, typename... Args>
|
||||
struct is_invocable : is_invocable_r<void, F, Args...> {};
|
||||
|
||||
namespace internal {
|
||||
|
||||
// The indirection with std::is_enum<T> is required, because instantiating
|
||||
// std::underlying_type_t<T> when T is not an enum is UB prior to C++20.
|
||||
template <typename T, bool = std::is_enum<T>::value>
|
||||
struct IsScopedEnumImpl : std::false_type {};
|
||||
|
||||
template <typename T>
|
||||
struct IsScopedEnumImpl<T, /*std::is_enum<T>::value=*/true>
|
||||
: negation<std::is_convertible<T, std::underlying_type_t<T>>> {};
|
||||
|
||||
} // namespace internal
|
||||
|
||||
// Implementation of C++23's std::is_scoped_enum
|
||||
//
|
||||
// Reference: https://en.cppreference.com/w/cpp/types/is_scoped_enum
|
||||
template <typename T>
|
||||
struct is_scoped_enum : internal::IsScopedEnumImpl<T> {};
|
||||
|
||||
// Implementation of C++20's std::remove_cvref.
|
||||
//
|
||||
// References:
|
||||
// - https://en.cppreference.com/w/cpp/types/remove_cvref
|
||||
// - https://wg21.link/meta.trans.other#lib:remove_cvref
|
||||
template <typename T>
|
||||
struct remove_cvref {
|
||||
using type = std::remove_cv_t<std::remove_reference_t<T>>;
|
||||
};
|
||||
|
||||
// Implementation of C++20's std::remove_cvref_t.
|
||||
//
|
||||
// References:
|
||||
// - https://en.cppreference.com/w/cpp/types/remove_cvref
|
||||
// - https://wg21.link/meta.type.synop#lib:remove_cvref_t
|
||||
template <typename T>
|
||||
using remove_cvref_t = typename remove_cvref<T>::type;
|
||||
|
||||
// Simplified implementation of C++20's std::iter_value_t.
|
||||
// As opposed to std::iter_value_t, this implementation does not restrict
|
||||
// the type of `Iter` and does not consider specializations of
|
||||
// `indirectly_readable_traits`.
|
||||
//
|
||||
// Reference: https://wg21.link/readable.traits#2
|
||||
template <typename Iter>
|
||||
using iter_value_t =
|
||||
typename std::iterator_traits<remove_cvref_t<Iter>>::value_type;
|
||||
|
||||
// Simplified implementation of C++20's std::iter_reference_t.
|
||||
// As opposed to std::iter_reference_t, this implementation does not restrict
|
||||
// the type of `Iter`.
|
||||
//
|
||||
// Reference: https://wg21.link/iterator.synopsis#:~:text=iter_reference_t
|
||||
template <typename Iter>
|
||||
using iter_reference_t = decltype(*std::declval<Iter&>());
|
||||
|
||||
// Simplified implementation of C++20's std::indirect_result_t. As opposed to
|
||||
// std::indirect_result_t, this implementation does not restrict the type of
|
||||
// `Func` and `Iters`.
|
||||
//
|
||||
// Reference: https://wg21.link/iterator.synopsis#:~:text=indirect_result_t
|
||||
template <typename Func, typename... Iters>
|
||||
using indirect_result_t = invoke_result_t<Func, iter_reference_t<Iters>...>;
|
||||
|
||||
// Simplified implementation of C++20's std::projected. As opposed to
|
||||
// std::projected, this implementation does not explicitly restrict the type of
|
||||
// `Iter` and `Proj`, but rather does so implicitly by requiring
|
||||
// `indirect_result_t<Proj, Iter>` is a valid type. This is required for SFINAE
|
||||
// friendliness.
|
||||
//
|
||||
// Reference: https://wg21.link/projected
|
||||
template <typename Iter,
|
||||
typename Proj,
|
||||
typename IndirectResultT = indirect_result_t<Proj, Iter>>
|
||||
struct projected {
|
||||
using value_type = remove_cvref_t<IndirectResultT>;
|
||||
|
||||
IndirectResultT operator*() const; // not defined
|
||||
};
|
||||
|
||||
} // namespace base
|
||||
|
||||
#undef CR_USE_FALLBACKS_FOR_GCC_WITH_LIBCXX
|
||||
#undef CR_USE_FALLBACKS_FOR_OLD_EXPERIMENTAL_GLIBCXX
|
||||
|
||||
#endif // !USING_CHROMIUM_INCLUDES
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_CEF_TEMPLATE_UTIL_H_
|
@@ -145,6 +145,14 @@
|
||||
/// free(str); // Trace system now has dangling pointer
|
||||
/// </pre>
|
||||
///
|
||||
/// 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.
|
||||
@@ -171,15 +179,15 @@
|
||||
/// - 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); \
|
||||
#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); \
|
||||
#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); \
|
||||
arg2_val, false); \
|
||||
CEF_INTERNAL_TRACE_END_ON_SCOPE_CLOSE(category, name)
|
||||
|
||||
// Implementation detail: trace event macros create temporary variable names.
|
||||
@@ -203,13 +211,21 @@
|
||||
/// literals). They may not include " chars.
|
||||
///
|
||||
#define TRACE_EVENT_INSTANT0(category, name) \
|
||||
cef_trace_event_instant(category, name, NULL, 0, NULL, 0)
|
||||
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)
|
||||
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)
|
||||
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
|
||||
@@ -219,13 +235,21 @@
|
||||
/// literals). They may not include " chars.
|
||||
///
|
||||
#define TRACE_EVENT_BEGIN0(category, name) \
|
||||
cef_trace_event_begin(category, name, NULL, 0, NULL, 0)
|
||||
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)
|
||||
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)
|
||||
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
|
||||
@@ -234,12 +258,21 @@
|
||||
/// literals). They may not include " chars.
|
||||
///
|
||||
#define TRACE_EVENT_END0(category, name) \
|
||||
cef_trace_event_end(category, name, NULL, 0, NULL, 0)
|
||||
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)
|
||||
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)
|
||||
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
|
||||
@@ -248,7 +281,9 @@
|
||||
/// literals). They may not include " chars.
|
||||
///
|
||||
#define TRACE_COUNTER1(category, name, value) \
|
||||
cef_trace_counter(category, name, NULL, value, NULL, 0)
|
||||
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.
|
||||
@@ -260,7 +295,11 @@
|
||||
#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)
|
||||
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
|
||||
@@ -273,7 +312,9 @@
|
||||
/// 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)
|
||||
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.
|
||||
@@ -289,7 +330,11 @@
|
||||
#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)
|
||||
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
|
||||
@@ -310,13 +355,23 @@
|
||||
/// args.
|
||||
///
|
||||
#define TRACE_EVENT_ASYNC_BEGIN0(category, name, id) \
|
||||
cef_trace_event_async_begin(category, name, id, NULL, 0, NULL, 0)
|
||||
#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)
|
||||
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)
|
||||
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
|
||||
@@ -327,10 +382,17 @@
|
||||
/// 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)
|
||||
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)
|
||||
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
|
||||
@@ -341,23 +403,40 @@
|
||||
/// 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)
|
||||
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)
|
||||
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)
|
||||
#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)
|
||||
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)
|
||||
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 {
|
||||
|
||||
@@ -369,7 +448,7 @@ class CefTraceEndOnScopeClose {
|
||||
CefTraceEndOnScopeClose(const char* category, const char* name)
|
||||
: category_(category), name_(name) {}
|
||||
~CefTraceEndOnScopeClose() {
|
||||
cef_trace_event_end(category_, name_, NULL, 0, NULL, 0);
|
||||
cef_trace_event_end(category_, name_, NULL, 0, NULL, 0, false);
|
||||
}
|
||||
|
||||
private:
|
||||
|
@@ -66,7 +66,6 @@
|
||||
// updated to match.
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include <tuple>
|
||||
#include <utility>
|
||||
|
||||
|
@@ -123,7 +123,7 @@ class SupportsWeakPtr;
|
||||
template <typename T>
|
||||
class WeakPtr;
|
||||
|
||||
namespace cef_internal {
|
||||
namespace internal {
|
||||
// These classes are part of the WeakPtr implementation.
|
||||
// DO NOT USE THESE CLASSES DIRECTLY YOURSELF.
|
||||
|
||||
@@ -197,7 +197,7 @@ class WeakPtrBase {
|
||||
WeakPtrBase& operator=(WeakPtrBase&& other) noexcept = default;
|
||||
|
||||
void reset() {
|
||||
ref_ = cef_internal::WeakReference();
|
||||
ref_ = internal::WeakReference();
|
||||
ptr_ = 0;
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@ class SupportsWeakPtrBase {
|
||||
template <typename Derived>
|
||||
static WeakPtr<Derived> StaticAsWeakPtr(Derived* t) {
|
||||
static_assert(
|
||||
std::is_base_of<cef_internal::SupportsWeakPtrBase, Derived>::value,
|
||||
std::is_base_of<internal::SupportsWeakPtrBase, Derived>::value,
|
||||
"AsWeakPtr argument must inherit from SupportsWeakPtr");
|
||||
return AsWeakPtrImpl<Derived>(t);
|
||||
}
|
||||
@@ -242,7 +242,7 @@ class SupportsWeakPtrBase {
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace cef_internal
|
||||
} // namespace internal
|
||||
|
||||
template <typename T>
|
||||
class WeakPtrFactory;
|
||||
@@ -264,7 +264,7 @@ class WeakPtrFactory;
|
||||
/// </pre>
|
||||
///
|
||||
template <typename T>
|
||||
class WeakPtr : public cef_internal::WeakPtrBase {
|
||||
class WeakPtr : public internal::WeakPtrBase {
|
||||
public:
|
||||
WeakPtr() = default;
|
||||
WeakPtr(std::nullptr_t) {}
|
||||
@@ -325,13 +325,13 @@ class WeakPtr : public cef_internal::WeakPtrBase {
|
||||
bool WasInvalidated() const { return ptr_ && !ref_.IsValid(); }
|
||||
|
||||
private:
|
||||
friend class cef_internal::SupportsWeakPtrBase;
|
||||
friend class internal::SupportsWeakPtrBase;
|
||||
template <typename U>
|
||||
friend class WeakPtr;
|
||||
friend class SupportsWeakPtr<T>;
|
||||
friend class WeakPtrFactory<T>;
|
||||
|
||||
WeakPtr(const cef_internal::WeakReference& ref, T* ptr)
|
||||
WeakPtr(const internal::WeakReference& ref, T* ptr)
|
||||
: WeakPtrBase(ref, reinterpret_cast<uintptr_t>(ptr)) {}
|
||||
};
|
||||
|
||||
@@ -355,15 +355,15 @@ bool operator==(std::nullptr_t, const WeakPtr<T>& weak_ptr) {
|
||||
return weak_ptr == nullptr;
|
||||
}
|
||||
|
||||
namespace cef_internal {
|
||||
namespace internal {
|
||||
class WeakPtrFactoryBase {
|
||||
protected:
|
||||
WeakPtrFactoryBase(uintptr_t ptr);
|
||||
~WeakPtrFactoryBase();
|
||||
cef_internal::WeakReferenceOwner weak_reference_owner_;
|
||||
internal::WeakReferenceOwner weak_reference_owner_;
|
||||
uintptr_t ptr_;
|
||||
};
|
||||
} // namespace cef_internal
|
||||
} // namespace internal
|
||||
|
||||
///
|
||||
/// A class may be composed of a WeakPtrFactory and thereby control how it
|
||||
@@ -374,7 +374,7 @@ class WeakPtrFactoryBase {
|
||||
/// bool.
|
||||
///
|
||||
template <class T>
|
||||
class WeakPtrFactory : public cef_internal::WeakPtrFactoryBase {
|
||||
class WeakPtrFactory : public internal::WeakPtrFactoryBase {
|
||||
public:
|
||||
WeakPtrFactory() = delete;
|
||||
|
||||
@@ -416,7 +416,7 @@ class WeakPtrFactory : public cef_internal::WeakPtrFactoryBase {
|
||||
/// destroyed, its use can lead to subtle use-after-destroy issues.
|
||||
///
|
||||
template <class T>
|
||||
class SupportsWeakPtr : public cef_internal::SupportsWeakPtrBase {
|
||||
class SupportsWeakPtr : public internal::SupportsWeakPtrBase {
|
||||
public:
|
||||
SupportsWeakPtr() = default;
|
||||
|
||||
@@ -431,7 +431,7 @@ class SupportsWeakPtr : public cef_internal::SupportsWeakPtrBase {
|
||||
~SupportsWeakPtr() = default;
|
||||
|
||||
private:
|
||||
cef_internal::WeakReferenceOwner weak_reference_owner_;
|
||||
internal::WeakReferenceOwner weak_reference_owner_;
|
||||
};
|
||||
|
||||
///
|
||||
@@ -459,7 +459,7 @@ class SupportsWeakPtr : public cef_internal::SupportsWeakPtrBase {
|
||||
///
|
||||
template <typename Derived>
|
||||
WeakPtr<Derived> AsWeakPtr(Derived* t) {
|
||||
return cef_internal::SupportsWeakPtrBase::StaticAsWeakPtr<Derived>(t);
|
||||
return internal::SupportsWeakPtrBase::StaticAsWeakPtr<Derived>(t);
|
||||
}
|
||||
|
||||
} // namespace base
|
||||
|
@@ -68,6 +68,7 @@
|
||||
#include "include/base/cef_build.h"
|
||||
#include "include/base/cef_compiler_specific.h"
|
||||
#include "include/base/cef_logging.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"
|
||||
@@ -96,7 +97,7 @@ struct BindUnwrapTraits;
|
||||
template <typename Functor, typename BoundArgsTuple, typename SFINAE = void>
|
||||
struct CallbackCancellationTraits;
|
||||
|
||||
namespace cef_internal {
|
||||
namespace internal {
|
||||
|
||||
template <typename Functor, typename SFINAE = void>
|
||||
struct FunctorTraits;
|
||||
@@ -355,14 +356,14 @@ template <typename Functor, typename SFINAE = void>
|
||||
struct IsCallableObject : std::false_type {};
|
||||
|
||||
template <typename Callable>
|
||||
struct IsCallableObject<Callable, std::void_t<decltype(&Callable::operator())>>
|
||||
struct IsCallableObject<Callable, void_t<decltype(&Callable::operator())>>
|
||||
: std::true_type {};
|
||||
|
||||
// HasRefCountedTypeAsRawPtr inherits from true_type when any of the |Args| is a
|
||||
// raw pointer to a RefCounted type.
|
||||
template <typename... Ts>
|
||||
struct HasRefCountedTypeAsRawPtr
|
||||
: std::disjunction<NeedsScopedRefptrButGetsRawPtr<Ts>...> {};
|
||||
: disjunction<NeedsScopedRefptrButGetsRawPtr<Ts>...> {};
|
||||
|
||||
// ForceVoidReturn<>
|
||||
//
|
||||
@@ -686,9 +687,8 @@ struct InvokeHelper<true, ReturnType> {
|
||||
static inline void MakeItSo(Functor&& functor,
|
||||
BoundWeakPtr&& weak_ptr,
|
||||
RunArgs&&... args) {
|
||||
if (!weak_ptr) {
|
||||
if (!weak_ptr)
|
||||
return;
|
||||
}
|
||||
using Traits = MakeFunctorTraits<Functor>;
|
||||
Traits::Invoke(std::forward<Functor>(functor),
|
||||
std::forward<BoundWeakPtr>(weak_ptr),
|
||||
@@ -877,7 +877,7 @@ BanUnconstructedRefCountedReceiver(const Receiver& receiver, Unused&&...) {
|
||||
// This stores all the state passed into Bind().
|
||||
template <typename Functor, typename... BoundArgs>
|
||||
struct BindState final : BindStateBase {
|
||||
using IsCancellable = std::bool_constant<
|
||||
using IsCancellable = bool_constant<
|
||||
CallbackCancellationTraits<Functor,
|
||||
std::tuple<BoundArgs...>>::is_cancellable>;
|
||||
template <typename ForwardFunctor, typename... ForwardBoundArgs>
|
||||
@@ -1251,7 +1251,7 @@ decltype(auto) BindImpl(Functor&& functor, Args&&... args) {
|
||||
// PolymorphicInvoke, to which CallbackType will cast back.
|
||||
using PolymorphicInvoke = typename CallbackType::PolymorphicInvoke;
|
||||
PolymorphicInvoke invoke_func =
|
||||
GetInvokeFunc<Invoker>(std::bool_constant<kIsOnce>());
|
||||
GetInvokeFunc<Invoker>(bool_constant<kIsOnce>());
|
||||
|
||||
using InvokeFuncStorage = BindStateBase::InvokeFuncStorage;
|
||||
return CallbackType(BindState::Create(
|
||||
@@ -1259,7 +1259,7 @@ decltype(auto) BindImpl(Functor&& functor, Args&&... args) {
|
||||
std::forward<Functor>(functor), std::forward<Args>(args)...));
|
||||
}
|
||||
|
||||
} // namespace cef_internal
|
||||
} // namespace internal
|
||||
|
||||
// An injection point to control |this| pointer behavior on a method invocation.
|
||||
// If IsWeakReceiver<> is true_type for |T| and |T| is used for a receiver of a
|
||||
@@ -1303,36 +1303,30 @@ struct BindUnwrapTraits {
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct BindUnwrapTraits<cef_internal::UnretainedWrapper<T>> {
|
||||
static T* Unwrap(const cef_internal::UnretainedWrapper<T>& o) {
|
||||
return o.get();
|
||||
}
|
||||
struct BindUnwrapTraits<internal::UnretainedWrapper<T>> {
|
||||
static T* Unwrap(const internal::UnretainedWrapper<T>& o) { return o.get(); }
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct BindUnwrapTraits<cef_internal::RetainedRefWrapper<T>> {
|
||||
static T* Unwrap(const cef_internal::RetainedRefWrapper<T>& o) {
|
||||
return o.get();
|
||||
}
|
||||
struct BindUnwrapTraits<internal::RetainedRefWrapper<T>> {
|
||||
static T* Unwrap(const internal::RetainedRefWrapper<T>& o) { return o.get(); }
|
||||
};
|
||||
|
||||
template <typename T, typename Deleter>
|
||||
struct BindUnwrapTraits<cef_internal::OwnedWrapper<T, Deleter>> {
|
||||
static T* Unwrap(const cef_internal::OwnedWrapper<T, Deleter>& o) {
|
||||
struct BindUnwrapTraits<internal::OwnedWrapper<T, Deleter>> {
|
||||
static T* Unwrap(const internal::OwnedWrapper<T, Deleter>& o) {
|
||||
return o.get();
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct BindUnwrapTraits<cef_internal::OwnedRefWrapper<T>> {
|
||||
static T& Unwrap(const cef_internal::OwnedRefWrapper<T>& o) {
|
||||
return o.get();
|
||||
}
|
||||
struct BindUnwrapTraits<internal::OwnedRefWrapper<T>> {
|
||||
static T& Unwrap(const internal::OwnedRefWrapper<T>& o) { return o.get(); }
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct BindUnwrapTraits<cef_internal::PassedWrapper<T>> {
|
||||
static T Unwrap(const cef_internal::PassedWrapper<T>& o) { return o.Take(); }
|
||||
struct BindUnwrapTraits<internal::PassedWrapper<T>> {
|
||||
static T Unwrap(const internal::PassedWrapper<T>& o) { return o.Take(); }
|
||||
};
|
||||
|
||||
#if defined(OS_WIN)
|
||||
@@ -1356,9 +1350,9 @@ template <typename Functor, typename... BoundArgs>
|
||||
struct CallbackCancellationTraits<
|
||||
Functor,
|
||||
std::tuple<BoundArgs...>,
|
||||
std::enable_if_t<cef_internal::IsWeakMethod<
|
||||
cef_internal::FunctorTraits<Functor>::is_method,
|
||||
BoundArgs...>::value>> {
|
||||
std::enable_if_t<
|
||||
internal::IsWeakMethod<internal::FunctorTraits<Functor>::is_method,
|
||||
BoundArgs...>::value>> {
|
||||
static constexpr bool is_cancellable = true;
|
||||
|
||||
template <typename Receiver, typename... Args>
|
||||
|
@@ -43,7 +43,7 @@ namespace base {
|
||||
|
||||
struct FakeBindState;
|
||||
|
||||
namespace cef_internal {
|
||||
namespace internal {
|
||||
|
||||
class BindStateBase;
|
||||
class FinallyExecutorCommon;
|
||||
@@ -269,7 +269,7 @@ struct ThenHelper<OriginalCallback<OriginalR(OriginalArgs...)>,
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace cef_internal
|
||||
} // namespace internal
|
||||
} // namespace base
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_INTERNAL_CEF_CALLBACK_INTERNAL_H_
|
||||
|
@@ -1,50 +0,0 @@
|
||||
// Copyright 2019 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// The following macros are used to declare both the color id enumerations and
|
||||
// the stringized names of the enumeration elements for use in dump_colors. To
|
||||
// stringize the element names, define STRINGIZE_COLOR_IDS prior to including
|
||||
// this file. This file is intended to be included just before and just after
|
||||
// the enumeration or string array declarations.
|
||||
|
||||
#if !defined(COLOR_ID_MACROS_DEFINED)
|
||||
#define COLOR_ID_MACROS_DEFINED
|
||||
#if defined(STRINGIZE_COLOR_IDS)
|
||||
// Convert first token to string, throw away the rest.
|
||||
#define D1(enum_name) #enum_name
|
||||
#define D2(enum_name, enum_value) #enum_name
|
||||
#else // defined(STRINGIZE_COLOR_IDS)
|
||||
// Declare enum with optional assigned value.
|
||||
#define D1(enum_name) enum_name
|
||||
#define D2(enum_name, enum_value) enum_name = enum_value
|
||||
#endif // defined(STRINGIZE_COLOR_IDS)
|
||||
// Select which token in the declaration is the assigned value.
|
||||
// Use first and optional third token, ignore optional second.
|
||||
#define E1(enum_name) D1(enum_name)
|
||||
#define E2(enum_name, old_enum_name) D1(enum_name)
|
||||
#define E3(enum_name, old_enum_name, enum_value) D2(enum_name, enum_value)
|
||||
#define GET_E(_1, _2, _3, macro_name, ...) macro_name
|
||||
#if defined(COMPILER_MSVC)
|
||||
// Workaround for MSVC not properly expanding __VA_ARGS__.
|
||||
#define EXPAND(x) x
|
||||
#define E_CPONLY(...) EXPAND(E(__VA_ARGS__))
|
||||
#define E(...) EXPAND(GET_E(__VA_ARGS__, E3, E2, E1)(__VA_ARGS__)),
|
||||
#else // !defined(COMPILER_MSVC)
|
||||
#define E_CPONLY(...) E(__VA_ARGS__)
|
||||
#define E(...) GET_E(__VA_ARGS__, E3, E2, E1)(__VA_ARGS__),
|
||||
#endif // !defined(COMPILER_MSVC)
|
||||
#else // !defined(COLOR_ID_MACROS_DEFINED)
|
||||
#undef D1
|
||||
#undef D2
|
||||
#undef E1
|
||||
#undef E2
|
||||
#undef E3
|
||||
#if defined(COMPILER_MSVC)
|
||||
#undef EXPAND
|
||||
#endif
|
||||
#undef E_CPONLY
|
||||
#undef GET_E
|
||||
#undef E
|
||||
#undef COLOR_ID_MACROS_DEFINED
|
||||
#endif // !defined(COLOR_ID_MACROS_DEFINED)
|
@@ -34,6 +34,8 @@
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#include "include/base/cef_template_util.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
|
||||
@@ -45,28 +47,28 @@ namespace base {
|
||||
|
||||
// This is a base internal implementation file used by task.h and callback.h.
|
||||
// Not for public consumption, so we wrap it in namespace internal.
|
||||
namespace cef_internal {
|
||||
namespace internal {
|
||||
|
||||
template <typename T, typename = void>
|
||||
struct IsRefCountedType : std::false_type {};
|
||||
|
||||
template <typename T>
|
||||
struct IsRefCountedType<T,
|
||||
std::void_t<decltype(std::declval<T*>()->AddRef()),
|
||||
decltype(std::declval<T*>()->Release())>>
|
||||
void_t<decltype(std::declval<T*>()->AddRef()),
|
||||
decltype(std::declval<T*>()->Release())>>
|
||||
: std::true_type {};
|
||||
|
||||
// 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.
|
||||
template <typename T>
|
||||
struct NeedsScopedRefptrButGetsRawPtr
|
||||
: std::conjunction<std::is_pointer<T>,
|
||||
IsRefCountedType<std::remove_pointer_t<T>>> {
|
||||
: conjunction<std::is_pointer<T>,
|
||||
IsRefCountedType<std::remove_pointer_t<T>>> {
|
||||
static_assert(!std::is_reference<T>::value,
|
||||
"NeedsScopedRefptrButGetsRawPtr requires non-reference type.");
|
||||
};
|
||||
|
||||
} // namespace cef_internal
|
||||
} // namespace internal
|
||||
|
||||
} // namespace base
|
||||
|
||||
|
@@ -38,14 +38,13 @@
|
||||
#include "include/base/cef_scoped_typeref_mac.h"
|
||||
|
||||
#if defined(__has_feature) && __has_feature(objc_arc)
|
||||
#error \
|
||||
"Cannot include include/base/internal/cef_scoped_block_mac.h in file built with ARC."
|
||||
#error "Cannot include include/base/internal/cef_scoped_block_mac.h in file built with ARC."
|
||||
#endif
|
||||
|
||||
namespace base {
|
||||
namespace mac {
|
||||
|
||||
namespace cef_internal {
|
||||
namespace internal {
|
||||
|
||||
template <typename B>
|
||||
struct ScopedBlockTraits {
|
||||
@@ -54,12 +53,12 @@ struct ScopedBlockTraits {
|
||||
static void Release(B block) { Block_release(block); }
|
||||
};
|
||||
|
||||
} // namespace cef_internal
|
||||
} // namespace internal
|
||||
|
||||
// ScopedBlock<> is patterned after ScopedCFTypeRef<>, but uses Block_copy() and
|
||||
// Block_release() instead of CFRetain() and CFRelease().
|
||||
template <typename B>
|
||||
using ScopedBlock = ScopedTypeRef<B, cef_internal::ScopedBlockTraits<B>>;
|
||||
using ScopedBlock = ScopedTypeRef<B, internal::ScopedBlockTraits<B>>;
|
||||
|
||||
} // namespace mac
|
||||
} // namespace base
|
||||
|
81
include/capi/cef_accessibility_handler_capi.h
Normal file
81
include/capi/cef_accessibility_handler_capi.h
Normal file
@@ -0,0 +1,81 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=6bdc0ce413420b45510fcc7f415c6a6fb05f0112$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_ACCESSIBILITY_HANDLER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_ACCESSIBILITY_HANDLER_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_values_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
///
|
||||
/// Implement this structure to receive accessibility notification when
|
||||
/// accessibility events have been registered. The functions of this structure
|
||||
/// will be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_accessibility_handler_t {
|
||||
///
|
||||
/// Base structure.
|
||||
///
|
||||
cef_base_ref_counted_t base;
|
||||
|
||||
///
|
||||
/// Called after renderer process sends accessibility tree changes to the
|
||||
/// browser process.
|
||||
///
|
||||
void(CEF_CALLBACK* on_accessibility_tree_change)(
|
||||
struct _cef_accessibility_handler_t* self,
|
||||
struct _cef_value_t* value);
|
||||
|
||||
///
|
||||
/// Called after renderer process sends accessibility location changes to the
|
||||
/// browser process.
|
||||
///
|
||||
void(CEF_CALLBACK* on_accessibility_location_change)(
|
||||
struct _cef_accessibility_handler_t* self,
|
||||
struct _cef_value_t* value);
|
||||
} cef_accessibility_handler_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_ACCESSIBILITY_HANDLER_CAPI_H_
|
190
include/capi/cef_app_capi.h
Normal file
190
include/capi/cef_app_capi.h
Normal file
@@ -0,0 +1,190 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=2f4bdc6adde5defdc86dbb5c998266d6372dd164$
|
||||
//
|
||||
|
||||
#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_ref_counted_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
|
||||
/// cef_settings_t.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
|
||||
/// cef_settings_t.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 cef_settings_t.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 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 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(void);
|
||||
|
||||
///
|
||||
/// Perform a single iteration of CEF message loop processing. This function is
|
||||
/// provided for cases where the CEF message loop must be integrated into an
|
||||
/// existing application message loop. Use of this function is not recommended
|
||||
/// for most users; use either the cef_run_message_loop() function or
|
||||
/// cef_settings_t.multi_threaded_message_loop if possible. When using this
|
||||
/// function care must be taken to balance performance against excessive CPU
|
||||
/// usage. It is recommended to enable the cef_settings_t.external_message_pump
|
||||
/// option when using this function so that
|
||||
/// cef_browser_process_handler_t::on_schedule_message_pump_work() callbacks can
|
||||
/// facilitate the scheduling process. This function should only be called on
|
||||
/// the main application thread and only if cef_initialize() is called with a
|
||||
/// cef_settings_t.multi_threaded_message_loop value of false (0). This function
|
||||
/// will not block.
|
||||
///
|
||||
CEF_EXPORT void cef_do_message_loop_work(void);
|
||||
|
||||
///
|
||||
/// 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
|
||||
/// cef_settings_t.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(void);
|
||||
|
||||
///
|
||||
/// 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(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_APP_CAPI_H_
|
121
include/capi/cef_audio_handler_capi.h
Normal file
121
include/capi/cef_audio_handler_capi.h
Normal file
@@ -0,0 +1,121 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=4e243df31e29bc6e473d56e371ed6328d948959c$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_AUDIO_HANDLER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_AUDIO_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 audio events.
|
||||
///
|
||||
typedef struct _cef_audio_handler_t {
|
||||
///
|
||||
/// Base structure.
|
||||
///
|
||||
cef_base_ref_counted_t base;
|
||||
|
||||
///
|
||||
/// Called on the UI thread to allow configuration of audio stream parameters.
|
||||
/// Return true (1) to proceed with audio stream capture, or false (0) to
|
||||
/// cancel it. All members of |params| can optionally be configured here, but
|
||||
/// they are also pre-filled with some sensible defaults.
|
||||
///
|
||||
int(CEF_CALLBACK* get_audio_parameters)(struct _cef_audio_handler_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
cef_audio_parameters_t* params);
|
||||
|
||||
///
|
||||
/// Called on a browser audio capture thread when the browser starts streaming
|
||||
/// audio. OnAudioStreamStopped will always be called after
|
||||
/// OnAudioStreamStarted; both functions may be called multiple times for the
|
||||
/// same browser. |params| contains the audio parameters like sample rate and
|
||||
/// channel layout. |channels| is the number of channels.
|
||||
///
|
||||
void(CEF_CALLBACK* on_audio_stream_started)(
|
||||
struct _cef_audio_handler_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
const cef_audio_parameters_t* params,
|
||||
int channels);
|
||||
|
||||
///
|
||||
/// Called on the audio stream thread when a PCM packet is received for the
|
||||
/// stream. |data| is an array representing the raw PCM data as a floating
|
||||
/// point type, i.e. 4-byte value(s). |frames| is the number of frames in the
|
||||
/// PCM packet. |pts| is the presentation timestamp (in milliseconds since the
|
||||
/// Unix Epoch) and represents the time at which the decompressed packet
|
||||
/// should be presented to the user. Based on |frames| and the
|
||||
/// |channel_layout| value passed to OnAudioStreamStarted you can calculate
|
||||
/// the size of the |data| array in bytes.
|
||||
///
|
||||
void(CEF_CALLBACK* on_audio_stream_packet)(struct _cef_audio_handler_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
const float** data,
|
||||
int frames,
|
||||
int64 pts);
|
||||
|
||||
///
|
||||
/// Called on the UI thread when the stream has stopped. OnAudioSteamStopped
|
||||
/// will always be called after OnAudioStreamStarted; both functions may be
|
||||
/// called multiple times for the same stream.
|
||||
///
|
||||
void(CEF_CALLBACK* on_audio_stream_stopped)(struct _cef_audio_handler_t* self,
|
||||
struct _cef_browser_t* browser);
|
||||
|
||||
///
|
||||
/// Called on the UI or audio stream thread when an error occurred. During the
|
||||
/// stream creation phase this callback will be called on the UI thread while
|
||||
/// in the capturing phase it will be called on the audio stream thread. The
|
||||
/// stream will be stopped immediately.
|
||||
///
|
||||
void(CEF_CALLBACK* on_audio_stream_error)(struct _cef_audio_handler_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
const cef_string_t* message);
|
||||
} cef_audio_handler_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_AUDIO_HANDLER_CAPI_H_
|
76
include/capi/cef_auth_callback_capi.h
Normal file
76
include/capi/cef_auth_callback_capi.h
Normal file
@@ -0,0 +1,76 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=c0704c0a87e8b57b20887be75700a30e887fee4f$
|
||||
//
|
||||
|
||||
#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_ref_counted_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_
|
@@ -44,54 +44,62 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
///
|
||||
/// All ref-counted framework structures must include this structure first.
|
||||
// All ref-counted framework structures must include this structure first.
|
||||
///
|
||||
typedef struct _cef_base_ref_counted_t {
|
||||
///
|
||||
/// Size of the data structure.
|
||||
// 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.
|
||||
// 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_ref_counted_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.
|
||||
// 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_ref_counted_t* self);
|
||||
|
||||
///
|
||||
/// Returns true (1) if the current reference count is 1.
|
||||
// Returns true (1) if the current reference count is 1.
|
||||
///
|
||||
int(CEF_CALLBACK* has_one_ref)(struct _cef_base_ref_counted_t* self);
|
||||
|
||||
///
|
||||
/// Returns true (1) if the current reference count is at least 1.
|
||||
// Returns true (1) if the current reference count is at least 1.
|
||||
///
|
||||
int(CEF_CALLBACK* has_at_least_one_ref)(struct _cef_base_ref_counted_t* self);
|
||||
} cef_base_ref_counted_t;
|
||||
|
||||
///
|
||||
/// All scoped framework structures must include this structure first.
|
||||
// All scoped framework structures must include this structure first.
|
||||
///
|
||||
typedef struct _cef_base_scoped_t {
|
||||
///
|
||||
/// Size of the data structure.
|
||||
// Size of the data structure.
|
||||
///
|
||||
size_t size;
|
||||
|
||||
///
|
||||
/// Called to delete this object. May be NULL if the object is not owned.
|
||||
// Called to delete this object. May be NULL if the object is not owned.
|
||||
///
|
||||
void(CEF_CALLBACK* del)(struct _cef_base_scoped_t* self);
|
||||
|
||||
} cef_base_scoped_t;
|
||||
|
||||
// Check that the structure |s|, which is defined with a size_t member at the
|
||||
// top, 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<size_t*>(s))
|
||||
|
||||
#define CEF_MEMBER_MISSING(s, f) (!CEF_MEMBER_EXISTS(s, f) || !((s)->f))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
952
include/capi/cef_browser_capi.h
Normal file
952
include/capi/cef_browser_capi.h
Normal file
@@ -0,0 +1,952 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=f8a604f73a04bec535d72ec7d05906da8c953b6b$
|
||||
//
|
||||
|
||||
#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_devtools_message_observer_capi.h"
|
||||
#include "include/capi/cef_drag_data_capi.h"
|
||||
#include "include/capi/cef_frame_capi.h"
|
||||
#include "include/capi/cef_image_capi.h"
|
||||
#include "include/capi/cef_navigation_entry_capi.h"
|
||||
#include "include/capi/cef_registration_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. 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_ref_counted_t base;
|
||||
|
||||
///
|
||||
/// True if this object is currently valid. This will return false (0) after
|
||||
/// cef_life_span_handler_t::OnBeforeClose is called.
|
||||
///
|
||||
int(CEF_CALLBACK* is_valid)(struct _cef_browser_t* self);
|
||||
|
||||
///
|
||||
/// 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. This value is
|
||||
/// also used as the tabId for extension APIs.
|
||||
///
|
||||
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 browser is a popup.
|
||||
///
|
||||
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. In the browser process
|
||||
/// this will return a valid object until after
|
||||
/// cef_life_span_handler_t::OnBeforeClose is called. In the renderer process
|
||||
/// this will return NULL if the main frame is hosted in a different renderer
|
||||
/// process (e.g. for cross-origin sub-frames). The main frame object will
|
||||
/// change during cross-origin navigation or re-navigation after renderer
|
||||
/// process termination (due to crashes, etc).
|
||||
///
|
||||
struct _cef_frame_t*(CEF_CALLBACK* get_main_frame)(
|
||||
struct _cef_browser_t* self);
|
||||
|
||||
///
|
||||
/// Returns the focused frame for the browser.
|
||||
///
|
||||
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);
|
||||
} 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_ref_counted_t base;
|
||||
|
||||
///
|
||||
/// Called asynchronously after the file dialog is dismissed. |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,
|
||||
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_ref_counted_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_ref_counted_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;
|
||||
|
||||
///
|
||||
/// Callback structure for cef_browser_host_t::DownloadImage. The functions of
|
||||
/// this structure will be called on the browser process UI thread.
|
||||
///
|
||||
typedef struct _cef_download_image_callback_t {
|
||||
///
|
||||
/// Base structure.
|
||||
///
|
||||
cef_base_ref_counted_t base;
|
||||
|
||||
///
|
||||
/// Method that will be executed when the image download has completed.
|
||||
/// |image_url| is the URL that was downloaded and |http_status_code| is the
|
||||
/// resulting HTTP status code. |image| is the resulting image, possibly at
|
||||
/// multiple scale factors, or NULL if the download failed.
|
||||
///
|
||||
void(CEF_CALLBACK* on_download_image_finished)(
|
||||
struct _cef_download_image_callback_t* self,
|
||||
const cef_string_t* image_url,
|
||||
int http_status_code,
|
||||
struct _cef_image_t* image);
|
||||
} cef_download_image_callback_t;
|
||||
|
||||
///
|
||||
/// Structure used to represent the browser process aspects of a browser. 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_ref_counted_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);
|
||||
|
||||
///
|
||||
/// Helper for closing a browser. Call this function from the top-level window
|
||||
/// close handler (if any). Internally this calls CloseBrowser(false (0)) if
|
||||
/// the close has not yet been initiated. This function returns false (0)
|
||||
/// while the close is pending and true (1) after the close has completed. See
|
||||
/// close_browser() and cef_life_span_handler_t::do_close() documentation for
|
||||
/// additional usage information. This function must be called on the browser
|
||||
/// process UI thread.
|
||||
///
|
||||
int(CEF_CALLBACK* try_close_browser)(struct _cef_browser_host_t* self);
|
||||
|
||||
///
|
||||
/// Set whether the browser is focused.
|
||||
///
|
||||
void(CEF_CALLBACK* set_focus)(struct _cef_browser_host_t* self, int focus);
|
||||
|
||||
///
|
||||
/// Retrieve the window handle (if any) for this browser. If this browser is
|
||||
/// wrapped in a cef_browser_view_t this function should be called on the
|
||||
/// browser process UI thread and it will return the handle for the top-level
|
||||
/// native window.
|
||||
///
|
||||
cef_window_handle_t(CEF_CALLBACK* get_window_handle)(
|
||||
struct _cef_browser_host_t* self);
|
||||
|
||||
///
|
||||
/// Retrieve the window handle (if any) of the browser that opened this
|
||||
/// browser. Will return NULL for non-popup browsers or if this browser is
|
||||
/// wrapped in a cef_browser_view_t. This function can be used in combination
|
||||
/// with custom handling of modal windows.
|
||||
///
|
||||
cef_window_handle_t(CEF_CALLBACK* get_opener_window_handle)(
|
||||
struct _cef_browser_host_t* self);
|
||||
|
||||
///
|
||||
/// Returns true (1) if this browser is wrapped in a cef_browser_view_t.
|
||||
///
|
||||
int(CEF_CALLBACK* has_view)(struct _cef_browser_host_t* self);
|
||||
|
||||
///
|
||||
/// Returns the client for this browser.
|
||||
///
|
||||
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"). |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,
|
||||
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);
|
||||
|
||||
///
|
||||
/// Download |image_url| and execute |callback| on completion with the images
|
||||
/// received from the renderer. If |is_favicon| is true (1) then cookies are
|
||||
/// not sent and not accepted during download. Images with density independent
|
||||
/// pixel (DIP) sizes larger than |max_image_size| are filtered out from the
|
||||
/// image results. Versions of the image at different scale factors may be
|
||||
/// downloaded up to the maximum scale factor supported by the system. If
|
||||
/// there are no image results <= |max_image_size| then the smallest image is
|
||||
/// resized to |max_image_size| and is the only result. A |max_image_size| of
|
||||
/// 0 means unlimited. If |bypass_cache| is true (1) then |image_url| is
|
||||
/// requested from the server even if it is present in the browser cache.
|
||||
///
|
||||
void(CEF_CALLBACK* download_image)(
|
||||
struct _cef_browser_host_t* self,
|
||||
const cef_string_t* image_url,
|
||||
int is_favicon,
|
||||
uint32 max_image_size,
|
||||
int bypass_cache,
|
||||
struct _cef_download_image_callback_t* callback);
|
||||
|
||||
///
|
||||
/// Print the current browser contents.
|
||||
///
|
||||
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|. |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 search will be restarted if |searchText| or
|
||||
/// |matchCase| change. The search will be stopped if |searchText| is NULL.
|
||||
/// 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,
|
||||
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 (DevTools) in its own browser. The DevTools browser
|
||||
/// will remain associated with this browser. If the DevTools browser is
|
||||
/// already open then it will be focused, in which case the |windowInfo|,
|
||||
/// |client| and |settings| parameters will be ignored. If
|
||||
/// |inspect_element_at| is non-NULL then the element at the specified (x,y)
|
||||
/// location will be inspected. The |windowInfo| parameter will be ignored if
|
||||
/// this browser is wrapped in a cef_browser_view_t.
|
||||
///
|
||||
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 associated DevTools browser, if any.
|
||||
///
|
||||
void(CEF_CALLBACK* close_dev_tools)(struct _cef_browser_host_t* self);
|
||||
|
||||
///
|
||||
/// Returns true (1) if this browser currently has an associated DevTools
|
||||
/// browser. Must be called on the browser process UI thread.
|
||||
///
|
||||
int(CEF_CALLBACK* has_dev_tools)(struct _cef_browser_host_t* self);
|
||||
|
||||
///
|
||||
/// Send a function call message over the DevTools protocol. |message| must be
|
||||
/// a UTF8-encoded JSON dictionary that contains "id" (int), "function"
|
||||
/// (string) and "params" (dictionary, optional) values. See the DevTools
|
||||
/// protocol documentation at https://chromedevtools.github.io/devtools-
|
||||
/// protocol/ for details of supported functions and the expected "params"
|
||||
/// dictionary contents. |message| will be copied if necessary. This function
|
||||
/// will return true (1) if called on the UI thread and the message was
|
||||
/// successfully submitted for validation, otherwise false (0). Validation
|
||||
/// will be applied asynchronously and any messages that fail due to
|
||||
/// formatting errors or missing parameters may be discarded without
|
||||
/// notification. Prefer ExecuteDevToolsMethod if a more structured approach
|
||||
/// to message formatting is desired.
|
||||
///
|
||||
/// Every valid function call will result in an asynchronous function result
|
||||
/// or error message that references the sent message "id". Event messages are
|
||||
/// received while notifications are enabled (for example, between function
|
||||
/// calls for "Page.enable" and "Page.disable"). All received messages will be
|
||||
/// delivered to the observer(s) registered with AddDevToolsMessageObserver.
|
||||
/// See cef_dev_tools_message_observer_t::OnDevToolsMessage documentation for
|
||||
/// details of received message contents.
|
||||
///
|
||||
/// Usage of the SendDevToolsMessage, ExecuteDevToolsMethod and
|
||||
/// AddDevToolsMessageObserver functions does not require an active DevTools
|
||||
/// front-end or remote-debugging session. Other active DevTools sessions will
|
||||
/// continue to function independently. However, any modification of global
|
||||
/// browser state by one session may not be reflected in the UI of other
|
||||
/// sessions.
|
||||
///
|
||||
/// Communication with the DevTools front-end (when displayed) can be logged
|
||||
/// for development purposes by passing the `--devtools-protocol-log-
|
||||
/// file=<path>` command-line flag.
|
||||
///
|
||||
int(CEF_CALLBACK* send_dev_tools_message)(struct _cef_browser_host_t* self,
|
||||
const void* message,
|
||||
size_t message_size);
|
||||
|
||||
///
|
||||
/// Execute a function call over the DevTools protocol. This is a more
|
||||
/// structured version of SendDevToolsMessage. |message_id| is an incremental
|
||||
/// number that uniquely identifies the message (pass 0 to have the next
|
||||
/// number assigned automatically based on previous values). |function| is the
|
||||
/// function name. |params| are the function parameters, which may be NULL.
|
||||
/// See the DevTools protocol documentation (linked above) for details of
|
||||
/// supported functions and the expected |params| dictionary contents. This
|
||||
/// function will return the assigned message ID if called on the UI thread
|
||||
/// and the message was successfully submitted for validation, otherwise 0.
|
||||
/// See the SendDevToolsMessage documentation for additional usage
|
||||
/// information.
|
||||
///
|
||||
int(CEF_CALLBACK* execute_dev_tools_method)(
|
||||
struct _cef_browser_host_t* self,
|
||||
int message_id,
|
||||
const cef_string_t* method,
|
||||
struct _cef_dictionary_value_t* params);
|
||||
|
||||
///
|
||||
/// Add an observer for DevTools protocol messages (function results and
|
||||
/// events). The observer will remain registered until the returned
|
||||
/// Registration object is destroyed. See the SendDevToolsMessage
|
||||
/// documentation for additional usage information.
|
||||
///
|
||||
struct _cef_registration_t*(CEF_CALLBACK* add_dev_tools_message_observer)(
|
||||
struct _cef_browser_host_t* self,
|
||||
struct _cef_dev_tools_message_observer_t* observer);
|
||||
|
||||
///
|
||||
/// 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);
|
||||
|
||||
///
|
||||
/// 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);
|
||||
|
||||
///
|
||||
/// Issue a BeginFrame request to Chromium. Only valid when
|
||||
/// cef_window_tInfo::external_begin_frame_enabled is set to true (1).
|
||||
///
|
||||
void(CEF_CALLBACK* send_external_begin_frame)(
|
||||
struct _cef_browser_host_t* self);
|
||||
|
||||
///
|
||||
/// Send a key event to the browser.
|
||||
///
|
||||
void(CEF_CALLBACK* send_key_event)(struct _cef_browser_host_t* self,
|
||||
const 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 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 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 cef_mouse_event_t* event,
|
||||
int deltaX,
|
||||
int deltaY);
|
||||
|
||||
///
|
||||
/// Send a touch event to the browser for a windowless browser.
|
||||
///
|
||||
void(CEF_CALLBACK* send_touch_event)(struct _cef_browser_host_t* self,
|
||||
const cef_touch_event_t* event);
|
||||
|
||||
///
|
||||
/// 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);
|
||||
|
||||
///
|
||||
/// Begins a new composition or updates the existing composition. Blink has a
|
||||
/// special node (a composition node) that allows the input function to change
|
||||
/// text without affecting other DOM nodes. |text| is the optional text that
|
||||
/// will be inserted into the composition node. |underlines| is an optional
|
||||
/// set of ranges that will be underlined in the resulting text.
|
||||
/// |replacement_range| is an optional range of the existing text that will be
|
||||
/// replaced. |selection_range| is an optional range of the resulting text
|
||||
/// that will be selected after insertion or replacement. The
|
||||
/// |replacement_range| value is only used on OS X.
|
||||
///
|
||||
/// This function may be called multiple times as the composition changes.
|
||||
/// When the client is done making changes the composition should either be
|
||||
/// canceled or completed. To cancel the composition call
|
||||
/// ImeCancelComposition. To complete the composition call either
|
||||
/// ImeCommitText or ImeFinishComposingText. Completion is usually signaled
|
||||
/// when:
|
||||
///
|
||||
/// 1. The client receives a WM_IME_COMPOSITION message with a GCS_RESULTSTR
|
||||
/// flag (on Windows), or;
|
||||
/// 2. The client receives a "commit" signal of GtkIMContext (on Linux), or;
|
||||
/// 3. insertText of NSTextInput is called (on Mac).
|
||||
///
|
||||
/// This function is only used when window rendering is disabled.
|
||||
///
|
||||
void(CEF_CALLBACK* ime_set_composition)(
|
||||
struct _cef_browser_host_t* self,
|
||||
const cef_string_t* text,
|
||||
size_t underlinesCount,
|
||||
cef_composition_underline_t const* underlines,
|
||||
const cef_range_t* replacement_range,
|
||||
const cef_range_t* selection_range);
|
||||
|
||||
///
|
||||
/// Completes the existing composition by optionally inserting the specified
|
||||
/// |text| into the composition node. |replacement_range| is an optional range
|
||||
/// of the existing text that will be replaced. |relative_cursor_pos| is where
|
||||
/// the cursor will be positioned relative to the current cursor position. See
|
||||
/// comments on ImeSetComposition for usage. The |replacement_range| and
|
||||
/// |relative_cursor_pos| values are only used on OS X. This function is only
|
||||
/// used when window rendering is disabled.
|
||||
///
|
||||
void(CEF_CALLBACK* ime_commit_text)(struct _cef_browser_host_t* self,
|
||||
const cef_string_t* text,
|
||||
const cef_range_t* replacement_range,
|
||||
int relative_cursor_pos);
|
||||
|
||||
///
|
||||
/// Completes the existing composition by applying the current composition
|
||||
/// node contents. If |keep_selection| is false (0) the current selection, if
|
||||
/// any, will be discarded. See comments on ImeSetComposition for usage. This
|
||||
/// function is only used when window rendering is disabled.
|
||||
///
|
||||
void(CEF_CALLBACK* ime_finish_composing_text)(
|
||||
struct _cef_browser_host_t* self,
|
||||
int keep_selection);
|
||||
|
||||
///
|
||||
/// Cancels the existing composition and discards the composition node
|
||||
/// contents without applying them. See comments on ImeSetComposition for
|
||||
/// usage. This function is only used when window rendering is disabled.
|
||||
///
|
||||
void(CEF_CALLBACK* ime_cancel_composition)(struct _cef_browser_host_t* self);
|
||||
|
||||
///
|
||||
/// 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 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 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 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);
|
||||
|
||||
///
|
||||
/// Returns the current visible navigation entry for this browser. This
|
||||
/// function can only be called on the UI thread.
|
||||
///
|
||||
struct _cef_navigation_entry_t*(CEF_CALLBACK* get_visible_navigation_entry)(
|
||||
struct _cef_browser_host_t* self);
|
||||
|
||||
///
|
||||
/// Set accessibility state for all frames. |accessibility_state| may be
|
||||
/// default, enabled or disabled. If |accessibility_state| is STATE_DEFAULT
|
||||
/// then accessibility will be disabled by default and the state may be
|
||||
/// further controlled with the "force-renderer-accessibility" and "disable-
|
||||
/// renderer-accessibility" command-line switches. If |accessibility_state| is
|
||||
/// STATE_ENABLED then accessibility will be enabled. If |accessibility_state|
|
||||
/// is STATE_DISABLED then accessibility will be completely disabled.
|
||||
///
|
||||
/// For windowed browsers accessibility will be enabled in Complete mode
|
||||
/// (which corresponds to kAccessibilityModeComplete in Chromium). In this
|
||||
/// mode all platform accessibility objects will be created and managed by
|
||||
/// Chromium's internal implementation. The client needs only to detect the
|
||||
/// screen reader and call this function appropriately. For example, on macOS
|
||||
/// the client can handle the @"AXEnhancedUserStructure" accessibility
|
||||
/// attribute to detect VoiceOver state changes and on Windows the client can
|
||||
/// handle WM_GETOBJECT with OBJID_CLIENT to detect accessibility readers.
|
||||
///
|
||||
/// For windowless browsers accessibility will be enabled in TreeOnly mode
|
||||
/// (which corresponds to kAccessibilityModeWebContentsOnly in Chromium). In
|
||||
/// this mode renderer accessibility is enabled, the full tree is computed,
|
||||
/// and events are passed to CefAccessibiltyHandler, but platform
|
||||
/// accessibility objects are not created. The client may implement platform
|
||||
/// accessibility objects using CefAccessibiltyHandler callbacks if desired.
|
||||
///
|
||||
void(CEF_CALLBACK* set_accessibility_state)(struct _cef_browser_host_t* self,
|
||||
cef_state_t accessibility_state);
|
||||
|
||||
///
|
||||
/// Enable notifications of auto resize via
|
||||
/// cef_display_handler_t::OnAutoResize. Notifications are disabled by
|
||||
/// default. |min_size| and |max_size| define the range of allowed sizes.
|
||||
///
|
||||
void(CEF_CALLBACK* set_auto_resize_enabled)(struct _cef_browser_host_t* self,
|
||||
int enabled,
|
||||
const cef_size_t* min_size,
|
||||
const cef_size_t* max_size);
|
||||
|
||||
///
|
||||
/// Returns the extension hosted in this browser or NULL if no extension is
|
||||
/// hosted. See cef_request_context_t::LoadExtension for details.
|
||||
///
|
||||
struct _cef_extension_t*(CEF_CALLBACK* get_extension)(
|
||||
struct _cef_browser_host_t* self);
|
||||
|
||||
///
|
||||
/// Returns true (1) if this browser is hosting an extension background
|
||||
/// script. Background hosts do not have a window and are not displayable. See
|
||||
/// cef_request_context_t::LoadExtension for details.
|
||||
///
|
||||
int(CEF_CALLBACK* is_background_host)(struct _cef_browser_host_t* self);
|
||||
|
||||
///
|
||||
/// Set whether the browser's audio is muted.
|
||||
///
|
||||
void(CEF_CALLBACK* set_audio_muted)(struct _cef_browser_host_t* self,
|
||||
int mute);
|
||||
|
||||
///
|
||||
/// Returns true (1) if the browser's audio is muted. This function can only
|
||||
/// be called on the UI thread.
|
||||
///
|
||||
int(CEF_CALLBACK* is_audio_muted)(struct _cef_browser_host_t* self);
|
||||
} cef_browser_host_t;
|
||||
|
||||
///
|
||||
/// Create a new browser using the window parameters specified by |windowInfo|.
|
||||
/// All values will be copied internally and the actual window (if any) 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. The optional |extra_info| parameter provides an
|
||||
/// opportunity to specify extra information specific to the created browser
|
||||
/// that will be passed to cef_render_process_handler_t::on_browser_created() in
|
||||
/// the render process.
|
||||
///
|
||||
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_dictionary_value_t* extra_info,
|
||||
struct _cef_request_context_t* request_context);
|
||||
|
||||
///
|
||||
/// Create a new browser 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. The optional
|
||||
/// |extra_info| parameter provides an opportunity to specify extra information
|
||||
/// specific to the created browser that will be passed to
|
||||
/// cef_render_process_handler_t::on_browser_created() in the render process.
|
||||
///
|
||||
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_dictionary_value_t* extra_info,
|
||||
struct _cef_request_context_t* request_context);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_BROWSER_CAPI_H_
|
141
include/capi/cef_browser_process_handler_capi.h
Normal file
141
include/capi/cef_browser_process_handler_capi.h
Normal file
@@ -0,0 +1,141 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=a4d3026623111f1ba226d1579c6b03de3b924457$
|
||||
//
|
||||
|
||||
#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_client_capi.h"
|
||||
#include "include/capi/cef_command_line_capi.h"
|
||||
#include "include/capi/cef_preference_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_ref_counted_t base;
|
||||
|
||||
///
|
||||
/// Provides an opportunity to register custom preferences prior to global and
|
||||
/// request context initialization.
|
||||
///
|
||||
/// If |type| is CEF_PREFERENCES_TYPE_GLOBAL the registered preferences can be
|
||||
/// accessed via cef_preference_manager_t::GetGlobalPreferences after
|
||||
/// OnContextInitialized is called. Global preferences are registered a single
|
||||
/// time at application startup. See related cef_settings_t.cache_path and
|
||||
/// cef_settings_t.persist_user_preferences configuration.
|
||||
///
|
||||
/// If |type| is CEF_PREFERENCES_TYPE_REQUEST_CONTEXT the preferences can be
|
||||
/// accessed via the cef_request_context_t after
|
||||
/// cef_request_context_handler_t::OnRequestContextInitialized is called.
|
||||
/// Request context preferences are registered each time a new
|
||||
/// cef_request_context_t is created. It is intended but not required that all
|
||||
/// request contexts have the same registered preferences. See related
|
||||
/// cef_request_context_settings_t.cache_path and
|
||||
/// cef_request_context_settings_t.persist_user_preferences configuration.
|
||||
///
|
||||
/// Do not keep a reference to the |registrar| object. This function is called
|
||||
/// on the browser process UI thread.
|
||||
///
|
||||
void(CEF_CALLBACK* on_register_custom_preferences)(
|
||||
struct _cef_browser_process_handler_t* self,
|
||||
cef_preferences_type_t type,
|
||||
struct _cef_preference_registrar_t* registrar);
|
||||
|
||||
///
|
||||
/// 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 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 from any thread when work has been scheduled for the browser
|
||||
/// process main (UI) thread. This callback is used in combination with
|
||||
/// cef_settings_t.external_message_pump and cef_do_message_loop_work() in
|
||||
/// cases where the CEF message loop must be integrated into an existing
|
||||
/// application message loop (see additional comments and warnings on
|
||||
/// CefDoMessageLoopWork). This callback should schedule a
|
||||
/// cef_do_message_loop_work() call to happen on the main (UI) thread.
|
||||
/// |delay_ms| is the requested delay in milliseconds. If |delay_ms| is <= 0
|
||||
/// then the call should happen reasonably soon. If |delay_ms| is > 0 then the
|
||||
/// call should be scheduled to happen after the specified delay and any
|
||||
/// currently pending scheduled call should be cancelled.
|
||||
///
|
||||
void(CEF_CALLBACK* on_schedule_message_pump_work)(
|
||||
struct _cef_browser_process_handler_t* self,
|
||||
int64 delay_ms);
|
||||
|
||||
///
|
||||
/// Return the default client for use with a newly created browser window. If
|
||||
/// null is returned the browser will be unmanaged (no callbacks will be
|
||||
/// executed for that browser) and application shutdown will be blocked until
|
||||
/// the browser window is closed manually. This function is currently only
|
||||
/// used with the chrome runtime.
|
||||
///
|
||||
struct _cef_client_t*(CEF_CALLBACK* get_default_client)(
|
||||
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_
|
88
include/capi/cef_callback_capi.h
Normal file
88
include/capi/cef_callback_capi.h
Normal file
@@ -0,0 +1,88 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=1bb026d01d1d4bb38ceb4c54f6bcf70300bf5201$
|
||||
//
|
||||
|
||||
#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_ref_counted_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_ref_counted_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_
|
210
include/capi/cef_client_capi.h
Normal file
210
include/capi/cef_client_capi.h
Normal file
@@ -0,0 +1,210 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=93f1c39c102dc97d6ad8d236a90a2e0e88f10fb7$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_audio_handler_capi.h"
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
#include "include/capi/cef_command_handler_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_frame_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_permission_handler_capi.h"
|
||||
#include "include/capi/cef_print_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_ref_counted_t base;
|
||||
|
||||
///
|
||||
/// Return the handler for audio rendering events.
|
||||
///
|
||||
struct _cef_audio_handler_t*(CEF_CALLBACK* get_audio_handler)(
|
||||
struct _cef_client_t* self);
|
||||
|
||||
///
|
||||
/// Return the handler for commands. If no handler is provided the default
|
||||
/// implementation will be used.
|
||||
///
|
||||
struct _cef_command_handler_t*(CEF_CALLBACK* get_command_handler)(
|
||||
struct _cef_client_t* self);
|
||||
|
||||
///
|
||||
/// 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 events related to cef_frame_t lifespan. This
|
||||
/// function will be called once during cef_browser_t creation and the result
|
||||
/// will be cached for performance reasons.
|
||||
///
|
||||
struct _cef_frame_handler_t*(CEF_CALLBACK* get_frame_handler)(
|
||||
struct _cef_client_t* self);
|
||||
|
||||
///
|
||||
/// Return the handler for permission requests.
|
||||
///
|
||||
struct _cef_permission_handler_t*(CEF_CALLBACK* get_permission_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 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_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. It is safe to
|
||||
/// keep a reference to |message| outside of this callback.
|
||||
///
|
||||
int(CEF_CALLBACK* on_process_message_received)(
|
||||
struct _cef_client_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
struct _cef_frame_t* frame,
|
||||
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_
|
80
include/capi/cef_command_handler_capi.h
Normal file
80
include/capi/cef_command_handler_capi.h
Normal file
@@ -0,0 +1,80 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=ec05ae57537091e3543c4b31d72d2d84d44df876$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_COMMAND_HANDLER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_COMMAND_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 commands. The functions
|
||||
/// of this structure will be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_command_handler_t {
|
||||
///
|
||||
/// Base structure.
|
||||
///
|
||||
cef_base_ref_counted_t base;
|
||||
|
||||
///
|
||||
/// Called to execute a Chrome command triggered via menu selection or
|
||||
/// keyboard shortcut. Values for |command_id| can be found in the
|
||||
/// cef_command_ids.h file. |disposition| provides information about the
|
||||
/// intended command target. Return true (1) if the command was handled or
|
||||
/// false (0) for the default implementation. For context menu commands this
|
||||
/// will be called after cef_context_menu_handler_t::OnContextMenuCommand.
|
||||
/// Only used with the Chrome runtime.
|
||||
///
|
||||
int(CEF_CALLBACK* on_chrome_command)(
|
||||
struct _cef_command_handler_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
int command_id,
|
||||
cef_window_open_disposition_t disposition);
|
||||
} cef_command_handler_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_COMMAND_HANDLER_CAPI_H_
|
215
include/capi/cef_command_line_capi.h
Normal file
215
include/capi/cef_command_line_capi.h
Normal file
@@ -0,0 +1,215 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=f535e9560b9fde9b53fc4d8383905105ed029ea4$
|
||||
//
|
||||
|
||||
#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 should be lowercase ASCII and will be converted to
|
||||
/// such if necessary. Switch values will retain the original case and UTF8
|
||||
/// encoding. This structure can be used before cef_initialize() is called.
|
||||
///
|
||||
typedef struct _cef_command_line_t {
|
||||
///
|
||||
/// Base structure.
|
||||
///
|
||||
cef_base_ref_counted_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(void);
|
||||
|
||||
///
|
||||
/// 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(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_COMMAND_LINE_CAPI_H_
|
367
include/capi/cef_context_menu_handler_capi.h
Normal file
367
include/capi/cef_context_menu_handler_capi.h
Normal file
@@ -0,0 +1,367 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=0ae549ed35e30afcbb01961fe55455beaadcd7f9$
|
||||
//
|
||||
|
||||
#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_ref_counted_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;
|
||||
|
||||
///
|
||||
/// Callback structure used for continuation of custom quick menu display.
|
||||
///
|
||||
typedef struct _cef_run_quick_menu_callback_t {
|
||||
///
|
||||
/// Base structure.
|
||||
///
|
||||
cef_base_ref_counted_t base;
|
||||
|
||||
///
|
||||
/// Complete quick menu display by selecting the specified |command_id| and
|
||||
/// |event_flags|.
|
||||
///
|
||||
void(CEF_CALLBACK* cont)(struct _cef_run_quick_menu_callback_t* self,
|
||||
int command_id,
|
||||
cef_event_flags_t event_flags);
|
||||
|
||||
///
|
||||
/// Cancel quick menu display.
|
||||
///
|
||||
void(CEF_CALLBACK* cancel)(struct _cef_run_quick_menu_callback_t* self);
|
||||
} cef_run_quick_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_ref_counted_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 canceled 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);
|
||||
|
||||
///
|
||||
/// Called to allow custom display of the quick menu for a windowless browser.
|
||||
/// |location| is the top left corner of the selected region. |size| is the
|
||||
/// size of the selected region. |edit_state_flags| is a combination of flags
|
||||
/// that represent the state of the quick menu. Return true (1) if the menu
|
||||
/// will be handled and execute |callback| either synchronously or
|
||||
/// asynchronously with the selected command ID. Return false (0) to cancel
|
||||
/// the menu.
|
||||
///
|
||||
int(CEF_CALLBACK* run_quick_menu)(
|
||||
struct _cef_context_menu_handler_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
struct _cef_frame_t* frame,
|
||||
const cef_point_t* location,
|
||||
const cef_size_t* size,
|
||||
cef_quick_menu_edit_state_flags_t edit_state_flags,
|
||||
struct _cef_run_quick_menu_callback_t* callback);
|
||||
|
||||
///
|
||||
/// Called to execute a command selected from the quick menu for a windowless
|
||||
/// browser. Return true (1) if the command was handled or false (0) for the
|
||||
/// default implementation. See cef_menu_id_t for command IDs that have
|
||||
/// default implementations.
|
||||
///
|
||||
int(CEF_CALLBACK* on_quick_menu_command)(
|
||||
struct _cef_context_menu_handler_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
struct _cef_frame_t* frame,
|
||||
int command_id,
|
||||
cef_event_flags_t event_flags);
|
||||
|
||||
///
|
||||
/// Called when the quick menu for a windowless browser is dismissed
|
||||
/// irregardless of whether the menu was canceled or a command was selected.
|
||||
///
|
||||
void(CEF_CALLBACK* on_quick_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 functions of this
|
||||
/// structure can only be accessed on browser process the UI thread.
|
||||
///
|
||||
typedef struct _cef_context_menu_params_t {
|
||||
///
|
||||
/// Base structure.
|
||||
///
|
||||
cef_base_ref_counted_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 title text or the alt text if the context menu was invoked on
|
||||
/// an image.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t(CEF_CALLBACK* get_title_text)(
|
||||
struct _cef_context_menu_params_t* self);
|
||||
|
||||
///
|
||||
/// Returns the URL of the top level page that the context menu was invoked
|
||||
/// on.
|
||||
///
|
||||
// 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.
|
||||
///
|
||||
int(CEF_CALLBACK* is_custom_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_
|
199
include/capi/cef_cookie_capi.h
Normal file
199
include/capi/cef_cookie_capi.h
Normal file
@@ -0,0 +1,199 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=37b5e115ff7abd1df1b9913404b69505fb9fef29$
|
||||
//
|
||||
|
||||
#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_ref_counted_t base;
|
||||
|
||||
///
|
||||
/// Visit all cookies on the UI 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 UI 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 UI 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 UI 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);
|
||||
|
||||
///
|
||||
/// Flush the backing store (if any) to disk. If |callback| is non-NULL it
|
||||
/// will be executed asnychronously on the UI 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
|
||||
/// cef_settings_t.cache_path if specified or in memory otherwise. If |callback|
|
||||
/// is non-NULL it will be executed asnychronously on the UI thread after the
|
||||
/// manager's storage has been initialized. Using this function is equivalent to
|
||||
/// calling cef_request_context_t::cef_request_context_get_global_context()->Get
|
||||
/// DefaultCookieManager().
|
||||
///
|
||||
CEF_EXPORT cef_cookie_manager_t* cef_cookie_manager_get_global_manager(
|
||||
struct _cef_completion_callback_t* callback);
|
||||
|
||||
///
|
||||
/// Structure to implement for visiting cookie values. The functions of this
|
||||
/// structure will always be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_cookie_visitor_t {
|
||||
///
|
||||
/// Base structure.
|
||||
///
|
||||
cef_base_ref_counted_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_ref_counted_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_ref_counted_t base;
|
||||
|
||||
///
|
||||
/// Method that will be called upon completion. |num_deleted| will be the
|
||||
/// number of cookies that were deleted.
|
||||
///
|
||||
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_
|
154
include/capi/cef_crash_util_capi.h
Normal file
154
include/capi/cef_crash_util_capi.h
Normal file
@@ -0,0 +1,154 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=1ce19c3213f033ca9059da738102b9b4292d4a06$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_CRASH_UTIL_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_CRASH_UTIL_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
///
|
||||
/// Crash reporting is configured using an INI-style config file named
|
||||
/// "crash_reporter.cfg". On Windows and Linux this file must be placed next to
|
||||
/// the main application executable. On macOS this file must be placed in the
|
||||
/// top-level app bundle Resources directory (e.g.
|
||||
/// "<appname>.app/Contents/Resources"). File contents are as follows:
|
||||
///
|
||||
/// <pre>
|
||||
/// # Comments start with a hash character and must be on their own line.
|
||||
///
|
||||
/// [Config]
|
||||
/// ProductName=<Value of the "prod" crash key; defaults to "cef">
|
||||
/// ProductVersion=<Value of the "ver" crash key; defaults to the CEF version>
|
||||
/// AppName=<Windows only; App-specific folder name component for storing crash
|
||||
/// information; default to "CEF">
|
||||
/// ExternalHandler=<Windows only; Name of the external handler exe to use
|
||||
/// instead of re-launching the main exe; default to empty>
|
||||
/// BrowserCrashForwardingEnabled=<macOS only; True if browser process crashes
|
||||
/// should be forwarded to the system crash
|
||||
/// reporter; default to false>
|
||||
/// ServerURL=<crash server URL; default to empty>
|
||||
/// RateLimitEnabled=<True if uploads should be rate limited; default to true>
|
||||
/// MaxUploadsPerDay=<Max uploads per 24 hours, used if rate limit is enabled;
|
||||
/// default to 5>
|
||||
/// MaxDatabaseSizeInMb=<Total crash report disk usage greater than this value
|
||||
/// will cause older reports to be deleted; default to 20>
|
||||
/// MaxDatabaseAgeInDays=<Crash reports older than this value will be deleted;
|
||||
/// default to 5>
|
||||
///
|
||||
/// [CrashKeys]
|
||||
/// my_key1=<small|medium|large>
|
||||
/// my_key2=<small|medium|large>
|
||||
/// </pre>
|
||||
///
|
||||
/// <b>Config section:</b>
|
||||
///
|
||||
/// If "ProductName" and/or "ProductVersion" are set then the specified values
|
||||
/// will be included in the crash dump metadata. On macOS if these values are
|
||||
/// set to NULL then they will be retrieved from the Info.plist file using the
|
||||
/// "CFBundleName" and "CFBundleShortVersionString" keys respectively.
|
||||
///
|
||||
/// If "AppName" is set on Windows then crash report information (metrics,
|
||||
/// database and dumps) will be stored locally on disk under the
|
||||
/// "C:\Users\[CurrentUser]\AppData\Local\[AppName]\User Data" folder. On other
|
||||
/// platforms the cef_settings_t.user_data_path value will be used.
|
||||
///
|
||||
/// If "ExternalHandler" is set on Windows then the specified exe will be
|
||||
/// launched as the crashpad-handler instead of re-launching the main process
|
||||
/// exe. The value can be an absolute path or a path relative to the main exe
|
||||
/// directory. On Linux the cef_settings_t.browser_subprocess_path value will be
|
||||
/// used. On macOS the existing subprocess app bundle will be used.
|
||||
///
|
||||
/// If "BrowserCrashForwardingEnabled" is set to true (1) on macOS then browser
|
||||
/// process crashes will be forwarded to the system crash reporter. This results
|
||||
/// in the crash UI dialog being displayed to the user and crash reports being
|
||||
/// logged under "~/Library/Logs/DiagnosticReports". Forwarding of crash reports
|
||||
/// from non-browser processes and Debug builds is always disabled.
|
||||
///
|
||||
/// If "ServerURL" is set then crashes will be uploaded as a multi-part POST
|
||||
/// request to the specified URL. Otherwise, reports will only be stored locally
|
||||
/// on disk.
|
||||
///
|
||||
/// If "RateLimitEnabled" is set to true (1) then crash report uploads will be
|
||||
/// rate limited as follows:
|
||||
/// 1. If "MaxUploadsPerDay" is set to a positive value then at most the
|
||||
/// specified number of crashes will be uploaded in each 24 hour period.
|
||||
/// 2. If crash upload fails due to a network or server error then an
|
||||
/// incremental backoff delay up to a maximum of 24 hours will be applied
|
||||
/// for retries.
|
||||
/// 3. If a backoff delay is applied and "MaxUploadsPerDay" is > 1 then the
|
||||
/// "MaxUploadsPerDay" value will be reduced to 1 until the client is
|
||||
/// restarted. This helps to avoid an upload flood when the network or
|
||||
/// server error is resolved.
|
||||
/// Rate limiting is not supported on Linux.
|
||||
///
|
||||
/// If "MaxDatabaseSizeInMb" is set to a positive value then crash report
|
||||
/// storage on disk will be limited to that size in megabytes. For example, on
|
||||
/// Windows each dump is about 600KB so a "MaxDatabaseSizeInMb" value of 20
|
||||
/// equates to about 34 crash reports stored on disk. Not supported on Linux.
|
||||
///
|
||||
/// If "MaxDatabaseAgeInDays" is set to a positive value then crash reports
|
||||
/// older than the specified age in days will be deleted. Not supported on
|
||||
/// Linux.
|
||||
///
|
||||
/// <b>CrashKeys section:</b>
|
||||
///
|
||||
/// A maximum of 26 crash keys of each size can be specified for use by the
|
||||
/// application. Crash key values will be truncated based on the specified size
|
||||
/// (small = 64 bytes, medium = 256 bytes, large = 1024 bytes). The value of
|
||||
/// crash keys can be set from any thread or process using the
|
||||
/// CefSetCrashKeyValue function. These key/value pairs will be sent to the
|
||||
/// crash server along with the crash dump file.
|
||||
///
|
||||
CEF_EXPORT int cef_crash_reporting_enabled(void);
|
||||
|
||||
///
|
||||
/// Sets or clears a specific key-value pair from the crash metadata.
|
||||
///
|
||||
CEF_EXPORT void cef_set_crash_key_value(const cef_string_t* key,
|
||||
const cef_string_t* value);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_CRASH_UTIL_CAPI_H_
|
148
include/capi/cef_devtools_message_observer_capi.h
Normal file
148
include/capi/cef_devtools_message_observer_capi.h
Normal file
@@ -0,0 +1,148 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=076a01db2fc4241efeb46c5f247a9737fd828f9b$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_DEVTOOLS_MESSAGE_OBSERVER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_DEVTOOLS_MESSAGE_OBSERVER_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct _cef_browser_t;
|
||||
|
||||
///
|
||||
/// Callback structure for cef_browser_host_t::AddDevToolsMessageObserver. The
|
||||
/// functions of this structure will be called on the browser process UI thread.
|
||||
///
|
||||
typedef struct _cef_dev_tools_message_observer_t {
|
||||
///
|
||||
/// Base structure.
|
||||
///
|
||||
cef_base_ref_counted_t base;
|
||||
|
||||
///
|
||||
/// Method that will be called on receipt of a DevTools protocol message.
|
||||
/// |browser| is the originating browser instance. |message| is a UTF8-encoded
|
||||
/// JSON dictionary representing either a function result or an event.
|
||||
/// |message| is only valid for the scope of this callback and should be
|
||||
/// copied if necessary. Return true (1) if the message was handled or false
|
||||
/// (0) if the message should be further processed and passed to the
|
||||
/// OnDevToolsMethodResult or OnDevToolsEvent functions as appropriate.
|
||||
///
|
||||
/// Method result dictionaries include an "id" (int) value that identifies the
|
||||
/// orginating function call sent from
|
||||
/// cef_browser_host_t::SendDevToolsMessage, and optionally either a "result"
|
||||
/// (dictionary) or "error" (dictionary) value. The "error" dictionary will
|
||||
/// contain "code" (int) and "message" (string) values. Event dictionaries
|
||||
/// include a "function" (string) value and optionally a "params" (dictionary)
|
||||
/// value. See the DevTools protocol documentation at
|
||||
/// https://chromedevtools.github.io/devtools-protocol/ for details of
|
||||
/// supported function calls and the expected "result" or "params" dictionary
|
||||
/// contents. JSON dictionaries can be parsed using the CefParseJSON function
|
||||
/// if desired, however be aware of performance considerations when parsing
|
||||
/// large messages (some of which may exceed 1MB in size).
|
||||
///
|
||||
int(CEF_CALLBACK* on_dev_tools_message)(
|
||||
struct _cef_dev_tools_message_observer_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
const void* message,
|
||||
size_t message_size);
|
||||
|
||||
///
|
||||
/// Method that will be called after attempted execution of a DevTools
|
||||
/// protocol function. |browser| is the originating browser instance.
|
||||
/// |message_id| is the "id" value that identifies the originating function
|
||||
/// call message. If the function succeeded |success| will be true (1) and
|
||||
/// |result| will be the UTF8-encoded JSON "result" dictionary value (which
|
||||
/// may be NULL). If the function failed |success| will be false (0) and
|
||||
/// |result| will be the UTF8-encoded JSON "error" dictionary value. |result|
|
||||
/// is only valid for the scope of this callback and should be copied if
|
||||
/// necessary. See the OnDevToolsMessage documentation for additional details
|
||||
/// on |result| contents.
|
||||
///
|
||||
void(CEF_CALLBACK* on_dev_tools_method_result)(
|
||||
struct _cef_dev_tools_message_observer_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
int message_id,
|
||||
int success,
|
||||
const void* result,
|
||||
size_t result_size);
|
||||
|
||||
///
|
||||
/// Method that will be called on receipt of a DevTools protocol event.
|
||||
/// |browser| is the originating browser instance. |function| is the
|
||||
/// "function" value. |params| is the UTF8-encoded JSON "params" dictionary
|
||||
/// value (which may be NULL). |params| is only valid for the scope of this
|
||||
/// callback and should be copied if necessary. See the OnDevToolsMessage
|
||||
/// documentation for additional details on |params| contents.
|
||||
///
|
||||
void(CEF_CALLBACK* on_dev_tools_event)(
|
||||
struct _cef_dev_tools_message_observer_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
const cef_string_t* method,
|
||||
const void* params,
|
||||
size_t params_size);
|
||||
|
||||
///
|
||||
/// Method that will be called when the DevTools agent has attached. |browser|
|
||||
/// is the originating browser instance. This will generally occur in response
|
||||
/// to the first message sent while the agent is detached.
|
||||
///
|
||||
void(CEF_CALLBACK* on_dev_tools_agent_attached)(
|
||||
struct _cef_dev_tools_message_observer_t* self,
|
||||
struct _cef_browser_t* browser);
|
||||
|
||||
///
|
||||
/// Method that will be called when the DevTools agent has detached. |browser|
|
||||
/// is the originating browser instance. Any function results that were
|
||||
/// pending before the agent became detached will not be delivered, and any
|
||||
/// active event subscriptions will be canceled.
|
||||
///
|
||||
void(CEF_CALLBACK* on_dev_tools_agent_detached)(
|
||||
struct _cef_dev_tools_message_observer_t* self,
|
||||
struct _cef_browser_t* browser);
|
||||
} cef_dev_tools_message_observer_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_DEVTOOLS_MESSAGE_OBSERVER_CAPI_H_
|
111
include/capi/cef_dialog_handler_capi.h
Normal file
111
include/capi/cef_dialog_handler_capi.h
Normal file
@@ -0,0 +1,111 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=3a1a3ac84690c6090d356ddec3ddb49b934fe28c$
|
||||
//
|
||||
|
||||
#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_ref_counted_t base;
|
||||
|
||||
///
|
||||
/// Continue the file selection. |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,
|
||||
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_ref_counted_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"). 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,
|
||||
struct _cef_file_dialog_callback_t* callback);
|
||||
} cef_dialog_handler_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_DIALOG_HANDLER_CAPI_H_
|
173
include/capi/cef_display_handler_capi.h
Normal file
173
include/capi/cef_display_handler_capi.h
Normal file
@@ -0,0 +1,173 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=976a61df924efbcb0c53afeb75265e5e9e80c2de$
|
||||
//
|
||||
|
||||
#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_ref_counted_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,
|
||||
cef_log_severity_t level,
|
||||
const cef_string_t* message,
|
||||
const cef_string_t* source,
|
||||
int line);
|
||||
|
||||
///
|
||||
/// Called when auto-resize is enabled via
|
||||
/// cef_browser_host_t::SetAutoResizeEnabled and the contents have auto-
|
||||
/// resized. |new_size| will be the desired size in view coordinates. Return
|
||||
/// true (1) if the resize was handled or false (0) for default handling.
|
||||
///
|
||||
int(CEF_CALLBACK* on_auto_resize)(struct _cef_display_handler_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
const cef_size_t* new_size);
|
||||
|
||||
///
|
||||
/// Called when the overall page loading progress has changed. |progress|
|
||||
/// ranges from 0.0 to 1.0.
|
||||
///
|
||||
void(CEF_CALLBACK* on_loading_progress_change)(
|
||||
struct _cef_display_handler_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
double progress);
|
||||
|
||||
///
|
||||
/// 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.
|
||||
/// Return true (1) if the cursor change was handled or false (0) for default
|
||||
/// handling.
|
||||
///
|
||||
int(CEF_CALLBACK* on_cursor_change)(
|
||||
struct _cef_display_handler_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
cef_cursor_handle_t cursor,
|
||||
cef_cursor_type_t type,
|
||||
const cef_cursor_info_t* custom_cursor_info);
|
||||
|
||||
///
|
||||
/// Called when the browser's access to an audio and/or video source has
|
||||
/// changed.
|
||||
///
|
||||
void(CEF_CALLBACK* on_media_access_change)(
|
||||
struct _cef_display_handler_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
int has_video_access,
|
||||
int has_audio_access);
|
||||
} cef_display_handler_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_DISPLAY_HANDLER_CAPI_H_
|
346
include/capi/cef_dom_capi.h
Normal file
346
include/capi/cef_dom_capi.h
Normal file
@@ -0,0 +1,346 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=47d8c186f687b65c8e7f394b97d72530e67593cd$
|
||||
//
|
||||
|
||||
#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_ref_counted_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_ref_counted_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_ref_counted_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);
|
||||
|
||||
///
|
||||
/// 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);
|
||||
|
||||
///
|
||||
/// Returns the bounds of the element in device pixels. Use
|
||||
/// "window.devicePixelRatio" to convert to/from CSS pixels.
|
||||
///
|
||||
cef_rect_t(CEF_CALLBACK* get_element_bounds)(struct _cef_domnode_t* self);
|
||||
} cef_domnode_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_DOM_CAPI_H_
|
150
include/capi/cef_download_handler_capi.h
Normal file
150
include/capi/cef_download_handler_capi.h
Normal file
@@ -0,0 +1,150 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=aff139899b4b8b769fd0e506d8a46e434f924eee$
|
||||
//
|
||||
|
||||
#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_ref_counted_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_ref_counted_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_ref_counted_t base;
|
||||
|
||||
///
|
||||
/// Called before a download begins in response to a user-initiated action
|
||||
/// (e.g. alt + link click or link click that returns a `Content-Disposition:
|
||||
/// attachment` response from the server). |url| is the target download URL
|
||||
/// and |request_function| is the target function (GET, POST, etc). Return
|
||||
/// true (1) to proceed with the download or false (0) to cancel the download.
|
||||
///
|
||||
int(CEF_CALLBACK* can_download)(struct _cef_download_handler_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
const cef_string_t* url,
|
||||
const cef_string_t* request_method);
|
||||
|
||||
///
|
||||
/// 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_
|
163
include/capi/cef_download_item_capi.h
Normal file
163
include/capi/cef_download_item_capi.h
Normal file
@@ -0,0 +1,163 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=a218058d7ceb842c9ea0cf0c252f9787de6562e7$
|
||||
//
|
||||
|
||||
#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_ref_counted_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_basetime_t(CEF_CALLBACK* get_start_time)(
|
||||
struct _cef_download_item_t* self);
|
||||
|
||||
///
|
||||
/// Returns the time that the download ended.
|
||||
///
|
||||
cef_basetime_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_
|
233
include/capi/cef_drag_data_capi.h
Normal file
233
include/capi/cef_drag_data_capi.h
Normal file
@@ -0,0 +1,233 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=9e8375de3d30eb7e4f67488da3568d19848eb038$
|
||||
//
|
||||
|
||||
#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_image_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_ref_counted_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);
|
||||
|
||||
///
|
||||
/// Clear list of filenames.
|
||||
///
|
||||
void(CEF_CALLBACK* clear_filenames)(struct _cef_drag_data_t* self);
|
||||
|
||||
///
|
||||
/// Get the image representation of drag data. May return NULL if no image
|
||||
/// representation is available.
|
||||
///
|
||||
struct _cef_image_t*(CEF_CALLBACK* get_image)(struct _cef_drag_data_t* self);
|
||||
|
||||
///
|
||||
/// Get the image hotspot (drag start location relative to image dimensions).
|
||||
///
|
||||
cef_point_t(CEF_CALLBACK* get_image_hotspot)(struct _cef_drag_data_t* self);
|
||||
|
||||
///
|
||||
/// Returns true (1) if an image representation of drag data is available.
|
||||
///
|
||||
int(CEF_CALLBACK* has_image)(struct _cef_drag_data_t* self);
|
||||
} cef_drag_data_t;
|
||||
|
||||
///
|
||||
/// Create a new cef_drag_data_t object.
|
||||
///
|
||||
CEF_EXPORT cef_drag_data_t* cef_drag_data_create(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_DRAG_DATA_CAPI_H_
|
92
include/capi/cef_drag_handler_capi.h
Normal file
92
include/capi/cef_drag_handler_capi.h
Normal file
@@ -0,0 +1,92 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=ec450acb2c3cc4d0e69b7da725387d5c1049773b$
|
||||
//
|
||||
|
||||
#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"
|
||||
#include "include/capi/cef_frame_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_ref_counted_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,
|
||||
struct _cef_frame_t* frame,
|
||||
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_
|
130
include/capi/cef_extension_capi.h
Normal file
130
include/capi/cef_extension_capi.h
Normal file
@@ -0,0 +1,130 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=b16b1c47d26e911d360159e5535743622a411c31$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_EXTENSION_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_EXTENSION_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
#include "include/capi/cef_values_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct _cef_extension_handler_t;
|
||||
struct _cef_request_context_t;
|
||||
|
||||
///
|
||||
/// Object representing an extension. Methods may be called on any thread unless
|
||||
/// otherwise indicated.
|
||||
///
|
||||
typedef struct _cef_extension_t {
|
||||
///
|
||||
/// Base structure.
|
||||
///
|
||||
cef_base_ref_counted_t base;
|
||||
|
||||
///
|
||||
/// Returns the unique extension identifier. This is calculated based on the
|
||||
/// extension public key, if available, or on the extension path. See
|
||||
/// https://developer.chrome.com/extensions/manifest/key for details.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t(CEF_CALLBACK* get_identifier)(
|
||||
struct _cef_extension_t* self);
|
||||
|
||||
///
|
||||
/// Returns the absolute path to the extension directory on disk. This value
|
||||
/// will be prefixed with PK_DIR_RESOURCES if a relative path was passed to
|
||||
/// cef_request_context_t::LoadExtension.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t(CEF_CALLBACK* get_path)(struct _cef_extension_t* self);
|
||||
|
||||
///
|
||||
/// Returns the extension manifest contents as a cef_dictionary_value_t
|
||||
/// object. See https://developer.chrome.com/extensions/manifest for details.
|
||||
///
|
||||
struct _cef_dictionary_value_t*(CEF_CALLBACK* get_manifest)(
|
||||
struct _cef_extension_t* self);
|
||||
|
||||
///
|
||||
/// Returns true (1) if this object is the same extension as |that| object.
|
||||
/// Extensions are considered the same if identifier, path and loader context
|
||||
/// match.
|
||||
///
|
||||
int(CEF_CALLBACK* is_same)(struct _cef_extension_t* self,
|
||||
struct _cef_extension_t* that);
|
||||
|
||||
///
|
||||
/// Returns the handler for this extension. Will return NULL for internal
|
||||
/// extensions or if no handler was passed to
|
||||
/// cef_request_context_t::LoadExtension.
|
||||
///
|
||||
struct _cef_extension_handler_t*(CEF_CALLBACK* get_handler)(
|
||||
struct _cef_extension_t* self);
|
||||
|
||||
///
|
||||
/// Returns the request context that loaded this extension. Will return NULL
|
||||
/// for internal extensions or if the extension has been unloaded. See the
|
||||
/// cef_request_context_t::LoadExtension documentation for more information
|
||||
/// about loader contexts. Must be called on the browser process UI thread.
|
||||
///
|
||||
struct _cef_request_context_t*(CEF_CALLBACK* get_loader_context)(
|
||||
struct _cef_extension_t* self);
|
||||
|
||||
///
|
||||
/// Returns true (1) if this extension is currently loaded. Must be called on
|
||||
/// the browser process UI thread.
|
||||
///
|
||||
int(CEF_CALLBACK* is_loaded)(struct _cef_extension_t* self);
|
||||
|
||||
///
|
||||
/// Unload this extension if it is not an internal extension and is currently
|
||||
/// loaded. Will result in a call to
|
||||
/// cef_extension_handler_t::OnExtensionUnloaded on success.
|
||||
///
|
||||
void(CEF_CALLBACK* unload)(struct _cef_extension_t* self);
|
||||
} cef_extension_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_EXTENSION_CAPI_H_
|
212
include/capi/cef_extension_handler_capi.h
Normal file
212
include/capi/cef_extension_handler_capi.h
Normal file
@@ -0,0 +1,212 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=ba961ade334c82e53213e7e8ac848adc2a7b533a$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_EXTENSION_HANDLER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_EXTENSION_HANDLER_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
#include "include/capi/cef_browser_capi.h"
|
||||
#include "include/capi/cef_extension_capi.h"
|
||||
#include "include/capi/cef_stream_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct _cef_client_t;
|
||||
|
||||
///
|
||||
/// Callback structure used for asynchronous continuation of
|
||||
/// cef_extension_handler_t::GetExtensionResource.
|
||||
///
|
||||
typedef struct _cef_get_extension_resource_callback_t {
|
||||
///
|
||||
/// Base structure.
|
||||
///
|
||||
cef_base_ref_counted_t base;
|
||||
|
||||
///
|
||||
/// Continue the request. Read the resource contents from |stream|.
|
||||
///
|
||||
void(CEF_CALLBACK* cont)(struct _cef_get_extension_resource_callback_t* self,
|
||||
struct _cef_stream_reader_t* stream);
|
||||
|
||||
///
|
||||
/// Cancel the request.
|
||||
///
|
||||
void(CEF_CALLBACK* cancel)(
|
||||
struct _cef_get_extension_resource_callback_t* self);
|
||||
} cef_get_extension_resource_callback_t;
|
||||
|
||||
///
|
||||
/// Implement this structure to handle events related to browser extensions. The
|
||||
/// functions of this structure will be called on the UI thread. See
|
||||
/// cef_request_context_t::LoadExtension for information about extension
|
||||
/// loading.
|
||||
///
|
||||
typedef struct _cef_extension_handler_t {
|
||||
///
|
||||
/// Base structure.
|
||||
///
|
||||
cef_base_ref_counted_t base;
|
||||
|
||||
///
|
||||
/// Called if the cef_request_context_t::LoadExtension request fails. |result|
|
||||
/// will be the error code.
|
||||
///
|
||||
void(CEF_CALLBACK* on_extension_load_failed)(
|
||||
struct _cef_extension_handler_t* self,
|
||||
cef_errorcode_t result);
|
||||
|
||||
///
|
||||
/// Called if the cef_request_context_t::LoadExtension request succeeds.
|
||||
/// |extension| is the loaded extension.
|
||||
///
|
||||
void(CEF_CALLBACK* on_extension_loaded)(struct _cef_extension_handler_t* self,
|
||||
struct _cef_extension_t* extension);
|
||||
|
||||
///
|
||||
/// Called after the cef_extension_t::Unload request has completed.
|
||||
///
|
||||
void(CEF_CALLBACK* on_extension_unloaded)(
|
||||
struct _cef_extension_handler_t* self,
|
||||
struct _cef_extension_t* extension);
|
||||
|
||||
///
|
||||
/// Called when an extension needs a browser to host a background script
|
||||
/// specified via the "background" manifest key. The browser will have no
|
||||
/// visible window and cannot be displayed. |extension| is the extension that
|
||||
/// is loading the background script. |url| is an internally generated
|
||||
/// reference to an HTML page that will be used to load the background script
|
||||
/// via a "<script>" src attribute. To allow creation of the browser
|
||||
/// optionally modify |client| and |settings| and return false (0). To cancel
|
||||
/// creation of the browser (and consequently cancel load of the background
|
||||
/// script) return true (1). Successful creation will be indicated by a call
|
||||
/// to cef_life_span_handler_t::OnAfterCreated, and
|
||||
/// cef_browser_host_t::IsBackgroundHost will return true (1) for the
|
||||
/// resulting browser. See https://developer.chrome.com/extensions/event_pages
|
||||
/// for more information about extension background script usage.
|
||||
///
|
||||
int(CEF_CALLBACK* on_before_background_browser)(
|
||||
struct _cef_extension_handler_t* self,
|
||||
struct _cef_extension_t* extension,
|
||||
const cef_string_t* url,
|
||||
struct _cef_client_t** client,
|
||||
struct _cef_browser_settings_t* settings);
|
||||
|
||||
///
|
||||
/// Called when an extension API (e.g. chrome.tabs.create) requests creation
|
||||
/// of a new browser. |extension| and |browser| are the source of the API
|
||||
/// call. |active_browser| may optionally be specified via the windowId
|
||||
/// property or returned via the get_active_browser() callback and provides
|
||||
/// the default |client| and |settings| values for the new browser. |index| is
|
||||
/// the position value optionally specified via the index property. |url| is
|
||||
/// the URL that will be loaded in the browser. |active| is true (1) if the
|
||||
/// new browser should be active when opened. To allow creation of the
|
||||
/// browser optionally modify |windowInfo|, |client| and |settings| and return
|
||||
/// false (0). To cancel creation of the browser return true (1). Successful
|
||||
/// creation will be indicated by a call to
|
||||
/// cef_life_span_handler_t::OnAfterCreated. Any modifications to |windowInfo|
|
||||
/// will be ignored if |active_browser| is wrapped in a cef_browser_view_t.
|
||||
///
|
||||
int(CEF_CALLBACK* on_before_browser)(
|
||||
struct _cef_extension_handler_t* self,
|
||||
struct _cef_extension_t* extension,
|
||||
struct _cef_browser_t* browser,
|
||||
struct _cef_browser_t* active_browser,
|
||||
int index,
|
||||
const cef_string_t* url,
|
||||
int active,
|
||||
struct _cef_window_info_t* windowInfo,
|
||||
struct _cef_client_t** client,
|
||||
struct _cef_browser_settings_t* settings);
|
||||
|
||||
///
|
||||
/// Called when no tabId is specified to an extension API call that accepts a
|
||||
/// tabId parameter (e.g. chrome.tabs.*). |extension| and |browser| are the
|
||||
/// source of the API call. Return the browser that will be acted on by the
|
||||
/// API call or return NULL to act on |browser|. The returned browser must
|
||||
/// share the same cef_request_context_t as |browser|. Incognito browsers
|
||||
/// should not be considered unless the source extension has incognito access
|
||||
/// enabled, in which case |include_incognito| will be true (1).
|
||||
///
|
||||
struct _cef_browser_t*(CEF_CALLBACK* get_active_browser)(
|
||||
struct _cef_extension_handler_t* self,
|
||||
struct _cef_extension_t* extension,
|
||||
struct _cef_browser_t* browser,
|
||||
int include_incognito);
|
||||
|
||||
///
|
||||
/// Called when the tabId associated with |target_browser| is specified to an
|
||||
/// extension API call that accepts a tabId parameter (e.g. chrome.tabs.*).
|
||||
/// |extension| and |browser| are the source of the API call. Return true (1)
|
||||
/// to allow access of false (0) to deny access. Access to incognito browsers
|
||||
/// should not be allowed unless the source extension has incognito access
|
||||
/// enabled, in which case |include_incognito| will be true (1).
|
||||
///
|
||||
int(CEF_CALLBACK* can_access_browser)(struct _cef_extension_handler_t* self,
|
||||
struct _cef_extension_t* extension,
|
||||
struct _cef_browser_t* browser,
|
||||
int include_incognito,
|
||||
struct _cef_browser_t* target_browser);
|
||||
|
||||
///
|
||||
/// Called to retrieve an extension resource that would normally be loaded
|
||||
/// from disk (e.g. if a file parameter is specified to
|
||||
/// chrome.tabs.executeScript). |extension| and |browser| are the source of
|
||||
/// the resource request. |file| is the requested relative file path. To
|
||||
/// handle the resource request return true (1) and execute |callback| either
|
||||
/// synchronously or asynchronously. For the default behavior which reads the
|
||||
/// resource from the extension directory on disk return false (0).
|
||||
/// Localization substitutions will not be applied to resources handled via
|
||||
/// this function.
|
||||
///
|
||||
int(CEF_CALLBACK* get_extension_resource)(
|
||||
struct _cef_extension_handler_t* self,
|
||||
struct _cef_extension_t* extension,
|
||||
struct _cef_browser_t* browser,
|
||||
const cef_string_t* file,
|
||||
struct _cef_get_extension_resource_callback_t* callback);
|
||||
} cef_extension_handler_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_EXTENSION_HANDLER_CAPI_H_
|
132
include/capi/cef_file_util_capi.h
Normal file
132
include/capi/cef_file_util_capi.h
Normal file
@@ -0,0 +1,132 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=3e2e068a2be0a3b12653eea65a4bbe1c9cdb8c7f$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_FILE_UTIL_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_FILE_UTIL_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
///
|
||||
/// Creates a directory and all parent directories if they don't already exist.
|
||||
/// Returns true (1) on successful creation or if the directory already exists.
|
||||
/// The directory is only readable by the current user. Calling this function on
|
||||
/// the browser process UI or IO threads is not allowed.
|
||||
///
|
||||
CEF_EXPORT int cef_create_directory(const cef_string_t* full_path);
|
||||
|
||||
///
|
||||
/// Get the temporary directory provided by the system.
|
||||
///
|
||||
/// WARNING: In general, you should use the temp directory variants below
|
||||
/// instead of this function. Those variants will ensure that the proper
|
||||
/// permissions are set so that other users on the system can't edit them while
|
||||
/// they're open (which could lead to security issues).
|
||||
///
|
||||
CEF_EXPORT int cef_get_temp_directory(cef_string_t* temp_dir);
|
||||
|
||||
///
|
||||
/// Creates a new directory. On Windows if |prefix| is provided the new
|
||||
/// directory name is in the format of "prefixyyyy". Returns true (1) on success
|
||||
/// and sets |new_temp_path| to the full path of the directory that was created.
|
||||
/// The directory is only readable by the current user. Calling this function on
|
||||
/// the browser process UI or IO threads is not allowed.
|
||||
///
|
||||
CEF_EXPORT int cef_create_new_temp_directory(const cef_string_t* prefix,
|
||||
cef_string_t* new_temp_path);
|
||||
|
||||
///
|
||||
/// Creates a directory within another directory. Extra characters will be
|
||||
/// appended to |prefix| to ensure that the new directory does not have the same
|
||||
/// name as an existing directory. Returns true (1) on success and sets
|
||||
/// |new_dir| to the full path of the directory that was created. The directory
|
||||
/// is only readable by the current user. Calling this function on the browser
|
||||
/// process UI or IO threads is not allowed.
|
||||
///
|
||||
CEF_EXPORT int cef_create_temp_directory_in_directory(
|
||||
const cef_string_t* base_dir,
|
||||
const cef_string_t* prefix,
|
||||
cef_string_t* new_dir);
|
||||
|
||||
///
|
||||
/// Returns true (1) if the given path exists and is a directory. Calling this
|
||||
/// function on the browser process UI or IO threads is not allowed.
|
||||
///
|
||||
CEF_EXPORT int cef_directory_exists(const cef_string_t* path);
|
||||
|
||||
///
|
||||
/// Deletes the given path whether it's a file or a directory. If |path| is a
|
||||
/// directory all contents will be deleted. If |recursive| is true (1) any sub-
|
||||
/// directories and their contents will also be deleted (equivalent to executing
|
||||
/// "rm -rf", so use with caution). On POSIX environments if |path| is a
|
||||
/// symbolic link then only the symlink will be deleted. Returns true (1) on
|
||||
/// successful deletion or if |path| does not exist. Calling this function on
|
||||
/// the browser process UI or IO threads is not allowed.
|
||||
///
|
||||
CEF_EXPORT int cef_delete_file(const cef_string_t* path, int recursive);
|
||||
|
||||
///
|
||||
/// Writes the contents of |src_dir| into a zip archive at |dest_file|. If
|
||||
/// |include_hidden_files| is true (1) files starting with "." will be included.
|
||||
/// Returns true (1) on success. Calling this function on the browser process
|
||||
/// UI or IO threads is not allowed.
|
||||
///
|
||||
CEF_EXPORT int cef_zip_directory(const cef_string_t* src_dir,
|
||||
const cef_string_t* dest_file,
|
||||
int include_hidden_files);
|
||||
|
||||
///
|
||||
/// Loads the existing "Certificate Revocation Lists" file that is managed by
|
||||
/// Google Chrome. This file can generally be found in Chrome's User Data
|
||||
/// directory (e.g. "C:\Users\[User]\AppData\Local\Google\Chrome\User Data\" on
|
||||
/// Windows) and is updated periodically by Chrome's component updater service.
|
||||
/// Must be called in the browser process after the context has been
|
||||
/// initialized. See https://dev.chromium.org/Home/chromium-security/crlsets for
|
||||
/// background.
|
||||
///
|
||||
CEF_EXPORT void cef_load_crlsets_file(const cef_string_t* path);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_FILE_UTIL_CAPI_H_
|
82
include/capi/cef_find_handler_capi.h
Normal file
82
include/capi/cef_find_handler_capi.h
Normal file
@@ -0,0 +1,82 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=30e86c9dd440616305f94747b313eb526c4323c7$
|
||||
//
|
||||
|
||||
#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_ref_counted_t base;
|
||||
|
||||
///
|
||||
/// Called to report find results returned by cef_browser_host_t::find().
|
||||
/// |identifer| is a unique incremental identifier for the currently active
|
||||
/// search, |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_
|
93
include/capi/cef_focus_handler_capi.h
Normal file
93
include/capi/cef_focus_handler_capi.h
Normal file
@@ -0,0 +1,93 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=907b9628ac4b7ab4603dc6e20b7e8675a51987ba$
|
||||
//
|
||||
|
||||
#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_ref_counted_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_
|
263
include/capi/cef_frame_capi.h
Normal file
263
include/capi/cef_frame_capi.h
Normal file
@@ -0,0 +1,263 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=48bc345bb0971e3fcaaf839e9e4419b2aec0e33b$
|
||||
//
|
||||
|
||||
#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_process_message_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_urlrequest_client_t;
|
||||
struct _cef_urlrequest_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_ref_counted_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.
|
||||
///
|
||||
/// WARNING: This function will fail with "bad IPC message" reason
|
||||
/// INVALID_INITIATOR_ORIGIN (213) unless you first navigate to the request
|
||||
/// origin using some other mechanism (LoadURL, link click, etc).
|
||||
///
|
||||
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);
|
||||
|
||||
///
|
||||
/// 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);
|
||||
|
||||
///
|
||||
/// Create a new URL request that will be treated as originating from this
|
||||
/// frame and the associated browser. This request may be intercepted by the
|
||||
/// client via cef_resource_request_handler_t or cef_scheme_handler_factory_t.
|
||||
/// Use cef_urlrequest_t::Create instead if you do not want the request to
|
||||
/// have this association, in which case it may be handled differently (see
|
||||
/// documentation on that function). Requests may originate from both the
|
||||
/// browser process and the render process.
|
||||
///
|
||||
/// For requests originating from the browser process:
|
||||
/// - POST data may only contain a single element of type PDE_TYPE_FILE or
|
||||
/// PDE_TYPE_BYTES.
|
||||
///
|
||||
/// For requests originating from the render process:
|
||||
/// - POST data may only contain a single element of type PDE_TYPE_BYTES.
|
||||
/// - 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.
|
||||
///
|
||||
struct _cef_urlrequest_t*(CEF_CALLBACK* create_urlrequest)(
|
||||
struct _cef_frame_t* self,
|
||||
struct _cef_request_t* request,
|
||||
struct _cef_urlrequest_client_t* client);
|
||||
|
||||
///
|
||||
/// Send a message to the specified |target_process|. Ownership of the message
|
||||
/// contents will be transferred and the |message| reference will be
|
||||
/// invalidated. Message delivery is not guaranteed in all cases (for example,
|
||||
/// if the browser is closing, navigating, or if the target process crashes).
|
||||
/// Send an ACK message back from the target process if confirmation is
|
||||
/// required.
|
||||
///
|
||||
void(CEF_CALLBACK* send_process_message)(
|
||||
struct _cef_frame_t* self,
|
||||
cef_process_id_t target_process,
|
||||
struct _cef_process_message_t* message);
|
||||
} cef_frame_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_FRAME_CAPI_H_
|
202
include/capi/cef_frame_handler_capi.h
Normal file
202
include/capi/cef_frame_handler_capi.h
Normal file
@@ -0,0 +1,202 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=3d97135fef535cc94aca6cf1afa4a9461c388b4f$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_FRAME_HANDLER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_FRAME_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 cef_frame_t life span.
|
||||
/// The order of callbacks is:
|
||||
///
|
||||
/// (1) During initial cef_browser_host_t creation and navigation of the main
|
||||
/// frame: - cef_frame_handler_t::OnFrameCreated => The initial main frame
|
||||
/// object has been
|
||||
/// created. Any commands will be queued until the frame is attached.
|
||||
/// - cef_frame_handler_t::OnMainFrameChanged => The initial main frame object
|
||||
/// has
|
||||
/// been assigned to the browser.
|
||||
/// - cef_life_span_handler_t::OnAfterCreated => The browser is now valid and
|
||||
/// can be
|
||||
/// used.
|
||||
/// - cef_frame_handler_t::OnFrameAttached => The initial main frame object is
|
||||
/// now
|
||||
/// connected to its peer in the renderer process. Commands can be routed.
|
||||
///
|
||||
/// (2) During further cef_browser_host_t navigation/loading of the main frame
|
||||
/// and/or sub-frames:
|
||||
/// - cef_frame_handler_t::OnFrameCreated => A new main frame or sub-frame
|
||||
/// object
|
||||
/// has been created. Any commands will be queued until the frame is attached.
|
||||
/// - cef_frame_handler_t::OnFrameAttached => A new main frame or sub-frame
|
||||
/// object
|
||||
/// is now connected to its peer in the renderer process. Commands can be
|
||||
/// routed.
|
||||
/// - cef_frame_handler_t::OnFrameDetached => An existing main frame or sub-
|
||||
/// frame
|
||||
/// object has lost its connection to the renderer process. If multiple
|
||||
/// objects are detached at the same time then notifications will be sent for
|
||||
/// any sub-frame objects before the main frame object. Commands can no longer
|
||||
/// be routed and will be discarded.
|
||||
/// - cef_frame_handler_t::OnMainFrameChanged => A new main frame object has
|
||||
/// been
|
||||
/// assigned to the browser. This will only occur with cross-origin navigation
|
||||
/// or re-navigation after renderer process termination (due to crashes, etc).
|
||||
///
|
||||
/// (3) During final cef_browser_host_t destruction of the main frame: -
|
||||
/// cef_frame_handler_t::OnFrameDetached => Any sub-frame objects have lost
|
||||
/// their
|
||||
/// connection to the renderer process. Commands can no longer be routed and
|
||||
/// will be discarded.
|
||||
/// - cef_life_span_handler_t::OnBeforeClose => The browser has been destroyed.
|
||||
/// - cef_frame_handler_t::OnFrameDetached => The main frame object have lost
|
||||
/// its
|
||||
/// connection to the renderer process. Notifications will be sent for any
|
||||
/// sub-frame objects before the main frame object. Commands can no longer be
|
||||
/// routed and will be discarded.
|
||||
/// - cef_frame_handler_t::OnMainFrameChanged => The final main frame object has
|
||||
/// been removed from the browser.
|
||||
///
|
||||
/// Cross-origin navigation and/or loading receives special handling.
|
||||
///
|
||||
/// When the main frame navigates to a different origin the OnMainFrameChanged
|
||||
/// callback (2) will be executed with the old and new main frame objects.
|
||||
///
|
||||
/// When a new sub-frame is loaded in, or an existing sub-frame is navigated to,
|
||||
/// a different origin from the parent frame, a temporary sub-frame object will
|
||||
/// first be created in the parent's renderer process. That temporary sub-frame
|
||||
/// will then be discarded after the real cross-origin sub-frame is created in
|
||||
/// the new/target renderer process. The client will receive cross-origin
|
||||
/// navigation callbacks (2) for the transition from the temporary sub-frame to
|
||||
/// the real sub-frame. The temporary sub-frame will not recieve or execute
|
||||
/// commands during this transitional period (any sent commands will be
|
||||
/// discarded).
|
||||
///
|
||||
/// When a new popup browser is created in a different origin from the parent
|
||||
/// browser, a temporary main frame object for the popup will first be created
|
||||
/// in the parent's renderer process. That temporary main frame will then be
|
||||
/// discarded after the real cross-origin main frame is created in the
|
||||
/// new/target renderer process. The client will recieve creation and initial
|
||||
/// navigation callbacks (1) for the temporary main frame, followed by cross-
|
||||
/// origin navigation callbacks (2) for the transition from the temporary main
|
||||
/// frame to the real main frame. The temporary main frame may receive and
|
||||
/// execute commands during this transitional period (any sent commands may be
|
||||
/// executed, but the behavior is potentially undesirable since they execute in
|
||||
/// the parent browser's renderer process and not the new/target renderer
|
||||
/// process).
|
||||
///
|
||||
/// Callbacks will not be executed for placeholders that may be created during
|
||||
/// pre-commit navigation for sub-frames that do not yet exist in the renderer
|
||||
/// process. Placeholders will have cef_frame_t::get_identifier() == -4.
|
||||
///
|
||||
/// The functions of this structure will be called on the UI thread unless
|
||||
/// otherwise indicated.
|
||||
///
|
||||
typedef struct _cef_frame_handler_t {
|
||||
///
|
||||
/// Base structure.
|
||||
///
|
||||
cef_base_ref_counted_t base;
|
||||
|
||||
///
|
||||
/// Called when a new frame is created. This will be the first notification
|
||||
/// that references |frame|. Any commands that require transport to the
|
||||
/// associated renderer process (LoadRequest, SendProcessMessage, GetSource,
|
||||
/// etc.) will be queued until OnFrameAttached is called for |frame|.
|
||||
///
|
||||
void(CEF_CALLBACK* on_frame_created)(struct _cef_frame_handler_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
struct _cef_frame_t* frame);
|
||||
|
||||
///
|
||||
/// Called when a frame can begin routing commands to/from the associated
|
||||
/// renderer process. |reattached| will be true (1) if the frame was re-
|
||||
/// attached after exiting the BackForwardCache. Any commands that were queued
|
||||
/// have now been dispatched.
|
||||
///
|
||||
void(CEF_CALLBACK* on_frame_attached)(struct _cef_frame_handler_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
struct _cef_frame_t* frame,
|
||||
int reattached);
|
||||
|
||||
///
|
||||
/// Called when a frame loses its connection to the renderer process and will
|
||||
/// be destroyed. Any pending or future commands will be discarded and
|
||||
/// cef_frame_t::is_valid() will now return false (0) for |frame|. If called
|
||||
/// after cef_life_span_handler_t::on_before_close() during browser
|
||||
/// destruction then cef_browser_t::is_valid() will return false (0) for
|
||||
/// |browser|.
|
||||
///
|
||||
void(CEF_CALLBACK* on_frame_detached)(struct _cef_frame_handler_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
struct _cef_frame_t* frame);
|
||||
|
||||
///
|
||||
/// Called when the main frame changes due to (a) initial browser creation,
|
||||
/// (b) final browser destruction, (c) cross-origin navigation or (d) re-
|
||||
/// navigation after renderer process termination (due to crashes, etc).
|
||||
/// |old_frame| will be NULL and |new_frame| will be non-NULL when a main
|
||||
/// frame is assigned to |browser| for the first time. |old_frame| will be
|
||||
/// non-NULL and |new_frame| will be NULL and when a main frame is removed
|
||||
/// from |browser| for the last time. Both |old_frame| and |new_frame| will be
|
||||
/// non-NULL for cross-origin navigations or re-navigation after renderer
|
||||
/// process termination. This function will be called after on_frame_created()
|
||||
/// for |new_frame| and/or after on_frame_detached() for |old_frame|. If
|
||||
/// called after cef_life_span_handler_t::on_before_close() during browser
|
||||
/// destruction then cef_browser_t::is_valid() will return false (0) for
|
||||
/// |browser|.
|
||||
///
|
||||
void(CEF_CALLBACK* on_main_frame_changed)(struct _cef_frame_handler_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
struct _cef_frame_t* old_frame,
|
||||
struct _cef_frame_t* new_frame);
|
||||
} cef_frame_handler_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_FRAME_HANDLER_CAPI_H_
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2022 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
|
||||
@@ -26,34 +26,33 @@
|
||||
// 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.
|
||||
//
|
||||
// $hash=14f7f979f668fdae0f080daa39f3c1b2e92162f9$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_INTERNAL_CEF_TYPES_COLOR_H_
|
||||
#define CEF_INCLUDE_INTERNAL_CEF_TYPES_COLOR_H_
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_I18N_UTIL_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_I18N_UTIL_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
///
|
||||
/// Describes how to interpret the components of a pixel.
|
||||
/// Returns true (1) if the application text direction is right-to-left.
|
||||
///
|
||||
typedef enum {
|
||||
///
|
||||
/// RGBA with 8 bits per pixel (32bits total).
|
||||
///
|
||||
CEF_COLOR_TYPE_RGBA_8888,
|
||||
|
||||
///
|
||||
/// BGRA with 8 bits per pixel (32bits total).
|
||||
///
|
||||
CEF_COLOR_TYPE_BGRA_8888,
|
||||
|
||||
CEF_COLOR_TYPE_NUM_VALUES,
|
||||
} cef_color_type_t;
|
||||
CEF_EXPORT int cef_is_rtl(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_COLOR_H_
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_I18N_UTIL_CAPI_H_
|
206
include/capi/cef_image_capi.h
Normal file
206
include/capi/cef_image_capi.h
Normal file
@@ -0,0 +1,206 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=f679dc1ec87e99bed6843d4f4dbbe04585a827bd$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_IMAGE_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_IMAGE_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
#include "include/capi/cef_values_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
///
|
||||
/// Container for a single image represented at different scale factors. All
|
||||
/// image representations should be the same size in density independent pixel
|
||||
/// (DIP) units. For example, if the image at scale factor 1.0 is 100x100 pixels
|
||||
/// then the image at scale factor 2.0 should be 200x200 pixels -- both images
|
||||
/// will display with a DIP size of 100x100 units. The functions of this
|
||||
/// structure can be called on any browser process thread.
|
||||
///
|
||||
typedef struct _cef_image_t {
|
||||
///
|
||||
/// Base structure.
|
||||
///
|
||||
cef_base_ref_counted_t base;
|
||||
|
||||
///
|
||||
/// Returns true (1) if this Image is NULL.
|
||||
///
|
||||
int(CEF_CALLBACK* is_empty)(struct _cef_image_t* self);
|
||||
|
||||
///
|
||||
/// Returns true (1) if this Image and |that| Image share the same underlying
|
||||
/// storage. Will also return true (1) if both images are NULL.
|
||||
///
|
||||
int(CEF_CALLBACK* is_same)(struct _cef_image_t* self,
|
||||
struct _cef_image_t* that);
|
||||
|
||||
///
|
||||
/// Add a bitmap image representation for |scale_factor|. Only 32-bit
|
||||
/// RGBA/BGRA formats are supported. |pixel_width| and |pixel_height| are the
|
||||
/// bitmap representation size in pixel coordinates. |pixel_data| is the array
|
||||
/// of pixel data and should be |pixel_width| x |pixel_height| x 4 bytes in
|
||||
/// size. |color_type| and |alpha_type| values specify the pixel format.
|
||||
///
|
||||
int(CEF_CALLBACK* add_bitmap)(struct _cef_image_t* self,
|
||||
float scale_factor,
|
||||
int pixel_width,
|
||||
int pixel_height,
|
||||
cef_color_type_t color_type,
|
||||
cef_alpha_type_t alpha_type,
|
||||
const void* pixel_data,
|
||||
size_t pixel_data_size);
|
||||
|
||||
///
|
||||
/// Add a PNG image representation for |scale_factor|. |png_data| is the image
|
||||
/// data of size |png_data_size|. Any alpha transparency in the PNG data will
|
||||
/// be maintained.
|
||||
///
|
||||
int(CEF_CALLBACK* add_png)(struct _cef_image_t* self,
|
||||
float scale_factor,
|
||||
const void* png_data,
|
||||
size_t png_data_size);
|
||||
|
||||
///
|
||||
/// Create a JPEG image representation for |scale_factor|. |jpeg_data| is the
|
||||
/// image data of size |jpeg_data_size|. The JPEG format does not support
|
||||
/// transparency so the alpha byte will be set to 0xFF for all pixels.
|
||||
///
|
||||
int(CEF_CALLBACK* add_jpeg)(struct _cef_image_t* self,
|
||||
float scale_factor,
|
||||
const void* jpeg_data,
|
||||
size_t jpeg_data_size);
|
||||
|
||||
///
|
||||
/// Returns the image width in density independent pixel (DIP) units.
|
||||
///
|
||||
size_t(CEF_CALLBACK* get_width)(struct _cef_image_t* self);
|
||||
|
||||
///
|
||||
/// Returns the image height in density independent pixel (DIP) units.
|
||||
///
|
||||
size_t(CEF_CALLBACK* get_height)(struct _cef_image_t* self);
|
||||
|
||||
///
|
||||
/// Returns true (1) if this image contains a representation for
|
||||
/// |scale_factor|.
|
||||
///
|
||||
int(CEF_CALLBACK* has_representation)(struct _cef_image_t* self,
|
||||
float scale_factor);
|
||||
|
||||
///
|
||||
/// Removes the representation for |scale_factor|. Returns true (1) on
|
||||
/// success.
|
||||
///
|
||||
int(CEF_CALLBACK* remove_representation)(struct _cef_image_t* self,
|
||||
float scale_factor);
|
||||
|
||||
///
|
||||
/// Returns information for the representation that most closely matches
|
||||
/// |scale_factor|. |actual_scale_factor| is the actual scale factor for the
|
||||
/// representation. |pixel_width| and |pixel_height| are the representation
|
||||
/// size in pixel coordinates. Returns true (1) on success.
|
||||
///
|
||||
int(CEF_CALLBACK* get_representation_info)(struct _cef_image_t* self,
|
||||
float scale_factor,
|
||||
float* actual_scale_factor,
|
||||
int* pixel_width,
|
||||
int* pixel_height);
|
||||
|
||||
///
|
||||
/// Returns the bitmap representation that most closely matches
|
||||
/// |scale_factor|. Only 32-bit RGBA/BGRA formats are supported. |color_type|
|
||||
/// and |alpha_type| values specify the desired output pixel format.
|
||||
/// |pixel_width| and |pixel_height| are the output representation size in
|
||||
/// pixel coordinates. Returns a cef_binary_value_t containing the pixel data
|
||||
/// on success or NULL on failure.
|
||||
///
|
||||
struct _cef_binary_value_t*(CEF_CALLBACK* get_as_bitmap)(
|
||||
struct _cef_image_t* self,
|
||||
float scale_factor,
|
||||
cef_color_type_t color_type,
|
||||
cef_alpha_type_t alpha_type,
|
||||
int* pixel_width,
|
||||
int* pixel_height);
|
||||
|
||||
///
|
||||
/// Returns the PNG representation that most closely matches |scale_factor|.
|
||||
/// If |with_transparency| is true (1) any alpha transparency in the image
|
||||
/// will be represented in the resulting PNG data. |pixel_width| and
|
||||
/// |pixel_height| are the output representation size in pixel coordinates.
|
||||
/// Returns a cef_binary_value_t containing the PNG image data on success or
|
||||
/// NULL on failure.
|
||||
///
|
||||
struct _cef_binary_value_t*(CEF_CALLBACK* get_as_png)(
|
||||
struct _cef_image_t* self,
|
||||
float scale_factor,
|
||||
int with_transparency,
|
||||
int* pixel_width,
|
||||
int* pixel_height);
|
||||
|
||||
///
|
||||
/// Returns the JPEG representation that most closely matches |scale_factor|.
|
||||
/// |quality| determines the compression level with 0 == lowest and 100 ==
|
||||
/// highest. The JPEG format does not support alpha transparency and the alpha
|
||||
/// channel, if any, will be discarded. |pixel_width| and |pixel_height| are
|
||||
/// the output representation size in pixel coordinates. Returns a
|
||||
/// cef_binary_value_t containing the JPEG image data on success or NULL on
|
||||
/// failure.
|
||||
///
|
||||
struct _cef_binary_value_t*(CEF_CALLBACK* get_as_jpeg)(
|
||||
struct _cef_image_t* self,
|
||||
float scale_factor,
|
||||
int quality,
|
||||
int* pixel_width,
|
||||
int* pixel_height);
|
||||
} cef_image_t;
|
||||
|
||||
///
|
||||
/// Create a new cef_image_t. It will initially be NULL. Use the Add*()
|
||||
/// functions to add representations at different scale factors.
|
||||
///
|
||||
CEF_EXPORT cef_image_t* cef_image_create(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_IMAGE_CAPI_H_
|
141
include/capi/cef_jsdialog_handler_capi.h
Normal file
141
include/capi/cef_jsdialog_handler_capi.h
Normal file
@@ -0,0 +1,141 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=523a692475e912e4ecad89842596c3d6eac6f4aa$
|
||||
//
|
||||
|
||||
#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_ref_counted_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_ref_counted_t base;
|
||||
|
||||
///
|
||||
/// Called to run a JavaScript dialog. If |origin_url| is non-NULL it can be
|
||||
/// passed to the CefFormatUrlForSecurityDisplay function to retrieve a secure
|
||||
/// and user-friendly display string. The |default_prompt_text| value will be
|
||||
/// specified for prompt dialogs only. Set |suppress_message| to true (1) and
|
||||
/// return false (0) to suppress the message (suppressing messages is
|
||||
/// preferable to immediately executing the callback as this is used to detect
|
||||
/// presumably malicious behavior like spamming alert messages in
|
||||
/// onbeforeunload). Set |suppress_message| to false (0) and return false (0)
|
||||
/// to use the default implementation (the default implementation will show
|
||||
/// one modal dialog at a time and suppress any additional dialog requests
|
||||
/// until the displayed dialog is dismissed). Return true (1) if the
|
||||
/// application will use a custom dialog or if the callback has been executed
|
||||
/// immediately. Custom dialogs may be either modal or modeless. If a custom
|
||||
/// dialog is used the application must execute |callback| once the custom
|
||||
/// dialog is dismissed.
|
||||
///
|
||||
int(CEF_CALLBACK* on_jsdialog)(struct _cef_jsdialog_handler_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
const cef_string_t* origin_url,
|
||||
cef_jsdialog_type_t dialog_type,
|
||||
const cef_string_t* message_text,
|
||||
const cef_string_t* 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 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_
|
90
include/capi/cef_keyboard_handler_capi.h
Normal file
90
include/capi/cef_keyboard_handler_capi.h
Normal file
@@ -0,0 +1,90 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=01d7f86c1304efe8dc8758624b74bafccf159e96$
|
||||
//
|
||||
|
||||
#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_ref_counted_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 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 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_
|
225
include/capi/cef_life_span_handler_capi.h
Normal file
225
include/capi/cef_life_span_handler_capi.h
Normal file
@@ -0,0 +1,225 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=44555ceece9989dabfa57a520168fa874dcfe2df$
|
||||
//
|
||||
|
||||
#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_ref_counted_t base;
|
||||
|
||||
///
|
||||
/// Called on the UI 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. Any
|
||||
/// modifications to |windowInfo| will be ignored if the parent browser is
|
||||
/// wrapped in a cef_browser_view_t. Popup browser creation will be canceled
|
||||
/// if the parent browser is destroyed before the popup browser creation
|
||||
/// completes (indicated by a call to OnAfterCreated for the popup browser).
|
||||
/// The |extra_info| parameter provides an opportunity to specify extra
|
||||
/// information specific to the created popup browser that will be passed to
|
||||
/// cef_render_process_handler_t::on_browser_created() in the render process.
|
||||
///
|
||||
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 cef_popup_features_t* popupFeatures,
|
||||
struct _cef_window_info_t* windowInfo,
|
||||
struct _cef_client_t** client,
|
||||
struct _cef_browser_settings_t* settings,
|
||||
struct _cef_dictionary_value_t** extra_info,
|
||||
int* no_javascript_access);
|
||||
|
||||
///
|
||||
/// Called after a new browser is created. It is now safe to begin performing
|
||||
/// actions with |browser|. cef_frame_handler_t callbacks related to initial
|
||||
/// main frame creation will arrive before this callback. See
|
||||
/// cef_frame_handler_t documentation for additional usage information.
|
||||
///
|
||||
void(CEF_CALLBACK* on_after_created)(struct _cef_life_span_handler_t* self,
|
||||
struct _cef_browser_t* browser);
|
||||
|
||||
///
|
||||
/// Called when a browser has recieved a request to close. This may result
|
||||
/// directly from a call to cef_browser_host_t::*close_browser() or indirectly
|
||||
/// if the browser is parented to a top-level window created by CEF and the
|
||||
/// user attempts to close that window (by clicking the 'X', for example). The
|
||||
/// do_close() function will be called after the JavaScript 'onunload' event
|
||||
/// has been fired.
|
||||
///
|
||||
/// An application should handle top-level owner window close notifications by
|
||||
/// calling cef_browser_host_t::try_close_browser() or
|
||||
/// cef_browser_host_t::CloseBrowser(false (0)) instead of allowing the window
|
||||
/// to close immediately (see the examples below). This gives CEF an
|
||||
/// opportunity to process the 'onbeforeunload' event and optionally cancel
|
||||
/// the close before do_close() is called.
|
||||
///
|
||||
/// When windowed rendering is enabled CEF will internally create a window or
|
||||
/// view to host the browser. In that case returning false (0) from do_close()
|
||||
/// will send the standard close notification to the browser's top-level owner
|
||||
/// window (e.g. WM_CLOSE on Windows, performClose: on OS X, "delete_event" on
|
||||
/// Linux or cef_window_delegate_t::can_close() callback from Views). If the
|
||||
/// browser's host window/view has already been destroyed (via view hierarchy
|
||||
/// tear-down, for example) then do_close() will not be called for that
|
||||
/// browser since is no longer possible to cancel the close.
|
||||
///
|
||||
/// When windowed rendering is disabled returning false (0) from do_close()
|
||||
/// will cause the browser object to be destroyed immediately.
|
||||
///
|
||||
/// If the browser's top-level owner window requires a non-standard close
|
||||
/// notification then send that notification from do_close() and return true
|
||||
/// (1).
|
||||
///
|
||||
/// The cef_life_span_handler_t::on_before_close() function will be called
|
||||
/// after do_close() (if do_close() is called) and immediately before the
|
||||
/// browser object is destroyed. The application should only exit after
|
||||
/// on_before_close() has been called for all existing browsers.
|
||||
///
|
||||
/// The below examples describe what should happen during window close when
|
||||
/// the browser is parented to an application-provided top-level window.
|
||||
///
|
||||
/// Example 1: Using cef_browser_host_t::try_close_browser(). This is
|
||||
/// recommended for clients using standard close handling and windows created
|
||||
/// on the browser process UI thread. 1. User clicks the window close button
|
||||
/// which sends a close notification
|
||||
/// to the application's top-level window.
|
||||
/// 2. Application's top-level window receives the close notification and
|
||||
/// calls TryCloseBrowser() (which internally calls CloseBrowser(false)).
|
||||
/// TryCloseBrowser() returns false so the client cancels the window
|
||||
/// close.
|
||||
/// 3. JavaScript 'onbeforeunload' handler executes and shows the close
|
||||
/// confirmation dialog (which can be overridden via
|
||||
/// CefJSDialogHandler::OnBeforeUnloadDialog()).
|
||||
/// 4. User approves the close. 5. JavaScript 'onunload' handler executes.
|
||||
/// 6. CEF sends a close notification to the application's top-level window
|
||||
/// (because DoClose() returned false by default).
|
||||
/// 7. Application's top-level window receives the close notification and
|
||||
/// calls TryCloseBrowser(). TryCloseBrowser() returns true so the client
|
||||
/// allows the window close.
|
||||
/// 8. Application's top-level window is destroyed. 9. Application's
|
||||
/// on_before_close() handler is called and the browser object
|
||||
/// is destroyed.
|
||||
/// 10. Application exits by calling cef_quit_message_loop() if no other
|
||||
/// browsers
|
||||
/// exist.
|
||||
///
|
||||
/// Example 2: Using cef_browser_host_t::CloseBrowser(false (0)) and
|
||||
/// implementing the do_close() callback. This is recommended for clients
|
||||
/// using non-standard close handling or windows that were not created on the
|
||||
/// browser process UI thread. 1. User clicks the window close button which
|
||||
/// sends a close notification
|
||||
/// to the application's top-level window.
|
||||
/// 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 close notification to the application's top-level window.
|
||||
/// 8. Application's top-level window receives the close notification and
|
||||
/// allows the window to close based on the flag from #6B.
|
||||
/// 9. Application's top-level window is destroyed. 10. Application's
|
||||
/// on_before_close() handler is called and the browser object
|
||||
/// is destroyed.
|
||||
/// 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 (other than IsValid, GetIdentifier or IsSame) after this callback
|
||||
/// returns. cef_frame_handler_t callbacks related to final main frame
|
||||
/// destruction will arrive after this callback and cef_browser_t::IsValid
|
||||
/// will return false (0) at that time. Any in-progress network requests
|
||||
/// associated with |browser| will be aborted when the browser is destroyed,
|
||||
/// and cef_resource_request_handler_t callbacks related to those requests may
|
||||
/// still arrive on the IO thread after this callback. See cef_frame_handler_t
|
||||
/// and 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_
|
126
include/capi/cef_load_handler_capi.h
Normal file
126
include/capi/cef_load_handler_capi.h
Normal file
@@ -0,0 +1,126 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=2713381c9969d7039e6c1a1ed2527e5aeb5425ce$
|
||||
//
|
||||
|
||||
#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_ref_counted_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 after a navigation has been committed and before the browser begins
|
||||
/// loading contents in the frame. The |frame| value will never be NULL --
|
||||
/// call the is_main() function to check if this frame is the main frame.
|
||||
/// |transition_type| provides information about the source of the navigation
|
||||
/// and an accurate value is only available in the browser process. Multiple
|
||||
/// frames may be loading at the same time. Sub-frames may start or continue
|
||||
/// loading after the main frame load has ended. This function will not be
|
||||
/// called for same page navigations (fragments, history state, etc.) or for
|
||||
/// navigations that fail or are canceled before commit. For notification of
|
||||
/// overall browser load status use OnLoadingStateChange instead.
|
||||
///
|
||||
void(CEF_CALLBACK* on_load_start)(struct _cef_load_handler_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
struct _cef_frame_t* frame,
|
||||
cef_transition_type_t transition_type);
|
||||
|
||||
///
|
||||
/// 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 not be called for same page navigations (fragments, history
|
||||
/// state, etc.) or for navigations that fail or are canceled before commit.
|
||||
/// 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 a navigation fails or is canceled. This function may be called
|
||||
/// by itself if before commit or in combination with OnLoadStart/OnLoadEnd if
|
||||
/// after commit. |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_
|
108
include/capi/cef_media_access_handler_capi.h
Normal file
108
include/capi/cef_media_access_handler_capi.h
Normal file
@@ -0,0 +1,108 @@
|
||||
// Copyright (c) 2022 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.
|
||||
//
|
||||
// $hash=91101808168ec0faf1f39b1924579e31478a6616$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_MEDIA_ACCESS_HANDLER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_MEDIA_ACCESS_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 media access
|
||||
// permission requests.
|
||||
///
|
||||
typedef struct _cef_media_access_callback_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_ref_counted_t base;
|
||||
|
||||
///
|
||||
// Call to allow or deny media access. If this callback was initiated in
|
||||
// response to a getUserMedia (indicated by
|
||||
// CEF_MEDIA_PERMISSION_DEVICE_AUDIO_CAPTURE and/or
|
||||
// CEF_MEDIA_PERMISSION_DEVICE_VIDEO_CAPTURE being set) the
|
||||
// |allowed_permissions| are required to match those given in
|
||||
// |required_permissions| in the OnRequestMediaAccessPermission.
|
||||
///
|
||||
void(CEF_CALLBACK* cont)(struct _cef_media_access_callback_t* self,
|
||||
int allowed_permissions);
|
||||
|
||||
///
|
||||
// Cancel the media access request.
|
||||
///
|
||||
void(CEF_CALLBACK* cancel)(struct _cef_media_access_callback_t* self);
|
||||
} cef_media_access_callback_t;
|
||||
|
||||
///
|
||||
// Implement this structure to handle events related to media access permission
|
||||
// requests. The functions of this structure will be called on the browser
|
||||
// process UI thread.
|
||||
///
|
||||
typedef struct _cef_media_access_handler_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_ref_counted_t base;
|
||||
|
||||
///
|
||||
// Called when a page requests permission to access media. |requesting_url| is
|
||||
// the URL requesting permission. Return true (1) and call
|
||||
// cef_media_access_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_media_access_permission)(
|
||||
struct _cef_media_access_handler_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
struct _cef_frame_t* frame,
|
||||
const cef_string_t* requesting_url,
|
||||
int32_t requested_permissions,
|
||||
struct _cef_media_access_callback_t* callback);
|
||||
} cef_media_access_handler_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_MEDIA_ACCESS_HANDLER_CAPI_H_
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user