summaryrefslogtreecommitdiffstats
path: root/content/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'content/plugin')
-rw-r--r--content/plugin/plugin_thread.cc6
-rw-r--r--content/plugin/plugin_thread.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/content/plugin/plugin_thread.cc b/content/plugin/plugin_thread.cc
index 204bc02..2573256 100644
--- a/content/plugin/plugin_thread.cc
+++ b/content/plugin/plugin_thread.cc
@@ -21,12 +21,14 @@
#include "base/process/kill.h"
#include "base/process/process_handle.h"
#include "base/threading/thread_local.h"
+#include "content/child/blink_platform_impl.h"
#include "content/child/child_process.h"
#include "content/child/npapi/npobject_util.h"
#include "content/child/npapi/plugin_lib.h"
#include "content/common/plugin_process_messages.h"
#include "content/public/common/content_switches.h"
#include "content/public/plugin/content_plugin_client.h"
+#include "third_party/WebKit/public/web/WebKit.h"
#include "ipc/ipc_channel_handle.h"
#if defined(TOOLKIT_GTK)
@@ -124,6 +126,10 @@ PluginThread::PluginThread()
plugin.get() ? plugin->plugin_info().name : base::string16());
channel()->AddFilter(new EnsureTerminateMessageFilter());
+
+ // This is needed because we call some code which uses WebKit strings.
+ webkit_platform_support_.reset(new BlinkPlatformImpl);
+ blink::initialize(webkit_platform_support_.get());
}
PluginThread::~PluginThread() {
diff --git a/content/plugin/plugin_thread.h b/content/plugin/plugin_thread.h
index 5ca2c02..f76cfa1 100644
--- a/content/plugin/plugin_thread.h
+++ b/content/plugin/plugin_thread.h
@@ -17,6 +17,7 @@
#endif
namespace content {
+class BlinkPlatformImpl;
// The PluginThread class represents a background thread where plugin instances
// live. Communication occurs between WebPluginDelegateProxy in the renderer
@@ -51,6 +52,8 @@ class PluginThread : public ChildThread {
bool forcefully_terminate_plugin_process_;
+ scoped_ptr<BlinkPlatformImpl> webkit_platform_support_;
+
DISALLOW_COPY_AND_ASSIGN(PluginThread);
};