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

Unified Diff: webkit/glue/plugins/pepper_plugin_module.cc

Issue 2862002: Implement more of Flush properly. This adds support for waiting on the messag... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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
« no previous file with comments | « webkit/glue/plugins/pepper_plugin_instance.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/pepper_plugin_module.cc
===================================================================
--- webkit/glue/plugins/pepper_plugin_module.cc (revision 49795)
+++ webkit/glue/plugins/pepper_plugin_module.cc (working copy)
@@ -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 @@
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 ----------------------------------------------------------------
« no previous file with comments | « webkit/glue/plugins/pepper_plugin_instance.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698