Index: chrome/browser/ui/global_error_delegate.h |
diff --git a/chrome/browser/ui/global_error_delegate.h b/chrome/browser/ui/global_error_delegate.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b1c51d488a9d53824b3d46c0239b9bdcfd5bcf2b |
--- /dev/null |
+++ b/chrome/browser/ui/global_error_delegate.h |
@@ -0,0 +1,50 @@ |
+// 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_UI_GLOBAL_ERROR_DELEGATE_H_ |
+#define CHROME_BROWSER_UI_GLOBAL_ERROR_DELEGATE_H_ |
+#pragma once |
+ |
+#include "base/basictypes.h" |
+#include "base/string16.h" |
+#include "ui/gfx/rect.h" |
+ |
+class Browser; |
+ |
+// This object describes a single global error. |
+class GlobalErrorDelegate { |
+ public: |
+ GlobalErrorDelegate(); |
+ virtual ~GlobalErrorDelegate(); |
+ |
+ virtual bool HasBadge() = 0; |
+ virtual int GetBadgeResourceID(); |
+ |
+ virtual bool HasMenuItem() = 0; |
+ virtual int MenuItemCommandID() = 0; |
+ virtual string16 MenuItemLabel() = 0; |
+ virtual int MenuItemIconResourceID(); |
+ virtual void ExecuteMenuItem(Browser* browser) = 0; |
+ |
+ virtual bool HasBubbleView() = 0; |
+ virtual void ShowBubbleView(Browser* browser, |
+ const gfx::Rect& position_relative_to); |
+ virtual int GetBubbleViewIconResourceID(); |
+ virtual string16 GetBubbleViewTitle() = 0; |
+ virtual string16 GetBubbleViewMessage() = 0; |
+ virtual string16 GetBubbleViewAcceptButtonLabel() = 0; |
+ virtual string16 GetBubbleViewCancelButtonLabel() = 0; |
+ virtual void BubbleViewDidClose() = 0; |
+ virtual void BubbleViewAcceptButtonPressed() = 0; |
+ virtual void BubbleViewCancelButtonPressed() = 0; |
+ |
+ private: |
+ static void ShowBubbleView(GlobalErrorDelegate* delegate, |
+ Browser* browser, |
+ const gfx::Rect& position_relative_to); |
+ |
+ DISALLOW_COPY_AND_ASSIGN(GlobalErrorDelegate); |
+}; |
+ |
+#endif // CHROME_BROWSER_UI_GLOBAL_ERROR_DELEGATE_H_ |