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 0cc124e

Browse filesBrowse files
committed
Update to Chrome 54.0.2840.59 and CEF 3.2840.1494.g7fe3d03 (cztomczak#260).
Changes in API that break backward compatibility: * Add resonse param in RequestHandler.OnResourceRedirect, see API docs * Remove WOD_SUPPRESS_OPEN constant (WindowOpenDisposition enum in LifespanHandler.OnBeforePopup) Update build instructions in docs/. Update CEF headers in src/include/. Ignore cef_path_util.h and cef_drag_data.h as these contain cefpython modifications to expose new API via patches. Update patches/ for CEF branch 2840. Update automate.py, automate-git.py and the patch. Branch 2840 now uses GN instead of GYP. Deprecate old examples from binaries_64bit/ and copy all from examples/ root directory in make-setup.py. Update compile.py, make-setup.py, setup.py and makefiles - use binaries and libraries from the cefpython/build/ directory. E.g. cef_linux64/ and cefpython_linux64/.
1 parent bbc8f47 commit 0cc124e
Copy full SHA for 0cc124e
Expand file treeCollapse file tree

39 files changed

+1054
-512
lines changed
Open diff view settings
Collapse file

‎api/LifespanHandler.md‎

Copy file name to clipboardExpand all lines: api/LifespanHandler.md
-1Lines changed: 0 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ There will be no "window.opener" property available in the popup window.
6161

6262
`WindowOpenDisposition` constants in the cefpython module:
6363
* WOD_UNKNOWN,
64-
* WOD_SUPPRESS_OPEN,
6564
* WOD_CURRENT_TAB,
6665
* WOD_SINGLETON_TAB,
6766
* WOD_NEW_FOREGROUND_TAB,
Collapse file

‎api/RequestHandler.md‎

Copy file name to clipboardExpand all lines: api/RequestHandler.md
+8-4Lines changed: 8 additions & 4 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,16 @@ and [WebRequest](WebRequest.md) / [WebRequestClient](WebRequestClient.md). For a
109109
| oldUrl | string |
110110
| out newUrl[0] | string |
111111
| request | [Request](Request.md) |
112+
| response | [Response](Response.md) |
112113
| __Return__ | void |
113114

114-
Called on the IO thread when a resource load is redirected. The |request|
115-
parameter will contain the old URL and other request-related information.
116-
The |new_url| parameter will contain the new URL and can be changed if
117-
desired. The |request| object cannot be modified in this callback.
115+
Description from upstream CEF:
116+
> Called on the IO thread when a resource load is redirected. The |request|
117+
> parameter will contain the old URL and other request-related information.
118+
> The |response| parameter will contain the response that resulted in the
119+
> redirect. The |new_url| parameter will contain the new URL and can be
120+
> changed if desired. The |request| object cannot be modified in this
121+
> callback.
118122
119123

120124
### GetAuthCredentials
Collapse file

‎docs/Build-instructions.md‎

Copy file name to clipboardExpand all lines: docs/Build-instructions.md
+11-19Lines changed: 11 additions & 19 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ listed on this page.
2121

2222

2323
Table of contents:
24-
* [Build CEF Python 53 BETA on Linux](#build-cef-python-51-beta-on-linux)
24+
* [Build CEF Python on Linux](#build-cef-python-on-linux)
2525
* [Requirements](#requirements)
2626
* [Build CEF Python using prebuilt CEF binaries](#build-cef-python-using-prebuilt-cef-binaries)
2727
* [Build both CEF Python and CEF from sources](#build-both-cef-python-and-cef-from-sources)
@@ -30,10 +30,10 @@ Table of contents:
3030
* [How to patch](#how-to-patch)
3131

3232

33-
## Build CEF Python 53 BETA on Linux
33+
## Build CEF Python on Linux
3434

35-
Complete steps for building CEF Python 53 using prebuilt
36-
binaries from GH releases.
35+
Complete steps for building CEF Python 54 using prebuilt
36+
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)
3939

@@ -48,22 +48,17 @@ binaries from GH releases.
4848

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

53+
6) Extract it in the cefpython/build/ directory and rename the extracted
54+
directory to "cef_linux64".
5355

54-
6) Copy "bin/*" to "cefpython/src/linux/binaries_64bit/"
55-
56-
7) Copy "lib/*" to "cefpython/src/linux/setup/lib_64bit/" (create dir)
57-
58-
8) Build cefpython:
56+
8) Build cefpython and run examples:
5957
```
6058
cd cefpython/src/linux/
61-
python compile.py 53.1
59+
python compile.py 54.0
6260
```
6361

64-
9) As of writing only "pygtk_.py" and "kivy_.py" examples are working
65-
66-
6762
## Requirements
6863

