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

Side by Side Diff: ios/chrome/browser/ui/ntp/new_tab_page_header_view.h

Issue 2829003002: Add CommandDispatcher to BrowserViewController. (Closed)
Patch Set: Cleaner Created 3 years, 8 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
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|.
35 - (void)addViewsToSearchField:(UIView*)searchField; 36 - (void)addViewsToSearchField:(UIView*)searchField;
36 37
37 // Animates |_shadow|'s alpha to 0. 38 // Animates |_shadow|'s alpha to 0.
38 - (void)fadeOutShadow; 39 - (void)fadeOutShadow;
39 40
40 // Hide toolbar subviews that should not be displayed on the new tab page. 41 // Hide toolbar subviews that should not be displayed on the new tab page.
41 - (void)hideToolbarViewsForNewTabPage; 42 - (void)hideToolbarViewsForNewTabPage;
42 43
43 // Updates the toolbar tab count; 44 // Updates the toolbar tab count;
44 - (void)setToolbarTabCount:(int)tabCount; 45 - (void)setToolbarTabCount:(int)tabCount;
45 @end 46 @end
46 47
47 #endif // IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_HEADER_VIEW_H_ 48 #endif // IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_HEADER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698