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

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

Issue 3104031: Add hook into pepper to query if running on the main thread. (Closed) Base URL: git://codf21.jail.google.com/chromium.git
Patch Set: again! Created 10 years, 4 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 | « DEPS ('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
diff --git a/webkit/glue/plugins/pepper_plugin_module.cc b/webkit/glue/plugins/pepper_plugin_module.cc
index 3b4486889da8ba513651ac06d23ea5c137347a5c..6af71dc8e8f7739fa748e85a3280f84d1f6ceb2a 100644
--- a/webkit/glue/plugins/pepper_plugin_module.cc
+++ b/webkit/glue/plugins/pepper_plugin_module.cc
@@ -120,13 +120,18 @@ void CallOnMainThread(int delay_in_msec,
delay_in_msec);
}
+bool IsMainThread() {
+ return GetMainThreadMessageLoop()->BelongsToCurrentThread();
+}
+
const PPB_Core core_interface = {
&AddRefResource,
&ReleaseResource,
&MemAlloc,
&MemFree,
&GetTime,
- &CallOnMainThread
+ &CallOnMainThread,
+ &IsMainThread
};
// PPB_Testing -----------------------------------------------------------------
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698