Index: chrome/browser/ui/cocoa/panels/panel_utils_cocoa.mm |
diff --git a/chrome/browser/ui/cocoa/panels/panel_utils_cocoa.mm b/chrome/browser/ui/cocoa/panels/panel_utils_cocoa.mm |
index a5f173903485ed3790fa9ded08102ee7a8327780..2fe8a56eaa6fd39c0322f95ccda33311f10a2e67 100644 |
--- a/chrome/browser/ui/cocoa/panels/panel_utils_cocoa.mm |
+++ b/chrome/browser/ui/cocoa/panels/panel_utils_cocoa.mm |
@@ -8,7 +8,7 @@ namespace cocoa_utils { |
NSRect ConvertRectToCocoaCoordinates(const gfx::Rect& bounds) { |
// Flip coordinates based on the primary screen. |
- NSScreen* screen = [[NSScreen screens] objectAtIndex:0]; |
+ NSScreen* screen = [[NSScreen screens] firstObject]; |
return NSMakeRect( |
bounds.x(), NSHeight([screen frame]) - bounds.height() - bounds.y(), |
@@ -17,7 +17,7 @@ NSRect ConvertRectToCocoaCoordinates(const gfx::Rect& bounds) { |
gfx::Rect ConvertRectFromCocoaCoordinates(NSRect bounds) { |
// Flip coordinates based on the primary screen. |
- NSScreen* screen = [[NSScreen screens] objectAtIndex:0]; |
+ NSScreen* screen = [[NSScreen screens] firstObject]; |
return gfx::Rect( |
NSMinX(bounds), NSHeight([screen frame]) - NSMaxY(bounds), |
@@ -26,14 +26,14 @@ gfx::Rect ConvertRectFromCocoaCoordinates(NSRect bounds) { |
NSPoint ConvertPointToCocoaCoordinates(const gfx::Point& point) { |
// Flip coordinates based on the primary screen. |
- NSScreen* screen = [[NSScreen screens] objectAtIndex:0]; |
+ NSScreen* screen = [[NSScreen screens] firstObject]; |
return NSMakePoint(point.x(), NSHeight([screen frame]) - point.y()); |
} |
gfx::Point ConvertPointFromCocoaCoordinates(NSPoint point) { |
// Flip coordinates based on the primary screen. |
- NSScreen* screen = [[NSScreen screens] objectAtIndex:0]; |
+ NSScreen* screen = [[NSScreen screens] firstObject]; |
return gfx::Point(point.x, NSHeight([screen frame]) - point.y); |
} |