Chromium Code Reviews| 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 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 460 PP_Resource decrypted_frame, | 460 PP_Resource decrypted_frame, |
| 461 const PP_DecryptedBlockInfo* block_info) OVERRIDE; | 461 const PP_DecryptedBlockInfo* block_info) OVERRIDE; |
| 462 virtual void DeliverSamples(PP_Instance instance, | 462 virtual void DeliverSamples(PP_Instance instance, |
| 463 PP_Resource decrypted_samples, | 463 PP_Resource decrypted_samples, |
| 464 const PP_DecryptedBlockInfo* block_info) OVERRIDE; | 464 const PP_DecryptedBlockInfo* block_info) OVERRIDE; |
| 465 | 465 |
| 466 // Reset this instance as proxied. Resets cached interfaces to point to the | 466 // Reset this instance as proxied. Resets cached interfaces to point to the |
| 467 // proxy and re-sends DidCreate, DidChangeView, and HandleDocumentLoad (if | 467 // proxy and re-sends DidCreate, DidChangeView, and HandleDocumentLoad (if |
| 468 // necessary). | 468 // necessary). |
| 469 // This is for use with the NaCl proxy. | 469 // This is for use with the NaCl proxy. |
| 470 bool ResetAsProxied(); | 470 bool ResetAsProxied(scoped_refptr<PluginModule> module); |
| 471 | 471 |
| 472 private: | 472 private: |
| 473 // Implements PPB_Gamepad_API. This is just to avoid having an excessive | 473 // Implements PPB_Gamepad_API. This is just to avoid having an excessive |
| 474 // number of interfaces implemented by PluginInstance. | 474 // number of interfaces implemented by PluginInstance. |
| 475 class GamepadImpl : public ::ppapi::thunk::PPB_Gamepad_API { | 475 class GamepadImpl : public ::ppapi::thunk::PPB_Gamepad_API { |
| 476 public: | 476 public: |
| 477 explicit GamepadImpl(PluginDelegate* delegate); | 477 explicit GamepadImpl(PluginDelegate* delegate); |
| 478 virtual void Sample(PP_GamepadsSampleData* data) OVERRIDE; | 478 virtual void Sample(PP_GamepadsSampleData* data) OVERRIDE; |
| 479 private: | 479 private: |
| 480 PluginDelegate* delegate_; | 480 PluginDelegate* delegate_; |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 564 | 564 |
| 565 // Track, set and reset size attributes to control the size of the plugin | 565 // Track, set and reset size attributes to control the size of the plugin |
| 566 // in and out of fullscreen mode. | 566 // in and out of fullscreen mode. |
| 567 void KeepSizeAttributesBeforeFullscreen(); | 567 void KeepSizeAttributesBeforeFullscreen(); |
| 568 void SetSizeAttributesForFullscreen(); | 568 void SetSizeAttributesForFullscreen(); |
| 569 void ResetSizeAttributesAfterFullscreen(); | 569 void ResetSizeAttributesAfterFullscreen(); |
| 570 | 570 |
| 571 PluginDelegate* delegate_; | 571 PluginDelegate* delegate_; |
| 572 scoped_refptr<PluginModule> module_; | 572 scoped_refptr<PluginModule> module_; |
| 573 scoped_ptr< ::ppapi::PPP_Instance_Combined> instance_interface_; | 573 scoped_ptr< ::ppapi::PPP_Instance_Combined> instance_interface_; |
| 574 // If this is the NaCl plugin, store its instance interface so we can shut | 574 // If this is the NaCl plugin, we create a new module when we switch to the |
| 575 // it down properly when using the IPC-based PPAPI proxy. | 575 // IPC-based PPAPI proxy. Store the original module and instance interface |
| 576 // TODO(bbudge) Remove this when the proxy switch is complete. | 576 // so we can shut down properly. |
| 577 scoped_ptr< ::ppapi::PPP_Instance_Combined> nacl_plugin_instance_interface_; | 577 scoped_refptr<PluginModule> nacl_module_; |
| 578 scoped_ptr< ::ppapi::PPP_Instance_Combined> nacl_instance_interface_; | |
|
dmichael (off chromium)
2012/09/04 21:21:33
I feel like nacl_instance_interface_ is just as am
bbudge
2012/09/05 19:15:48
Done. How about original_module_ and original_inst
| |
| 578 | 579 |
| 579 PP_Instance pp_instance_; | 580 PP_Instance pp_instance_; |
| 580 | 581 |
| 581 // NULL until we have been initialized. | 582 // NULL until we have been initialized. |
| 582 WebKit::WebPluginContainer* container_; | 583 WebKit::WebPluginContainer* container_; |
| 583 | 584 |
| 584 // Plugin URL. | 585 // Plugin URL. |
| 585 GURL plugin_url_; | 586 GURL plugin_url_; |
| 586 | 587 |
| 587 // Indicates whether this is a full frame instance, which means it represents | 588 // Indicates whether this is a full frame instance, which means it represents |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 753 typedef std::map<uint32_t, media::Decryptor::DecryptCB> DecryptionCBMap; | 754 typedef std::map<uint32_t, media::Decryptor::DecryptCB> DecryptionCBMap; |
| 754 DecryptionCBMap pending_decryption_cbs_; | 755 DecryptionCBMap pending_decryption_cbs_; |
| 755 | 756 |
| 756 DISALLOW_COPY_AND_ASSIGN(PluginInstance); | 757 DISALLOW_COPY_AND_ASSIGN(PluginInstance); |
| 757 }; | 758 }; |
| 758 | 759 |
| 759 } // namespace ppapi | 760 } // namespace ppapi |
| 760 } // namespace webkit | 761 } // namespace webkit |
| 761 | 762 |
| 762 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ | 763 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ |
| OLD | NEW |