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

Unified Diff: chrome/browser/extensions/crashed_extension_infobar.h

Issue 164151: Fix "crashed extension" infobar browser crashes.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: sync with trunk Created 11 years, 4 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browser.cc ('k') | chrome/browser/extensions/crashed_extension_infobar.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/crashed_extension_infobar.h
diff --git a/chrome/browser/extensions/crashed_extension_infobar.h b/chrome/browser/extensions/crashed_extension_infobar.h
new file mode 100644
index 0000000000000000000000000000000000000000..4a4e625115a29caf09cc62e10538b1318b74bd4a
--- /dev/null
+++ b/chrome/browser/extensions/crashed_extension_infobar.h
@@ -0,0 +1,46 @@
+// 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.
+
+#ifndef CHROME_BROWSER_EXTENSIONS_CRASHED_EXTENSION_INFOBAR_H_
+#define CHROME_BROWSER_EXTENSIONS_CRASHED_EXTENSION_INFOBAR_H_
+
+#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 {
+ public:
+ // |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);
+
+ // 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();
+
+ private:
+ ExtensionsService* extensions_service_;
+
+ const std::string extension_id_;
+ const std::string extension_name_;
+
+ DISALLOW_COPY_AND_ASSIGN(CrashedExtensionInfoBarDelegate);
+};
+
+#endif // CHROME_BROWSER_EXTENSIONS_CRASHED_EXTENSION_INFOBAR_H_
« no previous file with comments | « chrome/browser/browser.cc ('k') | chrome/browser/extensions/crashed_extension_infobar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698