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

Unified Diff: chrome/browser/ui/cocoa/fullscreen_low_power_coordinator.h

Issue 2047103003: Mac fullscreen low power: Add unittests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IRF Created 4 years, 6 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: chrome/browser/ui/cocoa/fullscreen_low_power_coordinator.h
diff --git a/chrome/browser/ui/cocoa/fullscreen_low_power_coordinator.h b/chrome/browser/ui/cocoa/fullscreen_low_power_coordinator.h
index 577f1fdb8e82094702fa57d23286b90c4be91dc3..9c33684febd90803670d93e73dea60af723161e6 100644
--- a/chrome/browser/ui/cocoa/fullscreen_low_power_coordinator.h
+++ b/chrome/browser/ui/cocoa/fullscreen_low_power_coordinator.h
@@ -61,9 +61,11 @@ class FullscreenLowPowerCoordinatorCocoa
// transitioned to low power mode.
bool allowed_by_fullscreen_transition_ = false;
- // Set by the AcceleratedWidgetHost with each frame. This must be true to
- // enter low power mode.
- bool low_power_layer_valid_ = false;
+ // Set by the AcceleratedWidgetHost with each frame. This must be true for
+ // 15 consecutive frames to enter low power mode (this is to ensure that the
+ // low power window has actually updated to the correct content before it
+ // appears).
+ uint64_t low_power_layer_valid_frame_count_ = 0;
// Set if the NSView hierarchy allows low power mode. Low power mode is only
// allowed when nothing but the web contents is on-screen.

Powered by Google App Engine
This is Rietveld 408576698