| 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 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 681 bool LockMouse(); | 681 bool LockMouse(); |
| 682 MouseLockDispatcher* GetMouseLockDispatcher(); | 682 MouseLockDispatcher* GetMouseLockDispatcher(); |
| 683 MouseLockDispatcher::LockTarget* GetOrCreateLockTargetAdapter(); | 683 MouseLockDispatcher::LockTarget* GetOrCreateLockTargetAdapter(); |
| 684 void UnSetAndDeleteLockTargetAdapter(); | 684 void UnSetAndDeleteLockTargetAdapter(); |
| 685 | 685 |
| 686 void DidDataFromWebURLResponse(const blink::WebURLResponse& response, | 686 void DidDataFromWebURLResponse(const blink::WebURLResponse& response, |
| 687 int pending_host_id, | 687 int pending_host_id, |
| 688 const ppapi::URLResponseInfoData& data); | 688 const ppapi::URLResponseInfoData& data); |
| 689 | 689 |
| 690 void SetPluginThrottled(bool throttled); | 690 void SetPluginThrottled(bool throttled); |
| 691 void DisablePowerSaverAndUnthrottle(); | 691 void DisablePowerSaverByRetroactiveWhitelist(); |
| 692 | 692 |
| 693 RenderFrameImpl* render_frame_; | 693 RenderFrameImpl* render_frame_; |
| 694 base::Closure instance_deleted_callback_; | 694 base::Closure instance_deleted_callback_; |
| 695 scoped_refptr<PluginModule> module_; | 695 scoped_refptr<PluginModule> module_; |
| 696 scoped_ptr<ppapi::PPP_Instance_Combined> instance_interface_; | 696 scoped_ptr<ppapi::PPP_Instance_Combined> instance_interface_; |
| 697 // If this is the NaCl plugin, we create a new module when we switch to the | 697 // If this is the NaCl plugin, we create a new module when we switch to the |
| 698 // IPC-based PPAPI proxy. Store the original module and instance interface | 698 // IPC-based PPAPI proxy. Store the original module and instance interface |
| 699 // so we can shut down properly. | 699 // so we can shut down properly. |
| 700 scoped_refptr<PluginModule> original_module_; | 700 scoped_refptr<PluginModule> original_module_; |
| 701 scoped_ptr<ppapi::PPP_Instance_Combined> original_instance_interface_; | 701 scoped_ptr<ppapi::PPP_Instance_Combined> original_instance_interface_; |
| 702 | 702 |
| 703 PP_Instance pp_instance_; | 703 PP_Instance pp_instance_; |
| 704 | 704 |
| 705 // NULL until we have been initialized. | 705 // NULL until we have been initialized. |
| 706 blink::WebPluginContainer* container_; | 706 blink::WebPluginContainer* container_; |
| 707 scoped_refptr<cc::Layer> compositor_layer_; | 707 scoped_refptr<cc::Layer> compositor_layer_; |
| 708 scoped_refptr<cc::TextureLayer> texture_layer_; | 708 scoped_refptr<cc::TextureLayer> texture_layer_; |
| 709 scoped_ptr<blink::WebLayer> web_layer_; | 709 scoped_ptr<blink::WebLayer> web_layer_; |
| 710 bool layer_bound_to_fullscreen_; | 710 bool layer_bound_to_fullscreen_; |
| 711 bool layer_is_hardware_; | 711 bool layer_is_hardware_; |
| 712 | 712 |
| 713 // Plugin URL. | 713 // Plugin URL. |
| 714 GURL plugin_url_; | 714 GURL plugin_url_; |
| 715 | 715 |
| 716 // Indicates whether this plugin may be throttled to reduce power consumption. | 716 // Indicates whether this plugin may be throttled to reduce power consumption. |
| 717 // |power_saver_enabled_| implies |is_peripheral_content_|. |
| 717 bool power_saver_enabled_; | 718 bool power_saver_enabled_; |
| 718 | 719 |
| 720 // Indicates whether this plugin was found to be peripheral content. |
| 721 // This is separately tracked from |power_saver_enabled_| to collect UMAs. |
| 722 // Always true if |power_saver_enabled_| is true. |
| 723 bool is_peripheral_content_; |
| 724 |
| 719 // Indicates if the plugin is currently throttled. | 725 // Indicates if the plugin is currently throttled. |
| 720 bool plugin_throttled_; | 726 bool plugin_throttled_; |
| 721 | 727 |
| 722 // Fake view data used by the Power Saver feature to throttle plugins. | 728 // Fake view data used by the Power Saver feature to throttle plugins. |
| 723 const ppapi::ViewData empty_view_data_; | 729 const ppapi::ViewData empty_view_data_; |
| 724 | 730 |
| 725 // Responsible for turning on throttling if Power Saver is on. | 731 // Responsible for turning on throttling if Power Saver is on. |
| 726 scoped_ptr<PepperPluginInstanceThrottler> throttler_; | 732 scoped_ptr<PepperPluginInstanceThrottler> throttler_; |
| 727 | 733 |
| 728 // Indicates whether this is a full frame instance, which means it represents | 734 // Indicates whether this is a full frame instance, which means it represents |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 923 // view change events. | 929 // view change events. |
| 924 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; | 930 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; |
| 925 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; | 931 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; |
| 926 | 932 |
| 927 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); | 933 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); |
| 928 }; | 934 }; |
| 929 | 935 |
| 930 } // namespace content | 936 } // namespace content |
| 931 | 937 |
| 932 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ | 938 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ |
| OLD | NEW |