Chromium Code Reviews| 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_SESSION_CELL_DATA_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_TAB_SWITCHER_TAB_SWITCHER_SESSION_CELL_DATA_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_TAB_SWITCHER_TAB_SWITCHER_SESSION_CELL_DATA_H_ | 6 #define IOS_CHROME_BROWSER_UI_TAB_SWITCHER_TAB_SWITCHER_SESSION_CELL_DATA_H_ |
| 7 | 7 |
| 8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
| 9 | 9 |
| 10 @class TabSwitcherHeaderView; | 10 @class TabSwitcherHeaderView; |
| 11 | 11 |
| 12 namespace ios_internal { | |
| 13 enum SessionCellType { | 12 enum SessionCellType { |
|
sdefresne
2017/01/03 16:04:30
nit: maybe rename TabSwitcherSessionCellType.
rohitrao (ping after 24h)
2017/01/04 13:36:38
Done.
| |
| 14 kIncognitoSessionCell, | 13 kIncognitoSessionCell, |
| 15 kOpenTabSessionCell, | 14 kOpenTabSessionCell, |
| 16 kGenericRemoteSessionCell, | 15 kGenericRemoteSessionCell, |
| 17 kPhoneRemoteSessionCell, | 16 kPhoneRemoteSessionCell, |
| 18 kTabletRemoteSessionCell, | 17 kTabletRemoteSessionCell, |
| 19 kLaptopRemoteSessionCell, | 18 kLaptopRemoteSessionCell, |
| 20 }; | 19 }; |
| 21 } | |
| 22 | 20 |
| 23 // This class hold the data used to configure the content of a | 21 // This class hold the data used to configure the content of a |
| 24 // TabSwitcherHeaderCell. | 22 // TabSwitcherHeaderCell. |
| 25 @interface SessionCellData : NSObject | 23 @interface SessionCellData : NSObject |
|
rohitrao (ping after 24h)
2017/01/04 13:36:38
This class should perhaps also be renamed to TabSw
| |
| 26 | 24 |
| 27 // Those two methods are used to create incognito and open tab cell data. | 25 // Those two methods are used to create incognito and open tab cell data. |
| 28 // Each method create a SessionCellData object on the first call and returns | 26 // Each method create a SessionCellData object on the first call and returns |
| 29 // the same instance on further calls. | 27 // the same instance on further calls. |
| 30 + (instancetype)incognitoSessionCellData; | 28 + (instancetype)incognitoSessionCellData; |
| 31 + (instancetype)openTabSessionCellData; | 29 + (instancetype)openTabSessionCellData; |
| 32 + (instancetype)otherDevicesSessionCellData; | 30 + (instancetype)otherDevicesSessionCellData; |
| 33 | 31 |
| 34 - (instancetype)initWithSessionCellType:(ios_internal::SessionCellType)type; | 32 - (instancetype)initWithSessionCellType:(SessionCellType)type; |
| 35 | 33 |
| 36 @property(nonatomic, readonly) ios_internal::SessionCellType type; | 34 @property(nonatomic, readonly) SessionCellType type; |
| 37 @property(nonatomic, copy) NSString* title; | 35 @property(nonatomic, copy) NSString* title; |
| 38 @property(nonatomic, retain) UIImage* image; | 36 @property(nonatomic, retain) UIImage* image; |
| 39 | 37 |
| 40 @end | 38 @end |
| 41 | 39 |
| 42 #endif // IOS_CHROME_BROWSER_UI_TAB_SWITCHER_TAB_SWITCHER_SESSION_CELL_DATA_H_ | 40 #endif // IOS_CHROME_BROWSER_UI_TAB_SWITCHER_TAB_SWITCHER_SESSION_CELL_DATA_H_ |
| OLD | NEW |