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

Unified Diff: content/browser/web_contents/web_contents_view_mac.mm

Issue 1380083005: Mac: Use [NSArray firstObject] for [NSScreen screens] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
Index: content/browser/web_contents/web_contents_view_mac.mm
diff --git a/content/browser/web_contents/web_contents_view_mac.mm b/content/browser/web_contents/web_contents_view_mac.mm
index 9e1f7925e214ceeeb74a84f3fe4ef3e6609e5809..5588f1f82832e56928c177d98517ecd3e4b10481 100644
--- a/content/browser/web_contents/web_contents_view_mac.mm
+++ b/content/browser/web_contents/web_contents_view_mac.mm
@@ -122,7 +122,7 @@ void WebContentsViewMac::GetContainerBounds(gfx::Rect* out) const {
bounds.origin = [window convertBaseToScreen:bounds.origin];
// Flip y to account for screen flip.
- NSScreen* screen = [[NSScreen screens] objectAtIndex:0];
+ NSScreen* screen = [[NSScreen screens] firstObject];
bounds.origin.y = [screen frame].size.height - bounds.origin.y
- bounds.size.height;
*out = gfx::Rect(NSRectToCGRect(bounds));
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.mm ('k') | content/public/test/content_browser_test_utils_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698