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

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: 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_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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
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;
174 174
175 // Returns the index path corresponding to the given |item|. 175 // Returns the index path corresponding to the given |item|.
176 - (NSIndexPath*)indexPathForItem:(ObjectType)item 176 - (NSIndexPath*)indexPathForItem:(ObjectType)item
177 inSectionWithIdentifier:(NSInteger)sectionIdentifier; 177 inSectionWithIdentifier:(NSInteger)sectionIdentifier;
178 178
179 // Returns whether |item| exists.
180 - (BOOL)hasItem:(ObjectType)item;
181
182 // Returns the index path corresponding to the given |item|.
183 - (NSIndexPath*)indexPathForItem:(ObjectType)item;
184
179 #pragma mark UICollectionView data sourcing 185 #pragma mark UICollectionView data sourcing
180 186
181 // Returns the number of collection view sections. 187 // Returns the number of collection view sections.
182 - (NSInteger)numberOfSections; 188 - (NSInteger)numberOfSections;
183 189
184 // Returns the number of collection view items in the given section. 190 // Returns the number of collection view items in the given section.
185 - (NSInteger)numberOfItemsInSection:(NSInteger)section; 191 - (NSInteger)numberOfItemsInSection:(NSInteger)section;
186 192
187 @end 193 @end
188 194
189 #endif // IOS_CHROME_BROWSER_UI_COLLECTION_VIEW_COLLECTION_VIEW_MODEL_H_ 195 #endif // IOS_CHROME_BROWSER_UI_COLLECTION_VIEW_COLLECTION_VIEW_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698