OLD | NEW |
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 #include "ui/base/class_property.h" |
9 | 9 |
10 namespace aura { | 10 namespace aura { |
11 namespace { | 11 namespace { |
12 | 12 |
13 // This code uses Set/GetNativeWindowProperty instead of Set/GetProperty to | 13 // This code uses Set/GetNativeWindowProperty instead of Set/GetProperty to |
14 // avoid a dependency on mus. | 14 // avoid a dependency on mus. |
15 const char kMusWindowKey[] = "mus"; | 15 const char kMusWindowKey[] = "mus"; |
16 | 16 |
17 } // namespace | 17 } // namespace |
18 | 18 |
19 ui::Window* GetMusWindow(Window* window) { | 19 ui::Window* GetMusWindow(Window* window) { |
20 if (!window) | 20 if (!window) |
21 return nullptr; | 21 return nullptr; |
22 return static_cast<ui::Window*>( | 22 return static_cast<ui::Window*>( |
23 window->GetNativeWindowProperty(kMusWindowKey)); | 23 window->GetNativeWindowProperty(kMusWindowKey)); |
24 } | 24 } |
25 | 25 |
26 void SetMusWindow(Window* window, ui::Window* mus_window) { | 26 void SetMusWindow(Window* window, ui::Window* mus_window) { |
27 window->SetNativeWindowProperty(kMusWindowKey, mus_window); | 27 window->SetNativeWindowProperty(kMusWindowKey, mus_window); |
28 } | 28 } |
29 | 29 |
30 } // namespace aura | 30 } // namespace aura |
OLD | NEW |