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

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

Issue 1935083003: gfx::Screen: Replace GetWindowUnderCursor() with IsWindowUnderCursor(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Null checks Created 4 years, 7 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 unified diff | Download patch
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 <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
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
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 }
OLDNEW
« no previous file with comments | « ui/gfx/screen_ios.mm ('k') | ui/gfx/test/test_screen.h » ('j') | ui/views/mus/screen_mus.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698