mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Avoid crash due to missing prerenderer support (issue #608).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@657 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include "base/path_service.h"
|
||||
#include "base/utf_string_conversions.h"
|
||||
#include "media/base/media.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebPrerenderingSupport.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h"
|
||||
@@ -23,6 +24,18 @@
|
||||
#include "webkit/plugins/npapi/plugin_list.h"
|
||||
|
||||
|
||||
// Stub implementation of WebKit::WebPrerenderingSupport.
|
||||
class BrowserPrerenderingSupport : public WebKit::WebPrerenderingSupport {
|
||||
public:
|
||||
virtual ~BrowserPrerenderingSupport() {}
|
||||
|
||||
private:
|
||||
virtual void add(const WebKit::WebPrerender& prerender) OVERRIDE {}
|
||||
virtual void cancel(const WebKit::WebPrerender& prerender) OVERRIDE {}
|
||||
virtual void abandon(const WebKit::WebPrerender& prerender) OVERRIDE {}
|
||||
};
|
||||
|
||||
|
||||
BrowserWebKitInit::BrowserWebKitInit()
|
||||
: clipboard_(&clipboard_client_) {
|
||||
v8::V8::SetCounterFunction(base::StatsTable::FindLocation);
|
||||
@@ -44,6 +57,9 @@ BrowserWebKitInit::BrowserWebKitInit()
|
||||
WebKit::WebRuntimeFeatures::enableDeviceMotion(false);
|
||||
WebKit::WebRuntimeFeatures::enableDeviceOrientation(false);
|
||||
|
||||
prerendering_support_.reset(new BrowserPrerenderingSupport);
|
||||
WebKit::WebPrerenderingSupport::initialize(prerendering_support_.get());
|
||||
|
||||
// Load libraries for media and enable the media player.
|
||||
FilePath module_path;
|
||||
WebKit::WebRuntimeFeatures::enableMediaPlayer(
|
||||
|
Reference in New Issue
Block a user