Index: ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.h |
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.h b/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..79be1ad2c6f1d0e90661c2f2cc938906756d7107 |
--- /dev/null |
+++ b/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.h |
@@ -0,0 +1,69 @@ |
+// Copyright 2015 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_TAB_SWITCHER_TAB_SWITCHER_PANEL_CELL_H_ |
+#define IOS_CHROME_BROWSER_UI_TAB_SWITCHER_TAB_SWITCHER_PANEL_CELL_H_ |
+ |
+#import <UIKit/UIKit.h> |
+ |
+#import "ios/chrome/browser/ui/tab_switcher/tab_switcher_model.h" |
+ |
+class GURL; |
+@class TabSwitcherCache; |
+@class Tab; |
+namespace ios { |
+class ChromeBrowserState; |
+} // namespace ios |
+ |
+CGFloat tabSwitcherLocalSessionCellTopBarHeight(); |
+ |
+@protocol SessionCellDelegate<NSObject> |
+ |
+- (TabSwitcherCache*)tabSwitcherCache; |
+- (void)cellPressed:(UICollectionViewCell*)cell; |
+- (void)deleteButtonPressedForCell:(UICollectionViewCell*)cell; |
+ |
+@end |
+ |
+@interface TabSwitcherSessionCell : UICollectionViewCell |
+ |
+// Returns the cell's identifier used for the cell's re-use. |
++ (NSString*)identifier; |
+ |
+@end |
+ |
+// Cell showing information about a local session. |
+@interface TabSwitcherLocalSessionCell : TabSwitcherSessionCell |
+ |
+// Returns the top bar of the cell. The top bar holds the favicon and the tab |
+// title. |
+@property(nonatomic, readonly) UIView* topBar; |
+ |
+// Sets the cell's appearance using information in |tab|. |
+- (void)setAppearanceForTab:(Tab*)tab cellSize:(CGSize)cellSize; |
+// Sets the cell's appearance depending on |type|. |
+- (void)setSessionType:(ios_internal::SessionType)type; |
+// Sets the cell's delegate. |
+- (void)setDelegate:(id<SessionCellDelegate>)delegate; |
+ |
+// Returns the current screenshot set on the cell. |
+- (UIImage*)screenshot; |
+// Sets the snapshot. |
+- (void)setSnapshot:(UIImage*)snapshot; |
+ |
+@end |
+ |
+@interface TabSwitcherDistantSessionCell : TabSwitcherSessionCell |
+ |
+// Sets the cell's title. |
+- (void)setTitle:(NSString*)title; |
+// Sets the session's URL to obtain the cell's favicon. |
+- (void)setSessionGURL:(GURL const&)gurl |
+ withBrowserState:(ios::ChromeBrowserState*)browserState; |
+// Sets the cell's delegate. |
+- (void)setDelegate:(id<SessionCellDelegate>)delegate; |
+ |
+@end |
+ |
+#endif // IOS_CHROME_BROWSER_UI_TAB_SWITCHER_TAB_SWITCHER_PANEL_CELL_H_ |