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

Side by Side Diff: ios/chrome/browser/ui/collection_view/collection_view_controller.h

Issue 2743643002: [ObjC ARC] Converts ios/chrome/browser/ui/collection_view:collection_view to ARC. (Closed)
Patch Set: cleanup Created 3 years, 9 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_CHROME_BROWSER_UI_COLLECTION_VIEW_COLLECTION_VIEW_CONTROLLER_H_ 5 #ifndef IOS_CHROME_BROWSER_UI_COLLECTION_VIEW_COLLECTION_VIEW_CONTROLLER_H_
6 #define IOS_CHROME_BROWSER_UI_COLLECTION_VIEW_COLLECTION_VIEW_CONTROLLER_H_ 6 #define IOS_CHROME_BROWSER_UI_COLLECTION_VIEW_COLLECTION_VIEW_CONTROLLER_H_
7 7
8 #import "ios/chrome/browser/ui/collection_view/collection_view_model.h" 8 #import "ios/chrome/browser/ui/collection_view/collection_view_model.h"
9 #import "ios/chrome/browser/ui/material_components/app_bar_presenting.h" 9 #import "ios/chrome/browser/ui/material_components/app_bar_presenting.h"
10 #import "ios/third_party/material_components_ios/src/components/Collections/src/ MaterialCollections.h" 10 #import "ios/third_party/material_components_ios/src/components/Collections/src/ MaterialCollections.h"
11 11
12 @class CollectionViewItem; 12 @class CollectionViewItem;
13 13
14 typedef NS_ENUM(NSInteger, CollectionViewControllerStyle) { 14 typedef NS_ENUM(NSInteger, CollectionViewControllerStyle) {
15 // A simple collection view controller. 15 // A simple collection view controller.
16 CollectionViewControllerStyleDefault, 16 CollectionViewControllerStyleDefault,
17 // A collection view controller with an app bar. 17 // A collection view controller with an app bar.
18 CollectionViewControllerStyleAppBar, 18 CollectionViewControllerStyleAppBar,
19 }; 19 };
20 20
21 // Chrome-specific Material Design collection view controller. With 21 // Chrome-specific Material Design collection view controller. With
22 // CollectionViewControllerStyleAppBar, it features an app bar in the card 22 // CollectionViewControllerStyleAppBar, it features an app bar in the card
23 // style. 23 // style.
24 @interface CollectionViewController 24 @interface CollectionViewController
25 : MDCCollectionViewController<AppBarPresenting> 25 : MDCCollectionViewController<AppBarPresenting>
26 26
27 // The model of this controller. 27 // The model of this controller.
28 @property(nonatomic, readonly) 28 @property(strong, nonatomic, readonly)
29 CollectionViewModel<CollectionViewItem*>* collectionViewModel; 29 CollectionViewModel<CollectionViewItem*>* collectionViewModel;
30 30
31 // Initializer with the desired style. 31 // Initializer with the desired style.
32 - (instancetype)initWithStyle:(CollectionViewControllerStyle)style 32 - (instancetype)initWithStyle:(CollectionViewControllerStyle)style
33 NS_DESIGNATED_INITIALIZER; 33 NS_DESIGNATED_INITIALIZER;
34 - (instancetype)initWithCollectionViewLayout:(UICollectionViewLayout*)layout 34 - (instancetype)initWithCollectionViewLayout:(UICollectionViewLayout*)layout
35 NS_UNAVAILABLE; 35 NS_UNAVAILABLE;
36 - (instancetype)initWithNibName:(NSString*)nibNameOrNil 36 - (instancetype)initWithNibName:(NSString*)nibNameOrNil
37 bundle:(NSBundle*)nibBundleOrNil NS_UNAVAILABLE; 37 bundle:(NSBundle*)nibBundleOrNil NS_UNAVAILABLE;
38 - (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE; 38 - (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // state. Must be called by subclasses if they override this method in order to 89 // state. Must be called by subclasses if they override this method in order to
90 // maintain this functionality. 90 // maintain this functionality.
91 - (void)scrollViewWillEndDragging:(UIScrollView*)scrollView 91 - (void)scrollViewWillEndDragging:(UIScrollView*)scrollView
92 withVelocity:(CGPoint)velocity 92 withVelocity:(CGPoint)velocity
93 targetContentOffset:(inout CGPoint*)targetContentOffset 93 targetContentOffset:(inout CGPoint*)targetContentOffset
94 NS_REQUIRES_SUPER; 94 NS_REQUIRES_SUPER;
95 95
96 @end 96 @end
97 97
98 #endif // IOS_CHROME_BROWSER_UI_COLLECTION_VIEW_COLLECTION_VIEW_CONTROLLER_H_ 98 #endif // IOS_CHROME_BROWSER_UI_COLLECTION_VIEW_COLLECTION_VIEW_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698