blob: 9676ca4f0600a450fc889928cf52d077e9ee59b1 [file] [log] [blame]
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#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
ui::Window* GetMusWindow(Window* window) {
if (!window)
return nullptr;
return static_cast<ui::Window*>(
window->GetNativeWindowProperty(kMusWindowKey));
}
void SetMusWindow(Window* window, ui::Window* mus_window) {
window->SetNativeWindowProperty(kMusWindowKey, mus_window);
}
} // namespace aura