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

Unified Diff: ppapi/shared_impl/proxy_lock.cc

Issue 10081020: PPAPI: Make blocking completion callbacks work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: export AssertLockHeld Created 8 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 | « ppapi/shared_impl/proxy_lock.h ('k') | ppapi/shared_impl/tracked_callback.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/proxy_lock.cc
diff --git a/ppapi/shared_impl/proxy_lock.cc b/ppapi/shared_impl/proxy_lock.cc
index 7ef652b41797c8d64cb4107be26cec9a1f7b8bc6..8d8d1e67ed82320426749df0c1191dd5ac01dc97 100644
--- a/ppapi/shared_impl/proxy_lock.cc
+++ b/ppapi/shared_impl/proxy_lock.cc
@@ -23,6 +23,11 @@ void ProxyLock::Release() {
lock->Release();
}
+void CallWhileUnlocked(const base::Closure& closure) {
+ ProxyAutoUnlock lock;
+ closure.Run();
+}
+
void CallWhileLocked(const base::Closure& closure) {
ProxyAutoLock lock;
closure.Run();
« no previous file with comments | « ppapi/shared_impl/proxy_lock.h ('k') | ppapi/shared_impl/tracked_callback.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698