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

Unified Diff: ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.h

Issue 2588733002: Upstream Chrome on iOS source code [9/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/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_

Powered by Google App Engine
This is Rietveld 408576698