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

Unified Diff: chrome/browser/ui/views/content_setting_bubble_contents.cc

Issue 2734113006: "Bootstrap" a toolkit-views Typography spec. (Closed)
Patch Set: ExtendableEnum Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/content_setting_bubble_contents.cc
diff --git a/chrome/browser/ui/views/content_setting_bubble_contents.cc b/chrome/browser/ui/views/content_setting_bubble_contents.cc
index b8c68f2d6623ccfa3caf7554b80fcfb91f0026a0..77f5ddd26839beced1594dcea59da00ab2df9888 100644
--- a/chrome/browser/ui/views/content_setting_bubble_contents.cc
+++ b/chrome/browser/ui/views/content_setting_bubble_contents.cc
@@ -230,14 +230,13 @@ void ContentSettingBubbleContents::Init() {
bool bubble_content_empty = true;
if (!bubble_content.title.empty()) {
- views::Label* title_label = new views::Label(bubble_content.title);
+ const views::TextContext kTitleContext =
+ layout_delegate->IsHarmonyMode() ? views::TextContext::DIALOG_TITLE
+ : ChromeTextContext::DIALOG_TEXT_SMALL;
+ views::Label* title_label =
+ new views::Label(bubble_content.title, kTitleContext);
title_label->SetMultiLine(true);
title_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- if (layout_delegate->IsHarmonyMode()) {
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- title_label->SetFontList(
- rb.GetFontListWithDelta(ui::kTitleFontSizeDelta));
- }
layout->StartRow(0, kSingleColumnSetId);
layout->AddView(title_label);
bubble_content_empty = false;
@@ -385,9 +384,6 @@ void ContentSettingBubbleContents::Init() {
}
}
- const gfx::FontList& domain_font =
- ui::ResourceBundle::GetSharedInstance().GetFontList(
- ui::ResourceBundle::BoldFont);
for (std::vector<ContentSettingBubbleModel::DomainList>::const_iterator i(
bubble_content.domain_lists.begin());
i != bubble_content.domain_lists.end(); ++i) {
@@ -399,7 +395,10 @@ void ContentSettingBubbleContents::Init() {
for (std::set<std::string>::const_iterator j = i->hosts.begin();
j != i->hosts.end(); ++j) {
layout->StartRow(0, indented_kSingleColumnSetId);
- layout->AddView(new views::Label(base::UTF8ToUTF16(*j), domain_font));
+ // TODO(tapted): Verify this when we have a mock. http://crbug.com/700196.
+ layout->AddView(new views::Label(base::UTF8ToUTF16(*j),
+ views::TextContext::DIALOG_MESSAGE,
+ views::TextStyle::WEB_DOMAIN));
}
bubble_content_empty = false;
}

Powered by Google App Engine
This is Rietveld 408576698