Chromium Code Reviews| Index: ios/clean/chrome/browser/ui/tab/tab_container_view_controller.mm |
| diff --git a/ios/clean/chrome/browser/ui/tab/tab_container_view_controller.mm b/ios/clean/chrome/browser/ui/tab/tab_container_view_controller.mm |
| index c45b32ac744f960e91e57314ec65a643482d66a8..351838ae62f18075e3a8c6ff6b87adf22e86b492 100644 |
| --- a/ios/clean/chrome/browser/ui/tab/tab_container_view_controller.mm |
| +++ b/ios/clean/chrome/browser/ui/tab/tab_container_view_controller.mm |
| @@ -34,7 +34,7 @@ CGFloat kToolbarHeight = 44.0; |
| @property(nonatomic, weak) UIResponder* forwardingTarget; |
| // Contained view controller utility methods. |
| -- (void)removeChildViewController:(UIViewController*)viewController; |
| +- (void)removeChildViewControllerFromParent:(UIViewController*)viewController; |
|
edchin
2017/02/21 23:28:16
This looks like the parameter is the parent, not t
edchin
2017/02/22 00:34:46
I suggest namespacing with a prefix. -(void)cr_rem
marq (ping after 24h)
2017/02/22 09:13:44
I agree. How about -detachChildViewController: ?,
justincohen
2017/02/22 12:48:35
Done.
|
| // Called after a new content view controller is set, but before |
| // |-didMoveToParentViewController:| is called on that view controller. |
| @@ -73,7 +73,7 @@ CGFloat kToolbarHeight = 44.0; |
| [NSLayoutConstraint |
| deactivateConstraints:self.contentConstraintsWithoutToolbar]; |
| [NSLayoutConstraint deactivateConstraints:self.contentConstraintsWithToolbar]; |
| - [self removeChildViewController:self.contentViewController]; |
| + [self removeChildViewControllerFromParent:self.contentViewController]; |
| // Add the new content view controller. |
| [self addChildViewController:contentViewController]; |
| @@ -92,7 +92,7 @@ CGFloat kToolbarHeight = 44.0; |
| // Remove the current toolbar view controller, if any. |
| [NSLayoutConstraint deactivateConstraints:self.toolbarConstraints]; |
| [NSLayoutConstraint deactivateConstraints:self.contentConstraintsWithToolbar]; |
| - [self removeChildViewController:self.toolbarViewController]; |
| + [self removeChildViewControllerFromParent:self.toolbarViewController]; |
| // Add the new toolbar view controller. |
| [self addChildViewController:toolbarViewController]; |
| @@ -201,7 +201,7 @@ CGFloat kToolbarHeight = 44.0; |
| #pragma mark - Private methods |
| -- (void)removeChildViewController:(UIViewController*)viewController { |
| +- (void)removeChildViewControllerFromParent:(UIViewController*)viewController { |
| if (viewController.parentViewController != self) |
| return; |
| [viewController willMoveToParentViewController:nil]; |