| OLD | NEW |
| 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/bookmarks/bookmark_home_tablet_ntp_controller.h" | 5 #import "ios/chrome/browser/ui/bookmarks/bookmark_home_tablet_ntp_controller.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/ios/block_types.h" | 9 #include "base/ios/block_types.h" |
| 10 #import "base/ios/weak_nsobject.h" | 10 #import "base/ios/weak_nsobject.h" |
| (...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 [self.editingBar setDeleteTarget:self action:@selector(editingBarDelete)]; | 642 [self.editingBar setDeleteTarget:self action:@selector(editingBarDelete)]; |
| 643 [self.editingBar setMoveTarget:self action:@selector(editingBarMove)]; | 643 [self.editingBar setMoveTarget:self action:@selector(editingBarMove)]; |
| 644 [self.editingBar setEditTarget:self action:@selector(editingBarEdit)]; | 644 [self.editingBar setEditTarget:self action:@selector(editingBarEdit)]; |
| 645 | 645 |
| 646 [self.view addSubview:self.editingBar]; | 646 [self.view addSubview:self.editingBar]; |
| 647 self.editingBar.hidden = YES; | 647 self.editingBar.hidden = YES; |
| 648 } | 648 } |
| 649 | 649 |
| 650 int bookmarkCount = 0; | 650 int bookmarkCount = 0; |
| 651 int folderCount = 0; | 651 int folderCount = 0; |
| 652 for (auto node : _editNodes) { | 652 for (auto* node : _editNodes) { |
| 653 if (node->is_url()) | 653 if (node->is_url()) |
| 654 ++bookmarkCount; | 654 ++bookmarkCount; |
| 655 else | 655 else |
| 656 ++folderCount; | 656 ++folderCount; |
| 657 } | 657 } |
| 658 [self.editingBar updateUIWithBookmarkCount:bookmarkCount | 658 [self.editingBar updateUIWithBookmarkCount:bookmarkCount |
| 659 folderCount:folderCount]; | 659 folderCount:folderCount]; |
| 660 | 660 |
| 661 [self showEditingBarAnimated:animated]; | 661 [self showEditingBarAnimated:animated]; |
| 662 [self updateEditBarShadow]; | 662 [self updateEditBarShadow]; |
| (...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1289 } | 1289 } |
| 1290 | 1290 |
| 1291 - (NSIndexPath*)indexPathForCell:(UICollectionViewCell*)cell { | 1291 - (NSIndexPath*)indexPathForCell:(UICollectionViewCell*)cell { |
| 1292 DCHECK([self primaryView].collectionView); | 1292 DCHECK([self primaryView].collectionView); |
| 1293 NSIndexPath* indexPath = | 1293 NSIndexPath* indexPath = |
| 1294 [[self primaryView].collectionView indexPathForCell:cell]; | 1294 [[self primaryView].collectionView indexPathForCell:cell]; |
| 1295 return indexPath; | 1295 return indexPath; |
| 1296 } | 1296 } |
| 1297 | 1297 |
| 1298 @end | 1298 @end |
| OLD | NEW |