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 #import "ios/chrome/browser/ui/tab_switcher/tab_switcher_session_cell_data.h" | 5 #import "ios/chrome/browser/ui/tab_switcher/tab_switcher_session_cell_data.h" |
6 #include "ios/chrome/grit/ios_strings.h" | 6 #include "ios/chrome/grit/ios_strings.h" |
7 #include "ui/base/l10n/l10n_util.h" | 7 #include "ui/base/l10n/l10n_util.h" |
8 | 8 |
| 9 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 10 #error "This file requires ARC support." |
| 11 #endif |
| 12 |
9 @implementation TabSwitcherSessionCellData | 13 @implementation TabSwitcherSessionCellData |
10 | 14 |
11 @synthesize type = _type; | 15 @synthesize type = _type; |
12 @synthesize title = _title; | 16 @synthesize title = _title; |
13 @synthesize image = _image; | 17 @synthesize image = _image; |
14 | 18 |
15 + (instancetype)incognitoSessionCellData { | 19 + (instancetype)incognitoSessionCellData { |
16 static TabSwitcherSessionCellData* incognitoSessionCellData = nil; | 20 static TabSwitcherSessionCellData* incognitoSessionCellData = nil; |
17 static dispatch_once_t onceToken; | 21 static dispatch_once_t onceToken; |
18 dispatch_once(&onceToken, ^{ | 22 dispatch_once(&onceToken, ^{ |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 messageId = IDS_IOS_TAB_SWITCHER_HEADER_OTHER_DEVICES_TABS; | 86 messageId = IDS_IOS_TAB_SWITCHER_HEADER_OTHER_DEVICES_TABS; |
83 break; | 87 break; |
84 } | 88 } |
85 [self setTitle:l10n_util::GetNSString(messageId)]; | 89 [self setTitle:l10n_util::GetNSString(messageId)]; |
86 UIImage* image = [UIImage imageNamed:imageName]; | 90 UIImage* image = [UIImage imageNamed:imageName]; |
87 image = [image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; | 91 image = [image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; |
88 [self setImage:image]; | 92 [self setImage:image]; |
89 } | 93 } |
90 | 94 |
91 @end | 95 @end |
OLD | NEW |