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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_VIEWS_GLOBAL_ERROR_BUBBLE_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_GLOBAL_ERROR_BUBBLE_VIEW_H_
8 #include "base/memory/weak_ptr.h"
9 #include "chrome/browser/ui/global_error/global_error_bubble_view_base.h"
10 #include "ui/views/bubble/bubble_delegate.h"
11 #include "ui/views/controls/button/button.h"
14 class GlobalErrorWithStandardBubble;
16 class GlobalErrorBubbleView : public views::ButtonListener,
17 public views::BubbleDelegateView,
18 public GlobalErrorBubbleViewBase {
20 GlobalErrorBubbleView(
21 views::View* anchor_view,
22 views::BubbleBorder::Arrow arrow,
24 const base::WeakPtr<GlobalErrorWithStandardBubble>& error);
25 ~GlobalErrorBubbleView() override;
27 // views::ButtonListener implementation.
28 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
30 // views::WidgetDelegate implementation.
31 void WindowClosing() override;
33 // GlobalErrorBubbleViewBase implementation.
34 void CloseBubbleView() override;
38 base::WeakPtr<GlobalErrorWithStandardBubble> error_;
40 DISALLOW_COPY_AND_ASSIGN(GlobalErrorBubbleView);
43 #endif // CHROME_BROWSER_UI_VIEWS_GLOBAL_ERROR_BUBBLE_VIEW_H_