Skip to content

Commit fb2e67e

Browse files
CzarekCzarek
authored andcommitted
Updated to CEF 3 revision 1352. Chrome version 27.0.1453.116.
1 parent 87518b1 commit fb2e67e

File tree

16 files changed

+171
-125
lines changed

16 files changed

+171
-125
lines changed

cefpython/browser.pyx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -99,18 +99,6 @@ cpdef PyBrowser GetBrowserByWindowHandle(WindowHandle windowHandle):
9999
return pyBrowser
100100
return None
101101

102-
IF CEF_VERSION == 3:
103-
104-
cdef CefRefPtr[CefBrowserHost] GetCefBrowserHost(
105-
CefRefPtr[CefBrowser] cefBrowser) except *:
106-
cdef CefRefPtr[CefBrowserHost] cefBrowserHost = (
107-
cefBrowser.get().GetHost())
108-
if <void*>cefBrowserHost != NULL and cefBrowserHost.get():
109-
return cefBrowserHost
110-
raise Exception("GetCefBrowserHost() failed: this method of "
111-
"Browser object can only be called in the "
112-
"browser process.")
113-
114102
cdef class PyBrowser:
115103
cdef CefRefPtr[CefBrowser] cefBrowser
116104

cefpython/cef3/BUILD_COMPATIBILITY.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
Chromium/CEF branch:
22
1453
33
Chromium release url:
4-
http://src.chromium.org/svn/releases/27.0.1453.110
4+
http://src.chromium.org/svn/releases/27.0.1453.116
55
CEF revision:
6-
1290
6+
1352
77
CEF repository url:
8-
http://chromiumembedded.googlecode.com/svn/branches/1453/cef3@1290
8+
http://chromiumembedded.googlecode.com/svn/branches/1453/cef3@1352
99

1010
----
1111

