| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/tab_contents/simple_alert_infobar_delegate.h" | |
| 6 | |
| 7 #include "third_party/skia/include/core/SkBitmap.h" | |
| 8 | |
| 9 SimpleAlertInfoBarDelegate::SimpleAlertInfoBarDelegate( | |
| 10 InfoBarTabHelper* infobar_helper, | |
| 11 gfx::Image* icon, | |
| 12 const string16& message, | |
| 13 bool auto_expire) | |
| 14 : ConfirmInfoBarDelegate(infobar_helper), | |
| 15 icon_(icon), | |
| 16 message_(message), | |
| 17 auto_expire_(auto_expire) { | |
| 18 } | |
| 19 | |
| 20 SimpleAlertInfoBarDelegate::~SimpleAlertInfoBarDelegate() { | |
| 21 } | |
| 22 | |
| 23 gfx::Image* SimpleAlertInfoBarDelegate::GetIcon() const { | |
| 24 return icon_; | |
| 25 } | |
| 26 | |
| 27 string16 SimpleAlertInfoBarDelegate::GetMessageText() const { | |
| 28 return message_; | |
| 29 } | |
| 30 | |
| 31 int SimpleAlertInfoBarDelegate::GetButtons() const { | |
| 32 return BUTTON_NONE; | |
| 33 } | |
| 34 | |
| 35 bool SimpleAlertInfoBarDelegate::ShouldExpireInternal( | |
| 36 const content::LoadCommittedDetails& details) const { | |
| 37 return auto_expire_ && ConfirmInfoBarDelegate::ShouldExpireInternal(details); | |
| 38 } | |
| OLD | NEW |