summaryrefslogtreecommitdiffstats
path: root/views/screen_win.cc
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-13 22:38:19 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-13 22:38:19 +0000
commit9a295b8b77f4ad665fa5a3ec9201d44850b38a88 (patch)
tree97cb83425070c5bcaba6d3b5c837a6f5cfac6fad /views/screen_win.cc
parentdae1b35cd836002ee6be56ad6436fc2d763f0bcb (diff)
downloadchromium_src-9a295b8b77f4ad665fa5a3ec9201d44850b38a88.zip
chromium_src-9a295b8b77f4ad665fa5a3ec9201d44850b38a88.tar.gz
chromium_src-9a295b8b77f4ad665fa5a3ec9201d44850b38a88.tar.bz2
Couple of views/gtk tweaks:
. Adds accelerator to list of files compiled on views/gtk. . Adds function to Screen to get monitor bounds from a window. . Adds BrowserFrameGtk::GetAccelerator to match windows. BUG=none TEST=none Review URL: http://codereview.chromium.org/275005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28902 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/screen_win.cc')
-rw-r--r--views/screen_win.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/views/screen_win.cc b/views/screen_win.cc
index 7bfeada..82e95e6 100644
--- a/views/screen_win.cc
+++ b/views/screen_win.cc
@@ -25,6 +25,15 @@ gfx::Rect Screen::GetMonitorWorkAreaNearestWindow(gfx::NativeWindow window) {
}
// static
+gfx::Rect Screen::GetMonitorAreaNearestWindow(gfx::NativeWindow window) {
+ MONITORINFO monitor_info;
+ monitor_info.cbSize = sizeof(monitor_info);
+ GetMonitorInfo(MonitorFromWindow(window, MONITOR_DEFAULTTONEAREST),
+ &monitor_info);
+ return gfx::Rect(monitor_info.rcMonitor);
+}
+
+// static
gfx::Rect Screen::GetMonitorAreaNearestPoint(const gfx::Point& point) {
POINT initial_loc = { point.x(), point.y() };
HMONITOR monitor = MonitorFromPoint(initial_loc, MONITOR_DEFAULTTONEAREST);