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

Side by Side Diff: content/renderer/pepper/pepper_plugin_instance_impl.h

Issue 14588009: PPAPI/NaCl: Move event dispatching from the plugin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use the right Context and Isolate. Created 7 years, 1 month 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
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 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
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
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 WebKit::WebGraphicsContext3D* Context3d() OVERRIDE; 499 virtual WebKit::WebGraphicsContext3D* Context3d() OVERRIDE;
503 virtual bool PrepareTextureMailbox( 500 virtual bool PrepareTextureMailbox(
504 cc::TextureMailbox* mailbox, 501 cc::TextureMailbox* mailbox,
505 scoped_ptr<cc::SingleReleaseCallback>* release_callback, 502 scoped_ptr<cc::SingleReleaseCallback>* release_callback,
506 bool use_shared_memory) OVERRIDE; 503 bool use_shared_memory) OVERRIDE;
507 504
508 private: 505 private:
509 friend class base::RefCounted<PepperPluginInstanceImpl>; 506 friend class base::RefCounted<PepperPluginInstanceImpl>;
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 // view change events. 856 // view change events.
860 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; 857 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_;
861 858
862 friend class PpapiPluginInstanceTest; 859 friend class PpapiPluginInstanceTest;
863 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); 860 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl);
864 }; 861 };
865 862
866 } // namespace content 863 } // namespace content
867 864
868 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ 865 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698