| 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 CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ |
| 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 } | 338 } |
| 339 void set_document_loader(WebKit::WebURLLoaderClient* loader) { | 339 void set_document_loader(WebKit::WebURLLoaderClient* loader) { |
| 340 document_loader_ = loader; | 340 document_loader_ = loader; |
| 341 } | 341 } |
| 342 | 342 |
| 343 ContentDecryptorDelegate* GetContentDecryptorDelegate(); | 343 ContentDecryptorDelegate* GetContentDecryptorDelegate(); |
| 344 | 344 |
| 345 // PluginInstance implementation | 345 // PluginInstance implementation |
| 346 virtual RenderView* GetRenderView() OVERRIDE; | 346 virtual RenderView* GetRenderView() OVERRIDE; |
| 347 virtual WebKit::WebPluginContainer* GetContainer() OVERRIDE; | 347 virtual WebKit::WebPluginContainer* GetContainer() OVERRIDE; |
| 348 virtual v8::Isolate* GetIsolate() const OVERRIDE; |
| 348 virtual ppapi::VarTracker* GetVarTracker() OVERRIDE; | 349 virtual ppapi::VarTracker* GetVarTracker() OVERRIDE; |
| 349 virtual const GURL& GetPluginURL() OVERRIDE; | 350 virtual const GURL& GetPluginURL() OVERRIDE; |
| 350 virtual base::FilePath GetModulePath() OVERRIDE; | 351 virtual base::FilePath GetModulePath() OVERRIDE; |
| 351 virtual PP_Resource CreateImage(gfx::ImageSkia* source_image, | 352 virtual PP_Resource CreateImage(gfx::ImageSkia* source_image, |
| 352 float scale) OVERRIDE; | 353 float scale) OVERRIDE; |
| 353 virtual PP_ExternalPluginResult SwitchToOutOfProcessProxy( | 354 virtual PP_ExternalPluginResult SwitchToOutOfProcessProxy( |
| 354 const base::FilePath& file_path, | 355 const base::FilePath& file_path, |
| 355 ppapi::PpapiPermissions permissions, | 356 ppapi::PpapiPermissions permissions, |
| 356 const IPC::ChannelHandle& channel_handle, | 357 const IPC::ChannelHandle& channel_handle, |
| 357 base::ProcessId plugin_pid, | 358 base::ProcessId plugin_pid, |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 // ResetAsProxied above, a NaCl plugin instance's module changes, so external | 487 // ResetAsProxied above, a NaCl plugin instance's module changes, so external |
| 487 // hosts won't recognize it as a valid instance of the original module. This | 488 // hosts won't recognize it as a valid instance of the original module. This |
| 488 // method fixes that be checking that either module_ or original_module_ match | 489 // method fixes that be checking that either module_ or original_module_ match |
| 489 // the given module. | 490 // the given module. |
| 490 bool IsValidInstanceOf(PluginModule* module); | 491 bool IsValidInstanceOf(PluginModule* module); |
| 491 | 492 |
| 492 // Returns the plugin NPP identifier that this plugin will use to identify | 493 // Returns the plugin NPP identifier that this plugin will use to identify |
| 493 // itself when making NPObject scripting calls to WebBindings. | 494 // itself when making NPObject scripting calls to WebBindings. |
| 494 struct _NPP* instanceNPP(); | 495 struct _NPP* instanceNPP(); |
| 495 | 496 |
| 496 // Returns the v8::Isolate that was current when this Instance was created. | |
| 497 // This is not inlined so as to avoid an unnecessary header include of v8.h. | |
| 498 v8::Isolate* GetIsolate() const; | |
| 499 | |
| 500 // cc::TextureLayerClient implementation. | 497 // cc::TextureLayerClient implementation. |
| 501 virtual unsigned PrepareTexture() OVERRIDE; | 498 virtual unsigned PrepareTexture() OVERRIDE; |
| 502 virtual bool PrepareTextureMailbox( | 499 virtual bool PrepareTextureMailbox( |
| 503 cc::TextureMailbox* mailbox, | 500 cc::TextureMailbox* mailbox, |
| 504 scoped_ptr<cc::SingleReleaseCallback>* release_callback, | 501 scoped_ptr<cc::SingleReleaseCallback>* release_callback, |
| 505 bool use_shared_memory) OVERRIDE; | 502 bool use_shared_memory) OVERRIDE; |
| 506 | 503 |
| 507 private: | 504 private: |
| 508 friend class base::RefCounted<PepperPluginInstanceImpl>; | 505 friend class base::RefCounted<PepperPluginInstanceImpl>; |
| 509 friend class PpapiUnittest; | 506 friend class PpapiUnittest; |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 858 // view change events. | 855 // view change events. |
| 859 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; | 856 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; |
| 860 | 857 |
| 861 friend class PpapiPluginInstanceTest; | 858 friend class PpapiPluginInstanceTest; |
| 862 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); | 859 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); |
| 863 }; | 860 }; |
| 864 | 861 |
| 865 } // namespace content | 862 } // namespace content |
| 866 | 863 |
| 867 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ | 864 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ |
| OLD | NEW |