Chromium Code Reviews| Index: content/public/renderer/plugin_instance_throttler.h |
| diff --git a/content/public/renderer/plugin_instance_throttler.h b/content/public/renderer/plugin_instance_throttler.h |
| index 376e6ab989f7a20e4f8d61a9eda485877e1f247a..53daaaadf2b1872c49a17866251e647db65c82cb 100644 |
| --- a/content/public/renderer/plugin_instance_throttler.h |
| +++ b/content/public/renderer/plugin_instance_throttler.h |
| @@ -9,25 +9,15 @@ |
| #include "base/memory/scoped_ptr.h" |
| #include "content/common/content_export.h" |
| +namespace blink { |
| +struct WebPluginParams; |
| +} |
| + |
| class GURL; |
| class SkBitmap; |
| namespace content { |
| -class RenderFrame; |
| - |
| -// Plugin instances are "peripheral" if they are heuristically determined to be |
| -// not "essential" to the web page content. See comments on |
| -// RenderFrame::ShouldThrottleContent for details on these heuristics. |
| -enum PluginPowerSaverMode { |
| - // Plugin content is main content, and therefore never throttled. |
| - POWER_SAVER_MODE_ESSENTIAL = 0, |
| - // Plugin content is peripheral, but throttling is disabled. |
| - POWER_SAVER_MODE_PERIPHERAL_UNTHROTTLED = 1, |
| - // Plugin content is peripheral, and throttling is enabled. |
| - POWER_SAVER_MODE_PERIPHERAL_THROTTLED = 2 |
| -}; |
| - |
| // This class manages the metric collection, throttling, and unthrottling of a |
| // single peripheral plugin instance. If the Power Saver feature is disabled, |
| // the plugin instance will never actually be throttled, but still collects |
| @@ -73,11 +63,10 @@ class CONTENT_EXPORT PluginInstanceThrottler { |
| virtual void OnThrottlerDestroyed() {} |
| }; |
| - // Returns a nullptr if no throttler needed based on |power_saver_mode|. |
| - static scoped_ptr<PluginInstanceThrottler> Get( |
| - RenderFrame* frame, |
| - const GURL& plugin_url, |
| - PluginPowerSaverMode power_saver_mode); |
| + static scoped_ptr<PluginInstanceThrottler> Create(bool power_saver_enabled); |
| + |
| + static GURL GetPluginInstancePosterImage(const blink::WebPluginParams& params, |
| + const GURL& page_base_url); |
|
piman
2015/02/06 22:13:12
Why is this even here? It doesn't need anything fr
tommycli
2015/02/06 22:57:10
Done. It was to support a unit test. But I think t
|
| static void RecordUnthrottleMethodMetric(PowerSaverUnthrottleMethod method); |