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

Unified Diff: ash/mus/display_synchronizer.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 | « ash/mus/bridge/shell_port_mash.cc ('k') | ash/mus/display_synchronizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/display_synchronizer.h
diff --git a/ash/mus/display_synchronizer.h b/ash/mus/display_synchronizer.h
new file mode 100644
index 0000000000000000000000000000000000000000..791fffe375504c396a8a8af9187d623b9e86dd59
--- /dev/null
+++ b/ash/mus/display_synchronizer.h
@@ -0,0 +1,40 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_MUS_DISPLAY_SYNCHRONIZER_H_
+#define ASH_MUS_DISPLAY_SYNCHRONIZER_H_
+
+#include "ash/display/window_tree_host_manager.h"
+#include "base/macros.h"
+
+namespace aura {
+class WindowManagerClient;
+}
+
+namespace ash {
+
+// DisplaySynchronizer keeps the display state in mus in sync with ash's display
+// state. As ash controls the overall display state this synchronization is one
+// way (from ash to mus).
+class DisplaySynchronizer : public ash::WindowTreeHostManager::Observer {
+ public:
+ explicit DisplaySynchronizer(
+ aura::WindowManagerClient* window_manager_client);
+ ~DisplaySynchronizer() override;
+
+ private:
+ void SendDisplayConfigurationToServer();
+
+ // WindowTreeHostManager::Observer:
+ void OnDisplaysInitialized() override;
+ void OnDisplayConfigurationChanged() override;
+
+ aura::WindowManagerClient* window_manager_client_;
+
+ DISALLOW_COPY_AND_ASSIGN(DisplaySynchronizer);
+};
+
+} // namespace ash
+
+#endif // ASH_MUS_DISPLAY_SYNCHRONIZER_H_
« no previous file with comments | « ash/mus/bridge/shell_port_mash.cc ('k') | ash/mus/display_synchronizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698