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

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: 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 base::ASCIIToUTF16(gaia::ExtractDomainName(username_)); 154 base::ASCIIToUTF16(gaia::ExtractDomainName(username_));
155 const base::string16 username = base::ASCIIToUTF16(username_); 155 const base::string16 username = base::ASCIIToUTF16(username_);
156 const base::string16 prompt_text = 156 const base::string16 prompt_text =
157 l10n_util::GetStringFUTF16( 157 l10n_util::GetStringFUTF16(
158 IDS_ENTERPRISE_SIGNIN_ALERT_NEW_STYLE, 158 IDS_ENTERPRISE_SIGNIN_ALERT_NEW_STYLE,
159 domain, &offset); 159 domain, &offset);
160 views::StyledLabel* prompt_label = new views::StyledLabel(prompt_text, this); 160 views::StyledLabel* prompt_label = new views::StyledLabel(prompt_text, this);
161 prompt_label->SetDisplayedOnBackgroundColor(kPromptBarBackgroundColor); 161 prompt_label->SetDisplayedOnBackgroundColor(kPromptBarBackgroundColor);
162 162
163 views::StyledLabel::RangeStyleInfo bold_style; 163 views::StyledLabel::RangeStyleInfo bold_style;
164 bold_style.font_style = gfx::Font::BOLD; 164 bold_style.weight = gfx::Font::WEIGHT_BOLD;
165 prompt_label->AddStyleRange( 165 prompt_label->AddStyleRange(
166 gfx::Range(offset, offset + domain.size()), bold_style); 166 gfx::Range(offset, offset + domain.size()), bold_style);
167 167
168 // Create the prompt bar. 168 // Create the prompt bar.
169 views::View* prompt_bar = new views::View; 169 views::View* prompt_bar = new views::View;
170 prompt_bar->SetBorder(views::Border::CreateSolidSidedBorder( 170 prompt_bar->SetBorder(views::Border::CreateSolidSidedBorder(
171 1, 0, 1, 0, 171 1, 0, 1, 0,
172 ui::GetSigninConfirmationPromptBarColor( 172 ui::GetSigninConfirmationPromptBarColor(
173 GetNativeTheme(), ui::kSigninConfirmationPromptBarBorderAlpha))); 173 GetNativeTheme(), ui::kSigninConfirmationPromptBarBorderAlpha)));
174 prompt_bar->set_background(views::Background::CreateSolidBackground( 174 prompt_bar->set_background(views::Background::CreateSolidBackground(
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 views::Button* sender, 247 views::Button* sender,
248 const ui::Event& event) { 248 const ui::Event& event) {
249 DCHECK(prompt_for_new_profile_); 249 DCHECK(prompt_for_new_profile_);
250 DCHECK_EQ(continue_signin_button_, sender); 250 DCHECK_EQ(continue_signin_button_, sender);
251 if (delegate_) { 251 if (delegate_) {
252 delegate_->OnContinueSignin(); 252 delegate_->OnContinueSignin();
253 delegate_ = NULL; 253 delegate_ = NULL;
254 } 254 }
255 GetWidget()->Close(); 255 GetWidget()->Close();
256 } 256 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698