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; |
} |