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

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

Issue 2761263003: Allow CollectionViewModel/Controller queries without SectionIdentifier (Closed)
Patch Set: Cleanup Created 3 years, 7 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_MODEL_H_ 5 #ifndef IOS_CHROME_BROWSER_UI_COLLECTION_VIEW_COLLECTION_VIEW_MODEL_H_
6 #define IOS_CHROME_BROWSER_UI_COLLECTION_VIEW_COLLECTION_VIEW_MODEL_H_ 6 #define IOS_CHROME_BROWSER_UI_COLLECTION_VIEW_COLLECTION_VIEW_MODEL_H_
7 7
8 #import <UIKit/UIKit.h> 8 #import <UIKit/UIKit.h>
9 9
10 @class CollectionViewItem; 10 @class CollectionViewItem;
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 // Returns the index path for |itemType| in the section for |sectionIdentifier| 163 // Returns the index path for |itemType| in the section for |sectionIdentifier|
164 // at |index|. 164 // at |index|.
165 - (NSIndexPath*)indexPathForItemType:(NSInteger)itemType 165 - (NSIndexPath*)indexPathForItemType:(NSInteger)itemType
166 sectionIdentifier:(NSInteger)sectionIdentifier 166 sectionIdentifier:(NSInteger)sectionIdentifier
167 atIndex:(NSUInteger)index; 167 atIndex:(NSUInteger)index;
168 168
169 #pragma mark Query index paths from items 169 #pragma mark Query index paths from items
170 170
171 // Returns whether |item| exists in section for |sectionIdentifier|. 171 // Returns whether |item| exists in section for |sectionIdentifier|.
172 - (BOOL)hasItem:(ObjectType)item 172 - (BOOL)hasItem:(ObjectType)item
173 inSectionWithIdentifier:(NSInteger)sectionIdentifier; 173 inSectionWithIdentifier:(NSInteger)sectionIdentifier;
lpromero 2017/05/02 13:18:08 Shouldn't we remove that one too?
gambard 2017/05/02 13:24:21 Well, I hesitated and it would make sense to have
lpromero 2017/05/02 13:43:21 Makes sense, especially in your case.
174 174
175 // Returns whether |item| exists.
176 - (BOOL)hasItem:(ObjectType)item;
177
175 // Returns the index path corresponding to the given |item|. 178 // Returns the index path corresponding to the given |item|.
176 - (NSIndexPath*)indexPathForItem:(ObjectType)item 179 - (NSIndexPath*)indexPathForItem:(ObjectType)item;
177 inSectionWithIdentifier:(NSInteger)sectionIdentifier;
178 180
179 #pragma mark UICollectionView data sourcing 181 #pragma mark UICollectionView data sourcing
180 182
181 // Returns the number of collection view sections. 183 // Returns the number of collection view sections.
182 - (NSInteger)numberOfSections; 184 - (NSInteger)numberOfSections;
183 185
184 // Returns the number of collection view items in the given section. 186 // Returns the number of collection view items in the given section.
185 - (NSInteger)numberOfItemsInSection:(NSInteger)section; 187 - (NSInteger)numberOfItemsInSection:(NSInteger)section;
186 188
187 @end 189 @end
188 190
189 #endif // IOS_CHROME_BROWSER_UI_COLLECTION_VIEW_COLLECTION_VIEW_MODEL_H_ 191 #endif // IOS_CHROME_BROWSER_UI_COLLECTION_VIEW_COLLECTION_VIEW_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698