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/desktop.h" | 9 #include "ui/aura/desktop.h" |
9 #include "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
| 11 #include "ui/base/ui_base_types.h" |
| 12 |
| 13 namespace { |
| 14 |
| 15 bool CheckIfFullscreenWindowExists(aura::Window* window) { |
| 16 if (window->GetIntProperty(aura::kShowStateKey) == ui::SHOW_STATE_FULLSCREEN) |
| 17 return true; |
| 18 aura::Window::Windows children = window->children(); |
| 19 for (aura::Window::Windows::const_iterator i = children.begin(); |
| 20 i != children.end(); |
| 21 ++i) { |
| 22 if (CheckIfFullscreenWindowExists(*i)) |
| 23 return true; |
| 24 } |
| 25 return false; |
| 26 } |
| 27 |
| 28 } // namespace |
10 | 29 |
11 bool IsFullScreenMode() { | 30 bool IsFullScreenMode() { |
12 // 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 |
13 // will be managed in panel and no need to provide this functionality. | 32 // will be managed in panel. This is temporary to get certain feature running |
14 NOTREACHED(); | 33 // until we implement it for aura. |
15 return false; | 34 return CheckIfFullscreenWindowExists(aura::Desktop::GetInstance()); |
16 } | 35 } |
OLD | NEW |