Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Side by Side Diff: chrome/browser/extensions/crashed_extension_infobar.h

Issue 5730004: Rename ExtensionsService to ExtensionService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "chrome/browser/tab_contents/infobar_delegate.h" 12 #include "chrome/browser/tab_contents/infobar_delegate.h"
13 13
14 class Extension; 14 class Extension;
15 class ExtensionsService; 15 class ExtensionService;
16 class SkBitmap; 16 class SkBitmap;
17 17
18 // This infobar will be displayed when an extension process crashes. It allows 18 // This infobar will be displayed when an extension process crashes. It allows
19 // the user to reload the crashed extension. 19 // the user to reload the crashed extension.
20 class CrashedExtensionInfoBarDelegate : public ConfirmInfoBarDelegate { 20 class CrashedExtensionInfoBarDelegate : public ConfirmInfoBarDelegate {
21 public: 21 public:
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 ExtensionService which manages that extension.
25 CrashedExtensionInfoBarDelegate(TabContents* tab_contents, 25 CrashedExtensionInfoBarDelegate(TabContents* tab_contents,
26 ExtensionsService* extensions_service, 26 ExtensionService* 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 33
34 // ConfirmInfoBarDelegate 34 // ConfirmInfoBarDelegate
35 virtual string16 GetMessageText() const; 35 virtual string16 GetMessageText() const;
36 virtual void InfoBarClosed(); 36 virtual void InfoBarClosed();
37 virtual SkBitmap* GetIcon() const; 37 virtual SkBitmap* GetIcon() const;
38 virtual int GetButtons() const; 38 virtual int GetButtons() const;
39 virtual string16 GetButtonLabel( 39 virtual string16 GetButtonLabel(
40 ConfirmInfoBarDelegate::InfoBarButton button) const; 40 ConfirmInfoBarDelegate::InfoBarButton button) const;
41 virtual bool Accept(); 41 virtual bool Accept();
42 42
43 private: 43 private:
44 ExtensionsService* extensions_service_; 44 ExtensionService* extensions_service_;
45 45
46 const std::string extension_id_; 46 const std::string extension_id_;
47 const std::string extension_name_; 47 const std::string extension_name_;
48 48
49 DISALLOW_COPY_AND_ASSIGN(CrashedExtensionInfoBarDelegate); 49 DISALLOW_COPY_AND_ASSIGN(CrashedExtensionInfoBarDelegate);
50 }; 50 };
51 51
52 #endif // CHROME_BROWSER_EXTENSIONS_CRASHED_EXTENSION_INFOBAR_H_ 52 #endif // CHROME_BROWSER_EXTENSIONS_CRASHED_EXTENSION_INFOBAR_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/convert_web_app_browsertest.cc ('k') | chrome/browser/extensions/crashed_extension_infobar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698