OLD | NEW |
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/display/screen.h" | 5 #include "ui/display/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/display/display.h" | 10 #include "ui/display/display.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 #else | 35 #else |
36 return [[UIScreen screens] count]; | 36 return [[UIScreen screens] count]; |
37 #endif | 37 #endif |
38 } | 38 } |
39 | 39 |
40 std::vector<Display> GetAllDisplays() const override { | 40 std::vector<Display> GetAllDisplays() const override { |
41 NOTIMPLEMENTED(); | 41 NOTIMPLEMENTED(); |
42 return std::vector<Display>(1, GetPrimaryDisplay()); | 42 return std::vector<Display>(1, GetPrimaryDisplay()); |
43 } | 43 } |
44 | 44 |
| 45 // Returns the display with |display_id|. |
| 46 bool GetDisplayWithDisplayId(int64_t display_id, |
| 47 Display* display) const override { |
| 48 if (display_id == 0) { |
| 49 *display = GetPrimaryDisplay(); |
| 50 return true; |
| 51 } |
| 52 return false; |
| 53 } |
| 54 |
45 // Returns the display nearest the specified window. | 55 // Returns the display nearest the specified window. |
46 Display GetDisplayNearestWindow(gfx::NativeView view) const override { | 56 Display GetDisplayNearestWindow(gfx::NativeView view) const override { |
47 NOTIMPLEMENTED(); | 57 NOTIMPLEMENTED(); |
48 return Display(); | 58 return Display(); |
49 } | 59 } |
50 | 60 |
51 // Returns the the display nearest the specified point. | 61 // Returns the the display nearest the specified point. |
52 Display GetDisplayNearestPoint(const gfx::Point& point) const override { | 62 Display GetDisplayNearestPoint(const gfx::Point& point) const override { |
53 NOTIMPLEMENTED(); | 63 NOTIMPLEMENTED(); |
54 return Display(); | 64 return Display(); |
(...skipping 23 matching lines...) Expand all Loading... |
78 } | 88 } |
79 }; | 89 }; |
80 | 90 |
81 } // namespace | 91 } // namespace |
82 | 92 |
83 Screen* CreateNativeScreen() { | 93 Screen* CreateNativeScreen() { |
84 return new ScreenIos; | 94 return new ScreenIos; |
85 } | 95 } |
86 | 96 |
87 } // namespace gfx | 97 } // namespace gfx |
OLD | NEW |