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

Unified Diff: ios/chrome/browser/tabs/tab.mm

Issue 2817253002: Added |lastCommittedURL| and |visibleURL| to Tab's interface. (Closed)
Patch Set: returns => Returns Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/browser/tabs/tab.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/tabs/tab.mm
diff --git a/ios/chrome/browser/tabs/tab.mm b/ios/chrome/browser/tabs/tab.mm
index 7fa0dbb396e436e9cff3b8cc3a8a6bf5cbff6834..7f18cebaf9fa2814eec777f04b0a49647065d55a 100644
--- a/ios/chrome/browser/tabs/tab.mm
+++ b/ios/chrome/browser/tabs/tab.mm
@@ -631,7 +631,17 @@ - (void)retrieveSnapshot:(void (^)(UIImage*))callback {
- (const GURL&)url {
// See note in header; this method should be removed.
web::NavigationItem* item =
- [[self navigationManagerImpl]->GetSessionController() currentItem];
+ [self navigationManagerImpl]->GetSessionController().currentItem;
+ return item ? item->GetVirtualURL() : GURL::EmptyGURL();
+}
+
+- (const GURL&)lastCommittedURL {
+ web::NavigationItem* item = self.navigationManager->GetLastCommittedItem();
+ return item ? item->GetVirtualURL() : GURL::EmptyGURL();
+}
+
+- (const GURL&)visibleURL {
+ web::NavigationItem* item = self.navigationManager->GetVisibleItem();
return item ? item->GetVirtualURL() : GURL::EmptyGURL();
}
« no previous file with comments | « ios/chrome/browser/tabs/tab.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698