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

Side by Side Diff: ios/chrome/browser/ui/reading_list/reading_list_toolbar.h

Issue 2589583003: Upstream Chrome on iOS source code [7/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_READING_LIST_READING_LIST_TOOLBAR_H_
6 #define IOS_CHROME_BROWSER_UI_READING_LIST_READING_LIST_TOOLBAR_H_
7
8 #import <UIKit/UIKit.h>
9
10 @class ActionSheetCoordinator;
11
12 typedef NS_ENUM(NSInteger, ReadingListToolbarState) {
13 NoneSelected,
14 OnlyReadSelected,
15 OnlyUnreadSelected,
16 MixedItemsSelected
17 };
18
19 @protocol ReadingListToolbarDelegate<NSObject>
20
21 // Callback for the toolbar mark button.
22 - (void)markPressed;
23 // Callback for the toolbar delete button.
24 - (void)deletePressed;
25 // Enters editing mode. Updates the toolbar.
26 - (void)enterEditingModePressed;
27 // Exits editing mode. Updates the toolbar.
28 - (void)exitEditingModePressed;
29
30 @end
31
32 // View at the bottom of the reading list panel that presents options to edit
33 // the entries. When editing, the interface changes, allowing the user to delete
34 // them and mark them read/unread.
35 @interface ReadingListToolbar : UIView
36
37 // The toolbar state. The text of the buttons change to reflect the state.
38 @property(nonatomic, assign) ReadingListToolbarState state;
39 // Delegate handling the button callbacks.
40 @property(nonatomic, weak) id<ReadingListToolbarDelegate> delegate;
41
42 // Informs the toolbar whether there are read items. The "Delete All Read"
43 // button will be enabled accordingly.
44 - (void)setHasReadItem:(BOOL)hasRead;
45 // Sets the editing mode for the toolbar, showing/hiding buttons accordingly.
46 - (void)setEditing:(BOOL)editing;
47 // Returns an empty ActionSheetCoordiantor anchored to the mark button with no
48 // message and no title.
49 - (ActionSheetCoordinator*)actionSheetForMarkWithBaseViewController:
50 (UIViewController*)viewController;
51
52 @end
53
54 #endif // IOS_CHROME_BROWSER_UI_READING_LIST_READING_LIST_TOOLBAR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698