| 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> |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 164 |
| 165 // Does some pre-destructor cleanup on the instance. This is necessary | 165 // Does some pre-destructor cleanup on the instance. This is necessary |
| 166 // because some cleanup depends on the plugin instance still existing (like | 166 // because some cleanup depends on the plugin instance still existing (like |
| 167 // calling the plugin's DidDestroy function). This function is called from | 167 // calling the plugin's DidDestroy function). This function is called from |
| 168 // the WebPlugin implementation when WebKit is about to remove the plugin. | 168 // the WebPlugin implementation when WebKit is about to remove the plugin. |
| 169 void Delete(); | 169 void Delete(); |
| 170 | 170 |
| 171 // Returns true if Delete() has been called on this object. | 171 // Returns true if Delete() has been called on this object. |
| 172 bool is_deleted() const; | 172 bool is_deleted() const; |
| 173 | 173 |
| 174 GURL document_url() const { return document_url_; } |
| 175 |
| 174 // Paints the current backing store to the web page. | 176 // Paints the current backing store to the web page. |
| 175 void Paint(blink::WebCanvas* canvas, | 177 void Paint(blink::WebCanvas* canvas, |
| 176 const gfx::Rect& plugin_rect, | 178 const gfx::Rect& plugin_rect, |
| 177 const gfx::Rect& paint_rect); | 179 const gfx::Rect& paint_rect); |
| 178 | 180 |
| 179 // Schedules a paint of the page for the given region. The coordinates are | 181 // Schedules a paint of the page for the given region. The coordinates are |
| 180 // relative to the top-left of the plugin. This does nothing if the plugin | 182 // relative to the top-left of the plugin. This does nothing if the plugin |
| 181 // has not yet been positioned. You can supply an empty gfx::Rect() to | 183 // has not yet been positioned. You can supply an empty gfx::Rect() to |
| 182 // invalidate the entire plugin. | 184 // invalidate the entire plugin. |
| 183 void InvalidateRect(const gfx::Rect& rect); | 185 void InvalidateRect(const gfx::Rect& rect); |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 blink::WebPluginContainer* container_; | 717 blink::WebPluginContainer* container_; |
| 716 scoped_refptr<cc::Layer> compositor_layer_; | 718 scoped_refptr<cc::Layer> compositor_layer_; |
| 717 scoped_refptr<cc::TextureLayer> texture_layer_; | 719 scoped_refptr<cc::TextureLayer> texture_layer_; |
| 718 scoped_ptr<blink::WebLayer> web_layer_; | 720 scoped_ptr<blink::WebLayer> web_layer_; |
| 719 bool layer_bound_to_fullscreen_; | 721 bool layer_bound_to_fullscreen_; |
| 720 bool layer_is_hardware_; | 722 bool layer_is_hardware_; |
| 721 | 723 |
| 722 // Plugin URL. | 724 // Plugin URL. |
| 723 const GURL plugin_url_; | 725 const GURL plugin_url_; |
| 724 | 726 |
| 727 GURL document_url_; |
| 728 |
| 725 // Used to track Flash-specific metrics. | 729 // Used to track Flash-specific metrics. |
| 726 const bool is_flash_plugin_; | 730 const bool is_flash_plugin_; |
| 727 | 731 |
| 728 // Set to true the first time the plugin is clicked. Used to collect metrics. | 732 // Set to true the first time the plugin is clicked. Used to collect metrics. |
| 729 bool has_been_clicked_; | 733 bool has_been_clicked_; |
| 730 | 734 |
| 731 // Used to track if JavaScript has ever been used for this plugin instance. | 735 // Used to track if JavaScript has ever been used for this plugin instance. |
| 732 bool javascript_used_; | 736 bool javascript_used_; |
| 733 | 737 |
| 734 // Responsible for turning on throttling if Power Saver is on. | 738 // Responsible for turning on throttling if Power Saver is on. |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 934 // view change events. | 938 // view change events. |
| 935 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; | 939 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; |
| 936 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; | 940 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; |
| 937 | 941 |
| 938 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); | 942 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); |
| 939 }; | 943 }; |
| 940 | 944 |
| 941 } // namespace content | 945 } // namespace content |
| 942 | 946 |
| 943 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ | 947 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ |
| OLD | NEW |