| OLD | NEW |
| 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 Loading... |
| 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 // Returns false if two displays does not intersect. | 66 // Returns false if two displays do not intersect. |
| 67 bool ComputeBoundary(const gfx::Display& primary_display, | 67 bool ComputeBoundary(const gfx::Display& primary_display, |
| 68 const gfx::Display& secondary_display, | 68 const gfx::Display& secondary_display, |
| 69 gfx::Rect* primary_edge_in_screen, | 69 gfx::Rect* primary_edge_in_screen, |
| 70 gfx::Rect* secondary_edge_in_screen); | 70 gfx::Rect* secondary_edge_in_screen); |
| 71 | 71 |
| 72 // Creates edge bounds from |bounds_in_screen| that fits the edge | 72 // Creates edge bounds from |bounds_in_screen| that fits the edge |
| 73 // of the native window for |ash_host|. | 73 // of the native window for |ash_host|. |
| 74 ASH_EXPORT gfx::Rect GetNativeEdgeBounds(AshWindowTreeHost* ash_host, | 74 ASH_EXPORT gfx::Rect GetNativeEdgeBounds(AshWindowTreeHost* ash_host, |
| 75 const gfx::Rect& bounds_in_screen); | 75 const gfx::Rect& bounds_in_screen); |
| 76 | 76 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 ASH_EXPORT std::string DisplayIdListToString(const DisplayIdList& list); | 117 ASH_EXPORT std::string DisplayIdListToString(const DisplayIdList& list); |
| 118 | 118 |
| 119 // Returns true if one of following conditinos is met. | 119 // Returns true if one of following conditinos is met. |
| 120 // 1) id1 is internal. | 120 // 1) id1 is internal. |
| 121 // 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. |
| 122 ASH_EXPORT bool CompareDisplayIds(int64_t id1, int64_t id2); | 122 ASH_EXPORT bool CompareDisplayIds(int64_t id1, int64_t id2); |
| 123 | 123 |
| 124 } // namespace ash | 124 } // namespace ash |
| 125 | 125 |
| 126 #endif // ASH_DISPLAY_DISPLAY_UTIL_H_ | 126 #endif // ASH_DISPLAY_DISPLAY_UTIL_H_ |
| OLD | NEW |