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_HOST_DISPATCHER_H_ | 5 #ifndef PPAPI_PROXY_HOST_DISPATCHER_H_ |
6 #define PPAPI_PROXY_HOST_DISPATCHER_H_ | 6 #define PPAPI_PROXY_HOST_DISPATCHER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/process.h" | 13 #include "base/process.h" |
14 #include "ppapi/c/pp_instance.h" | 14 #include "ppapi/c/pp_instance.h" |
15 #include "ppapi/proxy/dispatcher.h" | 15 #include "ppapi/proxy/dispatcher.h" |
16 #include "ppapi/shared_impl/function_group_base.h" | 16 #include "ppapi/shared_impl/function_group_base.h" |
17 | 17 |
18 struct PPB_Proxy_Private; | 18 struct PPB_Proxy_Private; |
19 struct PPB_Var_Deprecated; | |
20 | |
21 namespace base { | |
22 class WaitableEvent; | |
23 } | |
24 | |
25 namespace IPC { | |
26 class SyncChannel; | |
27 } | |
28 | 19 |
29 namespace ppapi { | 20 namespace ppapi { |
30 | 21 |
31 struct Preferences; | 22 struct Preferences; |
32 | 23 |
33 namespace proxy { | 24 namespace proxy { |
34 | 25 |
35 class VarSerialization; | |
36 | |
37 class PPAPI_PROXY_EXPORT HostDispatcher : public Dispatcher { | 26 class PPAPI_PROXY_EXPORT HostDispatcher : public Dispatcher { |
38 public: | 27 public: |
39 // Constructor for the renderer side. | 28 // Constructor for the renderer side. |
40 // | 29 // |
41 // You must call InitHostWithChannel after the constructor. | 30 // You must call InitHostWithChannel after the constructor. |
42 HostDispatcher(base::ProcessHandle host_process_handle, | 31 HostDispatcher(base::ProcessHandle host_process_handle, |
43 PP_Module module, | 32 PP_Module module, |
44 GetInterfaceFunc local_get_interface); | 33 GetInterfaceFunc local_get_interface); |
45 ~HostDispatcher(); | 34 ~HostDispatcher(); |
46 | 35 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 }; | 106 }; |
118 | 107 |
119 // Create this object on the stack to prevent the module (and hence the | 108 // Create this object on the stack to prevent the module (and hence the |
120 // dispatcher) from being deleted out from under you. This is necessary when | 109 // dispatcher) from being deleted out from under you. This is necessary when |
121 // calling some scripting functions that may delete the plugin. | 110 // calling some scripting functions that may delete the plugin. |
122 // | 111 // |
123 // This may only be called in the host. The parameter is a plain Dispatcher | 112 // This may only be called in the host. The parameter is a plain Dispatcher |
124 // since that's what most callers have. | 113 // since that's what most callers have. |
125 class ScopedModuleReference { | 114 class ScopedModuleReference { |
126 public: | 115 public: |
127 ScopedModuleReference(Dispatcher* dispatcher); | 116 explicit ScopedModuleReference(Dispatcher* dispatcher); |
128 ~ScopedModuleReference(); | 117 ~ScopedModuleReference(); |
129 | 118 |
130 private: | 119 private: |
131 HostDispatcher* dispatcher_; | 120 HostDispatcher* dispatcher_; |
132 | 121 |
133 DISALLOW_COPY_AND_ASSIGN(ScopedModuleReference); | 122 DISALLOW_COPY_AND_ASSIGN(ScopedModuleReference); |
134 }; | 123 }; |
135 | 124 |
136 } // namespace proxy | 125 } // namespace proxy |
137 } // namespace ppapi | 126 } // namespace ppapi |
138 | 127 |
139 #endif // PPAPI_PROXY_HOST_DISPATCHER_H_ | 128 #endif // PPAPI_PROXY_HOST_DISPATCHER_H_ |
OLD | NEW |