| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_CRASHED_EXTENSION_INFOBAR_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_CRASHED_EXTENSION_INFOBAR_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_CRASHED_EXTENSION_INFOBAR_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_CRASHED_EXTENSION_INFOBAR_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 // |tab_contents| should point to the TabContents the infobar will be added | 22 // |tab_contents| should point to the TabContents the infobar will be added |
| 23 // to. |extension| should be the crashed extension, and |extensions_service| | 23 // to. |extension| should be the crashed extension, and |extensions_service| |
| 24 // the ExtensionsService which manages that extension. | 24 // the ExtensionsService which manages that extension. |
| 25 CrashedExtensionInfoBarDelegate(TabContents* tab_contents, | 25 CrashedExtensionInfoBarDelegate(TabContents* tab_contents, |
| 26 ExtensionsService* extensions_service, | 26 ExtensionsService* extensions_service, |
| 27 const Extension* extension); | 27 const Extension* extension); |
| 28 | 28 |
| 29 const std::string extension_id() { return extension_id_; } | 29 const std::string extension_id() { return extension_id_; } |
| 30 | 30 |
| 31 // InfoBarDelegate | 31 // InfoBarDelegate |
| 32 virtual CrashedExtensionInfoBarDelegate* AsCrashedExtensionInfoBarDelegate() { | 32 virtual CrashedExtensionInfoBarDelegate* AsCrashedExtensionInfoBarDelegate(); |
| 33 return this; | |
| 34 } | |
| 35 | 33 |
| 36 // ConfirmInfoBarDelegate | 34 // ConfirmInfoBarDelegate |
| 37 virtual string16 GetMessageText() const; | 35 virtual string16 GetMessageText() const; |
| 38 virtual void InfoBarClosed(); | 36 virtual void InfoBarClosed(); |
| 39 virtual SkBitmap* GetIcon() const; | 37 virtual SkBitmap* GetIcon() const; |
| 40 virtual int GetButtons() const; | 38 virtual int GetButtons() const; |
| 41 virtual string16 GetButtonLabel( | 39 virtual string16 GetButtonLabel( |
| 42 ConfirmInfoBarDelegate::InfoBarButton button) const; | 40 ConfirmInfoBarDelegate::InfoBarButton button) const; |
| 43 virtual bool Accept(); | 41 virtual bool Accept(); |
| 44 | 42 |
| 45 private: | 43 private: |
| 46 ExtensionsService* extensions_service_; | 44 ExtensionsService* extensions_service_; |
| 47 | 45 |
| 48 const std::string extension_id_; | 46 const std::string extension_id_; |
| 49 const std::string extension_name_; | 47 const std::string extension_name_; |
| 50 | 48 |
| 51 DISALLOW_COPY_AND_ASSIGN(CrashedExtensionInfoBarDelegate); | 49 DISALLOW_COPY_AND_ASSIGN(CrashedExtensionInfoBarDelegate); |
| 52 }; | 50 }; |
| 53 | 51 |
| 54 #endif // CHROME_BROWSER_EXTENSIONS_CRASHED_EXTENSION_INFOBAR_H_ | 52 #endif // CHROME_BROWSER_EXTENSIONS_CRASHED_EXTENSION_INFOBAR_H_ |
| OLD | NEW |