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

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

Issue 19828007: Hide knowledge of webkit::ppapi::Plugin from chrome. This is part of moving ppapi implementation fr… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: nits Created 7 years, 5 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/plugins/ppapi/plugin_delegate.h ('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>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
17 #include "base/native_library.h" 17 #include "base/native_library.h"
18 #include "base/process.h" 18 #include "base/process.h"
19 #include "ppapi/c/pp_bool.h" 19 #include "ppapi/c/pp_bool.h"
20 #include "ppapi/c/pp_instance.h" 20 #include "ppapi/c/pp_instance.h"
21 #include "ppapi/c/pp_module.h" 21 #include "ppapi/c/pp_module.h"
22 #include "ppapi/c/ppb.h" 22 #include "ppapi/c/ppb.h"
23 #include "ppapi/c/ppb_core.h" 23 #include "ppapi/c/ppb_core.h"
24 #include "ppapi/c/private/ppb_nacl_private.h" 24 #include "ppapi/c/private/ppb_instance_private.h"
25 #include "ppapi/shared_impl/ppapi_permissions.h" 25 #include "ppapi/shared_impl/ppapi_permissions.h"
26 #include "webkit/plugins/ppapi/plugin_delegate.h" 26 #include "webkit/plugins/ppapi/plugin_delegate.h"
27 #include "webkit/plugins/webkit_plugins_export.h" 27 #include "webkit/plugins/webkit_plugins_export.h"
28 28
29 typedef void* NPIdentifier; 29 typedef void* NPIdentifier;
30 30
31 namespace base { 31 namespace base {
32 class FilePath; 32 class FilePath;
33 } 33 }
34 34
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 bool InitAsInternalPlugin(const EntryPoints& entry_points); 110 bool InitAsInternalPlugin(const EntryPoints& entry_points);
111 111
112 // Initializes this module using the given library path as the plugin. 112 // Initializes this module using the given library path as the plugin.
113 // Returns true on success. False means that the plugin can not be used. 113 // Returns true on success. False means that the plugin can not be used.
114 bool InitAsLibrary(const base::FilePath& path); 114 bool InitAsLibrary(const base::FilePath& path);
115 115
116 // Initializes this module for the given out of process proxy. This takes 116 // Initializes this module for the given out of process proxy. This takes
117 // ownership of the given pointer, even in the failure case. 117 // ownership of the given pointer, even in the failure case.
118 void InitAsProxied(PluginDelegate::OutOfProcessProxy* out_of_process_proxy); 118 void InitAsProxied(PluginDelegate::OutOfProcessProxy* out_of_process_proxy);
119 119
120 // Creates a new module for a NaCl instance that will be using the IPC proxy. 120 // Creates a new module for an external plugin instance that will be using the
121 // We can't use the existing module, or new instances of the plugin can't 121 // IPC proxy. We can't use the existing module, or new instances of the plugin
122 // be created. 122 // can't be created.
123 scoped_refptr<PluginModule> CreateModuleForNaClInstance(); 123 scoped_refptr<PluginModule> CreateModuleForExternalPluginInstance();
124 124
125 // Initializes the NaCl module for the out of process proxy. InitAsProxied 125 // Initializes the external plugin module for the out of process proxy.
126 // must be called before calling InitAsProxiedNaCl. Returns a NaCl result code 126 // InitAsProxied must be called before calling InitAsProxiedExternalPlugin.
127 // indicating whether the proxy started successfully or there was an error. 127 // Returns a result code indicating whether the proxy started successfully or
128 PP_NaClResult InitAsProxiedNaCl(PluginInstance* instance); 128 // there was an error.
129 PP_ExternalPluginResult InitAsProxiedExternalPlugin(PluginInstance* instance);
129 130
130 bool IsProxied() const; 131 bool IsProxied() const;
131 132
132 // Returns the peer process ID if the plugin is running out of process; 133 // Returns the peer process ID if the plugin is running out of process;
133 // returns |base::kNullProcessId| otherwise. 134 // returns |base::kNullProcessId| otherwise.
134 base::ProcessId GetPeerProcessId(); 135 base::ProcessId GetPeerProcessId();
135 136
136 // Returns the plugin child process ID if the plugin is running out of 137 // Returns the plugin child process ID if the plugin is running out of
137 // process. Returns 0 otherwise. This is the ID that the browser process uses 138 // process. Returns 0 otherwise. This is the ID that the browser process uses
138 // to idetify the child process for the plugin. This isn't directly useful 139 // to idetify the child process for the plugin. This isn't directly useful
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 273
273 PP_Bool (*reserve_instance_id_)(PP_Module, PP_Instance); 274 PP_Bool (*reserve_instance_id_)(PP_Module, PP_Instance);
274 275
275 DISALLOW_COPY_AND_ASSIGN(PluginModule); 276 DISALLOW_COPY_AND_ASSIGN(PluginModule);
276 }; 277 };
277 278
278 } // namespace ppapi 279 } // namespace ppapi
279 } // namespace webkit 280 } // namespace webkit
280 281
281 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_MODULE_H_ 282 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_MODULE_H_
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/plugin_delegate.h ('k') | webkit/plugins/ppapi/plugin_module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698