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

Unified Diff: ash/mus/bridge/shell_port_mash.h

Issue 2874963002: chromeos: wireup more display management for mushrome (Closed)
Patch Set: better comment 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 | « no previous file | ash/mus/bridge/shell_port_mash.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/bridge/shell_port_mash.h
diff --git a/ash/mus/bridge/shell_port_mash.h b/ash/mus/bridge/shell_port_mash.h
index 2456370be5d01761236214e1e9f76bfb890cecf2..4d40964872ae6473e3610171d2ee6cd7b2119708 100644
--- a/ash/mus/bridge/shell_port_mash.h
+++ b/ash/mus/bridge/shell_port_mash.h
@@ -10,6 +10,7 @@
#include <memory>
#include <vector>
+#include "ash/display/window_tree_host_manager.h"
#include "ash/shell_port.h"
#include "base/macros.h"
@@ -36,7 +37,7 @@ class WindowManager;
class ShellPortMashTestApi;
// ShellPort implementation for mash/mus. See ash/README.md for more.
-class ShellPortMash : public ShellPort {
+class ShellPortMash : public ShellPort, public WindowTreeHostManager::Observer {
public:
// If |create_session_state_delegate_stub| is true SessionStateDelegateStub is
// created. If false, the SessionStateDelegate from Shell is used.
@@ -138,6 +139,10 @@ class ShellPortMash : public ShellPort {
accelerator_controller_delegate;
};
+ // WindowTreeHostManager::Observer:
+ void OnDisplayConfigurationChanging() override;
+ void OnDisplayConfigurationChanged() override;
+
WindowManager* window_manager_;
// TODO(sky): remove this once mash supports simple display management.
@@ -150,6 +155,9 @@ class ShellPortMash : public ShellPort {
std::unique_ptr<SessionStateDelegate> session_state_delegate_;
+ bool added_display_observer_ = false;
+ base::ObserverList<WmDisplayObserver> display_observers_;
+
DISALLOW_COPY_AND_ASSIGN(ShellPortMash);
};
« no previous file with comments | « no previous file | ash/mus/bridge/shell_port_mash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698