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

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

Issue 1638413007: Use list instead of pair to represent the set of displays. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix build error Created 4 years, 10 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 void MoveCursorTo(AshWindowTreeHost* ash_host, 82 void MoveCursorTo(AshWindowTreeHost* ash_host,
83 const gfx::Point& point_in_screen, 83 const gfx::Point& point_in_screen,
84 bool update_last_location_now); 84 bool update_last_location_now);
85 85
86 // Returns the index in the displays whose bounds contains |point_in_screen|. 86 // Returns the index in the displays whose bounds contains |point_in_screen|.
87 // Returns -1 if no such display exist. 87 // Returns -1 if no such display exist.
88 ASH_EXPORT int FindDisplayIndexContainingPoint( 88 ASH_EXPORT int FindDisplayIndexContainingPoint(
89 const std::vector<gfx::Display>& displays, 89 const std::vector<gfx::Display>& displays,
90 const gfx::Point& point_in_screen); 90 const gfx::Point& point_in_screen);
91 91
92 // Creates the DisplayIdPair where ids are sorted using |CompareDisplayIds| 92 // Creates the DisplayIdList where ids are sorted using |CompareDisplayIds|
93 // below. 93 // below.
94 ASH_EXPORT DisplayIdPair CreateDisplayIdPair(int64_t id1, int64_t id2); 94 ASH_EXPORT DisplayIdList CreateDisplayIdList(int64_t id1, int64_t id2);
95
96 ASH_EXPORT std::string DisplayIdListToString(const DisplayIdList& list);
95 97
96 // Returns true if one of following conditinos is met. 98 // Returns true if one of following conditinos is met.
97 // 1) id1 is internal. 99 // 1) id1 is internal.
98 // 2) output index of id1 < output index of id2 and id2 isn't internal. 100 // 2) output index of id1 < output index of id2 and id2 isn't internal.
99 ASH_EXPORT bool CompareDisplayIds(int64_t id1, int64_t id2); 101 ASH_EXPORT bool CompareDisplayIds(int64_t id1, int64_t id2);
100 102
101 } // namespace ash 103 } // namespace ash
102 104
103 #endif // ASH_DISPLAY_DISPLAY_UTIL_H_ 105 #endif // ASH_DISPLAY_DISPLAY_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698