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

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

Issue 2768923003: Fix gn_all build on gcc 4.8 (Closed)
Patch Set: 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 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 49
50 // TODO(tapted): Update these when there are mocks. http://crbug.com/699338. 50 // TODO(tapted): Update these when there are mocks. http://crbug.com/699338.
51 views::Label* title = new views::Label( 51 views::Label* title = new views::Label(
52 l10n_util::GetStringFUTF16(IDS_FR_BUBBLE_TITLE, search_engine_name), 52 l10n_util::GetStringFUTF16(IDS_FR_BUBBLE_TITLE, search_engine_name),
53 {original_font_list.Derive(2, gfx::Font::NORMAL, 53 views::Label::CustomFont{original_font_list.Derive(
54 gfx::Font::Weight::BOLD)}); 54 2, gfx::Font::NORMAL, gfx::Font::Weight::BOLD)});
55 55
56 views::Link* change = 56 views::Link* change =
57 new views::Link(l10n_util::GetStringUTF16(IDS_FR_BUBBLE_CHANGE)); 57 new views::Link(l10n_util::GetStringUTF16(IDS_FR_BUBBLE_CHANGE));
58 change->SetFontList(original_font_list); 58 change->SetFontList(original_font_list);
59 change->set_listener(this); 59 change->set_listener(this);
60 60
61 views::Label* subtext = new views::Label( 61 views::Label* subtext = new views::Label(
62 l10n_util::GetStringUTF16(IDS_FR_BUBBLE_SUBTEXT), {original_font_list}); 62 l10n_util::GetStringUTF16(IDS_FR_BUBBLE_SUBTEXT), {original_font_list});
63 63
64 views::GridLayout* layout = views::GridLayout::CreatePanel(this); 64 views::GridLayout* layout = views::GridLayout::CreatePanel(this);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 136
137 void FirstRunBubble::FirstRunBubbleCloser::CloseBubble() { 137 void FirstRunBubble::FirstRunBubbleCloser::CloseBubble() {
138 if (!event_monitor_) 138 if (!event_monitor_)
139 return; 139 return;
140 140
141 event_monitor_.reset(); 141 event_monitor_.reset();
142 DCHECK(bubble_); 142 DCHECK(bubble_);
143 bubble_->GetWidget()->Close(); 143 bubble_->GetWidget()->Close();
144 bubble_ = nullptr; 144 bubble_ = nullptr;
145 } 145 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698