| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_CLEAN_CHROME_BROWSER_UI_TAB_COLLECTION_TAB_COLLECTION_MEDIATOR_H_ | 5 #ifndef IOS_CLEAN_CHROME_BROWSER_UI_TAB_COLLECTION_TAB_COLLECTION_MEDIATOR_H_ |
| 6 #define IOS_CLEAN_CHROME_BROWSER_UI_TAB_COLLECTION_TAB_COLLECTION_MEDIATOR_H_ | 6 #define IOS_CLEAN_CHROME_BROWSER_UI_TAB_COLLECTION_TAB_COLLECTION_MEDIATOR_H_ |
| 7 | 7 |
| 8 #import "ios/chrome/browser/web_state_list/web_state_list_observer_bridge.h" |
| 8 #import "ios/clean/chrome/browser/ui/tab_collection/tab_collection_data_source.h
" | 9 #import "ios/clean/chrome/browser/ui/tab_collection/tab_collection_data_source.h
" |
| 9 #import "ios/shared/chrome/browser/tabs/web_state_list_observer_bridge.h" | |
| 10 | 10 |
| 11 @protocol TabCollectionConsumer; | 11 @protocol TabCollectionConsumer; |
| 12 class WebStateList; | 12 class WebStateList; |
| 13 | 13 |
| 14 // Mediator listens for web state list changes, then updates the consumer. | 14 // Mediator listens for web state list changes, then updates the consumer. |
| 15 // This also serves as data source for a tab collection. | 15 // This also serves as data source for a tab collection. |
| 16 @interface TabCollectionMediator | 16 @interface TabCollectionMediator |
| 17 : NSObject<TabCollectionDataSource, WebStateListObserving> | 17 : NSObject<TabCollectionDataSource, WebStateListObserving> |
| 18 | 18 |
| 19 // The source of changes and backing of the data source. | 19 // The source of changes and backing of the data source. |
| 20 @property(nonatomic, assign) WebStateList* webStateList; | 20 @property(nonatomic, assign) WebStateList* webStateList; |
| 21 | 21 |
| 22 // This consumer is updated whenever there are relevant changes to the web state | 22 // This consumer is updated whenever there are relevant changes to the web state |
| 23 // list. | 23 // list. |
| 24 @property(nonatomic, weak) id<TabCollectionConsumer> consumer; | 24 @property(nonatomic, weak) id<TabCollectionConsumer> consumer; |
| 25 | 25 |
| 26 // Stops observing all objects. | 26 // Stops observing all objects. |
| 27 - (void)disconnect; | 27 - (void)disconnect; |
| 28 | 28 |
| 29 @end | 29 @end |
| 30 | 30 |
| 31 #endif // IOS_CLEAN_CHROME_BROWSER_UI_TAB_COLLECTION_TAB_COLLECTION_MEDIATOR_H_ | 31 #endif // IOS_CLEAN_CHROME_BROWSER_UI_TAB_COLLECTION_TAB_COLLECTION_MEDIATOR_H_ |
| OLD | NEW |