OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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.h" | 5 #include "ios/chrome/browser/infobars/infobar.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "components/infobars/core/confirm_infobar_delegate.h" | 10 #include "components/infobars/core/confirm_infobar_delegate.h" |
11 #include "components/translate/core/browser/translate_infobar_delegate.h" | 11 #include "components/translate/core/browser/translate_infobar_delegate.h" |
12 #import "ios/chrome/browser/infobars/confirm_infobar_controller.h" | 12 #import "ios/chrome/browser/infobars/confirm_infobar_controller.h" |
13 #include "ios/chrome/browser/infobars/infobar_controller.h" | 13 #include "ios/chrome/browser/infobars/infobar_controller.h" |
14 #include "ios/chrome/browser/translate/translate_infobar_tags.h" | 14 #include "ios/chrome/browser/translate/translate_infobar_tags.h" |
| 15 #import "ios/chrome/browser/ui/infobars/infobar_view.h" |
15 | 16 |
16 #if !defined(__has_feature) || !__has_feature(objc_arc) | 17 #if !defined(__has_feature) || !__has_feature(objc_arc) |
17 #error "This file requires ARC support." | 18 #error "This file requires ARC support." |
18 #endif | 19 #endif |
19 | 20 |
20 using infobars::InfoBar; | 21 using infobars::InfoBar; |
21 using infobars::InfoBarDelegate; | 22 using infobars::InfoBarDelegate; |
22 | 23 |
23 InfoBarIOS::InfoBarIOS(std::unique_ptr<InfoBarDelegate> delegate) | 24 InfoBarIOS::InfoBarIOS(std::unique_ptr<InfoBarDelegate> delegate) |
24 : InfoBar(std::move(delegate)) {} | 25 : InfoBar(std::move(delegate)) {} |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 } | 120 } |
120 } | 121 } |
121 | 122 |
122 void InfoBarIOS::InfoBarDidCancel() { | 123 void InfoBarIOS::InfoBarDidCancel() { |
123 // If not owned, the infobar has already been removed. | 124 // If not owned, the infobar has already been removed. |
124 if (!owner()) | 125 if (!owner()) |
125 return; | 126 return; |
126 delegate()->InfoBarDismissed(); | 127 delegate()->InfoBarDismissed(); |
127 RemoveSelf(); | 128 RemoveSelf(); |
128 } | 129 } |
OLD | NEW |