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

Side by Side Diff: ui/gfx/screen.h

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 #ifndef UI_GFX_SCREEN_H_ 5 #ifndef UI_GFX_SCREEN_H_
6 #define UI_GFX_SCREEN_H_ 6 #define UI_GFX_SCREEN_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 21 matching lines...) Expand all
32 // Retrieves the single Screen object. 32 // Retrieves the single Screen object.
33 static Screen* GetScreen(); 33 static Screen* GetScreen();
34 34
35 // Sets the global screen. NOTE: this does not take ownership of |screen|. 35 // Sets the global screen. NOTE: this does not take ownership of |screen|.
36 // Tests must be sure to reset any state they install. 36 // Tests must be sure to reset any state they install.
37 static void SetScreenInstance(Screen* instance); 37 static void SetScreenInstance(Screen* instance);
38 38
39 // Returns the current absolute position of the mouse pointer. 39 // Returns the current absolute position of the mouse pointer.
40 virtual gfx::Point GetCursorScreenPoint() = 0; 40 virtual gfx::Point GetCursorScreenPoint() = 0;
41 41
42 // Returns the window under the cursor. 42 // Returns true if the cursor is directly over |window|.
43 virtual gfx::NativeWindow GetWindowUnderCursor() = 0; 43 virtual bool IsWindowUnderCursor(gfx::NativeWindow window) = 0;
44 44
45 // Returns the window at the given screen coordinate |point|. 45 // Returns the window at the given screen coordinate |point|.
46 virtual gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) = 0; 46 virtual gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) = 0;
47 47
48 // Returns the number of displays. 48 // Returns the number of displays.
49 // Mirrored displays are excluded; this method is intended to return the 49 // Mirrored displays are excluded; this method is intended to return the
50 // number of distinct, usable displays. 50 // number of distinct, usable displays.
51 virtual int GetNumDisplays() const = 0; 51 virtual int GetNumDisplays() const = 0;
52 52
53 // Returns the list of displays that are currently available. 53 // Returns the list of displays that are currently available.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 private: 88 private:
89 DISALLOW_COPY_AND_ASSIGN(Screen); 89 DISALLOW_COPY_AND_ASSIGN(Screen);
90 }; 90 };
91 91
92 Screen* CreateNativeScreen(); 92 Screen* CreateNativeScreen();
93 93
94 } // namespace gfx 94 } // namespace gfx
95 95
96 #endif // UI_GFX_SCREEN_H_ 96 #endif // UI_GFX_SCREEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698