OLD | NEW |
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_PPAPI_PLUGIN_INSTANCE_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ |
6 #define WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 bool AddKey(const std::string& session_id, | 260 bool AddKey(const std::string& session_id, |
261 const std::string& key, | 261 const std::string& key, |
262 const std::string& init_data); | 262 const std::string& init_data); |
263 bool CancelKeyRequest(const std::string& session_id); | 263 bool CancelKeyRequest(const std::string& session_id); |
264 bool Decrypt(const scoped_refptr<media::DecoderBuffer>& encrypted_buffer, | 264 bool Decrypt(const scoped_refptr<media::DecoderBuffer>& encrypted_buffer, |
265 const media::Decryptor::DecryptCB& decrypt_cb); | 265 const media::Decryptor::DecryptCB& decrypt_cb); |
266 // TODO(xhwang): Change DecryptCB to a DecoderInitCB. | 266 // TODO(xhwang): Change DecryptCB to a DecoderInitCB. |
267 bool InitializeVideoDecoder( | 267 bool InitializeVideoDecoder( |
268 const media::VideoDecoderConfig& decoder_config, | 268 const media::VideoDecoderConfig& decoder_config, |
269 const media::Decryptor::DecryptCB& decrypt_cb); | 269 const media::Decryptor::DecryptCB& decrypt_cb); |
| 270 // TODO(tomfinegan): Add callback args for DeinitializeDecoder() and |
| 271 // ResetDecoder() |
| 272 bool DeinitializeDecoder(); |
| 273 bool ResetDecoder(); |
270 // TODO(xhwang): Update this when we need to support decrypt and decode. | 274 // TODO(xhwang): Update this when we need to support decrypt and decode. |
271 // Note: This method can be used with an unencrypted frame. | 275 // Note: This method can be used with an unencrypted frame. |
272 bool DecryptAndDecodeFrame( | 276 bool DecryptAndDecodeFrame( |
273 const scoped_refptr<media::DecoderBuffer>& encrypted_frame, | 277 const scoped_refptr<media::DecoderBuffer>& encrypted_frame, |
274 const media::Decryptor::DecryptCB& decrypt_cb); | 278 const media::Decryptor::DecryptCB& decrypt_cb); |
275 | 279 |
276 // There are 2 implementations of the fullscreen interface | 280 // There are 2 implementations of the fullscreen interface |
277 // PPB_FlashFullscreen is used by Pepper Flash. | 281 // PPB_FlashFullscreen is used by Pepper Flash. |
278 // PPB_Fullscreen is intended for other applications including NaCl. | 282 // PPB_Fullscreen is intended for other applications including NaCl. |
279 // The two interface are mutually exclusive. | 283 // The two interface are mutually exclusive. |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 PP_URLComponents_Dev* components) OVERRIDE; | 440 PP_URLComponents_Dev* components) OVERRIDE; |
437 virtual PP_Bool DocumentCanRequest(PP_Instance instance, PP_Var url) OVERRIDE; | 441 virtual PP_Bool DocumentCanRequest(PP_Instance instance, PP_Var url) OVERRIDE; |
438 virtual PP_Bool DocumentCanAccessDocument(PP_Instance instance, | 442 virtual PP_Bool DocumentCanAccessDocument(PP_Instance instance, |
439 PP_Instance target) OVERRIDE; | 443 PP_Instance target) OVERRIDE; |
440 virtual PP_Var GetDocumentURL(PP_Instance instance, | 444 virtual PP_Var GetDocumentURL(PP_Instance instance, |
441 PP_URLComponents_Dev* components) OVERRIDE; | 445 PP_URLComponents_Dev* components) OVERRIDE; |
442 virtual PP_Var GetPluginInstanceURL( | 446 virtual PP_Var GetPluginInstanceURL( |
443 PP_Instance instance, | 447 PP_Instance instance, |
444 PP_URLComponents_Dev* components) OVERRIDE; | 448 PP_URLComponents_Dev* components) OVERRIDE; |
445 | 449 |
| 450 // PPB_ContentDecryptor_Private |
| 451 // TODO(tomfinegan): Move the PPB_ContentDecryptor_Private methods to a |
| 452 // delegate class. |
446 virtual void NeedKey(PP_Instance instance, | 453 virtual void NeedKey(PP_Instance instance, |
447 PP_Var key_system, | 454 PP_Var key_system, |
448 PP_Var session_id, | 455 PP_Var session_id, |
449 PP_Var init_data) OVERRIDE; | 456 PP_Var init_data) OVERRIDE; |
450 virtual void KeyAdded(PP_Instance instance, | 457 virtual void KeyAdded(PP_Instance instance, |
451 PP_Var key_system, | 458 PP_Var key_system, |
452 PP_Var session_id) OVERRIDE; | 459 PP_Var session_id) OVERRIDE; |
453 virtual void KeyMessage(PP_Instance instance, | 460 virtual void KeyMessage(PP_Instance instance, |
454 PP_Var key_system, | 461 PP_Var key_system, |
455 PP_Var session_id, | 462 PP_Var session_id, |
456 PP_Resource message, | 463 PP_Resource message, |
457 PP_Var default_url) OVERRIDE; | 464 PP_Var default_url) OVERRIDE; |
458 virtual void KeyError(PP_Instance instance, | 465 virtual void KeyError(PP_Instance instance, |
459 PP_Var key_system, | 466 PP_Var key_system, |
460 PP_Var session_id, | 467 PP_Var session_id, |
461 int32_t media_error, | 468 int32_t media_error, |
462 int32_t system_code) OVERRIDE; | 469 int32_t system_code) OVERRIDE; |
463 virtual void DeliverBlock(PP_Instance instance, | 470 virtual void DeliverBlock(PP_Instance instance, |
464 PP_Resource decrypted_block, | 471 PP_Resource decrypted_block, |
465 const PP_DecryptedBlockInfo* block_info) OVERRIDE; | 472 const PP_DecryptedBlockInfo* block_info) OVERRIDE; |
466 virtual void DecoderInitialized(PP_Instance instance, | 473 virtual void DecoderInitialized(PP_Instance instance, |
467 PP_Bool success, | 474 PP_Bool success, |
468 uint32_t request_id) OVERRIDE; | 475 uint32_t request_id) OVERRIDE; |
| 476 virtual void DecoderDeinitializeDone(PP_Instance instance, |
| 477 PP_DecryptorStreamType decoder_type, |
| 478 uint32_t request_id) OVERRIDE; |
| 479 virtual void DecoderResetDone(PP_Instance instance, |
| 480 PP_DecryptorStreamType decoder_type, |
| 481 uint32_t request_id) OVERRIDE; |
469 virtual void DeliverFrame(PP_Instance instance, | 482 virtual void DeliverFrame(PP_Instance instance, |
470 PP_Resource decrypted_frame, | 483 PP_Resource decrypted_frame, |
471 const PP_DecryptedFrameInfo* frame_info) OVERRIDE; | 484 const PP_DecryptedFrameInfo* frame_info) OVERRIDE; |
472 virtual void DeliverSamples(PP_Instance instance, | 485 virtual void DeliverSamples(PP_Instance instance, |
473 PP_Resource decrypted_samples, | 486 PP_Resource decrypted_samples, |
474 const PP_DecryptedBlockInfo* block_info) OVERRIDE; | 487 const PP_DecryptedBlockInfo* block_info) OVERRIDE; |
475 | 488 |
476 // Reset this instance as proxied. Resets cached interfaces to point to the | 489 // Reset this instance as proxied. Resets cached interfaces to point to the |
477 // proxy and re-sends DidCreate, DidChangeView, and HandleDocumentLoad (if | 490 // proxy and re-sends DidCreate, DidChangeView, and HandleDocumentLoad (if |
478 // necessary). | 491 // necessary). |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 typedef std::map<uint32_t, media::Decryptor::DecryptCB> DecryptionCBMap; | 784 typedef std::map<uint32_t, media::Decryptor::DecryptCB> DecryptionCBMap; |
772 DecryptionCBMap pending_decryption_cbs_; | 785 DecryptionCBMap pending_decryption_cbs_; |
773 | 786 |
774 DISALLOW_COPY_AND_ASSIGN(PluginInstance); | 787 DISALLOW_COPY_AND_ASSIGN(PluginInstance); |
775 }; | 788 }; |
776 | 789 |
777 } // namespace ppapi | 790 } // namespace ppapi |
778 } // namespace webkit | 791 } // namespace webkit |
779 | 792 |
780 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ | 793 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ |
OLD | NEW |