Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: webkit/plugins/ppapi/plugin_module.h

Issue 9192038: Relanding this with fixes to the mac dbg builder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/glue/webkit_glue.gypi ('k') | webkit/plugins/ppapi/plugin_module.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 WEBKIT_PLUGINS_PPAPI_PLUGIN_MODULE_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_PLUGIN_MODULE_H_
6 #define WEBKIT_PLUGINS_PPAPI_PLUGIN_MODULE_H_ 6 #define WEBKIT_PLUGINS_PPAPI_PLUGIN_MODULE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // for in-process plugins), the Reserve function will assume that the ID is 134 // for in-process plugins), the Reserve function will assume that the ID is
135 // usable and will return true. 135 // usable and will return true.
136 void SetReserveInstanceIDCallback( 136 void SetReserveInstanceIDCallback(
137 PP_Bool (*reserve)(PP_Module, PP_Instance)); 137 PP_Bool (*reserve)(PP_Module, PP_Instance));
138 bool ReserveInstanceID(PP_Instance instance); 138 bool ReserveInstanceID(PP_Instance instance);
139 139
140 // These should only be called from the main thread. 140 // These should only be called from the main thread.
141 void SetBroker(PluginDelegate::PpapiBroker* broker); 141 void SetBroker(PluginDelegate::PpapiBroker* broker);
142 PluginDelegate::PpapiBroker* GetBroker(); 142 PluginDelegate::PpapiBroker* GetBroker();
143 143
144 // Retrieves the forwarding interface used for talking to WebKit.
145 ::ppapi::WebKitForwarding* GetWebKitForwarding();
146
147 private: 144 private:
148 // Calls the InitializeModule entrypoint. The entrypoint must have been 145 // Calls the InitializeModule entrypoint. The entrypoint must have been
149 // set and the plugin must not be out of process (we don't maintain 146 // set and the plugin must not be out of process (we don't maintain
150 // entrypoints in that case). 147 // entrypoints in that case).
151 bool InitializeModule(const EntryPoints& entry_points); 148 bool InitializeModule(const EntryPoints& entry_points);
152 149
153 PluginDelegate::ModuleLifetime* lifetime_delegate_; 150 PluginDelegate::ModuleLifetime* lifetime_delegate_;
154 151
155 // Tracker for completion callbacks, used mainly to ensure that all callbacks 152 // Tracker for completion callbacks, used mainly to ensure that all callbacks
156 // are properly aborted on module shutdown. 153 // are properly aborted on module shutdown.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 const std::string name_; 186 const std::string name_;
190 const FilePath path_; 187 const FilePath path_;
191 188
192 // Non-owning pointers to all instances associated with this module. When 189 // Non-owning pointers to all instances associated with this module. When
193 // there are no more instances, this object should be deleted. 190 // there are no more instances, this object should be deleted.
194 typedef std::set<PluginInstance*> PluginInstanceSet; 191 typedef std::set<PluginInstance*> PluginInstanceSet;
195 PluginInstanceSet instances_; 192 PluginInstanceSet instances_;
196 193
197 PP_Bool (*reserve_instance_id_)(PP_Module, PP_Instance); 194 PP_Bool (*reserve_instance_id_)(PP_Module, PP_Instance);
198 195
199 // Lazily created by GetWebKitForwarding.
200 scoped_ptr< ::ppapi::WebKitForwarding> webkit_forwarding_;
201
202 DISALLOW_COPY_AND_ASSIGN(PluginModule); 196 DISALLOW_COPY_AND_ASSIGN(PluginModule);
203 }; 197 };
204 198
205 } // namespace ppapi 199 } // namespace ppapi
206 } // namespace webkit 200 } // namespace webkit
207 201
208 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_MODULE_H_ 202 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_MODULE_H_
OLDNEW
« no previous file with comments | « webkit/glue/webkit_glue.gypi ('k') | webkit/plugins/ppapi/plugin_module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698