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

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

Issue 2660143002: Removing iPad Tab Switcher experimental flag. (Closed)
Patch Set: Rebased. Created 3 years, 10 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 | « ios/chrome/browser/snapshots/snapshot_cache_unittest.mm ('k') | ios/chrome/browser/ui/BUILD.gn » ('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 1771 matching lines...) Expand 10 before | Expand all | Expand 10 after
1782 userInfo:[NSDictionary 1782 userInfo:[NSDictionary
1783 dictionaryWithObjectsAndKeys: 1783 dictionaryWithObjectsAndKeys:
1784 self, kTabModelTabKey, 1784 self, kTabModelTabKey,
1785 [NSNumber numberWithBool:loadSuccess], 1785 [NSNumber numberWithBool:loadSuccess],
1786 kTabModelPageLoadSuccess, nil]]; 1786 kTabModelPageLoadSuccess, nil]];
1787 } 1787 }
1788 [[OmniboxGeolocationController sharedInstance] 1788 [[OmniboxGeolocationController sharedInstance]
1789 finishPageLoadForTab:self 1789 finishPageLoadForTab:self
1790 loadSuccess:loadSuccess]; 1790 loadSuccess:loadSuccess];
1791 1791
1792 // Always take snapshots on iPad if the tab switcher is enabled. 1792 if (loadSuccess) {
1793 // If the tab switcher is not enabled, don't take snapshot of chrome scheme
1794 // pages.
1795 BOOL takeSnapshotOnIpad =
1796 IsIPadIdiom() &&
1797 (experimental_flags::IsTabSwitcherEnabled() ||
1798 !web::GetWebClient()->IsAppSpecificURL(lastCommittedURL));
1799 // Always take snapshot on iPhone.
1800 BOOL takeSnapshot = !IsIPadIdiom() || takeSnapshotOnIpad;
1801 if (loadSuccess && takeSnapshot) {
1802 [self updateSnapshotWithOverlay:YES visibleFrameOnly:YES]; 1793 [self updateSnapshotWithOverlay:YES visibleFrameOnly:YES];
1803 } 1794 }
1804 [webControllerSnapshotHelper_ setSnapshotCoalescingEnabled:NO]; 1795 [webControllerSnapshotHelper_ setSnapshotCoalescingEnabled:NO];
1805 } 1796 }
1806 1797
1807 - (void)webState:(web::WebState*)webState 1798 - (void)webState:(web::WebState*)webState
1808 didChangeLoadingProgress:(double)progress { 1799 didChangeLoadingProgress:(double)progress {
1809 // TODO(crbug.com/546406): It is probably possible to do something smarter, 1800 // TODO(crbug.com/546406): It is probably possible to do something smarter,
1810 // but the fact that this is not always sent will have to be taken into 1801 // but the fact that this is not always sent will have to be taken into
1811 // account. 1802 // account.
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
2256 2247
2257 - (TabModel*)parentTabModel { 2248 - (TabModel*)parentTabModel {
2258 return parentTabModel_; 2249 return parentTabModel_;
2259 } 2250 }
2260 2251
2261 - (FormInputAccessoryViewController*)inputAccessoryViewController { 2252 - (FormInputAccessoryViewController*)inputAccessoryViewController {
2262 return inputAccessoryViewController_.get(); 2253 return inputAccessoryViewController_.get();
2263 } 2254 }
2264 2255
2265 @end 2256 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/snapshots/snapshot_cache_unittest.mm ('k') | ios/chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698