OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef PPAPI_PPB_VAR_DEPRECATED_PROXY_H_ | 5 #ifndef PPAPI_PPB_VAR_DEPRECATED_PROXY_H_ |
6 #define PPAPI_PPB_VAR_DEPRECATED_PROXY_H_ | 6 #define PPAPI_PPB_VAR_DEPRECATED_PROXY_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/task.h" | 10 #include "base/task.h" |
11 #include "ppapi/c/pp_instance.h" | 11 #include "ppapi/c/pp_instance.h" |
12 #include "ppapi/proxy/interface_proxy.h" | 12 #include "ppapi/proxy/interface_proxy.h" |
13 | 13 |
14 struct PPB_Var_Deprecated; | 14 struct PPB_Var_Deprecated; |
15 | 15 |
16 namespace ppapi { | 16 namespace ppapi { |
17 namespace proxy { | 17 namespace proxy { |
18 | 18 |
19 class SerializedVar; | 19 class SerializedVar; |
20 class SerializedVarArray; | 20 class SerializedVarArray; |
21 class SerializedVarReceiveInput; | 21 class SerializedVarReceiveInput; |
22 class SerializedVarVectorOutParam; | 22 class SerializedVarVectorOutParam; |
23 class SerializedVarVectorReceiveInput; | 23 class SerializedVarVectorReceiveInput; |
24 class SerializedVarOutParam; | 24 class SerializedVarOutParam; |
25 class SerializedVarReturnValue; | 25 class SerializedVarReturnValue; |
26 | 26 |
27 class PPB_Var_Deprecated_Proxy : public InterfaceProxy { | 27 class PPB_Var_Deprecated_Proxy : public InterfaceProxy { |
28 public: | 28 public: |
29 PPB_Var_Deprecated_Proxy(Dispatcher* dispatcher); | 29 PPB_Var_Deprecated_Proxy(Dispatcher* dispatcher, |
| 30 const void* target_interface); |
30 virtual ~PPB_Var_Deprecated_Proxy(); | 31 virtual ~PPB_Var_Deprecated_Proxy(); |
31 | 32 |
32 static const Info* GetInfo(); | 33 static const Info* GetInfo(); |
33 | 34 |
| 35 const PPB_Var_Deprecated* ppb_var_target() const { |
| 36 return static_cast<const PPB_Var_Deprecated*>(target_interface()); |
| 37 } |
| 38 |
34 // InterfaceProxy implementation. | 39 // InterfaceProxy implementation. |
35 virtual bool OnMessageReceived(const IPC::Message& msg); | 40 virtual bool OnMessageReceived(const IPC::Message& msg); |
36 | 41 |
37 private: | 42 private: |
38 // Message handlers. | 43 // Message handlers. |
39 void OnMsgAddRefObject(int64 object_id, int* unused); | 44 void OnMsgAddRefObject(int64 object_id, int* unused); |
40 void OnMsgReleaseObject(int64 object_id); | 45 void OnMsgReleaseObject(int64 object_id); |
41 void OnMsgHasProperty(SerializedVarReceiveInput var, | 46 void OnMsgHasProperty(SerializedVarReceiveInput var, |
42 SerializedVarReceiveInput name, | 47 SerializedVarReceiveInput name, |
43 SerializedVarOutParam exception, | 48 SerializedVarOutParam exception, |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 void OnMsgCreateObjectDeprecated(PP_Instance instance, | 89 void OnMsgCreateObjectDeprecated(PP_Instance instance, |
85 int64 ppp_class, | 90 int64 ppp_class, |
86 int64 ppp_class_data, | 91 int64 ppp_class_data, |
87 SerializedVarReturnValue result); | 92 SerializedVarReturnValue result); |
88 | 93 |
89 // Call in the host for messages that can be reentered. | 94 // Call in the host for messages that can be reentered. |
90 void SetAllowPluginReentrancy(); | 95 void SetAllowPluginReentrancy(); |
91 | 96 |
92 void DoReleaseObject(int64 object_id); | 97 void DoReleaseObject(int64 object_id); |
93 ScopedRunnableMethodFactory<PPB_Var_Deprecated_Proxy> task_factory_; | 98 ScopedRunnableMethodFactory<PPB_Var_Deprecated_Proxy> task_factory_; |
94 | |
95 const PPB_Var_Deprecated* ppb_var_impl_; | |
96 | |
97 DISALLOW_COPY_AND_ASSIGN(PPB_Var_Deprecated_Proxy); | |
98 }; | 99 }; |
99 | 100 |
100 } // namespace proxy | 101 } // namespace proxy |
101 } // namespace ppapi | 102 } // namespace ppapi |
102 | 103 |
103 #endif // PPAPI_PPB_VAR_DEPRECATED_PROXY_H_ | 104 #endif // PPAPI_PPB_VAR_DEPRECATED_PROXY_H_ |
OLD | NEW |