summaryrefslogtreecommitdiffstats
path: root/webkit/glue/plugins/pepper_plugin_module.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/glue/plugins/pepper_plugin_module.cc')
-rw-r--r--webkit/glue/plugins/pepper_plugin_module.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/webkit/glue/plugins/pepper_plugin_module.cc b/webkit/glue/plugins/pepper_plugin_module.cc
index 99448f2..2eb63a1 100644
--- a/webkit/glue/plugins/pepper_plugin_module.cc
+++ b/webkit/glue/plugins/pepper_plugin_module.cc
@@ -7,6 +7,7 @@
#include <set>
#include "base/command_line.h"
+#include "base/message_loop.h"
#include "base/message_loop_proxy.h"
#include "base/logging.h"
#include "base/scoped_ptr.h"
@@ -110,8 +111,21 @@ bool ReadImageData(PP_Resource device_context_2d,
return context->ReadImageData(image, x, y);
}
+void RunMessageLoop() {
+ bool old_state = MessageLoop::current()->NestableTasksAllowed();
+ MessageLoop::current()->SetNestableTasksAllowed(true);
+ MessageLoop::current()->Run();
+ MessageLoop::current()->SetNestableTasksAllowed(old_state);
+}
+
+void QuitMessageLoop() {
+ MessageLoop::current()->Quit();
+}
+
const PPB_Testing testing_interface = {
- &ReadImageData
+ &ReadImageData,
+ &RunMessageLoop,
+ &QuitMessageLoop,
};
// GetInterface ----------------------------------------------------------------