| Index: ios/chrome/browser/ui/ntp/new_tab_page_view.h
|
| diff --git a/ios/chrome/browser/ui/ntp/new_tab_page_view.h b/ios/chrome/browser/ui/ntp/new_tab_page_view.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..9c38c4b52e7b2a115a8e17de5619cceb0035ff36
|
| --- /dev/null
|
| +++ b/ios/chrome/browser/ui/ntp/new_tab_page_view.h
|
| @@ -0,0 +1,36 @@
|
| +// Copyright 2012 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_VIEW_H_
|
| +#define IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_VIEW_H_
|
| +
|
| +#import <UIKit/UIKit.h>
|
| +
|
| +@class NewTabPageBar;
|
| +
|
| +// Container view for the new tab page so that the subviews don't get directly
|
| +// accessed from the view controller.
|
| +@interface NewTabPageView : UIView
|
| +@property(nonatomic, weak, readonly) UIScrollView* scrollView;
|
| +@property(nonatomic, weak, readonly) NewTabPageBar* tabBar;
|
| +
|
| +- (instancetype)initWithFrame:(CGRect)frame
|
| + andScrollView:(UIScrollView*)scrollView
|
| + andTabBar:(NewTabPageBar*)tabBar NS_DESIGNATED_INITIALIZER;
|
| +
|
| +- (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE;
|
| +
|
| +// initWithCoder would only be needed for building this view through .xib files.
|
| +- (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE;
|
| +
|
| +// Updates scrollView's content size to accommodate its panels.
|
| +- (void)updateScrollViewContentSize;
|
| +
|
| +// Returns the frame of the item's view within the scrollView's content.
|
| +// |index| must be a valid index for tabBar's |items|.
|
| +- (CGRect)panelFrameForItemAtIndex:(NSUInteger)index;
|
| +
|
| +@end
|
| +
|
| +#endif // IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_VIEW_H_
|
|
|