OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/tabs/tab.h" | 5 #import "ios/chrome/browser/tabs/tab.h" |
6 | 6 |
7 #import <CoreLocation/CoreLocation.h> | 7 #import <CoreLocation/CoreLocation.h> |
8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
9 | 9 |
10 #include <utility> | 10 #include <utility> |
(...skipping 1767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1778 base::RecordAction(UserMetricsAction("MobileTabClobbered")); | 1778 base::RecordAction(UserMetricsAction("MobileTabClobbered")); |
1779 if ([parentTabModel_ tabUsageRecorder]) | 1779 if ([parentTabModel_ tabUsageRecorder]) |
1780 [parentTabModel_ tabUsageRecorder]->RecordPageLoadStart(self); | 1780 [parentTabModel_ tabUsageRecorder]->RecordPageLoadStart(self); |
1781 } | 1781 } |
1782 if (![self navigationManager]->GetPendingItem()) { | 1782 if (![self navigationManager]->GetPendingItem()) { |
1783 // Reset |isVoiceSearchResultsTab| since a new page is being navigated to. | 1783 // Reset |isVoiceSearchResultsTab| since a new page is being navigated to. |
1784 self.isVoiceSearchResultsTab = NO; | 1784 self.isVoiceSearchResultsTab = NO; |
1785 } | 1785 } |
1786 } | 1786 } |
1787 | 1787 |
1788 - (void)webDidAddPendingURL { | 1788 - (void)webState:(web::WebState*)webState |
| 1789 didStartProvisionalNavigationForURL:(const GURL&)URL { |
1789 [parentTabModel_ notifyTabChanged:self]; | 1790 [parentTabModel_ notifyTabChanged:self]; |
1790 [openInController_ disable]; | 1791 [openInController_ disable]; |
1791 [[NSNotificationCenter defaultCenter] | 1792 [[NSNotificationCenter defaultCenter] |
1792 postNotificationName: | 1793 postNotificationName: |
1793 kTabClosingCurrentDocumentNotificationForCrashReporting | 1794 kTabClosingCurrentDocumentNotificationForCrashReporting |
1794 object:self]; | 1795 object:self]; |
1795 [metricsClientManager_ pageLoadStarted:self.url]; | 1796 [metricsClientManager_ pageLoadStarted:URL]; |
1796 } | 1797 } |
1797 | 1798 |
1798 - (void)webCancelStartLoadingRequest { | 1799 - (void)webCancelStartLoadingRequest { |
1799 DCHECK(self.webController.loadPhase == web::PAGE_LOADED); | 1800 DCHECK(self.webController.loadPhase == web::PAGE_LOADED); |
1800 [parentTabModel_ notifyTabChanged:self]; | 1801 [parentTabModel_ notifyTabChanged:self]; |
1801 } | 1802 } |
1802 | 1803 |
1803 // Called when the page URL has changed. | 1804 // Called when the page URL has changed. |
1804 - (void)webDidStartLoadingURL:(const GURL&)currentUrl | 1805 - (void)webDidStartLoadingURL:(const GURL&)currentUrl |
1805 shouldUpdateHistory:(BOOL)updateHistory { | 1806 shouldUpdateHistory:(BOOL)updateHistory { |
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2392 | 2393 |
2393 - (TabModel*)parentTabModel { | 2394 - (TabModel*)parentTabModel { |
2394 return parentTabModel_; | 2395 return parentTabModel_; |
2395 } | 2396 } |
2396 | 2397 |
2397 - (FormInputAccessoryViewController*)inputAccessoryViewController { | 2398 - (FormInputAccessoryViewController*)inputAccessoryViewController { |
2398 return inputAccessoryViewController_.get(); | 2399 return inputAccessoryViewController_.get(); |
2399 } | 2400 } |
2400 | 2401 |
2401 @end | 2402 @end |
OLD | NEW |