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

Unified Diff: services/ui/ws/user_display_manager.h

Issue 2897303002: chromeos: Changes DisplayManagerObserver to have a single function (Closed)
Patch Set: fix compile 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 | « services/ui/ws/display_manager.cc ('k') | services/ui/ws/user_display_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/user_display_manager.h
diff --git a/services/ui/ws/user_display_manager.h b/services/ui/ws/user_display_manager.h
index 16617d7597e3e727b4f7029bc455679ad34521c2..755bb708305ee589f74513e6d013a20c60da3cc2 100644
--- a/services/ui/ws/user_display_manager.h
+++ b/services/ui/ws/user_display_manager.h
@@ -36,10 +36,10 @@ class UserDisplayManager : public mojom::DisplayManager {
mojo::InterfaceRequest<mojom::DisplayManager> request);
// Called when something about the display (e.g. pixel-ratio, size) changes.
- void OnDisplayUpdate(const display::Display& display);
+ void OnDisplayUpdated(const display::Display& display);
- // Called when |display_id| is being removed.
- void OnWillDestroyDisplay(int64_t display_id);
+ // Called when the display with |display_id| was removed.
+ void OnDisplayDestroyed(int64_t display_id);
// Called when the primary display changes.
void OnPrimaryDisplayChanged(int64_t primary_display_id);
@@ -57,8 +57,13 @@ class UserDisplayManager : public mojom::DisplayManager {
std::vector<mojom::WsDisplayPtr> GetAllDisplays();
- // Calls OnDisplays() on |observer|.
- void CallOnDisplays(mojom::DisplayManagerObserver* observer);
+ bool ShouldCallOnDisplaysChanged() const;
+
+ // Calls OnDisplaysChanged() on all observers.
+ void CallOnDisplaysChangedIfNecessary();
+
+ // Calls OnDisplaysChanged() on |observer|.
+ void CallOnDisplaysChanged(mojom::DisplayManagerObserver* observer);
UserDisplayManagerDelegate* delegate_;
« no previous file with comments | « services/ui/ws/display_manager.cc ('k') | services/ui/ws/user_display_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698