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

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

Issue 162753002: Center and change the aspect ratio for the experimental app list. [Win] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android compile Created 6 years, 10 months 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
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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_
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/ui/app_list/app_list_positioner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698