| 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..8243a21ff8be2ed90831e0be34ddfe3697360551 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,7 @@ 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 void RecordUnthrottleMethodMetric(PowerSaverUnthrottleMethod method);
|
|
|
|
|