OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_popup_controller.h" | 5 #import "ios/chrome/browser/ui/tools_menu/tools_popup_controller.h" |
6 | 6 |
7 #import <QuartzCore/QuartzCore.h> | 7 #import <QuartzCore/QuartzCore.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/user_metrics.h" | 10 #include "base/metrics/user_metrics.h" |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 155 |
156 - (void)setIsTabLoading:(BOOL)isTabLoading { | 156 - (void)setIsTabLoading:(BOOL)isTabLoading { |
157 [_toolsMenuViewController setIsTabLoading:isTabLoading]; | 157 [_toolsMenuViewController setIsTabLoading:isTabLoading]; |
158 } | 158 } |
159 | 159 |
160 #pragma mark - ToolsPopupTableDelegate methods | 160 #pragma mark - ToolsPopupTableDelegate methods |
161 | 161 |
162 - (void)commandWasSelected:(int)commandID { | 162 - (void)commandWasSelected:(int)commandID { |
163 // Record the corresponding metric. | 163 // Record the corresponding metric. |
164 switch (commandID) { | 164 switch (commandID) { |
165 case IDC_TEMP_EDIT_BOOKMARK: | 165 case TOOLS_BOOKMARK_EDIT: |
166 base::RecordAction(UserMetricsAction("MobileMenuEditBookmark")); | 166 base::RecordAction(UserMetricsAction("MobileMenuEditBookmark")); |
167 break; | 167 break; |
168 case IDC_BOOKMARK_PAGE: | 168 case TOOLS_BOOKMARK_ITEM: |
169 base::RecordAction(UserMetricsAction("MobileMenuAddToBookmarks")); | 169 base::RecordAction(UserMetricsAction("MobileMenuAddToBookmarks")); |
170 break; | 170 break; |
171 case IDC_CLOSE_ALL_TABS: | 171 case IDC_CLOSE_ALL_TABS: |
172 base::RecordAction(UserMetricsAction("MobileMenuCloseAllTabs")); | 172 base::RecordAction(UserMetricsAction("MobileMenuCloseAllTabs")); |
173 break; | 173 break; |
174 case IDC_CLOSE_ALL_INCOGNITO_TABS: | 174 case IDC_CLOSE_ALL_INCOGNITO_TABS: |
175 base::RecordAction(UserMetricsAction("MobileMenuCloseAllIncognitoTabs")); | 175 base::RecordAction(UserMetricsAction("MobileMenuCloseAllIncognitoTabs")); |
176 break; | 176 break; |
177 case IDC_FIND: | 177 case IDC_FIND: |
178 base::RecordAction(UserMetricsAction("MobileMenuFindInPage")); | 178 base::RecordAction(UserMetricsAction("MobileMenuFindInPage")); |
179 break; | 179 break; |
180 case IDC_HELP_PAGE_VIA_MENU: | 180 case IDC_HELP_PAGE_VIA_MENU: |
181 base::RecordAction(UserMetricsAction("MobileMenuHelp")); | 181 base::RecordAction(UserMetricsAction("MobileMenuHelp")); |
182 break; | 182 break; |
183 case IDC_NEW_INCOGNITO_TAB: | 183 case IDC_NEW_INCOGNITO_TAB: |
184 base::RecordAction(UserMetricsAction("MobileMenuNewIncognitoTab")); | 184 base::RecordAction(UserMetricsAction("MobileMenuNewIncognitoTab")); |
185 break; | 185 break; |
186 case IDC_NEW_TAB: | 186 case IDC_NEW_TAB: |
187 base::RecordAction(UserMetricsAction("MobileMenuNewTab")); | 187 base::RecordAction(UserMetricsAction("MobileMenuNewTab")); |
188 break; | 188 break; |
189 case IDC_OPTIONS: | 189 case IDC_OPTIONS: |
190 base::RecordAction(UserMetricsAction("MobileMenuSettings")); | 190 base::RecordAction(UserMetricsAction("MobileMenuSettings")); |
191 break; | 191 break; |
192 case TOOLS_RELAOD_ITEM: | 192 case TOOLS_RELAOD_ITEM: |
193 base::RecordAction(UserMetricsAction("MobileMenuReload")); | 193 base::RecordAction(UserMetricsAction("MobileMenuReload")); |
194 break; | 194 break; |
195 case IDC_SHARE_PAGE: | 195 case TOOLS_SHARE_ITEM: |
196 base::RecordAction(UserMetricsAction("MobileMenuShare")); | 196 base::RecordAction(UserMetricsAction("MobileMenuShare")); |
197 break; | 197 break; |
198 case IDC_REQUEST_DESKTOP_SITE: | 198 case IDC_REQUEST_DESKTOP_SITE: |
199 base::RecordAction(UserMetricsAction("MobileMenuRequestDesktopSite")); | 199 base::RecordAction(UserMetricsAction("MobileMenuRequestDesktopSite")); |
200 break; | 200 break; |
201 case IDC_REQUEST_MOBILE_SITE: | 201 case IDC_REQUEST_MOBILE_SITE: |
202 base::RecordAction(UserMetricsAction("MobileMenuRequestMobileSite")); | 202 base::RecordAction(UserMetricsAction("MobileMenuRequestMobileSite")); |
203 break; | 203 break; |
204 case IDC_READER_MODE: | 204 case IDC_READER_MODE: |
205 base::RecordAction(UserMetricsAction("MobileMenuRequestReaderMode")); | 205 base::RecordAction(UserMetricsAction("MobileMenuRequestReaderMode")); |
(...skipping 29 matching lines...) Expand all Loading... |
235 default: | 235 default: |
236 NOTREACHED(); | 236 NOTREACHED(); |
237 break; | 237 break; |
238 } | 238 } |
239 | 239 |
240 // Close the menu. | 240 // Close the menu. |
241 [self.delegate dismissPopupMenu:self]; | 241 [self.delegate dismissPopupMenu:self]; |
242 } | 242 } |
243 | 243 |
244 @end | 244 @end |
OLD | NEW |