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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 PP_Var PPP_Class_Proxy::CreateProxiedObject(const PPB_Var_Deprecated* var, | 185 PP_Var PPP_Class_Proxy::CreateProxiedObject(const PPB_Var_Deprecated* var, |
186 Dispatcher* dispatcher, | 186 Dispatcher* dispatcher, |
187 PP_Module module_id, | 187 PP_Module module_id, |
188 int64 ppp_class, | 188 int64 ppp_class, |
189 int64 class_data) { | 189 int64 class_data) { |
190 ObjectProxy* object_proxy = new ObjectProxy(dispatcher, | 190 ObjectProxy* object_proxy = new ObjectProxy(dispatcher, |
191 ppp_class, class_data); | 191 ppp_class, class_data); |
192 return var->CreateObject(module_id, &class_interface, object_proxy); | 192 return var->CreateObject(module_id, &class_interface, object_proxy); |
193 } | 193 } |
194 | 194 |
195 const void* PPP_Class_Proxy::GetSourceInterface() const { | |
196 return &class_interface; | |
197 } | |
198 | |
199 InterfaceID PPP_Class_Proxy::GetInterfaceId() const { | |
200 return INTERFACE_ID_PPP_CLASS; | |
201 } | |
202 | |
203 bool PPP_Class_Proxy::OnMessageReceived(const IPC::Message& msg) { | 195 bool PPP_Class_Proxy::OnMessageReceived(const IPC::Message& msg) { |
204 bool handled = true; | 196 bool handled = true; |
205 IPC_BEGIN_MESSAGE_MAP(PPP_Class_Proxy, msg) | 197 IPC_BEGIN_MESSAGE_MAP(PPP_Class_Proxy, msg) |
206 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_HasProperty, | 198 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_HasProperty, |
207 OnMsgHasProperty) | 199 OnMsgHasProperty) |
208 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_HasMethod, | 200 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_HasMethod, |
209 OnMsgHasMethod) | 201 OnMsgHasMethod) |
210 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_GetProperty, | 202 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_GetProperty, |
211 OnMsgGetProperty) | 203 OnMsgGetProperty) |
212 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_EnumerateProperties, | 204 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_EnumerateProperties, |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 result.Return(dispatcher(), ToPPPClass(ppp_class)->Construct( | 289 result.Return(dispatcher(), ToPPPClass(ppp_class)->Construct( |
298 ToUserData(object), arg_count, args, exception.OutParam(dispatcher()))); | 290 ToUserData(object), arg_count, args, exception.OutParam(dispatcher()))); |
299 } | 291 } |
300 | 292 |
301 void PPP_Class_Proxy::OnMsgDeallocate(int64 ppp_class, int64 object) { | 293 void PPP_Class_Proxy::OnMsgDeallocate(int64 ppp_class, int64 object) { |
302 ToPPPClass(ppp_class)->Deallocate(ToUserData(object)); | 294 ToPPPClass(ppp_class)->Deallocate(ToUserData(object)); |
303 } | 295 } |
304 | 296 |
305 } // namespace proxy | 297 } // namespace proxy |
306 } // namespace pp | 298 } // namespace pp |
OLD | NEW |