| 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" |
| 7 #include "base/logging.h" | 8 #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" |
| 8 | 13 |
| 9 #if !defined(USE_ASH) | 14 namespace { |
| 10 | 15 |
| 11 bool IsFullScreenMode() { | 16 bool CheckIfFullscreenWindowExists(aura::Window* window) { |
| 12 // TODO(erg): An implementation here would have to check all existing | 17 if (window->GetProperty(aura::client::kShowStateKey) == |
| 13 // RootWindows instead of just recursively walking the Shell's RootWindow as | 18 ui::SHOW_STATE_FULLSCREEN) |
| 14 // in the ash implementaiton. | 19 return true; |
| 15 NOTIMPLEMENTED(); | 20 aura::Window::Windows children = window->children(); |
| 21 for (aura::Window::Windows::const_iterator i = children.begin(); |
| 22 i != children.end(); |
| 23 ++i) { |
| 24 if (CheckIfFullscreenWindowExists(*i)) |
| 25 return true; |
| 26 } |
| 16 return false; | 27 return false; |
| 17 } | 28 } |
| 18 | 29 |
| 19 #endif | 30 } // namespace |
| 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 |