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

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

Issue 2969103002: [ios] Remove IDC_SHOW_TOOLS_MENU
Patch Set: 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_controller.h" 5 #import "ios/chrome/browser/ui/tools_menu/tools_menu_view_controller.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/ios/ios_util.h" 9 #include "base/ios/ios_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 482
483 #pragma mark - Button event handling 483 #pragma mark - Button event handling
484 484
485 - (void)buttonPressed:(id)sender { 485 - (void)buttonPressed:(id)sender {
486 int commandId = [sender tag]; 486 int commandId = [sender tag];
487 DCHECK(commandId); 487 DCHECK(commandId);
488 // The bookmark command workaround is only needed for metrics; remap it 488 // The bookmark command workaround is only needed for metrics; remap it
489 // to the real command for the dispatch. This is very hacky, but it will go 489 // to the real command for the dispatch. This is very hacky, but it will go
490 // away soon. See crbug/228521 490 // away soon. See crbug/228521
491 DCHECK([sender respondsToSelector:@selector(setTag:)]); 491 DCHECK([sender respondsToSelector:@selector(setTag:)]);
492 // Do nothing when tapping the tools menu a second time.
493 // Do not use -chromeExecuteCommand: for tags < 0 -- that is, items that have 492 // Do not use -chromeExecuteCommand: for tags < 0 -- that is, items that have
494 // been refactored to use the dispatcher. 493 // been refactored to use the dispatcher.
495 if (commandId != IDC_SHOW_TOOLS_MENU && commandId > 0) { 494 if (commandId > 0) {
496 [self chromeExecuteCommand:sender]; 495 [self chromeExecuteCommand:sender];
497 } 496 }
498 497
499 // Do any metrics logging for the command, and then close the menu. 498 // Do any metrics logging for the command, and then close the menu.
500 [_delegate commandWasSelected:commandId]; 499 [_delegate commandWasSelected:commandId];
501 } 500 }
502 501
503 #pragma mark - UICollectionViewDelegate Implementation 502 #pragma mark - UICollectionViewDelegate Implementation
504 503
505 - (BOOL)collectionView:(ToolsMenuCollectionView*)view 504 - (BOOL)collectionView:(ToolsMenuCollectionView*)view
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 641
643 - (void)unreadCountChanged:(NSInteger)unreadCount { 642 - (void)unreadCountChanged:(NSInteger)unreadCount {
644 [[self readingListCell] updateBadgeCount:unreadCount animated:YES]; 643 [[self readingListCell] updateBadgeCount:unreadCount animated:YES];
645 } 644 }
646 645
647 - (void)unseenStateChanged:(BOOL)unseenItemsExist { 646 - (void)unseenStateChanged:(BOOL)unseenItemsExist {
648 [[self readingListCell] updateSeenState:unseenItemsExist animated:YES]; 647 [[self readingListCell] updateSeenState:unseenItemsExist animated:YES];
649 } 648 }
650 649
651 @end 650 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698