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

Unified Diff: ios/chrome/browser/ui/browser_view_controller.mm

Issue 2779763006: Cherry-picked Display the preload Tab if it replaces the current Tab. (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/browser_view_controller.mm
diff --git a/ios/chrome/browser/ui/browser_view_controller.mm b/ios/chrome/browser/ui/browser_view_controller.mm
index 6e441eae5182cd1a9199c3bc92c33da1cc362b90..2e19aae819b4c2b6f7d77518793d0ed4bb535692 100644
--- a/ios/chrome/browser/ui/browser_view_controller.mm
+++ b/ios/chrome/browser/ui/browser_view_controller.mm
@@ -4474,6 +4474,16 @@ class BrowserBookmarkModelBridge : public bookmarks::BookmarkModelObserver {
}
}
+// Observer method, tab replaced.
+- (void)tabModel:(TabModel*)model
+ didReplaceTab:(Tab*)oldTab
+ withTab:(Tab*)newTab
+ atIndex:(NSUInteger)index {
+ // Add |newTab|'s view to the hierarchy if it's the current Tab.
kkhorimoto 2017/03/28 17:18:14 Do we need the uninstall/install delegate calls he
Eugene But (OOO till 7-30) 2017/03/28 17:30:32 No, uninstalling/installing delegates methods do n
+ if (self.active && model.currentTab == newTab)
+ [self displayTab:newTab isNewSelection:NO];
+}
+
// A tab has been removed, remove its views from display if necessary.
- (void)tabModel:(TabModel*)model
didRemoveTab:(Tab*)tab
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698