| 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 // TODO(tomfinegan): Move decryptor methods to delegate class. | 254 // TODO(tomfinegan): Move decryptor methods to delegate class. |
| 255 void set_decrypt_client(media::DecryptorClient* client); | 255 void set_decrypt_client(media::DecryptorClient* client); |
| 256 bool GenerateKeyRequest(const std::string& key_system, | 256 bool GenerateKeyRequest(const std::string& key_system, |
| 257 const std::string& init_data); | 257 const std::string& init_data); |
| 258 bool AddKey(const std::string& session_id, | 258 bool AddKey(const std::string& session_id, |
| 259 const std::string& key, | 259 const std::string& key, |
| 260 const std::string& init_data); | 260 const std::string& init_data); |
| 261 bool CancelKeyRequest(const std::string& session_id); | 261 bool CancelKeyRequest(const std::string& session_id); |
| 262 bool Decrypt(const scoped_refptr<media::DecoderBuffer>& encrypted_buffer, | 262 bool Decrypt(const scoped_refptr<media::DecoderBuffer>& encrypted_buffer, |
| 263 const media::Decryptor::DecryptCB& decrypt_cb); | 263 const media::Decryptor::DecryptCB& decrypt_cb); |
| 264 // TODO(tomfinegan): Add callback args for ResetVideoDecoder() and |
| 265 // StopVideoDecoder() |
| 266 bool ResetVideoDecoder(); |
| 267 bool StopVideoDecoder(); |
| 264 // TODO(xhwang): Update this when we need to support decrypt and decode. | 268 // TODO(xhwang): Update this when we need to support decrypt and decode. |
| 265 bool DecryptAndDecodeFrame( | 269 bool DecryptAndDecodeFrame( |
| 266 const scoped_refptr<media::DecoderBuffer>& encrypted_frame, | 270 const scoped_refptr<media::DecoderBuffer>& encrypted_frame, |
| 267 const media::Decryptor::DecryptCB& decrypt_cb); | 271 const media::Decryptor::DecryptCB& decrypt_cb); |
| 268 | 272 |
| 269 // There are 2 implementations of the fullscreen interface | 273 // There are 2 implementations of the fullscreen interface |
| 270 // PPB_FlashFullscreen is used by Pepper Flash. | 274 // PPB_FlashFullscreen is used by Pepper Flash. |
| 271 // PPB_Fullscreen is intended for other applications including NaCl. | 275 // PPB_Fullscreen is intended for other applications including NaCl. |
| 272 // The two interface are mutually exclusive. | 276 // The two interface are mutually exclusive. |
| 273 | 277 |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 PP_Resource message, | 452 PP_Resource message, |
| 449 PP_Var default_url) OVERRIDE; | 453 PP_Var default_url) OVERRIDE; |
| 450 virtual void KeyError(PP_Instance instance, | 454 virtual void KeyError(PP_Instance instance, |
| 451 PP_Var key_system, | 455 PP_Var key_system, |
| 452 PP_Var session_id, | 456 PP_Var session_id, |
| 453 int32_t media_error, | 457 int32_t media_error, |
| 454 int32_t system_code) OVERRIDE; | 458 int32_t system_code) OVERRIDE; |
| 455 virtual void DeliverBlock(PP_Instance instance, | 459 virtual void DeliverBlock(PP_Instance instance, |
| 456 PP_Resource decrypted_block, | 460 PP_Resource decrypted_block, |
| 457 const PP_DecryptedBlockInfo* block_info) OVERRIDE; | 461 const PP_DecryptedBlockInfo* block_info) OVERRIDE; |
| 462 virtual void DecoderReset(PP_Instance instance, |
| 463 uint32_t request_id) OVERRIDE; |
| 464 virtual void DecoderStopped(PP_Instance instance, |
| 465 uint32_t request_id) OVERRIDE; |
| 458 virtual void DeliverFrame(PP_Instance instance, | 466 virtual void DeliverFrame(PP_Instance instance, |
| 459 PP_Resource decrypted_frame, | 467 PP_Resource decrypted_frame, |
| 460 const PP_DecryptedFrameInfo* frame_info) OVERRIDE; | 468 const PP_DecryptedFrameInfo* frame_info) OVERRIDE; |
| 461 virtual void DeliverSamples(PP_Instance instance, | 469 virtual void DeliverSamples(PP_Instance instance, |
| 462 PP_Resource decrypted_samples, | 470 PP_Resource decrypted_samples, |
| 463 const PP_DecryptedBlockInfo* block_info) OVERRIDE; | 471 const PP_DecryptedBlockInfo* block_info) OVERRIDE; |
| 464 | 472 |
| 465 // Reset this instance as proxied. Resets cached interfaces to point to the | 473 // Reset this instance as proxied. Resets cached interfaces to point to the |
| 466 // proxy and re-sends DidCreate, DidChangeView, and HandleDocumentLoad (if | 474 // proxy and re-sends DidCreate, DidChangeView, and HandleDocumentLoad (if |
| 467 // necessary). | 475 // necessary). |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 760 typedef std::map<uint32_t, media::Decryptor::DecryptCB> DecryptionCBMap; | 768 typedef std::map<uint32_t, media::Decryptor::DecryptCB> DecryptionCBMap; |
| 761 DecryptionCBMap pending_decryption_cbs_; | 769 DecryptionCBMap pending_decryption_cbs_; |
| 762 | 770 |
| 763 DISALLOW_COPY_AND_ASSIGN(PluginInstance); | 771 DISALLOW_COPY_AND_ASSIGN(PluginInstance); |
| 764 }; | 772 }; |
| 765 | 773 |
| 766 } // namespace ppapi | 774 } // namespace ppapi |
| 767 } // namespace webkit | 775 } // namespace webkit |
| 768 | 776 |
| 769 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ | 777 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ |
| OLD | NEW |