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

Side by Side Diff: chrome/browser/ui/global_error/global_error.h

Issue 11150002: New post-sideload UI: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_UI_GLOBAL_ERROR_GLOBAL_ERROR_H_ 5 #ifndef CHROME_BROWSER_UI_GLOBAL_ERROR_GLOBAL_ERROR_H_
6 #define CHROME_BROWSER_UI_GLOBAL_ERROR_GLOBAL_ERROR_H_ 6 #define CHROME_BROWSER_UI_GLOBAL_ERROR_GLOBAL_ERROR_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
11 11
12 class Browser; 12 class Browser;
13 class GlobalErrorBubbleViewBase; 13 class GlobalErrorBubbleViewBase;
14 14
15 // This object describes a single global error. 15 // This object describes a single global error.
16 class GlobalError : public base::SupportsWeakPtr<GlobalError> { 16 class GlobalError : public base::SupportsWeakPtr<GlobalError> {
17 public: 17 public:
18 enum Severity {
19 SEVERITY_LOW,
20 SEVERITY_MEDIUM,
21 SEVERITY_HIGH,
22 SEVERITY_CRITICAL,
23 NUM_SEVERITY,
24 };
25
18 GlobalError(); 26 GlobalError();
19 virtual ~GlobalError(); 27 virtual ~GlobalError();
20 28
21 // Returns true if a badge should be drawn on the wrench menu button. 29 // Returns true if a badge should be drawn on the wrench menu button.
22 virtual bool HasBadge() = 0; 30 virtual bool HasBadge() = 0;
23 // Returns the resource ID of the badge icon. 31 // Returns the resource ID of the badge icon.
24 virtual int GetBadgeResourceID(); 32 virtual int GetBadgeResourceID();
33 // Returns the error's severity level. If there are multiple errors,
34 // the error with the highest severity will display in the menu. If not
35 // overridden, this is based on the badge resource ID.
36 virtual Severity GetSeverity();
25 37
26 // Returns true if a menu item should be added to the wrench menu. 38 // Returns true if a menu item should be added to the wrench menu.
27 virtual bool HasMenuItem() = 0; 39 virtual bool HasMenuItem() = 0;
28 // Returns the command ID for the menu item. 40 // Returns the command ID for the menu item.
29 virtual int MenuItemCommandID() = 0; 41 virtual int MenuItemCommandID() = 0;
30 // Returns the label for the menu item. 42 // Returns the label for the menu item.
31 virtual string16 MenuItemLabel() = 0; 43 virtual string16 MenuItemLabel() = 0;
32 // Returns the resource ID for the menu item icon. 44 // Returns the resource ID for the menu item icon.
33 virtual int MenuItemIconResourceID(); 45 virtual int MenuItemIconResourceID();
34 // Called when the user clicks on the menu item. 46 // Called when the user clicks on the menu item.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 80
69 81
70 private: 82 private:
71 bool has_shown_bubble_view_; 83 bool has_shown_bubble_view_;
72 GlobalErrorBubbleViewBase* bubble_view_; 84 GlobalErrorBubbleViewBase* bubble_view_;
73 85
74 DISALLOW_COPY_AND_ASSIGN(GlobalError); 86 DISALLOW_COPY_AND_ASSIGN(GlobalError);
75 }; 87 };
76 88
77 #endif // CHROME_BROWSER_UI_GLOBAL_ERROR_GLOBAL_ERROR_H_ 89 #endif // CHROME_BROWSER_UI_GLOBAL_ERROR_GLOBAL_ERROR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698