| OLD | NEW |
| (Empty) |
| 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. | |
| 4 | |
| 5 #include "chrome/browser/fullscreen.h" | |
| 6 | |
| 7 #include "ash/shell.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" | |
| 13 | |
| 14 namespace { | |
| 15 | |
| 16 bool CheckIfFullscreenWindowExists(aura::Window* window) { | |
| 17 if (window->GetProperty(aura::client::kShowStateKey) == | |
| 18 ui::SHOW_STATE_FULLSCREEN) | |
| 19 return true; | |
| 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 } | |
| 27 return false; | |
| 28 } | |
| 29 | |
| 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 |