| 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 5fa327679794a658b62c58f191c39f24a236f664..ab9ad14d10e5584a8e09eb75634dbff20bbb9cc6 100644
|
| --- a/content/public/renderer/plugin_instance_throttler.h
|
| +++ b/content/public/renderer/plugin_instance_throttler.h
|
| @@ -59,9 +59,22 @@ class CONTENT_EXPORT PluginInstanceThrottler {
|
| UNTHROTTLE_METHOD_NUM_ITEMS
|
| };
|
|
|
| + enum PowerSaverState {
|
| + // Initial state if Power Saver is disabled. We are just collecting metrics.
|
| + POWER_SAVER_DISABLED,
|
| + // Initial state if Power Saver is enabled. Waiting for a keyframe.
|
| + POWER_SAVER_ENABLED_AWAITING_KEYFRAME,
|
| + // We've chosen a keyframe and the plug-in is throttled.
|
| + POWER_SAVER_ENABLED_PLUGIN_THROTTLED,
|
| + // Plugin instance is no longer considered peripheral. This can happen from
|
| + // a user click, whitelisting, or some other reason. We can end up in this
|
| + // state regardless of whether power saver is enabled.
|
| + POWER_SAVER_MARKED_ESSENTIAL
|
| + };
|
| +
|
| class Observer {
|
| public:
|
| - virtual void OnThrottleStateChange() = 0;
|
| + virtual void OnPowerSaverStateChange(PowerSaverState state) = 0;
|
| };
|
|
|
| // Returns a nullptr if no throttler needed based on |power_saver_mode|.
|
|
|