OLD | NEW |
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 #include "chrome/browser/views/sad_tab_view.h" | 5 #include "chrome/browser/views/sad_tab_view.h" |
6 | 6 |
| 7 #include "app/l10n_util.h" |
7 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
8 #include "base/gfx/size.h" | 9 #include "base/gfx/size.h" |
9 #include "chrome/common/gfx/chrome_canvas.h" | 10 #include "chrome/common/gfx/chrome_canvas.h" |
10 #include "chrome/common/l10n_util.h" | |
11 #include "grit/generated_resources.h" | 11 #include "grit/generated_resources.h" |
12 #include "grit/theme_resources.h" | 12 #include "grit/theme_resources.h" |
13 #include "skia/ext/skia_utils.h" | 13 #include "skia/ext/skia_utils.h" |
14 #include "skia/include/SkGradientShader.h" | 14 #include "skia/include/SkGradientShader.h" |
15 | 15 |
16 static const int kSadTabOffset = -64; | 16 static const int kSadTabOffset = -64; |
17 static const int kIconTitleSpacing = 20; | 17 static const int kIconTitleSpacing = 20; |
18 static const int kTitleMessageSpacing = 15; | 18 static const int kTitleMessageSpacing = 15; |
19 static const int kMessageBottomMargin = 20; | 19 static const int kMessageBottomMargin = 20; |
20 static const float kMessageSize = 0.65f; | 20 static const float kMessageSize = 0.65f; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 rb.GetFont(ResourceBundle::BaseFont).DeriveFont(1)); | 91 rb.GetFont(ResourceBundle::BaseFont).DeriveFont(1)); |
92 sad_tab_bitmap_ = rb.GetBitmapNamed(IDR_SAD_TAB); | 92 sad_tab_bitmap_ = rb.GetBitmapNamed(IDR_SAD_TAB); |
93 | 93 |
94 title_ = l10n_util::GetString(IDS_SAD_TAB_TITLE); | 94 title_ = l10n_util::GetString(IDS_SAD_TAB_TITLE); |
95 title_width_ = title_font_->GetStringWidth(title_); | 95 title_width_ = title_font_->GetStringWidth(title_); |
96 message_ = l10n_util::GetString(IDS_SAD_TAB_MESSAGE); | 96 message_ = l10n_util::GetString(IDS_SAD_TAB_MESSAGE); |
97 | 97 |
98 initialized = true; | 98 initialized = true; |
99 } | 99 } |
100 } | 100 } |
OLD | NEW |