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

Unified Diff: ui/aura/mus/mus_util.cc

Issue 1736293004: Fix shelf crash on windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: MUS Created 4 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/mus/mus_util.cc
diff --git a/ui/aura/mus/mus_util.cc b/ui/aura/mus/mus_util.cc
index ed57f6a6e1ad3bed64faab0b00d3149cb4a45698..468b336c450778869ae03deb35667fb9172e341e 100644
--- a/ui/aura/mus/mus_util.cc
+++ b/ui/aura/mus/mus_util.cc
@@ -5,17 +5,26 @@
#include "ui/aura/mus/mus_util.h"
#include "ui/aura/window.h"
+#include "ui/aura/window_property.h"
namespace aura {
+namespace {
+
+// This code uses Set/GetNativeWindowProperty instead of Set/GetProperty to
+// avoid a dependency on mus.
+const char kMusWindowKey[] = "mus";
+
+} // namespace
mus::Window* GetMusWindow(Window* window) {
if (!window)
return nullptr;
- return static_cast<mus::Window*>(window->GetNativeWindowProperty("mus"));
+ return static_cast<mus::Window*>(
+ window->GetNativeWindowProperty(kMusWindowKey));
}
void SetMusWindow(Window* window, mus::Window* mus_window) {
- window->SetNativeWindowProperty("mus", mus_window);
+ window->SetNativeWindowProperty(kMusWindowKey, mus_window);
}
} // namespace aura
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698