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

Unified 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 side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698