OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_GTK_SAD_TAB_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_SAD_TAB_GTK_H_ |
6 #define CHROME_BROWSER_UI_GTK_SAD_TAB_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_SAD_TAB_GTK_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 typedef struct _GtkWidget GtkWidget; | 9 typedef struct _GtkWidget GtkWidget; |
10 | 10 |
11 #include "chrome/browser/ui/gtk/owned_widget_gtk.h" | 11 #include "chrome/browser/ui/gtk/owned_widget_gtk.h" |
12 #include "ui/base/gtk/gtk_signal.h" | 12 #include "ui/base/gtk/gtk_signal.h" |
13 | 13 |
14 class TabContents; | 14 class TabContents; |
15 | 15 |
16 class SadTabGtk { | 16 class SadTabGtk { |
17 public: | 17 public: |
18 enum Kind { | 18 enum Kind { |
19 CRASHED, // The tab crashed. Display the "Aw, Snap!" page. | 19 CRASHED, // The tab crashed. Display the "Aw, Snap!" page. |
20 KILLED // The tab was killed. Display the killed tab page. | 20 KILLED // The tab was killed. Display the killed tab page. |
21 }; | 21 }; |
22 | 22 |
23 explicit SadTabGtk(TabContents* tab_contents, Kind kind); | 23 SadTabGtk(TabContents* tab_contents, Kind kind); |
24 virtual ~SadTabGtk(); | 24 virtual ~SadTabGtk(); |
25 | 25 |
26 GtkWidget* widget() const { return event_box_.get(); } | 26 GtkWidget* widget() const { return event_box_.get(); } |
27 | 27 |
28 private: | 28 private: |
29 CHROMEGTK_CALLBACK_0(SadTabGtk, void, OnLinkButtonClick); | 29 CHROMEGTK_CALLBACK_0(SadTabGtk, void, OnLinkButtonClick); |
30 | 30 |
31 void OnLinkButtonClick(); | 31 void OnLinkButtonClick(); |
32 | 32 |
33 TabContents* tab_contents_; | 33 TabContents* tab_contents_; |
34 OwnedWidgetGtk event_box_; | 34 OwnedWidgetGtk event_box_; |
35 Kind kind_; | 35 Kind kind_; |
36 | 36 |
37 DISALLOW_COPY_AND_ASSIGN(SadTabGtk); | 37 DISALLOW_COPY_AND_ASSIGN(SadTabGtk); |
38 }; | 38 }; |
39 | 39 |
40 #endif // CHROME_BROWSER_UI_GTK_SAD_TAB_GTK_H_ | 40 #endif // CHROME_BROWSER_UI_GTK_SAD_TAB_GTK_H_ |
OLD | NEW |