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

Unified Diff: ios/chrome/browser/ui/ntp/new_tab_page_view.h

Issue 2589803002: Upstream Chrome on iOS source code [6/11]. (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
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_
« no previous file with comments | « ios/chrome/browser/ui/ntp/new_tab_page_toolbar_controller.mm ('k') | ios/chrome/browser/ui/ntp/new_tab_page_view.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698