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

Side by Side Diff: ash/display/display_util.h

Issue 1823913002: Allow moving cursors between connected displays. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 ASH_DISPLAY_DISPLAY_UTIL_H_ 5 #ifndef ASH_DISPLAY_DISPLAY_UTIL_H_
6 #define ASH_DISPLAY_DISPLAY_UTIL_H_ 6 #define ASH_DISPLAY_DISPLAY_UTIL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 DisplayMode* out); 56 DisplayMode* out);
57 57
58 // Sets the UI scale for the |display_id|. Returns false if the 58 // Sets the UI scale for the |display_id|. Returns false if the
59 // display_id is not an internal display. 59 // display_id is not an internal display.
60 ASH_EXPORT bool SetDisplayUIScale(int64_t display_id, float scale); 60 ASH_EXPORT bool SetDisplayUIScale(int64_t display_id, float scale);
61 61
62 // Tests if the |info| has display mode that matches |ui_scale|. 62 // Tests if the |info| has display mode that matches |ui_scale|.
63 bool HasDisplayModeForUIScale(const DisplayInfo& info, float ui_scale); 63 bool HasDisplayModeForUIScale(const DisplayInfo& info, float ui_scale);
64 64
65 // Computes the bounds that defines the bounds between two displays. 65 // Computes the bounds that defines the bounds between two displays.
66 void ComputeBoundary(const gfx::Display& primary_display, 66 // Returns false if two displays does not intersect.
stevenjb 2016/03/24 18:08:29 nit: s/does not/do not/
oshima 2016/03/24 20:37:19 Done.
67 bool ComputeBoundary(const gfx::Display& primary_display,
67 const gfx::Display& secondary_display, 68 const gfx::Display& secondary_display,
68 gfx::Rect* primary_edge_in_screen, 69 gfx::Rect* primary_edge_in_screen,
69 gfx::Rect* secondary_edge_in_screen); 70 gfx::Rect* secondary_edge_in_screen);
70 71
71 // Creates edge bounds from |bounds_in_screen| that fits the edge 72 // Creates edge bounds from |bounds_in_screen| that fits the edge
72 // of the native window for |ash_host|. 73 // of the native window for |ash_host|.
73 ASH_EXPORT gfx::Rect GetNativeEdgeBounds(AshWindowTreeHost* ash_host, 74 ASH_EXPORT gfx::Rect GetNativeEdgeBounds(AshWindowTreeHost* ash_host,
74 const gfx::Rect& bounds_in_screen); 75 const gfx::Rect& bounds_in_screen);
75 76
76 // Moves the cursor to the point inside the |ash_host| that is closest to 77 // Moves the cursor to the point inside the |ash_host| that is closest to
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 ASH_EXPORT std::string DisplayIdListToString(const DisplayIdList& list); 117 ASH_EXPORT std::string DisplayIdListToString(const DisplayIdList& list);
117 118
118 // Returns true if one of following conditinos is met. 119 // Returns true if one of following conditinos is met.
119 // 1) id1 is internal. 120 // 1) id1 is internal.
120 // 2) output index of id1 < output index of id2 and id2 isn't internal. 121 // 2) output index of id1 < output index of id2 and id2 isn't internal.
121 ASH_EXPORT bool CompareDisplayIds(int64_t id1, int64_t id2); 122 ASH_EXPORT bool CompareDisplayIds(int64_t id1, int64_t id2);
122 123
123 } // namespace ash 124 } // namespace ash
124 125
125 #endif // ASH_DISPLAY_DISPLAY_UTIL_H_ 126 #endif // ASH_DISPLAY_DISPLAY_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698