| OLD | NEW |
| 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 base::ASCIIToUTF16(gaia::ExtractDomainName(username_)); | 150 base::ASCIIToUTF16(gaia::ExtractDomainName(username_)); |
| 151 const base::string16 username = base::ASCIIToUTF16(username_); | 151 const base::string16 username = base::ASCIIToUTF16(username_); |
| 152 const base::string16 prompt_text = | 152 const base::string16 prompt_text = |
| 153 l10n_util::GetStringFUTF16( | 153 l10n_util::GetStringFUTF16( |
| 154 IDS_ENTERPRISE_SIGNIN_ALERT_NEW_STYLE, | 154 IDS_ENTERPRISE_SIGNIN_ALERT_NEW_STYLE, |
| 155 domain, &offset); | 155 domain, &offset); |
| 156 views::StyledLabel* prompt_label = new views::StyledLabel(prompt_text, this); | 156 views::StyledLabel* prompt_label = new views::StyledLabel(prompt_text, this); |
| 157 prompt_label->SetDisplayedOnBackgroundColor(kPromptBarBackgroundColor); | 157 prompt_label->SetDisplayedOnBackgroundColor(kPromptBarBackgroundColor); |
| 158 | 158 |
| 159 views::StyledLabel::RangeStyleInfo bold_style; | 159 views::StyledLabel::RangeStyleInfo bold_style; |
| 160 bold_style.font_style = gfx::Font::BOLD; | 160 bold_style.weight = gfx::Font::Weight::BOLD; |
| 161 prompt_label->AddStyleRange( | 161 prompt_label->AddStyleRange( |
| 162 gfx::Range(offset, offset + domain.size()), bold_style); | 162 gfx::Range(offset, offset + domain.size()), bold_style); |
| 163 | 163 |
| 164 // Create the prompt bar. | 164 // Create the prompt bar. |
| 165 views::View* prompt_bar = new views::View; | 165 views::View* prompt_bar = new views::View; |
| 166 prompt_bar->SetBorder(views::Border::CreateSolidSidedBorder( | 166 prompt_bar->SetBorder(views::Border::CreateSolidSidedBorder( |
| 167 1, 0, 1, 0, | 167 1, 0, 1, 0, |
| 168 ui::GetSigninConfirmationPromptBarColor( | 168 ui::GetSigninConfirmationPromptBarColor( |
| 169 GetNativeTheme(), ui::kSigninConfirmationPromptBarBorderAlpha))); | 169 GetNativeTheme(), ui::kSigninConfirmationPromptBarBorderAlpha))); |
| 170 prompt_bar->set_background(views::Background::CreateSolidBackground( | 170 prompt_bar->set_background(views::Background::CreateSolidBackground( |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 void ProfileSigninConfirmationDialogViews::ButtonPressed( | 242 void ProfileSigninConfirmationDialogViews::ButtonPressed( |
| 243 views::Button* sender, | 243 views::Button* sender, |
| 244 const ui::Event& event) { | 244 const ui::Event& event) { |
| 245 DCHECK(prompt_for_new_profile_); | 245 DCHECK(prompt_for_new_profile_); |
| 246 if (delegate_) { | 246 if (delegate_) { |
| 247 delegate_->OnContinueSignin(); | 247 delegate_->OnContinueSignin(); |
| 248 delegate_ = NULL; | 248 delegate_ = NULL; |
| 249 } | 249 } |
| 250 GetWidget()->Close(); | 250 GetWidget()->Close(); |
| 251 } | 251 } |
| OLD | NEW |