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" |
11 #include "base/win/win_util.h" | 11 #include "base/win/win_util.h" |
12 #include "base/win/windows_version.h" | 12 #include "base/win/windows_version.h" |
| 13 #include "chrome/browser/ui/host_desktop.h" |
13 | 14 |
14 #if defined(USE_ASH) | 15 #if defined(USE_ASH) |
15 #include "ash/root_window_controller.h" | 16 #include "ash/root_window_controller.h" |
16 #include "chrome/browser/ui/host_desktop.h" | 17 #include "ui/gfx/host_desktop_type.h" |
17 #endif | 18 #endif |
18 | 19 |
19 static bool IsPlatformFullScreenMode() { | 20 static bool IsPlatformFullScreenMode() { |
20 // SHQueryUserNotificationState is only available for Vista and above. | 21 // SHQueryUserNotificationState is only available for Vista and above. |
21 #if defined(NTDDI_VERSION) && (NTDDI_VERSION >= NTDDI_VISTA) | 22 #if defined(NTDDI_VERSION) && (NTDDI_VERSION >= NTDDI_VISTA) |
22 if (base::win::GetVersion() < base::win::VERSION_VISTA) | 23 if (base::win::GetVersion() < base::win::VERSION_VISTA) |
23 return false; | 24 return false; |
24 | 25 |
25 typedef HRESULT(WINAPI *SHQueryUserNotificationStatePtr)( | 26 typedef HRESULT(WINAPI *SHQueryUserNotificationStatePtr)( |
26 QUERY_USER_NOTIFICATION_STATE* state); | 27 QUERY_USER_NOTIFICATION_STATE* state); |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 if (chrome::GetActiveDesktop() == ui::HOST_DESKTOP_TYPE_ASH) { | 107 if (chrome::GetActiveDesktop() == ui::HOST_DESKTOP_TYPE_ASH) { |
107 ash::RootWindowController* controller = | 108 ash::RootWindowController* controller = |
108 ash::RootWindowController::ForTargetRootWindow(); | 109 ash::RootWindowController::ForTargetRootWindow(); |
109 return controller && controller->GetWindowForFullscreenMode(); | 110 return controller && controller->GetWindowForFullscreenMode(); |
110 } | 111 } |
111 #endif | 112 #endif |
112 return IsPlatformFullScreenMode() || | 113 return IsPlatformFullScreenMode() || |
113 IsFullScreenWindowMode() || | 114 IsFullScreenWindowMode() || |
114 IsFullScreenConsoleMode(); | 115 IsFullScreenConsoleMode(); |
115 } | 116 } |
OLD | NEW |