Logo Search packages:      
Sourcecode: chromium-browser version File versions  Download package


// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.


#include <string>

#include "base/basictypes.h"
#include "chrome/browser/tab_contents/infobar_delegate.h"

class Extension;
class ExtensionsService;
class SkBitmap;

// This infobar will be displayed when an extension process crashes. It allows
// the user to reload the crashed extension.
class CrashedExtensionInfoBarDelegate : public ConfirmInfoBarDelegate {
  // |tab_contents| should point to the TabContents the infobar will be added
  // to. |extension| should be the crashed extension, and |extensions_service|
  // the ExtensionsService which manages that extension.
  CrashedExtensionInfoBarDelegate(TabContents* tab_contents,
                                  ExtensionsService* extensions_service,
                                  const Extension* extension);

  const std::string extension_id() { return extension_id_; }

  // InfoBarDelegate
  virtual CrashedExtensionInfoBarDelegate* AsCrashedExtensionInfoBarDelegate() {
    return this;

  // ConfirmInfoBarDelegate
  virtual std::wstring GetMessageText() const;
  virtual void InfoBarClosed();
  virtual SkBitmap* GetIcon() const;
  virtual int GetButtons() const;
  virtual std::wstring GetButtonLabel(
      ConfirmInfoBarDelegate::InfoBarButton button) const;
  virtual bool Accept();

  ExtensionsService* extensions_service_;

  const std::string extension_id_;
  const std::string extension_name_;



Generated by  Doxygen 1.6.0   Back to index