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/chrome/browser/ui/tools_menu/tools_menu_view_tools_cell.h" | 5 #import "ios/chrome/browser/ui/tools_menu/tools_menu_view_tools_cell.h" |
6 | 6 |
7 #include "components/strings/grit/components_strings.h" | 7 #include "components/strings/grit/components_strings.h" |
8 #include "ios/chrome/browser/ui/commands/ios_command_ids.h" | 8 #include "ios/chrome/browser/ui/commands/ios_command_ids.h" |
9 #include "ios/chrome/browser/ui/rtl_geometry.h" | 9 #include "ios/chrome/browser/ui/rtl_geometry.h" |
10 #include "ios/chrome/browser/ui/toolbar/toolbar_resource_macros.h" | 10 #include "ios/chrome/browser/ui/toolbar/toolbar_resource_macros.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 automationName:@"Stop"]; | 71 automationName:@"Stop"]; |
72 | 72 |
73 int share[2][3] = TOOLBAR_IDR_THREE_STATE(SHARE); | 73 int share[2][3] = TOOLBAR_IDR_THREE_STATE(SHARE); |
74 _shareButton = [self newButtonForImageIds:share | 74 _shareButton = [self newButtonForImageIds:share |
75 commandID:TOOLS_SHARE_ITEM | 75 commandID:TOOLS_SHARE_ITEM |
76 accessibilityLabelID:IDS_IOS_TOOLS_MENU_SHARE | 76 accessibilityLabelID:IDS_IOS_TOOLS_MENU_SHARE |
77 automationName:@"Stop"]; | 77 automationName:@"Stop"]; |
78 int tools[2][3] = TOOLBAR_IDR_ONE_STATE(TOOLS_PRESSED); | 78 int tools[2][3] = TOOLBAR_IDR_ONE_STATE(TOOLS_PRESSED); |
79 _toolsButton = | 79 _toolsButton = |
80 [self newButtonForImageIds:tools | 80 [self newButtonForImageIds:tools |
81 commandID:IDC_SHOW_TOOLS_MENU | 81 commandID:TOOLS_MENU_ITEM |
82 accessibilityLabelID:IDS_IOS_TOOLBAR_CLOSE_MENU | 82 accessibilityLabelID:IDS_IOS_TOOLBAR_CLOSE_MENU |
83 automationName:@"kToolbarToolsMenuButtonIdentifier"]; | 83 automationName:@"kToolbarToolsMenuButtonIdentifier"]; |
84 | 84 |
85 UIView* contentView = [self contentView]; | 85 UIView* contentView = [self contentView]; |
86 [contentView setBackgroundColor:[self backgroundColor]]; | 86 [contentView setBackgroundColor:[self backgroundColor]]; |
87 [contentView setOpaque:YES]; | 87 [contentView setOpaque:YES]; |
88 | 88 |
89 [contentView addSubview:_starredButton]; | 89 [contentView addSubview:_starredButton]; |
90 [contentView addSubview:_starButton]; | 90 [contentView addSubview:_starButton]; |
91 [contentView addSubview:_stopButton]; | 91 [contentView addSubview:_stopButton]; |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 if (_reloadButton) | 189 if (_reloadButton) |
190 [allButtons addObject:_reloadButton]; | 190 [allButtons addObject:_reloadButton]; |
191 | 191 |
192 if (_stopButton) | 192 if (_stopButton) |
193 [allButtons addObject:_stopButton]; | 193 [allButtons addObject:_stopButton]; |
194 | 194 |
195 return allButtons; | 195 return allButtons; |
196 } | 196 } |
197 | 197 |
198 @end | 198 @end |
OLD | NEW |