Skip to content

Commit a0c9394

Browse files
committed
Update to Chrome/53.0.2785.89, CEF/3.2785.1475.gaead085
1 parent 168867d commit a0c9394

25 files changed

+292
-181
lines changed

api/LoadHandler.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,16 @@ for the currently loaded page. In most cases you want to use
5151
OnLoadingStateChange. In newer CEF there is |transition_type| arg that
5252
provides information about the source of the navigation.
5353

54-
The |frame| value will
55-
never be empty -- call the IsMain() method to check if this frame is the
56-
main frame. Multiple frames may be loading at the same time. Sub-frames may
57-
start or continue loading after the main frame load has ended. This method
58-
will always be called for all frames irrespective of whether the request
59-
completes successfully. For notification of overall browser load status use
60-
[DisplayHandler](DisplayHandler.md).`OnLoadingStateChange` instead.
54+
Description from upstream CEF:
55+
> Called when the browser begins loading a frame. The |frame| value will
56+
> never be empty -- call the IsMain() method to check if this frame is the
57+
> main frame. |transition_type| provides information about the source of the
58+
> navigation and an accurate value is only available in the browser process.
59+
> Multiple frames may be loading at the same time. Sub-frames may
60+
> start or continue loading after the main frame load has ended. This method
61+
> will always be called for all frames irrespective of whether the request
62+
> completes successfully. For notification of overall browser load status use
63+
> [DisplayHandler](DisplayHandler.md).`OnLoadingStateChange` instead.
6164
6265

6366
### OnDomReady

api/cefpython.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,27 @@ provided message loop to get the best balance between performance and CPU usage.
154154
| --- | --- |
155155
| __Return__ | void |
156156

157-
Perform a single iteration of CEF message loop processing. This function is used to integrate the CEF message loop into an existing application message loop. Care must be taken to balance performance against excessive CPU usage. This function should only be called on the main application thread (UI thread) and only if cefpython.Initialize() is called with a [ApplicationSettings](ApplicationSettings.md).multi_threaded_message_loop value of false. This function will not block.
158-
159-
Alternatively you could create a periodic timer (with 10 ms interval) that calls cefpython.MessageLoopWork().
160-
161-
MessageLoopWork() is not tested on OS X and there are known issues - according to [this post](http://www.magpcss.org/ceforum/viewtopic.php?p=27124#p27124) by Marshall.
157+
Description from upstream CEF:
158+
159+
> Perform a single iteration of CEF message loop processing. This function is
160+
> provided for cases where the CEF message loop must be integrated into an
161+
> existing application message loop. Use of this function is not recommended
162+
> for most users; use either the CefRunMessageLoop() function or
163+
> CefSettings.multi_threaded_message_loop if possible. When using this function
164+
> care must be taken to balance performance against excessive CPU usage. It is
165+
> recommended to enable the CefSettings.external_message_pump option when using
166+
> this function so that CefBrowserProcessHandler::OnScheduleMessagePumpWork()
167+
> callbacks can facilitate the scheduling process. This function should only be
168+
> called on the main application thread and only if CefInitialize() is called
169+
> with a CefSettings.multi_threaded_message_loop value of false. This function
170+
> will not block.
171+
172+
Alternatively you could create a periodic timer (with 10 ms interval) that calls
173+
cefpython.MessageLoopWork().
174+
175+
MessageLoopWork() is not tested on OS X and there are known issues - according to
176+
[this post](http://www.magpcss.org/ceforum/viewtopic.php?p=27124#p27124) by
177+
Marshall.
162178

163179

164180
### PostTask

docs/Build-instructions.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ binaries from GH releases.
3434

3535
1) Tested and works fine on Ubuntu 14.04 64-bit (cmake 2.8.12 and g++ 4.8.4)
3636

37-
2) Download [ninja](http://martine.github.io/ninja/) 1.7.1 or later
37+
2) Download [ninja](https://github.com/ninja-build/ninja) 1.7.1 or later
3838
and copy it to /usr/bin and chmod 755.
3939

4040
3) Install packages: `sudo apt-get install python-dev cmake g++ libgtk2.0-dev`
4141

