| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef IOS_CHROME_BROWSER_UI_TAB_SWITCHER_TAB_SWITCHER_PANEL_CELL_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_TAB_SWITCHER_TAB_SWITCHER_PANEL_CELL_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_TAB_SWITCHER_TAB_SWITCHER_PANEL_CELL_H_ | 6 #define IOS_CHROME_BROWSER_UI_TAB_SWITCHER_TAB_SWITCHER_PANEL_CELL_H_ |
| 7 | 7 |
| 8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
| 9 | 9 |
| 10 #import "ios/chrome/browser/ui/tab_switcher/tab_switcher_model.h" | 10 #import "ios/chrome/browser/ui/tab_switcher/tab_switcher_model.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 - (void)cellPressed:(UICollectionViewCell*)cell; | 24 - (void)cellPressed:(UICollectionViewCell*)cell; |
| 25 - (void)deleteButtonPressedForCell:(UICollectionViewCell*)cell; | 25 - (void)deleteButtonPressedForCell:(UICollectionViewCell*)cell; |
| 26 | 26 |
| 27 @end | 27 @end |
| 28 | 28 |
| 29 @interface TabSwitcherSessionCell : UICollectionViewCell | 29 @interface TabSwitcherSessionCell : UICollectionViewCell |
| 30 | 30 |
| 31 // Returns the cell's identifier used for the cell's re-use. | 31 // Returns the cell's identifier used for the cell's re-use. |
| 32 + (NSString*)identifier; | 32 + (NSString*)identifier; |
| 33 | 33 |
| 34 // The cell delegate. |
| 35 @property(nonatomic, assign) id<SessionCellDelegate> delegate; |
| 36 |
| 34 @end | 37 @end |
| 35 | 38 |
| 36 // Cell showing information about a local session. | 39 // Cell showing information about a local session. |
| 37 @interface TabSwitcherLocalSessionCell : TabSwitcherSessionCell | 40 @interface TabSwitcherLocalSessionCell : TabSwitcherSessionCell |
| 38 | 41 |
| 39 // Returns the top bar of the cell. The top bar holds the favicon and the tab | 42 // Returns the top bar of the cell. The top bar holds the favicon and the tab |
| 40 // title. | 43 // title. |
| 41 @property(nonatomic, readonly) UIView* topBar; | 44 @property(nonatomic, readonly) UIView* topBar; |
| 42 | 45 |
| 43 // Sets the cell's appearance using information in |tab|. | 46 // Sets the cell's appearance using information in |tab|. |
| 44 - (void)setAppearanceForTab:(Tab*)tab cellSize:(CGSize)cellSize; | 47 - (void)setAppearanceForTab:(Tab*)tab cellSize:(CGSize)cellSize; |
| 45 // Sets the cell's appearance depending on |type|. | 48 // Sets the cell's appearance depending on |type|. |
| 46 - (void)setSessionType:(TabSwitcherSessionType)type; | 49 - (void)setSessionType:(TabSwitcherSessionType)type; |
| 47 // Sets the cell's delegate. | |
| 48 - (void)setDelegate:(id<SessionCellDelegate>)delegate; | |
| 49 | 50 |
| 50 // Returns the current screenshot set on the cell. | 51 // Returns the current screenshot set on the cell. |
| 51 - (UIImage*)screenshot; | 52 - (UIImage*)screenshot; |
| 52 // Sets the snapshot. | 53 // Sets the snapshot. |
| 53 - (void)setSnapshot:(UIImage*)snapshot; | 54 - (void)setSnapshot:(UIImage*)snapshot; |
| 54 | 55 |
| 55 @end | 56 @end |
| 56 | 57 |
| 57 @interface TabSwitcherDistantSessionCell : TabSwitcherSessionCell | 58 @interface TabSwitcherDistantSessionCell : TabSwitcherSessionCell |
| 58 | 59 |
| 59 // Sets the cell's title. | 60 // Sets the cell's title. |
| 60 - (void)setTitle:(NSString*)title; | 61 - (void)setTitle:(NSString*)title; |
| 61 // Sets the session's URL to obtain the cell's favicon. | 62 // Sets the session's URL to obtain the cell's favicon. |
| 62 - (void)setSessionGURL:(GURL const&)gurl | 63 - (void)setSessionGURL:(GURL const&)gurl |
| 63 withBrowserState:(ios::ChromeBrowserState*)browserState; | 64 withBrowserState:(ios::ChromeBrowserState*)browserState; |
| 64 // Sets the cell's delegate. | |
| 65 - (void)setDelegate:(id<SessionCellDelegate>)delegate; | |
| 66 | 65 |
| 67 @end | 66 @end |
| 68 | 67 |
| 69 #endif // IOS_CHROME_BROWSER_UI_TAB_SWITCHER_TAB_SWITCHER_PANEL_CELL_H_ | 68 #endif // IOS_CHROME_BROWSER_UI_TAB_SWITCHER_TAB_SWITCHER_PANEL_CELL_H_ |
| OLD | NEW |