Chromium Code Reviews| 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 1648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1659 didStartProvisionalNavigationForURL:(const GURL&)URL { | 1659 didStartProvisionalNavigationForURL:(const GURL&)URL { |
| 1660 [self.dialogDelegate cancelDialogForTab:self]; | 1660 [self.dialogDelegate cancelDialogForTab:self]; |
| 1661 [parentTabModel_ notifyTabChanged:self]; | 1661 [parentTabModel_ notifyTabChanged:self]; |
| 1662 [openInController_ disable]; | 1662 [openInController_ disable]; |
| 1663 [[NSNotificationCenter defaultCenter] | 1663 [[NSNotificationCenter defaultCenter] |
| 1664 postNotificationName: | 1664 postNotificationName: |
| 1665 kTabClosingCurrentDocumentNotificationForCrashReporting | 1665 kTabClosingCurrentDocumentNotificationForCrashReporting |
| 1666 object:self]; | 1666 object:self]; |
| 1667 } | 1667 } |
| 1668 | 1668 |
| 1669 - (void)webCancelStartLoadingRequest { | |
|
Eugene But (OOO till 7-30)
2017/03/10 23:43:00
webStateDidStopLoading: is also called when provis
| |
| 1670 DCHECK(self.webController.loadPhase == web::PAGE_LOADED); | |
| 1671 [parentTabModel_ notifyTabChanged:self]; | |
| 1672 } | |
| 1673 | |
| 1674 - (void)webState:(web::WebState*)webState | 1669 - (void)webState:(web::WebState*)webState |
| 1675 didCommitNavigationWithDetails:(const web::LoadCommittedDetails&)details { | 1670 didCommitNavigationWithDetails:(const web::LoadCommittedDetails&)details { |
| 1676 DCHECK([self navigationManager]); | 1671 DCHECK([self navigationManager]); |
| 1677 // |webWillAddPendingURL:transition:| is not called for native page loads. | 1672 // |webWillAddPendingURL:transition:| is not called for native page loads. |
| 1678 // TODO(crbug.com/381201): Move this call there once that bug is fixed so that | 1673 // TODO(crbug.com/381201): Move this call there once that bug is fixed so that |
| 1679 // |disableFullScreen| is called only from one place. | 1674 // |disableFullScreen| is called only from one place. |
| 1680 [fullScreenController_ disableFullScreen]; | 1675 [fullScreenController_ disableFullScreen]; |
| 1681 GURL lastCommittedURL = webState->GetLastCommittedURL(); | 1676 GURL lastCommittedURL = webState->GetLastCommittedURL(); |
| 1682 [autoReloadBridge_ loadStartedForURL:lastCommittedURL]; | 1677 [autoReloadBridge_ loadStartedForURL:lastCommittedURL]; |
| 1683 | 1678 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1794 | 1789 |
| 1795 - (void)webStateDidChangeTitle:(web::WebState*)webState { | 1790 - (void)webStateDidChangeTitle:(web::WebState*)webState { |
| 1796 [self saveTitleToHistoryDB]; | 1791 [self saveTitleToHistoryDB]; |
| 1797 [parentTabModel_ notifyTabChanged:self]; | 1792 [parentTabModel_ notifyTabChanged:self]; |
| 1798 } | 1793 } |
| 1799 | 1794 |
| 1800 - (void)webStateDidDismissInterstitial:(web::WebState*)webState { | 1795 - (void)webStateDidDismissInterstitial:(web::WebState*)webState { |
| 1801 [parentTabModel_ notifyTabChanged:self]; | 1796 [parentTabModel_ notifyTabChanged:self]; |
| 1802 } | 1797 } |
| 1803 | 1798 |
| 1804 - (void)webLoadCancelled:(const GURL&)url { | 1799 - (void)webStateDidStopLoading:(web::WebState*)webState { |
| 1805 // When a load is cancelled, this is the maximum that a page will ever load. | 1800 // This is the maximum that a page will ever load and it is safe to allow |
| 1801 // fullscreen mode. | |
| 1806 [fullScreenController_ enableFullScreen]; | 1802 [fullScreenController_ enableFullScreen]; |
| 1807 [parentTabModel_ notifyTabChanged:self]; | 1803 [parentTabModel_ notifyTabChanged:self]; |
| 1808 } | 1804 } |
| 1809 | 1805 |
| 1810 - (BOOL)webController:(CRWWebController*)webController | 1806 - (BOOL)webController:(CRWWebController*)webController |
| 1811 shouldOpenExternalURL:(const GURL&)URL { | 1807 shouldOpenExternalURL:(const GURL&)URL { |
| 1812 if (isPrerenderTab_ && !isLinkLoadingPrerenderTab_) { | 1808 if (isPrerenderTab_ && !isLinkLoadingPrerenderTab_) { |
| 1813 [delegate_ discardPrerender]; | 1809 [delegate_ discardPrerender]; |
| 1814 return NO; | 1810 return NO; |
| 1815 } | 1811 } |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2184 | 2180 |
| 2185 - (TabModel*)parentTabModel { | 2181 - (TabModel*)parentTabModel { |
| 2186 return parentTabModel_; | 2182 return parentTabModel_; |
| 2187 } | 2183 } |
| 2188 | 2184 |
| 2189 - (FormInputAccessoryViewController*)inputAccessoryViewController { | 2185 - (FormInputAccessoryViewController*)inputAccessoryViewController { |
| 2190 return inputAccessoryViewController_.get(); | 2186 return inputAccessoryViewController_.get(); |
| 2191 } | 2187 } |
| 2192 | 2188 |
| 2193 @end | 2189 @end |
| OLD | NEW |