Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
|
bbudge
2011/08/16 22:40:49
2011
| |
| 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" |
| 11 #include "ppapi/proxy/ppapi_messages.h" | 11 #include "ppapi/proxy/ppapi_messages.h" |
| 12 #include "ppapi/proxy/serialized_var.h" | 12 #include "ppapi/proxy/serialized_var.h" |
| 13 | 13 |
| 14 namespace pp { | 14 namespace ppapi { |
| 15 namespace proxy { | 15 namespace proxy { |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 // PPP_Class in the browser implementation ------------------------------------- | 19 // PPP_Class in the browser implementation ------------------------------------- |
| 20 | 20 |
| 21 // Represents a plugin-implemented class in the browser process. This just | 21 // Represents a plugin-implemented class in the browser process. This just |
| 22 // stores the data necessary to call back the plugin. | 22 // stores the data necessary to call back the plugin. |
| 23 struct ObjectProxy { | 23 struct ObjectProxy { |
| 24 ObjectProxy(Dispatcher* d, int64 p, int64 ud) | 24 ObjectProxy(Dispatcher* d, int64 p, int64 ud) |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 236 SerializedVarReceiveInput property, | 236 SerializedVarReceiveInput property, |
| 237 SerializedVarOutParam exception, | 237 SerializedVarOutParam exception, |
| 238 SerializedVarReturnValue result) { | 238 SerializedVarReturnValue result) { |
| 239 result.Return(dispatcher(), ToPPPClass(ppp_class)->GetProperty( | 239 result.Return(dispatcher(), ToPPPClass(ppp_class)->GetProperty( |
| 240 ToUserData(object), property.Get(dispatcher()), | 240 ToUserData(object), property.Get(dispatcher()), |
| 241 exception.OutParam(dispatcher()))); | 241 exception.OutParam(dispatcher()))); |
| 242 } | 242 } |
| 243 | 243 |
| 244 void PPP_Class_Proxy::OnMsgEnumerateProperties( | 244 void PPP_Class_Proxy::OnMsgEnumerateProperties( |
| 245 int64 ppp_class, int64 object, | 245 int64 ppp_class, int64 object, |
| 246 std::vector<pp::proxy::SerializedVar>* props, | 246 std::vector<SerializedVar>* props, |
| 247 SerializedVarOutParam exception) { | 247 SerializedVarOutParam exception) { |
| 248 NOTIMPLEMENTED(); | 248 NOTIMPLEMENTED(); |
| 249 // TODO(brettw) implement this. | 249 // TODO(brettw) implement this. |
| 250 } | 250 } |
| 251 | 251 |
| 252 void PPP_Class_Proxy::OnMsgSetProperty(int64 ppp_class, int64 object, | 252 void PPP_Class_Proxy::OnMsgSetProperty(int64 ppp_class, int64 object, |
| 253 SerializedVarReceiveInput property, | 253 SerializedVarReceiveInput property, |
| 254 SerializedVarReceiveInput value, | 254 SerializedVarReceiveInput value, |
| 255 SerializedVarOutParam exception) { | 255 SerializedVarOutParam exception) { |
| 256 ToPPPClass(ppp_class)->SetProperty( | 256 ToPPPClass(ppp_class)->SetProperty( |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 288 PP_Var* args = arg_vector.Get(dispatcher(), &arg_count); | 288 PP_Var* args = arg_vector.Get(dispatcher(), &arg_count); |
| 289 result.Return(dispatcher(), ToPPPClass(ppp_class)->Construct( | 289 result.Return(dispatcher(), ToPPPClass(ppp_class)->Construct( |
| 290 ToUserData(object), arg_count, args, exception.OutParam(dispatcher()))); | 290 ToUserData(object), arg_count, args, exception.OutParam(dispatcher()))); |
| 291 } | 291 } |
| 292 | 292 |
| 293 void PPP_Class_Proxy::OnMsgDeallocate(int64 ppp_class, int64 object) { | 293 void PPP_Class_Proxy::OnMsgDeallocate(int64 ppp_class, int64 object) { |
| 294 ToPPPClass(ppp_class)->Deallocate(ToUserData(object)); | 294 ToPPPClass(ppp_class)->Deallocate(ToUserData(object)); |
| 295 } | 295 } |
| 296 | 296 |
| 297 } // namespace proxy | 297 } // namespace proxy |
| 298 } // namespace pp | 298 } // namespace ppapi |
| OLD | NEW |