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

Side by Side Diff: remoting/client/ios/app/host_collection_view_controller.mm

Issue 2828113002: Provide HostView with data required for creating a new and session, and render for CRD iOS. (Closed)
Patch Set: fixing issue based on feedback. Created 3 years, 8 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 #if !defined(__has_feature) || !__has_feature(objc_arc) 5 #if !defined(__has_feature) || !__has_feature(objc_arc)
6 #error "This file requires ARC support." 6 #error "This file requires ARC support."
7 #endif 7 #endif
8 8
9 #import "remoting/client/ios/app/host_collection_view_controller.h" 9 #import "remoting/client/ios/app/host_collection_view_controller.h"
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 } 73 }
74 74
75 - (UICollectionViewCell*)collectionView:(UICollectionView*)collectionView 75 - (UICollectionViewCell*)collectionView:(UICollectionView*)collectionView
76 cellForItemAtIndexPath:(NSIndexPath*)indexPath { 76 cellForItemAtIndexPath:(NSIndexPath*)indexPath {
77 HostCollectionViewCell* cell = 77 HostCollectionViewCell* cell =
78 [collectionView dequeueReusableCellWithReuseIdentifier: 78 [collectionView dequeueReusableCellWithReuseIdentifier:
79 NSStringFromClass([HostCollectionViewCell class]) 79 NSStringFromClass([HostCollectionViewCell class])
80 forIndexPath:indexPath]; 80 forIndexPath:indexPath];
81 HostInfo* host = [_delegate getHostAtIndexPath:indexPath]; 81 HostInfo* host = [_delegate getHostAtIndexPath:indexPath];
82 if (host) { 82 if (host) {
83 [cell populateContentWithTitle:host.hostName status:host.status]; 83 [cell populateContentWithHostInfo:host];
84 } 84 }
85 return cell; 85 return cell;
86 } 86 }
87 87
88 #pragma mark - UICollectionViewDelegate 88 #pragma mark - UICollectionViewDelegate
89 89
90 - (void)collectionView:(UICollectionView*)collectionView 90 - (void)collectionView:(UICollectionView*)collectionView
91 didSelectItemAtIndexPath:(NSIndexPath*)indexPath { 91 didSelectItemAtIndexPath:(NSIndexPath*)indexPath {
92 [super collectionView:collectionView didSelectItemAtIndexPath:indexPath]; 92 [super collectionView:collectionView didSelectItemAtIndexPath:indexPath];
93 HostCollectionViewCell* cell = (HostCollectionViewCell*)[collectionView 93 HostCollectionViewCell* cell = (HostCollectionViewCell*)[collectionView
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 // Use a custom shadow under the flexible header. 143 // Use a custom shadow under the flexible header.
144 MDCShadowLayer* shadowLayer = [MDCShadowLayer layer]; 144 MDCShadowLayer* shadowLayer = [MDCShadowLayer layer];
145 [headerView setShadowLayer:shadowLayer 145 [headerView setShadowLayer:shadowLayer
146 intensityDidChangeBlock:^(CALayer* layer, CGFloat intensity) { 146 intensityDidChangeBlock:^(CALayer* layer, CGFloat intensity) {
147 CGFloat elevation = MDCShadowElevationAppBar * intensity; 147 CGFloat elevation = MDCShadowElevationAppBar * intensity;
148 [(MDCShadowLayer*)layer setElevation:elevation]; 148 [(MDCShadowLayer*)layer setElevation:elevation];
149 }]; 149 }];
150 } 150 }
151 151
152 @end 152 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698