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

Unified Diff: ui/gfx/screen_ios.mm

Issue 256813002: Use [UIScreen mainScreen] instead of [[UIScreen screens] objectAtIndex:0]. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/screen_ios.mm
diff --git a/ui/gfx/screen_ios.mm b/ui/gfx/screen_ios.mm
index a2770298ca8bf03470d9ba66048b9044c0f4d0da..f630f00a9f04740d20bea44f922b22f7a380af73 100644
--- a/ui/gfx/screen_ios.mm
+++ b/ui/gfx/screen_ios.mm
@@ -69,7 +69,8 @@ class ScreenIos : public gfx::Screen {
// Returns the primary display.
virtual gfx::Display GetPrimaryDisplay() const OVERRIDE {
- UIScreen* mainScreen = [[UIScreen screens] objectAtIndex:0];
+ UIScreen* mainScreen = [UIScreen mainScreen];
+ CHECK(mainScreen);
gfx::Display display(0, gfx::Rect(mainScreen.bounds));
display.set_device_scale_factor([mainScreen scale]);
return display;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698