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

Side by Side 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, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/aura/mus/mus_util.h" 5 #include "ui/aura/mus/mus_util.h"
6 6
7 #include "ui/aura/window.h" 7 #include "ui/aura/window.h"
8 #include "ui/aura/window_property.h"
8 9
9 namespace aura { 10 namespace aura {
11 namespace {
12
13 // This code uses Set/GetNativeWindowProperty instead of Set/GetProperty to
14 // avoid a dependency on mus.
15 const char kMusWindowKey[] = "mus";
16
17 } // namespace
10 18
11 mus::Window* GetMusWindow(Window* window) { 19 mus::Window* GetMusWindow(Window* window) {
12 if (!window) 20 if (!window)
13 return nullptr; 21 return nullptr;
14 return static_cast<mus::Window*>(window->GetNativeWindowProperty("mus")); 22 return static_cast<mus::Window*>(
23 window->GetNativeWindowProperty(kMusWindowKey));
15 } 24 }
16 25
17 void SetMusWindow(Window* window, mus::Window* mus_window) { 26 void SetMusWindow(Window* window, mus::Window* mus_window) {
18 window->SetNativeWindowProperty("mus", mus_window); 27 window->SetNativeWindowProperty(kMusWindowKey, mus_window);
19 } 28 }
20 29
21 } // namespace aura 30 } // namespace aura
OLDNEW
« 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