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

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

Issue 8176001: Warn user in case extension delays network traffic too much. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Cleanup Created 9 years, 2 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
Index: chrome/browser/extensions/extension_global_error.h
diff --git a/chrome/browser/extensions/extension_global_error.h b/chrome/browser/extensions/extension_global_error.h
new file mode 100644
index 0000000000000000000000000000000000000000..fdcb0b448b0e6d4b9295741fad435d153f11c6ae
--- /dev/null
+++ b/chrome/browser/extensions/extension_global_error.h
@@ -0,0 +1,42 @@
+// Copyright (c) 2011 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_EXTENSION_GLOBAL_ERROR_H_
+#define CHROME_BROWSER_EXTENSIONS_EXTENSION_GLOBAL_ERROR_H_
+#pragma once
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "chrome/browser/ui/global_error.h"
+
+// GlobalError implementation that warns the user if extensions created
+// warnings or errors. If the user clicks on the wrench menu, the user
+// is redirected to chrome://extensions to inspect the errors.
+class ExtensionGlobalError : public GlobalError {
+ public:
+ ExtensionGlobalError();
+ virtual ~ExtensionGlobalError();
+
+ // Implementation for GlobalError:
+ virtual bool HasBadge() OVERRIDE;
+
+ virtual bool HasMenuItem() OVERRIDE;
+ virtual int MenuItemCommandID() OVERRIDE;
+ virtual string16 MenuItemLabel() OVERRIDE;
+ virtual void ExecuteMenuItem(Browser* browser) OVERRIDE;
+
+ virtual bool HasBubbleView() OVERRIDE;
+ virtual string16 GetBubbleViewTitle() OVERRIDE;
+ virtual string16 GetBubbleViewMessage() OVERRIDE;
+ virtual string16 GetBubbleViewAcceptButtonLabel() OVERRIDE;
+ virtual string16 GetBubbleViewCancelButtonLabel() OVERRIDE;
+ virtual void BubbleViewDidClose() OVERRIDE;
+ virtual void BubbleViewAcceptButtonPressed() OVERRIDE;
+ virtual void BubbleViewCancelButtonPressed() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ExtensionGlobalError);
+};
+
+#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_GLOBAL_ERROR_H_

Powered by Google App Engine
This is Rietveld 408576698