| 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 1851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1862 (experimental_flags::IsTabSwitcherEnabled() || | 1862 (experimental_flags::IsTabSwitcherEnabled() || |
| 1863 !web::GetWebClient()->IsAppSpecificURL(lastCommittedURL)); | 1863 !web::GetWebClient()->IsAppSpecificURL(lastCommittedURL)); |
| 1864 // Always take snapshot on iPhone. | 1864 // Always take snapshot on iPhone. |
| 1865 BOOL takeSnapshot = !IsIPadIdiom() || takeSnapshotOnIpad; | 1865 BOOL takeSnapshot = !IsIPadIdiom() || takeSnapshotOnIpad; |
| 1866 if (loadSuccess && takeSnapshot) { | 1866 if (loadSuccess && takeSnapshot) { |
| 1867 [self updateSnapshotWithOverlay:YES visibleFrameOnly:YES]; | 1867 [self updateSnapshotWithOverlay:YES visibleFrameOnly:YES]; |
| 1868 } | 1868 } |
| 1869 [webControllerSnapshotHelper_ setSnapshotCoalescingEnabled:NO]; | 1869 [webControllerSnapshotHelper_ setSnapshotCoalescingEnabled:NO]; |
| 1870 } | 1870 } |
| 1871 | 1871 |
| 1872 - (void)webState:(web::WebState*)webState |
| 1873 didChangeLoadingProgress:(double)progress { |
| 1874 // TODO(crbug.com/546406): It is probably possible to do something smarter, |
| 1875 // but the fact that this is not always sent will have to be taken into |
| 1876 // account. |
| 1877 [parentTabModel_ notifyTabChanged:self]; |
| 1878 } |
| 1879 |
| 1880 - (void)webStateDidDismissInterstitial:(web::WebState*)webState { |
| 1881 [parentTabModel_ notifyTabChanged:self]; |
| 1882 } |
| 1883 |
| 1872 - (void)webLoadCancelled:(const GURL&)url { | 1884 - (void)webLoadCancelled:(const GURL&)url { |
| 1873 // When a load is cancelled, this is the maximum that a page will ever load. | 1885 // When a load is cancelled, this is the maximum that a page will ever load. |
| 1874 [fullScreenController_ enableFullScreen]; | 1886 [fullScreenController_ enableFullScreen]; |
| 1875 [parentTabModel_ notifyTabChanged:self]; | 1887 [parentTabModel_ notifyTabChanged:self]; |
| 1876 } | 1888 } |
| 1877 | 1889 |
| 1878 - (BOOL)webController:(CRWWebController*)webController | 1890 - (BOOL)webController:(CRWWebController*)webController |
| 1879 shouldOpenExternalURL:(const GURL&)URL { | 1891 shouldOpenExternalURL:(const GURL&)URL { |
| 1880 if (isPrerenderTab_ && !isLinkLoadingPrerenderTab_) { | 1892 if (isPrerenderTab_ && !isLinkLoadingPrerenderTab_) { |
| 1881 [delegate_ discardPrerender]; | 1893 [delegate_ discardPrerender]; |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2311 | 2323 |
| 2312 - (TabModel*)parentTabModel { | 2324 - (TabModel*)parentTabModel { |
| 2313 return parentTabModel_; | 2325 return parentTabModel_; |
| 2314 } | 2326 } |
| 2315 | 2327 |
| 2316 - (FormInputAccessoryViewController*)inputAccessoryViewController { | 2328 - (FormInputAccessoryViewController*)inputAccessoryViewController { |
| 2317 return inputAccessoryViewController_.get(); | 2329 return inputAccessoryViewController_.get(); |
| 2318 } | 2330 } |
| 2319 | 2331 |
| 2320 @end | 2332 @end |
| OLD | NEW |