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

Side by Side Diff: chrome/browser/ui/app_list/app_list_positioner.h

Issue 93863002: Mac App Launcher is positioned on center of dock in certain cases. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added a comment about when it is appropriate to animate the launcher. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/app_list_positioner.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 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
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/app_list_positioner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698