Fix build break
[chromium-blink-merge.git] / chrome / browser / infobars / simple_alert_infobar_delegate.cc
blob85b2095eb8784dde85a49532de3534cf69c1be64
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.
5 #include "chrome/browser/infobars/simple_alert_infobar_delegate.h"
7 #include "chrome/browser/infobars/infobar_service.h"
8 #include "third_party/skia/include/core/SkBitmap.h"
10 // static
11 void SimpleAlertInfoBarDelegate::Create(InfoBarService* infobar_service,
12 gfx::Image* icon,
13 const string16& message,
14 bool auto_expire) {
15 infobar_service->AddInfoBar(scoped_ptr<InfoBarDelegate>(
16 new SimpleAlertInfoBarDelegate(infobar_service, icon, message,
17 auto_expire)));
20 SimpleAlertInfoBarDelegate::SimpleAlertInfoBarDelegate(
21 InfoBarService* infobar_service,
22 gfx::Image* icon,
23 const string16& message,
24 bool auto_expire)
25 : ConfirmInfoBarDelegate(infobar_service),
26 icon_(icon),
27 message_(message),
28 auto_expire_(auto_expire) {
31 SimpleAlertInfoBarDelegate::~SimpleAlertInfoBarDelegate() {
34 gfx::Image* SimpleAlertInfoBarDelegate::GetIcon() const {
35 return icon_;
38 string16 SimpleAlertInfoBarDelegate::GetMessageText() const {
39 return message_;
42 int SimpleAlertInfoBarDelegate::GetButtons() const {
43 return BUTTON_NONE;
46 bool SimpleAlertInfoBarDelegate::ShouldExpireInternal(
47 const content::LoadCommittedDetails& details) const {
48 return auto_expire_ && ConfirmInfoBarDelegate::ShouldExpireInternal(details);