OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_GLOBAL_ERROR_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_UI_GLOBAL_ERROR_DELEGATE_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/basictypes.h" |
| 10 #include "base/string16.h" |
| 11 #include "ui/gfx/rect.h" |
| 12 |
| 13 class Browser; |
| 14 |
| 15 // This object describes a single global error. |
| 16 class GlobalErrorDelegate { |
| 17 public: |
| 18 GlobalErrorDelegate(); |
| 19 virtual ~GlobalErrorDelegate(); |
| 20 |
| 21 virtual bool HasBadge() = 0; |
| 22 virtual int GetBadgeResourceID(); |
| 23 |
| 24 virtual bool HasMenuItem() = 0; |
| 25 virtual int MenuItemCommandID() = 0; |
| 26 virtual string16 MenuItemLabel() = 0; |
| 27 virtual int MenuItemIconResourceID(); |
| 28 virtual void ExecuteMenuItem(Browser* browser) = 0; |
| 29 |
| 30 virtual bool HasBubbleView() = 0; |
| 31 virtual void ShowBubbleView(Browser* browser, |
| 32 const gfx::Rect& position_relative_to); |
| 33 virtual int GetBubbleViewIconResourceID(); |
| 34 virtual string16 GetBubbleViewTitle() = 0; |
| 35 virtual string16 GetBubbleViewMessage() = 0; |
| 36 virtual string16 GetBubbleViewAcceptButtonLabel() = 0; |
| 37 virtual string16 GetBubbleViewCancelButtonLabel() = 0; |
| 38 virtual void BubbleViewDidClose() = 0; |
| 39 virtual void BubbleViewAcceptButtonPressed() = 0; |
| 40 virtual void BubbleViewCancelButtonPressed() = 0; |
| 41 |
| 42 private: |
| 43 static void ShowBubbleView(GlobalErrorDelegate* delegate, |
| 44 Browser* browser, |
| 45 const gfx::Rect& position_relative_to); |
| 46 |
| 47 DISALLOW_COPY_AND_ASSIGN(GlobalErrorDelegate); |
| 48 }; |
| 49 |
| 50 #endif // CHROME_BROWSER_UI_GLOBAL_ERROR_DELEGATE_H_ |
OLD | NEW |