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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 // clear itself when it is destroyed. | 365 // clear itself when it is destroyed. |
366 blink::WebURLLoaderClient* document_loader() const { | 366 blink::WebURLLoaderClient* document_loader() const { |
367 return document_loader_; | 367 return document_loader_; |
368 } | 368 } |
369 void set_document_loader(blink::WebURLLoaderClient* loader) { | 369 void set_document_loader(blink::WebURLLoaderClient* loader) { |
370 document_loader_ = loader; | 370 document_loader_ = loader; |
371 } | 371 } |
372 | 372 |
373 ContentDecryptorDelegate* GetContentDecryptorDelegate(); | 373 ContentDecryptorDelegate* GetContentDecryptorDelegate(); |
374 | 374 |
| 375 void SetGraphics2DTransform(const float& scale, |
| 376 const gfx::PointF& translation); |
| 377 |
375 // PluginInstance implementation | 378 // PluginInstance implementation |
376 RenderView* GetRenderView() override; | 379 RenderView* GetRenderView() override; |
377 blink::WebPluginContainer* GetContainer() override; | 380 blink::WebPluginContainer* GetContainer() override; |
378 v8::Isolate* GetIsolate() const override; | 381 v8::Isolate* GetIsolate() const override; |
379 ppapi::VarTracker* GetVarTracker() override; | 382 ppapi::VarTracker* GetVarTracker() override; |
380 const GURL& GetPluginURL() override; | 383 const GURL& GetPluginURL() override; |
381 base::FilePath GetModulePath() override; | 384 base::FilePath GetModulePath() override; |
382 PP_Resource CreateImage(gfx::ImageSkia* source_image, float scale) override; | 385 PP_Resource CreateImage(gfx::ImageSkia* source_image, float scale) override; |
383 PP_ExternalPluginResult SwitchToOutOfProcessProxy( | 386 PP_ExternalPluginResult SwitchToOutOfProcessProxy( |
384 const base::FilePath& file_path, | 387 const base::FilePath& file_path, |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 scoped_refptr<PluginModule> module_; | 707 scoped_refptr<PluginModule> module_; |
705 std::unique_ptr<ppapi::PPP_Instance_Combined> instance_interface_; | 708 std::unique_ptr<ppapi::PPP_Instance_Combined> instance_interface_; |
706 // If this is the NaCl plugin, we create a new module when we switch to the | 709 // If this is the NaCl plugin, we create a new module when we switch to the |
707 // IPC-based PPAPI proxy. Store the original module and instance interface | 710 // IPC-based PPAPI proxy. Store the original module and instance interface |
708 // so we can shut down properly. | 711 // so we can shut down properly. |
709 scoped_refptr<PluginModule> original_module_; | 712 scoped_refptr<PluginModule> original_module_; |
710 std::unique_ptr<ppapi::PPP_Instance_Combined> original_instance_interface_; | 713 std::unique_ptr<ppapi::PPP_Instance_Combined> original_instance_interface_; |
711 | 714 |
712 PP_Instance pp_instance_; | 715 PP_Instance pp_instance_; |
713 | 716 |
| 717 // These are the scale and the translation that will be applied to the layer. |
| 718 gfx::PointF graphics2d_translation_; |
| 719 float graphics2d_scale_; |
| 720 |
714 // NULL until we have been initialized. | 721 // NULL until we have been initialized. |
715 blink::WebPluginContainer* container_; | 722 blink::WebPluginContainer* container_; |
716 scoped_refptr<cc::Layer> compositor_layer_; | 723 scoped_refptr<cc::Layer> compositor_layer_; |
717 scoped_refptr<cc::TextureLayer> texture_layer_; | 724 scoped_refptr<cc::TextureLayer> texture_layer_; |
718 std::unique_ptr<blink::WebLayer> web_layer_; | 725 std::unique_ptr<blink::WebLayer> web_layer_; |
719 bool layer_bound_to_fullscreen_; | 726 bool layer_bound_to_fullscreen_; |
720 bool layer_is_hardware_; | 727 bool layer_is_hardware_; |
721 | 728 |
722 // Plugin URL. | 729 // Plugin URL. |
723 const GURL plugin_url_; | 730 const GURL plugin_url_; |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
935 // view change events. | 942 // view change events. |
936 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; | 943 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; |
937 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; | 944 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; |
938 | 945 |
939 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); | 946 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); |
940 }; | 947 }; |
941 | 948 |
942 } // namespace content | 949 } // namespace content |
943 | 950 |
944 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ | 951 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ |
OLD | NEW |