cefpython/cef3/include/cef_cookie.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class CefCookieVisitor;
4949
// Class used for managing cookies. The methods of this class may be called on
5050
// any thread unless otherwise indicated.
5151
///
52-
/*--cef(source=library)--*/
52+
/*--cef(source=library,no_debugct_check)--*/
5353
class CefCookieManager : public virtual CefBase {
5454
public:
5555
///

cefpython/cef3/include/cef_render_handler.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,12 @@ class CefRenderHandler : public virtual CefBase {
127127
/*--cef()--*/
128128
virtual void OnCursorChange(CefRefPtr<CefBrowser> browser,
129129
CefCursorHandle cursor) {}
130+
131+
///
132+
// Called when the scroll offset has changed.
133+
///
134+
/*--cef()--*/
135+
virtual void OnScrollOffsetChanged(CefRefPtr<CefBrowser> browser) {}
130136
};
131137

132138
#endif // CEF_INCLUDE_CEF_RENDER_HANDLER_H_

cefpython/cef3/include/cef_version.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@
3636
#define CEF_INCLUDE_CEF_VERSION_H_
3737

3838
#define CEF_VERSION_MAJOR 3
39-
#define CEF_REVISION 1279
39+
#define CEF_REVISION 1352
4040
#define COPYRIGHT_YEAR 2013
4141

4242
#define CHROME_VERSION_MAJOR 27
4343
#define CHROME_VERSION_MINOR 0
4444
#define CHROME_VERSION_BUILD 1453
45-
#define CHROME_VERSION_PATCH 110
45+
#define CHROME_VERSION_PATCH 116
4646

4747
#define DO_MAKE_STRING(p) #p
4848
#define MAKE_STRING(p) DO_MAKE_STRING(p)
@@ -61,13 +61,13 @@ extern "C" {
6161
// universal hash value will change if any platform is affected whereas the
6262
// platform hash values will change only if that particular platform is
6363
// affected.
64-
#define CEF_API_HASH_UNIVERSAL "0dbb3c48ddc6ad5c64d021c5a935839215d67066"
64+
#define CEF_API_HASH_UNIVERSAL "a143ca94e7a2a10c6432558c80d09317efef210b"
6565
#if defined(OS_WIN)
66-
#define CEF_API_HASH_PLATFORM "7218a0e0a5ced8e71f435eb33b959210f79e6147"
66+
#define CEF_API_HASH_PLATFORM "1d4120107dfd0999872d8d5048e9684715feb2b8"
6767
#elif defined(OS_MACOSX)
68-
#define CEF_API_HASH_PLATFORM "697c01620a2911c3d7307fd3a7a69db60dea491c"
68+
#define CEF_API_HASH_PLATFORM "8f210400c2df67b7973d402d40b234ba63ae9fa0"
6969
#elif defined(OS_LINUX)
70-
#define CEF_API_HASH_PLATFORM "e4f022f32984124d18689c0333dde998f3ae51cf"
70+
#define CEF_API_HASH_PLATFORM "30aeaccee3f66fde53e5e832c8e96377dbc67cec"
7171
#endif
7272

7373
///

cefpython/cef3/include/internal/cef_linux.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,10 @@ struct CefWindowInfoTraits {
109109

110110
static inline void set(const struct_type* src, struct_type* target,
111111
bool copy) {
112-
target->widget = src->widget;
113112
target->parent_widget = src->parent_widget;
113+
target->window_rendering_disabled = src->window_rendering_disabled;
114+
target->transparent_painting = src->transparent_painting;
115+
target->widget = src->widget;
114116
}
115117
};
116118

@@ -126,6 +128,15 @@ class CefWindowInfo : public CefStructBase<CefWindowInfoTraits> {
126128
void SetAsChild(CefWindowHandle ParentWidget) {
127129
parent_widget = ParentWidget;
128130
}
131+
132+
void SetTransparentPainting(bool transparentPainting) {
133+
transparent_painting = transparentPainting;
134+
}
135+
136+
void SetAsOffScreen(CefWindowHandle ParentWidget) {
137+
window_rendering_disabled = true;
138+
parent_widget = ParentWidget;
139+
}
129140
};
130141

131142
#endif // OS_LINUX

cefpython/cef3/include/internal/cef_types_linux.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ extern "C" {
4343
#endif
4444

4545
// Handle types.
46-
#define cef_cursor_handle_t void*
46+
#define cef_cursor_handle_t GdkCursor*
4747
#define cef_event_handle_t GdkEvent*
4848
#define cef_window_handle_t GtkWidget*
4949
#define cef_text_input_context_t void*
@@ -63,6 +63,14 @@ typedef struct _cef_window_info_t {
6363
// Pointer for the parent GtkBox widget.
6464
cef_window_handle_t parent_widget;
6565

66+
// If window rendering is disabled no browser window will be created. Set
67+
// |parent_widget| to the window that will act as the parent for popup menus,
68+
// dialog boxes, etc.
69+
bool window_rendering_disabled;
70+
71+
// Set to true to enable transparent painting.
72+
bool transparent_painting;
73+
6674
// Pointer for the new browser widget.
6775
cef_window_handle_t widget;
6876
} cef_window_info_t;

cefpython/cef3/linux/binaries_32bit/wxpython.html

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,14 @@ <h3>Display handler</h3>
175175
print("text = %s")
176176

177177
def OnStatusMessage(self, browser, value):
178-
print("ClientHandler::OnStatusMessage()")
178+
if not value:
179+
# Do not notify in the console about empty statuses.
180+
return
181+
self.statusMessageCount += 1
182+
if self.statusMessageCount > 3:
183+
# Do not spam too much.
184+
return
185+
print("DisplayHandler::OnStatusMessage()")
179186
print("value = %s" % value)
180187

181188
def OnConsoleMessage(self, browser, message, source, line):
@@ -215,16 +222,16 @@ <h3>Request handler</h3>
215222
<pre>
216223
def OnBeforeResourceLoad(self, browser, frame, request):
217224
print("RequestHandler::OnBeforeResourceLoad()")
218-
print("url = %s" % request.GetUrl())
225+
print("url = %s" % request.GetUrl()[:70])
219226
return False
220227
</pre>
221228
See messages in the console.
222229

223230
<pre>
224231
def OnResourceRedirect(self, browser, frame, oldUrl, newUrlOut):
225232
print("RequestHandler::OnResourceRedirect()")
226-
print("old url = %s" % oldUrl)
227-
print("new url = %s" % newUrlOut[0])
233+
print("old url = %s" % oldUrl[:70])
234+
print("new url = %s" % newUrlOut[0][:70])
228235
</pre>
229236
Try this:
230237
<a href="http://tinyurl.com/google404redirect">
@@ -287,8 +294,9 @@ <h3>Request handler</h3>
287294

288295
<pre>
289296
def OnProtocolExecution(self, browser, url, allowExecutionOut):
290-
# This callback seems not to work on Linux, see here:
291-
# http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=10901
297+
# There's no default implementation for OnProtocolExecution on Linux,
298+
# you have to make OS system call on your own. You probably also need
299+
# to use LoadHandler::OnLoadError() when implementing this on Linux.
292300
print("RequestHandler::OnProtocolExecution()")
293301
print("url = %s" % url)
294302
if url.startswith("magnet:"):
@@ -301,8 +309,8 @@ <h3>Request handler</h3>
301309

302310
<pre>
303311
def _OnBeforePluginLoad(self, browser, url, policyUrl, info):
304-
# This callback seems not to work on Linux, reported here:
305-
# http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=10901
312+
# Plugins are loaded on demand, only when website requires it,
313+
# the same plugin may be called multiple times.
306314
print("RequestHandler::OnBeforePluginLoad()")
307315
print("url = %s" % url)
308316
print("policy url = %s" % policyUrl)
@@ -313,8 +321,9 @@ <h3>Request handler</h3>
313321
# False to allow, True to block plugin.
314322
return False
315323
</pre>
316-
If you have Flash installed then you should already see a message
317-
in the console.
324+
Try OnBeforePluginLoad() with Flash:
325+
<a href="http://www.adobe.com/software/flash/about/">
326+
http://www.adobe.com/software/flash/about/</a>
318327

319328
<pre>
320329
def _OnCertificateError(self, certError, requestUrl, callback):
@@ -346,9 +355,10 @@ <h3>Cookie tests</h3>
346355
See messages in the console.
347356

348357
<pre>
349-
def GetCookieManager(self, browser, mainUrl):
358+
def GetCookieManager(self, browser, mainUrl):
350359
# Create unique cookie manager for each browser.
351-
# Buggy IO thread callbacks, need to update to revision 1306, see:
360+
# --
361+
# Buggy implementation in CEF, reported here:
352362
# http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=10901
353363
cookieManager = browser.GetUserData("cookieManager")
354364
if cookieManager:

cefpython/cef3/linux/binaries_32bit/wxpython.py

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -262,15 +262,21 @@ def OnTitleChange(self, browser, title):
262262
print("title = %s" % title)
263263

264264
def OnTooltip(self, browser, textOut):
265+
# OnTooltip does not work on Linux, will be fixed in next
266+
# CEF release, see Issue 783:
267+
# https://code.google.com/p/chromiumembedded/issues/detail?id=783
265268
print("DisplayHandler::OnTooltip()")
266269
print("text = %s" % textOut[0])
267-
# OnTooltip seems not to work on Linux, reported bug on the CEF forum:
268-
# http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=10898
269270

271+
statusMessageCount = 0
270272
def OnStatusMessage(self, browser, value):
271273
if not value:
272274
# Do not notify in the console about empty statuses.
273275
return
276+
self.statusMessageCount += 1
277+
if self.statusMessageCount > 3:
278+
# Do not spam too much.
279+
return
274280
print("DisplayHandler::OnStatusMessage()")
275281
print("value = %s" % value)
276282

@@ -301,13 +307,13 @@ def OnKeyEvent(self, browser, event, eventHandle):
301307
# -------------------------------------------------------------------------
302308
def OnBeforeResourceLoad(self, browser, frame, request):
303309
print("RequestHandler::OnBeforeResourceLoad()")
304-
print("url = %s" % request.GetUrl())
310+
print("url = %s" % request.GetUrl()[:70])
305311
return False
306312

307313
def OnResourceRedirect(self, browser, frame, oldUrl, newUrlOut):
308314
print("RequestHandler::OnResourceRedirect()")
309-
print("old url = %s" % oldUrl)
310-
print("new url = %s" % newUrlOut[0])
315+
print("old url = %s" % oldUrl[:70])
316+
print("new url = %s" % newUrlOut[0][:70])
311317

312318
def GetAuthCredentials(self, browser, frame, isProxy, host, port, realm,
313319
scheme, callback):
@@ -326,7 +332,8 @@ def OnQuotaRequest(self, browser, originUrl, newSize, callback):
326332

327333
def GetCookieManager(self, browser, mainUrl):
328334
# Create unique cookie manager for each browser.
329-
# Buggy IO thread callbacks, need to update to revision 1306, see:
335+
# --
336+
# Buggy implementation in CEF, reported here:
330337
# http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=10901
331338
cookieManager = browser.GetUserData("cookieManager")
332339
if cookieManager:
@@ -347,8 +354,8 @@ def OnProtocolExecution(self, browser, url, allowExecutionOut):
347354
allowExecutionOut[0] = True
348355

349356
def _OnBeforePluginLoad(self, browser, url, policyUrl, info):
350-
# This callback seems not to work on Linux, reported here:
351-
# http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=10901
357+
# Plugins are loaded on demand, only when website requires it,
358+
# the same plugin may be called multiple times.
352359
print("RequestHandler::OnBeforePluginLoad()")
353360
print("url = %s" % url)
354361
print("policy url = %s" % policyUrl)

cefpython/cef3/linux/binaries_64bit/wxpython.html

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,14 @@ <h3>Display handler</h3>
175175
print("text = %s")
176176

177177
def OnStatusMessage(self, browser, value):
178-
print("ClientHandler::OnStatusMessage()")
178+
if not value:
179+
# Do not notify in the console about empty statuses.
180+
return
181+
self.statusMessageCount += 1
182+
if self.statusMessageCount > 3:
183+
# Do not spam too much.
184+
return
185+
print("DisplayHandler::OnStatusMessage()")
179186
print("value = %s" % value)
180187

181188
def OnConsoleMessage(self, browser, message, source, line):
@@ -215,16 +222,16 @@ <h3>Request handler</h3>
215222
<pre>
216223
def OnBeforeResourceLoad(self, browser, frame, request):
217224
print("RequestHandler::OnBeforeResourceLoad()")
218-
print("url = %s" % request.GetUrl())
225+
print("url = %s" % request.GetUrl()[:70])
219226
return False
220227
</pre>
221228
See messages in the console.
222229

223230
<pre>
224231
def OnResourceRedirect(self, browser, frame, oldUrl, newUrlOut):
225232
print("RequestHandler::OnResourceRedirect()")
226-
print("old url = %s" % oldUrl)
227-
print("new url = %s" % newUrlOut[0])
233+
print("old url = %s" % oldUrl[:70])
234+
print("new url = %s" % newUrlOut[0][:70])
228235
</pre>
229236
Try this:
230237
<a href="http://tinyurl.com/google404redirect">
@@ -287,8 +294,9 @@ <h3>Request handler</h3>
287294

288295
<pre>
289296
def OnProtocolExecution(self, browser, url, allowExecutionOut):
290-
# This callback seems not to work on Linux, see here:
291-
# http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=10901
297+
# There's no default implementation for OnProtocolExecution on Linux,
298+
# you have to make OS system call on your own. You probably also need
299+
# to use LoadHandler::OnLoadError() when implementing this on Linux.
292300
print("RequestHandler::OnProtocolExecution()")
293301
print("url = %s" % url)
294302
if url.startswith("magnet:"):
@@ -301,8 +309,8 @@ <h3>Request handler</h3>
301309

302310
<pre>
303311
def _OnBeforePluginLoad(self, browser, url, policyUrl, info):
304-
# This callback seems not to work on Linux, reported here:
305-
# http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=10901
312+
# Plugins are loaded on demand, only when website requires it,
313+
# the same plugin may be called multiple times.
306314
print("RequestHandler::OnBeforePluginLoad()")
307315
print("url = %s" % url)
308316
print("policy url = %s" % policyUrl)
@@ -313,8 +321,9 @@ <h3>Request handler</h3>
313321
# False to allow, True to block plugin.
314322
return False
315323
</pre>
316-
If you have Flash installed then you should already see a message
317-
in the console.
324+
Try OnBeforePluginLoad() with Flash:
325+
<a href="http://www.adobe.com/software/flash/about/">
326+
http://www.adobe.com/software/flash/about/</a>
318327

319328
<pre>
320329
def _OnCertificateError(self, certError, requestUrl, callback):
@@ -346,9 +355,10 @@ <h3>Cookie tests</h3>
346355
See messages in the console.
347356

348357
<pre>
349-
def GetCookieManager(self, browser, mainUrl):
358+
def GetCookieManager(self, browser, mainUrl):
350359
# Create unique cookie manager for each browser.
351-
# Buggy IO thread callbacks, need to update to revision 1306, see:
360+
# --
361+
# Buggy implementation in CEF, reported here:
352362
# http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=10901
353363
cookieManager = browser.GetUserData("cookieManager")
354364
if cookieManager:

0 commit comments

Comments
 (0)