OLD | NEW |
---|---|
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/clean/chrome/browser/ui/tab_strip/tab_strip_toolbar.h" | 5 #import "ios/clean/chrome/browser/ui/tab_strip/tab_strip_toolbar.h" |
6 | 6 |
7 #import "ios/chrome/browser/ui/icons/chrome_icon.h" | 7 #import "ios/chrome/browser/ui/icons/chrome_icon.h" |
8 #import "ios/clean/chrome/browser/ui/actions/tab_strip_actions.h" | 8 #import "ios/clean/chrome/browser/ui/actions/tab_strip_actions.h" |
9 | 9 |
10 #if !defined(__has_feature) || !__has_feature(objc_arc) | 10 #if !defined(__has_feature) || !__has_feature(objc_arc) |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
42 toolbar.layoutMarginsRelativeArrangement = YES; | 42 toolbar.layoutMarginsRelativeArrangement = YES; |
43 toolbar.layoutMargins = UIEdgeInsetsMake(0, 0, kSpacing, 0); | 43 toolbar.layoutMargins = UIEdgeInsetsMake(0, 0, kSpacing, 0); |
44 toolbar.distribution = UIStackViewDistributionFillEqually; | 44 toolbar.distribution = UIStackViewDistributionFillEqually; |
45 return toolbar; | 45 return toolbar; |
46 } | 46 } |
47 | 47 |
48 - (UIButton*)closeButton { | 48 - (UIButton*)closeButton { |
49 UIButton* button = [UIButton buttonWithType:UIButtonTypeSystem]; | 49 UIButton* button = [UIButton buttonWithType:UIButtonTypeSystem]; |
50 [button setImage:[ChromeIcon closeIcon] forState:UIControlStateNormal]; | 50 [button setImage:[ChromeIcon closeIcon] forState:UIControlStateNormal]; |
51 [button setTintColor:[UIColor whiteColor]]; | 51 [button setTintColor:[UIColor whiteColor]]; |
52 // TODO(crbug.com/733453): Use dispatcher instead of responder chain. | |
sczs
2017/06/15 01:15:44
Adding this TODO so Ed doesn't miss it. I know he
| |
52 [button addTarget:nil | 53 [button addTarget:nil |
53 action:@selector(hideTabStrip:) | 54 action:@selector(hideTabStrip:) |
54 forControlEvents:UIControlEventTouchUpInside]; | 55 forControlEvents:UIControlEventTouchUpInside]; |
55 return button; | 56 return button; |
56 } | 57 } |
57 | 58 |
58 - (UIButton*)incognitoButton { | 59 - (UIButton*)incognitoButton { |
59 UIButton* button = [UIButton buttonWithType:UIButtonTypeSystem]; | 60 UIButton* button = [UIButton buttonWithType:UIButtonTypeSystem]; |
60 UIImage* image = [UIImage imageNamed:@"tabswitcher_incognito"]; | 61 UIImage* image = [UIImage imageNamed:@"tabswitcher_incognito"]; |
61 [button setImage:image forState:UIControlStateNormal]; | 62 [button setImage:image forState:UIControlStateNormal]; |
62 [button setTintColor:[UIColor whiteColor]]; | 63 [button setTintColor:[UIColor whiteColor]]; |
63 return button; | 64 return button; |
64 } | 65 } |
65 | 66 |
66 @end | 67 @end |
OLD | NEW |