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

Unified Diff: ppapi/shared_impl/ppapi_globals.cc

Issue 10081020: PPAPI: Make blocking completion callbacks work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleaned up for review. Created 8 years, 8 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/shared_impl/ppapi_globals.cc
diff --git a/ppapi/shared_impl/ppapi_globals.cc b/ppapi/shared_impl/ppapi_globals.cc
index c453ae2d4854b86bd3dcd568abbb66d079abd95f..80a4ee2417fc8ecb448fde261f411f8284abe73c 100644
--- a/ppapi/shared_impl/ppapi_globals.cc
+++ b/ppapi/shared_impl/ppapi_globals.cc
@@ -6,6 +6,7 @@
#include "base/lazy_instance.h" // For testing purposes only.
#include "base/logging.h"
+#include "base/message_loop_proxy.h"
#include "base/threading/thread_local.h" // For testing purposes only.
namespace ppapi {
@@ -41,6 +42,12 @@ void PpapiGlobals::SetPpapiGlobalsOnThreadForTest(PpapiGlobals* ptr) {
tls_ppapi_globals_for_test.Pointer()->Set(ptr);
}
+base::MessageLoopProxy* PpapiGlobals::GetMainThreadMessageLoop() {
+ CR_DEFINE_STATIC_LOCAL(scoped_refptr<base::MessageLoopProxy>, proxy,
+ (base::MessageLoopProxy::current()));
+ return proxy.get();
+}
+
bool PpapiGlobals::IsHostGlobals() const {
return false;
}

Powered by Google App Engine
This is Rietveld 408576698