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

Side by Side Diff: ios/chrome/browser/ui/history/history_collection_view_controller.h

Issue 2590473002: Upstream Chrome on iOS source code [5/11]. (Closed)
Patch Set: Created 4 years 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef IOS_CHROME_BROWSER_UI_HISTORY_HISTORY_COLLECTION_VIEW_CONTROLLER_H_
6 #define IOS_CHROME_BROWSER_UI_HISTORY_HISTORY_COLLECTION_VIEW_CONTROLLER_H_
7
8 #import "ios/chrome/browser/ui/collection_view/collection_view_controller.h"
9
10 #include "base/ios/block_types.h"
11
12 namespace ios {
13 class ChromeBrowserState;
14 }
15
16 @class HistoryCollectionViewController;
17 @protocol UrlLoader;
18
19 // Delegate for the history collection view controller.
20 @protocol HistoryCollectionViewControllerDelegate<NSObject>
21 // Notifies the delegate that history should be dismissed.
22 - (void)historyCollectionViewController:
23 (HistoryCollectionViewController*)controller
24 shouldCloseWithCompletion:(ProceduralBlock)completionHandler;
25 // Notifies the delegate that the collection view has scrolled to |offset|.
26 - (void)historyCollectionViewController:
27 (HistoryCollectionViewController*)controller
28 didScrollToOffset:(CGPoint)offset;
29 // Notifies the delegate that history entries have been loaded or changed.
30 - (void)historyCollectionViewControllerDidChangeEntries:
31 (HistoryCollectionViewController*)controller;
32 // Notifies the delegate that history entries have been selected or deselected.
33 - (void)historyCollectionViewControllerDidChangeEntrySelection:
34 (HistoryCollectionViewController*)controller;
35 @end
36
37 // View controller for displaying a collection of history entries.
38 @interface HistoryCollectionViewController : CollectionViewController
39 // YES if the collection view is in editing mode. Setting |editing| turns
40 // editing mode on or off accordingly.
41 @property(nonatomic, assign, getter=isEditing) BOOL editing;
42 // YES if the the search bar is present.
43 @property(nonatomic, assign, getter=isSearching) BOOL searching;
44 // YES if collection is currently displaying any history entries.
45 @property(nonatomic, assign, readonly) BOOL hasHistoryEntries;
46 // YES if the collection view has selected entries while in editing mode.
47 @property(nonatomic, assign, readonly) BOOL hasSelectedEntries;
48
49 - (instancetype)initWithLoader:(id<UrlLoader>)loader
50 browserState:(ios::ChromeBrowserState*)browserState
51 delegate:
52 (id<HistoryCollectionViewControllerDelegate>)delegate
53 NS_DESIGNATED_INITIALIZER;
54 - (instancetype)initWithStyle:(CollectionViewControllerStyle)style
55 NS_UNAVAILABLE;
56
57 // Search history for text |query| and display the results. |query| may be nil.
58 // If query is empty, show all history.
59 - (void)showHistoryMatchingQuery:(NSString*)query;
60
61 // Deletes selected items from browser history and removes them from the
62 // collection.
63 - (void)deleteSelectedItemsFromHistory;
64
65 @end
66
67 #endif // IOS_CHROME_BROWSER_UI_HISTORY_HISTORY_COLLECTION_VIEW_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698