OLD | NEW |
(Empty) | |
| 1 // Copyright 2012 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_NTP_NEW_TAB_PAGE_VIEW_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_VIEW_H_ |
| 7 |
| 8 #import <UIKit/UIKit.h> |
| 9 |
| 10 @class NewTabPageBar; |
| 11 |
| 12 // Container view for the new tab page so that the subviews don't get directly |
| 13 // accessed from the view controller. |
| 14 @interface NewTabPageView : UIView |
| 15 @property(nonatomic, weak, readonly) UIScrollView* scrollView; |
| 16 @property(nonatomic, weak, readonly) NewTabPageBar* tabBar; |
| 17 |
| 18 - (instancetype)initWithFrame:(CGRect)frame |
| 19 andScrollView:(UIScrollView*)scrollView |
| 20 andTabBar:(NewTabPageBar*)tabBar NS_DESIGNATED_INITIALIZER; |
| 21 |
| 22 - (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE; |
| 23 |
| 24 // initWithCoder would only be needed for building this view through .xib files. |
| 25 - (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE; |
| 26 |
| 27 // Updates scrollView's content size to accommodate its panels. |
| 28 - (void)updateScrollViewContentSize; |
| 29 |
| 30 // Returns the frame of the item's view within the scrollView's content. |
| 31 // |index| must be a valid index for tabBar's |items|. |
| 32 - (CGRect)panelFrameForItemAtIndex:(NSUInteger)index; |
| 33 |
| 34 @end |
| 35 |
| 36 #endif // IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_VIEW_H_ |
OLD | NEW |