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

Unified Diff: ios/chrome/browser/ui/tab_switcher/tab_switcher_controller.mm

Issue 2780253003: Release TabBarTransitionContext when no longer required (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/tab_switcher/tab_switcher_controller.mm
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_switcher_controller.mm b/ios/chrome/browser/ui/tab_switcher/tab_switcher_controller.mm
index 12db3675405241372ef676ba85877956b4998773..4a0b2d3c8dcff353df433e88a3768db2b49df0fe 100644
--- a/ios/chrome/browser/ui/tab_switcher/tab_switcher_controller.mm
+++ b/ios/chrome/browser/ui/tab_switcher/tab_switcher_controller.mm
@@ -682,7 +682,7 @@ enum class SnapshotViewOption {
(transitionType == TransitionType::TRANSITION_DISMISS) ? 0 : 1.0;
base::WeakNSObject<TabSwitcherController> weakSelf(self);
- void (^completionBlock)(BOOL) = ^(BOOL) {
+ void (^completionBlock)(BOOL) = ^(BOOL finished) {
base::scoped_nsobject<TabSwitcherController> strongSelf([weakSelf retain]);
[tabStripPlaceholderView removeFromSuperview];
@@ -690,8 +690,12 @@ enum class SnapshotViewOption {
[selectedCell setHidden:NO];
[placeholderView removeFromSuperview];
- if (transitionType == TransitionType::TRANSITION_DISMISS)
+ if (transitionType == TransitionType::TRANSITION_DISMISS) {
[strongSelf restoreWindowBackgroundColor];
+ if (finished) {
+ [strongSelf setTransitionContext:nil];
+ }
+ }
[[[strongSelf delegate] tabSwitcherTransitionToolbarOwner]
reparentToolbarController];
[[strongSelf view] setUserInteractionEnabled:YES];
« 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