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

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

Issue 1540753002: Switch to standard integer types in ash/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: arraysize Created 5 years 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/display_manager_unittest.cc ('k') | ash/display/display_util.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 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>
9
8 #include <set> 10 #include <set>
9 #include <utility> 11 #include <utility>
10 #include <vector> 12 #include <vector>
11 13
12 #include "ash/ash_export.h" 14 #include "ash/ash_export.h"
13 #include "ash/display/display_layout.h" 15 #include "ash/display/display_layout.h"
14 16
15 namespace gfx { 17 namespace gfx {
16 class Display; 18 class Display;
17 class Point; 19 class Point;
(...skipping 30 matching lines...) Expand all
48 DisplayMode* out); 50 DisplayMode* out);
49 51
50 // Gets the display mode for the next valid resolution. Returns false 52 // Gets the display mode for the next valid resolution. Returns false
51 // if the display is an internal display. 53 // if the display is an internal display.
52 ASH_EXPORT bool GetDisplayModeForNextResolution(const DisplayInfo& info, 54 ASH_EXPORT bool GetDisplayModeForNextResolution(const DisplayInfo& info,
53 bool up, 55 bool up,
54 DisplayMode* out); 56 DisplayMode* out);
55 57
56 // 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
57 // display_id is not an internal display. 59 // display_id is not an internal display.
58 ASH_EXPORT bool SetDisplayUIScale(int64 display_id, float scale); 60 ASH_EXPORT bool SetDisplayUIScale(int64_t display_id, float scale);
59 61
60 // Tests if the |info| has display mode that matches |ui_scale|. 62 // Tests if the |info| has display mode that matches |ui_scale|.
61 bool HasDisplayModeForUIScale(const DisplayInfo& info, float ui_scale); 63 bool HasDisplayModeForUIScale(const DisplayInfo& info, float ui_scale);
62 64
63 // Computes the bounds that defines the bounds between two displays 65 // Computes the bounds that defines the bounds between two displays
64 // based on the layout |position|. 66 // based on the layout |position|.
65 void ComputeBoundary(const gfx::Display& primary_display, 67 void ComputeBoundary(const gfx::Display& primary_display,
66 const gfx::Display& secondary_display, 68 const gfx::Display& secondary_display,
67 DisplayLayout::Position position, 69 DisplayLayout::Position position,
68 gfx::Rect* primary_edge_in_screen, 70 gfx::Rect* primary_edge_in_screen,
(...skipping 13 matching lines...) Expand all
82 bool update_last_location_now); 84 bool update_last_location_now);
83 85
84 // 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|.
85 // Returns -1 if no such display exist. 87 // Returns -1 if no such display exist.
86 ASH_EXPORT int FindDisplayIndexContainingPoint( 88 ASH_EXPORT int FindDisplayIndexContainingPoint(
87 const std::vector<gfx::Display>& displays, 89 const std::vector<gfx::Display>& displays,
88 const gfx::Point& point_in_screen); 90 const gfx::Point& point_in_screen);
89 91
90 // Creates the DisplayIdPair where ids are sorted using |CompareDisplayIds| 92 // Creates the DisplayIdPair where ids are sorted using |CompareDisplayIds|
91 // below. 93 // below.
92 ASH_EXPORT DisplayIdPair CreateDisplayIdPair(int64 id1, int64 id2); 94 ASH_EXPORT DisplayIdPair CreateDisplayIdPair(int64_t id1, int64_t id2);
93 95
94 // Returns true if one of following conditinos is met. 96 // Returns true if one of following conditinos is met.
95 // 1) id1 is internal. 97 // 1) id1 is internal.
96 // 2) output index of id1 < output index of id2 and id2 isn't internal. 98 // 2) output index of id1 < output index of id2 and id2 isn't internal.
97 ASH_EXPORT bool CompareDisplayIds(int64 id1, int64 id2); 99 ASH_EXPORT bool CompareDisplayIds(int64_t id1, int64_t id2);
98 100
99 } // namespace ash 101 } // namespace ash
100 102
101 #endif // ASH_DISPLAY_DISPLAY_UTIL_H_ 103 #endif // ASH_DISPLAY_DISPLAY_UTIL_H_
OLDNEW
« no previous file with comments | « ash/display/display_manager_unittest.cc ('k') | ash/display/display_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698