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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 struct WebURLError; | 84 struct WebURLError; |
85 struct WebPrintParams; | 85 struct WebPrintParams; |
86 } | 86 } |
87 | 87 |
88 namespace cc { | 88 namespace cc { |
89 class TextureLayer; | 89 class TextureLayer; |
90 } | 90 } |
91 | 91 |
92 namespace gfx { | 92 namespace gfx { |
93 class Range; | 93 class Range; |
| 94 class Rect; |
94 } | 95 } |
95 | 96 |
96 namespace ppapi { | 97 namespace ppapi { |
97 class Resource; | 98 class Resource; |
98 struct InputEventData; | 99 struct InputEventData; |
99 struct PPP_Instance_Combined; | 100 struct PPP_Instance_Combined; |
100 class ScopedPPVar; | 101 class ScopedPPVar; |
101 } | 102 } |
102 | 103 |
103 namespace content { | 104 namespace content { |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
688 MouseLockDispatcher* GetMouseLockDispatcher(); | 689 MouseLockDispatcher* GetMouseLockDispatcher(); |
689 MouseLockDispatcher::LockTarget* GetOrCreateLockTargetAdapter(); | 690 MouseLockDispatcher::LockTarget* GetOrCreateLockTargetAdapter(); |
690 void UnSetAndDeleteLockTargetAdapter(); | 691 void UnSetAndDeleteLockTargetAdapter(); |
691 | 692 |
692 void DidDataFromWebURLResponse(const blink::WebURLResponse& response, | 693 void DidDataFromWebURLResponse(const blink::WebURLResponse& response, |
693 int pending_host_id, | 694 int pending_host_id, |
694 const ppapi::URLResponseInfoData& data); | 695 const ppapi::URLResponseInfoData& data); |
695 | 696 |
696 void RecordFlashJavaScriptUse(); | 697 void RecordFlashJavaScriptUse(); |
697 | 698 |
| 699 // Converts the PP_Rect between DIP and Viewport. |
| 700 void ConvertRectToDIP(PP_Rect* rect) const; |
| 701 void ConvertDIPToViewport(gfx::Rect* rect) const; |
| 702 |
698 RenderFrameImpl* render_frame_; | 703 RenderFrameImpl* render_frame_; |
699 base::Closure instance_deleted_callback_; | 704 base::Closure instance_deleted_callback_; |
700 scoped_refptr<PluginModule> module_; | 705 scoped_refptr<PluginModule> module_; |
701 scoped_ptr<ppapi::PPP_Instance_Combined> instance_interface_; | 706 scoped_ptr<ppapi::PPP_Instance_Combined> instance_interface_; |
702 // If this is the NaCl plugin, we create a new module when we switch to the | 707 // If this is the NaCl plugin, we create a new module when we switch to the |
703 // IPC-based PPAPI proxy. Store the original module and instance interface | 708 // IPC-based PPAPI proxy. Store the original module and instance interface |
704 // so we can shut down properly. | 709 // so we can shut down properly. |
705 scoped_refptr<PluginModule> original_module_; | 710 scoped_refptr<PluginModule> original_module_; |
706 scoped_ptr<ppapi::PPP_Instance_Combined> original_instance_interface_; | 711 scoped_ptr<ppapi::PPP_Instance_Combined> original_instance_interface_; |
707 | 712 |
(...skipping 28 matching lines...) Expand all Loading... |
736 // an entire document rather than an embed tag. | 741 // an entire document rather than an embed tag. |
737 bool full_frame_; | 742 bool full_frame_; |
738 | 743 |
739 // Stores the current state of the plugin view. | 744 // Stores the current state of the plugin view. |
740 ppapi::ViewData view_data_; | 745 ppapi::ViewData view_data_; |
741 // The last state sent to the plugin. It is only valid after | 746 // The last state sent to the plugin. It is only valid after |
742 // |sent_initial_did_change_view_| is set to true. | 747 // |sent_initial_did_change_view_| is set to true. |
743 ppapi::ViewData last_sent_view_data_; | 748 ppapi::ViewData last_sent_view_data_; |
744 // The current unobscured portion of the plugin. | 749 // The current unobscured portion of the plugin. |
745 gfx::Rect unobscured_rect_; | 750 gfx::Rect unobscured_rect_; |
| 751 // The viewport coordinates to window coordinates ratio. |
| 752 float viewport_to_dip_scale_; |
746 | 753 |
747 // Indicates if we've ever sent a didChangeView to the plugin. This ensures we | 754 // Indicates if we've ever sent a didChangeView to the plugin. This ensures we |
748 // always send an initial notification, even if the position and clip are the | 755 // always send an initial notification, even if the position and clip are the |
749 // same as the default values. | 756 // same as the default values. |
750 bool sent_initial_did_change_view_; | 757 bool sent_initial_did_change_view_; |
751 | 758 |
752 // The current device context for painting in 2D, 3D or compositor. | 759 // The current device context for painting in 2D, 3D or compositor. |
753 scoped_refptr<PPB_Graphics3D_Impl> bound_graphics_3d_; | 760 scoped_refptr<PPB_Graphics3D_Impl> bound_graphics_3d_; |
754 PepperGraphics2DHost* bound_graphics_2d_platform_; | 761 PepperGraphics2DHost* bound_graphics_2d_platform_; |
755 PepperCompositorHost* bound_compositor_; | 762 PepperCompositorHost* bound_compositor_; |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
929 // view change events. | 936 // view change events. |
930 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; | 937 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; |
931 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; | 938 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; |
932 | 939 |
933 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); | 940 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); |
934 }; | 941 }; |
935 | 942 |
936 } // namespace content | 943 } // namespace content |
937 | 944 |
938 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ | 945 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ |
OLD | NEW |