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

Side by Side Diff: ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_utils.h

Issue 2857123003: Move frame-related methods out of GoogleLandingViewController (Closed)
Patch Set: Address comments Created 3 years, 7 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
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698