1 // Copyright 2020 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef IOS_CHROME_BROWSER_UI_TAB_SWITCHER_TAB_STRIP_TAB_STRIP_MEDIATOR_H_
6 #define IOS_CHROME_BROWSER_UI_TAB_SWITCHER_TAB_STRIP_TAB_STRIP_MEDIATOR_H_
7 
8 #import <Foundation/Foundation.h>
9 
10 #import "ios/chrome/browser/ui/tab_switcher/tab_strip/tab_favicon_data_source.h"
11 
12 @protocol TabStripConsumer;
13 class WebStateList;
14 
15 // This mediator used to manage model interaction for its consumer.
16 @interface TabStripMediator : NSObject <TabFaviconDataSource>
17 
18 // The WebStateList that this mediator listens for any changes on the total
19 // number of Webstates.
20 @property(nonatomic, assign) WebStateList* webStateList;
21 
22 // Designated initializer. Initializer with a TabStripConsumer.
23 - (instancetype)initWithConsumer:(id<TabStripConsumer>)consumer
24     NS_DESIGNATED_INITIALIZER;
25 - (instancetype)init NS_UNAVAILABLE;
26 
27 // Preprares the receiver for destruction, disconnecting from all services.
28 // It is an error for the receiver to dealloc without this having been called
29 // first.
30 - (void)disconnect;
31 
32 @end
33 
34 #endif  // IOS_CHROME_BROWSER_UI_TAB_SWITCHER_TAB_STRIP_TAB_STRIP_MEDIATOR_H_
35