| 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 "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "components/infobars/core/confirm_infobar_delegate.h" | 8 #include "components/infobars/core/confirm_infobar_delegate.h" |
| 9 #include "components/translate/core/browser/translate_infobar_delegate.h" | 9 #include "components/translate/core/browser/translate_infobar_delegate.h" |
| 10 #import "ios/chrome/browser/infobars/confirm_infobar_controller.h" | 10 #import "ios/chrome/browser/infobars/confirm_infobar_controller.h" |
| 11 #include "ios/chrome/browser/infobars/infobar_controller.h" |
| 11 #include "ios/chrome/browser/translate/translate_infobar_tags.h" | 12 #include "ios/chrome/browser/translate/translate_infobar_tags.h" |
| 12 | 13 |
| 13 using infobars::InfoBar; | 14 using infobars::InfoBar; |
| 14 using infobars::InfoBarDelegate; | 15 using infobars::InfoBarDelegate; |
| 15 | 16 |
| 16 InfoBarIOS::InfoBarIOS(scoped_ptr<InfoBarDelegate> delegate) | 17 InfoBarIOS::InfoBarIOS(scoped_ptr<InfoBarDelegate> delegate) |
| 17 : InfoBar(delegate.Pass()) { | 18 : InfoBar(delegate.Pass()) { |
| 18 } | 19 } |
| 19 | 20 |
| 20 InfoBarIOS::~InfoBarIOS() { | 21 InfoBarIOS::~InfoBarIOS() { |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 } | 114 } |
| 114 } | 115 } |
| 115 | 116 |
| 116 void InfoBarIOS::InfoBarDidCancel() { | 117 void InfoBarIOS::InfoBarDidCancel() { |
| 117 // If not owned, the infobar has already been removed. | 118 // If not owned, the infobar has already been removed. |
| 118 if (!owner()) | 119 if (!owner()) |
| 119 return; | 120 return; |
| 120 delegate()->InfoBarDismissed(); | 121 delegate()->InfoBarDismissed(); |
| 121 RemoveSelf(); | 122 RemoveSelf(); |
| 122 } | 123 } |
| OLD | NEW |