New issue
Advanced search Search tips

Issue 840015 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Bug



Sign in to add a comment

Create mechanism to forward key window UITraitCollection information to KeyedServices.

Project Member Reported by kkhorimoto@chromium.org, May 4 2018

Issue description

KeyedServices that need information about trait collections currently don't have a way to access this information.  This can be fixed by creating a KeyedService that is updated in ChromeOverlayWindow's |-traitCollectionDidChange:|.
 
Cc: marq@chromium.org rohitrao@chromium.org
+ Mark and Rohit.

What do you think the best way to implement this would be?  I had initially tried to create a KeyedService that is updated by ChromeOverlayWindow's |-traitCollectionDidChange:| so that other KeyedServices that care about this information can have access to it.  However, ChromeOverlayWindow is created before BrowserStates/KeyedServices are set up, so there isn't an easy way to supply the window with the service that needs to be updated.

This info is required to detect rotation events from FullscreenController.  I have a CL out that uses device orientation notifications to handle this, but this will turn on the accelerometer for the lifetime of the app, so it will likely have a negative effect on battery life.  crrev.com/c/1042863
Per offline discussion with Rohit:

1) Add functionality to FullscreenController to enter/exit fullscreen.
2) Listen from BVC's |-traitCollectionDidChange| for portrait => landscape rotations.
3) Call FullscreenController::EnterFullscreen() when this occurs.

Broadcasting the key window's trait collection is not the best approach, as there are usually more localized trait collection environments that are more appropriate.  Since BVC is the closest ancestor to all FullscreenUIElements, it is the correct choice for whether to enter fullscreen.
Status: WontFix (was: Assigned)

Sign in to add a comment