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

Side by Side Diff: ios/chrome/browser/ui/history/history_collection_view_controller.mm

Issue 2680503004: [ios] Update panel after history item deletion (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "ios/chrome/browser/ui/history/history_collection_view_controller.h" 5 #include "ios/chrome/browser/ui/history/history_collection_view_controller.h"
6 6
7 #import <MobileCoreServices/MobileCoreServices.h> 7 #import <MobileCoreServices/MobileCoreServices.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 [self.entryInserter removeSection:section]; 629 [self.entryInserter removeSection:section];
630 } 630 }
631 } 631 }
632 } 632 }
633 completion:^(BOOL) { 633 completion:^(BOOL) {
634 // If only the header section remains, there are no history entries. 634 // If only the header section remains, there are no history entries.
635 if ([self.collectionViewModel numberOfSections] == 1) { 635 if ([self.collectionViewModel numberOfSections] == 1) {
636 self.entriesType = NO_ENTRIES; 636 self.entriesType = NO_ENTRIES;
637 } 637 }
638 [self updateEntriesStatusMessage]; 638 [self updateEntriesStatusMessage];
639 [self.delegate historyCollectionViewControllerDidChangeEntries:self];
639 }]; 640 }];
640 } 641 }
641 642
642 - (void)filterForHistoryEntries:(NSArray*)entries { 643 - (void)filterForHistoryEntries:(NSArray*)entries {
643 self.collectionView.allowsMultipleSelection = YES; 644 self.collectionView.allowsMultipleSelection = YES;
644 for (int section = 1; section < [self.collectionViewModel numberOfSections]; 645 for (int section = 1; section < [self.collectionViewModel numberOfSections];
645 ++section) { 646 ++section) {
646 NSInteger sectionIdentifier = 647 NSInteger sectionIdentifier =
647 [self.collectionViewModel sectionIdentifierForSection:section]; 648 [self.collectionViewModel sectionIdentifierForSection:section];
648 if ([self.collectionViewModel 649 if ([self.collectionViewModel
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 [self.URLLoader webPageOrderedOpen:copiedURL 799 [self.URLLoader webPageOrderedOpen:copiedURL
799 referrer:web::Referrer() 800 referrer:web::Referrer()
800 windowName:nil 801 windowName:nil
801 inIncognito:YES 802 inIncognito:YES
802 inBackground:NO 803 inBackground:NO
803 appendTo:kLastTab]; 804 appendTo:kLastTab];
804 }]; 805 }];
805 } 806 }
806 807
807 @end 808 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698