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 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 } | 583 } |
584 | 584 |
585 - (void)retrieveSnapshot:(void (^)(UIImage*))callback { | 585 - (void)retrieveSnapshot:(void (^)(UIImage*))callback { |
586 [_webControllerSnapshotHelper | 586 [_webControllerSnapshotHelper |
587 retrieveSnapshotForWebController:self.webController | 587 retrieveSnapshotForWebController:self.webController |
588 sessionID:self.tabId | 588 sessionID:self.tabId |
589 withOverlays:[self snapshotOverlays] | 589 withOverlays:[self snapshotOverlays] |
590 callback:callback]; | 590 callback:callback]; |
591 } | 591 } |
592 | 592 |
593 - (const GURL&)url { | |
594 // See note in header; this method should be removed. | |
595 web::NavigationItem* item = | |
596 [self navigationManagerImpl]->GetSessionController().currentItem; | |
597 return item ? item->GetVirtualURL() : GURL::EmptyGURL(); | |
598 } | |
599 | |
600 - (const GURL&)lastCommittedURL { | 593 - (const GURL&)lastCommittedURL { |
601 web::NavigationItem* item = self.navigationManager->GetLastCommittedItem(); | 594 web::NavigationItem* item = self.navigationManager->GetLastCommittedItem(); |
602 return item ? item->GetVirtualURL() : GURL::EmptyGURL(); | 595 return item ? item->GetVirtualURL() : GURL::EmptyGURL(); |
603 } | 596 } |
604 | 597 |
605 - (const GURL&)visibleURL { | 598 - (const GURL&)visibleURL { |
606 web::NavigationItem* item = self.navigationManager->GetVisibleItem(); | 599 web::NavigationItem* item = self.navigationManager->GetVisibleItem(); |
607 return item ? item->GetVirtualURL() : GURL::EmptyGURL(); | 600 return item ? item->GetVirtualURL() : GURL::EmptyGURL(); |
608 } | 601 } |
609 | 602 |
(...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1908 | 1901 |
1909 - (TabModel*)parentTabModel { | 1902 - (TabModel*)parentTabModel { |
1910 return _parentTabModel; | 1903 return _parentTabModel; |
1911 } | 1904 } |
1912 | 1905 |
1913 - (FormInputAccessoryViewController*)inputAccessoryViewController { | 1906 - (FormInputAccessoryViewController*)inputAccessoryViewController { |
1914 return _inputAccessoryViewController; | 1907 return _inputAccessoryViewController; |
1915 } | 1908 } |
1916 | 1909 |
1917 @end | 1910 @end |
OLD | NEW |