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/root_window.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::client::kShowStateKey) == |
| 17 ui::SHOW_STATE_FULLSCREEN) |
17 return true; | 18 return true; |
18 aura::Window::Windows children = window->children(); | 19 aura::Window::Windows children = window->children(); |
19 for (aura::Window::Windows::const_iterator i = children.begin(); | 20 for (aura::Window::Windows::const_iterator i = children.begin(); |
20 i != children.end(); | 21 i != children.end(); |
21 ++i) { | 22 ++i) { |
22 if (CheckIfFullscreenWindowExists(*i)) | 23 if (CheckIfFullscreenWindowExists(*i)) |
23 return true; | 24 return true; |
24 } | 25 } |
25 return false; | 26 return false; |
26 } | 27 } |
27 | 28 |
28 } // namespace | 29 } // namespace |
29 | 30 |
30 bool IsFullScreenMode() { | 31 bool IsFullScreenMode() { |
31 // This is used only by notification_ui_manager.cc. On aura, notification | 32 // 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 | 33 // will be managed in panel. This is temporary to get certain feature running |
33 // until we implement it for aura. | 34 // until we implement it for aura. |
34 return CheckIfFullscreenWindowExists(aura::RootWindow::GetInstance()); | 35 return CheckIfFullscreenWindowExists(aura::RootWindow::GetInstance()); |
35 } | 36 } |
OLD | NEW |