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/sad_tab/sad_tab_view.h" | 5 #import "ios/chrome/browser/ui/sad_tab/sad_tab_view.h" |
6 | 6 |
7 #import "base/ios/weak_nsobject.h" | 7 #import "base/ios/weak_nsobject.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/mac/scoped_block.h" | 9 #include "base/mac/scoped_block.h" |
10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #import "ios/chrome/browser/ui/url_loader.h" | 21 #import "ios/chrome/browser/ui/url_loader.h" |
22 #import "ios/chrome/browser/ui/util/label_link_controller.h" | 22 #import "ios/chrome/browser/ui/util/label_link_controller.h" |
23 #import "ios/third_party/material_components_ios/src/components/Buttons/src/Mate
rialButtons.h" | 23 #import "ios/third_party/material_components_ios/src/components/Buttons/src/Mate
rialButtons.h" |
24 #import "ios/third_party/material_components_ios/src/components/Palettes/src/Mat
erialPalettes.h" | 24 #import "ios/third_party/material_components_ios/src/components/Palettes/src/Mat
erialPalettes.h" |
25 #import "ios/third_party/material_roboto_font_loader_ios/src/src/MaterialRobotoF
ontLoader.h" | 25 #import "ios/third_party/material_roboto_font_loader_ios/src/src/MaterialRobotoF
ontLoader.h" |
26 #include "ios/web/public/interstitials/web_interstitial.h" | 26 #include "ios/web/public/interstitials/web_interstitial.h" |
27 #include "ios/web/public/web_state/web_state.h" | 27 #include "ios/web/public/web_state/web_state.h" |
28 #import "net/base/mac/url_conversions.h" | 28 #import "net/base/mac/url_conversions.h" |
29 #include "ui/base/l10n/l10n_util.h" | 29 #include "ui/base/l10n/l10n_util.h" |
30 | 30 |
| 31 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 32 #error "This file requires ARC support." |
| 33 #endif |
| 34 |
31 namespace { | 35 namespace { |
32 // Color constants. | 36 // Color constants. |
33 const CGFloat kBackgroundColorBrightness = 247.0f / 255.0f; | 37 const CGFloat kBackgroundColorBrightness = 247.0f / 255.0f; |
34 const CGFloat kTitleLabelTextColorBrightness = 22.0f / 255.0f; | 38 const CGFloat kTitleLabelTextColorBrightness = 22.0f / 255.0f; |
35 const CGFloat kMessageLabelTextColorBrightness = 80.0f / 255.0f; | 39 const CGFloat kMessageLabelTextColorBrightness = 80.0f / 255.0f; |
36 // Layout constants. | 40 // Layout constants. |
37 const UIEdgeInsets kLayoutInsets = {24.0f, 24.0f, 24.0f, 24.0f}; | 41 const UIEdgeInsets kLayoutInsets = {24.0f, 24.0f, 24.0f, 24.0f}; |
38 const CGFloat kLayoutBoundsMaxWidth = 600.0f; | 42 const CGFloat kLayoutBoundsMaxWidth = 600.0f; |
39 const CGFloat kContainerViewLandscapeTopPadding = 22.0f; | 43 const CGFloat kContainerViewLandscapeTopPadding = 22.0f; |
40 const CGFloat kTitleLabelTopPadding = 26.0f; | 44 const CGFloat kTitleLabelTopPadding = 26.0f; |
41 const CGFloat kMessageLabelTopPadding = 16.0f; | 45 const CGFloat kMessageLabelTopPadding = 16.0f; |
42 const CGFloat kHelpLabelTopPadding = 16.0f; | 46 const CGFloat kHelpLabelTopPadding = 16.0f; |
43 const CGFloat kReloadButtonHeight = 48.0f; | 47 const CGFloat kReloadButtonHeight = 48.0f; |
44 const CGFloat kReloadButtonTopPadding = 16.0f; | 48 const CGFloat kReloadButtonTopPadding = 16.0f; |
45 // Label font sizes. | 49 // Label font sizes. |
46 const CGFloat kTitleLabelFontSize = 23.0f; | 50 const CGFloat kTitleLabelFontSize = 23.0f; |
47 const CGFloat kMessageLabelFontSize = 14.0f; | 51 const CGFloat kMessageLabelFontSize = 14.0f; |
48 const CGFloat kHelpLabelFontSize = 14.0f; | 52 const CGFloat kHelpLabelFontSize = 14.0f; |
49 } // namespace | 53 } // namespace |
50 | 54 |
51 @interface SadTabView () { | 55 @interface SadTabView () |
52 // The block called when |_reloadButton| is tapped. | |
53 base::mac::ScopedBlock<ProceduralBlock> _reloadHandler; | |
54 // Backing objects for properties of the same name. | |
55 base::scoped_nsobject<UIView> _containerView; | |
56 base::scoped_nsobject<UIImageView> _imageView; | |
57 base::scoped_nsobject<UILabel> _titleLabel; | |
58 base::scoped_nsobject<UILabel> _messageLabel; | |
59 base::scoped_nsobject<UILabel> _helpLabel; | |
60 base::scoped_nsobject<LabelLinkController> _helpLabelLinkController; | |
61 base::scoped_nsobject<MDCButton> _reloadButton; | |
62 } | |
63 | 56 |
| 57 @property(nonatomic, readonly) ProceduralBlock reloadHandler; |
64 // Container view that displays all other subviews. | 58 // Container view that displays all other subviews. |
65 @property(nonatomic, readonly) UIView* containerView; | 59 @property(nonatomic, readonly, strong) UIView* containerView; |
66 // Displays the Sad Tab face. | 60 // Displays the Sad Tab face. |
67 @property(nonatomic, readonly) UIImageView* imageView; | 61 @property(nonatomic, readonly, strong) UIImageView* imageView; |
68 // Displays the Sad Tab title. | 62 // Displays the Sad Tab title. |
69 @property(nonatomic, readonly) UILabel* titleLabel; | 63 @property(nonatomic, readonly, strong) UILabel* titleLabel; |
70 // Displays the Sad Tab message. | 64 // Displays the Sad Tab message. |
71 @property(nonatomic, readonly) UILabel* messageLabel; | 65 @property(nonatomic, readonly, strong) UILabel* messageLabel; |
72 // Displays the Sad Tab help message. | 66 // Displays the Sad Tab help message. |
73 @property(nonatomic, readonly) UILabel* helpLabel; | 67 @property(nonatomic, readonly, strong) UILabel* helpLabel; |
| 68 @property(nonatomic, readonly, strong) |
| 69 LabelLinkController* helpLabelLinkController; |
74 // Button used to trigger a reload. | 70 // Button used to trigger a reload. |
75 @property(nonatomic, readonly) UIButton* reloadButton; | 71 @property(nonatomic, readonly, strong) MDCFlatButton* reloadButton; |
76 | 72 |
77 // The bounds of |containerView|, with a height updated to CGFLOAT_MAX to allow | 73 // The bounds of |containerView|, with a height updated to CGFLOAT_MAX to allow |
78 // text to be laid out using as many lines as necessary. | 74 // text to be laid out using as many lines as necessary. |
79 @property(nonatomic, readonly) CGRect containerBounds; | 75 @property(nonatomic, readonly) CGRect containerBounds; |
80 | 76 |
81 // Subview layout methods. Must be called in the following order, as subsequent | 77 // Subview layout methods. Must be called in the following order, as subsequent |
82 // layouts reference the values set in previous functions. | 78 // layouts reference the values set in previous functions. |
83 - (void)layoutImageView; | 79 - (void)layoutImageView; |
84 - (void)layoutTitleLabel; | 80 - (void)layoutTitleLabel; |
85 - (void)layoutMessageLabel; | 81 - (void)layoutMessageLabel; |
86 - (void)layoutHelpLabel; | 82 - (void)layoutHelpLabel; |
87 - (void)layoutReloadButton; | 83 - (void)layoutReloadButton; |
88 - (void)layoutContainerView; | 84 - (void)layoutContainerView; |
89 | 85 |
90 // The action selector for |_reloadButton|. | 86 // The action selector for |_reloadButton|. |
91 - (void)handleReloadButtonTapped; | 87 - (void)handleReloadButtonTapped; |
92 | 88 |
93 // Returns the desired background color. | 89 // Returns the desired background color. |
94 + (UIColor*)sadTabBackgroundColor; | 90 + (UIColor*)sadTabBackgroundColor; |
95 | 91 |
96 @end | 92 @end |
97 | 93 |
98 #pragma mark - SadTabView | 94 #pragma mark - SadTabView |
99 | 95 |
100 @implementation SadTabView | 96 @implementation SadTabView |
101 | 97 |
| 98 @synthesize imageView = _imageView; |
| 99 @synthesize containerView = _containerView; |
| 100 @synthesize titleLabel = _titleLabel; |
| 101 @synthesize messageLabel = _messageLabel; |
| 102 @synthesize helpLabel = _helpLabel; |
| 103 @synthesize helpLabelLinkController = _helpLabelLinkController; |
| 104 @synthesize reloadButton = _reloadButton; |
| 105 @synthesize reloadHandler = _reloadHandler; |
| 106 |
102 - (instancetype)initWithReloadHandler:(ProceduralBlock)reloadHandler { | 107 - (instancetype)initWithReloadHandler:(ProceduralBlock)reloadHandler { |
103 self = [super initWithFrame:CGRectZero]; | 108 self = [super initWithFrame:CGRectZero]; |
104 if (self) { | 109 if (self) { |
105 DCHECK(reloadHandler); | 110 DCHECK(reloadHandler); |
106 _reloadHandler.reset([reloadHandler copy]); | 111 _reloadHandler = [reloadHandler copy]; |
107 self.backgroundColor = [[self class] sadTabBackgroundColor]; | 112 self.backgroundColor = [[self class] sadTabBackgroundColor]; |
108 } | 113 } |
109 return self; | 114 return self; |
110 } | 115 } |
111 | 116 |
112 - (instancetype)init { | 117 - (instancetype)init { |
113 NOTREACHED(); | 118 NOTREACHED(); |
114 return nil; | 119 return nil; |
115 } | 120 } |
116 | 121 |
117 - (instancetype)initWithFrame:(CGRect)frame { | 122 - (instancetype)initWithFrame:(CGRect)frame { |
118 NOTREACHED(); | 123 NOTREACHED(); |
119 return nil; | 124 return nil; |
120 } | 125 } |
121 | 126 |
122 - (instancetype)initWithCoder:(NSCoder*)aDecoder { | 127 - (instancetype)initWithCoder:(NSCoder*)aDecoder { |
123 NOTREACHED(); | 128 NOTREACHED(); |
124 return nil; | 129 return nil; |
125 } | 130 } |
126 | 131 |
127 #pragma mark Accessors | 132 #pragma mark Accessors |
128 | 133 |
129 - (UIView*)containerView { | 134 - (UIView*)containerView { |
130 if (!_containerView) { | 135 if (!_containerView) { |
131 _containerView.reset([[UIView alloc] initWithFrame:CGRectZero]); | 136 _containerView = [[UIView alloc] initWithFrame:CGRectZero]; |
132 [_containerView setBackgroundColor:self.backgroundColor]; | 137 [_containerView setBackgroundColor:self.backgroundColor]; |
133 } | 138 } |
134 return _containerView; | 139 return _containerView; |
135 } | 140 } |
136 | 141 |
137 - (UIImageView*)imageView { | 142 - (UIImageView*)imageView { |
138 if (!_imageView) { | 143 if (!_imageView) { |
139 _imageView.reset( | 144 _imageView = |
140 [[UIImageView alloc] initWithImage:NativeImage(IDR_CRASH_SAD_TAB)]); | 145 [[UIImageView alloc] initWithImage:NativeImage(IDR_CRASH_SAD_TAB)]; |
141 [_imageView setBackgroundColor:self.backgroundColor]; | 146 [_imageView setBackgroundColor:self.backgroundColor]; |
142 } | 147 } |
143 return _imageView.get(); | 148 return _imageView; |
144 } | 149 } |
145 | 150 |
146 - (UILabel*)titleLabel { | 151 - (UILabel*)titleLabel { |
147 if (!_titleLabel) { | 152 if (!_titleLabel) { |
148 _titleLabel.reset([[UILabel alloc] initWithFrame:CGRectZero]); | 153 _titleLabel = [[UILabel alloc] initWithFrame:CGRectZero]; |
149 [_titleLabel setBackgroundColor:self.backgroundColor]; | 154 [_titleLabel setBackgroundColor:self.backgroundColor]; |
150 [_titleLabel setText:base::SysUTF8ToNSString( | 155 [_titleLabel setText:base::SysUTF8ToNSString( |
151 l10n_util::GetStringUTF8(IDS_SAD_TAB_TITLE))]; | 156 l10n_util::GetStringUTF8(IDS_SAD_TAB_TITLE))]; |
152 [_titleLabel setLineBreakMode:NSLineBreakByWordWrapping]; | 157 [_titleLabel setLineBreakMode:NSLineBreakByWordWrapping]; |
153 [_titleLabel setNumberOfLines:0]; | 158 [_titleLabel setNumberOfLines:0]; |
154 [_titleLabel | 159 [_titleLabel |
155 setTextColor:[UIColor colorWithWhite:kTitleLabelTextColorBrightness | 160 setTextColor:[UIColor colorWithWhite:kTitleLabelTextColorBrightness |
156 alpha:1.0]]; | 161 alpha:1.0]]; |
157 [_titleLabel setFont:[[MDFRobotoFontLoader sharedInstance] | 162 [_titleLabel setFont:[[MDFRobotoFontLoader sharedInstance] |
158 regularFontOfSize:kTitleLabelFontSize]]; | 163 regularFontOfSize:kTitleLabelFontSize]]; |
159 } | 164 } |
160 return _titleLabel.get(); | 165 return _titleLabel; |
161 } | 166 } |
162 | 167 |
163 - (UILabel*)messageLabel { | 168 - (UILabel*)messageLabel { |
164 if (!_messageLabel) { | 169 if (!_messageLabel) { |
165 _messageLabel.reset([[UILabel alloc] initWithFrame:CGRectZero]); | 170 _messageLabel = [[UILabel alloc] initWithFrame:CGRectZero]; |
166 [_messageLabel setBackgroundColor:self.backgroundColor]; | 171 [_messageLabel setBackgroundColor:self.backgroundColor]; |
167 std::string messageText = l10n_util::GetStringUTF8(IDS_SAD_TAB_MESSAGE); | 172 std::string messageText = l10n_util::GetStringUTF8(IDS_SAD_TAB_MESSAGE); |
168 [_messageLabel setText:base::SysUTF8ToNSString(messageText)]; | 173 [_messageLabel setText:base::SysUTF8ToNSString(messageText)]; |
169 [_messageLabel setLineBreakMode:NSLineBreakByWordWrapping]; | 174 [_messageLabel setLineBreakMode:NSLineBreakByWordWrapping]; |
170 [_messageLabel setNumberOfLines:0]; | 175 [_messageLabel setNumberOfLines:0]; |
171 [_messageLabel | 176 [_messageLabel |
172 setTextColor:[UIColor colorWithWhite:kMessageLabelTextColorBrightness | 177 setTextColor:[UIColor colorWithWhite:kMessageLabelTextColorBrightness |
173 alpha:1.0]]; | 178 alpha:1.0]]; |
174 [_messageLabel setFont:[[MDFRobotoFontLoader sharedInstance] | 179 [_messageLabel setFont:[[MDFRobotoFontLoader sharedInstance] |
175 regularFontOfSize:kMessageLabelFontSize]]; | 180 regularFontOfSize:kMessageLabelFontSize]]; |
176 } | 181 } |
177 return _messageLabel.get(); | 182 return _messageLabel; |
178 } | 183 } |
179 | 184 |
180 - (UILabel*)helpLabel { | 185 - (UILabel*)helpLabel { |
181 if (!_helpLabel) { | 186 if (!_helpLabel) { |
182 _helpLabel.reset([[UILabel alloc] initWithFrame:CGRectZero]); | 187 _helpLabel = [[UILabel alloc] initWithFrame:CGRectZero]; |
183 [_helpLabel setBackgroundColor:self.backgroundColor]; | 188 [_helpLabel setBackgroundColor:self.backgroundColor]; |
184 [_helpLabel setNumberOfLines:0]; | 189 [_helpLabel setNumberOfLines:0]; |
185 [_helpLabel setFont:[[MDFRobotoFontLoader sharedInstance] | 190 [_helpLabel setFont:[[MDFRobotoFontLoader sharedInstance] |
186 regularFontOfSize:kHelpLabelFontSize]]; | 191 regularFontOfSize:kHelpLabelFontSize]]; |
187 [_helpLabel | 192 [_helpLabel |
188 setTextColor:[UIColor colorWithWhite:kMessageLabelTextColorBrightness | 193 setTextColor:[UIColor colorWithWhite:kMessageLabelTextColorBrightness |
189 alpha:1.0]]; | 194 alpha:1.0]]; |
190 // Fetch help text. | 195 // Fetch help text. |
191 base::string16 helpLinkText( | 196 base::string16 helpLinkText( |
192 l10n_util::GetStringUTF16(IDS_SAD_TAB_HELP_LINK)); | 197 l10n_util::GetStringUTF16(IDS_SAD_TAB_HELP_LINK)); |
193 NSString* helpText = base::SysUTF16ToNSString( | 198 NSString* helpText = base::SysUTF16ToNSString( |
194 l10n_util::GetStringFUTF16(IDS_SAD_TAB_HELP_MESSAGE, helpLinkText)); | 199 l10n_util::GetStringFUTF16(IDS_SAD_TAB_HELP_MESSAGE, helpLinkText)); |
195 [_helpLabel setText:helpText]; | 200 [_helpLabel setText:helpText]; |
196 // Create link controller. | 201 // Create link controller. |
197 base::WeakNSObject<SadTabView> weakSelf(self); | 202 base::WeakNSObject<SadTabView> weakSelf(self); |
198 _helpLabelLinkController.reset([[LabelLinkController alloc] | 203 _helpLabelLinkController = [[LabelLinkController alloc] |
199 initWithLabel:_helpLabel | 204 initWithLabel:_helpLabel |
200 action:^(const GURL& url) { | 205 action:^(const GURL& url) { |
201 base::scoped_nsobject<OpenUrlCommand> openCommand( | 206 base::scoped_nsobject<OpenUrlCommand> openCommand( |
202 [[OpenUrlCommand alloc] initWithURLFromChrome:url]); | 207 [[OpenUrlCommand alloc] initWithURLFromChrome:url]); |
203 [weakSelf chromeExecuteCommand:openCommand]; | 208 [weakSelf chromeExecuteCommand:openCommand]; |
204 }]); | 209 }]; |
205 [_helpLabelLinkController | 210 [_helpLabelLinkController |
206 setLinkFont:[[MDFRobotoFontLoader sharedInstance] | 211 setLinkFont:[[MDFRobotoFontLoader sharedInstance] |
207 boldFontOfSize:kHelpLabelFontSize]]; | 212 boldFontOfSize:kHelpLabelFontSize]]; |
208 [_helpLabelLinkController setLinkUnderlineStyle:NSUnderlineStyleSingle]; | 213 [_helpLabelLinkController setLinkUnderlineStyle:NSUnderlineStyleSingle]; |
209 NSRange linkRange = | 214 NSRange linkRange = |
210 [helpText rangeOfString:base::SysUTF16ToNSString(helpLinkText)]; | 215 [helpText rangeOfString:base::SysUTF16ToNSString(helpLinkText)]; |
211 DCHECK_NE(linkRange.location, static_cast<NSUInteger>(NSNotFound)); | 216 DCHECK_NE(linkRange.location, static_cast<NSUInteger>(NSNotFound)); |
212 DCHECK_NE(linkRange.length, 0U); | 217 DCHECK_NE(linkRange.length, 0U); |
213 [_helpLabelLinkController addLinkWithRange:linkRange | 218 [_helpLabelLinkController addLinkWithRange:linkRange |
214 url:GURL(kCrashReasonURL)]; | 219 url:GURL(kCrashReasonURL)]; |
215 } | 220 } |
216 return _helpLabel.get(); | 221 return _helpLabel; |
217 } | 222 } |
218 | 223 |
219 - (UIButton*)reloadButton { | 224 - (UIButton*)reloadButton { |
220 if (!_reloadButton) { | 225 if (!_reloadButton) { |
221 _reloadButton.reset([[MDCFlatButton alloc] init]); | 226 _reloadButton = [[MDCFlatButton alloc] init]; |
222 [_reloadButton setBackgroundColor:[[MDCPalette cr_bluePalette] tint500] | 227 [_reloadButton setBackgroundColor:[[MDCPalette cr_bluePalette] tint500] |
223 forState:UIControlStateNormal]; | 228 forState:UIControlStateNormal]; |
224 [_reloadButton setBackgroundColor:[[MDCPalette greyPalette] tint500] | 229 [_reloadButton setBackgroundColor:[[MDCPalette greyPalette] tint500] |
225 forState:UIControlStateDisabled]; | 230 forState:UIControlStateDisabled]; |
226 [_reloadButton setCustomTitleColor:[UIColor whiteColor]]; | 231 [_reloadButton setCustomTitleColor:[UIColor whiteColor]]; |
227 [_reloadButton setUnderlyingColorHint:[UIColor blackColor]]; | 232 [_reloadButton setUnderlyingColorHint:[UIColor blackColor]]; |
228 [_reloadButton setInkColor:[UIColor colorWithWhite:1 alpha:0.2f]]; | 233 [_reloadButton setInkColor:[UIColor colorWithWhite:1 alpha:0.2f]]; |
229 NSString* title = base::SysUTF8ToNSString( | 234 NSString* title = base::SysUTF8ToNSString( |
230 l10n_util::GetStringUTF8(IDS_SAD_TAB_RELOAD_LABEL)); | 235 l10n_util::GetStringUTF8(IDS_SAD_TAB_RELOAD_LABEL)); |
231 [_reloadButton setTitle:title forState:UIControlStateNormal]; | 236 [_reloadButton setTitle:title forState:UIControlStateNormal]; |
232 [_reloadButton setTitleColor:[UIColor whiteColor] | 237 [_reloadButton setTitleColor:[UIColor whiteColor] |
233 forState:UIControlStateNormal]; | 238 forState:UIControlStateNormal]; |
234 [_reloadButton addTarget:self | 239 [_reloadButton addTarget:self |
235 action:@selector(handleReloadButtonTapped) | 240 action:@selector(handleReloadButtonTapped) |
236 forControlEvents:UIControlEventTouchUpInside]; | 241 forControlEvents:UIControlEventTouchUpInside]; |
237 } | 242 } |
238 return _reloadButton.get(); | 243 return _reloadButton; |
239 } | 244 } |
240 | 245 |
241 - (CGRect)containerBounds { | 246 - (CGRect)containerBounds { |
242 CGFloat containerWidth = std::min( | 247 CGFloat containerWidth = std::min( |
243 CGRectGetWidth(self.bounds) - kLayoutInsets.left - kLayoutInsets.right, | 248 CGRectGetWidth(self.bounds) - kLayoutInsets.left - kLayoutInsets.right, |
244 kLayoutBoundsMaxWidth); | 249 kLayoutBoundsMaxWidth); |
245 return CGRectMake(0.0, 0.0, containerWidth, CGFLOAT_MAX); | 250 return CGRectMake(0.0, 0.0, containerWidth, CGFLOAT_MAX); |
246 } | 251 } |
247 | 252 |
248 #pragma mark Layout | 253 #pragma mark Layout |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 | 385 |
381 #pragma mark Util | 386 #pragma mark Util |
382 | 387 |
383 - (void)handleHelpLabelLinkButtonTapped { | 388 - (void)handleHelpLabelLinkButtonTapped { |
384 base::scoped_nsobject<OpenUrlCommand> openCommand( | 389 base::scoped_nsobject<OpenUrlCommand> openCommand( |
385 [[OpenUrlCommand alloc] initWithURLFromChrome:GURL(kCrashReasonURL)]); | 390 [[OpenUrlCommand alloc] initWithURLFromChrome:GURL(kCrashReasonURL)]); |
386 [self chromeExecuteCommand:openCommand]; | 391 [self chromeExecuteCommand:openCommand]; |
387 } | 392 } |
388 | 393 |
389 - (void)handleReloadButtonTapped { | 394 - (void)handleReloadButtonTapped { |
390 _reloadHandler.get()(); | 395 self.reloadHandler(); |
391 } | 396 } |
392 | 397 |
393 + (UIColor*)sadTabBackgroundColor { | 398 + (UIColor*)sadTabBackgroundColor { |
394 return [UIColor colorWithWhite:kBackgroundColorBrightness alpha:1.0]; | 399 return [UIColor colorWithWhite:kBackgroundColorBrightness alpha:1.0]; |
395 } | 400 } |
396 | 401 |
397 @end | 402 @end |
OLD | NEW |