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

Unified Diff: chrome/browser/ui/global_error_delegate.h

Issue 7857014: patch for global error bubbles (view/gtk) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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/ui/global_error_bubble_view.h ('k') | chrome/browser/ui/global_error_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « chrome/browser/ui/global_error_bubble_view.h ('k') | chrome/browser/ui/global_error_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698