| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 class WebMouseEvent; | 68 class WebMouseEvent; |
| 69 class WebPluginContainer; | 69 class WebPluginContainer; |
| 70 struct WebCompositionUnderline; | 70 struct WebCompositionUnderline; |
| 71 struct WebCursorInfo; | 71 struct WebCursorInfo; |
| 72 struct WebPrintParams; | 72 struct WebPrintParams; |
| 73 } | 73 } |
| 74 | 74 |
| 75 namespace media { | 75 namespace media { |
| 76 class DecoderBuffer; | 76 class DecoderBuffer; |
| 77 class DecryptorClient; | 77 class DecryptorClient; |
| 78 class VideoDecoderConfig; |
| 78 } | 79 } |
| 79 | 80 |
| 80 namespace ppapi { | 81 namespace ppapi { |
| 81 struct InputEventData; | 82 struct InputEventData; |
| 82 struct PPP_Instance_Combined; | 83 struct PPP_Instance_Combined; |
| 83 class Resource; | 84 class Resource; |
| 84 struct URLRequestInfoData; | 85 struct URLRequestInfoData; |
| 85 } | 86 } |
| 86 | 87 |
| 87 namespace ui { | 88 namespace ui { |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 // TODO(tomfinegan): Move decryptor methods to delegate class. | 256 // TODO(tomfinegan): Move decryptor methods to delegate class. |
| 256 void set_decrypt_client(media::DecryptorClient* client); | 257 void set_decrypt_client(media::DecryptorClient* client); |
| 257 bool GenerateKeyRequest(const std::string& key_system, | 258 bool GenerateKeyRequest(const std::string& key_system, |
| 258 const std::string& init_data); | 259 const std::string& init_data); |
| 259 bool AddKey(const std::string& session_id, | 260 bool AddKey(const std::string& session_id, |
| 260 const std::string& key, | 261 const std::string& key, |
| 261 const std::string& init_data); | 262 const std::string& init_data); |
| 262 bool CancelKeyRequest(const std::string& session_id); | 263 bool CancelKeyRequest(const std::string& session_id); |
| 263 bool Decrypt(const scoped_refptr<media::DecoderBuffer>& encrypted_buffer, | 264 bool Decrypt(const scoped_refptr<media::DecoderBuffer>& encrypted_buffer, |
| 264 const media::Decryptor::DecryptCB& decrypt_cb); | 265 const media::Decryptor::DecryptCB& decrypt_cb); |
| 266 // TODO(xhwang): Change DecryptCB to a DecoderInitCB. |
| 267 bool InitializeVideoDecoder( |
| 268 const media::VideoDecoderConfig& decoder_config, |
| 269 const media::Decryptor::DecryptCB& decrypt_cb); |
| 265 // TODO(xhwang): Update this when we need to support decrypt and decode. | 270 // TODO(xhwang): Update this when we need to support decrypt and decode. |
| 271 // Note: This method can be used with an unencrypted frame. |
| 266 bool DecryptAndDecodeFrame( | 272 bool DecryptAndDecodeFrame( |
| 267 const scoped_refptr<media::DecoderBuffer>& encrypted_frame, | 273 const scoped_refptr<media::DecoderBuffer>& encrypted_frame, |
| 268 const media::Decryptor::DecryptCB& decrypt_cb); | 274 const media::Decryptor::DecryptCB& decrypt_cb); |
| 269 | 275 |
| 270 // There are 2 implementations of the fullscreen interface | 276 // There are 2 implementations of the fullscreen interface |
| 271 // PPB_FlashFullscreen is used by Pepper Flash. | 277 // PPB_FlashFullscreen is used by Pepper Flash. |
| 272 // PPB_Fullscreen is intended for other applications including NaCl. | 278 // PPB_Fullscreen is intended for other applications including NaCl. |
| 273 // The two interface are mutually exclusive. | 279 // The two interface are mutually exclusive. |
| 274 | 280 |
| 275 // Implementation of PPB_FlashFullscreen. | 281 // Implementation of PPB_FlashFullscreen. |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 PP_URLComponents_Dev* components) OVERRIDE; | 436 PP_URLComponents_Dev* components) OVERRIDE; |
| 431 virtual PP_Bool DocumentCanRequest(PP_Instance instance, PP_Var url) OVERRIDE; | 437 virtual PP_Bool DocumentCanRequest(PP_Instance instance, PP_Var url) OVERRIDE; |
| 432 virtual PP_Bool DocumentCanAccessDocument(PP_Instance instance, | 438 virtual PP_Bool DocumentCanAccessDocument(PP_Instance instance, |
| 433 PP_Instance target) OVERRIDE; | 439 PP_Instance target) OVERRIDE; |
| 434 virtual PP_Var GetDocumentURL(PP_Instance instance, | 440 virtual PP_Var GetDocumentURL(PP_Instance instance, |
| 435 PP_URLComponents_Dev* components) OVERRIDE; | 441 PP_URLComponents_Dev* components) OVERRIDE; |
| 436 virtual PP_Var GetPluginInstanceURL( | 442 virtual PP_Var GetPluginInstanceURL( |
| 437 PP_Instance instance, | 443 PP_Instance instance, |
| 438 PP_URLComponents_Dev* components) OVERRIDE; | 444 PP_URLComponents_Dev* components) OVERRIDE; |
| 439 | 445 |
| 440 // TODO(tomfinegan): Move the next 7 methods to a delegate class. | |
| 441 virtual void NeedKey(PP_Instance instance, | 446 virtual void NeedKey(PP_Instance instance, |
| 442 PP_Var key_system, | 447 PP_Var key_system, |
| 443 PP_Var session_id, | 448 PP_Var session_id, |
| 444 PP_Var init_data) OVERRIDE; | 449 PP_Var init_data) OVERRIDE; |
| 445 virtual void KeyAdded(PP_Instance instance, | 450 virtual void KeyAdded(PP_Instance instance, |
| 446 PP_Var key_system, | 451 PP_Var key_system, |
| 447 PP_Var session_id) OVERRIDE; | 452 PP_Var session_id) OVERRIDE; |
| 448 virtual void KeyMessage(PP_Instance instance, | 453 virtual void KeyMessage(PP_Instance instance, |
| 449 PP_Var key_system, | 454 PP_Var key_system, |
| 450 PP_Var session_id, | 455 PP_Var session_id, |
| 451 PP_Resource message, | 456 PP_Resource message, |
| 452 PP_Var default_url) OVERRIDE; | 457 PP_Var default_url) OVERRIDE; |
| 453 virtual void KeyError(PP_Instance instance, | 458 virtual void KeyError(PP_Instance instance, |
| 454 PP_Var key_system, | 459 PP_Var key_system, |
| 455 PP_Var session_id, | 460 PP_Var session_id, |
| 456 int32_t media_error, | 461 int32_t media_error, |
| 457 int32_t system_code) OVERRIDE; | 462 int32_t system_code) OVERRIDE; |
| 458 virtual void DeliverBlock(PP_Instance instance, | 463 virtual void DeliverBlock(PP_Instance instance, |
| 459 PP_Resource decrypted_block, | 464 PP_Resource decrypted_block, |
| 460 const PP_DecryptedBlockInfo* block_info) OVERRIDE; | 465 const PP_DecryptedBlockInfo* block_info) OVERRIDE; |
| 466 virtual void DecoderInitialized(PP_Instance instance, |
| 467 PP_Bool success, |
| 468 uint32_t request_id) OVERRIDE; |
| 461 virtual void DeliverFrame(PP_Instance instance, | 469 virtual void DeliverFrame(PP_Instance instance, |
| 462 PP_Resource decrypted_frame, | 470 PP_Resource decrypted_frame, |
| 463 const PP_DecryptedFrameInfo* frame_info) OVERRIDE; | 471 const PP_DecryptedFrameInfo* frame_info) OVERRIDE; |
| 464 virtual void DeliverSamples(PP_Instance instance, | 472 virtual void DeliverSamples(PP_Instance instance, |
| 465 PP_Resource decrypted_samples, | 473 PP_Resource decrypted_samples, |
| 466 const PP_DecryptedBlockInfo* block_info) OVERRIDE; | 474 const PP_DecryptedBlockInfo* block_info) OVERRIDE; |
| 467 | 475 |
| 468 // Reset this instance as proxied. Resets cached interfaces to point to the | 476 // Reset this instance as proxied. Resets cached interfaces to point to the |
| 469 // proxy and re-sends DidCreate, DidChangeView, and HandleDocumentLoad (if | 477 // proxy and re-sends DidCreate, DidChangeView, and HandleDocumentLoad (if |
| 470 // necessary). | 478 // necessary). |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 typedef std::map<uint32_t, media::Decryptor::DecryptCB> DecryptionCBMap; | 771 typedef std::map<uint32_t, media::Decryptor::DecryptCB> DecryptionCBMap; |
| 764 DecryptionCBMap pending_decryption_cbs_; | 772 DecryptionCBMap pending_decryption_cbs_; |
| 765 | 773 |
| 766 DISALLOW_COPY_AND_ASSIGN(PluginInstance); | 774 DISALLOW_COPY_AND_ASSIGN(PluginInstance); |
| 767 }; | 775 }; |
| 768 | 776 |
| 769 } // namespace ppapi | 777 } // namespace ppapi |
| 770 } // namespace webkit | 778 } // namespace webkit |
| 771 | 779 |
| 772 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ | 780 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ |
| OLD | NEW |