New issue
Advanced search Search tips

Issue 753378 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Merge DisplayChangeNotifier and DisplayList classes

Project Member Reported by ccameron@chromium.org, Aug 8 2017

Issue description

Consider the classes DisplayChangeNotifier and DisplayList.

These are both used to implement the Screen::Add/RemoveObserve functions for different sub-classes. DisplayChangeNotifier is used by DesktopScreenX11, ScreenMac, and ScreenWin. DisplayList is used by subclasses of ScreenBase (mus?). 

Both have a base::ObserverList<DisplayObserver>, and associated add/remove observer methods.

Both have code to compute differences between displays, see
A: https://cs.chromium.org/chromium/src/ui/display/display_change_notifier.cc?rcl=86fa3c4a571c5d9c3172dedfd3f76ac062e32637&l=69
B: https://cs.chromium.org/chromium/src/ui/display/display_list.cc?rcl=86fa3c4a571c5d9c3172dedfd3f76ac062e32637&l=72

We ran into a bunch of bugs adding new notifications where we weren't aware that both of these implementations of the same functionality needed updating. Let's de-dupe these things.
 
There's also a third implementation in display::DisplayManager (complete with the same typedefs), but that seems at least slightly different in that is setting these values.

Sign in to add a comment