OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_COLLECTION _UTILS_H_ | |
6 #define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_COLLECTION _UTILS_H_ | |
7 | |
8 #import <UIKit/UIKit.h> | |
9 | |
10 namespace content_suggestions { | |
11 | |
12 // iPhone landscape uses a slightly different layout for the doodle and search | |
13 // field frame. Returns the proper frame from |frames| based on orientation, | |
14 // centered in the view of |width|. | |
15 CGRect getOrientationFrame(const CGRect frames[], CGFloat width); | |
16 // Returns left margin in order to have the tiles centered in a view with a | |
marq (ping after 24h)
2017/05/10 09:23:49
For clarity, maybe 'x-offset' is clearer than 'lef
gambard
2017/05/10 11:09:40
Done.
| |
17 // |width|. | |
18 CGFloat centeredTilesMarginForWidth(CGFloat width); | |
19 // Returns the proper frame for the doodle inside a view with a |width|. | |
20 // |logoIsShowing| refers to the Google logo or the doodle. | |
21 CGRect doodleFrame(CGFloat width, BOOL logoIsShowing); | |
22 // Returns the proper frame for the search field inside a view with a |width|. | |
23 // |logoIsShowing| refers to the Google logo or the doodle. | |
24 CGRect searchFieldFrame(CGFloat width, BOOL logoIsShowing); | |
25 // Returns the expected height of the NewTabPageHeaderView inside a view with a | |
26 // |width|. |logoIsShowing| refers to the Google logo or the doodle. | |
27 // |promoCanShow| represents whether a what's new promo can be displayed. | |
28 CGFloat heightForLogoHeader(CGFloat width, | |
29 BOOL logoIsShowing, | |
30 BOOL promoCanShow); | |
31 | |
32 } // namespace content_suggestions | |
33 | |
34 #endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_COLLECT ION_UTILS_H_ | |
OLD | NEW |