DeviceDisplayInfo is a native cache for the primary display. The cache is updated every time the orientation of a display changes (as a special case in ScreenOrientationListener). With the effort to support several displays in WebView (or at least to be able to attach a WebView to a Presentation, see https://developer.android.com/reference/android/app/Presentation.html) in crbug.com/310763 , we want to store a cache containing several displays instead of just one.
Furthermore it seems beneficial to use the screen interface (https://cs.chromium.org/chromium/src/ui/display/screen.h) for fetching display information from the native side, thus making Android more similar to the rest of Chrome, instead of having an Android-specific DeviceDisplayInfo object. This means using Screen.GetPrimaryDisplay() for cases where we specifically want the primary display and using Screen.GetDisplayNearestWindow(NativeView) to get the display of a certain ContentViewCore.
A doc explaining the effort to support several displays for WebView can be found here:
https://docs.google.com/a/google.com/document/d/1fJDGn3wSzKtm7HSkSatWRXgkAZqj95iBJ20gtsZhqrc/edit?usp=sharing
that doc also describes what changes we need to make to ui/display to have it replace the native DeviceDisplayInfo, this means adding a couple of fields. To replace the java-side DeviceDisplayInfo I believe we just need some static utility methods that can fetch the information we want from an Android Display object.
Comment 1 by gsennton@chromium.org
, Jul 1 2016