[email protected] | 5f7a75d7 | 2011-04-22 17:45:46 | [diff] [blame] | 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
[email protected] | 1e175e4 | 2010-11-03 20:04:38 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
[email protected] | 0a6d5f6 | 2011-11-11 08:04:07 | [diff] [blame] | 5 | #ifndef PPAPI_PROXY_PPB_VAR_DEPRECATED_PROXY_H_ |
| 6 | #define PPAPI_PROXY_PPB_VAR_DEPRECATED_PROXY_H_ |
[email protected] | 1e175e4 | 2010-11-03 20:04:38 | [diff] [blame] | 7 | |
| 8 | #include <vector> |
| 9 | |
[email protected] | c694427 | 2012-01-06 22:12:28 | [diff] [blame] | 10 | #include "base/memory/weak_ptr.h" |
[email protected] | 1e175e4 | 2010-11-03 20:04:38 | [diff] [blame] | 11 | #include "ppapi/c/pp_instance.h" |
[email protected] | 1e175e4 | 2010-11-03 20:04:38 | [diff] [blame] | 12 | #include "ppapi/proxy/interface_proxy.h" |
| 13 | |
| 14 | struct PPB_Var_Deprecated; |
| 15 | |
[email protected] | 4d2efd2 | 2011-08-18 21:58:02 | [diff] [blame] | 16 | namespace ppapi { |
[email protected] | 1e175e4 | 2010-11-03 20:04:38 | [diff] [blame] | 17 | namespace proxy { |
| 18 | |
| 19 | class SerializedVar; |
[email protected] | 1e175e4 | 2010-11-03 20:04:38 | [diff] [blame] | 20 | class SerializedVarReceiveInput; |
| 21 | class SerializedVarVectorOutParam; |
| 22 | class SerializedVarVectorReceiveInput; |
| 23 | class SerializedVarOutParam; |
| 24 | class SerializedVarReturnValue; |
| 25 | |
| 26 | class PPB_Var_Deprecated_Proxy : public InterfaceProxy { |
| 27 | public: |
[email protected] | 0a6d5f6 | 2011-11-11 08:04:07 | [diff] [blame] | 28 | explicit PPB_Var_Deprecated_Proxy(Dispatcher* dispatcher); |
[email protected] | 1e175e4 | 2010-11-03 20:04:38 | [diff] [blame] | 29 | virtual ~PPB_Var_Deprecated_Proxy(); |
| 30 | |
[email protected] | 637fc4cd | 2013-12-06 22:08:15 | [diff] [blame^] | 31 | static const PPB_Var_Deprecated* GetProxyInterface(); |
[email protected] | 465faa2 | 2011-02-08 16:31:46 | [diff] [blame] | 32 | |
[email protected] | 1e175e4 | 2010-11-03 20:04:38 | [diff] [blame] | 33 | // InterfaceProxy implementation. |
[email protected] | a95986a8 | 2010-12-24 06:19:28 | [diff] [blame] | 34 | virtual bool OnMessageReceived(const IPC::Message& msg); |
[email protected] | 1e175e4 | 2010-11-03 20:04:38 | [diff] [blame] | 35 | |
| 36 | private: |
| 37 | // Message handlers. |
[email protected] | 5b2d385 | 2011-04-19 23:22:40 | [diff] [blame] | 38 | void OnMsgAddRefObject(int64 object_id, int* unused); |
| 39 | void OnMsgReleaseObject(int64 object_id); |
[email protected] | 1e175e4 | 2010-11-03 20:04:38 | [diff] [blame] | 40 | void OnMsgHasProperty(SerializedVarReceiveInput var, |
| 41 | SerializedVarReceiveInput name, |
| 42 | SerializedVarOutParam exception, |
[email protected] | 799d1ab | 2010-11-09 17:16:28 | [diff] [blame] | 43 | PP_Bool* result); |
[email protected] | 1e175e4 | 2010-11-03 20:04:38 | [diff] [blame] | 44 | void OnMsgHasMethodDeprecated(SerializedVarReceiveInput var, |
| 45 | SerializedVarReceiveInput name, |
| 46 | SerializedVarOutParam exception, |
[email protected] | 799d1ab | 2010-11-09 17:16:28 | [diff] [blame] | 47 | PP_Bool* result); |
[email protected] | 1e175e4 | 2010-11-03 20:04:38 | [diff] [blame] | 48 | void OnMsgGetProperty(SerializedVarReceiveInput var, |
| 49 | SerializedVarReceiveInput name, |
| 50 | SerializedVarOutParam exception, |
| 51 | SerializedVarReturnValue result); |
| 52 | void OnMsgEnumerateProperties( |
| 53 | SerializedVarReceiveInput var, |
| 54 | SerializedVarVectorOutParam props, |
| 55 | SerializedVarOutParam exception); |
| 56 | void OnMsgSetPropertyDeprecated(SerializedVarReceiveInput var, |
| 57 | SerializedVarReceiveInput name, |
| 58 | SerializedVarReceiveInput value, |
| 59 | SerializedVarOutParam exception); |
| 60 | void OnMsgDeleteProperty(SerializedVarReceiveInput var, |
| 61 | SerializedVarReceiveInput name, |
| 62 | SerializedVarOutParam exception, |
[email protected] | 799d1ab | 2010-11-09 17:16:28 | [diff] [blame] | 63 | PP_Bool* result); |
[email protected] | 1e175e4 | 2010-11-03 20:04:38 | [diff] [blame] | 64 | void OnMsgCall(SerializedVarReceiveInput object, |
| 65 | SerializedVarReceiveInput this_object, |
| 66 | SerializedVarReceiveInput method_name, |
| 67 | SerializedVarVectorReceiveInput arg_vector, |
| 68 | SerializedVarOutParam exception, |
| 69 | SerializedVarReturnValue result); |
| 70 | void OnMsgCallDeprecated(SerializedVarReceiveInput object, |
| 71 | SerializedVarReceiveInput method_name, |
| 72 | SerializedVarVectorReceiveInput arg_vector, |
| 73 | SerializedVarOutParam exception, |
| 74 | SerializedVarReturnValue result); |
| 75 | void OnMsgConstruct(SerializedVarReceiveInput var, |
| 76 | SerializedVarVectorReceiveInput arg_vector, |
| 77 | SerializedVarOutParam exception, |
| 78 | SerializedVarReturnValue result); |
[email protected] | 4d2efd2 | 2011-08-18 21:58:02 | [diff] [blame] | 79 | void OnMsgIsInstanceOfDeprecated(SerializedVarReceiveInput var, |
[email protected] | 1e175e4 | 2010-11-03 20:04:38 | [diff] [blame] | 80 | int64 ppp_class, |
| 81 | int64* ppp_class_data, |
[email protected] | 799d1ab | 2010-11-09 17:16:28 | [diff] [blame] | 82 | PP_Bool* result); |
[email protected] | 859a7f3 | 2011-01-15 03:44:13 | [diff] [blame] | 83 | void OnMsgCreateObjectDeprecated(PP_Instance instance, |
[email protected] | 1e175e4 | 2010-11-03 20:04:38 | [diff] [blame] | 84 | int64 ppp_class, |
| 85 | int64 ppp_class_data, |
| 86 | SerializedVarReturnValue result); |
[email protected] | 037f63f | 2011-03-13 19:44:46 | [diff] [blame] | 87 | |
| 88 | // Call in the host for messages that can be reentered. |
| 89 | void SetAllowPluginReentrancy(); |
[email protected] | 5f7a75d7 | 2011-04-22 17:45:46 | [diff] [blame] | 90 | |
| 91 | void DoReleaseObject(int64 object_id); |
[email protected] | 5c96602 | 2011-09-13 18:09:37 | [diff] [blame] | 92 | |
| 93 | const PPB_Var_Deprecated* ppb_var_impl_; |
| 94 | |
[email protected] | dcf1063 | 2013-10-08 19:23:33 | [diff] [blame] | 95 | base::WeakPtrFactory<PPB_Var_Deprecated_Proxy> task_factory_; |
| 96 | |
[email protected] | 5c96602 | 2011-09-13 18:09:37 | [diff] [blame] | 97 | DISALLOW_COPY_AND_ASSIGN(PPB_Var_Deprecated_Proxy); |
[email protected] | 1e175e4 | 2010-11-03 20:04:38 | [diff] [blame] | 98 | }; |
| 99 | |
| 100 | } // namespace proxy |
[email protected] | 4d2efd2 | 2011-08-18 21:58:02 | [diff] [blame] | 101 | } // namespace ppapi |
[email protected] | 1e175e4 | 2010-11-03 20:04:38 | [diff] [blame] | 102 | |
[email protected] | 0a6d5f6 | 2011-11-11 08:04:07 | [diff] [blame] | 103 | #endif // PPAPI_PROXY_PPB_VAR_DEPRECATED_PROXY_H_ |