Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert /chrome/browser/ash/crosapi to ScopedDisplayObserver
This is a refactoring to make it easier for future changes to DisplayObserver, and to clean up manual Add/Remove calls with RAII. ScopedDisplayObserver is an RAII class that directly replaces display::Screen::Add/RemoveObserver. ScopedOptionalDisplayObserver is the same thing, but handles the case where display::Screen::GetScreen() is null. This can happen in tests. This is a non-functional change, intending to replicate existing behavior exactly. This CL was uploaded by git cl split. R=erikchen@chromium.org Bug: 1225463 Change-Id: I469ca2770f91d1eb4e2927120ea8c3ab865b9e5b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3004096 Auto-Submit: enne <enne@chromium.org> Reviewed-by: Erik Chen <erikchen@chromium.org> Commit-Queue: Erik Chen <erikchen@chromium.org> Cr-Commit-Position: refs/heads/master@{#898412}
- Loading branch information