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

Side by Side Diff: ios/clean/chrome/browser/ui/tab_collection/tab_collection_mediator.h

Issue 2971093002: [ios] Take snapshot for tab grid. (Closed)
Patch Set: Update unit test. Created 3 years, 5 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 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/chrome/browser/web_state_list/web_state_list_observer_bridge.h"
9 9
10 @class SnapshotCache;
10 @protocol TabCollectionConsumer; 11 @protocol TabCollectionConsumer;
11 class WebStateList; 12 class WebStateList;
12 13
13 // Mediator listens for web state list changes, then updates the consumer. 14 // Mediator listens for web state list changes, then updates the consumer.
14 // This also serves as data source for a tab collection. 15 // This also serves as data source for a tab collection.
15 @interface TabCollectionMediator : NSObject<WebStateListObserving> 16 @interface TabCollectionMediator : NSObject<WebStateListObserving>
16 17
17 // The source of changes and backing of the data source. 18 // The source of changes and backing of the data source.
18 @property(nonatomic, assign) WebStateList* webStateList; 19 @property(nonatomic, assign) WebStateList* webStateList;
19 20
20 // This consumer is updated whenever there are relevant changes to the web state 21 // This consumer is updated whenever there are relevant changes to the web state
21 // list. 22 // list.
22 @property(nonatomic, weak) id<TabCollectionConsumer> consumer; 23 @property(nonatomic, weak) id<TabCollectionConsumer> consumer;
23 24
25 // Takes a snapshot of the active webState and updates the consumer.
26 - (void)takeSnapshotWithCache:(SnapshotCache*)snapshotCache;
27
24 // Stops observing all objects. 28 // Stops observing all objects.
25 - (void)disconnect; 29 - (void)disconnect;
26 30
27 @end 31 @end
28 32
29 #endif // IOS_CLEAN_CHROME_BROWSER_UI_TAB_COLLECTION_TAB_COLLECTION_MEDIATOR_H_ 33 #endif // IOS_CLEAN_CHROME_BROWSER_UI_TAB_COLLECTION_TAB_COLLECTION_MEDIATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698