Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: webkit/plugins/ppapi/ppapi_plugin_instance.h

Issue 10912060: Allow the NaCl IPC proxy to support multiple instances. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/plugins/ppapi/plugin_module.cc ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 PP_Resource decrypted_frame, 461 PP_Resource decrypted_frame,
462 const PP_DecryptedBlockInfo* block_info) OVERRIDE; 462 const PP_DecryptedBlockInfo* block_info) OVERRIDE;
463 virtual void DeliverSamples(PP_Instance instance, 463 virtual void DeliverSamples(PP_Instance instance,
464 PP_Resource decrypted_samples, 464 PP_Resource decrypted_samples,
465 const PP_DecryptedBlockInfo* block_info) OVERRIDE; 465 const PP_DecryptedBlockInfo* block_info) OVERRIDE;
466 466
467 // Reset this instance as proxied. Resets cached interfaces to point to the 467 // Reset this instance as proxied. Resets cached interfaces to point to the
468 // proxy and re-sends DidCreate, DidChangeView, and HandleDocumentLoad (if 468 // proxy and re-sends DidCreate, DidChangeView, and HandleDocumentLoad (if
469 // necessary). 469 // necessary).
470 // This is for use with the NaCl proxy. 470 // This is for use with the NaCl proxy.
471 bool ResetAsProxied(); 471 bool ResetAsProxied(scoped_refptr<PluginModule> module);
472 472
473 private: 473 private:
474 // Implements PPB_Gamepad_API. This is just to avoid having an excessive 474 // Implements PPB_Gamepad_API. This is just to avoid having an excessive
475 // number of interfaces implemented by PluginInstance. 475 // number of interfaces implemented by PluginInstance.
476 class GamepadImpl : public ::ppapi::thunk::PPB_Gamepad_API { 476 class GamepadImpl : public ::ppapi::thunk::PPB_Gamepad_API {
477 public: 477 public:
478 explicit GamepadImpl(PluginDelegate* delegate); 478 explicit GamepadImpl(PluginDelegate* delegate);
479 virtual void Sample(PP_GamepadsSampleData* data) OVERRIDE; 479 virtual void Sample(PP_GamepadsSampleData* data) OVERRIDE;
480 private: 480 private:
481 PluginDelegate* delegate_; 481 PluginDelegate* delegate_;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 565
566 // Track, set and reset size attributes to control the size of the plugin 566 // Track, set and reset size attributes to control the size of the plugin
567 // in and out of fullscreen mode. 567 // in and out of fullscreen mode.
568 void KeepSizeAttributesBeforeFullscreen(); 568 void KeepSizeAttributesBeforeFullscreen();
569 void SetSizeAttributesForFullscreen(); 569 void SetSizeAttributesForFullscreen();
570 void ResetSizeAttributesAfterFullscreen(); 570 void ResetSizeAttributesAfterFullscreen();
571 571
572 PluginDelegate* delegate_; 572 PluginDelegate* delegate_;
573 scoped_refptr<PluginModule> module_; 573 scoped_refptr<PluginModule> module_;
574 scoped_ptr< ::ppapi::PPP_Instance_Combined> instance_interface_; 574 scoped_ptr< ::ppapi::PPP_Instance_Combined> instance_interface_;
575 // If this is the NaCl plugin, store its instance interface so we can shut 575 // If this is the NaCl plugin, we create a new module when we switch to the
576 // it down properly when using the IPC-based PPAPI proxy. 576 // IPC-based PPAPI proxy. Store the original module and instance interface
577 // TODO(bbudge) Remove this when the proxy switch is complete. 577 // so we can shut down properly.
578 scoped_ptr< ::ppapi::PPP_Instance_Combined> nacl_plugin_instance_interface_; 578 scoped_refptr<PluginModule> original_module_;
579 scoped_ptr< ::ppapi::PPP_Instance_Combined> original_instance_interface_;
579 580
580 PP_Instance pp_instance_; 581 PP_Instance pp_instance_;
581 582
582 // NULL until we have been initialized. 583 // NULL until we have been initialized.
583 WebKit::WebPluginContainer* container_; 584 WebKit::WebPluginContainer* container_;
584 585
585 // Plugin URL. 586 // Plugin URL.
586 GURL plugin_url_; 587 GURL plugin_url_;
587 588
588 // Indicates whether this is a full frame instance, which means it represents 589 // Indicates whether this is a full frame instance, which means it represents
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 typedef std::map<uint32_t, media::Decryptor::DecryptCB> DecryptionCBMap; 755 typedef std::map<uint32_t, media::Decryptor::DecryptCB> DecryptionCBMap;
755 DecryptionCBMap pending_decryption_cbs_; 756 DecryptionCBMap pending_decryption_cbs_;
756 757
757 DISALLOW_COPY_AND_ASSIGN(PluginInstance); 758 DISALLOW_COPY_AND_ASSIGN(PluginInstance);
758 }; 759 };
759 760
760 } // namespace ppapi 761 } // namespace ppapi
761 } // namespace webkit 762 } // namespace webkit
762 763
763 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ 764 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/plugin_module.cc ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698