4242
4) Install python dependencies by executing:
43-
`cd cefpython/tools/ && pip install -r requirements.txt`
43+
`cd cefpython/tools/ && sudo pip install -r requirements.txt`
4444
(Cython 0.19.2 required - the version must match exactly)
4545

4646
5) Download 64-bit Linux binaries and libraries from
@@ -93,6 +93,9 @@ __Windows__
9393
__Linux__
9494

9595
* Install packages: `sudo apt-get install python-dev cmake g++ libgtk2.0-dev`
96+
* If using prebuilt binaries from Spotify automated builds and want to
97+
build cefclient/cefsimple you need to install these packages:
98+
`sudo apt-get install libgtkglext1-dev`
9699
* If building CEF from sources:
97100
* Official binaries are built on Ubuntu 14.04 (cmake 2.8.12, g++ 4.8.4)
98101
* Download [ninja](http://martine.github.io/ninja/) 1.7.1 or later
@@ -111,17 +114,15 @@ __Linux__
111114
* To perform a 32-bit Linux build on a 64-bit Linux system see
112115
Linux configuration in upstream cef/AutomatedBuildSetup.md. See also
113116
[cef/#1804](https://bitbucket.org/chromiumembedded/cef/issues/1804).
114-
* If using prebuilt binaries from Spotify automated builds and want to
115-
build cefclient/cefsimple you need to install these packages:
116-
`sudo apt-get install libgtkglext1-dev`
117117

118118

119119
__All platforms__
120120

121121
* Install dependencies for the automate.py tool by executing:
122-
`cd tools/ && pip install -r requirements.txt`. This will install
123-
some PyPI packages including Cython. On Windows installing Cython
124-
requires a VS compiler - see instructions above for Windows.
122+
`cd tools/ && pip install -r requirements.txt` (on Linux use `sudo`).
123+
This will install some PyPI packages including Cython. On Windows
124+
installing Cython requires a VS compiler - see instructions above
125+
for Windows.
125126

126127

127128
## Build CEF Python using prebuilt CEF binaries

patches/issue125.patch

Lines 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 4200926..334a182 100644
2+
index 489e4960..2c4d719 100644
33
--- http_cache_transaction.cc
44
+++ http_cache_transaction.cc
5-
@@ -2501,7 +2501,8 @@ int HttpCache::Transaction::WriteResponseInfoToEntry(bool truncated) {
5+
@@ -2535,7 +2535,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")) ||

patches/patch.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
'path': '../net/http/'
1919
},
2020
{
21-
# Expose CefOverridePath to override PathService path keys
21+
# Discovery of the "icudtl.dat" file fails on Linux.
22+
# Apply patch for all platforms just in case.
2223
'name': 'issue231',
2324
'path': './'
2425
},

src/cefpython.pyx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,8 @@ cdef public int CommandLineSwitches_GetInt(const char* key) except * with gil:
562562

563563
def Initialize(applicationSettings=None, commandLineSwitches=None):
564564

565-
# Fix Issue #231 - Discovery of the "icudtl.dat" file fails
565+
# Fix Issue #231 - Discovery of the "icudtl.dat" file fails on Linux.
566+
# Apply patch for all platforms just in case.
566567
cdef str py_module_dir = GetModuleDirectory()
567568
cdef CefString module_dir
568569
PyToCefString(py_module_dir, module_dir)

src/client_handler/client_handler.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,8 @@ void ClientHandler::OnLoadingStateChange(CefRefPtr<CefBrowser> browser,
366366
}
367367

368368
void ClientHandler::OnLoadStart(CefRefPtr<CefBrowser> browser,
369-
CefRefPtr<CefFrame> frame) {
369+
CefRefPtr<CefFrame> frame,
370+
TransitionType transition_type) {
370371
REQUIRE_UI_THREAD();
371372
LoadHandler_OnLoadStart(browser, frame);
372373
}

src/client_handler/client_handler.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class ClientHandler :
3131
typedef cef_jsdialog_type_t JSDialogType;
3232
typedef cef_event_flags_t EventFlags;
3333
typedef cef_window_open_disposition_t WindowOpenDisposition;
34+
typedef cef_transition_type_t TransitionType;
3435

3536
ClientHandler(){}
3637
virtual ~ClientHandler(){}
@@ -218,7 +219,8 @@ class ClientHandler :
218219
bool canGoForward) OVERRIDE;
219220

220221
virtual void OnLoadStart(CefRefPtr<CefBrowser> browser,
221-
CefRefPtr<CefFrame> frame) OVERRIDE;
222+
CefRefPtr<CefFrame> frame,
223+
TransitionType transition_type) OVERRIDE;
222224

