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

Unified Diff: ios/chrome/browser/ui/history/history_entries_status_item.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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/history/history_entries_status_item.h
diff --git a/ios/chrome/browser/ui/history/history_entries_status_item.h b/ios/chrome/browser/ui/history/history_entries_status_item.h
new file mode 100644
index 0000000000000000000000000000000000000000..0fca35e881a51016e0e9c89434536671b485c96b
--- /dev/null
+++ b/ios/chrome/browser/ui/history/history_entries_status_item.h
@@ -0,0 +1,55 @@
+// 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_HISTORY_HISTORY_ENTRIES_STATUS_ITEM_H_
+#define IOS_CHROME_BROWSER_UI_HISTORY_HISTORY_ENTRIES_STATUS_ITEM_H_
+
+#import "ios/chrome/browser/ui/collection_view/cells/collection_view_footer_item.h"
+#import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h"
+
+// Type of displayed history entries. Entries can be synced or local, or there
+// may be no history entries.
+typedef NS_ENUM(NSInteger, HistoryEntriesStatus) {
+ NO_ENTRIES,
+ LOCAL_ENTRIES,
+ SYNCED_ENTRIES
+};
+
+class GURL;
+@class HistoryEntriesStatusItem;
+@class LabelLinkController;
+
+// Delegate HistoryEntriesStatusItem. Handles link taps on
+// HistoryEntriesStatusCell.
+@protocol HistoryEntriesStatusItemDelegate<NSObject>
+// Called when a link is pressed on a HistoryEntriesStatusCell.
+- (void)historyEntriesStatusItem:(HistoryEntriesStatusItem*)item
+ didRequestOpenURL:(const GURL&)URL;
+
+@end
+
+// Model item for HistoryEntriesStatusCell. Manages links added to the cell.
+@interface HistoryEntriesStatusItem : CollectionViewItem
+// Status of currently displayed history entries.
+@property(nonatomic, assign) HistoryEntriesStatus entriesStatus;
+// YES if messages should be hidden.
+@property(nonatomic, assign, getter=isHidden) BOOL hidden;
+// YES if message for other forms of browsing data should be shown.
+@property(nonatomic, assign) BOOL showsOtherBrowsingDataNotice;
+// Delegate for HistoryEntriesStatusItem. Is notified when a link is pressed.
+@property(nonatomic, assign) id<HistoryEntriesStatusItemDelegate> delegate;
+@end
+
+// Cell for displaying status for history entry. Provides information on whether
+// local or synced entries or displays, and how to access other forms of
+// browsing history, if applicable.
+@interface HistoryEntriesStatusCell : CollectionViewFooterCell
+@end
+
+@interface HistoryEntriesStatusCell (Testing)
+// Link controller for entries status message.
+@property(nonatomic, retain, readonly) LabelLinkController* labelLinkController;
+@end
+
+#endif // IOS_CHROME_BROWSER_UI_HISTORY_HISTORY_ENTRIES_STATUS_ITEM_H_

Powered by Google App Engine
This is Rietveld 408576698