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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_DISPLAY_DISPLAY_FINDER_H_ 5 #ifndef UI_DISPLAY_DISPLAY_FINDER_H_
6 #define UI_DISPLAY_DISPLAY_FINDER_H_ 6 #define UI_DISPLAY_DISPLAY_FINDER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "ui/display/display_export.h" 10 #include "ui/display/display_export.h"
11 11
12 namespace gfx { 12 namespace gfx {
13 class Point; 13 class Point;
14 class Rect; 14 class Rect;
15 } 15 }
16 16
17 namespace display { 17 namespace display {
18 class Display; 18 class Display;
19 19
20 // Returns the display in |displays| closest to |point|. 20 // Returns the display containing |point|. If no displays contain |point|, then
21 // this returns the display closest to |point|.
21 DISPLAY_EXPORT const Display* FindDisplayNearestPoint( 22 DISPLAY_EXPORT const Display* FindDisplayNearestPoint(
22 const std::vector<Display>& displays, 23 const std::vector<Display>& displays,
23 const gfx::Point& point); 24 const gfx::Point& point);
24 25
25 // Returns the display in |displays| with the biggest intersection of |rect|. 26 // Returns the display in |displays| with the biggest intersection of |rect|.
26 // If none of the displays intersect |rect| null is returned. 27 // If none of the displays intersect |rect| null is returned.
27 DISPLAY_EXPORT const Display* FindDisplayWithBiggestIntersection( 28 DISPLAY_EXPORT const Display* FindDisplayWithBiggestIntersection(
28 const std::vector<Display>& displays, 29 const std::vector<Display>& displays,
29 const gfx::Rect& rect); 30 const gfx::Rect& rect);
30 31
32 // Returns an iterator into |displays| of the Display whose bounds contains
33 // |point_in_screen|, or displays.end() if no Displays contains
34 // |point_in_screen|.
35 DISPLAY_EXPORT std::vector<Display>::const_iterator FindDisplayContainingPoint(
36 const std::vector<Display>& displays,
37 const gfx::Point& point_in_screen);
38
31 } // namespace display 39 } // namespace display
32 40
33 #endif // UI_DISPLAY_DISPLAY_FINDER_H_ 41 #endif // UI_DISPLAY_DISPLAY_FINDER_H_
OLDNEW
« 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