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

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

Issue 1015023002: Plugin Power Saver: Throttle 'large' plugins that appear small. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « chrome/renderer/resources/plugin_poster.html ('k') | content/renderer/pepper/pepper_plugin_instance_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d21acafcaff0ef64cc7dcaae28ebcca86e1ed322..0b33cc4c88e5c63e60f15bc5cd88f3a70c96ecb9 100644
--- a/content/public/renderer/plugin_instance_throttler.h
+++ b/content/public/renderer/plugin_instance_throttler.h
@@ -14,6 +14,10 @@ class WebPlugin;
struct WebPluginParams;
}
+namespace gfx {
+class Size;
+}
+
class GURL;
class SkBitmap;
@@ -84,6 +88,9 @@ class CONTENT_EXPORT PluginInstanceThrottler {
virtual blink::WebPlugin* GetWebPlugin() const = 0;
+ // Gets the throttler's best estimate of the plugin's visible dimensions.
+ virtual const gfx::Size& GetSize() const = 0;
+
// Throttler needs to know when the plugin audio is throttled, as this may
// prevent the plugin from generating new frames.
virtual void NotifyAudioThrottled() = 0;
« no previous file with comments | « chrome/renderer/resources/plugin_poster.html ('k') | content/renderer/pepper/pepper_plugin_instance_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698