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

Side by Side Diff: ios/chrome/browser/tabs/tab.mm

Issue 2903173003: Removed -[CRWWebDelegate webWillReload] callback. (Closed)
Patch Set: Rebased Created 3 years, 6 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 | ios/web/public/web_state/ui/crw_web_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 967 matching lines...) Expand 10 before | Expand all | Expand 10 after
978 addLocationToNavigationItem:navigationItem 978 addLocationToNavigationItem:navigationItem
979 browserState:_browserState]; 979 browserState:_browserState];
980 } 980 }
981 981
982 - (void)loadSessionTab:(const sessions::SessionTab*)sessionTab { 982 - (void)loadSessionTab:(const sessions::SessionTab*)sessionTab {
983 DCHECK(sessionTab); 983 DCHECK(sessionTab);
984 [self replaceHistoryWithNavigations:sessionTab->navigations 984 [self replaceHistoryWithNavigations:sessionTab->navigations
985 currentIndex:sessionTab->current_navigation_index]; 985 currentIndex:sessionTab->current_navigation_index];
986 } 986 }
987 987
988 - (void)webWillReload {
989 if ([_parentTabModel tabUsageRecorder])
990 [_parentTabModel tabUsageRecorder]->RecordReload(self);
991 }
992
993 // Halt the tab, which amounts to halting its webController. 988 // Halt the tab, which amounts to halting its webController.
994 - (void)terminateNetworkActivity { 989 - (void)terminateNetworkActivity {
995 [self.webController terminateNetworkActivity]; 990 [self.webController terminateNetworkActivity];
996 } 991 }
997 992
998 - (void)webStateDestroyed:(web::WebState*)webState { 993 - (void)webStateDestroyed:(web::WebState*)webState {
999 DCHECK_EQ(_webStateImpl, webState); 994 DCHECK_EQ(_webStateImpl, webState);
1000 self.fullScreenControllerDelegate = nil; 995 self.fullScreenControllerDelegate = nil;
1001 self.overscrollActionsControllerDelegate = nil; 996 self.overscrollActionsControllerDelegate = nil;
1002 self.passKitDialogProvider = nil; 997 self.passKitDialogProvider = nil;
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
1401 [_parentTabModel tabUsageRecorder]->RecordPageLoadStart(self); 1396 [_parentTabModel tabUsageRecorder]->RecordPageLoadStart(self);
1402 } 1397 }
1403 if (![self navigationManager]->GetPendingItem()) { 1398 if (![self navigationManager]->GetPendingItem()) {
1404 // Reset |isVoiceSearchResultsTab| since a new page is being navigated to. 1399 // Reset |isVoiceSearchResultsTab| since a new page is being navigated to.
1405 self.isVoiceSearchResultsTab = NO; 1400 self.isVoiceSearchResultsTab = NO;
1406 } 1401 }
1407 } 1402 }
1408 1403
1409 - (void)webState:(web::WebState*)webState 1404 - (void)webState:(web::WebState*)webState
1410 didStartNavigation:(web::NavigationContext*)navigation { 1405 didStartNavigation:(web::NavigationContext*)navigation {
1406 if ([_parentTabModel tabUsageRecorder] &&
1407 PageTransitionCoreTypeIs(navigation->GetPageTransition(),
1408 ui::PAGE_TRANSITION_RELOAD)) {
1409 [_parentTabModel tabUsageRecorder]->RecordReload(self);
1410 }
1411
1411 [self.dialogDelegate cancelDialogForTab:self]; 1412 [self.dialogDelegate cancelDialogForTab:self];
1412 [_parentTabModel notifyTabChanged:self]; 1413 [_parentTabModel notifyTabChanged:self];
1413 [_openInController disable]; 1414 [_openInController disable];
1414 [[NSNotificationCenter defaultCenter] 1415 [[NSNotificationCenter defaultCenter]
1415 postNotificationName: 1416 postNotificationName:
1416 kTabClosingCurrentDocumentNotificationForCrashReporting 1417 kTabClosingCurrentDocumentNotificationForCrashReporting
1417 object:self]; 1418 object:self];
1418 } 1419 }
1419 1420
1420 - (void)webState:(web::WebState*)webState 1421 - (void)webState:(web::WebState*)webState
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
1901 1902
1902 - (TabModel*)parentTabModel { 1903 - (TabModel*)parentTabModel {
1903 return _parentTabModel; 1904 return _parentTabModel;
1904 } 1905 }
1905 1906
1906 - (FormInputAccessoryViewController*)inputAccessoryViewController { 1907 - (FormInputAccessoryViewController*)inputAccessoryViewController {
1907 return _inputAccessoryViewController; 1908 return _inputAccessoryViewController;
1908 } 1909 }
1909 1910
1910 @end 1911 @end
OLDNEW
« no previous file with comments | « no previous file | ios/web/public/web_state/ui/crw_web_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698