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

Unified Diff: content/renderer/pepper/pepper_plugin_instance_throttler.cc

Issue 764763005: Plugin Power Saver: Always mark 'tiny' plugins as essential. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@0201-plugin-power-saver-use-poster-frame-on-blocked-only
Patch Set: Created 6 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
« no previous file with comments | « no previous file | content/renderer/pepper/plugin_power_saver_helper_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_plugin_instance_throttler.cc
diff --git a/content/renderer/pepper/pepper_plugin_instance_throttler.cc b/content/renderer/pepper/pepper_plugin_instance_throttler.cc
index 80b7f61143e24ab854ecc5e7fb85ca89422a1f80..9300c89099f4a03b68f2eb693cc6775c10c3fc33 100644
--- a/content/renderer/pepper/pepper_plugin_instance_throttler.cc
+++ b/content/renderer/pepper/pepper_plugin_instance_throttler.cc
@@ -130,11 +130,11 @@ PepperPluginInstanceThrottler::PepperPluginInstanceThrottler(
RecordFlashSizeMetric(bounds.width, bounds.height);
}
- bool cross_origin = false;
+ bool is_main_attraction = false;
is_peripheral_content_ =
is_flash_plugin_ &&
- power_saver_helper->ShouldThrottleContent(content_origin, bounds.width,
- bounds.height, &cross_origin);
+ power_saver_helper->ShouldThrottleContent(
+ content_origin, bounds.width, bounds.height, &is_main_attraction);
power_saver_enabled_ = is_peripheral_content_ &&
base::CommandLine::ForCurrentProcess()->HasSwitch(
@@ -155,7 +155,7 @@ PepperPluginInstanceThrottler::PepperPluginInstanceThrottler(
weak_factory_.GetWeakPtr(), true /* throttled */),
base::TimeDelta::FromMilliseconds(kThrottleTimeout));
}
- } else if (cross_origin) {
+ } else if (is_main_attraction) {
power_saver_helper->WhitelistContentOrigin(content_origin);
}
}
« no previous file with comments | « no previous file | content/renderer/pepper/plugin_power_saver_helper_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698