Index: ios/chrome/browser/ui/reading_list/reading_list_toolbar.h |
diff --git a/ios/chrome/browser/ui/reading_list/reading_list_toolbar.h b/ios/chrome/browser/ui/reading_list/reading_list_toolbar.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..954638d18afd975c645a1feb360c8417929e3f1c |
--- /dev/null |
+++ b/ios/chrome/browser/ui/reading_list/reading_list_toolbar.h |
@@ -0,0 +1,54 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef IOS_CHROME_BROWSER_UI_READING_LIST_READING_LIST_TOOLBAR_H_ |
+#define IOS_CHROME_BROWSER_UI_READING_LIST_READING_LIST_TOOLBAR_H_ |
+ |
+#import <UIKit/UIKit.h> |
+ |
+@class ActionSheetCoordinator; |
+ |
+typedef NS_ENUM(NSInteger, ReadingListToolbarState) { |
+ NoneSelected, |
+ OnlyReadSelected, |
+ OnlyUnreadSelected, |
+ MixedItemsSelected |
+}; |
+ |
+@protocol ReadingListToolbarDelegate<NSObject> |
+ |
+// Callback for the toolbar mark button. |
+- (void)markPressed; |
+// Callback for the toolbar delete button. |
+- (void)deletePressed; |
+// Enters editing mode. Updates the toolbar. |
+- (void)enterEditingModePressed; |
+// Exits editing mode. Updates the toolbar. |
+- (void)exitEditingModePressed; |
+ |
+@end |
+ |
+// View at the bottom of the reading list panel that presents options to edit |
+// the entries. When editing, the interface changes, allowing the user to delete |
+// them and mark them read/unread. |
+@interface ReadingListToolbar : UIView |
+ |
+// The toolbar state. The text of the buttons change to reflect the state. |
+@property(nonatomic, assign) ReadingListToolbarState state; |
+// Delegate handling the button callbacks. |
+@property(nonatomic, weak) id<ReadingListToolbarDelegate> delegate; |
+ |
+// Informs the toolbar whether there are read items. The "Delete All Read" |
+// button will be enabled accordingly. |
+- (void)setHasReadItem:(BOOL)hasRead; |
+// Sets the editing mode for the toolbar, showing/hiding buttons accordingly. |
+- (void)setEditing:(BOOL)editing; |
+// Returns an empty ActionSheetCoordiantor anchored to the mark button with no |
+// message and no title. |
+- (ActionSheetCoordinator*)actionSheetForMarkWithBaseViewController: |
+ (UIViewController*)viewController; |
+ |
+@end |
+ |
+#endif // IOS_CHROME_BROWSER_UI_READING_LIST_READING_LIST_TOOLBAR_H_ |