| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_HEADER_VIEW_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_HEADER_VIEW_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_HEADER_VIEW_H_ | 6 #define IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_HEADER_VIEW_H_ |
| 7 | 7 |
| 8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
| 9 | 9 |
| 10 #import "ios/chrome/browser/ui/toolbar/toolbar_owner.h" | 10 #import "ios/chrome/browser/ui/toolbar/toolbar_owner.h" |
| 11 | 11 |
| 12 @protocol GoogleLandingDataSource; | 12 @protocol GoogleLandingDataSource; |
| 13 | 13 |
| 14 // Header view for the Material Design NTP. The header view contains all views | 14 // Header view for the Material Design NTP. The header view contains all views |
| 15 // that are displayed above the list of most visited sites, which includes the | 15 // that are displayed above the list of most visited sites, which includes the |
| 16 // toolbar buttons, Google doodle, and fake omnibox. | 16 // toolbar buttons, Google doodle, and fake omnibox. |
| 17 @interface NewTabPageHeaderView : UICollectionReusableView<ToolbarOwner> | 17 @interface NewTabPageHeaderView : UICollectionReusableView<ToolbarOwner> |
| 18 | 18 |
| 19 // Return the toolbar view; | 19 // Return the toolbar view; |
| 20 @property(nonatomic, readonly) UIView* toolBarView; | 20 @property(nonatomic, readonly) UIView* toolBarView; |
| 21 | 21 |
| 22 // Creates a NewTabPageToolbarController using the given |toolbarDelegate|, | 22 // Creates a NewTabPageToolbarController using the given |toolbarDelegate|, |
| 23 // |focuser| and |readingListModel|, and adds the toolbar view to self. | 23 // |focuser| and |readingListModel|, and adds the toolbar view to self. |
| 24 - (void)addToolbarWithDataSource:(id<GoogleLandingDataSource>)dataSource; | 24 - (void)addToolbarWithDataSource:(id<GoogleLandingDataSource>)dataSource |
| 25 dispatcher:(id)dispatcher; |
| 25 | 26 |
| 26 // Changes the frame of |searchField| based on its |initialFrame| and the scroll | 27 // Changes the frame of |searchField| based on its |initialFrame| and the scroll |
| 27 // view's y |offset|. Also adjust the alpha values for |_searchBoxBorder| and | 28 // view's y |offset|. Also adjust the alpha values for |_searchBoxBorder| and |
| 28 // |_shadow| and the constant values for the |constraints|. | 29 // |_shadow| and the constant values for the |constraints|. |
| 29 - (void)updateSearchField:(UIView*)searchField | 30 - (void)updateSearchField:(UIView*)searchField |
| 30 withInitialFrame:(CGRect)initialFrame | 31 withInitialFrame:(CGRect)initialFrame |
| 31 subviewConstraints:(NSArray*)constraints | 32 subviewConstraints:(NSArray*)constraints |
| 32 forOffset:(CGFloat)offset; | 33 forOffset:(CGFloat)offset; |
| 33 | 34 |
| 34 // Initializes |_searchBoxBorder| and |_shadow| and adds them to |searchField|. | 35 // Initializes |_searchBoxBorder| and |_shadow| and adds them to |searchField|. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 45 | 46 |
| 46 // |YES| if the toolbar can show the forward arrow. | 47 // |YES| if the toolbar can show the forward arrow. |
| 47 - (void)setCanGoForward:(BOOL)canGoForward; | 48 - (void)setCanGoForward:(BOOL)canGoForward; |
| 48 | 49 |
| 49 // |YES| if the toolbar can show the back arrow. | 50 // |YES| if the toolbar can show the back arrow. |
| 50 - (void)setCanGoBack:(BOOL)canGoBack; | 51 - (void)setCanGoBack:(BOOL)canGoBack; |
| 51 | 52 |
| 52 @end | 53 @end |
| 53 | 54 |
| 54 #endif // IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_HEADER_VIEW_H_ | 55 #endif // IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_HEADER_VIEW_H_ |
| OLD | NEW |