summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/views/global_error_bubble_view.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ui/views/global_error_bubble_view.h')
-rw-r--r--chrome/browser/ui/views/global_error_bubble_view.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/chrome/browser/ui/views/global_error_bubble_view.h b/chrome/browser/ui/views/global_error_bubble_view.h
new file mode 100644
index 0000000..2b17b9e
--- /dev/null
+++ b/chrome/browser/ui/views/global_error_bubble_view.h
@@ -0,0 +1,41 @@
+// 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_VIEWS_GLOBAL_ERROR_BUBBLE_VIEW_H_
+#define CHROME_BROWSER_UI_VIEWS_GLOBAL_ERROR_BUBBLE_VIEW_H_
+#pragma once
+
+#include "chrome/browser/ui/views/bubble/bubble.h"
+#include "views/controls/button/button.h"
+
+class Browser;
+class GlobalError;
+
+class GlobalErrorBubbleView : public views::View,
+ public views::ButtonListener,
+ public BubbleDelegate {
+ public:
+ GlobalErrorBubbleView(Browser* browser, GlobalError* error);
+ virtual ~GlobalErrorBubbleView();
+
+ // views::View implementation.
+ virtual gfx::Size GetPreferredSize() OVERRIDE;
+
+ // views::ButtonListener implementation.
+ virtual void ButtonPressed(views::Button* sender,
+ const views::Event& event) OVERRIDE;
+
+ // BubbleDelegate implementation.
+ virtual void BubbleClosing(Bubble* bubble, bool closed_by_escape) OVERRIDE;
+ virtual bool CloseOnEscape() OVERRIDE;
+ virtual bool FadeInOnShow() OVERRIDE;
+
+ private:
+ Browser* browser_;
+ GlobalError* error_;
+
+ DISALLOW_COPY_AND_ASSIGN(GlobalErrorBubbleView);
+};
+
+#endif // CHROME_BROWSER_UI_VIEWS_GLOBAL_ERROR_BUBBLE_VIEW_H_