Chromium Code Reviews| Index: ui/display/screen.h |
| diff --git a/ui/display/screen.h b/ui/display/screen.h |
| index 3bff5bdb6406f2bb5256fb552cb8642c5951b2dd..0c03798c8bbd1bdc8d967744b8b113fc39f05733 100644 |
| --- a/ui/display/screen.h |
| +++ b/ui/display/screen.h |
| @@ -58,7 +58,12 @@ class DISPLAY_EXPORT Screen { |
| // Returns the display nearest the specified window. |
| // If the window is NULL or the window is not rooted to a display this will |
| // return the primary display. |
| - virtual Display GetDisplayNearestWindow(gfx::NativeView view) const = 0; |
| + virtual Display GetDisplayNearestWindow(gfx::NativeWindow window) const = 0; |
| + |
| + // Returns the display nearest the specified view. It may still use the window |
| + // that contains the view (i.e. if a window is spread over two displays, |
| + // the location of the view within that window won't influence the result). |
| + virtual Display GetDisplayNearestView(gfx::NativeView view) const; |
| // Returns the display nearest the specified point. |point| should be in DIPs. |
| virtual Display GetDisplayNearestPoint(const gfx::Point& point) const = 0; |
| @@ -91,6 +96,8 @@ class DISPLAY_EXPORT Screen { |
| bool GetDisplayWithDisplayId(int64_t display_id, Display* display) const; |
| private: |
| + static gfx::NativeWindow WindowForView(gfx::NativeView view); |
|
msw
2017/03/14 23:38:13
optional nit: GetWindowForView?
Jinsuk Kim
2017/03/15 00:46:05
Done.
|
| + |
| DISALLOW_COPY_AND_ASSIGN(Screen); |
| }; |