Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: ios/chrome/browser/ui/tools_menu/tools_menu_view_tools_cell.mm

Issue 2965963002: [ios] Remove IDC_STOP and IDC_RELOAD
Patch Set: Rebased. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 #import "ios/chrome/browser/ui/tools_menu/tools_menu_view_controller.h"
11 #import "ios/chrome/browser/ui/uikit_ui_util.h" 12 #import "ios/chrome/browser/ui/uikit_ui_util.h"
12 #include "ios/chrome/grit/ios_strings.h" 13 #include "ios/chrome/grit/ios_strings.h"
13 14
14 // TODO(crbug.com/228521): Remove this once the new command/metric handling is 15 // TODO(crbug.com/228521): Remove this once the new command/metric handling is
15 // implemented. This is a temporary workaround to allow metrics recording to 16 // implemented. This is a temporary workaround to allow metrics recording to
16 // distinguish the action. The value used is in the dynamic range (< 17 // distinguish the action. The value used is in the dynamic range (<
17 // IDC_MinimumLabelValue) to avoid collisions. 18 // IDC_MinimumLabelValue) to avoid collisions.
18 #define IDC_TEMP_EDIT_BOOKMARK 3900 19 #define IDC_TEMP_EDIT_BOOKMARK 3900
19 20
20 #if !defined(__has_feature) || !__has_feature(objc_arc) 21 #if !defined(__has_feature) || !__has_feature(objc_arc)
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 automationName:@"Add Bookmark"]; 58 automationName:@"Add Bookmark"];
58 59
59 int star_pressed[2][3] = TOOLBAR_IDR_ONE_STATE(STAR_PRESSED); 60 int star_pressed[2][3] = TOOLBAR_IDR_ONE_STATE(STAR_PRESSED);
60 _starredButton = [self newButtonForImageIds:star_pressed 61 _starredButton = [self newButtonForImageIds:star_pressed
61 commandID:IDC_TEMP_EDIT_BOOKMARK 62 commandID:IDC_TEMP_EDIT_BOOKMARK
62 accessibilityLabelID:IDS_IOS_TOOLS_MENU_EDIT_BOOKMARK 63 accessibilityLabelID:IDS_IOS_TOOLS_MENU_EDIT_BOOKMARK
63 automationName:@"Edit Bookmark"]; 64 automationName:@"Edit Bookmark"];
64 65
65 int reload[2][3] = TOOLBAR_IDR_TWO_STATE(RELOAD); 66 int reload[2][3] = TOOLBAR_IDR_TWO_STATE(RELOAD);
66 _reloadButton = [self newButtonForImageIds:reload 67 _reloadButton = [self newButtonForImageIds:reload
67 commandID:IDC_RELOAD 68 commandID:TOOLS_RELAOD_ITEM
68 accessibilityLabelID:IDS_IOS_ACCNAME_RELOAD 69 accessibilityLabelID:IDS_IOS_ACCNAME_RELOAD
69 automationName:@"Reload" 70 automationName:@"Reload"
70 reverseForRTL:YES]; 71 reverseForRTL:YES];
71 72
72 int stop[2][3] = TOOLBAR_IDR_TWO_STATE(STOP); 73 int stop[2][3] = TOOLBAR_IDR_TWO_STATE(STOP);
73 _stopButton = [self newButtonForImageIds:stop 74 _stopButton = [self newButtonForImageIds:stop
74 commandID:IDC_STOP 75 commandID:TOOLS_STOP_ITEM
75 accessibilityLabelID:IDS_IOS_ACCNAME_STOP 76 accessibilityLabelID:IDS_IOS_ACCNAME_STOP
76 automationName:@"Stop"]; 77 automationName:@"Stop"];
77 78
78 int share[2][3] = TOOLBAR_IDR_THREE_STATE(SHARE); 79 int share[2][3] = TOOLBAR_IDR_THREE_STATE(SHARE);
79 _shareButton = [self newButtonForImageIds:share 80 _shareButton = [self newButtonForImageIds:share
80 commandID:IDC_SHARE_PAGE 81 commandID:IDC_SHARE_PAGE
81 accessibilityLabelID:IDS_IOS_TOOLS_MENU_SHARE 82 accessibilityLabelID:IDS_IOS_TOOLS_MENU_SHARE
82 automationName:@"Stop"]; 83 automationName:@"Stop"];
83 int tools[2][3] = TOOLBAR_IDR_ONE_STATE(TOOLS_PRESSED); 84 int tools[2][3] = TOOLBAR_IDR_ONE_STATE(TOOLS_PRESSED);
84 _toolsButton = 85 _toolsButton =
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 if (_reloadButton) 195 if (_reloadButton)
195 [allButtons addObject:_reloadButton]; 196 [allButtons addObject:_reloadButton];
196 197
197 if (_stopButton) 198 if (_stopButton)
198 [allButtons addObject:_stopButton]; 199 [allButtons addObject:_stopButton];
199 200
200 return allButtons; 201 return allButtons;
201 } 202 }
202 203
203 @end 204 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698