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_PROXY_PPP_CLASS_PROXY_H_ | 5 #ifndef PPAPI_PROXY_PPP_CLASS_PROXY_H_ |
6 #define PPAPI_PROXY_PPP_CLASS_PROXY_H_ | 6 #define PPAPI_PROXY_PPP_CLASS_PROXY_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 class SerializedVarOutParam; | 24 class SerializedVarOutParam; |
25 class SerializedVarReturnValue; | 25 class SerializedVarReturnValue; |
26 | 26 |
27 class PPP_Class_Proxy : public InterfaceProxy { | 27 class PPP_Class_Proxy : public InterfaceProxy { |
28 public: | 28 public: |
29 // PPP_Class isn't a normal interface that you can query for, so this | 29 // PPP_Class isn't a normal interface that you can query for, so this |
30 // constructor doesn't take an interface pointer. | 30 // constructor doesn't take an interface pointer. |
31 PPP_Class_Proxy(Dispatcher* dispatcher); | 31 PPP_Class_Proxy(Dispatcher* dispatcher); |
32 virtual ~PPP_Class_Proxy(); | 32 virtual ~PPP_Class_Proxy(); |
33 | 33 |
| 34 // Factory function used for registration (normal code can just use the |
| 35 // constructor). |
| 36 static InterfaceProxy* Create(Dispatcher* dispatcher); |
| 37 |
34 // Creates a proxied object in the browser process. This takes the browser's | 38 // Creates a proxied object in the browser process. This takes the browser's |
35 // PPB_Var_Deprecated interface to use to create the object. The class and | 39 // PPB_Var_Deprecated interface to use to create the object. The class and |
36 static PP_Var CreateProxiedObject(const PPB_Var_Deprecated* var, | 40 static PP_Var CreateProxiedObject(const PPB_Var_Deprecated* var, |
37 Dispatcher* dispatcher, | 41 Dispatcher* dispatcher, |
38 PP_Module module_id, | 42 PP_Module module_id, |
39 int64 ppp_class, | 43 int64 ppp_class, |
40 int64 class_data); | 44 int64 class_data); |
41 | 45 |
42 // InterfaceProxy implementation. | 46 // InterfaceProxy implementation. |
43 virtual bool OnMessageReceived(const IPC::Message& msg); | 47 virtual bool OnMessageReceived(const IPC::Message& msg); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 SerializedVarReturnValue result); | 82 SerializedVarReturnValue result); |
79 void OnMsgDeallocate(int64 ppp_class, int64 object); | 83 void OnMsgDeallocate(int64 ppp_class, int64 object); |
80 | 84 |
81 DISALLOW_COPY_AND_ASSIGN(PPP_Class_Proxy); | 85 DISALLOW_COPY_AND_ASSIGN(PPP_Class_Proxy); |
82 }; | 86 }; |
83 | 87 |
84 } // namespace proxy | 88 } // namespace proxy |
85 } // namespace ppapi | 89 } // namespace ppapi |
86 | 90 |
87 #endif // PPAPI_PROXY_PPP_CLASS_PROXY_H_ | 91 #endif // PPAPI_PROXY_PPP_CLASS_PROXY_H_ |
OLD | NEW |