blob: db62fc2af1af91a265ef6fb4a2b9fbd98bb9000f [file] [log] [blame]
[email protected]5f7a75d72011-04-22 17:45:461// Copyright (c) 2011 The Chromium Authors. All rights reserved.
[email protected]1e175e42010-11-03 20:04:382// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]0a6d5f62011-11-11 08:04:075#ifndef PPAPI_PROXY_PPB_VAR_DEPRECATED_PROXY_H_
6#define PPAPI_PROXY_PPB_VAR_DEPRECATED_PROXY_H_
[email protected]1e175e42010-11-03 20:04:387
8#include <vector>
9
[email protected]c6944272012-01-06 22:12:2810#include "base/memory/weak_ptr.h"
[email protected]1e175e42010-11-03 20:04:3811#include "ppapi/c/pp_instance.h"
[email protected]1e175e42010-11-03 20:04:3812#include "ppapi/proxy/interface_proxy.h"
13
14struct PPB_Var_Deprecated;
15
[email protected]4d2efd22011-08-18 21:58:0216namespace ppapi {
[email protected]1e175e42010-11-03 20:04:3817namespace proxy {
18
19class SerializedVar;
[email protected]1e175e42010-11-03 20:04:3820class SerializedVarReceiveInput;
21class SerializedVarVectorOutParam;
22class SerializedVarVectorReceiveInput;
23class SerializedVarOutParam;
24class SerializedVarReturnValue;
25
26class PPB_Var_Deprecated_Proxy : public InterfaceProxy {
27 public:
[email protected]0a6d5f62011-11-11 08:04:0728 explicit PPB_Var_Deprecated_Proxy(Dispatcher* dispatcher);
[email protected]1e175e42010-11-03 20:04:3829 virtual ~PPB_Var_Deprecated_Proxy();
30
[email protected]637fc4cd2013-12-06 22:08:1531 static const PPB_Var_Deprecated* GetProxyInterface();
[email protected]465faa22011-02-08 16:31:4632
[email protected]1e175e42010-11-03 20:04:3833 // InterfaceProxy implementation.
[email protected]a95986a82010-12-24 06:19:2834 virtual bool OnMessageReceived(const IPC::Message& msg);
[email protected]1e175e42010-11-03 20:04:3835
36 private:
37 // Message handlers.
[email protected]5b2d3852011-04-19 23:22:4038 void OnMsgAddRefObject(int64 object_id, int* unused);
39 void OnMsgReleaseObject(int64 object_id);
[email protected]1e175e42010-11-03 20:04:3840 void OnMsgHasProperty(SerializedVarReceiveInput var,
41 SerializedVarReceiveInput name,
42 SerializedVarOutParam exception,
[email protected]799d1ab2010-11-09 17:16:2843 PP_Bool* result);
[email protected]1e175e42010-11-03 20:04:3844 void OnMsgHasMethodDeprecated(SerializedVarReceiveInput var,
45 SerializedVarReceiveInput name,
46 SerializedVarOutParam exception,
[email protected]799d1ab2010-11-09 17:16:2847 PP_Bool* result);
[email protected]1e175e42010-11-03 20:04:3848 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]799d1ab2010-11-09 17:16:2863 PP_Bool* result);
[email protected]1e175e42010-11-03 20:04:3864 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]4d2efd22011-08-18 21:58:0279 void OnMsgIsInstanceOfDeprecated(SerializedVarReceiveInput var,
[email protected]1e175e42010-11-03 20:04:3880 int64 ppp_class,
81 int64* ppp_class_data,
[email protected]799d1ab2010-11-09 17:16:2882 PP_Bool* result);
[email protected]859a7f32011-01-15 03:44:1383 void OnMsgCreateObjectDeprecated(PP_Instance instance,
[email protected]1e175e42010-11-03 20:04:3884 int64 ppp_class,
85 int64 ppp_class_data,
86 SerializedVarReturnValue result);
[email protected]037f63f2011-03-13 19:44:4687
88 // Call in the host for messages that can be reentered.
89 void SetAllowPluginReentrancy();
[email protected]5f7a75d72011-04-22 17:45:4690
91 void DoReleaseObject(int64 object_id);
[email protected]5c966022011-09-13 18:09:3792
93 const PPB_Var_Deprecated* ppb_var_impl_;
94
[email protected]dcf10632013-10-08 19:23:3395 base::WeakPtrFactory<PPB_Var_Deprecated_Proxy> task_factory_;
96
[email protected]5c966022011-09-13 18:09:3797 DISALLOW_COPY_AND_ASSIGN(PPB_Var_Deprecated_Proxy);
[email protected]1e175e42010-11-03 20:04:3898};
99
100} // namespace proxy
[email protected]4d2efd22011-08-18 21:58:02101} // namespace ppapi
[email protected]1e175e42010-11-03 20:04:38102
[email protected]0a6d5f62011-11-11 08:04:07103#endif // PPAPI_PROXY_PPB_VAR_DEPRECATED_PROXY_H_