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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 1522173002: Reland: Plugin Power Saver: Improve Poster behavior for essential plugins. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix an NPE crash/race on plugin destruction Created 5 years 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/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 52ce5cb22e85eb4b8572d4c06784e4a064ae3bfb..d324d6663b694c423d92f29425ab9924902ca551 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -2128,15 +2128,13 @@ void RenderFrameImpl::RegisterPeripheralPlugin(
content_origin, unthrottle_callback);
}
-bool RenderFrameImpl::ShouldThrottleContent(
+RenderFrame::PeripheralContentStatus
+RenderFrameImpl::GetPeripheralContentStatus(
const url::Origin& main_frame_origin,
const url::Origin& content_origin,
- int width,
- int height,
- bool* cross_origin_main_content) const {
- return plugin_power_saver_helper_->ShouldThrottleContent(
- main_frame_origin, content_origin, width, height,
- cross_origin_main_content);
+ const gfx::Size& unobscured_size) const {
+ return plugin_power_saver_helper_->GetPeripheralContentStatus(
+ main_frame_origin, content_origin, unobscured_size);
}
void RenderFrameImpl::WhitelistContentOrigin(

Powered by Google App Engine
This is Rietveld 408576698