| 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..604e8eb6b27776a2d67d0b2097446d1b9e8abdb2 100644
|
| --- a/content/public/renderer/plugin_instance_throttler.h
|
| +++ b/content/public/renderer/plugin_instance_throttler.h
|
| @@ -10,6 +10,7 @@
|
| #include "content/common/content_export.h"
|
|
|
| class GURL;
|
| +class SkBitmap;
|
|
|
| namespace content {
|
|
|
| @@ -61,7 +62,15 @@ class CONTENT_EXPORT PluginInstanceThrottler {
|
|
|
| class Observer {
|
| public:
|
| - virtual void OnThrottleStateChange() = 0;
|
| + // Guaranteed to be called before the throttle is engaged.
|
| + virtual void OnKeyframeExtracted(const SkBitmap* bitmap) {}
|
| +
|
| + virtual void OnThrottleStateChange() {}
|
| +
|
| + // Called when the plugin should be hidden due to a placeholder.
|
| + virtual void OnHiddenForPlaceholder(bool hidden) {}
|
| +
|
| + virtual void OnThrottlerDestroyed() {}
|
| };
|
|
|
| // Returns a nullptr if no throttler needed based on |power_saver_mode|.
|
| @@ -82,6 +91,9 @@ class CONTENT_EXPORT PluginInstanceThrottler {
|
| // Marks the plugin as essential. Unthrottles the plugin if already throttled.
|
| virtual void MarkPluginEssential(PowerSaverUnthrottleMethod method) = 0;
|
|
|
| + // Called by the placeholder when the plugin should temporarily be hidden.
|
| + virtual void SetHiddenForPlaceholder(bool hidden) = 0;
|
| +
|
| protected:
|
| PluginInstanceThrottler() {}
|
|
|
|
|