| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CHROME_BROWSER_UI_APP_LIST_APP_LIST_POSITIONER_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_POSITIONER_H_ |
| 6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_POSITIONER_H_ | 6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_POSITIONER_H_ |
| 7 | 7 |
| 8 #include "ui/gfx/display.h" | 8 #include "ui/gfx/display.h" |
| 9 #include "ui/gfx/size.h" | 9 #include "ui/gfx/size.h" |
| 10 | 10 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 // anchor point will potentially position the window under it. | 61 // anchor point will potentially position the window under it. |
| 62 gfx::Point GetAnchorPointForScreenCorner(ScreenCorner corner) const; | 62 gfx::Point GetAnchorPointForScreenCorner(ScreenCorner corner) const; |
| 63 | 63 |
| 64 // Finds the position for a window to anchor it to the corner of the shelf. | 64 // Finds the position for a window to anchor it to the corner of the shelf. |
| 65 // The window will be aligned to the left of the work area for horizontal | 65 // The window will be aligned to the left of the work area for horizontal |
| 66 // shelves, or to the top for vertical shelves. |shelf_edge| specifies the | 66 // shelves, or to the top for vertical shelves. |shelf_edge| specifies the |
| 67 // location of the shelf. |shelf_edge| must not be SCREEN_EDGE_UNKNOWN. | 67 // location of the shelf. |shelf_edge| must not be SCREEN_EDGE_UNKNOWN. |
| 68 // Returns the intended coordinates for the center of the window. | 68 // Returns the intended coordinates for the center of the window. |
| 69 gfx::Point GetAnchorPointForShelfCorner(ScreenEdge shelf_edge) const; | 69 gfx::Point GetAnchorPointForShelfCorner(ScreenEdge shelf_edge) const; |
| 70 | 70 |
| 71 // Finds the position for a window to anchor it to the center of the shelf. |
| 72 // |shelf_edge| specifies the location of the shelf. It must not be |
| 73 // SCREEN_EDGE_UNKNOWN. Returns the intended coordinates for the center of the |
| 74 // window. |
| 75 gfx::Point GetAnchorPointForShelfCenter(ScreenEdge shelf_edge) const; |
| 76 |
| 71 // Finds the position for a window to anchor it to the shelf at a point | 77 // Finds the position for a window to anchor it to the shelf at a point |
| 72 // closest to the user's mouse cursor. |shelf_edge| specifies the location of | 78 // closest to the user's mouse cursor. |shelf_edge| specifies the location of |
| 73 // the shelf; |cursor| specifies the location of the user's mouse cursor. | 79 // the shelf; |cursor| specifies the location of the user's mouse cursor. |
| 74 // |shelf_edge| must not be SCREEN_EDGE_UNKNOWN. Returns the intended | 80 // |shelf_edge| must not be SCREEN_EDGE_UNKNOWN. Returns the intended |
| 75 // coordinates for the center of the window. | 81 // coordinates for the center of the window. |
| 76 gfx::Point GetAnchorPointForShelfCursor(ScreenEdge shelf_edge, | 82 gfx::Point GetAnchorPointForShelfCursor(ScreenEdge shelf_edge, |
| 77 const gfx::Point& cursor) const; | 83 const gfx::Point& cursor) const; |
| 78 | 84 |
| 79 // Determines which edge of the screen the shelf is attached to. Returns | 85 // Determines which edge of the screen the shelf is attached to. Returns |
| 80 // SCREEN_EDGE_UNKNOWN if the shelf is unavailable, hidden, or not on the | 86 // SCREEN_EDGE_UNKNOWN if the shelf is unavailable, hidden, or not on the |
| (...skipping 16 matching lines...) Expand all Loading... |
| 97 | 103 |
| 98 // Size of the App List. | 104 // Size of the App List. |
| 99 gfx::Size window_size_; | 105 gfx::Size window_size_; |
| 100 | 106 |
| 101 // The minimum distance, in pixels, to position the app list from the shelf | 107 // The minimum distance, in pixels, to position the app list from the shelf |
| 102 // or edge of screen. | 108 // or edge of screen. |
| 103 int min_distance_from_edge_; | 109 int min_distance_from_edge_; |
| 104 }; | 110 }; |
| 105 | 111 |
| 106 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_POSITIONER_H_ | 112 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_POSITIONER_H_ |
| OLD | NEW |