| 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 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 624 [webControllerSnapshotHelper_ | 624 [webControllerSnapshotHelper_ |
| 625 retrieveSnapshotForWebController:self.webController | 625 retrieveSnapshotForWebController:self.webController |
| 626 sessionID:self.tabId | 626 sessionID:self.tabId |
| 627 withOverlays:[self snapshotOverlays] | 627 withOverlays:[self snapshotOverlays] |
| 628 callback:callback]; | 628 callback:callback]; |
| 629 } | 629 } |
| 630 | 630 |
| 631 - (const GURL&)url { | 631 - (const GURL&)url { |
| 632 // See note in header; this method should be removed. | 632 // See note in header; this method should be removed. |
| 633 web::NavigationItem* item = | 633 web::NavigationItem* item = |
| 634 [[self navigationManagerImpl]->GetSessionController() currentItem]; | 634 [self navigationManagerImpl]->GetSessionController().currentItem; |
| 635 return item ? item->GetVirtualURL() : GURL::EmptyGURL(); | 635 return item ? item->GetVirtualURL() : GURL::EmptyGURL(); |
| 636 } | 636 } |
| 637 | 637 |
| 638 - (const GURL&)lastCommittedURL { |
| 639 web::NavigationItem* item = self.navigationManager->GetLastCommittedItem(); |
| 640 return item ? item->GetVirtualURL() : GURL::EmptyGURL(); |
| 641 } |
| 642 |
| 643 - (const GURL&)visibleURL { |
| 644 web::NavigationItem* item = self.navigationManager->GetVisibleItem(); |
| 645 return item ? item->GetVirtualURL() : GURL::EmptyGURL(); |
| 646 } |
| 647 |
| 638 - (NSString*)title { | 648 - (NSString*)title { |
| 639 base::string16 title = self.webState->GetTitle(); | 649 base::string16 title = self.webState->GetTitle(); |
| 640 if (title.empty()) | 650 if (title.empty()) |
| 641 title = l10n_util::GetStringUTF16(IDS_DEFAULT_TAB_TITLE); | 651 title = l10n_util::GetStringUTF16(IDS_DEFAULT_TAB_TITLE); |
| 642 return base::SysUTF16ToNSString(title); | 652 return base::SysUTF16ToNSString(title); |
| 643 } | 653 } |
| 644 | 654 |
| 645 - (NSString*)originalTitle { | 655 - (NSString*)originalTitle { |
| 646 // Do not use self.webState->GetTitle() as it returns the display title, | 656 // Do not use self.webState->GetTitle() as it returns the display title, |
| 647 // not the original page title. | 657 // not the original page title. |
| (...skipping 1330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1978 | 1988 |
| 1979 - (TabModel*)parentTabModel { | 1989 - (TabModel*)parentTabModel { |
| 1980 return parentTabModel_; | 1990 return parentTabModel_; |
| 1981 } | 1991 } |
| 1982 | 1992 |
| 1983 - (FormInputAccessoryViewController*)inputAccessoryViewController { | 1993 - (FormInputAccessoryViewController*)inputAccessoryViewController { |
| 1984 return inputAccessoryViewController_.get(); | 1994 return inputAccessoryViewController_.get(); |
| 1985 } | 1995 } |
| 1986 | 1996 |
| 1987 @end | 1997 @end |
| OLD | NEW |