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

Side by Side Diff: chrome/browser/ui/views/first_run_bubble.cc

Issue 1819753003: Allow various font weights in gfx. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac fixes Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/first_run_bubble.h" 5 #include "chrome/browser/ui/views/first_run_bubble.h"
6 6
7 #include "chrome/browser/first_run/first_run.h" 7 #include "chrome/browser/first_run/first_run.h"
8 #include "chrome/browser/search_engines/template_url_service_factory.h" 8 #include "chrome/browser/search_engines/template_url_service_factory.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/chrome_pages.h" 10 #include "chrome/browser/ui/chrome_pages.h"
(...skipping 30 matching lines...) Expand all
41 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 41 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
42 const gfx::FontList& original_font_list = 42 const gfx::FontList& original_font_list =
43 rb.GetFontList(ui::ResourceBundle::MediumFont); 43 rb.GetFontList(ui::ResourceBundle::MediumFont);
44 44
45 const base::string16 search_engine_name = browser_ ? 45 const base::string16 search_engine_name = browser_ ?
46 GetDefaultSearchEngineName( 46 GetDefaultSearchEngineName(
47 TemplateURLServiceFactory::GetForProfile(browser_->profile())) : 47 TemplateURLServiceFactory::GetForProfile(browser_->profile())) :
48 base::string16(); 48 base::string16();
49 views::Label* title = new views::Label( 49 views::Label* title = new views::Label(
50 l10n_util::GetStringFUTF16(IDS_FR_BUBBLE_TITLE, search_engine_name), 50 l10n_util::GetStringFUTF16(IDS_FR_BUBBLE_TITLE, search_engine_name),
51 original_font_list.Derive(2, gfx::Font::BOLD)); 51 original_font_list.Derive(2, gfx::Font::NORMAL, gfx::Font::Weight::BOLD));
52 52
53 views::Link* change = 53 views::Link* change =
54 new views::Link(l10n_util::GetStringUTF16(IDS_FR_BUBBLE_CHANGE)); 54 new views::Link(l10n_util::GetStringUTF16(IDS_FR_BUBBLE_CHANGE));
55 change->SetFontList(original_font_list); 55 change->SetFontList(original_font_list);
56 change->set_listener(this); 56 change->set_listener(this);
57 57
58 views::Label* subtext = 58 views::Label* subtext =
59 new views::Label(l10n_util::GetStringUTF16(IDS_FR_BUBBLE_SUBTEXT), 59 new views::Label(l10n_util::GetStringUTF16(IDS_FR_BUBBLE_SUBTEXT),
60 original_font_list); 60 original_font_list);
61 61
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 void FirstRunBubble::FirstRunBubbleCloser::CloseBubble() { 130 void FirstRunBubble::FirstRunBubbleCloser::CloseBubble() {
131 if (!event_monitor_) 131 if (!event_monitor_)
132 return; 132 return;
133 133
134 event_monitor_.reset(); 134 event_monitor_.reset();
135 DCHECK(bubble_); 135 DCHECK(bubble_);
136 bubble_->GetWidget()->Close(); 136 bubble_->GetWidget()->Close();
137 bubble_ = nullptr; 137 bubble_ = nullptr;
138 } 138 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698