OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef REMOTING_CLIENT_IOS_APP_HOST_COLLECTION_VIEW_CONTOLLER_H_ | |
6 #define REMOTING_CLIENT_IOS_APP_HOST_COLLECTION_VIEW_CONTOLLER_H_ | |
7 | |
8 #import <UIKit/UIKit.h> | |
9 | |
10 #import "ios/third_party/material_components_ios/src/components/Collections/src/
MaterialCollections.h" | |
11 #import "ios/third_party/material_components_ios/src/components/FlexibleHeader/s
rc/MaterialFlexibleHeader.h" | |
12 #import "remoting/client/ios/app/host_collection_view_cell.h" | |
13 #import "remoting/client/ios/domain/host_info.h" | |
14 | |
15 // The host collection view controller delegate provides the data for available | |
16 // hosts and receives selection events from the collection view controller. | |
17 @protocol HostCollectionViewControllerDelegate<NSObject> | |
18 | |
19 // Notifies the delegate if a selection happens for the provided cell. | |
20 // The delegate should run the completionBlock when processing for this event | |
21 // has finished. | |
22 @optional | |
23 - (void)didSelectCell:(HostCollectionViewCell*)cell | |
24 completion:(void (^)())completionBlock; | |
25 | |
26 // The delegate should provide the HostInfo object for the given path if | |
27 // available from the cache. | |
28 - (HostInfo*)getHostAtIndexPath:(NSIndexPath*)path; | |
29 | |
30 // The delegate must provide the total number of hosts currently cached. | |
31 - (NSInteger)getHostCount; | |
32 | |
33 @end | |
34 | |
35 @interface HostCollectionViewController : MDCCollectionViewController | |
36 | |
37 @property(weak, nonatomic) id<HostCollectionViewControllerDelegate> delegate; | |
38 @property(nonatomic) | |
39 MDCFlexibleHeaderContainerViewController* flexHeaderContainerViewController; | |
40 | |
41 @end | |
42 | |
43 #endif // REMOTING_CLIENT_IOS_APP_HOST_LIST_VIEW_CONTOLLER_H_ | |
OLD | NEW |