Updates version of android sdk and api installed and creates ARM and x86 AVD's.
[chromium-blink-merge.git] / ppapi / shared_impl / proxy_lock.cc
blob8d8d1e67ed82320426749df0c1191dd5ac01dc97
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ppapi/shared_impl/proxy_lock.h"
7 #include "base/synchronization/lock.h"
8 #include "ppapi/shared_impl/ppapi_globals.h"
10 namespace ppapi {
12 // static
13 void ProxyLock::Acquire() {
14 base::Lock* lock(PpapiGlobals::Get()->GetProxyLock());
15 if (lock)
16 lock->Acquire();
19 // static
20 void ProxyLock::Release() {
21 base::Lock* lock(PpapiGlobals::Get()->GetProxyLock());
22 if (lock)
23 lock->Release();
26 void CallWhileUnlocked(const base::Closure& closure) {
27 ProxyAutoUnlock lock;
28 closure.Run();
31 void CallWhileLocked(const base::Closure& closure) {
32 ProxyAutoLock lock;
33 closure.Run();
36 } // namespace ppapi