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 "base/logging.h" |
9 #include "build/build_config.h" | 10 #include "build/build_config.h" |
10 #include "base/logging.h" | |
11 #include "chrome/browser/infobars/infobar_container.h" | 11 #include "chrome/browser/infobars/infobar_container.h" |
12 #include "chrome/browser/infobars/infobar_tab_helper.h" | 12 #include "chrome/browser/infobars/infobar_tab_helper.h" |
13 #include "ui/base/animation/slide_animation.h" | 13 #include "ui/base/animation/slide_animation.h" |
14 | 14 |
15 SkColor GetInfoBarTopColor(InfoBarDelegate::Type infobar_type) { | 15 SkColor GetInfoBarTopColor(InfoBarDelegate::Type infobar_type) { |
16 // Yellow | 16 // Yellow |
17 static const SkColor kWarningBackgroundColorTop = | 17 static const SkColor kWarningBackgroundColorTop = |
18 SkColorSetRGB(255, 242, 183); | 18 SkColorSetRGB(255, 242, 183); |
19 // Gray | 19 // Gray |
20 static const SkColor kPageActionBackgroundColorTop = | 20 static const SkColor kPageActionBackgroundColorTop = |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 delegate_->InfoBarClosed(); |
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 |