| 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 <windows.h> | 7 #include <windows.h> |
| 8 #include <shellapi.h> | 8 #include <shellapi.h> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 ::FreeConsole(); | 99 ::FreeConsole(); |
| 100 | 100 |
| 101 return (modes & (CONSOLE_FULLSCREEN | CONSOLE_FULLSCREEN_HARDWARE)) != 0; | 101 return (modes & (CONSOLE_FULLSCREEN | CONSOLE_FULLSCREEN_HARDWARE)) != 0; |
| 102 } | 102 } |
| 103 | 103 |
| 104 bool IsFullScreenMode() { | 104 bool IsFullScreenMode() { |
| 105 #if defined(USE_ASH) | 105 #if defined(USE_ASH) |
| 106 if (chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_ASH) { | 106 if (chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_ASH) { |
| 107 ash::internal::RootWindowController* controller = | 107 ash::internal::RootWindowController* controller = |
| 108 ash::internal::RootWindowController::ForActiveRootWindow(); | 108 ash::internal::RootWindowController::ForActiveRootWindow(); |
| 109 return controller && controller->GetFullscreenWindow(); | 109 return controller && controller->GetTopmostFullscreenWindow(); |
| 110 } | 110 } |
| 111 #endif | 111 #endif |
| 112 return IsPlatformFullScreenMode() || | 112 return IsPlatformFullScreenMode() || |
| 113 IsFullScreenWindowMode() || | 113 IsFullScreenWindowMode() || |
| 114 IsFullScreenConsoleMode(); | 114 IsFullScreenConsoleMode(); |
| 115 } | 115 } |
| OLD | NEW |