223225
virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser,
224226
CefRefPtr<CefFrame> frame,

src/include/base/cef_lock.h

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,20 @@
4545
// If the Chromium implementation diverges the below implementation should be
4646
// updated to match.
4747

48+
#include "include/base/cef_logging.h"
4849
#include "include/base/cef_macros.h"
4950
#include "include/base/cef_platform_thread.h"
5051
#include "include/base/internal/cef_lock_impl.h"
5152

5253
namespace base {
54+
namespace cef_internal {
5355

5456
// A convenient wrapper for an OS specific critical section. The only real
5557
// intelligence in this class is in debug mode for the support for the
5658
// AssertAcquired() method.
5759
class Lock {
5860
public:
59-
#if defined(NDEBUG) // Optimized wrapper implementation
61+
#if !DCHECK_IS_ON() // Optimized wrapper implementation
6062
Lock() : lock_() {}
6163
~Lock() {}
6264
void Acquire() { lock_.Lock(); }
@@ -95,10 +97,10 @@ class Lock {
9597
}
9698

9799
void AssertAcquired() const;
98-
#endif // NDEBUG
100+
#endif // !DCHECK_IS_ON()
99101

100102
private:
101-
#if !defined(NDEBUG)
103+
#if DCHECK_IS_ON()
102104
// Members and routines taking care of locks assertions.
103105
// Note that this checks for recursive locks and allows them
104106
// if the variable is set. This is allowed by the underlying implementation
@@ -110,10 +112,10 @@ class Lock {
110112
// All private data is implicitly protected by lock_.
111113
// Be VERY careful to only access members under that lock.
112114
base::PlatformThreadRef owning_thread_ref_;
113-
#endif // NDEBUG
115+
#endif // DCHECK_IS_ON()
114116

115117
// Platform specific underlying lock implementation.
116-
cef_internal::LockImpl lock_;
118+
LockImpl lock_;
117119

118120
DISALLOW_COPY_AND_ASSIGN(Lock);
119121
};
@@ -160,6 +162,15 @@ class AutoUnlock {
160162
DISALLOW_COPY_AND_ASSIGN(AutoUnlock);
161163
};
162164

165+
} // namespace cef_internal
166+
167+
// Implement classes in the cef_internal namespace and then expose them to the
168+
// base namespace. This avoids conflicts with the base.lib implementation when
169+
// linking sandbox support on Windows.
170+
using cef_internal::Lock;
171+
using cef_internal::AutoLock;
172+
using cef_internal::AutoUnlock;
173+
163174
} // namespace base
164175

165176
#endif // !USING_CHROMIUM_INCLUDES

src/include/base/cef_macros.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@
3939
// Chromium uses movable types.
4040
#define MOVE_SCOPED_PTR(var) std::move(var)
4141

42+
// Chromium uses std types.
43+
#define SCOPED_PTR(type) std::unique_ptr<type>
44+
#define DEFAULT_DELETER(type) std::default_delete<type>
45+
4246
#else // !USING_CHROMIUM_INCLUDES
4347
// The following is substantially similar to the Chromium implementation.
4448
// If the Chromium implementation diverges the below implementation should be
@@ -50,6 +54,10 @@
5054
// CEF does not use movable types.
5155
#define MOVE_SCOPED_PTR(var) var.Pass()
5256

57+
// CEF uses base types.
58+
#define SCOPED_PTR(type) scoped_ptr<type>
59+
#define DEFAULT_DELETER(type) struct base::DefaultDeleter<type>
60+
5361
#if !defined(arraysize)
5462

5563
// The arraysize(arr) macro returns the # of elements in an array arr.

0 commit comments

Comments
 (0)