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