summaryrefslogtreecommitdiffstats
path: root/content/ppapi_plugin/ppapi_thread.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-10 21:17:48 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-10 21:17:48 +0000
commit7a1f7c6f6c982287b3f6bb2acded619f3824416c (patch)
tree82ff404c4bcf84520c21ea7f0526ad5a40661641 /content/ppapi_plugin/ppapi_thread.cc
parentbafaee12825a06890f114a282880e135a8b0b1ae (diff)
downloadchromium_src-7a1f7c6f6c982287b3f6bb2acded619f3824416c.zip
chromium_src-7a1f7c6f6c982287b3f6bb2acded619f3824416c.tar.gz
chromium_src-7a1f7c6f6c982287b3f6bb2acded619f3824416c.tar.bz2
Make the Pepper proxy support in-process font rendering.
This implements a WebKit thread in the PPAPI plugin process so we can do the font calls without IPC. The existing font support was refactored into a virtual class (to prevent PPAPI from depending on WebKit and creating a circular GYP dependency). This moves the renderer sandbox support into content/common so that it can be used by the PPAPI process. Review URL: http://codereview.chromium.org/6981001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84856 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/ppapi_plugin/ppapi_thread.cc')
-rw-r--r--content/ppapi_plugin/ppapi_thread.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc
index 91c3f85..73c0d5f 100644
--- a/content/ppapi_plugin/ppapi_thread.cc
+++ b/content/ppapi_plugin/ppapi_thread.cc
@@ -12,11 +12,13 @@
#include "content/common/child_process.h"
#include "content/ppapi_plugin/broker_process_dispatcher.h"
#include "content/ppapi_plugin/plugin_process_dispatcher.h"
+#include "content/ppapi_plugin/ppapi_webkit_thread.h"
#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_sync_channel.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/c/ppp.h"
#include "ppapi/proxy/ppapi_messages.h"
+#include "webkit/plugins/ppapi/webkit_forwarding_impl.h"
#if defined(OS_WIN)
#include "sandbox/src/sandbox.h"
@@ -81,6 +83,19 @@ std::set<PP_Instance>* PpapiThread::GetGloballySeenInstanceIDSet() {
return &globally_seen_instance_ids_;
}
+pp::shared_impl::WebKitForwarding* PpapiThread::GetWebKitForwarding() {
+ if (!webkit_forwarding_.get())
+ webkit_forwarding_.reset(new webkit::ppapi::WebKitForwardingImpl);
+ return webkit_forwarding_.get();
+}
+
+void PpapiThread::PostToWebKitThread(const tracked_objects::Location& from_here,
+ const base::Closure& task) {
+ if (!webkit_thread_.get())
+ webkit_thread_.reset(new PpapiWebKitThread);
+ webkit_thread_->PostTask(from_here, task);
+}
+
void PpapiThread::OnMsgLoadPlugin(const FilePath& path) {
base::ScopedNativeLibrary library(base::LoadNativeLibrary(path, NULL));