1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/platform_util.h"
7 #include "base/logging.h"
8 #include "ui/aura/window.h"
11 #include "ash/wm/window_util.h"
14 namespace platform_util
{
16 gfx::NativeWindow
GetTopLevel(gfx::NativeView view
) {
17 return view
->GetToplevelWindow();
20 gfx::NativeView
GetParent(gfx::NativeView view
) {
21 return view
->parent();
24 bool IsWindowActive(gfx::NativeWindow window
) {
26 return ash::wm::IsActiveWindow(window
);
33 void ActivateWindow(gfx::NativeWindow window
) {
35 ash::wm::ActivateWindow(window
);
41 bool IsVisible(gfx::NativeView view
) {
42 return view
->IsVisible();
45 } // namespace platform_util