plugin_installer_infobar_delegate.h revision 72a454cd3513ac24fbdd0e0cb9ad70b86a99b801
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_PLUGIN_INSTALLER_INFOBAR_DELEGATE_H_
6#define CHROME_BROWSER_PLUGIN_INSTALLER_INFOBAR_DELEGATE_H_
7#pragma once
8
9#include "chrome/browser/tab_contents/infobar_delegate.h"
10
11class TabContents;
12
13// The main purpose for this class is to popup/close the infobar when there is
14// a missing plugin.
15class PluginInstallerInfoBarDelegate : public ConfirmInfoBarDelegate {
16 public:
17  explicit PluginInstallerInfoBarDelegate(TabContents* tab_contents);
18
19 private:
20  virtual ~PluginInstallerInfoBarDelegate();
21
22  // ConfirmInfoBarDelegate:
23  virtual SkBitmap* GetIcon() const;
24  virtual PluginInstallerInfoBarDelegate* AsPluginInstallerInfoBarDelegate();
25  virtual string16 GetMessageText() const;
26  virtual int GetButtons() const;
27  virtual string16 GetButtonLabel(InfoBarButton button) const;
28  virtual bool Accept();
29  virtual string16 GetLinkText();
30  virtual bool LinkClicked(WindowOpenDisposition disposition);
31
32  // The containing TabContents
33  TabContents* tab_contents_;
34
35  DISALLOW_COPY_AND_ASSIGN(PluginInstallerInfoBarDelegate);
36};
37
38#endif  // CHROME_BROWSER_PLUGIN_INSTALLER_INFOBAR_DELEGATE_H_
39