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

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

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 | « services/ui/ws/test_utils.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 755bb708305ee589f74513e6d013a20c60da3cc2..8b889cda57a91ff866014bc596c48133d0dbdd59 100644
--- a/services/ui/ws/user_display_manager.h
+++ b/services/ui/ws/user_display_manager.h
@@ -29,6 +29,11 @@ class UserDisplayManager : public mojom::DisplayManager {
const UserId& user_id);
~UserDisplayManager() override;
+ void DisableAutomaticNotification();
+
+ // Unconditionally calls OnDisplayChanged() on observers.
+ void CallOnDisplaysChanged();
+
// Called when the frame decorations for this user change.
void OnFrameDecorationValuesChanged();
@@ -78,6 +83,12 @@ class UserDisplayManager : public mojom::DisplayManager {
mojo::InterfacePtrSet<mojom::DisplayManagerObserver>
display_manager_observers_;
+ // If true DisplayManagerObservers are notified any time there is a display
+ // change. If false, observers are only notified when CallOnDisplaysChanged()
+ // is explicitly called. This value is true in automatic display creation and
+ // false when in manual mode.
+ bool notify_automatically_ = true;
+
DISALLOW_COPY_AND_ASSIGN(UserDisplayManager);
};
« no previous file with comments | « services/ui/ws/test_utils.cc ('k') | services/ui/ws/user_display_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698