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> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
17 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
18 #include "base/strings/string16.h" | 18 #include "base/strings/string16.h" |
19 #include "cc/layers/content_layer_client.h" | 19 #include "cc/layers/content_layer_client.h" |
| 20 #include "cc/layers/layer.h" |
20 #include "cc/layers/texture_layer_client.h" | 21 #include "cc/layers/texture_layer_client.h" |
21 #include "content/common/content_export.h" | 22 #include "content/common/content_export.h" |
22 #include "content/public/renderer/pepper_plugin_instance.h" | 23 #include "content/public/renderer/pepper_plugin_instance.h" |
23 #include "content/public/renderer/render_frame_observer.h" | 24 #include "content/public/renderer/render_frame_observer.h" |
24 #include "content/renderer/mouse_lock_dispatcher.h" | 25 #include "content/renderer/mouse_lock_dispatcher.h" |
25 #include "ppapi/c/dev/pp_cursor_type_dev.h" | 26 #include "ppapi/c/dev/pp_cursor_type_dev.h" |
26 #include "ppapi/c/dev/ppp_printing_dev.h" | 27 #include "ppapi/c/dev/ppp_printing_dev.h" |
27 #include "ppapi/c/dev/ppp_selection_dev.h" | 28 #include "ppapi/c/dev/ppp_selection_dev.h" |
28 #include "ppapi/c/dev/ppp_text_input_dev.h" | 29 #include "ppapi/c/dev/ppp_text_input_dev.h" |
29 #include "ppapi/c/dev/ppp_zoom_dev.h" | 30 #include "ppapi/c/dev/ppp_zoom_dev.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 96 |
96 namespace v8 { | 97 namespace v8 { |
97 class Isolate; | 98 class Isolate; |
98 } | 99 } |
99 | 100 |
100 namespace content { | 101 namespace content { |
101 | 102 |
102 class ContentDecryptorDelegate; | 103 class ContentDecryptorDelegate; |
103 class FullscreenContainer; | 104 class FullscreenContainer; |
104 class MessageChannel; | 105 class MessageChannel; |
| 106 class PepperCompositorHost; |
105 class PepperGraphics2DHost; | 107 class PepperGraphics2DHost; |
106 class PluginModule; | 108 class PluginModule; |
107 class PluginObject; | 109 class PluginObject; |
108 class PPB_Graphics3D_Impl; | 110 class PPB_Graphics3D_Impl; |
109 class PPB_ImageData_Impl; | 111 class PPB_ImageData_Impl; |
110 class PPB_URLLoader_Impl; | 112 class PPB_URLLoader_Impl; |
111 class RenderFrameImpl; | 113 class RenderFrameImpl; |
112 class RenderViewImpl; | 114 class RenderViewImpl; |
113 | 115 |
114 // Represents one time a plugin appears on one web page. | 116 // Represents one time a plugin appears on one web page. |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 // If this is the NaCl plugin, we create a new module when we switch to the | 673 // If this is the NaCl plugin, we create a new module when we switch to the |
672 // IPC-based PPAPI proxy. Store the original module and instance interface | 674 // IPC-based PPAPI proxy. Store the original module and instance interface |
673 // so we can shut down properly. | 675 // so we can shut down properly. |
674 scoped_refptr<PluginModule> original_module_; | 676 scoped_refptr<PluginModule> original_module_; |
675 scoped_ptr<ppapi::PPP_Instance_Combined> original_instance_interface_; | 677 scoped_ptr<ppapi::PPP_Instance_Combined> original_instance_interface_; |
676 | 678 |
677 PP_Instance pp_instance_; | 679 PP_Instance pp_instance_; |
678 | 680 |
679 // NULL until we have been initialized. | 681 // NULL until we have been initialized. |
680 blink::WebPluginContainer* container_; | 682 blink::WebPluginContainer* container_; |
| 683 scoped_refptr<cc::Layer> compositor_layer_; |
681 scoped_refptr<cc::TextureLayer> texture_layer_; | 684 scoped_refptr<cc::TextureLayer> texture_layer_; |
682 scoped_ptr<blink::WebLayer> web_layer_; | 685 scoped_ptr<blink::WebLayer> web_layer_; |
683 bool layer_bound_to_fullscreen_; | 686 bool layer_bound_to_fullscreen_; |
684 bool layer_is_hardware_; | 687 bool layer_is_hardware_; |
685 | 688 |
686 // Plugin URL. | 689 // Plugin URL. |
687 GURL plugin_url_; | 690 GURL plugin_url_; |
688 | 691 |
689 // Indicates whether this is a full frame instance, which means it represents | 692 // Indicates whether this is a full frame instance, which means it represents |
690 // an entire document rather than an embed tag. | 693 // an entire document rather than an embed tag. |
691 bool full_frame_; | 694 bool full_frame_; |
692 | 695 |
693 // Stores the current state of the plugin view. | 696 // Stores the current state of the plugin view. |
694 ppapi::ViewData view_data_; | 697 ppapi::ViewData view_data_; |
695 // The last state sent to the plugin. It is only valid after | 698 // The last state sent to the plugin. It is only valid after |
696 // |sent_initial_did_change_view_| is set to true. | 699 // |sent_initial_did_change_view_| is set to true. |
697 ppapi::ViewData last_sent_view_data_; | 700 ppapi::ViewData last_sent_view_data_; |
698 | 701 |
699 // Indicates if we've ever sent a didChangeView to the plugin. This ensures we | 702 // Indicates if we've ever sent a didChangeView to the plugin. This ensures we |
700 // always send an initial notification, even if the position and clip are the | 703 // always send an initial notification, even if the position and clip are the |
701 // same as the default values. | 704 // same as the default values. |
702 bool sent_initial_did_change_view_; | 705 bool sent_initial_did_change_view_; |
703 | 706 |
704 // The current device context for painting in 2D and 3D. | 707 // The current device context for painting in 2D, 3D or compositor. |
705 scoped_refptr<PPB_Graphics3D_Impl> bound_graphics_3d_; | 708 scoped_refptr<PPB_Graphics3D_Impl> bound_graphics_3d_; |
706 PepperGraphics2DHost* bound_graphics_2d_platform_; | 709 PepperGraphics2DHost* bound_graphics_2d_platform_; |
| 710 PepperCompositorHost* bound_compositor_; |
707 | 711 |
708 // We track two types of focus, one from WebKit, which is the focus among | 712 // We track two types of focus, one from WebKit, which is the focus among |
709 // all elements of the page, one one from the browser, which is whether the | 713 // all elements of the page, one one from the browser, which is whether the |
710 // tab/window has focus. We tell the plugin it has focus only when both of | 714 // tab/window has focus. We tell the plugin it has focus only when both of |
711 // these values are set to true. | 715 // these values are set to true. |
712 bool has_webkit_focus_; | 716 bool has_webkit_focus_; |
713 bool has_content_area_focus_; | 717 bool has_content_area_focus_; |
714 | 718 |
715 // The id of the current find operation, or -1 if none is in process. | 719 // The id of the current find operation, or -1 if none is in process. |
716 int find_identifier_; | 720 int find_identifier_; |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
885 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; | 889 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; |
886 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; | 890 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; |
887 | 891 |
888 friend class PpapiPluginInstanceTest; | 892 friend class PpapiPluginInstanceTest; |
889 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); | 893 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); |
890 }; | 894 }; |
891 | 895 |
892 } // namespace content | 896 } // namespace content |
893 | 897 |
894 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ | 898 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ |
OLD | NEW |