| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 // Computes the bounds that defines the bounds between two displays | 35 // Computes the bounds that defines the bounds between two displays |
| 36 // based on the layout |position|. | 36 // based on the layout |position|. |
| 37 void ComputeBoundary(const gfx::Display& primary_display, | 37 void ComputeBoundary(const gfx::Display& primary_display, |
| 38 const gfx::Display& secondary_display, | 38 const gfx::Display& secondary_display, |
| 39 DisplayLayout::Position position, | 39 DisplayLayout::Position position, |
| 40 gfx::Rect* primary_edge_in_screen, | 40 gfx::Rect* primary_edge_in_screen, |
| 41 gfx::Rect* secondary_edge_in_screen); | 41 gfx::Rect* secondary_edge_in_screen); |
| 42 | 42 |
| 43 // Creates edge bounds from |bounds_in_screen| that fits the edge | 43 // Creates edge bounds from |bounds_in_screen| that fits the edge |
| 44 // of the native window for |ash_host|. | 44 // of the native window for |ash_host|. |
| 45 gfx::Rect GetNativeEdgeBounds(AshWindowTreeHost* ash_host, | 45 ASH_EXPORT gfx::Rect GetNativeEdgeBounds(AshWindowTreeHost* ash_host, |
| 46 const gfx::Rect& bounds_in_screen); | 46 const gfx::Rect& bounds_in_screen); |
| 47 | 47 |
| 48 // Moves the cursor to the point inside the |ash_host| that is closest to | 48 // Moves the cursor to the point inside the |ash_host| that is closest to |
| 49 // the point_in_screen, which may be outside of the root window. | 49 // the point_in_screen, which may be outside of the root window. |
| 50 // |update_last_loation_now| is used for the test to update the mouse | 50 // |update_last_loation_now| is used for the test to update the mouse |
| 51 // location synchronously. | 51 // location synchronously. |
| 52 void MoveCursorTo(AshWindowTreeHost* ash_host, | 52 void MoveCursorTo(AshWindowTreeHost* ash_host, |
| 53 const gfx::Point& point_in_screen, | 53 const gfx::Point& point_in_screen, |
| 54 bool update_last_location_now); | 54 bool update_last_location_now); |
| 55 | 55 |
| 56 // Returns the index in the displays whose bounds contains |point_in_screen|. | 56 // Returns the index in the displays whose bounds contains |point_in_screen|. |
| 57 // Returns -1 if no such display exist. | 57 // Returns -1 if no such display exist. |
| 58 ASH_EXPORT int FindDisplayIndexContainingPoint( | 58 ASH_EXPORT int FindDisplayIndexContainingPoint( |
| 59 const std::vector<gfx::Display>& displays, | 59 const std::vector<gfx::Display>& displays, |
| 60 const gfx::Point& point_in_screen); | 60 const gfx::Point& point_in_screen); |
| 61 | 61 |
| 62 } // namespace ash | 62 } // namespace ash |
| 63 | 63 |
| 64 #endif // ASH_DISPLAY_DISPLAY_UTIL_H_ | 64 #endif // ASH_DISPLAY_DISPLAY_UTIL_H_ |
| OLD | NEW |