OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef PPAPI_PPB_VAR_PROXY_H_ |
| 6 #define PPAPI_PPB_VAR_PROXY_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "ppapi/c/pp_instance.h" |
| 11 #include "ppapi/c/pp_module.h" |
| 12 #include "ppapi/proxy/interface_proxy.h" |
| 13 |
| 14 struct PPB_Var_Deprecated; |
| 15 |
| 16 namespace pp { |
| 17 namespace proxy { |
| 18 |
| 19 class SerializedVar; |
| 20 class SerializedVarReceiveInput; |
| 21 class SerializedVarVectorReceiveInput; |
| 22 class SerializedVarOutParam; |
| 23 class SerializedVarReturnValue; |
| 24 |
| 25 class PPB_Var_Proxy : public InterfaceProxy { |
| 26 public: |
| 27 PPB_Var_Proxy(Dispatcher* dispatcher, const void* target_interface); |
| 28 virtual ~PPB_Var_Proxy(); |
| 29 |
| 30 const PPB_Var_Deprecated* ppb_var_target() const { |
| 31 return reinterpret_cast<const PPB_Var_Deprecated*>(target_interface()); |
| 32 } |
| 33 |
| 34 // InterfaceProxy implementation. |
| 35 virtual const void* GetSourceInterface() const; |
| 36 virtual InterfaceID GetInterfaceId() const; |
| 37 virtual void OnMessageReceived(const IPC::Message& msg); |
| 38 |
| 39 private: |
| 40 // Message handlers. |
| 41 void OnMsgConvertType(PP_Instance instance, |
| 42 SerializedVarReceiveInput var, |
| 43 int new_type, |
| 44 SerializedVarOutParam exception, |
| 45 SerializedVarReturnValue result); |
| 46 void OnMsgHasProperty(SerializedVarReceiveInput var, |
| 47 SerializedVarReceiveInput name, |
| 48 SerializedVarOutParam exception, |
| 49 bool* result); |
| 50 void OnMsgHasMethodDeprecated(SerializedVarReceiveInput var, |
| 51 SerializedVarReceiveInput name, |
| 52 SerializedVarOutParam exception, |
| 53 bool* result); |
| 54 void OnMsgGetProperty(SerializedVarReceiveInput var, |
| 55 SerializedVarReceiveInput name, |
| 56 SerializedVarOutParam exception, |
| 57 SerializedVarReturnValue result); |
| 58 void OnMsgEnumerateProperties( |
| 59 SerializedVarReceiveInput var, |
| 60 std::vector<pp::proxy::SerializedVar>* props, |
| 61 SerializedVarOutParam exception); |
| 62 void OnMsgSetPropertyDeprecated(SerializedVarReceiveInput var, |
| 63 SerializedVarReceiveInput name, |
| 64 SerializedVarReceiveInput value, |
| 65 SerializedVarOutParam exception); |
| 66 void OnMsgIsCallable(SerializedVarReceiveInput object, bool* result); |
| 67 void OnMsgDeleteProperty(SerializedVarReceiveInput var, |
| 68 SerializedVarReceiveInput name, |
| 69 SerializedVarOutParam exception, |
| 70 bool* result); |
| 71 void OnMsgCall(SerializedVarReceiveInput object, |
| 72 SerializedVarReceiveInput this_object, |
| 73 SerializedVarReceiveInput method_name, |
| 74 SerializedVarVectorReceiveInput arg_vector, |
| 75 SerializedVarOutParam exception, |
| 76 SerializedVarReturnValue result); |
| 77 void OnMsgCallDeprecated(SerializedVarReceiveInput object, |
| 78 SerializedVarReceiveInput method_name, |
| 79 SerializedVarVectorReceiveInput arg_vector, |
| 80 SerializedVarOutParam exception, |
| 81 SerializedVarReturnValue result); |
| 82 void OnMsgConstruct(SerializedVarReceiveInput var, |
| 83 SerializedVarVectorReceiveInput arg_vector, |
| 84 SerializedVarOutParam exception, |
| 85 SerializedVarReturnValue result); |
| 86 void OnMsgIsInstanceOfDeprecated(pp::proxy::SerializedVarReceiveInput var, |
| 87 int64 ppp_class, |
| 88 int64* ppp_class_data, |
| 89 bool* result); |
| 90 void OnMsgCreateObjectDeprecated(PP_Module module_id, |
| 91 int64 ppp_class, |
| 92 int64 ppp_class_data, |
| 93 SerializedVarReturnValue result); |
| 94 }; |
| 95 |
| 96 } // namespace proxy |
| 97 } // namespace pp |
| 98 |
| 99 #endif // PPAPI_PPB_VAR_PROXY_H_ |
OLD | NEW |