OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_instance_proxy.h" | 5 #include "ppapi/proxy/ppp_instance_proxy.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ppapi/c/pp_var.h" | 9 #include "ppapi/c/pp_var.h" |
10 #include "ppapi/c/ppp_instance.h" | 10 #include "ppapi/c/ppp_instance.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
50 | 50 |
51 void DidChangeFocus(PP_Instance instance, PP_Bool has_focus) { | 51 void DidChangeFocus(PP_Instance instance, PP_Bool has_focus) { |
52 HostDispatcher::GetForInstance(instance)->Send( | 52 HostDispatcher::GetForInstance(instance)->Send( |
53 new PpapiMsg_PPPInstance_DidChangeFocus(INTERFACE_ID_PPP_INSTANCE, | 53 new PpapiMsg_PPPInstance_DidChangeFocus(INTERFACE_ID_PPP_INSTANCE, |
54 instance, has_focus)); | 54 instance, has_focus)); |
55 } | 55 } |
56 | 56 |
57 PP_Bool HandleInputEvent(PP_Instance instance, | 57 PP_Bool HandleInputEvent(PP_Instance instance, |
58 const PP_InputEvent* event) { | 58 const PP_InputEvent* event) { |
59 PP_Bool result = PP_FALSE; | 59 PP_Bool result = PP_FALSE; |
60 HostDispatcher::GetForInstance(instance)->Send( | 60 IPC::Message* msg = new PpapiMsg_PPPInstance_HandleInputEvent( |
61 new PpapiMsg_PPPInstance_HandleInputEvent(INTERFACE_ID_PPP_INSTANCE, | 61 INTERFACE_ID_PPP_INSTANCE, instance, *event, &result); |
62 instance, *event, &result)); | 62 // Make this message not unblock, to avoid re-entrancy problems when the |
63 // plugin does a sync call to the renderer. | |
brettw
2011/02/02 05:00:08
Can you add something like: "This will force any s
| |
64 msg->set_unblock(false); | |
65 HostDispatcher::GetForInstance(instance)->Send(msg); | |
63 return result; | 66 return result; |
64 } | 67 } |
65 | 68 |
66 PP_Bool HandleDocumentLoad(PP_Instance instance, | 69 PP_Bool HandleDocumentLoad(PP_Instance instance, |
67 PP_Resource url_loader) { | 70 PP_Resource url_loader) { |
68 PP_Bool result = PP_FALSE; | 71 PP_Bool result = PP_FALSE; |
69 HostResource serialized_loader; | 72 HostResource serialized_loader; |
70 serialized_loader.SetHostResource(instance, url_loader); | 73 serialized_loader.SetHostResource(instance, url_loader); |
71 HostDispatcher::GetForInstance(instance)->Send( | 74 HostDispatcher::GetForInstance(instance)->Send( |
72 new PpapiMsg_PPPInstance_HandleDocumentLoad(INTERFACE_ID_PPP_INSTANCE, | 75 new PpapiMsg_PPPInstance_HandleDocumentLoad(INTERFACE_ID_PPP_INSTANCE, |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
192 | 195 |
193 void PPP_Instance_Proxy::OnMsgGetInstanceObject( | 196 void PPP_Instance_Proxy::OnMsgGetInstanceObject( |
194 PP_Instance instance, | 197 PP_Instance instance, |
195 SerializedVarReturnValue result) { | 198 SerializedVarReturnValue result) { |
196 result.Return(dispatcher(), | 199 result.Return(dispatcher(), |
197 ppp_instance_target()->GetInstanceObject(instance)); | 200 ppp_instance_target()->GetInstanceObject(instance)); |
198 } | 201 } |
199 | 202 |
200 } // namespace proxy | 203 } // namespace proxy |
201 } // namespace pp | 204 } // namespace pp |
OLD | NEW |