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
3// found in the LICENSE file.
4
5#ifndef CHROME_BROWSER_TAB_CONTENTS_SIMPLE_ALERT_INFOBAR_DELEGATE_H_
6#define CHROME_BROWSER_TAB_CONTENTS_SIMPLE_ALERT_INFOBAR_DELEGATE_H_
7#pragma once
8
9#include "base/basictypes.h"
10#include "base/compiler_specific.h"
11#include "base/string16.h"
12#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
13
14class SkBitmap;
15class TabContents;
16
17class SimpleAlertInfoBarDelegate : public ConfirmInfoBarDelegate {
18 public:
19  SimpleAlertInfoBarDelegate(TabContents* contents,
20                             SkBitmap* icon,  // May be NULL.
21                             const string16& message,
22                             bool auto_expire);
23
24 private:
25  virtual ~SimpleAlertInfoBarDelegate();
26
27  // ConfirmInfoBarDelegate:
28  virtual bool ShouldExpire(
29      const NavigationController::LoadCommittedDetails& details) const OVERRIDE;
30  virtual void InfoBarClosed() OVERRIDE;
31  virtual SkBitmap* GetIcon() const OVERRIDE;
32  virtual string16 GetMessageText() const OVERRIDE;
33  virtual int GetButtons() const OVERRIDE;
34
35  SkBitmap* icon_;
36  string16 message_;
37  bool auto_expire_;  // Should it expire automatically on navigation?
38
39  DISALLOW_COPY_AND_ASSIGN(SimpleAlertInfoBarDelegate);
40};
41
42#endif  // CHROME_BROWSER_TAB_CONTENTS_SIMPLE_ALERT_INFOBAR_DELEGATE_H_
43