DescriptionMac: Use Mavericks occlusion APIs for power savings.
Use NSWindowDidChangeOcclusionStateNotification (new in 10.9
Mavericks) to detect when the application is hidden, the window is
minimized or obscured by another window.
Send the WasHidden to the WebContentsImpl, because this will
take into account tab capture.
When RenderWidgetHostViewMac::WasHidden is called, the previous
behavior was to destroy the BrowserCompositorViewMac. This has
the undesirable effect of creating a white flash when a hidden
window is re-exposed.
To prevent this, only destroy the BrowserCompositorViewMac when
the the RenderWidgetHostViewMac is removed from all NSWindows.
Manage the state of BrowserCompositorViewMac explicitly as being
Active (previously whenever it existed), Suspended (the new state
where it is kept around, but the RWH and DFH are hidden), and
Destroyed (previously wherever it did not exist).
Move some 10.7 APIs to base because they belong there, not in
content.
BUG=310374
Committed: https://crrev.com/044d85df5e5e3fbf5d826c694ebf5d4bca7706ce
Cr-Commit-Position: refs/heads/master@{#302160}
Patch Set 1 #Patch Set 2 : Add NULL check #Patch Set 3 : Retry upload #
Total comments: 9
Patch Set 4 : Incorporate review feedback #Patch Set 5 : Incorporate review feedback #
Messages
Total messages: 12 (3 generated)
|