| 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 <ApplicationServices/ApplicationServices.h> | 7 #import <ApplicationServices/ApplicationServices.h> |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 ~ScreenMac() override { | 88 ~ScreenMac() override { |
| 89 CGDisplayRemoveReconfigurationCallback( | 89 CGDisplayRemoveReconfigurationCallback( |
| 90 ScreenMac::DisplayReconfigurationCallBack, this); | 90 ScreenMac::DisplayReconfigurationCallBack, this); |
| 91 } | 91 } |
| 92 | 92 |
| 93 gfx::Point GetCursorScreenPoint() override { | 93 gfx::Point GetCursorScreenPoint() override { |
| 94 // Flip coordinates to gfx (0,0 in top-left corner) using primary screen. | 94 // Flip coordinates to gfx (0,0 in top-left corner) using primary screen. |
| 95 return gfx::ScreenPointFromNSPoint([NSEvent mouseLocation]); | 95 return gfx::ScreenPointFromNSPoint([NSEvent mouseLocation]); |
| 96 } | 96 } |
| 97 | 97 |
| 98 gfx::NativeWindow GetWindowUnderCursor() override { | 98 bool IsWindowUnderCursor(gfx::NativeWindow window) override { |
| 99 NOTIMPLEMENTED(); | 99 NOTIMPLEMENTED(); |
| 100 return gfx::NativeWindow(); | 100 return false; |
| 101 } | 101 } |
| 102 | 102 |
| 103 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override { | 103 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override { |
| 104 NOTIMPLEMENTED(); | 104 NOTIMPLEMENTED(); |
| 105 return gfx::NativeWindow(); | 105 return gfx::NativeWindow(); |
| 106 } | 106 } |
| 107 | 107 |
| 108 int GetNumDisplays() const override { return GetAllDisplays().size(); } | 108 int GetNumDisplays() const override { return GetAllDisplays().size(); } |
| 109 | 109 |
| 110 std::vector<gfx::Display> GetAllDisplays() const override { | 110 std::vector<gfx::Display> GetAllDisplays() const override { |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 | 260 |
| 261 namespace gfx { | 261 namespace gfx { |
| 262 | 262 |
| 263 #if !defined(USE_AURA) | 263 #if !defined(USE_AURA) |
| 264 Screen* CreateNativeScreen() { | 264 Screen* CreateNativeScreen() { |
| 265 return new ScreenMac; | 265 return new ScreenMac; |
| 266 } | 266 } |
| 267 #endif | 267 #endif |
| 268 | 268 |
| 269 } | 269 } |
| OLD | NEW |