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

Side by Side Diff: chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/sync/profile_signin_confirmation_dialog_views. h" 5 #include "chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views. h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 base::ASCIIToUTF16(gaia::ExtractDomainName(username_)); 153 base::ASCIIToUTF16(gaia::ExtractDomainName(username_));
154 const base::string16 username = base::ASCIIToUTF16(username_); 154 const base::string16 username = base::ASCIIToUTF16(username_);
155 const base::string16 prompt_text = 155 const base::string16 prompt_text =
156 l10n_util::GetStringFUTF16( 156 l10n_util::GetStringFUTF16(
157 IDS_ENTERPRISE_SIGNIN_ALERT_NEW_STYLE, 157 IDS_ENTERPRISE_SIGNIN_ALERT_NEW_STYLE,
158 domain, &offset); 158 domain, &offset);
159 views::StyledLabel* prompt_label = new views::StyledLabel(prompt_text, this); 159 views::StyledLabel* prompt_label = new views::StyledLabel(prompt_text, this);
160 prompt_label->SetDisplayedOnBackgroundColor(kPromptBarBackgroundColor); 160 prompt_label->SetDisplayedOnBackgroundColor(kPromptBarBackgroundColor);
161 161
162 views::StyledLabel::RangeStyleInfo bold_style; 162 views::StyledLabel::RangeStyleInfo bold_style;
163 bold_style.font_style = gfx::Font::BOLD; 163 bold_style.weight = gfx::Font::Weight::BOLD;
164 prompt_label->AddStyleRange( 164 prompt_label->AddStyleRange(
165 gfx::Range(offset, offset + domain.size()), bold_style); 165 gfx::Range(offset, offset + domain.size()), bold_style);
166 166
167 // Create the prompt bar. 167 // Create the prompt bar.
168 views::View* prompt_bar = new views::View; 168 views::View* prompt_bar = new views::View;
169 prompt_bar->SetBorder(views::Border::CreateSolidSidedBorder( 169 prompt_bar->SetBorder(views::Border::CreateSolidSidedBorder(
170 1, 0, 1, 0, 170 1, 0, 1, 0,
171 ui::GetSigninConfirmationPromptBarColor( 171 ui::GetSigninConfirmationPromptBarColor(
172 GetNativeTheme(), ui::kSigninConfirmationPromptBarBorderAlpha))); 172 GetNativeTheme(), ui::kSigninConfirmationPromptBarBorderAlpha)));
173 prompt_bar->set_background(views::Background::CreateSolidBackground( 173 prompt_bar->set_background(views::Background::CreateSolidBackground(
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 views::Button* sender, 246 views::Button* sender,
247 const ui::Event& event) { 247 const ui::Event& event) {
248 DCHECK(prompt_for_new_profile_); 248 DCHECK(prompt_for_new_profile_);
249 DCHECK_EQ(continue_signin_button_, sender); 249 DCHECK_EQ(continue_signin_button_, sender);
250 if (delegate_) { 250 if (delegate_) {
251 delegate_->OnContinueSignin(); 251 delegate_->OnContinueSignin();
252 delegate_ = NULL; 252 delegate_ = NULL;
253 } 253 }
254 GetWidget()->Close(); 254 GetWidget()->Close();
255 } 255 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698