| 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_handset_view_controller.h
" | 5 #import "ios/chrome/browser/ui/bookmarks/bookmark_home_handset_view_controller.h
" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #import "base/ios/weak_nsobject.h" | 9 #import "base/ios/weak_nsobject.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 [self.editingBar setDeleteTarget:self action:@selector(editingBarDelete)]; | 444 [self.editingBar setDeleteTarget:self action:@selector(editingBarDelete)]; |
| 445 [self.editingBar setMoveTarget:self action:@selector(editingBarMove)]; | 445 [self.editingBar setMoveTarget:self action:@selector(editingBarMove)]; |
| 446 [self.editingBar setEditTarget:self action:@selector(editingBarEdit)]; | 446 [self.editingBar setEditTarget:self action:@selector(editingBarEdit)]; |
| 447 | 447 |
| 448 [self.view addSubview:self.editingBar]; | 448 [self.view addSubview:self.editingBar]; |
| 449 self.editingBar.alpha = 0; | 449 self.editingBar.alpha = 0; |
| 450 } | 450 } |
| 451 | 451 |
| 452 int bookmarkCount = 0; | 452 int bookmarkCount = 0; |
| 453 int folderCount = 0; | 453 int folderCount = 0; |
| 454 for (auto node : _editNodes) { | 454 for (auto* node : _editNodes) { |
| 455 if (node->is_url()) | 455 if (node->is_url()) |
| 456 ++bookmarkCount; | 456 ++bookmarkCount; |
| 457 else | 457 else |
| 458 ++folderCount; | 458 ++folderCount; |
| 459 } | 459 } |
| 460 [self.editingBar updateUIWithBookmarkCount:bookmarkCount | 460 [self.editingBar updateUIWithBookmarkCount:bookmarkCount |
| 461 folderCount:folderCount]; | 461 folderCount:folderCount]; |
| 462 | 462 |
| 463 [self showEditingBarAnimated:animated]; | 463 [self showEditingBarAnimated:animated]; |
| 464 [self updateEditBarShadow]; | 464 [self updateEditBarShadow]; |
| (...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1126 } | 1126 } |
| 1127 | 1127 |
| 1128 - (NSIndexPath*)indexPathForCell:(UICollectionViewCell*)cell { | 1128 - (NSIndexPath*)indexPathForCell:(UICollectionViewCell*)cell { |
| 1129 DCHECK([self primaryView].collectionView); | 1129 DCHECK([self primaryView].collectionView); |
| 1130 NSIndexPath* indexPath = | 1130 NSIndexPath* indexPath = |
| 1131 [[self primaryView].collectionView indexPathForCell:cell]; | 1131 [[self primaryView].collectionView indexPathForCell:cell]; |
| 1132 return indexPath; | 1132 return indexPath; |
| 1133 } | 1133 } |
| 1134 | 1134 |
| 1135 @end | 1135 @end |
| OLD | NEW |