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

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

Issue 2678263006: [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 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 [self.entryInserter removeSection:section]; 630 [self.entryInserter removeSection:section];
631 } 631 }
632 } 632 }
633 } 633 }
634 completion:^(BOOL) { 634 completion:^(BOOL) {
635 // If only the header section remains, there are no history entries. 635 // If only the header section remains, there are no history entries.
636 if ([self.collectionViewModel numberOfSections] == 1) { 636 if ([self.collectionViewModel numberOfSections] == 1) {
637 self.entriesType = NO_ENTRIES; 637 self.entriesType = NO_ENTRIES;
638 } 638 }
639 [self updateEntriesStatusMessage]; 639 [self updateEntriesStatusMessage];
640 [self.delegate historyCollectionViewControllerDidChangeEntries:self];
640 }]; 641 }];
641 } 642 }
642 643
643 - (void)filterForHistoryEntries:(NSArray*)entries { 644 - (void)filterForHistoryEntries:(NSArray*)entries {
644 self.collectionView.allowsMultipleSelection = YES; 645 self.collectionView.allowsMultipleSelection = YES;
645 for (int section = 1; section < [self.collectionViewModel numberOfSections]; 646 for (int section = 1; section < [self.collectionViewModel numberOfSections];
646 ++section) { 647 ++section) {
647 NSInteger sectionIdentifier = 648 NSInteger sectionIdentifier =
648 [self.collectionViewModel sectionIdentifierForSection:section]; 649 [self.collectionViewModel sectionIdentifierForSection:section];
649 if ([self.collectionViewModel 650 if ([self.collectionViewModel
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 NSData* plainText = [base::SysUTF8ToNSString(URL.spec()) 811 NSData* plainText = [base::SysUTF8ToNSString(URL.spec())
811 dataUsingEncoding:NSUTF8StringEncoding]; 812 dataUsingEncoding:NSUTF8StringEncoding];
812 NSDictionary* copiedItem = @{ 813 NSDictionary* copiedItem = @{
813 (NSString*)kUTTypeURL : net::NSURLWithGURL(URL), 814 (NSString*)kUTTypeURL : net::NSURLWithGURL(URL),
814 (NSString*)kUTTypeUTF8PlainText : plainText, 815 (NSString*)kUTTypeUTF8PlainText : plainText,
815 }; 816 };
816 [[UIPasteboard generalPasteboard] setItems:@[ copiedItem ]]; 817 [[UIPasteboard generalPasteboard] setItems:@[ copiedItem ]];
817 } 818 }
818 819
819 @end 820 @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