Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2419)

Unified Diff: content/renderer/pepper/plugin_instance_throttler_impl.h

Issue 866173002: Plugin Power Saver: Add UI Overlay to throttled plugin using placeholder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/pepper/plugin_instance_throttler_impl.h
diff --git a/content/renderer/pepper/plugin_instance_throttler_impl.h b/content/renderer/pepper/plugin_instance_throttler_impl.h
index 14352c119b204e5b736ef010e86d6c1ef3c3a68a..c8cbb8bb9eb535fb92ab859e54b4bf6a9d59a54d 100644
--- a/content/renderer/pepper/plugin_instance_throttler_impl.h
+++ b/content/renderer/pepper/plugin_instance_throttler_impl.h
@@ -34,7 +34,9 @@ class CONTENT_EXPORT PluginInstanceThrottlerImpl
void AddObserver(Observer* observer) override;
void RemoveObserver(Observer* observer) override;
bool IsThrottled() const override;
+ bool IsHiddenForPlaceholder() const override;
void MarkPluginEssential(PowerSaverUnthrottleMethod method) override;
+ void SetHiddenForPlaceholder(bool hidden) override;
bool needs_representative_keyframe() const {
return state_ == POWER_SAVER_ENABLED_AWAITING_KEYFRAME;
@@ -70,11 +72,18 @@ class CONTENT_EXPORT PluginInstanceThrottlerImpl
void EngageThrottle();
+ void TimeoutKeyframeExtraction();
+
State state_;
+ bool is_hidden_for_placeholder_;
+
// Number of consecutive interesting frames we've encountered.
int consecutive_interesting_frames_;
+ // If true, take the next frame as the keyframe regardless of interestingness.
+ bool keyframe_extraction_timed_out_;
+
ObserverList<Observer> observer_list_;
base::WeakPtrFactory<PluginInstanceThrottlerImpl> weak_factory_;
« no previous file with comments | « content/renderer/pepper/pepper_plugin_instance_impl.cc ('k') | content/renderer/pepper/plugin_instance_throttler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698