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 #include "chrome/browser/ui/views/sad_tab_view.h" | 5 #include "chrome/browser/ui/views/sad_tab_view.h" |
6 | 6 |
7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/google/google_util.h" | 9 #include "chrome/browser/google/google_util.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
11 #include "chrome/browser/ui/webui/bug_report_ui.h" | 11 #include "chrome/browser/ui/webui/bug_report_ui.h" |
12 #include "chrome/browser/userfeedback/proto/extension.pb.h" | 12 #include "chrome/browser/userfeedback/proto/extension.pb.h" |
13 #include "chrome/common/url_constants.h" | 13 #include "chrome/common/url_constants.h" |
14 #include "content/browser/tab_contents/tab_contents.h" | 14 #include "content/browser/tab_contents/tab_contents.h" |
15 #include "grit/generated_resources.h" | 15 #include "grit/generated_resources.h" |
16 #include "grit/theme_resources.h" | 16 #include "grit/theme_resources.h" |
17 #include "ui/base/l10n/l10n_util.h" | 17 #include "ui/base/l10n/l10n_util.h" |
18 #include "ui/base/resource/resource_bundle.h" | 18 #include "ui/base/resource/resource_bundle.h" |
19 #include "ui/gfx/font.h" | 19 #include "ui/gfx/font.h" |
| 20 #include "ui/views/layout/grid_layout.h" |
20 #include "views/controls/image_view.h" | 21 #include "views/controls/image_view.h" |
21 #include "views/controls/label.h" | 22 #include "views/controls/label.h" |
22 #include "views/controls/link.h" | 23 #include "views/controls/link.h" |
23 #include "views/layout/grid_layout.h" | |
24 | 24 |
25 static const int kPadding = 20; | 25 static const int kPadding = 20; |
26 static const float kMessageSize = 0.65f; | 26 static const float kMessageSize = 0.65f; |
27 static const SkColor kTextColor = SK_ColorWHITE; | 27 static const SkColor kTextColor = SK_ColorWHITE; |
28 static const SkColor kCrashColor = SkColorSetRGB(35, 48, 64); | 28 static const SkColor kCrashColor = SkColorSetRGB(35, 48, 64); |
29 static const SkColor kKillColor = SkColorSetRGB(57, 48, 88); | 29 static const SkColor kKillColor = SkColorSetRGB(57, 48, 88); |
30 | 30 |
31 // Font size correction. | 31 // Font size correction. |
32 #if defined(CROS_FONTS_USING_BCI) | 32 #if defined(CROS_FONTS_USING_BCI) |
33 static const int kTitleFontSizeDelta = 1; | 33 static const int kTitleFontSizeDelta = 1; |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 } | 170 } |
171 | 171 |
172 views::Link* SadTabView::CreateLink(const string16& text) { | 172 views::Link* SadTabView::CreateLink(const string16& text) { |
173 views::Link* link = new views::Link(text); | 173 views::Link* link = new views::Link(text); |
174 link->SetFont(base_font_.DeriveFont(kMessageFontSizeDelta)); | 174 link->SetFont(base_font_.DeriveFont(kMessageFontSizeDelta)); |
175 link->SetBackgroundColor(background()->get_color()); | 175 link->SetBackgroundColor(background()->get_color()); |
176 link->SetEnabledColor(kTextColor); | 176 link->SetEnabledColor(kTextColor); |
177 link->set_listener(this); | 177 link->set_listener(this); |
178 return link; | 178 return link; |
179 } | 179 } |
OLD | NEW |