OLD | NEW |
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 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
778 rendererInitiated:NO]; | 778 rendererInitiated:NO]; |
779 }]; | 779 }]; |
780 } | 780 } |
781 | 781 |
782 - (void)openURLInNewTab:(const GURL&)URL { | 782 - (void)openURLInNewTab:(const GURL&)URL { |
783 GURL copiedURL(URL); | 783 GURL copiedURL(URL); |
784 [self.delegate historyCollectionViewController:self | 784 [self.delegate historyCollectionViewController:self |
785 shouldCloseWithCompletion:^{ | 785 shouldCloseWithCompletion:^{ |
786 [self.URLLoader webPageOrderedOpen:copiedURL | 786 [self.URLLoader webPageOrderedOpen:copiedURL |
787 referrer:web::Referrer() | 787 referrer:web::Referrer() |
788 windowName:nil | |
789 inIncognito:NO | 788 inIncognito:NO |
790 inBackground:NO | 789 inBackground:NO |
791 appendTo:kLastTab]; | 790 appendTo:kLastTab]; |
792 }]; | 791 }]; |
793 } | 792 } |
794 | 793 |
795 - (void)openURLInNewIncognitoTab:(const GURL&)URL { | 794 - (void)openURLInNewIncognitoTab:(const GURL&)URL { |
796 GURL copiedURL(URL); | 795 GURL copiedURL(URL); |
797 [self.delegate historyCollectionViewController:self | 796 [self.delegate historyCollectionViewController:self |
798 shouldCloseWithCompletion:^{ | 797 shouldCloseWithCompletion:^{ |
799 [self.URLLoader webPageOrderedOpen:copiedURL | 798 [self.URLLoader webPageOrderedOpen:copiedURL |
800 referrer:web::Referrer() | 799 referrer:web::Referrer() |
801 windowName:nil | |
802 inIncognito:YES | 800 inIncognito:YES |
803 inBackground:NO | 801 inBackground:NO |
804 appendTo:kLastTab]; | 802 appendTo:kLastTab]; |
805 }]; | 803 }]; |
806 } | 804 } |
807 | 805 |
808 @end | 806 @end |
OLD | NEW |