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

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

Issue 1984293002: Random fixes for mash bridge classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tweaks 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
Index: mash/wm/bridge/wm_lookup_mus.cc
diff --git a/mash/wm/bridge/wm_lookup_mus.cc b/mash/wm/bridge/wm_lookup_mus.cc
index 59bcc644f244e3ff5b09c3276e27fd2b3df6ca62..2d7b55b05bed6124ee4944dfb782549529336601 100644
--- a/mash/wm/bridge/wm_lookup_mus.cc
+++ b/mash/wm/bridge/wm_lookup_mus.cc
@@ -12,9 +12,14 @@
namespace mash {
namespace wm {
-WmLookupMus::WmLookupMus() {}
+WmLookupMus::WmLookupMus() {
+ WmLookup::Set(this);
+}
-WmLookupMus::~WmLookupMus() {}
+WmLookupMus::~WmLookupMus() {
+ if (WmLookupMus::Get() == this)
+ WmLookup::Set(nullptr);
+}
ash::wm::WmRootWindowController*
WmLookupMus::GetRootWindowControllerWithDisplayId(int64_t id) {

Powered by Google App Engine
This is Rietveld 408576698