Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(273)

Unified Diff: ui/display/display_list.cc

Issue 2904993003: chromeos: changes how DisplayManagerObservers are notified (Closed)
Patch Set: cleanup Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/display/display_list.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/display_list.cc
diff --git a/ui/display/display_list.cc b/ui/display/display_list.cc
index b5f830a8b25cf65d6ab8fda5534d3ecbcf7a8162..74eb5c9b70f252fc2c2b0ce47aa4831f0457dfc0 100644
--- a/ui/display/display_list.cc
+++ b/ui/display/display_list.cc
@@ -52,6 +52,13 @@ std::unique_ptr<DisplayListObserverLock> DisplayList::SuspendObserverUpdates() {
return base::WrapUnique(new DisplayListObserverLock(this));
}
+void DisplayList::AddOrUpdateDisplay(const Display& display, Type type) {
+ if (FindDisplayById(display.id()) == displays_.end())
+ AddDisplay(display, type);
+ else
+ UpdateDisplay(display, type);
+}
+
uint32_t DisplayList::UpdateDisplay(const Display& display) {
return UpdateDisplay(display, GetTypeByDisplayId(display.id()));
}
« no previous file with comments | « ui/display/display_list.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698