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

Unified Diff: mash/wm/bridge/wm_window_mus.cc

Issue 1983343002: Makes mus::Window and mash::wm::WmWindowMus notify existing observers only (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « components/mus/public/cpp/lib/window.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/wm/bridge/wm_window_mus.cc
diff --git a/mash/wm/bridge/wm_window_mus.cc b/mash/wm/bridge/wm_window_mus.cc
index 97b973375c5ab3f9019684c82cc74ef9cb17825f..7818280d8098ae1c0de6c4d40429889d1655df2d 100644
--- a/mash/wm/bridge/wm_window_mus.cc
+++ b/mash/wm/bridge/wm_window_mus.cc
@@ -91,7 +91,11 @@ mus::mojom::ShowState MojomWindowShowStateFromUI(ui::WindowShowState state) {
} // namespace
-WmWindowMus::WmWindowMus(mus::Window* window) : window_(window) {
+WmWindowMus::WmWindowMus(mus::Window* window)
+ : window_(window),
+ // Matches aura, see aura::Window for details.
+ observers_(
+ base::ObserverList<ash::wm::WmWindowObserver>::NOTIFY_EXISTING_ONLY) {
window_->AddObserver(this);
window_->SetLocalProperty(kWmWindowKey, this);
window_state_.reset(new WindowStateMus(this));
« no previous file with comments | « components/mus/public/cpp/lib/window.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698