| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 94 |
| 94 namespace v8 { | 95 namespace v8 { |
| 95 class Isolate; | 96 class Isolate; |
| 96 } | 97 } |
| 97 | 98 |
| 98 namespace content { | 99 namespace content { |
| 99 | 100 |
| 100 class ContentDecryptorDelegate; | 101 class ContentDecryptorDelegate; |
| 101 class FullscreenContainer; | 102 class FullscreenContainer; |
| 102 class MessageChannel; | 103 class MessageChannel; |
| 104 class PepperCompositorHost; |
| 103 class PepperGraphics2DHost; | 105 class PepperGraphics2DHost; |
| 104 class PluginModule; | 106 class PluginModule; |
| 105 class PluginObject; | 107 class PluginObject; |
| 106 class PPB_Graphics3D_Impl; | 108 class PPB_Graphics3D_Impl; |
| 107 class PPB_ImageData_Impl; | 109 class PPB_ImageData_Impl; |
| 108 class PPB_URLLoader_Impl; | 110 class PPB_URLLoader_Impl; |
| 109 class RenderFrameImpl; | 111 class RenderFrameImpl; |
| 110 class RenderViewImpl; | 112 class RenderViewImpl; |
| 111 | 113 |
| 112 // Represents one time a plugin appears on one web page. | 114 // Represents one time a plugin appears on one web page. |
| (...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 // If this is the NaCl plugin, we create a new module when we switch to the | 663 // If this is the NaCl plugin, we create a new module when we switch to the |
| 662 // IPC-based PPAPI proxy. Store the original module and instance interface | 664 // IPC-based PPAPI proxy. Store the original module and instance interface |
| 663 // so we can shut down properly. | 665 // so we can shut down properly. |
| 664 scoped_refptr<PluginModule> original_module_; | 666 scoped_refptr<PluginModule> original_module_; |
| 665 scoped_ptr<ppapi::PPP_Instance_Combined> original_instance_interface_; | 667 scoped_ptr<ppapi::PPP_Instance_Combined> original_instance_interface_; |
| 666 | 668 |
| 667 PP_Instance pp_instance_; | 669 PP_Instance pp_instance_; |
| 668 | 670 |
| 669 // NULL until we have been initialized. | 671 // NULL until we have been initialized. |
| 670 blink::WebPluginContainer* container_; | 672 blink::WebPluginContainer* container_; |
| 673 scoped_refptr<cc::Layer> compositor_layer_; |
| 671 scoped_refptr<cc::TextureLayer> texture_layer_; | 674 scoped_refptr<cc::TextureLayer> texture_layer_; |
| 672 scoped_ptr<blink::WebLayer> web_layer_; | 675 scoped_ptr<blink::WebLayer> web_layer_; |
| 673 bool layer_bound_to_fullscreen_; | 676 bool layer_bound_to_fullscreen_; |
| 674 bool layer_is_hardware_; | 677 bool layer_is_hardware_; |
| 675 | 678 |
| 676 // Plugin URL. | 679 // Plugin URL. |
| 677 GURL plugin_url_; | 680 GURL plugin_url_; |
| 678 | 681 |
| 679 // Indicates whether this is a full frame instance, which means it represents | 682 // Indicates whether this is a full frame instance, which means it represents |
| 680 // an entire document rather than an embed tag. | 683 // an entire document rather than an embed tag. |
| 681 bool full_frame_; | 684 bool full_frame_; |
| 682 | 685 |
| 683 // Stores the current state of the plugin view. | 686 // Stores the current state of the plugin view. |
| 684 ppapi::ViewData view_data_; | 687 ppapi::ViewData view_data_; |
| 685 // The last state sent to the plugin. It is only valid after | 688 // The last state sent to the plugin. It is only valid after |
| 686 // |sent_initial_did_change_view_| is set to true. | 689 // |sent_initial_did_change_view_| is set to true. |
| 687 ppapi::ViewData last_sent_view_data_; | 690 ppapi::ViewData last_sent_view_data_; |
| 688 | 691 |
| 689 // Indicates if we've ever sent a didChangeView to the plugin. This ensures we | 692 // Indicates if we've ever sent a didChangeView to the plugin. This ensures we |
| 690 // always send an initial notification, even if the position and clip are the | 693 // always send an initial notification, even if the position and clip are the |
| 691 // same as the default values. | 694 // same as the default values. |
| 692 bool sent_initial_did_change_view_; | 695 bool sent_initial_did_change_view_; |
| 693 | 696 |
| 694 // The current device context for painting in 2D and 3D. | 697 // The current device context for painting in 2D, 3D or compositor. |
| 695 scoped_refptr<PPB_Graphics3D_Impl> bound_graphics_3d_; | 698 scoped_refptr<PPB_Graphics3D_Impl> bound_graphics_3d_; |
| 696 PepperGraphics2DHost* bound_graphics_2d_platform_; | 699 PepperGraphics2DHost* bound_graphics_2d_platform_; |
| 700 PepperCompositorHost* bound_compositor_; |
| 697 | 701 |
| 698 // We track two types of focus, one from WebKit, which is the focus among | 702 // We track two types of focus, one from WebKit, which is the focus among |
| 699 // all elements of the page, one one from the browser, which is whether the | 703 // all elements of the page, one one from the browser, which is whether the |
| 700 // tab/window has focus. We tell the plugin it has focus only when both of | 704 // tab/window has focus. We tell the plugin it has focus only when both of |
| 701 // these values are set to true. | 705 // these values are set to true. |
| 702 bool has_webkit_focus_; | 706 bool has_webkit_focus_; |
| 703 bool has_content_area_focus_; | 707 bool has_content_area_focus_; |
| 704 | 708 |
| 705 // The id of the current find operation, or -1 if none is in process. | 709 // The id of the current find operation, or -1 if none is in process. |
| 706 int find_identifier_; | 710 int find_identifier_; |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; | 875 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; |
| 872 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; | 876 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; |
| 873 | 877 |
| 874 friend class PpapiPluginInstanceTest; | 878 friend class PpapiPluginInstanceTest; |
| 875 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); | 879 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); |
| 876 }; | 880 }; |
| 877 | 881 |
| 878 } // namespace content | 882 } // namespace content |
| 879 | 883 |
| 880 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ | 884 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ |
| OLD | NEW |