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_class_proxy.h" | 5 #include "ppapi/proxy/ppp_class_proxy.h" |
6 | 6 |
7 #include "ppapi/c/dev/ppb_var_deprecated.h" | 7 #include "ppapi/c/dev/ppb_var_deprecated.h" |
8 #include "ppapi/c/dev/ppp_class_deprecated.h" | 8 #include "ppapi/c/dev/ppp_class_deprecated.h" |
9 #include "ppapi/proxy/dispatcher.h" | 9 #include "ppapi/proxy/dispatcher.h" |
10 #include "ppapi/proxy/interface_id.h" | 10 #include "ppapi/proxy/interface_id.h" |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 } | 193 } |
194 | 194 |
195 const void* PPP_Class_Proxy::GetSourceInterface() const { | 195 const void* PPP_Class_Proxy::GetSourceInterface() const { |
196 return &class_interface; | 196 return &class_interface; |
197 } | 197 } |
198 | 198 |
199 InterfaceID PPP_Class_Proxy::GetInterfaceId() const { | 199 InterfaceID PPP_Class_Proxy::GetInterfaceId() const { |
200 return INTERFACE_ID_PPP_CLASS; | 200 return INTERFACE_ID_PPP_CLASS; |
201 } | 201 } |
202 | 202 |
203 void PPP_Class_Proxy::OnMessageReceived(const IPC::Message& msg) { | 203 bool PPP_Class_Proxy::OnMessageReceived(const IPC::Message& msg) { |
| 204 bool handled = true; |
204 IPC_BEGIN_MESSAGE_MAP(PPP_Class_Proxy, msg) | 205 IPC_BEGIN_MESSAGE_MAP(PPP_Class_Proxy, msg) |
205 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_HasProperty, | 206 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_HasProperty, |
206 OnMsgHasProperty) | 207 OnMsgHasProperty) |
207 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_HasMethod, | 208 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_HasMethod, |
208 OnMsgHasMethod) | 209 OnMsgHasMethod) |
209 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_GetProperty, | 210 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_GetProperty, |
210 OnMsgGetProperty) | 211 OnMsgGetProperty) |
211 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_EnumerateProperties, | 212 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_EnumerateProperties, |
212 OnMsgEnumerateProperties) | 213 OnMsgEnumerateProperties) |
213 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_SetProperty, | 214 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_SetProperty, |
214 OnMsgSetProperty) | 215 OnMsgSetProperty) |
215 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_Call, | 216 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_Call, |
216 OnMsgCall) | 217 OnMsgCall) |
217 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_Construct, | 218 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_Construct, |
218 OnMsgConstruct) | 219 OnMsgConstruct) |
219 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_Deallocate, | 220 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_Deallocate, |
220 OnMsgDeallocate) | 221 OnMsgDeallocate) |
| 222 IPC_MESSAGE_UNHANDLED(handled = false) |
221 IPC_END_MESSAGE_MAP() | 223 IPC_END_MESSAGE_MAP() |
| 224 return handled; |
222 } | 225 } |
223 | 226 |
224 void PPP_Class_Proxy::OnMsgHasProperty(int64 ppp_class, int64 object, | 227 void PPP_Class_Proxy::OnMsgHasProperty(int64 ppp_class, int64 object, |
225 SerializedVarReceiveInput property, | 228 SerializedVarReceiveInput property, |
226 SerializedVarOutParam exception, | 229 SerializedVarOutParam exception, |
227 bool* result) { | 230 bool* result) { |
228 *result = ToPPPClass(ppp_class)->HasProperty(ToUserData(object), | 231 *result = ToPPPClass(ppp_class)->HasProperty(ToUserData(object), |
229 property.Get(dispatcher()), exception.OutParam(dispatcher())); | 232 property.Get(dispatcher()), exception.OutParam(dispatcher())); |
230 } | 233 } |
231 | 234 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 result.Return(dispatcher(), ToPPPClass(ppp_class)->Construct( | 297 result.Return(dispatcher(), ToPPPClass(ppp_class)->Construct( |
295 ToUserData(object), arg_count, args, exception.OutParam(dispatcher()))); | 298 ToUserData(object), arg_count, args, exception.OutParam(dispatcher()))); |
296 } | 299 } |
297 | 300 |
298 void PPP_Class_Proxy::OnMsgDeallocate(int64 ppp_class, int64 object) { | 301 void PPP_Class_Proxy::OnMsgDeallocate(int64 ppp_class, int64 object) { |
299 ToPPPClass(ppp_class)->Deallocate(ToUserData(object)); | 302 ToPPPClass(ppp_class)->Deallocate(ToUserData(object)); |
300 } | 303 } |
301 | 304 |
302 } // namespace proxy | 305 } // namespace proxy |
303 } // namespace pp | 306 } // namespace pp |
OLD | NEW |