| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "ui/aura/client/aura_constants.h" | 8 #include "ui/aura/client/aura_constants.h" |
| 9 #include "ui/aura/desktop.h" | 9 #include "ui/aura/root_window.h" |
| 10 #include "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
| 11 #include "ui/base/ui_base_types.h" | 11 #include "ui/base/ui_base_types.h" |
| 12 | 12 |
| 13 namespace { | 13 namespace { |
| 14 | 14 |
| 15 bool CheckIfFullscreenWindowExists(aura::Window* window) { | 15 bool CheckIfFullscreenWindowExists(aura::Window* window) { |
| 16 if (window->GetIntProperty(aura::kShowStateKey) == ui::SHOW_STATE_FULLSCREEN) | 16 if (window->GetIntProperty(aura::kShowStateKey) == ui::SHOW_STATE_FULLSCREEN) |
| 17 return true; | 17 return true; |
| 18 aura::Window::Windows children = window->children(); | 18 aura::Window::Windows children = window->children(); |
| 19 for (aura::Window::Windows::const_iterator i = children.begin(); | 19 for (aura::Window::Windows::const_iterator i = children.begin(); |
| 20 i != children.end(); | 20 i != children.end(); |
| 21 ++i) { | 21 ++i) { |
| 22 if (CheckIfFullscreenWindowExists(*i)) | 22 if (CheckIfFullscreenWindowExists(*i)) |
| 23 return true; | 23 return true; |
| 24 } | 24 } |
| 25 return false; | 25 return false; |
| 26 } | 26 } |
| 27 | 27 |
| 28 } // namespace | 28 } // namespace |
| 29 | 29 |
| 30 bool IsFullScreenMode() { | 30 bool IsFullScreenMode() { |
| 31 // This is used only by notification_ui_manager.cc. On aura, notification | 31 // This is used only by notification_ui_manager.cc. On aura, notification |
| 32 // will be managed in panel. This is temporary to get certain feature running | 32 // will be managed in panel. This is temporary to get certain feature running |
| 33 // until we implement it for aura. | 33 // until we implement it for aura. |
| 34 return CheckIfFullscreenWindowExists(aura::Desktop::GetInstance()); | 34 return CheckIfFullscreenWindowExists(aura::RootWindow::GetInstance()); |
| 35 } | 35 } |
| OLD | NEW |