Index: content/public/renderer/render_frame.h |
diff --git a/content/public/renderer/render_frame.h b/content/public/renderer/render_frame.h |
index 814822517b3829be40f36ac13c9b59250ddc33ea..d284a989cd68f786b0ea8909b3c325809f38b08d 100644 |
--- a/content/public/renderer/render_frame.h |
+++ b/content/public/renderer/render_frame.h |
@@ -130,6 +130,36 @@ class CONTENT_EXPORT RenderFrame : public IPC::Listener, |
virtual void RegisterPeripheralPlugin( |
const url::Origin& content_origin, |
const base::Closure& unthrottle_callback) = 0; |
+ |
+ // Returns true if this plugin should have power saver enabled. |
+ // |
+ // Power Saver is enabled for plugin content that are cross-origin and |
+ // heuristically determined to be not essential to the web page content. |
+ // |
+ // Plugin content is defined to be cross-origin when the plugin source's |
+ // origin differs from the top level frame's origin. For example: |
+ // - Cross-origin: a.com -> b.com/plugin.swf |
+ // - Cross-origin: a.com -> b.com/iframe.html -> b.com/plugin.swf |
+ // - Same-origin: a.com -> b.com/iframe-to-a.html -> a.com/plugin.swf |
+ // |
+ // |main_frame_origin| is the origin of the main frame. |
+ // |
+ // |content_origin| is the origin of the plugin content. |
+ // |
+ // |width| and |height| are zoom and device scale independent logical pixels. |
+ // |
+ // |cross_origin_main_content| may be NULL. It is set to true if the |
+ // plugin content is cross-origin but still the "main attraction" of the page. |
+ virtual bool ShouldThrottleContent(const url::Origin& main_frame_origin, |
+ const url::Origin& content_origin, |
+ const std::string& plugin_module_name, |
+ int width, |
+ int height, |
+ bool* cross_origin_main_content) const = 0; |
+ |
+ // Whitelists a |content_origin| so its content will never be throttled in |
+ // this RenderFrame. Whitelist is cleared by top level navigation. |
+ virtual void WhitelistContentOrigin(const url::Origin& content_origin) = 0; |
#endif |
// Returns true if this frame is a FTP directory listing. |