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 "base/mac/foundation_util.h" | |
8 #include "base/strings/sys_string_conversions.h" | 7 #include "base/strings/sys_string_conversions.h" |
9 #include "components/infobars/core/confirm_infobar_delegate.h" | 8 #include "components/infobars/core/confirm_infobar_delegate.h" |
10 #import "ios/public/provider/chrome/browser/ui/infobar_view_protocol.h" | 9 #import "ios/public/provider/chrome/browser/ui/infobar_view_protocol.h" |
11 #include "ui/gfx/image/image.h" | 10 #include "ui/gfx/image/image.h" |
12 | 11 |
13 @implementation InfoBarController | 12 @implementation InfoBarController |
14 | 13 |
15 - (instancetype)initWithDelegate:(InfoBarViewDelegate*)delegate { | 14 - (instancetype)initWithDelegate:(InfoBarViewDelegate*)delegate { |
16 self = [super init]; | 15 self = [super init]; |
17 if (self) { | 16 if (self) { |
(...skipping 29 matching lines...) Expand all Loading... |
47 - (void)removeView { | 46 - (void)removeView { |
48 [infoBarView_ removeFromSuperview]; | 47 [infoBarView_ removeFromSuperview]; |
49 } | 48 } |
50 | 49 |
51 - (void)detachView { | 50 - (void)detachView { |
52 [infoBarView_ resetDelegate]; | 51 [infoBarView_ resetDelegate]; |
53 delegate_ = nullptr; | 52 delegate_ = nullptr; |
54 } | 53 } |
55 | 54 |
56 @end | 55 @end |
OLD | NEW |