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 ElevationIconSetter
;
15 class GlobalErrorWithStandardBubble
;
17 class GlobalErrorBubbleView
: public views::ButtonListener
,
18 public views::BubbleDelegateView
,
19 public GlobalErrorBubbleViewBase
{
21 GlobalErrorBubbleView(
22 views::View
* anchor_view
,
23 views::BubbleBorder::Arrow arrow
,
25 const base::WeakPtr
<GlobalErrorWithStandardBubble
>& error
);
26 ~GlobalErrorBubbleView() override
;
28 // views::ButtonListener implementation.
29 void ButtonPressed(views::Button
* sender
, const ui::Event
& event
) override
;
31 // views::WidgetDelegate implementation.
32 void WindowClosing() override
;
34 // GlobalErrorBubbleViewBase implementation.
35 void CloseBubbleView() override
;
39 base::WeakPtr
<GlobalErrorWithStandardBubble
> error_
;
41 scoped_ptr
<ElevationIconSetter
> elevation_icon_setter_
;
43 DISALLOW_COPY_AND_ASSIGN(GlobalErrorBubbleView
);
46 #endif // CHROME_BROWSER_UI_VIEWS_GLOBAL_ERROR_BUBBLE_VIEW_H_