Compare commits

...

41 Commits
6943 ... 2924

Author SHA1 Message Date
Marshall Greenblatt
97389a92ee Windows: Fix VS2010 compile error 2017-02-28 15:43:38 -05:00
Marshall Greenblatt
73d380a8ec cmake: Update target platform versions (issue #2109)
- macOS: Allow selection of 10.11 SDK and set target version to 10.9 SDK.
- Windows: Set target version to Windows 7.
2017-02-28 15:31:08 -05:00
Marshall Greenblatt
5b69bde650 Fix configuration of CefSettings.framework_dir_path (issue #2110) 2017-02-28 14:41:56 -05:00
Marshall Greenblatt
178f101bfb Windows: Fix AtExitManager assertion in SupervisedUserSettingsServiceFactory on shutdown when running with multi-threaded message loop (issue #1680) 2017-02-27 15:08:15 -05:00
Marshall Greenblatt
cdcdfa9991 Windows: Support crash upload URLs with query component (issue #1995) 2017-02-21 13:42:42 -05:00
Marshall Greenblatt
558741c384 Fix OSR popup transparency (issue #2099) 2017-02-15 16:04:57 -05:00
Marshall Greenblatt
067d91504f Fix error in browser_plugin_guest_1565.patch 2017-02-14 10:45:18 -05:00
Marshall Greenblatt
763ecb484f Fix SupervisedUserSettingsService initialization (issue #2093) 2017-02-13 17:23:50 -05:00
Marshall Greenblatt
4c4ae85089 Simplify OSR guest view implementation 2017-02-13 16:09:16 -05:00
Marshall Greenblatt
a6a3da2d53 Allow empty value param to CefSetCrashKeyValue (issue #1995) 2017-02-08 12:37:29 -05:00
Marshall Greenblatt
80258004b9 macOS: Fix issue with display of auto-hide scrollbars 2017-02-08 11:23:13 -05:00
Marshall Greenblatt
0ba0378d19 macOS: Generate correct framework and Info.plist version numbers (issue #1969) 2017-02-06 18:26:02 -05:00
Marshall Greenblatt
e5105d4e09 macOS: Fix incorrect OSR compositor resize in OnSwapCompositorFrame (issue #2065) 2017-02-06 16:36:22 -05:00
Marshall Greenblatt
d513424026 macOS: Add option for forwarding browser process crashes to the system crash reporter (issue #1995) 2017-02-06 14:23:59 -05:00
Marshall Greenblatt
06fde9995d macOS: Fix issue with display of auto-hide scrollbars 2017-02-03 15:00:54 -05:00
Marshall Greenblatt
271bb8bc31 macOS: Update xib files to 10.9 deployment target 2017-02-02 18:19:05 -05:00
Marshall Greenblatt
e7450f2fbc macOS: cefclient: Create Tests menu with Interface Builder 2017-02-02 15:58:42 -05:00
Marshall Greenblatt
872fbc07b5 Fix localization of default context menu labels (issue #2081) 2017-02-01 15:38:59 -05:00
Marshall Greenblatt
ebb70f94e8 Fix KeyedServiceFactory assertion during shutdown (issue #2083) 2017-01-31 17:43:15 -05:00
Marshall Greenblatt
1758b744b2 Fix crash using WebRTC with TLS certs (issue #2080) 2017-01-31 15:27:31 -05:00
Marshall Greenblatt
0ab2e20d44 Windows: Fix command line parsing for crash handler (issue #1995) 2017-01-30 16:17:03 -05:00
Marshall Greenblatt
d6b6d11ec4 Update to Chromium version 56.0.2924.76 2017-01-30 16:02:53 -05:00
Marshall Greenblatt
3561b8dfdb macOS: Support crash reporting from unbundled apps (issue #1532) 2017-01-27 17:05:41 -05:00
Marshall Greenblatt
da2209a6d8 macOS: Allow configuration of framework path (issue #1532) 2017-01-27 17:05:30 -05:00
Marshall Greenblatt
df1d25f0a9 Standardize product/version/platform crash keys (issue #1995) 2017-01-25 14:14:58 -05:00
Marshall Greenblatt
6d7f90ec51 Fix potential OSR crash on renderer process recreation (issue #2082) 2017-01-25 12:36:32 -05:00
Marshall Greenblatt
4bafa3e155 Add is_main_frame argument to CefRequestContextHandler::OnBeforePluginLoad (issue #2015) 2017-01-24 18:16:15 -05:00
Marshall Greenblatt
8dfe9574c4 Add CefContextMenuParams::GetTitleText method (issue #2030) 2017-01-17 13:21:51 -05:00
Marshall Greenblatt
d22b7ed179 Fix CefRequestHandler::OnCertificateError callback trigger (issue #2019) 2017-01-17 13:09:22 -05:00
Marshall Greenblatt
bb4812691e cefclient: Fix typo in TempWindow comments 2017-01-17 13:09:22 -05:00
Marshall Greenblatt
ff7f70442f Windows: Fix white flash during browser creation (issue #1984) 2017-01-13 16:44:25 -05:00
Marshall Greenblatt
288d2eb2e6 Windows: Fix AppName and ExternalHandler usage in crash_reporter.cfg (issue #1995) 2017-01-13 15:30:26 -05:00
Marshall Greenblatt
650a49b0a7 Add product name and version to crash_reporter.cfg (issue #1995) 2017-01-12 14:05:44 -05:00
Marshall Greenblatt
f7cc01059b Improve crashpad integration (issue #1995)
- Crash reporting is enabled and configured using a "crash_reporter.cfg"
  file. See comments in include/cef_crash_util.h and tools/crash_server.py
  for usage.
2017-01-12 14:05:31 -05:00
Marshall Greenblatt
0da94acdf2 Windows: Add missing crashpad initialization (issue #1995) 2017-01-12 14:05:15 -05:00
Marshall Greenblatt
5c07d06435 Update to Chromium version 56.0.2924.51 2017-01-11 18:22:19 -05:00
Marshall Greenblatt
e63e109489 Update copyright year on generated files 2017-01-10 19:26:34 -05:00
Marshall Greenblatt
bfdeccda52 Windows: Fix behavior of frameless windows with Views.
- Don't set InitParams::TRANSLUCENT_WINDOW. Setting this resulted in
  the WS_EX_COMPOSITED style being added and the WS_THICKFRAME style
  being removed, which disabled Aero Snap.
- Remove the non-client border to get a completely frameless window.
  Having a border is problematic because the top is drawn by Windows
  while the rest is drawn black. Having Windows draw part of the
  border is required to enable the window drop shadow (see
  HWNDMessageHandler::SetDwmFrameExtension).
- Delete the remove_caption patches which are no longer required.
2016-12-14 16:19:50 +01:00
Marshall Greenblatt
cf91961ff2 Windows: Fix missing InsertAllocatorDispatch symbol in cef_sandbox.lib (issue #2044) 2016-11-30 19:52:29 -05:00
Marshall Greenblatt
de18fc4292 Windows: Fix x64 build conversion from 'size_t' to 'int' error (issue #2054) 2016-11-30 15:24:10 -05:00
Marshall Greenblatt
b4216db56c Update to Chromium version 56.0.2924.10 2016-11-29 20:43:33 -05:00
717 changed files with 7400 additions and 10536 deletions

View File

@@ -120,6 +120,7 @@ if (is_mac) {
import("//build/config/mac/rules.gni")
import("//build_overrides/v8.gni")
import("//build/mac/tweak_info_plist.gni")
import("//build/util/version.gni")
import("//media/cdm/ppapi/cdm_paths.gni")
}
if (is_win) {
@@ -164,8 +165,45 @@ if (is_mac) {
#
if (is_mac) {
# TODO(cef): Generate this value using version.py.
cef_version = "99.77.34.5"
cef_commit_number = exec_script(
"//cef/tools/commit_number.py",
[ rebase_path("//cef", root_build_dir) ],
"trim string", [])
cef_version_file = "//cef/VERSION"
# The tweak_info_plist.py script requires a version number with 4 parts. CEF
# uses a version number with 3 parts so just set the last part to 0.
cef_plist_version = exec_script(
"//build/util/version.py",
[
"-f",
rebase_path(cef_version_file, root_build_dir),
"-f",
rebase_path(chrome_version_file, root_build_dir),
"-t",
"@CEF_MAJOR@.@BUILD@.${cef_commit_number}.0",
],
"trim string",
[ cef_version_file, chrome_version_file ])
# Need to be creative to match dylib version formatting requirements.
cef_dylib_version = exec_script(
"//build/util/version.py",
[
"-f",
rebase_path(cef_version_file, root_build_dir),
"-f",
rebase_path(chrome_version_file, root_build_dir),
"-t",
"@CEF_MAJOR@${cef_commit_number}.@BUILD_HI@.@BUILD_LO@",
"-e",
"BUILD_HI=int(BUILD)/256",
"-e",
"BUILD_LO=int(BUILD)%256",
],
"trim string",
[ cef_version_file, chrome_version_file ])
}
# Read file lists from gypi files. The gypi_to_gn.py script does not support
@@ -426,6 +464,8 @@ static_library("libcef_static") {
"libcef/common/content_client.h",
"libcef/common/crash_reporter_client.cc",
"libcef/common/crash_reporter_client.h",
"libcef/common/crash_reporting.cc",
"libcef/common/crash_reporting.h",
"libcef/common/drag_data_impl.cc",
"libcef/common/drag_data_impl.h",
"libcef/common/extensions/chrome_generated_schemas.cc",
@@ -558,6 +598,11 @@ static_library("libcef_static") {
"//third_party/WebKit/public/web",
]
public_deps = [
# Bring in feature flag defines.
"//cef/libcef/features",
]
deps = [
# Generate pack files and associated CEF header files.
":make_pack_header_resources",
@@ -633,7 +678,6 @@ static_library("libcef_static") {
"//printing/features",
"//skia",
"//storage/browser",
"//third_party/brotli",
"//third_party/cld",
"//third_party/hunspell",
"//third_party/leveldatabase",
@@ -679,6 +723,8 @@ static_library("libcef_static") {
"libcef/browser/osr/browser_platform_delegate_osr_win.cc",
"libcef/browser/osr/browser_platform_delegate_osr_win.h",
"libcef/browser/osr/render_widget_host_view_osr_win.cc",
"libcef/common/crash_reporting_win.cc",
"libcef/common/crash_reporting_win.h",
# Part of //chrome/utility.
"//chrome/utility/printing_handler.cc",
@@ -687,7 +733,6 @@ static_library("libcef_static") {
deps += [
"//chrome_elf",
"//components/crash/content/app:run_as_crashpad_handler",
]
}
@@ -730,6 +775,10 @@ static_library("libcef_static") {
]
}
if (is_win || is_mac) {
deps += [ "//third_party/crashpad/crashpad/handler:handler_lib" ]
}
if (use_x11) {
deps += [ "//ui/events/devices/x11" ]
}
@@ -1165,7 +1214,7 @@ if (is_mac) {
"--keystone=0",
"--scm=1",
"--version",
cef_version,
cef_plist_version,
"--branding",
cef_framework_name,
]
@@ -1252,7 +1301,13 @@ if (is_mac) {
# on one of the executables. However install_name_tool only operates
# in-place, which is problematic to express in GN. Instead, use rpath-based
# loading.
ldflags = [ "-Wl,-install_name,@rpath/Frameworks/$output_name.framework/$output_name" ]
ldflags = [
"-Wl,-install_name,@rpath/Frameworks/$output_name.framework/$output_name",
"-compatibility_version",
cef_dylib_version,
"-current_version",
cef_dylib_version,
]
if (is_component_build) {
# Set up the rpath for the framework so that it can find dylibs in the
@@ -1332,7 +1387,7 @@ if (is_mac) {
"--keystone=0",
"--scm=0",
"--version",
cef_version,
cef_plist_version,
]
}
@@ -1383,7 +1438,7 @@ if (is_mac) {
args = [
"--scm=1",
"--version",
cef_version,
cef_plist_version,
]
}

View File

@@ -7,5 +7,5 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
{
'chromium_checkout': '3a87aecc31cd1ffe751dd72c04e5a96a1fc8108a',
'chromium_checkout': 'refs/tags/56.0.2924.76',
}

View File

@@ -1,4 +1,4 @@
# Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
# Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights
# reserved. Use of this source code is governed by a BSD-style license that
# can be found in the LICENSE file.
#
@@ -21,6 +21,7 @@
'include/cef_command_line.h',
'include/cef_context_menu_handler.h',
'include/cef_cookie.h',
'include/cef_crash_util.h',
'include/cef_dialog_handler.h',
'include/cef_display_handler.h',
'include/cef_dom.h',
@@ -108,6 +109,7 @@
'include/capi/cef_command_line_capi.h',
'include/capi/cef_context_menu_handler_capi.h',
'include/capi/cef_cookie_capi.h',
'include/capi/cef_crash_util_capi.h',
'include/capi/cef_dialog_handler_capi.h',
'include/capi/cef_display_handler_capi.h',
'include/capi/cef_dom_capi.h',

View File

@@ -193,6 +193,8 @@
'tests/cefclient/browser/bytes_write_handler.cc',
'tests/cefclient/browser/bytes_write_handler.h',
'tests/cefclient/browser/client_app_delegates_browser.cc',
'tests/cefclient/browser/client_browser.cc',
'tests/cefclient/browser/client_browser.h',
'tests/cefclient/browser/client_handler.cc',
'tests/cefclient/browser/client_handler.h',
'tests/cefclient/browser/client_handler_osr.cc',

View File

@@ -268,7 +268,7 @@ if(OS_MACOSX)
# Find the newest available base SDK.
execute_process(COMMAND xcode-select --print-path OUTPUT_VARIABLE XCODE_PATH OUTPUT_STRIP_TRAILING_WHITESPACE)
foreach(OS_VERSION 10.10 10.9 10.8 10.7)
foreach(OS_VERSION 10.11 10.10 10.9)
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})
@@ -276,7 +276,7 @@ if(OS_MACOSX)
endforeach()
# Target SDK.
set(CEF_TARGET_SDK "10.7")
set(CEF_TARGET_SDK "10.9")
list(APPEND CEF_COMPILER_FLAGS
-mmacosx-version-min=${CEF_TARGET_SDK}
)
@@ -376,7 +376,7 @@ if(OS_WINDOWS)
list(APPEND CEF_COMPILER_DEFINES
WIN32 _WIN32 _WINDOWS # Windows platform
UNICODE _UNICODE # Unicode build
WINVER=0x0602 _WIN32_WINNT=0x602 # Targeting Windows 8
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

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -192,6 +192,14 @@ typedef struct _cef_context_menu_params_t {
int (CEF_CALLBACK *has_image_contents)(
struct _cef_context_menu_params_t* self);
///
// Returns the title text or the alt text if the context menu was invoked on
// an image.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_title_text)(
struct _cef_context_menu_params_t* self);
///
// Returns the URL of the top level page that the context menu was invoked on.
///

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -0,0 +1,152 @@
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the name Chromium Embedded
// Framework nor the names of its contributors may be used to endorse
// or promote products derived from this software without specific prior
// written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef CEF_INCLUDE_CAPI_CEF_CRASH_UTIL_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_CRASH_UTIL_CAPI_H_
#pragma once
#include "include/capi/cef_base_capi.h"
#ifdef __cplusplus
extern "C" {
#endif
///
// Crash reporting is configured using an INI-style config file named
// "crash_reporter.cfg". On Windows and Linux this file must be placed next to
// the main application executable. On macOS this file must be placed in the
// top-level app bundle Resources directory (e.g.
// "<appname>.app/Contents/Resources"). File contents are as follows:
//
// # Comments start with a hash character and must be on their own line.
//
// [Config]
// ProductName=<Value of the "prod" crash key; defaults to "cef">
// ProductVersion=<Value of the "ver" crash key; defaults to the CEF version>
// AppName=<Windows only; App-specific folder name component for storing crash
// information; default to "CEF">
// ExternalHandler=<Windows only; Name of the external handler exe to use
// instead of re-launching the main exe; default to empty>
// 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>
//
// Config section:
//
// If "ProductName" and/or "ProductVersion" are set then the specified values
// will be included in the crash dump metadata. On macOS if these values are set
// to NULL then they will be retrieved from the Info.plist file using the
// "CFBundleName" and "CFBundleShortVersionString" keys respectively.
//
// If "AppName" is set on Windows then crash report information (metrics,
// database and dumps) will be stored locally on disk under the
// "C:\Users\[CurrentUser]\AppData\Local\[AppName]\User Data" folder. On other
// platforms the CefSettings.user_data_path value will be used.
//
// If "ExternalHandler" is set on Windows then the specified exe will be
// launched as the crashpad-handler instead of re-launching the main process
// exe. The value can be an absolute path or a path relative to the main exe
// directory. On Linux the CefSettings.browser_subprocess_path value will be
// used. On macOS the existing subprocess app bundle will be used.
//
// If "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.
//
// CrashKeys section:
//
// Any number of crash keys can be specified for use by the application. Crash
// key values will be truncated based on the specified size (small = 63 bytes,
// medium = 252 bytes, large = 1008 bytes). The value of crash keys can be set
// from any thread or process using the CefSetCrashKeyValue function. These
// key/value pairs will be sent to the crash server along with the crash dump
// file. Medium and large values will be chunked for submission. For example, if
// your key is named "mykey" then the value will be broken into ordered chunks
// and submitted using keys named "mykey-1", "mykey-2", etc.
///
CEF_EXPORT int cef_crash_reporting_enabled();
///
// Sets or clears a specific key-value pair from the crash metadata.
///
CEF_EXPORT void cef_set_crash_key_value(const cef_string_t* key,
const cef_string_t* value);
#ifdef __cplusplus
}
#endif
#endif // CEF_INCLUDE_CAPI_CEF_CRASH_UTIL_CAPI_H_

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -70,23 +70,25 @@ typedef struct _cef_request_context_handler_t {
// Called on multiple browser process threads before a plugin instance is
// loaded. |mime_type| is the mime type of the plugin that will be loaded.
// |plugin_url| is the content URL that the plugin will load and may be NULL.
// |top_origin_url| is the URL for the top-level frame that contains the
// plugin when loading a specific plugin instance or NULL when building the
// initial list of enabled plugins for 'navigator.plugins' JavaScript state.
// |plugin_info| includes additional information about the plugin that will be
// loaded. |plugin_policy| is the recommended policy. Modify |plugin_policy|
// and return true (1) to change the policy. Return false (0) to use the
// recommended policy. The default plugin policy can be set at runtime using
// the `--plugin-policy=[allow|detect|block]` command-line flag. Decisions to
// mark a plugin as disabled by setting |plugin_policy| to
// PLUGIN_POLICY_DISABLED may be cached when |top_origin_url| is NULL. To
// purge the plugin list cache and potentially trigger new calls to this
// function call cef_request_tContext::PurgePluginListCache.
// |is_main_frame| will be true (1) if the plugin is being loaded in the main
// (top-level) frame, |top_origin_url| is the URL for the top-level frame that
// contains the plugin when loading a specific plugin instance or NULL when
// building the initial list of enabled plugins for 'navigator.plugins'
// JavaScript state. |plugin_info| includes additional information about the
// plugin that will be loaded. |plugin_policy| is the recommended policy.
// Modify |plugin_policy| and return true (1) to change the policy. Return
// false (0) to use the recommended policy. The default plugin policy can be
// set at runtime using the `--plugin-policy=[allow|detect|block]` command-
// line flag. Decisions to mark a plugin as disabled by setting
// |plugin_policy| to PLUGIN_POLICY_DISABLED may be cached when
// |top_origin_url| is NULL. To purge the plugin list cache and potentially
// trigger new calls to this function call
// cef_request_tContext::PurgePluginListCache.
///
int (CEF_CALLBACK *on_before_plugin_load)(
struct _cef_request_context_handler_t* self,
const cef_string_t* mime_type, const cef_string_t* plugin_url,
const cef_string_t* top_origin_url,
int is_main_frame, const cef_string_t* top_origin_url,
struct _cef_web_plugin_info_t* plugin_info,
cef_plugin_policy_t* plugin_policy);
} cef_request_context_handler_t;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@@ -195,6 +195,13 @@ class CefContextMenuParams : public virtual CefBase {
/*--cef()--*/
virtual bool HasImageContents() =0;
///
// Returns the title text or the alt text if the context menu was invoked on
// an image.
///
/*--cef()--*/
virtual CefString GetTitleText() = 0;
///
// Returns the URL of the top level page that the context menu was invoked on.
///

144
include/cef_crash_util.h Normal file
View File

@@ -0,0 +1,144 @@
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the name Chromium Embedded
// Framework nor the names of its contributors may be used to endorse
// or promote products derived from this software without specific prior
// written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// ---------------------------------------------------------------------------
//
// The contents of this file must follow a specific format in order to
// support the CEF translator tool. See the translator.README.txt file in the
// tools directory for more information.
//
#ifndef CEF_INCLUDE_CEF_CRASH_UTIL_H_
#define CEF_INCLUDE_CEF_CRASH_UTIL_H_
#pragma once
///
// Crash reporting is configured using an INI-style config file named
// "crash_reporter.cfg". On Windows and Linux this file must be placed next to
// the main application executable. On macOS this file must be placed in the
// top-level app bundle Resources directory (e.g.
// "<appname>.app/Contents/Resources"). File contents are as follows:
//
// # Comments start with a hash character and must be on their own line.
//
// [Config]
// ProductName=<Value of the "prod" crash key; defaults to "cef">
// ProductVersion=<Value of the "ver" crash key; defaults to the CEF version>
// AppName=<Windows only; App-specific folder name component for storing crash
// information; default to "CEF">
// ExternalHandler=<Windows only; Name of the external handler exe to use
// instead of re-launching the main exe; default to empty>
// 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>
//
// Config section:
//
// If "ProductName" and/or "ProductVersion" are set then the specified values
// will be included in the crash dump metadata. On macOS if these values are set
// to empty then they will be retrieved from the Info.plist file using the
// "CFBundleName" and "CFBundleShortVersionString" keys respectively.
//
// If "AppName" is set on Windows then crash report information (metrics,
// database and dumps) will be stored locally on disk under the
// "C:\Users\[CurrentUser]\AppData\Local\[AppName]\User Data" folder. On other
// platforms the CefSettings.user_data_path value will be used.
//
// If "ExternalHandler" is set on Windows then the specified exe will be
// launched as the crashpad-handler instead of re-launching the main process
// exe. The value can be an absolute path or a path relative to the main exe
// directory. On Linux the CefSettings.browser_subprocess_path value will be
// used. On macOS the existing subprocess app bundle will be used.
//
// If "BrowserCrashForwardingEnabled" is set to true 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 then crash report uploads will be rate
// limited as follows:
// 1. If "MaxUploadsPerDay" is set to a positive value then at most the
// specified number of crashes will be uploaded in each 24 hour period.
// 2. If crash upload fails due to a network or server error then an
// incremental backoff delay up to a maximum of 24 hours will be applied for
// retries.
// 3. If a backoff delay is applied and "MaxUploadsPerDay" is > 1 then the
// "MaxUploadsPerDay" value will be reduced to 1 until the client is
// restarted. This helps to avoid an upload flood when the network or
// server error is resolved.
// Rate limiting is not supported on Linux.
//
// If "MaxDatabaseSizeInMb" is set to a positive value then crash report storage
// on disk will be limited to that size in megabytes. For example, on Windows
// each dump is about 600KB so a "MaxDatabaseSizeInMb" value of 20 equates to
// about 34 crash reports stored on disk. Not supported on Linux.
//
// If "MaxDatabaseAgeInDays" is set to a positive value then crash reports older
// than the specified age in days will be deleted. Not supported on Linux.
//
// CrashKeys section:
//
// Any number of crash keys can be specified for use by the application. Crash
// key values will be truncated based on the specified size (small = 63 bytes,
// medium = 252 bytes, large = 1008 bytes). The value of crash keys can be set
// from any thread or process using the CefSetCrashKeyValue function. These
// key/value pairs will be sent to the crash server along with the crash dump
// file. Medium and large values will be chunked for submission. For example,
// if your key is named "mykey" then the value will be broken into ordered
// chunks and submitted using keys named "mykey-1", "mykey-2", etc.
///
/*--cef()--*/
bool CefCrashReportingEnabled();
#include "include/cef_base.h"
///
// Sets or clears a specific key-value pair from the crash metadata.
///
/*--cef(optional_param=value)--*/
void CefSetCrashKeyValue(const CefString& key, const CefString& value);
#endif // CEF_INCLUDE_CEF_CRASH_UTIL_H_

View File

@@ -64,22 +64,24 @@ class CefRequestContextHandler : public virtual CefBase {
// Called on multiple browser process threads before a plugin instance is
// loaded. |mime_type| is the mime type of the plugin that will be loaded.
// |plugin_url| is the content URL that the plugin will load and may be empty.
// |top_origin_url| is the URL for the top-level frame that contains the
// plugin when loading a specific plugin instance or empty when building the
// initial list of enabled plugins for 'navigator.plugins' JavaScript state.
// |plugin_info| includes additional information about the plugin that will be
// loaded. |plugin_policy| is the recommended policy. Modify |plugin_policy|
// and return true to change the policy. Return false to use the recommended
// policy. The default plugin policy can be set at runtime using the
// `--plugin-policy=[allow|detect|block]` command-line flag. Decisions to mark
// a plugin as disabled by setting |plugin_policy| to PLUGIN_POLICY_DISABLED
// may be cached when |top_origin_url| is empty. To purge the plugin list
// cache and potentially trigger new calls to this method call
// CefRequestContext::PurgePluginListCache.
// |is_main_frame| will be true if the plugin is being loaded in the main
// (top-level) frame, |top_origin_url| is the URL for the top-level frame that
// contains the plugin when loading a specific plugin instance or empty when
// building the initial list of enabled plugins for 'navigator.plugins'
// JavaScript state. |plugin_info| includes additional information about the
// plugin that will be loaded. |plugin_policy| is the recommended policy.
// Modify |plugin_policy| and return true to change the policy. Return false
// to use the recommended policy. The default plugin policy can be set at
// runtime using the `--plugin-policy=[allow|detect|block]` command-line flag.
// Decisions to mark a plugin as disabled by setting |plugin_policy| to
// PLUGIN_POLICY_DISABLED may be cached when |top_origin_url| is empty. To
// purge the plugin list cache and potentially trigger new calls to this
// method call CefRequestContext::PurgePluginListCache.
///
/*--cef(optional_param=plugin_url,optional_param=top_origin_url)--*/
virtual bool OnBeforePluginLoad(const CefString& mime_type,
const CefString& plugin_url,
bool is_main_frame,
const CefString& top_origin_url,
CefRefPtr<CefWebPluginInfo> plugin_info,
PluginPolicy* plugin_policy) {

View File

@@ -166,12 +166,23 @@ typedef struct _cef_settings_t {
///
// The path to a separate executable that will be launched for sub-processes.
// By default the browser process executable is used. See the comments on
// CefExecuteProcess() for details. Also configurable using the
// "browser-subprocess-path" command-line switch.
// If this value is empty on Windows or Linux then the main process executable
// will be used. If this value is empty on macOS then a helper executable must
// exist at "Contents/Frameworks/<app> Helper.app/Contents/MacOS/<app> Helper"
// in the top-level app bundle. See the comments on CefExecuteProcess() for
// details. Also configurable using the "browser-subprocess-path" command-line
// switch.
///
cef_string_t browser_subprocess_path;
///
// The path to the CEF framework directory on macOS. If this value is empty
// then the framework must exist at "Contents/Frameworks/Chromium Embedded
// Framework.framework" in the top-level app bundle. Also configurable using
// the "framework-dir-path" command-line switch.
///
cef_string_t framework_dir_path;
///
// Set to true (1) to have the browser process message loop run in a separate
// thread. If false (0) than the CefDoMessageLoopWork() function must be

View File

@@ -555,6 +555,7 @@ struct CefSettingsTraits {
static inline void clear(struct_type* s) {
cef_string_clear(&s->browser_subprocess_path);
cef_string_clear(&s->framework_dir_path);
cef_string_clear(&s->cache_path);
cef_string_clear(&s->user_data_path);
cef_string_clear(&s->user_agent);
@@ -574,6 +575,9 @@ struct CefSettingsTraits {
cef_string_set(src->browser_subprocess_path.str,
src->browser_subprocess_path.length,
&target->browser_subprocess_path, copy);
cef_string_set(src->framework_dir_path.str,
src->framework_dir_path.length,
&target->framework_dir_path, copy);
target->multi_threaded_message_loop = src->multi_threaded_message_loop;
target->external_message_pump = src->external_message_pump;
target->windowless_rendering_enabled = src->windowless_rendering_enabled;
@@ -982,7 +986,8 @@ struct CefCompositionUnderlineTraits {
typedef cef_composition_underline_t struct_type;
static inline void init(struct_type* s) {
s->range = {0, 0};
s->range.from = 0;
s->range.to = 0;
s->color = 0;
s->background_color = 0;
s->thick = 0;

View File

@@ -2233,26 +2233,13 @@ bool CefBrowserHostImpl::CanDragEnter(
return true;
}
bool CefBrowserHostImpl::ShouldCreateWebContents(
void CefBrowserHostImpl::GetCustomWebContentsView(
content::WebContents* web_contents,
int route_id,
int main_frame_route_id,
int32_t main_frame_widget_route_id,
WindowContainerType window_container_type,
const std::string& frame_name,
const GURL& target_url,
const std::string& partition_id,
content::SessionStorageNamespace* session_storage_namespace,
content::WebContentsView** view,
content::RenderViewHostDelegateView** delegate_view) {
// In cases where the navigation will occur in a new render process the
// |route_id| value will be MSG_ROUTING_NONE here (because the existing
// renderer will not be able to communicate with the new renderer) and
// OpenURLFromTab will be called after WebContentsCreated.
CefBrowserInfoManager::GetInstance()->ShouldCreateWebContents(
CefBrowserInfoManager::GetInstance()->GetCustomWebContentsView(
web_contents, target_url, view, delegate_view);
return true;
}
void CefBrowserHostImpl::WebContentsCreated(

View File

@@ -402,16 +402,9 @@ class CefBrowserHostImpl : public CefBrowserHost,
content::WebContents* source,
const content::DropData& data,
blink::WebDragOperationsMask operations_allowed) override;
bool ShouldCreateWebContents(
void GetCustomWebContentsView(
content::WebContents* web_contents,
int route_id,
int main_frame_route_id,
int32_t main_frame_widget_route_id,
WindowContainerType window_container_type,
const std::string& frame_name,
const GURL& target_url,
const std::string& partition_id,
content::SessionStorageNamespace* session_storage_namespace,
content::WebContentsView** view,
content::RenderViewHostDelegateView** delegate_view) override;
void WebContentsCreated(content::WebContents* source_contents,

View File

@@ -257,7 +257,7 @@ bool CefBrowserInfoManager::CanCreateWindow(
return allow;
}
void CefBrowserInfoManager::ShouldCreateWebContents(
void CefBrowserInfoManager::GetCustomWebContentsView(
content::WebContents* web_contents,
const GURL& target_url,
content::WebContentsView** view,
@@ -276,7 +276,7 @@ void CefBrowserInfoManager::ShouldCreateWebContents(
}
pending_popup->step =
CefBrowserInfoManager::PendingPopup::SHOULD_CREATE_WEB_CONTENTS;
CefBrowserInfoManager::PendingPopup::GET_CUSTOM_WEB_CONTENTS_VIEW;
PushPendingPopup(std::move(pending_popup));
}
@@ -292,7 +292,7 @@ void CefBrowserInfoManager::WebContentsCreated(
std::unique_ptr<CefBrowserInfoManager::PendingPopup> pending_popup =
PopPendingPopup(
CefBrowserInfoManager::PendingPopup::SHOULD_CREATE_WEB_CONTENTS,
CefBrowserInfoManager::PendingPopup::GET_CUSTOM_WEB_CONTENTS_VIEW,
source_contents->GetRenderViewHost()->GetProcess()->GetID(),
source_contents->GetRenderViewHost()->GetRoutingID(),
target_url);

View File

@@ -72,9 +72,9 @@ class CefBrowserInfoManager : public content::RenderProcessHostObserver {
int opener_render_frame_id,
bool* no_javascript_access);
// Called from CefBrowserHostImpl::ShouldCreateWebContents. See comments on
// Called from CefBrowserHostImpl::GetCustomWebContentsView. See comments on
// PendingPopup for more information.
void ShouldCreateWebContents(
void GetCustomWebContentsView(
content::WebContents* web_contents,
const GURL& target_url,
content::WebContentsView** view,
@@ -138,7 +138,7 @@ class CefBrowserInfoManager : public content::RenderProcessHostObserver {
// an extension guest view then the popup is canceled and
// CefBrowserHostImpl::OpenURLFromTab is called.
// And then the following calls may occur at the same time:
// - CefBrowserHostImpl::ShouldCreateWebContents (UIT)
// - CefBrowserHostImpl::GetCustomWebContentsView (UIT)
// Creates the OSR views for windowless popups.
// - CefBrowserHostImpl::WebContentsCreated (UIT)
// Creates the CefBrowserHostImpl representation for the popup.
@@ -150,7 +150,7 @@ class CefBrowserInfoManager : public content::RenderProcessHostObserver {
// to differentiate between them at different processing steps.
enum Step {
CAN_CREATE_WINDOW,
SHOULD_CREATE_WEB_CONTENTS
GET_CUSTOM_WEB_CONTENTS_VIEW,
} step;
// Initial state from ViewHostMsg_CreateWindow.
@@ -170,11 +170,11 @@ class CefBrowserInfoManager : public content::RenderProcessHostObserver {
std::unique_ptr<CefBrowserPlatformDelegate> platform_delegate;
};
// Between the calls to CanCreateWindow and ShouldCreateWebContents
// Between the calls to CanCreateWindow and GetCustomWebContentsView
// RenderViewHostImpl::CreateNewWindow() will call
// RenderProcessHostImpl::FilterURL() which, in the case of "javascript:"
// URIs, rewrites the URL to "about:blank". We need to apply the same filter
// otherwise ShouldCreateWebContents will fail to retrieve the PopupInfo.
// otherwise GetCustomWebContentsView will fail to retrieve the PopupInfo.
static void FilterPendingPopupURL(
int render_process_id,
std::unique_ptr<PendingPopup> pending_popup);

Some files were not shown because too many files have changed in this diff Show More