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

Unified Diff: ui/gfx/screen_mac.mm

Issue 10537067: mac: Basic HighDPI implementation for web contents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: done Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_widget.cc ('k') | ui/gfx/screen_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/screen_mac.mm
diff --git a/ui/gfx/screen_mac.mm b/ui/gfx/screen_mac.mm
index 0bbed902472f7a0cad530a0ed400d15210241a0b..a7957c2607be76d9aad82e9ce56c00e598a68614 100644
--- a/ui/gfx/screen_mac.mm
+++ b/ui/gfx/screen_mac.mm
@@ -89,6 +89,15 @@ gfx::Point Screen::GetCursorScreenPoint() {
}
// static
+gfx::Monitor Screen::GetMonitorNearestWindow(gfx::NativeView view) {
Avi (use Gerrit) 2012/06/08 14:41:43 GetMonitorNearestWindow takes a view!?
Nico 2012/06/08 14:43:05 Yeah :-/
+ NSWindow* window = [view window];
+ if (!window)
+ return GetPrimaryMonitor();
+ NSScreen* match_screen = [window screen];
+ return GetMonitorForScreen(match_screen, false /* may not be primary */);
+}
+
+// static
gfx::Monitor Screen::GetPrimaryMonitor() {
// Primary monitor is defined as the monitor with the menubar,
// which is always at index 0.
« no previous file with comments | « content/renderer/render_widget.cc ('k') | ui/gfx/screen_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698