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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 // Shrinks the display's work area by the given amount on each side. | 54 // Shrinks the display's work area by the given amount on each side. |
55 void WorkAreaInset(int left, int top, int right, int bottom); | 55 void WorkAreaInset(int left, int top, int right, int bottom); |
56 | 56 |
57 // Finds the position for a window to anchor it to a corner of the screen. | 57 // Finds the position for a window to anchor it to a corner of the screen. |
58 // |corner| specifies which corner to anchor the window to. Returns the | 58 // |corner| specifies which corner to anchor the window to. Returns the |
59 // intended coordinates for the center of the window. This should only be used | 59 // intended coordinates for the center of the window. This should only be used |
60 // when there is no shelf on the display, because if there is, the returned | 60 // when there is no shelf on the display, because if there is, the returned |
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 center of the screen. |
| 65 // Returns the intended coordinates for the center of the window. |
| 66 gfx::Point GetAnchorPointForScreenCenter() const; |
| 67 |
64 // Finds the position for a window to anchor it to the corner of the shelf. | 68 // 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 | 69 // 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 | 70 // 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. | 71 // location of the shelf. |shelf_edge| must not be SCREEN_EDGE_UNKNOWN. |
68 // Returns the intended coordinates for the center of the window. | 72 // Returns the intended coordinates for the center of the window. |
69 gfx::Point GetAnchorPointForShelfCorner(ScreenEdge shelf_edge) const; | 73 gfx::Point GetAnchorPointForShelfCorner(ScreenEdge shelf_edge) const; |
70 | 74 |
71 // Finds the position for a window to anchor it to the center of the shelf. | 75 // 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 | 76 // |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 | 77 // SCREEN_EDGE_UNKNOWN. Returns the intended coordinates for the center of the |
(...skipping 29 matching lines...) Expand all Loading... |
103 | 107 |
104 // Size of the App List. | 108 // Size of the App List. |
105 gfx::Size window_size_; | 109 gfx::Size window_size_; |
106 | 110 |
107 // The minimum distance, in pixels, to position the app list from the shelf | 111 // The minimum distance, in pixels, to position the app list from the shelf |
108 // or edge of screen. | 112 // or edge of screen. |
109 int min_distance_from_edge_; | 113 int min_distance_from_edge_; |
110 }; | 114 }; |
111 | 115 |
112 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_POSITIONER_H_ | 116 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_POSITIONER_H_ |
OLD | NEW |