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

Side by Side Diff: ui/gfx/screen_ios.mm

Issue 11363124: Move DisplayManager and DisplayChangeObserverX11 from aura to ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix rebase Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/gfx/screen_gtk.cc ('k') | ui/gfx/screen_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/gfx/screen.h" 5 #include "ui/gfx/screen.h"
6 6
7 #import <UIKit/UIKit.h> 7 #import <UIKit/UIKit.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "ui/gfx/display.h" 10 #include "ui/gfx/display.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 return gfx::Display(); 56 return gfx::Display();
57 } 57 }
58 58
59 // Returns the primary display. 59 // Returns the primary display.
60 virtual gfx::Display GetPrimaryDisplay() const OVERRIDE { 60 virtual gfx::Display GetPrimaryDisplay() const OVERRIDE {
61 UIScreen* mainScreen = [[UIScreen screens] objectAtIndex:0]; 61 UIScreen* mainScreen = [[UIScreen screens] objectAtIndex:0];
62 gfx::Display display(0, gfx::Rect(mainScreen.bounds)); 62 gfx::Display display(0, gfx::Rect(mainScreen.bounds));
63 display.set_device_scale_factor([mainScreen scale]); 63 display.set_device_scale_factor([mainScreen scale]);
64 return display; 64 return display;
65 } 65 }
66
67 virtual void AddObserver(gfx::DisplayObserver* observer) OVERRIDE {
68 // no display change on iOS.
69 }
70
71 virtual void RemoveObserver(gfx::DisplayObserver* observer) OVERRIDE {
72 // no display change on iOS.
73 }
66 }; 74 };
67 75
68 } // namespace 76 } // namespace
69 77
70 namespace gfx { 78 namespace gfx {
71 79
72 Screen* CreateNativeScreen() { 80 Screen* CreateNativeScreen() {
73 return new ScreenIos; 81 return new ScreenIos;
74 } 82 }
75 83
76 } // namespace gfx 84 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/screen_gtk.cc ('k') | ui/gfx/screen_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698