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

Unified Diff: ui/display/display_finder.h

Issue 2730413002: Moves FindDisplayIndexContainingPoint into display (Closed)
Patch Set: cleanup Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/display/unified_mouse_warp_controller_unittest.cc ('k') | ui/display/display_finder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/display_finder.h
diff --git a/ui/display/display_finder.h b/ui/display/display_finder.h
index d63925923c77b719100caffa4917b16424065598..7381b15e18ef79470f1746bd64e2fcd324e2903e 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,13 @@ DISPLAY_EXPORT const Display* FindDisplayWithBiggestIntersection(
const std::vector<Display>& displays,
const gfx::Rect& rect);
+// Returns an iterator into |displays| of the Display whose bounds contains
+// |point_in_screen|, or displays.end() if no Displays contains
+// |point_in_screen|.
+DISPLAY_EXPORT std::vector<Display>::const_iterator FindDisplayContainingPoint(
+ const std::vector<Display>& displays,
+ const gfx::Point& point_in_screen);
+
} // namespace display
#endif // UI_DISPLAY_DISPLAY_FINDER_H_
« no previous file with comments | « ash/display/unified_mouse_warp_controller_unittest.cc ('k') | ui/display/display_finder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698