OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 "chrome/browser/fullscreen.h" | 5 #include "chrome/browser/fullscreen.h" |
6 | 6 |
7 #include "ash/shell.h" | |
8 #include "base/logging.h" | 7 #include "base/logging.h" |
9 #include "ui/aura/client/aura_constants.h" | |
10 #include "ui/aura/root_window.h" | |
11 #include "ui/aura/window.h" | |
12 #include "ui/base/ui_base_types.h" | |
13 | 8 |
14 namespace { | 9 #if !defined(USE_ASH) |
15 | 10 |
16 bool CheckIfFullscreenWindowExists(aura::Window* window) { | 11 bool IsFullScreenMode() { |
17 if (window->GetProperty(aura::client::kShowStateKey) == | 12 // TODO(erg): An implementation here would have to check all existing |
18 ui::SHOW_STATE_FULLSCREEN) | 13 // RootWindows instead of just recursively walking the Shell's RootWindow as |
19 return true; | 14 // in the ash implementaiton. |
20 aura::Window::Windows children = window->children(); | 15 NOTIMPLEMENTED(); |
21 for (aura::Window::Windows::const_iterator i = children.begin(); | |
22 i != children.end(); | |
23 ++i) { | |
24 if (CheckIfFullscreenWindowExists(*i)) | |
25 return true; | |
26 } | |
27 return false; | 16 return false; |
28 } | 17 } |
29 | 18 |
30 } // namespace | 19 #endif |
31 | |
32 bool IsFullScreenMode() { | |
33 // This is used only by notification_ui_manager.cc. On aura, notification | |
34 // will be managed in panel. This is temporary to get certain feature running | |
35 // until we implement it for aura. | |
36 return CheckIfFullscreenWindowExists(ash::Shell::GetRootWindow()); | |
37 } | |
OLD | NEW |