6964
Below are platform specific requirements. Do these first before
@@ -170,12 +165,9 @@ need to customize the build then use the --help flag to see more.
170165
cd ~/cefpython/
171166
mkdir build/ && cd build
172167
python ../tools/automate.py --build-cef --ninja-jobs 6
173-
cd cef*_*_linux64/
174-
cp bin/* ../../../src/linux/binaries_64bit/
175-
mkdir ../../../src/linux/setup/lib_64bit/
176-
cp lib/* ../../../src/linux/setup/lib_64bit/
168+
mv cef*_*_linux64/ cef_linux64/
177169
cd ../../../src/linux/
178-
python compile.py 51.0
170+
python compile.py 54.0
179171
```
180172

181173
__MISSING PACKAGES (Linux)__: After the chromium sources are downloaded,
Collapse file

‎patches/issue231.patch‎

Copy file name to clipboardExpand all lines: patches/issue231.patch
+4-4Lines 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 cde4fde..7a5b13a 100644
86+
index 208333c..fcadb7e 100644
8787
--- libcef_dll/libcef_dll.cc
8888
+++ libcef_dll/libcef_dll.cc
89-
@@ -739,6 +739,23 @@ CEF_EXPORT int cef_get_path(cef_path_key_t key, cef_string_t* path) {
89+
@@ -747,6 +747,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 cde4fde..7a5b13a 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 74827e3..cf35e11 100644
114+
index 248a285..3f0c226 100644
115115
--- libcef_dll/wrapper/libcef_dll_wrapper.cc
116116
+++ libcef_dll/wrapper/libcef_dll_wrapper.cc
117-
@@ -683,6 +683,23 @@ CEF_GLOBAL bool CefGetPath(PathKey key, CefString& path) {
117+
@@ -691,6 +691,23 @@ CEF_GLOBAL bool CefGetPath(PathKey key, CefString& path) {
118118
return _retval?true:false;
119119
}
120120

Collapse file

‎patches/issue251.patch‎

Copy file name to clipboardExpand all lines: patches/issue251.patch
+2-2Lines 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 574c22b..5a04fb1 100644
74+
index 52f1a87..e967865 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 574c22b..5a04fb1 100644
8282
#include "libcef/browser/osr/render_widget_host_view_osr.h"
8383
#include "libcef/common/drag_data_impl.h"
8484

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

‎src/client_handler/request_handler.cpp‎

Copy file name to clipboardExpand all lines: src/client_handler/request_handler.cpp
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,12 @@ CefRefPtr<CefResourceHandler> RequestHandler::GetResourceHandler(
4343
void RequestHandler::OnResourceRedirect(CefRefPtr<CefBrowser> browser,
4444
CefRefPtr<CefFrame> frame,
4545
CefRefPtr<CefRequest> request,
46+
CefRefPtr<CefResponse> response,
4647
CefString& new_url)
4748
{
4849
REQUIRE_IO_THREAD();
4950
RequestHandler_OnResourceRedirect(browser, frame, request->GetURL(),
50-
new_url, request);
51+
new_url, request, response);
5152
}
5253

5354

Collapse file

‎src/client_handler/request_handler.h‎

Copy file name to clipboardExpand all lines: src/client_handler/request_handler.h
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class RequestHandler : public CefRequestHandler
3131
void OnResourceRedirect(CefRefPtr<CefBrowser> browser,
3232
CefRefPtr<CefFrame> frame,
3333
CefRefPtr<CefRequest> request,
34+
CefRefPtr<CefResponse> response,
3435
CefString& new_url) override;
3536

3637
bool GetAuthCredentials(CefRefPtr<CefBrowser> browser,
Collapse file

‎src/extern/cef/cef_types.pxd‎

Copy file name to clipboardExpand all lines: src/extern/cef/cef_types.pxd
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,6 @@ cdef extern from "include/internal/cef_types.h":
309309

310310
ctypedef enum cef_window_open_disposition_t:
311311
WOD_UNKNOWN,
312-
WOD_SUPPRESS_OPEN,
313312
WOD_CURRENT_TAB,
314313
WOD_SINGLETON_TAB,
315314
WOD_NEW_FOREGROUND_TAB,
Collapse file

‎src/handlers/lifespan_handler.pyx‎

Copy file name to clipboardExpand all lines: src/handlers/lifespan_handler.pyx
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ cimport cef_types
1111

1212
# WindowOpenDisposition
1313
WOD_UNKNOWN = cef_types.WOD_UNKNOWN
14-
WOD_SUPPRESS_OPEN = cef_types.WOD_SUPPRESS_OPEN
1514
WOD_CURRENT_TAB = cef_types.WOD_CURRENT_TAB
1615
WOD_SINGLETON_TAB = cef_types.WOD_SINGLETON_TAB
1716
WOD_NEW_FOREGROUND_TAB = cef_types.WOD_NEW_FOREGROUND_TAB
Collapse file

‎src/handlers/request_handler.pyx‎

Copy file name to clipboardExpand all lines: src/handlers/request_handler.pyx
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,24 +138,27 @@ cdef public void RequestHandler_OnResourceRedirect(
138138
CefRefPtr[CefFrame] cefFrame,
139139
const CefString& cefOldUrl,
140140
CefString& cefNewUrl,
141-
CefRefPtr[CefRequest] cefRequest
141+
CefRefPtr[CefRequest] cefRequest,
142+
CefRefPtr[CefResponse] cefResponse
142143
) except * with gil:
143144
cdef PyBrowser pyBrowser
144145
cdef PyFrame pyFrame
145146
cdef str pyOldUrl
146147
cdef list pyNewUrlOut
147148
cdef PyRequest pyRequest
149+
cdef PyResponse pyResponse
148150
cdef object clientCallback
149151
try:
150152
pyBrowser = GetPyBrowser(cefBrowser)
151153
pyFrame = GetPyFrame(cefFrame)
152154
pyOldUrl = CefToPyString(cefOldUrl)
153155
pyNewUrlOut = [CefToPyString(cefNewUrl)]
154156
pyRequest = CreatePyRequest(cefRequest)
157+
pyResponse = CreatePyResponse(cefResponse)
155158
clientCallback = pyBrowser.GetClientCallback("OnResourceRedirect")
156159
if clientCallback:
157160
clientCallback(pyBrowser, pyFrame, pyOldUrl, pyNewUrlOut,
158-
pyRequest)
161+
pyRequest, pyResponse)
159162
if pyNewUrlOut[0]:
160163
PyToCefString(pyNewUrlOut[0], cefNewUrl)
161164
except:

0 commit comments

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