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

Unified Diff: content/renderer/peripheral_content_heuristic.cc

Issue 2765633002: Plugin Power Saver Tiny: Treat completely obscured plugins as Tiny. (Closed)
Patch Set: Created 3 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
Index: content/renderer/peripheral_content_heuristic.cc
diff --git a/content/renderer/peripheral_content_heuristic.cc b/content/renderer/peripheral_content_heuristic.cc
index b9b7e9b8343f17afeaf71dd2bf9ad68ef3affbfb..fb61a26a9b54f3c546919134057b66a539615a0f 100644
--- a/content/renderer/peripheral_content_heuristic.cc
+++ b/content/renderer/peripheral_content_heuristic.cc
@@ -32,11 +32,6 @@ const double kAspectRatioEpsilon = 0.01;
const int kEssentialVideoMinimumArea = 120000;
bool IsTiny(const gfx::Size& unobscured_size) {
- // Empty plugins can't be classified as tiny - they might just be of unknown
- // size.
- if (unobscured_size.IsEmpty())
- return false;
-
return unobscured_size.width() <= kTinyContentSize &&
unobscured_size.height() <= kTinyContentSize;
}
@@ -61,9 +56,6 @@ PeripheralContentHeuristic::GetPeripheralStatus(
if (origin_whitelist.count(content_origin))
return RenderFrame::CONTENT_STATUS_ESSENTIAL_CROSS_ORIGIN_WHITELISTED;
- if (unobscured_size.IsEmpty())
- return RenderFrame::CONTENT_STATUS_UNKNOWN_SIZE;
-
if (IsTiny(unobscured_size))
return RenderFrame::CONTENT_STATUS_TINY;
« no previous file with comments | « content/renderer/pepper/plugin_power_saver_helper.cc ('k') | content/renderer/peripheral_content_heuristic_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698