Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / platform_util_aura.cc
blobc56591f0a2c97a406b972bead2b1d5717637f569
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"
10 #if defined(USE_ASH)
11 #include "ash/wm/window_util.h"
12 #endif
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) {
25 #if defined(USE_ASH)
26 return ash::wm::IsActiveWindow(window);
27 #else
28 NOTIMPLEMENTED();
29 return false;
30 #endif
33 void ActivateWindow(gfx::NativeWindow window) {
34 #if defined(USE_ASH)
35 ash::wm::ActivateWindow(window);
36 #else
37 NOTIMPLEMENTED();
38 #endif
41 bool IsVisible(gfx::NativeView view) {
42 return view->IsVisible();
45 } // namespace platform_util