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); | |
31 virtual ~PPB_Var_Deprecated_Proxy(); | 30 virtual ~PPB_Var_Deprecated_Proxy(); |
32 | 31 |
33 static const Info* GetInfo(); | 32 static const Info* GetInfo(); |
34 | 33 |
35 const PPB_Var_Deprecated* ppb_var_target() const { | |
36 return static_cast<const PPB_Var_Deprecated*>(target_interface()); | |
37 } | |
38 | |
39 // InterfaceProxy implementation. | 34 // InterfaceProxy implementation. |
40 virtual bool OnMessageReceived(const IPC::Message& msg); | 35 virtual bool OnMessageReceived(const IPC::Message& msg); |
41 | 36 |
42 private: | 37 private: |
43 // Message handlers. | 38 // Message handlers. |
44 void OnMsgAddRefObject(int64 object_id, int* unused); | 39 void OnMsgAddRefObject(int64 object_id, int* unused); |
45 void OnMsgReleaseObject(int64 object_id); | 40 void OnMsgReleaseObject(int64 object_id); |
46 void OnMsgHasProperty(SerializedVarReceiveInput var, | 41 void OnMsgHasProperty(SerializedVarReceiveInput var, |
47 SerializedVarReceiveInput name, | 42 SerializedVarReceiveInput name, |
48 SerializedVarOutParam exception, | 43 SerializedVarOutParam exception, |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 void OnMsgCreateObjectDeprecated(PP_Instance instance, | 84 void OnMsgCreateObjectDeprecated(PP_Instance instance, |
90 int64 ppp_class, | 85 int64 ppp_class, |
91 int64 ppp_class_data, | 86 int64 ppp_class_data, |
92 SerializedVarReturnValue result); | 87 SerializedVarReturnValue result); |
93 | 88 |
94 // Call in the host for messages that can be reentered. | 89 // Call in the host for messages that can be reentered. |
95 void SetAllowPluginReentrancy(); | 90 void SetAllowPluginReentrancy(); |
96 | 91 |
97 void DoReleaseObject(int64 object_id); | 92 void DoReleaseObject(int64 object_id); |
98 ScopedRunnableMethodFactory<PPB_Var_Deprecated_Proxy> task_factory_; | 93 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); |
99 }; | 98 }; |
100 | 99 |
101 } // namespace proxy | 100 } // namespace proxy |
102 } // namespace ppapi | 101 } // namespace ppapi |
103 | 102 |
104 #endif // PPAPI_PPB_VAR_DEPRECATED_PROXY_H_ | 103 #endif // PPAPI_PPB_VAR_DEPRECATED_PROXY_H_ |
OLD | NEW |