| Index: ios/chrome/browser/ui/ntp/new_tab_page_header_view.mm
|
| diff --git a/ios/chrome/browser/ui/ntp/new_tab_page_header_view.mm b/ios/chrome/browser/ui/ntp/new_tab_page_header_view.mm
|
| index 46590152472ef374e572197757653b01f1809938..a9a519412da9c7a5afbea8479ae889211ed5c3c9 100644
|
| --- a/ios/chrome/browser/ui/ntp/new_tab_page_header_view.mm
|
| +++ b/ios/chrome/browser/ui/ntp/new_tab_page_header_view.mm
|
| @@ -25,9 +25,8 @@ const CGFloat kMaxConstraintConstantDiff = 5;
|
|
|
| } // namespace
|
|
|
| -@interface NewTabPageHeaderView ()<TabModelObserver> {
|
| +@interface NewTabPageHeaderView () {
|
| base::scoped_nsobject<NewTabPageToolbarController> _toolbarController;
|
| - base::scoped_nsobject<TabModel> _tabModel;
|
| base::scoped_nsobject<UIImageView> _searchBoxBorder;
|
| base::scoped_nsobject<UIImageView> _shadow;
|
| }
|
| @@ -45,7 +44,6 @@ const CGFloat kMaxConstraintConstantDiff = 5;
|
| }
|
|
|
| - (void)dealloc {
|
| - [_tabModel removeObserver:self];
|
| [super dealloc];
|
| }
|
|
|
| @@ -74,9 +72,6 @@ const CGFloat kMaxConstraintConstantDiff = 5;
|
| initWithToolbarDelegate:[dataSource toolbarDelegate]
|
| focuser:dataSource]);
|
| _toolbarController.get().readingListModel = [dataSource readingListModel];
|
| - [_tabModel removeObserver:self];
|
| - _tabModel.reset([[dataSource tabModel] retain]);
|
| - [self addTabModelObserver];
|
|
|
| UIView* toolbarView = [_toolbarController view];
|
| CGRect toolbarFrame = self.bounds;
|
| @@ -93,9 +88,8 @@ const CGFloat kMaxConstraintConstantDiff = 5;
|
| [_toolbarController hideViewsForNewTabPage:YES];
|
| };
|
|
|
| -- (void)addTabModelObserver {
|
| - [_tabModel addObserver:self];
|
| - [_toolbarController setTabCount:[_tabModel count]];
|
| +- (void)setToolbarTabCount:(int)tabCount {
|
| + [_toolbarController setTabCount:tabCount];
|
| }
|
|
|
| - (void)addViewsToSearchField:(UIView*)searchField {
|
| @@ -122,11 +116,6 @@ const CGFloat kMaxConstraintConstantDiff = 5;
|
| [_shadow setAlpha:0];
|
| }
|
|
|
| -- (void)tabModelDidChangeTabCount:(TabModel*)model {
|
| - DCHECK(model == _tabModel);
|
| - [_toolbarController setTabCount:[_tabModel count]];
|
| -}
|
| -
|
| - (void)updateSearchField:(UIView*)searchField
|
| withInitialFrame:(CGRect)initialFrame
|
| subviewConstraints:(NSArray*)constraints
|
|
|