| 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 #import "chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller.h" | 5 #import "chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 [promptBox_ setFillColor:gfx::SkColorToCalibratedNSColor( | 245 [promptBox_ setFillColor:gfx::SkColorToCalibratedNSColor( |
| 246 ui::GetSigninConfirmationPromptBarColor( | 246 ui::GetSigninConfirmationPromptBarColor( |
| 247 ui::kSigninConfirmationPromptBarBackgroundAlpha))]; | 247 ui::kSigninConfirmationPromptBarBackgroundAlpha))]; |
| 248 [promptBox_ setBoxType:NSBoxCustom]; | 248 [promptBox_ setBoxType:NSBoxCustom]; |
| 249 [promptBox_ setTitlePosition:NSNoTitle]; | 249 [promptBox_ setTitlePosition:NSNoTitle]; |
| 250 [[self view] addSubview:promptBox_]; | 250 [[self view] addSubview:promptBox_]; |
| 251 | 251 |
| 252 // Prompt text. | 252 // Prompt text. |
| 253 size_t offset; | 253 size_t offset; |
| 254 const base::string16 domain = | 254 const base::string16 domain = |
| 255 ASCIIToUTF16(gaia::ExtractDomainName(username_)); | 255 base::ASCIIToUTF16(gaia::ExtractDomainName(username_)); |
| 256 const base::string16 username = ASCIIToUTF16(username_); | 256 const base::string16 username = base::ASCIIToUTF16(username_); |
| 257 const base::string16 prompt_text = | 257 const base::string16 prompt_text = |
| 258 l10n_util::GetStringFUTF16( | 258 l10n_util::GetStringFUTF16( |
| 259 IDS_ENTERPRISE_SIGNIN_ALERT_NEW_STYLE, | 259 IDS_ENTERPRISE_SIGNIN_ALERT_NEW_STYLE, |
| 260 domain, &offset); | 260 domain, &offset); |
| 261 promptField_.reset( | 261 promptField_.reset( |
| 262 [AddTextField(promptBox_, prompt_text, chrome_style::kTextFontStyle) | 262 [AddTextField(promptBox_, prompt_text, chrome_style::kTextFontStyle) |
| 263 retain]); | 263 retain]); |
| 264 MakeTextBold(promptField_, offset, domain.size()); | 264 MakeTextBold(promptField_, offset, domain.size()); |
| 265 [promptField_ setFrame:ComputeFrame( | 265 [promptField_ setFrame:ComputeFrame( |
| 266 [promptField_ attributedStringValue], width, 0.0)]; | 266 [promptField_ attributedStringValue], width, 0.0)]; |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 | 437 |
| 438 - (NSButton*)createProfileButton { | 438 - (NSButton*)createProfileButton { |
| 439 return createProfileButton_.get(); | 439 return createProfileButton_.get(); |
| 440 } | 440 } |
| 441 | 441 |
| 442 - (NSTextView*)explanationField { | 442 - (NSTextView*)explanationField { |
| 443 return explanationField_.get(); | 443 return explanationField_.get(); |
| 444 } | 444 } |
| 445 | 445 |
| 446 @end | 446 @end |
| OLD | NEW |