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

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

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

Powered by Google App Engine
This is Rietveld 408576698