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

Unified Diff: ppapi/tests/test_utils.h

Issue 10910099: PPAPI: Make CompletionCallbacks work right on background threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 8 years, 1 month 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 | « ppapi/tests/test_case.h ('k') | ppapi/tests/test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/tests/test_utils.h
diff --git a/ppapi/tests/test_utils.h b/ppapi/tests/test_utils.h
index ab87dd3e47bff4076099a96b924d058247fb788b..60f7fc444dbaef349fe0ab978f7210863545a76b 100644
--- a/ppapi/tests/test_utils.h
+++ b/ppapi/tests/test_utils.h
@@ -11,6 +11,7 @@
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_stdint.h"
#include "ppapi/cpp/completion_callback.h"
+#include "ppapi/cpp/dev/message_loop_dev.h"
#include "ppapi/utility/completion_callback_factory.h"
// Timeout to wait for some action to complete.
@@ -152,6 +153,8 @@ class TestCompletionCallback {
private:
static void Handler(void* user_data, int32_t result);
+ void RunMessageLoop();
+ void QuitMessageLoop();
// Used to check that WaitForResult is only called once for each usage of the
// callback.
@@ -166,6 +169,7 @@ class TestCompletionCallback {
unsigned run_count_;
PP_Instance instance_;
Delegate* delegate_;
+ pp::MessageLoop_Dev target_loop_;
};
// Verifies that the callback didn't record any errors. If the callback is run
« no previous file with comments | « ppapi/tests/test_case.h ('k') | ppapi/tests/test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698