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_VIEWS_SAD_TAB_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_SAD_TAB_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_SAD_TAB_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_SAD_TAB_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "ui/gfx/font.h" | 10 #include "ui/gfx/font.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 // | 23 // |
24 /////////////////////////////////////////////////////////////////////////////// | 24 /////////////////////////////////////////////////////////////////////////////// |
25 class SadTabView : public views::View, | 25 class SadTabView : public views::View, |
26 public views::LinkListener { | 26 public views::LinkListener { |
27 public: | 27 public: |
28 enum Kind { | 28 enum Kind { |
29 CRASHED, // The tab crashed. Display the "Aw, Snap!" page. | 29 CRASHED, // The tab crashed. Display the "Aw, Snap!" page. |
30 KILLED // The tab was killed. Display the killed tab page. | 30 KILLED // The tab was killed. Display the killed tab page. |
31 }; | 31 }; |
32 | 32 |
33 explicit SadTabView(TabContents* tab_contents, Kind kind); | 33 SadTabView(TabContents* tab_contents, Kind kind); |
34 virtual ~SadTabView(); | 34 virtual ~SadTabView(); |
35 | 35 |
36 // Overridden from views::View: | 36 // Overridden from views::View: |
37 virtual void OnPaint(gfx::Canvas* canvas); | 37 virtual void OnPaint(gfx::Canvas* canvas); |
38 virtual void Layout(); | 38 virtual void Layout(); |
39 | 39 |
40 // Overridden from views::LinkListener: | 40 // Overridden from views::LinkListener: |
41 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; | 41 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; |
42 | 42 |
43 private: | 43 private: |
(...skipping 16 matching lines...) Expand all Loading... |
60 gfx::Rect title_bounds_; | 60 gfx::Rect title_bounds_; |
61 gfx::Rect message_bounds_; | 61 gfx::Rect message_bounds_; |
62 gfx::Rect link_bounds_; | 62 gfx::Rect link_bounds_; |
63 | 63 |
64 Kind kind_; | 64 Kind kind_; |
65 | 65 |
66 DISALLOW_COPY_AND_ASSIGN(SadTabView); | 66 DISALLOW_COPY_AND_ASSIGN(SadTabView); |
67 }; | 67 }; |
68 | 68 |
69 #endif // CHROME_BROWSER_UI_VIEWS_SAD_TAB_VIEW_H__ | 69 #endif // CHROME_BROWSER_UI_VIEWS_SAD_TAB_VIEW_H__ |
OLD | NEW |