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 WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
6 #define WEBKIT_PLUGINS_PPAPI_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_old.h" | 10 #include "base/callback_old.h" |
11 #include "base/message_loop_proxy.h" | 11 #include "base/message_loop_proxy.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/platform_file.h" | 13 #include "base/platform_file.h" |
14 #include "base/shared_memory.h" | 14 #include "base/shared_memory.h" |
15 #include "base/sync_socket.h" | 15 #include "base/sync_socket.h" |
16 #include "base/time.h" | 16 #include "base/time.h" |
17 #include "googleurl/src/gurl.h" | 17 #include "googleurl/src/gurl.h" |
| 18 #include "media/video/capture/video_capture.h" |
18 #include "media/video/video_decode_accelerator.h" | 19 #include "media/video/video_decode_accelerator.h" |
19 #include "ppapi/c/dev/pp_video_dev.h" | 20 #include "ppapi/c/dev/pp_video_dev.h" |
20 #include "ppapi/c/pp_completion_callback.h" | 21 #include "ppapi/c/pp_completion_callback.h" |
21 #include "ppapi/c/pp_errors.h" | 22 #include "ppapi/c/pp_errors.h" |
22 #include "ppapi/c/pp_instance.h" | 23 #include "ppapi/c/pp_instance.h" |
23 #include "ppapi/c/pp_stdint.h" | 24 #include "ppapi/c/pp_stdint.h" |
24 #include "ui/gfx/size.h" | 25 #include "ui/gfx/size.h" |
25 #include "webkit/fileapi/file_system_types.h" | 26 #include "webkit/fileapi/file_system_types.h" |
26 #include "webkit/plugins/ppapi/dir_contents.h" | 27 #include "webkit/plugins/ppapi/dir_contents.h" |
27 | 28 |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 virtual ~PlatformAudio() {} | 213 virtual ~PlatformAudio() {} |
213 }; | 214 }; |
214 | 215 |
215 // Interface for PlatformVideoDecoder is directly inherited from general media | 216 // Interface for PlatformVideoDecoder is directly inherited from general media |
216 // VideoDecodeAccelerator interface. | 217 // VideoDecodeAccelerator interface. |
217 class PlatformVideoDecoder : public media::VideoDecodeAccelerator { | 218 class PlatformVideoDecoder : public media::VideoDecodeAccelerator { |
218 protected: | 219 protected: |
219 virtual ~PlatformVideoDecoder() {} | 220 virtual ~PlatformVideoDecoder() {} |
220 }; | 221 }; |
221 | 222 |
| 223 class PlatformVideoCapture : public media::VideoCapture { |
| 224 public: |
| 225 virtual ~PlatformVideoCapture() {} |
| 226 }; |
| 227 |
222 // Provides access to the ppapi broker. | 228 // Provides access to the ppapi broker. |
223 class PpapiBroker { | 229 class PpapiBroker { |
224 public: | 230 public: |
225 virtual void Connect(webkit::ppapi::PPB_Broker_Impl* client) = 0; | 231 virtual void Connect(webkit::ppapi::PPB_Broker_Impl* client) = 0; |
226 | 232 |
227 // Decrements the references to the broker. | 233 // Decrements the references to the broker. |
228 // When there are no more references, this renderer's dispatcher is | 234 // When there are no more references, this renderer's dispatcher is |
229 // destroyed, allowing the broker to shutdown if appropriate. | 235 // destroyed, allowing the broker to shutdown if appropriate. |
230 // Callers should not reference this object after calling Disconnect. | 236 // Callers should not reference this object after calling Disconnect. |
231 virtual void Disconnect(webkit::ppapi::PPB_Broker_Impl* client) = 0; | 237 virtual void Disconnect(webkit::ppapi::PPB_Broker_Impl* client) = 0; |
(...skipping 22 matching lines...) Expand all Loading... |
254 // sad plugin screen with. Returns NULL on failure. | 260 // sad plugin screen with. Returns NULL on failure. |
255 virtual SkBitmap* GetSadPluginBitmap() = 0; | 261 virtual SkBitmap* GetSadPluginBitmap() = 0; |
256 | 262 |
257 // The caller will own the pointer returned from this. | 263 // The caller will own the pointer returned from this. |
258 virtual PlatformImage2D* CreateImage2D(int width, int height) = 0; | 264 virtual PlatformImage2D* CreateImage2D(int width, int height) = 0; |
259 | 265 |
260 // The caller will own the pointer returned from this. | 266 // The caller will own the pointer returned from this. |
261 virtual PlatformContext3D* CreateContext3D() = 0; | 267 virtual PlatformContext3D* CreateContext3D() = 0; |
262 | 268 |
263 // The caller will own the pointer returned from this. | 269 // The caller will own the pointer returned from this. |
| 270 virtual PlatformVideoCapture* CreateVideoCapture( |
| 271 media::VideoCapture::EventHandler* handler) = 0; |
| 272 |
| 273 // The caller will own the pointer returned from this. |
264 virtual PlatformVideoDecoder* CreateVideoDecoder( | 274 virtual PlatformVideoDecoder* CreateVideoDecoder( |
265 media::VideoDecodeAccelerator::Client* client, | 275 media::VideoDecodeAccelerator::Client* client, |
266 int32 command_buffer_route_id) = 0; | 276 int32 command_buffer_route_id) = 0; |
267 | 277 |
268 // The caller is responsible for calling Shutdown() on the returned pointer | 278 // The caller is responsible for calling Shutdown() on the returned pointer |
269 // to clean up the corresponding resources allocated during this call. | 279 // to clean up the corresponding resources allocated during this call. |
270 virtual PlatformAudio* CreateAudio(uint32_t sample_rate, | 280 virtual PlatformAudio* CreateAudio(uint32_t sample_rate, |
271 uint32_t sample_count, | 281 uint32_t sample_count, |
272 PlatformAudio::Client* client) = 0; | 282 PlatformAudio::Client* client) = 0; |
273 | 283 |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 virtual base::SharedMemory* CreateAnonymousSharedMemory(uint32_t size) = 0; | 422 virtual base::SharedMemory* CreateAnonymousSharedMemory(uint32_t size) = 0; |
413 | 423 |
414 // Returns the current preferences. | 424 // Returns the current preferences. |
415 virtual ::ppapi::Preferences GetPreferences() = 0; | 425 virtual ::ppapi::Preferences GetPreferences() = 0; |
416 }; | 426 }; |
417 | 427 |
418 } // namespace ppapi | 428 } // namespace ppapi |
419 } // namespace webkit | 429 } // namespace webkit |
420 | 430 |
421 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 431 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
OLD | NEW |