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_GTK_GLOBAL_ERROR_BUBBLE_H_
6 #define CHROME_BROWSER_UI_GTK_GLOBAL_ERROR_BUBBLE_H_
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
12 #include "base/memory/weak_ptr.h"
13 #include "chrome/browser/ui/global_error/global_error_bubble_view_base.h"
14 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h"
15 #include "ui/base/gtk/gtk_signal.h"
17 typedef struct _GtkWidget GtkWidget
;
19 class GlobalErrorWithStandardBubble
;
22 class GlobalErrorBubble
: public BubbleDelegateGtk
,
23 public GlobalErrorBubbleViewBase
{
25 GlobalErrorBubble(Browser
* browser
,
26 const base::WeakPtr
<GlobalErrorWithStandardBubble
>& error
,
28 virtual ~GlobalErrorBubble();
30 // BubbleDelegateGtk implementation.
31 virtual void BubbleClosing(BubbleGtk
* bubble
, bool closed_by_escape
) OVERRIDE
;
34 CHROMEGTK_CALLBACK_0(GlobalErrorBubble
, void, OnDestroy
);
35 CHROMEGTK_CALLBACK_0(GlobalErrorBubble
, void, OnAcceptButton
);
36 CHROMEGTK_CALLBACK_0(GlobalErrorBubble
, void, OnCancelButton
);
37 CHROMEGTK_CALLBACK_0(GlobalErrorBubble
, void, OnRealize
);
39 virtual void CloseBubbleView() OVERRIDE
;
43 base::WeakPtr
<GlobalErrorWithStandardBubble
> error_
;
44 std::vector
<GtkWidget
*> message_labels_
;
47 DISALLOW_COPY_AND_ASSIGN(GlobalErrorBubble
);
50 #endif // CHROME_BROWSER_UI_GTK_GLOBAL_ERROR_BUBBLE_H_