Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e6424fe

Browse filesBrowse files
committed
Update to Chromium 55.0.2883.87 and CEF 3.2883.1554.gf984155 (v55.3).
Changes: * Add is_main_frame param in RequestHandler._OnBeforePluginLoad * Crash reporting (crashpad) configurable using crash_reporter.cfg file, see src/include/cef_crash_util.h and upstream cef/tools/crash_server.py for more details. Upstream [Issue #1995](https://bitbucket.org/chromiumembedded/cef/issues/1995/migrate-from-breakpad-to-crashpad). * Fix CefRequestHandler::OnCertificateError callback trigger * Fix potential OSR crash on renderer process recreation
1 parent e452fdc commit e6424fe
Copy full SHA for e6424fe

File tree

Expand file treeCollapse file tree

12 files changed

+200
-45
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

12 files changed

+200
-45
lines changed
Open diff view settings
Collapse file

‎api/RequestHandler.md‎

Copy file name to clipboardExpand all lines: api/RequestHandler.md
+15-12Lines changed: 15 additions & 12 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ this on Linux.
244244
| browser | [Browser](Browser.md) |
245245
| mime_type | string |
246246
| plugin_url | string |
247+
| is_main_frame | bool |
247248
| top_origin_url | string |
248249
| plugin_info | [WebPluginInfo](WebPluginInfo.md) |
249250
| __Return__ | bool |
@@ -252,18 +253,20 @@ Description from upstream CEF:
252253
> Called on multiple browser process threads before a plugin instance is
253254
> loaded. |mime_type| is the mime type of the plugin that will be loaded.
254255
> |plugin_url| is the content URL that the plugin will load and may be empty.
255-
> |top_origin_url| is the URL for the top-level frame that contains the
256-
> plugin when loading a specific plugin instance or empty when building the
257-
> initial list of enabled plugins for 'navigator.plugins' JavaScript state.
258-
> |plugin_info| includes additional information about the plugin that will be
259-
> loaded. |plugin_policy| is the recommended policy. Modify |plugin_policy|
260-
> and return true to change the policy. Return false to use the recommended
261-
> policy. The default plugin policy can be set at runtime using the
262-
> `--plugin-policy=[allow|detect|block]` command-line flag. Decisions to mark
263-
> a plugin as disabled by setting |plugin_policy| to PLUGIN_POLICY_DISABLED
264-
> may be cached when |top_origin_url| is empty. To purge the plugin list
265-
> cache and potentially trigger new calls to this method call
266-
> CefRequestContext::PurgePluginListCache.
256+
> |is_main_frame| will be true if the plugin is being loaded in the main
257+
> (top-level) frame, |top_origin_url| is the URL for the top-level frame that
258+
> contains the plugin when loading a specific plugin instance or empty when
259+
> building the initial list of enabled plugins for 'navigator.plugins'
260+
> JavaScript state. |plugin_info| includes additional information about the
261+
> plugin that will be loaded. |plugin_policy| is the recommended policy.
262+
> Modify |plugin_policy| and return true to change the policy. Return false
263+
> to use the recommended policy. The default plugin policy can be set at
264+
> runtime using the `--plugin-policy=[allow|detect|block]` command-line flag.
265+
> Decisions to mark a plugin as disabled by setting |plugin_policy| to
266+
> PLUGIN_POLICY_DISABLED may be cached when |top_origin_url| is empty. To
267+
> purge the plugin list cache and potentially trigger new calls to this
268+
> method call CefRequestContext::PurgePluginListCache.
269+
267270

268271
Return True to block loading of the plugin.
269272

Collapse file

‎api/WebPluginInfo.md‎

Copy file name to clipboardExpand all lines: api/WebPluginInfo.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# WebPluginInfo (object)
55

6-
See [RequestHandler](RequestHandler.md).OnBeforePluginLoad().
6+
See also [RequestHandler](RequestHandler.md)._OnBeforePluginLoad().
77

88
Web Plugin API available in upstream CEF, but not yet exposed in CEF Python
99
(see src/include/cef_web_plugin.h):
Collapse file

‎patches/issue125.patch‎

Copy file name to clipboardExpand all lines: patches/issue125.patch
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git http_cache_transaction.cc http_cache_transaction.cc
2-
index 370862d..e63aecf 100644
2+
index 45f3db6aed3c..373b1e3c5b45 100644
33
--- http_cache_transaction.cc
44
+++ http_cache_transaction.cc
5-
@@ -2548,7 +2548,8 @@ int HttpCache::Transaction::WriteResponseInfoToEntry(bool truncated) {
5+
@@ -2552,7 +2552,8 @@ int HttpCache::Transaction::WriteResponseInfoToEntry(bool truncated) {
66
// blocking page is shown. An alternative would be to reverse-map the cert
77
// status to a net error and replay the net error.
88
if ((response_.headers->HasHeaderValue("cache-control", "no-store")) ||
Collapse file

‎patches/issue231.patch‎

Copy file name to clipboardExpand all lines: patches/issue231.patch
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git include/capi/cef_path_util_capi.h include/capi/cef_path_util_capi.h
2-
index 23befacc..de31b3d6 100644
2+
index de99ebd8..dd2f21c5 100644
33
--- include/capi/cef_path_util_capi.h
44
+++ include/capi/cef_path_util_capi.h
55
@@ -51,6 +51,16 @@ extern "C" {
@@ -83,10 +83,10 @@ index 6a759309..ad620d7f 100644
8383
+ return PathService::Override(pref_key, file_path);
8484
+}
8585
diff --git libcef_dll/libcef_dll.cc libcef_dll/libcef_dll.cc
86-
index 2e353f5b..f18e89b5 100644
86+
index cc1aafe5..bde00c09 100644
8787
--- libcef_dll/libcef_dll.cc
8888
+++ libcef_dll/libcef_dll.cc
89-
@@ -899,6 +899,23 @@ CEF_EXPORT int cef_get_path(cef_path_key_t key, cef_string_t* path) {
89+
@@ -930,6 +930,23 @@ CEF_EXPORT int cef_get_path(cef_path_key_t key, cef_string_t* path) {
9090
return _retval;
9191
}
9292

@@ -111,10 +111,10 @@ index 2e353f5b..f18e89b5 100644
111111
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
112112

113113
diff --git libcef_dll/wrapper/libcef_dll_wrapper.cc libcef_dll/wrapper/libcef_dll_wrapper.cc
114-
index 5e6ba876..be6e5af6 100644
114+
index 08ddbd83..42e7dca1 100644
115115
--- libcef_dll/wrapper/libcef_dll_wrapper.cc
116116
+++ libcef_dll/wrapper/libcef_dll_wrapper.cc
117-
@@ -820,6 +820,23 @@ CEF_GLOBAL bool CefGetPath(PathKey key, CefString& path) {
117+
@@ -851,6 +851,23 @@ CEF_GLOBAL bool CefGetPath(PathKey key, CefString& path) {
118118
return _retval?true:false;
119119
}
120120

Collapse file

‎src/client_handler/request_context_handler.cpp‎

Copy file name to clipboardExpand all lines: src/client_handler/request_context_handler.cpp
+7-2Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,16 @@ CefRefPtr<CefCookieManager> RequestContextHandler::GetCookieManager() {
2525
bool RequestContextHandler::OnBeforePluginLoad(
2626
const CefString& mime_type,
2727
const CefString& plugin_url,
28+
bool is_main_frame,
2829
const CefString& top_origin_url,
2930
CefRefPtr<CefWebPluginInfo> plugin_info,
3031
PluginPolicy* plugin_policy) {
3132
// Called on multiple threads
32-
return RequestHandler_OnBeforePluginLoad(browser_, mime_type, plugin_url,
33-
top_origin_url, plugin_info,
33+
return RequestHandler_OnBeforePluginLoad(browser_,
34+
mime_type,
35+
plugin_url,
36+
is_main_frame,
37+
top_origin_url,
38+
plugin_info,
3439
plugin_policy);
3540
}
Collapse file

‎src/client_handler/request_context_handler.h‎

Copy file name to clipboardExpand all lines: src/client_handler/request_context_handler.h
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class RequestContextHandler :
3232
virtual CefRefPtr<CefCookieManager> GetCookieManager() OVERRIDE;
3333
virtual bool OnBeforePluginLoad(const CefString& mime_type,
3434
const CefString& plugin_url,
35+
bool is_main_frame,
3536
const CefString& top_origin_url,
3637
CefRefPtr<CefWebPluginInfo> plugin_info,
3738
PluginPolicy* plugin_policy) OVERRIDE;
Collapse file

‎src/handlers/request_handler.pyx‎

Copy file name to clipboardExpand all lines: src/handlers/request_handler.pyx
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ cdef public cpp_bool RequestHandler_OnBeforePluginLoad(
347347
CefRefPtr[CefBrowser] browser,
348348
const CefString& mime_type,
349349
const CefString& plugin_url,
350+
cpp_bool is_main_frame,
350351
const CefString& top_origin_url,
351352
CefRefPtr[CefWebPluginInfo] plugin_info,
352353
cef_types.cef_plugin_policy_t* plugin_policy
@@ -364,6 +365,7 @@ cdef public cpp_bool RequestHandler_OnBeforePluginLoad(
364365
browser=py_browser,
365366
mime_type=CefToPyString(mime_type),
366367
plugin_url=CefToPyString(plugin_url),
368+
is_main_frame=bool(is_main_frame),
367369
top_origin_url=CefToPyString(top_origin_url),
368370
plugin_info=py_plugin_info)
369371
if returnValue:
Collapse file

‎src/include/cef_context_menu_handler.h‎

Copy file name to clipboardExpand all lines: src/include/cef_context_menu_handler.h
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,13 @@ class CefContextMenuParams : public virtual CefBase {
195195
/*--cef()--*/
196196
virtual bool HasImageContents() =0;
197197

198+
///
199+
// Returns the title text or the alt text if the context menu was invoked on
200+
// an image.
201+
///
202+
/*--cef()--*/
203+
virtual CefString GetTitleText() = 0;
204+
198205
///
199206
// Returns the URL of the top level page that the context menu was invoked on.
200207
///
Collapse file

‎src/include/cef_crash_util.h‎

Copy file name to clipboard
+135Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
2+
//
3+
// Redistribution and use in source and binary forms, with or without
4+
// modification, are permitted provided that the following conditions are
5+
// met:
6+
//
7+
// * Redistributions of source code must retain the above copyright
8+
// notice, this list of conditions and the following disclaimer.
9+
// * Redistributions in binary form must reproduce the above
10+
// copyright notice, this list of conditions and the following disclaimer
11+
// in the documentation and/or other materials provided with the
12+
// distribution.
13+
// * Neither the name of Google Inc. nor the name Chromium Embedded
14+
// Framework nor the names of its contributors may be used to endorse
15+
// or promote products derived from this software without specific prior
16+
// written permission.
17+
//
18+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
//
30+
// ---------------------------------------------------------------------------
31+
//
32+
// The contents of this file must follow a specific format in order to
33+
// support the CEF translator tool. See the translator.README.txt file in the
34+
// tools directory for more information.
35+
//
36+
37+
#ifndef CEF_INCLUDE_CEF_CRASH_UTIL_H_
38+
#define CEF_INCLUDE_CEF_CRASH_UTIL_H_
39+
#pragma once
40+
41+
///
42+
// Crash reporting is configured using an INI-style config file named
43+
// "crash_reporter.cfg". On Windows and Linux this file must be placed next to
44+
// the main application executable. On macOS this file must be placed in the
45+
// top-level app bundle Resources directory (e.g.
46+
// "<appname>.app/Contents/Resources"). File contents are as follows:
47+
//
48+
// # Comments start with a hash character and must be on their own line.
49+
//
50+
// [Config]
51+
// ProductName=<Value of the "prod" crash key; defaults to "cef">
52+
// ProductVersion=<Value of the "ver" crash key; defaults to the CEF version>
53+
// AppName=<Windows only; App-specific folder name component for storing crash
54+
// information; default to "CEF">
55+
// ExternalHandler=<Windows only; Name of the external handler exe to use
56+
// instead of re-launching the main exe; default to empty>
57+
// ServerURL=<crash server URL; default to empty>
58+
// RateLimitEnabled=<True if uploads should be rate limited; default to true>
59+
// MaxUploadsPerDay=<Max uploads per 24 hours, used if rate limit is enabled;
60+
// default to 5>
61+
// MaxDatabaseSizeInMb=<Total crash report disk usage greater than this value
62+
// will cause older reports to be deleted; default to 20>
63+
// MaxDatabaseAgeInDays=<Crash reports older than this value will be deleted;
64+
// default to 5>
65+
//
66+
// [CrashKeys]
67+
// my_key1=<small|medium|large>
68+
// my_key2=<small|medium|large>
69+
//
70+
// Config section:
71+
//
72+
// If "ProductName" and/or "ProductVersion" are set then the specified values
73+
// will be included in the crash dump metadata. On macOS if these values are set
74+
// to empty then they will be retrieved from the Info.plist file using the
75+
// "CFBundleName" and "CFBundleShortVersionString" keys respectively.
76+
//
77+
// If "AppName" is set on Windows then crash report information (metrics,
78+
// database and dumps) will be stored locally on disk under the
79+
// "C:\Users\[CurrentUser]\AppData\Local\[AppName]\User Data" folder. On other
80+
// platforms the CefSettings.user_data_path value will be used.
81+
//
82+
// If "ExternalHandler" is set on Windows then the specified exe will be
83+
// launched as the crashpad-handler instead of re-launching the main process
84+
// exe. The value can be an absolute path or a path relative to the main exe
85+
// directory. On Linux the CefSettings.browser_subprocess_path value will be
86+
// used. On macOS the existing subprocess app bundle will be used.
87+
//
88+
// If "ServerURL" is set then crashes will be uploaded as a multi-part POST
89+
// request to the specified URL. Otherwise, reports will only be stored locally
90+
// on disk.
91+
//
92+
// If "RateLimitEnabled" is set to true then crash report uploads will be rate
93+
// limited as follows:
94+
// 1. If "MaxUploadsPerDay" is set to a positive value then at most the
95+
// specified number of crashes will be uploaded in each 24 hour period.
96+
// 2. If crash upload fails due to a network or server error then an
97+
// incremental backoff delay up to a maximum of 24 hours will be applied for
98+
// retries.
99+
// 3. If a backoff delay is applied and "MaxUploadsPerDay" is > 1 then the
100+
// "MaxUploadsPerDay" value will be reduced to 1 until the client is
101+
// restarted. This helps to avoid an upload flood when the network or
102+
// server error is resolved.
103+
// Rate limiting is not supported on Linux.
104+
//
105+
// If "MaxDatabaseSizeInMb" is set to a positive value then crash report storage
106+
// on disk will be limited to that size in megabytes. For example, on Windows
107+
// each dump is about 600KB so a "MaxDatabaseSizeInMb" value of 20 equates to
108+
// about 34 crash reports stored on disk. Not supported on Linux.
109+
//
110+
// If "MaxDatabaseAgeInDays" is set to a positive value then crash reports older
111+
// than the specified age in days will be deleted. Not supported on Linux.
112+
//
113+
// CrashKeys section:
114+
//
115+
// Any number of crash keys can be specified for use by the application. Crash
116+
// key values will be truncated based on the specified size (small = 63 bytes,
117+
// medium = 252 bytes, large = 1008 bytes). The value of crash keys can be set
118+
// from any thread or process using the CefSetCrashKeyValue function. These
119+
// key/value pairs will be sent to the crash server along with the crash dump
120+
// file. Medium and large values will be chunked for submission. For example,
121+
// if your key is named "mykey" then the value will be broken into ordered
122+
// chunks and submitted using keys named "mykey-1", "mykey-2", etc.
123+
///
124+
/*--cef()--*/
125+
bool CefCrashReportingEnabled();
126+
127+
#include "include/cef_base.h"
128+
129+
///
130+
// Sets or clears a specific key-value pair from the crash metadata.
131+
///
132+
/*--cef()--*/
133+
void CefSetCrashKeyValue(const CefString& key, const CefString& value);
134+
135+
#endif // CEF_INCLUDE_CEF_CRASH_UTIL_H_
Collapse file

‎src/include/cef_request_context_handler.h‎

Copy file name to clipboardExpand all lines: src/include/cef_request_context_handler.h
+14-12Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,22 +64,24 @@ class CefRequestContextHandler : public virtual CefBase {
6464
// Called on multiple browser process threads before a plugin instance is
6565
// loaded. |mime_type| is the mime type of the plugin that will be loaded.
6666
// |plugin_url| is the content URL that the plugin will load and may be empty.
67-
// |top_origin_url| is the URL for the top-level frame that contains the
68-
// plugin when loading a specific plugin instance or empty when building the
69-
// initial list of enabled plugins for 'navigator.plugins' JavaScript state.
70-
// |plugin_info| includes additional information about the plugin that will be
71-
// loaded. |plugin_policy| is the recommended policy. Modify |plugin_policy|
72-
// and return true to change the policy. Return false to use the recommended
73-
// policy. The default plugin policy can be set at runtime using the
74-
// `--plugin-policy=[allow|detect|block]` command-line flag. Decisions to mark
75-
// a plugin as disabled by setting |plugin_policy| to PLUGIN_POLICY_DISABLED
76-
// may be cached when |top_origin_url| is empty. To purge the plugin list
77-
// cache and potentially trigger new calls to this method call
78-
// CefRequestContext::PurgePluginListCache.
67+
// |is_main_frame| will be true if the plugin is being loaded in the main
68+
// (top-level) frame, |top_origin_url| is the URL for the top-level frame that
69+
// contains the plugin when loading a specific plugin instance or empty when
70+
// building the initial list of enabled plugins for 'navigator.plugins'
71+
// JavaScript state. |plugin_info| includes additional information about the
72+
// plugin that will be loaded. |plugin_policy| is the recommended policy.
73+
// Modify |plugin_policy| and return true to change the policy. Return false
74+
// to use the recommended policy. The default plugin policy can be set at
75+
// runtime using the `--plugin-policy=[allow|detect|block]` command-line flag.
76+
// Decisions to mark a plugin as disabled by setting |plugin_policy| to
77+
// PLUGIN_POLICY_DISABLED may be cached when |top_origin_url| is empty. To
78+
// purge the plugin list cache and potentially trigger new calls to this
79+
// method call CefRequestContext::PurgePluginListCache.
7980
///
8081
/*--cef(optional_param=plugin_url,optional_param=top_origin_url)--*/
8182
virtual bool OnBeforePluginLoad(const CefString& mime_type,
8283
const CefString& plugin_url,
84+
bool is_main_frame,
8385
const CefString& top_origin_url,
8486
CefRefPtr<CefWebPluginInfo> plugin_info,
8587
PluginPolicy* plugin_policy) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.