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 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
680 // If this is the NaCl plugin, we create a new module when we switch to the | 682 // If this is the NaCl plugin, we create a new module when we switch to the |
681 // IPC-based PPAPI proxy. Store the original module and instance interface | 683 // IPC-based PPAPI proxy. Store the original module and instance interface |
682 // so we can shut down properly. | 684 // so we can shut down properly. |
683 scoped_refptr<PluginModule> original_module_; | 685 scoped_refptr<PluginModule> original_module_; |
684 scoped_ptr<ppapi::PPP_Instance_Combined> original_instance_interface_; | 686 scoped_ptr<ppapi::PPP_Instance_Combined> original_instance_interface_; |
685 | 687 |
686 PP_Instance pp_instance_; | 688 PP_Instance pp_instance_; |
687 | 689 |
688 // NULL until we have been initialized. | 690 // NULL until we have been initialized. |
689 blink::WebPluginContainer* container_; | 691 blink::WebPluginContainer* container_; |
| 692 scoped_refptr<cc::Layer> compositor_layer_; |
690 scoped_refptr<cc::TextureLayer> texture_layer_; | 693 scoped_refptr<cc::TextureLayer> texture_layer_; |
691 scoped_ptr<blink::WebLayer> web_layer_; | 694 scoped_ptr<blink::WebLayer> web_layer_; |
692 bool layer_bound_to_fullscreen_; | 695 bool layer_bound_to_fullscreen_; |
693 bool layer_is_hardware_; | 696 bool layer_is_hardware_; |
694 | 697 |
695 // Plugin URL. | 698 // Plugin URL. |
696 GURL plugin_url_; | 699 GURL plugin_url_; |
697 | 700 |
698 // Indicates whether this is a full frame instance, which means it represents | 701 // Indicates whether this is a full frame instance, which means it represents |
699 // an entire document rather than an embed tag. | 702 // an entire document rather than an embed tag. |
700 bool full_frame_; | 703 bool full_frame_; |
701 | 704 |
702 // Stores the current state of the plugin view. | 705 // Stores the current state of the plugin view. |
703 ppapi::ViewData view_data_; | 706 ppapi::ViewData view_data_; |
704 // The last state sent to the plugin. It is only valid after | 707 // The last state sent to the plugin. It is only valid after |
705 // |sent_initial_did_change_view_| is set to true. | 708 // |sent_initial_did_change_view_| is set to true. |
706 ppapi::ViewData last_sent_view_data_; | 709 ppapi::ViewData last_sent_view_data_; |
707 | 710 |
708 // Indicates if we've ever sent a didChangeView to the plugin. This ensures we | 711 // Indicates if we've ever sent a didChangeView to the plugin. This ensures we |
709 // always send an initial notification, even if the position and clip are the | 712 // always send an initial notification, even if the position and clip are the |
710 // same as the default values. | 713 // same as the default values. |
711 bool sent_initial_did_change_view_; | 714 bool sent_initial_did_change_view_; |
712 | 715 |
713 // The current device context for painting in 2D and 3D. | 716 // The current device context for painting in 2D, 3D or compositor. |
714 scoped_refptr<PPB_Graphics3D_Impl> bound_graphics_3d_; | 717 scoped_refptr<PPB_Graphics3D_Impl> bound_graphics_3d_; |
715 PepperGraphics2DHost* bound_graphics_2d_platform_; | 718 PepperGraphics2DHost* bound_graphics_2d_platform_; |
| 719 PepperCompositorHost* bound_compositor_; |
716 | 720 |
717 // We track two types of focus, one from WebKit, which is the focus among | 721 // We track two types of focus, one from WebKit, which is the focus among |
718 // all elements of the page, one one from the browser, which is whether the | 722 // all elements of the page, one one from the browser, which is whether the |
719 // tab/window has focus. We tell the plugin it has focus only when both of | 723 // tab/window has focus. We tell the plugin it has focus only when both of |
720 // these values are set to true. | 724 // these values are set to true. |
721 bool has_webkit_focus_; | 725 bool has_webkit_focus_; |
722 bool has_content_area_focus_; | 726 bool has_content_area_focus_; |
723 | 727 |
724 // The id of the current find operation, or -1 if none is in process. | 728 // The id of the current find operation, or -1 if none is in process. |
725 int find_identifier_; | 729 int find_identifier_; |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
894 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; | 898 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; |
895 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; | 899 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; |
896 | 900 |
897 friend class PpapiPluginInstanceTest; | 901 friend class PpapiPluginInstanceTest; |
898 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); | 902 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); |
899 }; | 903 }; |
900 | 904 |
901 } // namespace content | 905 } // namespace content |
902 | 906 |
903 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ | 907 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ |
OLD | NEW |