Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: chrome/browser/fullscreen_win.cc

Issue 137353002: Remove GetMonitorInfoWrapper, which is no longer needed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 return false; 55 return false;
56 56
57 // Get the monitor where the window is located. 57 // Get the monitor where the window is located.
58 RECT wnd_rect; 58 RECT wnd_rect;
59 if (!::GetWindowRect(wnd, &wnd_rect)) 59 if (!::GetWindowRect(wnd, &wnd_rect))
60 return false; 60 return false;
61 HMONITOR monitor = ::MonitorFromRect(&wnd_rect, MONITOR_DEFAULTTONULL); 61 HMONITOR monitor = ::MonitorFromRect(&wnd_rect, MONITOR_DEFAULTTONULL);
62 if (!monitor) 62 if (!monitor)
63 return false; 63 return false;
64 MONITORINFO monitor_info = { sizeof(monitor_info) }; 64 MONITORINFO monitor_info = { sizeof(monitor_info) };
65 if (!base::win::GetMonitorInfoWrapper(monitor, &monitor_info)) 65 if (!::GetMonitorInfo(monitor, &monitor_info))
66 return false; 66 return false;
67 67
68 // It should be the main monitor. 68 // It should be the main monitor.
69 if (!(monitor_info.dwFlags & MONITORINFOF_PRIMARY)) 69 if (!(monitor_info.dwFlags & MONITORINFOF_PRIMARY))
70 return false; 70 return false;
71 71
72 // The window should be at least as large as the monitor. 72 // The window should be at least as large as the monitor.
73 if (!::IntersectRect(&wnd_rect, &wnd_rect, &monitor_info.rcMonitor)) 73 if (!::IntersectRect(&wnd_rect, &wnd_rect, &monitor_info.rcMonitor))
74 return false; 74 return false;
75 if (!::EqualRect(&wnd_rect, &monitor_info.rcMonitor)) 75 if (!::EqualRect(&wnd_rect, &monitor_info.rcMonitor))
(...skipping 30 matching lines...) Expand all
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::ForTargetRootWindow(); 108 ash::internal::RootWindowController::ForTargetRootWindow();
109 return controller && controller->GetWindowForFullscreenMode(); 109 return controller && controller->GetWindowForFullscreenMode();
110 } 110 }
111 #endif 111 #endif
112 return IsPlatformFullScreenMode() || 112 return IsPlatformFullScreenMode() ||
113 IsFullScreenWindowMode() || 113 IsFullScreenWindowMode() ||
114 IsFullScreenConsoleMode(); 114 IsFullScreenConsoleMode();
115 } 115 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698