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

Side by Side Diff: ui/views/widget/monitor_win.cc

Issue 823133004: Cleanup: Update the path to gfx rect headers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rect_f.h Created 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/views/widget/monitor_win.h" 5 #include "ui/views/widget/monitor_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "ui/gfx/rect.h" 10 #include "ui/gfx/geometry/rect.h"
11 11
12 namespace views { 12 namespace views {
13 13
14 gfx::Rect GetMonitorBoundsForRect(const gfx::Rect& rect) { 14 gfx::Rect GetMonitorBoundsForRect(const gfx::Rect& rect) {
15 RECT p_rect = rect.ToRECT(); 15 RECT p_rect = rect.ToRECT();
16 HMONITOR monitor = MonitorFromRect(&p_rect, MONITOR_DEFAULTTONEAREST); 16 HMONITOR monitor = MonitorFromRect(&p_rect, MONITOR_DEFAULTTONEAREST);
17 if (monitor) { 17 if (monitor) {
18 MONITORINFO mi = { sizeof(MONITORINFO) }; 18 MONITORINFO mi = { sizeof(MONITORINFO) };
19 GetMonitorInfo(monitor, &mi); 19 GetMonitorInfo(monitor, &mi);
20 return gfx::Rect(mi.rcWork); 20 return gfx::Rect(mi.rcWork);
21 } 21 }
22 NOTREACHED(); 22 NOTREACHED();
23 return gfx::Rect(); 23 return gfx::Rect();
24 } 24 }
25 25
26 } // namespace views 26 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_window_tree_host_x11_unittest.cc ('k') | ui/views/widget/tooltip_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698