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

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

Issue 2040253003: Mac low power video: Support child windows, sheets, and transitions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 c32a0d5956edec42956fdc84b3ca009ff188df2e..73c569b10ddff900efec1c0fac692d8969070834 100644
--- a/chrome/browser/ui/cocoa/fullscreen_low_power_coordinator.h
+++ b/chrome/browser/ui/cocoa/fullscreen_low_power_coordinator.h
@@ -29,10 +29,13 @@ class FullscreenLowPowerCoordinatorCocoa
// Interface to BrowserWindowController.
NSWindow* GetFullscreenLowPowerWindow();
+ void SetInFullscreenTransition(bool in_fullscreen_transition);
void SetLayoutParameters(const NSRect& toolbar_frame,
const NSRect& infobar_frame,
const NSRect& content_frame,
const NSRect& download_shelf_frame);
+ void SetHasActiveSheet(bool has_sheet);
+ void ChildWindowsChanged();
// ui::FullscreenLowPowerCoordinator implementation.
void SetLowPowerLayerValid(bool valid) override;
@@ -53,6 +56,10 @@ class FullscreenLowPowerCoordinatorCocoa
// can.
base::scoped_nsobject<FullscreenLowPowerWindow> low_power_window_;
+ // Don't use the fullscreen low power window until we have completely
+ // 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;
@@ -61,6 +68,14 @@ class FullscreenLowPowerCoordinatorCocoa
// allowed when nothing but the web contents is on-screen.
bool allowed_by_nsview_layout_ = true;
+ // Set if there are no NSWindows that would be covered by the fullscreen low
+ // power window.
+ bool allowed_by_child_windows_ = false;
+
+ // Set if there are no sheets (modal dialogues) that would be covered by the
+ // fullscreen low power window.
+ bool allowed_by_active_sheet_ = false;
+
// Updated by EnterOrExitLowPowerModeIfNeeded.
bool in_low_power_mode_ = false;
};

Powered by Google App Engine
This is Rietveld 408576698