| 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/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" |
| 11 | 11 |
| 12 namespace { | 12 namespace { |
| 13 | 13 |
| 14 class ScreenIos : public gfx::Screen { | 14 class ScreenIos : public gfx::Screen { |
| 15 gfx::Point GetCursorScreenPoint() override { | 15 gfx::Point GetCursorScreenPoint() override { |
| 16 NOTIMPLEMENTED(); | 16 NOTIMPLEMENTED(); |
| 17 return gfx::Point(0, 0); | 17 return gfx::Point(0, 0); |
| 18 } | 18 } |
| 19 | 19 |
| 20 gfx::NativeWindow GetWindowUnderCursor() override { | 20 bool IsWindowUnderCursor(gfx::NativeWindow window) override { |
| 21 NOTIMPLEMENTED(); | 21 NOTIMPLEMENTED(); |
| 22 return gfx::NativeWindow(); | 22 return false; |
| 23 } | 23 } |
| 24 | 24 |
| 25 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override { | 25 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override { |
| 26 NOTIMPLEMENTED(); | 26 NOTIMPLEMENTED(); |
| 27 return gfx::NativeWindow(); | 27 return gfx::NativeWindow(); |
| 28 } | 28 } |
| 29 | 29 |
| 30 int GetNumDisplays() const override { | 30 int GetNumDisplays() const override { |
| 31 #if TARGET_IPHONE_SIMULATOR | 31 #if TARGET_IPHONE_SIMULATOR |
| 32 // UIScreen does not reliably return correct results on the simulator. | 32 // UIScreen does not reliably return correct results on the simulator. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 | 79 |
| 80 } // namespace | 80 } // namespace |
| 81 | 81 |
| 82 namespace gfx { | 82 namespace gfx { |
| 83 | 83 |
| 84 Screen* CreateNativeScreen() { | 84 Screen* CreateNativeScreen() { |
| 85 return new ScreenIos; | 85 return new ScreenIos; |
| 86 } | 86 } |
| 87 | 87 |
| 88 } // namespace gfx | 88 } // namespace gfx |
| OLD | NEW |