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

Unified Diff: content/public/renderer/plugin_instance_throttler.h

Issue 1124173008: Plugin Power Saver: Unthrottle dynamically sized plugins correctly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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/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 025ccbd8a8a410610321c5d1ac2ee03e4e30df66..21ac9c2a96cb427ac0584ea836e818498c46ceaa 100644
--- a/content/public/renderer/plugin_instance_throttler.h
+++ b/content/public/renderer/plugin_instance_throttler.h
@@ -52,6 +52,7 @@ class CONTENT_EXPORT PluginInstanceThrottler {
UNTHROTTLE_METHOD_BY_CLICK = 1,
UNTHROTTLE_METHOD_BY_WHITELIST = 2,
UNTHROTTLE_METHOD_BY_AUDIO = 3,
+ UNTHROTTLE_METHOD_BY_SIZE_CHANGE = 4,
UNTHROTTLE_METHOD_NUM_ITEMS
};
@@ -74,6 +75,9 @@ class CONTENT_EXPORT PluginInstanceThrottler {
static void RecordUnthrottleMethodMetric(PowerSaverUnthrottleMethod method);
+ // Returns true if content is considered "large", and thus essential.
+ static bool IsLargeContent(int width, int height);
+
virtual ~PluginInstanceThrottler() {}
virtual void AddObserver(Observer* observer) = 0;
« no previous file with comments | « components/plugins/renderer/webview_plugin.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