| 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 1206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1217 } | 1217 } |
| 1218 | 1218 |
| 1219 if (!navigation->IsErrorPage()) { | 1219 if (!navigation->IsErrorPage()) { |
| 1220 [self addCurrentEntryToHistoryDB]; | 1220 [self addCurrentEntryToHistoryDB]; |
| 1221 [self countMainFrameLoad]; | 1221 [self countMainFrameLoad]; |
| 1222 } | 1222 } |
| 1223 | 1223 |
| 1224 [parentTabModel_ notifyTabChanged:self]; | 1224 [parentTabModel_ notifyTabChanged:self]; |
| 1225 } | 1225 } |
| 1226 | 1226 |
| 1227 // Records the state (scroll position, form values, whatever can be | |
| 1228 // harvested) from the current page into the current session entry. | |
| 1229 - (void)recordStateInHistory { | |
| 1230 // Link-loading prerender tab may not have correct zoom value during the load. | |
| 1231 if (!self.isLinkLoadingPrerenderTab) | |
| 1232 [self.webController recordStateInHistory]; | |
| 1233 } | |
| 1234 | |
| 1235 // Records metric for the interface's orientation. | 1227 // Records metric for the interface's orientation. |
| 1236 - (void)recordInterfaceOrientation { | 1228 - (void)recordInterfaceOrientation { |
| 1237 switch ([[UIApplication sharedApplication] statusBarOrientation]) { | 1229 switch ([[UIApplication sharedApplication] statusBarOrientation]) { |
| 1238 case UIInterfaceOrientationPortrait: | 1230 case UIInterfaceOrientationPortrait: |
| 1239 case UIInterfaceOrientationPortraitUpsideDown: | 1231 case UIInterfaceOrientationPortraitUpsideDown: |
| 1240 UMA_HISTOGRAM_BOOLEAN("Tab.PageLoadInPortrait", YES); | 1232 UMA_HISTOGRAM_BOOLEAN("Tab.PageLoadInPortrait", YES); |
| 1241 break; | 1233 break; |
| 1242 case UIInterfaceOrientationLandscapeLeft: | 1234 case UIInterfaceOrientationLandscapeLeft: |
| 1243 case UIInterfaceOrientationLandscapeRight: | 1235 case UIInterfaceOrientationLandscapeRight: |
| 1244 UMA_HISTOGRAM_BOOLEAN("Tab.PageLoadInPortrait", NO); | 1236 UMA_HISTOGRAM_BOOLEAN("Tab.PageLoadInPortrait", NO); |
| (...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1975 | 1967 |
| 1976 - (TabModel*)parentTabModel { | 1968 - (TabModel*)parentTabModel { |
| 1977 return parentTabModel_; | 1969 return parentTabModel_; |
| 1978 } | 1970 } |
| 1979 | 1971 |
| 1980 - (FormInputAccessoryViewController*)inputAccessoryViewController { | 1972 - (FormInputAccessoryViewController*)inputAccessoryViewController { |
| 1981 return inputAccessoryViewController_.get(); | 1973 return inputAccessoryViewController_.get(); |
| 1982 } | 1974 } |
| 1983 | 1975 |
| 1984 @end | 1976 @end |
| OLD | NEW |