Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(289)

Unified Diff: ppapi/proxy/plugin_globals.cc

Issue 10790078: PPAPI: Make PPB_MessageLoop_Dev::GetForMainThread work (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: add a real test Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ppapi/proxy/plugin_globals.cc
diff --git a/ppapi/proxy/plugin_globals.cc b/ppapi/proxy/plugin_globals.cc
index cfc3b791382f4c912c112cf23a75f572347d07ed..1b192b3b3667aec090288fa74292d7f86fe6f175 100644
--- a/ppapi/proxy/plugin_globals.cc
+++ b/ppapi/proxy/plugin_globals.cc
@@ -6,6 +6,7 @@
#include "ppapi/proxy/plugin_dispatcher.h"
#include "ppapi/proxy/plugin_proxy_delegate.h"
+#include "ppapi/proxy/ppb_message_loop_proxy.h"
#include "ppapi/thunk/enter.h"
namespace ppapi {
@@ -16,7 +17,9 @@ PluginGlobals* PluginGlobals::plugin_globals_ = NULL;
PluginGlobals::PluginGlobals()
: ppapi::PpapiGlobals(),
plugin_proxy_delegate_(NULL),
- callback_tracker_(new CallbackTracker) {
+ callback_tracker_(new CallbackTracker),
+ loop_for_main_thread_(
+ new MessageLoopResource(MessageLoopResource::ForMainThread())) {
DCHECK(!plugin_globals_);
plugin_globals_ = this;
}
@@ -48,6 +51,10 @@ CallbackTracker* PluginGlobals::GetCallbackTrackerForInstance(
return callback_tracker_.get();
}
+MessageLoopResource* PluginGlobals::loop_for_main_thread() {
+ return loop_for_main_thread_.get();
+}
+
thunk::PPB_Instance_API* PluginGlobals::GetInstanceAPI(PP_Instance instance) {
PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance);
if (dispatcher)

Powered by Google App Engine
This is Rietveld 408576698