OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2009 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_EXTENSIONS_CRASHED_EXTENSION_INFOBAR_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_CRASHED_EXTENSION_INFOBAR_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/basictypes.h" |
| 11 #include "chrome/browser/tab_contents/infobar_delegate.h" |
| 12 |
| 13 class Extension; |
| 14 class ExtensionsService; |
| 15 class SkBitmap; |
| 16 |
| 17 // This infobar will be displayed when an extension process crashes. It allows |
| 18 // the user to reload the crashed extension. |
| 19 class CrashedExtensionInfoBarDelegate : public ConfirmInfoBarDelegate { |
| 20 public: |
| 21 // |tab_contents| should point to the TabContents the infobar will be added |
| 22 // to. |extension| should be the crashed extension, and |extensions_service| |
| 23 // the ExtensionsService which manages that extension. |
| 24 CrashedExtensionInfoBarDelegate(TabContents* tab_contents, |
| 25 ExtensionsService* extensions_service, |
| 26 const Extension* extension); |
| 27 |
| 28 // ConfirmInfoBarDelegate |
| 29 virtual std::wstring GetMessageText() const; |
| 30 virtual void InfoBarClosed(); |
| 31 virtual SkBitmap* GetIcon() const; |
| 32 virtual int GetButtons() const; |
| 33 virtual std::wstring GetButtonLabel( |
| 34 ConfirmInfoBarDelegate::InfoBarButton button) const; |
| 35 virtual bool Accept(); |
| 36 |
| 37 private: |
| 38 ExtensionsService* extensions_service_; |
| 39 |
| 40 const std::string extension_id_; |
| 41 const std::string extension_name_; |
| 42 |
| 43 DISALLOW_COPY_AND_ASSIGN(CrashedExtensionInfoBarDelegate); |
| 44 }; |
| 45 |
| 46 #endif // CHROME_BROWSER_EXTENSIONS_CRASHED_EXTENSION_INFOBAR_H_ |
OLD | NEW |