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

Side by Side Diff: ppapi/proxy/ppp_mouse_lock_proxy.cc

Issue 9391006: PPAPI: Add unlocking for PPP calls and callbacks. Add more locking. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 8 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/ppp_messaging_proxy.cc ('k') | ppapi/proxy/ppp_video_decoder_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ppapi/proxy/ppp_mouse_lock_proxy.h" 5 #include "ppapi/proxy/ppp_mouse_lock_proxy.h"
6 6
7 #include "ppapi/c/ppp_mouse_lock.h" 7 #include "ppapi/c/ppp_mouse_lock.h"
8 #include "ppapi/proxy/host_dispatcher.h" 8 #include "ppapi/proxy/host_dispatcher.h"
9 #include "ppapi/proxy/ppapi_messages.h" 9 #include "ppapi/proxy/ppapi_messages.h"
10 #include "ppapi/shared_impl/proxy_lock.h"
10 11
11 namespace ppapi { 12 namespace ppapi {
12 namespace proxy { 13 namespace proxy {
13 14
14 namespace { 15 namespace {
15 16
16 void MouseLockLost(PP_Instance instance) { 17 void MouseLockLost(PP_Instance instance) {
17 HostDispatcher* dispatcher = HostDispatcher::GetForInstance(instance); 18 HostDispatcher* dispatcher = HostDispatcher::GetForInstance(instance);
18 if (!dispatcher) { 19 if (!dispatcher) {
19 // The dispatcher should always be valid. 20 // The dispatcher should always be valid.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 IPC_BEGIN_MESSAGE_MAP(PPP_MouseLock_Proxy, msg) 65 IPC_BEGIN_MESSAGE_MAP(PPP_MouseLock_Proxy, msg)
65 IPC_MESSAGE_HANDLER(PpapiMsg_PPPMouseLock_MouseLockLost, 66 IPC_MESSAGE_HANDLER(PpapiMsg_PPPMouseLock_MouseLockLost,
66 OnMsgMouseLockLost) 67 OnMsgMouseLockLost)
67 IPC_MESSAGE_UNHANDLED(handled = false) 68 IPC_MESSAGE_UNHANDLED(handled = false)
68 IPC_END_MESSAGE_MAP() 69 IPC_END_MESSAGE_MAP()
69 return handled; 70 return handled;
70 } 71 }
71 72
72 void PPP_MouseLock_Proxy::OnMsgMouseLockLost(PP_Instance instance) { 73 void PPP_MouseLock_Proxy::OnMsgMouseLockLost(PP_Instance instance) {
73 if (ppp_mouse_lock_impl_) 74 if (ppp_mouse_lock_impl_)
74 ppp_mouse_lock_impl_->MouseLockLost(instance); 75 CallWhileUnlocked(ppp_mouse_lock_impl_->MouseLockLost, instance);
75 } 76 }
76 77
77 } // namespace proxy 78 } // namespace proxy
78 } // namespace ppapi 79 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppp_messaging_proxy.cc ('k') | ppapi/proxy/ppp_video_decoder_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698