Chromium Code Reviews| Index: ui/display/display_finder.h |
| diff --git a/ui/display/display_finder.h b/ui/display/display_finder.h |
| index d63925923c77b719100caffa4917b16424065598..b66f044f5cc6a151b02fd482d10a9ef9418e2e21 100644 |
| --- a/ui/display/display_finder.h |
| +++ b/ui/display/display_finder.h |
| @@ -17,7 +17,8 @@ class Rect; |
| namespace display { |
| class Display; |
| -// Returns the display in |displays| closest to |point|. |
| +// Returns the display containing |point|. If no displays contain |point|, then |
| +// this returns the display closest to |point|. |
| DISPLAY_EXPORT const Display* FindDisplayNearestPoint( |
| const std::vector<Display>& displays, |
| const gfx::Point& point); |
| @@ -28,6 +29,12 @@ DISPLAY_EXPORT const Display* FindDisplayWithBiggestIntersection( |
| const std::vector<Display>& displays, |
| const gfx::Rect& rect); |
| +// Returns the index in |displays| whose bounds contains |point_in_screen|. |
| +// Returns -1 if no such Display contains |point_in_screen|. |
| +DISPLAY_EXPORT int FindDisplayIndexContainingPoint( |
|
kylechar
2017/03/06 18:00:20
Would it be "more" correct to return an iterator i
sky
2017/03/06 18:22:00
I just copy/pasted the code. But I agree, an itera
|
| + const std::vector<Display>& displays, |
| + const gfx::Point& point_in_screen); |
| + |
| } // namespace display |
| #endif // UI_DISPLAY_DISPLAY_FINDER_H_ |