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

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

Issue 5828003: Move the Pepper implementation from webkit/glue/plugins/pepper_* to... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years 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/npapi_glue.cc ('k') | webkit/plugins/ppapi/plugin_instance.h » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_GLUE_PLUGINS_PEPPER_PLUGIN_DELEGATE_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_
6 #define WEBKIT_GLUE_PLUGINS_PEPPER_PLUGIN_DELEGATE_H_ 6 #define WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/platform_file.h" 11 #include "base/platform_file.h"
12 #include "base/ref_counted.h" 12 #include "base/ref_counted.h"
13 #include "base/shared_memory.h" 13 #include "base/shared_memory.h"
14 #include "base/sync_socket.h" 14 #include "base/sync_socket.h"
15 #include "gfx/size.h" 15 #include "gfx/size.h"
16 #include "googleurl/src/gurl.h" 16 #include "googleurl/src/gurl.h"
17 #include "ppapi/c/pp_completion_callback.h" 17 #include "ppapi/c/pp_completion_callback.h"
18 #include "ppapi/c/pp_errors.h" 18 #include "ppapi/c/pp_errors.h"
19 #include "ppapi/c/pp_instance.h" 19 #include "ppapi/c/pp_instance.h"
20 #include "ppapi/c/pp_stdint.h" 20 #include "ppapi/c/pp_stdint.h"
21 #include "webkit/fileapi/file_system_types.h" 21 #include "webkit/fileapi/file_system_types.h"
22 #include "webkit/glue/plugins/pepper_dir_contents.h" 22 #include "webkit/plugins/ppapi/dir_contents.h"
23 23
24 class AudioMessageFilter; 24 class AudioMessageFilter;
25 class GURL; 25 class GURL;
26 26
27 namespace base { 27 namespace base {
28 class MessageLoopProxy; 28 class MessageLoopProxy;
29 class Time; 29 class Time;
30 } 30 }
31 31
32 namespace fileapi { 32 namespace fileapi {
(...skipping 18 matching lines...) Expand all
51 class WebFileChooserCompletion; 51 class WebFileChooserCompletion;
52 struct WebFileChooserParams; 52 struct WebFileChooserParams;
53 } 53 }
54 54
55 struct PP_VideoCompressedDataBuffer_Dev; 55 struct PP_VideoCompressedDataBuffer_Dev;
56 struct PP_VideoDecoderConfig_Dev; 56 struct PP_VideoDecoderConfig_Dev;
57 struct PP_VideoUncompressedDataBuffer_Dev; 57 struct PP_VideoUncompressedDataBuffer_Dev;
58 58
59 class TransportDIB; 59 class TransportDIB;
60 60
61 namespace pepper { 61 namespace webkit {
62 namespace ppapi {
62 63
63 class FileIO; 64 class FileIO;
64 class PluginInstance; 65 class PluginInstance;
65 class FullscreenContainer; 66 class FullscreenContainer;
66 67
67 // Virtual interface that the browser implements to implement features for 68 // Virtual interface that the browser implements to implement features for
68 // Pepper plugins. 69 // PPAPI plugins.
69 class PluginDelegate { 70 class PluginDelegate {
70 public: 71 public:
71 // This class is implemented by the PluginDelegate implementation and is 72 // This class is implemented by the PluginDelegate implementation and is
72 // designed to manage the lifetime and communicatin with the proxy's 73 // designed to manage the lifetime and communicatin with the proxy's
73 // HostDispatcher for out-of-process pepper plugins. 74 // HostDispatcher for out-of-process PPAPI plugins.
74 // 75 //
75 // The point of this is to avoid having a relationship from the pepper plugin 76 // The point of this is to avoid having a relationship from the PPAPI plugin
76 // implementation to the ppapi proxy code. Otherwise, things like the IPC 77 // implementation to the ppapi proxy code. Otherwise, things like the IPC
77 // system will be dependencies of the webkit directory, which we don't want. 78 // system will be dependencies of the webkit directory, which we don't want.
78 // 79 //
79 // The PluginModule will scope the lifetime of this object to its own 80 // The PluginModule will scope the lifetime of this object to its own
80 // lifetime, so the implementation can use this to manage the HostDispatcher 81 // lifetime, so the implementation can use this to manage the HostDispatcher
81 // lifetime without introducing the dependency. 82 // lifetime without introducing the dependency.
82 class OutOfProcessProxy { 83 class OutOfProcessProxy {
83 public: 84 public:
84 virtual ~OutOfProcessProxy() {} 85 virtual ~OutOfProcessProxy() {}
85 86
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 virtual ~PlatformVideoDecoder() {} 182 virtual ~PlatformVideoDecoder() {}
182 183
183 // Returns false on failure. 184 // Returns false on failure.
184 virtual bool Decode(PP_VideoCompressedDataBuffer_Dev& input_buffer) = 0; 185 virtual bool Decode(PP_VideoCompressedDataBuffer_Dev& input_buffer) = 0;
185 virtual int32_t Flush(PP_CompletionCallback& callback) = 0; 186 virtual int32_t Flush(PP_CompletionCallback& callback) = 0;
186 virtual bool ReturnUncompressedDataBuffer( 187 virtual bool ReturnUncompressedDataBuffer(
187 PP_VideoUncompressedDataBuffer_Dev& buffer) = 0; 188 PP_VideoUncompressedDataBuffer_Dev& buffer) = 0;
188 }; 189 };
189 190
190 // Indicates that the given instance has been created. 191 // Indicates that the given instance has been created.
191 virtual void InstanceCreated(pepper::PluginInstance* instance) = 0; 192 virtual void InstanceCreated(PluginInstance* instance) = 0;
192 193
193 // Indicates that the given instance is being destroyed. This is called from 194 // Indicates that the given instance is being destroyed. This is called from
194 // the destructor, so it's important that the instance is not dereferenced 195 // the destructor, so it's important that the instance is not dereferenced
195 // from this call. 196 // from this call.
196 virtual void InstanceDeleted(pepper::PluginInstance* instance) = 0; 197 virtual void InstanceDeleted(PluginInstance* instance) = 0;
197 198
198 // The caller will own the pointer returned from this. 199 // The caller will own the pointer returned from this.
199 virtual PlatformImage2D* CreateImage2D(int width, int height) = 0; 200 virtual PlatformImage2D* CreateImage2D(int width, int height) = 0;
200 201
201 // The caller will own the pointer returned from this. 202 // The caller will own the pointer returned from this.
202 virtual PlatformContext3D* CreateContext3D() = 0; 203 virtual PlatformContext3D* CreateContext3D() = 0;
203 204
204 // The caller will own the pointer returned from this. 205 // The caller will own the pointer returned from this.
205 virtual PlatformVideoDecoder* CreateVideoDecoder( 206 virtual PlatformVideoDecoder* CreateVideoDecoder(
206 const PP_VideoDecoderConfig_Dev& decoder_config) = 0; 207 const PP_VideoDecoderConfig_Dev& decoder_config) = 0;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 virtual base::PlatformFileError CreateModuleLocalDir( 270 virtual base::PlatformFileError CreateModuleLocalDir(
270 const std::string& module_name, 271 const std::string& module_name,
271 const FilePath& path) = 0; 272 const FilePath& path) = 0;
272 virtual base::PlatformFileError QueryModuleLocalFile( 273 virtual base::PlatformFileError QueryModuleLocalFile(
273 const std::string& module_name, 274 const std::string& module_name,
274 const FilePath& path, 275 const FilePath& path,
275 base::PlatformFileInfo* info) = 0; 276 base::PlatformFileInfo* info) = 0;
276 virtual base::PlatformFileError GetModuleLocalDirContents( 277 virtual base::PlatformFileError GetModuleLocalDirContents(
277 const std::string& module_name, 278 const std::string& module_name,
278 const FilePath& path, 279 const FilePath& path,
279 PepperDirContents* contents) = 0; 280 DirContents* contents) = 0;
280 281
281 // Returns a MessageLoopProxy instance associated with the message loop 282 // Returns a MessageLoopProxy instance associated with the message loop
282 // of the file thread in this renderer. 283 // of the file thread in this renderer.
283 virtual scoped_refptr<base::MessageLoopProxy> 284 virtual scoped_refptr<base::MessageLoopProxy>
284 GetFileThreadMessageLoopProxy() = 0; 285 GetFileThreadMessageLoopProxy() = 0;
285 286
286 // Create a fullscreen container for a plugin instance. This effectively 287 // Create a fullscreen container for a plugin instance. This effectively
287 // switches the plugin to fullscreen. 288 // switches the plugin to fullscreen.
288 virtual FullscreenContainer* CreateFullscreenContainer( 289 virtual FullscreenContainer* CreateFullscreenContainer(
289 PluginInstance* instance) = 0; 290 PluginInstance* instance) = 0;
(...skipping 10 matching lines...) Expand all
300 virtual std::string ResolveProxy(const GURL& url) = 0; 301 virtual std::string ResolveProxy(const GURL& url) = 0;
301 302
302 // Tell the browser when resource loading starts/ends. 303 // Tell the browser when resource loading starts/ends.
303 virtual void DidStartLoading() = 0; 304 virtual void DidStartLoading() = 0;
304 virtual void DidStopLoading() = 0; 305 virtual void DidStopLoading() = 0;
305 306
306 // Sets restrictions on how the content can be used (i.e. no print/copy). 307 // Sets restrictions on how the content can be used (i.e. no print/copy).
307 virtual void SetContentRestriction(int restrictions) = 0; 308 virtual void SetContentRestriction(int restrictions) = 0;
308 }; 309 };
309 310
310 } // namespace pepper 311 } // namespace ppapi
312 } // namespace webkit
311 313
312 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_PLUGIN_DELEGATE_H_ 314 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/npapi_glue.cc ('k') | webkit/plugins/ppapi/plugin_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698