Skip to content

Commit 1da0110

Browse files
committed
Update to Chrome 54.0.2840.99 and CEF 3.2840.1518.gffd843c (cztomczak#272).
Update to Cython 0.25.2 (cztomczak#110). Changes in API: - Add ApplicationSettings.net_security_expiration_enabled Key changes in upstream CEF between commits 7fe3d03...ffd843c (CEF Python 54.0 ... 54.1): - Update to Chromium version 54.0.2840.99 - Fix PDF rendering with OSR - Add CefRequestHandler::OnSelectClientCertificate (allows for client certificate selection programmatically) - Fix load error when using Request->SetUrl when url contains double byte characters - Fix crash related to channel ID support, disable channel ID support - Net security (CT, HSTS) expiration based on build age is now disabled by default. Configurable with CefSettings.enable_net_security_expiration. - New web plugin API: CefRegisterCdmCallback, CefRegisterWidevineCdm
1 parent 6ffb865 commit 1da0110

25 files changed

+361
-73
lines changed

api/ApplicationSettings.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,20 @@ only supported on Windows.
283283
This option is not and cannot be supported on OS-X for architectural reasons.
284284

285285

286+
### net_security_expiration_enabled
287+
288+
(bool)
289+
Set to true (1) to enable date-based expiration of built in network
290+
security information (i.e. certificate transparency logs, HSTS preloading
291+
and pinning information). Enabling this option improves network security
292+
but may cause HTTPS load failures when using CEF binaries built more than
293+
10 weeks in the past. See https://www.certificate-transparency.org/ and
294+
https://www.chromium.org/hsts for details. Also configurable using the
295+
"enable-net-security-expiration" command-line switch. Can be overridden for
296+
individual CefRequestContext instances via the
297+
CefRequestContextSettings.enable_net_security_expiration value.
298+
299+
286300
### pack_loading_disabled
287301

288302
(bool)

api/RequestHandler.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@
55

66
Implement this interface to handle events related to browser requests.
77

8-
For an example of how to implement handler see [cefpython](cefpython.md).CreateBrowser(). For a list of all handler interfaces see [API > Client handlers](API#Client_handlers).
8+
For an example of how to implement handler see
9+
[cefpython](cefpython.md).CreateBrowserSync(). For a list of all handler
10+
interfaces see [API > Client handlers](API#Client_handlers).
911

10-
The `RequestHandler` tests can be found in the wxpython.py script.
12+
The `RequestHandler` tests can be found in the old wxpython.py script (v31).
1113

12-
Not yet ported to CEF Python:
14+
Not yet exposed in CEF Python:
1315
* OnOpenURLFromTab
16+
* OnSelectClientCertificate
1417

1518

1619

api/WebPluginInfo.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@
55

66
See [RequestHandler](RequestHandler.md).OnBeforePluginLoad().
77

8+
Web Plugin API available in upstream CEF, but not yet exposed in CEF Python
9+
(see src/include/cef_web_plugin.h):
10+
11+
* CefRegisterCdmCallback
12+
* CefRegisterWidevineCdm
13+
* CefIsWebPluginUnstable
14+
* CefRegisterWebPluginCrash
15+
* CefUnregisterInternalWebPlugin
16+
* CefRefreshWebPlugins
17+
* CefVisitWebPluginInfo
18+
819

920
Table of contents:
1021
* [Methods](#methods)

docs/Build-instructions.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Table of contents:
3232

3333
## Build CEF Python on Linux
3434

35-
Complete steps for building CEF Python 54 using prebuilt
35+
Complete steps for building CEF Python v50+ using prebuilt
3636
binaries from GitHub releases:
3737

3838
1) Tested and works fine on Ubuntu 14.04 64-bit (cmake 2.8.12 and g++ 4.8.4)
@@ -48,15 +48,15 @@ binaries from GitHub releases:
4848

4949
5) Download 64-bit Linux binaries and libraries from
5050
[GH releases](https://github.com/cztomczak/cefpython/releases)
51-
tagged 'v54-upstream'.
51+
tagged e.g. 'v50-upstream' when building v50.
5252

5353
6) Extract it in the cefpython/build/ directory and rename the extracted
5454
directory to "cef_linux64".
5555

56-
8) Build cefpython and run examples:
56+
8) Build cefpython and run examples (xx.x is version e.g. 50.0):
5757
```
5858
cd cefpython/src/linux/
59-
python compile.py 54.0
59+
python compile.py xx.x
6060
```
6161

6262
## Requirements
@@ -167,7 +167,7 @@ mkdir build/ && cd build
167167
python ../tools/automate.py --build-cef --ninja-jobs 6
168168
mv cef*_*_linux64/ cef_linux64/
169169
cd ../../../src/linux/
170-
python compile.py 54.0
170+
python compile.py xx.x
171171
```
172172

173173
__MISSING PACKAGES (Linux)__: After the chromium sources are downloaded,

examples/gtk2.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,24 +35,24 @@ def main():
3535

3636

3737
def check_versions():
38-
print("CEF Python {ver}".format(ver=cef.__version__))
39-
print("Python {ver}".format(ver=sys.version[:6]))
40-
print("GTK {ver}".format(ver='.'.join(map(str, list(gtk.gtk_version)))))
38+
print("[gkt2.py] CEF Python {ver}".format(ver=cef.__version__))
39+
print("[gkt2.py] Python {ver}".format(ver=sys.version[:6]))
40+
print("[gkt2.py] GTK {ver}".format(ver='.'.join(map(str, list(gtk.gtk_version)))))
4141
assert cef.__version__ >= "54.0", "CEF Python v54+ required to run this"
4242
pygtk.require('2.0')
4343

4444

4545
def configure_message_loop():
4646
global g_message_loop
4747
if "--message-loop-timer" in sys.argv:
48-
print("Message loop mode: TIMER")
48+
print("[gkt2.py] Message loop mode: TIMER")
4949
g_message_loop = MESSAGE_LOOP_TIMER
5050
sys.argv.remove("--message-loop-timer")
5151
else:
52-
print("Message loop mode: BEST")
52+
print("[gkt2.py] Message loop mode: BEST")
5353
g_message_loop = MESSAGE_LOOP_BEST
5454
if len(sys.argv) > 1:
55-
print("ERROR: unknown argument passed")
55+
print("[gkt2.py] ERROR: unknown argument passed")
5656
sys.exit(1)
5757

5858

examples/gtk3.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010

1111
def main():
12-
print("CEF Python {ver}".format(ver=cef.__version__))
13-
print("Python {ver}".format(ver=sys.version[:6]))
14-
print("GTK {major}.{minor}".format(
12+
print("[gkt3.py] CEF Python {ver}".format(ver=cef.__version__))
13+
print("[gkt3.py] Python {ver}".format(ver=sys.version[:6]))
14+
print("[gkt3.py] GTK {major}.{minor}".format(
1515
major=Gtk.get_major_version(),
1616
minor=Gtk.get_minor_version()))
1717
assert cef.__version__ >= "53.1", "CEF Python v53.1+ required to run this"

examples/hello_world.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77

88
def main():
9-
print("CEF Python {ver}".format(ver=cef.__version__))
10-
print("Python {ver}".format(ver=sys.version[:6]))
9+
print("[hello_world.py] CEF Python {ver}".format(ver=cef.__version__))
10+
print("[hello_world.py] Python {ver}".format(ver=sys.version[:6]))
1111
assert cef.__version__ >= "53.1", "CEF Python v53.1+ required to run this"
1212
sys.excepthook = cef.ExceptHook # To shutdown all CEF processes on error
1313
cef.Initialize()

examples/tkinter_.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,18 @@
1212
import Tkinter as tk
1313
import sys
1414
import os
15-
import logging
15+
import logging as _logging
1616

1717
# Globals
18-
logger = logging.getLogger()
18+
logger = _logging.getLogger("tkinter_.py")
1919

2020

2121
def main():
22-
logger.setLevel(logging.INFO)
23-
logger.addHandler(logging.StreamHandler())
22+
logger.setLevel(_logging.INFO)
23+
stream_handler = _logging.StreamHandler()
24+
formatter = _logging.Formatter("[%(filename)s] %(message)s")
25+
stream_handler.setFormatter(formatter)
26+
logger.addHandler(stream_handler)
2427
logger.info("CEF Python {ver}".format(ver=cef.__version__))
2528
logger.info("Python {ver}".format(ver=sys.version[:6]))
2629
logger.info("Tk {ver}".format(ver=tk.TkVersion))

patches/issue231.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ index 6a75930..ad620d7 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 208333c..fcadb7e 100644
86+
index 496c9b0..f2dc4d8 100644
8787
--- libcef_dll/libcef_dll.cc
8888
+++ libcef_dll/libcef_dll.cc
89-
@@ -747,6 +747,23 @@ CEF_EXPORT int cef_get_path(cef_path_key_t key, cef_string_t* path) {
89+
@@ -752,6 +752,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 208333c..fcadb7e 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 248a285..3f0c226 100644
114+
index 3a5d30f..7431698 100644
115115
--- libcef_dll/wrapper/libcef_dll_wrapper.cc
116116
+++ libcef_dll/wrapper/libcef_dll_wrapper.cc
117-
@@ -691,6 +691,23 @@ CEF_GLOBAL bool CefGetPath(PathKey key, CefString& path) {
117+
@@ -696,6 +696,23 @@ CEF_GLOBAL bool CefGetPath(PathKey key, CefString& path) {
118118
return _retval?true:false;
119119
}
120120

patches/issue251.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ index 8f8094b..8b4602b 100644
7171

7272
#endif // CEF_INCLUDE_CEF_DRAG_DATA_H_
7373
diff --git libcef/browser/osr/web_contents_view_osr.cc libcef/browser/osr/web_contents_view_osr.cc
74-
index 52f1a87..e967865 100644
74+
index f6715a2..0f7c20a 100644
7575
--- libcef/browser/osr/web_contents_view_osr.cc
7676
+++ libcef/browser/osr/web_contents_view_osr.cc
7777
@@ -6,6 +6,7 @@
@@ -82,7 +82,7 @@ index 52f1a87..e967865 100644
8282
#include "libcef/browser/osr/render_widget_host_view_osr.h"
8383
#include "libcef/common/drag_data_impl.h"
8484

85-
@@ -227,7 +228,9 @@ void CefWebContentsViewOSR::StartDragging(
85+
@@ -230,7 +231,9 @@ void CefWebContentsViewOSR::StartDragging(
8686
if (browser.get())
8787
handler = browser->GetClient()->GetRenderHandler();
8888
if (handler.get()) {

0 commit comments

Comments
 (0)