| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/infobars/infobar.h" | 5 #include "chrome/browser/infobars/infobar.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 PlatformSpecificOnHeightsRecalculated(); | 176 PlatformSpecificOnHeightsRecalculated(); |
| 177 | 177 |
| 178 if (container_ && (heights_differ || force_notify)) | 178 if (container_ && (heights_differ || force_notify)) |
| 179 container_->OnInfoBarStateChanged(animation_.is_animating()); | 179 container_->OnInfoBarStateChanged(animation_.is_animating()); |
| 180 } | 180 } |
| 181 | 181 |
| 182 void InfoBar::MaybeDelete() { | 182 void InfoBar::MaybeDelete() { |
| 183 if (!owner_ && delegate_ && (animation_.GetCurrentValue() == 0.0)) { | 183 if (!owner_ && delegate_ && (animation_.GetCurrentValue() == 0.0)) { |
| 184 if (container_) | 184 if (container_) |
| 185 container_->RemoveInfoBar(this); | 185 container_->RemoveInfoBar(this); |
| 186 delegate_->InfoBarClosed(); | 186 delete delegate_; |
| 187 delegate_ = NULL; | 187 delegate_ = NULL; |
| 188 } | 188 } |
| 189 } | 189 } |
| 190 | 190 |
| 191 #endif // TOOLKIT_VIEWS || TOOLKIT_GTK | 191 #endif // TOOLKIT_VIEWS || TOOLKIT_GTK |
| OLD | NEW |