Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Side by Side Diff: chrome/browser/views/sad_tab_view.h

Issue 113443: ChromeCanvas->gfx::Canvas (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_VIEWS_SAD_TAB_VIEW_H_ 5 #ifndef CHROME_BROWSER_VIEWS_SAD_TAB_VIEW_H_
6 #define CHROME_BROWSER_VIEWS_SAD_TAB_VIEW_H_ 6 #define CHROME_BROWSER_VIEWS_SAD_TAB_VIEW_H_
7 7
8 #include "app/gfx/chrome_font.h" 8 #include "app/gfx/font.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "views/view.h" 10 #include "views/view.h"
11 11
12 class SkBitmap; 12 class SkBitmap;
13 13
14 /////////////////////////////////////////////////////////////////////////////// 14 ///////////////////////////////////////////////////////////////////////////////
15 // 15 //
16 // SadTabView 16 // SadTabView
17 // 17 //
18 // A views::View subclass used to render the presentation of the crashed 18 // A views::View subclass used to render the presentation of the crashed
19 // "sad tab" in the browser window when a renderer is destroyed unnaturally. 19 // "sad tab" in the browser window when a renderer is destroyed unnaturally.
20 // 20 //
21 // Note that since this view is not (currently) part of a Container or 21 // Note that since this view is not (currently) part of a Container or
22 // RootView hierarchy, it cannot respond to events or contain controls that 22 // RootView hierarchy, it cannot respond to events or contain controls that
23 // do, right now it is used simply to render. Adding an extra Container to 23 // do, right now it is used simply to render. Adding an extra Container to
24 // TabContents seemed like a lot of complexity. Ideally, perhaps TabContents' 24 // TabContents seemed like a lot of complexity. Ideally, perhaps TabContents'
25 // view portion would itself become a Container in the future, then event 25 // view portion would itself become a Container in the future, then event
26 // processing will work. 26 // processing will work.
27 // 27 //
28 /////////////////////////////////////////////////////////////////////////////// 28 ///////////////////////////////////////////////////////////////////////////////
29 class SadTabView : public views::View { 29 class SadTabView : public views::View {
30 public: 30 public:
31 SadTabView(); 31 SadTabView();
32 virtual ~SadTabView() {} 32 virtual ~SadTabView() {}
33 33
34 // Overridden from views::View: 34 // Overridden from views::View:
35 virtual void Paint(ChromeCanvas* canvas); 35 virtual void Paint(gfx::Canvas* canvas);
36 virtual void Layout(); 36 virtual void Layout();
37 37
38 private: 38 private:
39 static void InitClass(); 39 static void InitClass();
40 40
41 // Assorted resources for display. 41 // Assorted resources for display.
42 static SkBitmap* sad_tab_bitmap_; 42 static SkBitmap* sad_tab_bitmap_;
43 static gfx::Font* title_font_; 43 static gfx::Font* title_font_;
44 static gfx::Font* message_font_; 44 static gfx::Font* message_font_;
45 static std::wstring title_; 45 static std::wstring title_;
46 static std::wstring message_; 46 static std::wstring message_;
47 static int title_width_; 47 static int title_width_;
48 48
49 // Regions within the display for different components, populated by 49 // Regions within the display for different components, populated by
50 // Layout(). 50 // Layout().
51 gfx::Rect icon_bounds_; 51 gfx::Rect icon_bounds_;
52 gfx::Rect title_bounds_; 52 gfx::Rect title_bounds_;
53 gfx::Rect message_bounds_; 53 gfx::Rect message_bounds_;
54 54
55 DISALLOW_COPY_AND_ASSIGN(SadTabView); 55 DISALLOW_COPY_AND_ASSIGN(SadTabView);
56 }; 56 };
57 57
58 #endif // CHROME_BROWSER_VIEWS_SAD_TAB_VIEW_H__ 58 #endif // CHROME_BROWSER_VIEWS_SAD_TAB_VIEW_H__
OLDNEW
« no previous file with comments | « chrome/browser/views/options/options_group_view.cc ('k') | chrome/browser/views/sad_tab_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698