| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "ios/chrome/browser/infobars/infobar_controller.h" | 5 #include "ios/chrome/browser/infobars/infobar_controller.h" |
| 6 | 6 |
| 7 #include <memory> |
| 8 |
| 7 #include "base/logging.h" | 9 #include "base/logging.h" |
| 8 #include "base/memory/scoped_ptr.h" | |
| 9 #import "ios/public/provider/chrome/browser/ui/infobar_view_protocol.h" | 10 #import "ios/public/provider/chrome/browser/ui/infobar_view_protocol.h" |
| 10 | 11 |
| 11 @interface InfoBarController () { | 12 @interface InfoBarController () { |
| 12 base::scoped_nsobject<UIView<InfoBarViewProtocol>> _infoBarView; | 13 base::scoped_nsobject<UIView<InfoBarViewProtocol>> _infoBarView; |
| 13 } | 14 } |
| 14 @end | 15 @end |
| 15 | 16 |
| 16 @implementation InfoBarController | 17 @implementation InfoBarController |
| 17 @synthesize delegate = _delegate; | 18 @synthesize delegate = _delegate; |
| 18 | 19 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 - (void)removeView { | 65 - (void)removeView { |
| 65 [_infoBarView removeFromSuperview]; | 66 [_infoBarView removeFromSuperview]; |
| 66 } | 67 } |
| 67 | 68 |
| 68 - (void)detachView { | 69 - (void)detachView { |
| 69 [_infoBarView resetDelegate]; | 70 [_infoBarView resetDelegate]; |
| 70 _delegate = nullptr; | 71 _delegate = nullptr; |
| 71 } | 72 } |
| 72 | 73 |
| 73 @end | 74 @end |
| OLD | NEW |