OLD | NEW |
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 #import "chrome/browser/ui/cocoa/one_click_signin_view_controller.h" | 5 #import "chrome/browser/ui/cocoa/one_click_signin_view_controller.h" |
6 | 6 |
7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/mac/bundle_locations.h" | 9 #include "base/mac/bundle_locations.h" |
10 #import "chrome/browser/ui/chrome_style.h" | 10 #import "chrome/browser/ui/chrome_style.h" |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 messageText = learnMoreText; | 249 messageText = learnMoreText; |
250 } | 250 } |
251 | 251 |
252 NSColor* linkColor = | 252 NSColor* linkColor = |
253 gfx::SkColorToCalibratedNSColor(chrome_style::GetLinkColor()); | 253 gfx::SkColorToCalibratedNSColor(chrome_style::GetLinkColor()); |
254 [informativeTextView_ setMessage:messageText | 254 [informativeTextView_ setMessage:messageText |
255 withFont:font | 255 withFont:font |
256 messageColor:[NSColor blackColor]]; | 256 messageColor:[NSColor blackColor]]; |
257 [informativeTextView_ addLinkRange:NSMakeRange(learnMoreOffset, | 257 [informativeTextView_ addLinkRange:NSMakeRange(learnMoreOffset, |
258 [learnMoreText length]) | 258 [learnMoreText length]) |
259 withName:@"" | 259 withURL:@(chrome::kChromeSyncLearnMoreURL) |
260 linkColor:linkColor]; | 260 linkColor:linkColor]; |
261 | 261 |
262 // Make the "Advanced" link font as large as the "Learn More" link. | 262 // Make the "Advanced" link font as large as the "Learn More" link. |
263 [[advancedLink_ cell] setFont:font]; | 263 [[advancedLink_ cell] setFont:font]; |
264 [advancedLink_ sizeToFit]; | 264 [advancedLink_ sizeToFit]; |
265 | 265 |
266 // Size to fit. | 266 // Size to fit. |
267 [[informativePlaceholderTextField_ cell] setAttributedStringValue: | 267 [[informativePlaceholderTextField_ cell] setAttributedStringValue: |
268 [informativeTextView_ attributedString]]; | 268 [informativeTextView_ attributedString]]; |
269 [GTMUILocalizerAndLayoutTweaker | 269 [GTMUILocalizerAndLayoutTweaker |
(...skipping 26 matching lines...) Expand all Loading... |
296 ui::PAGE_TRANSITION_LINK, false); | 296 ui::PAGE_TRANSITION_LINK, false); |
297 webContents_->OpenURL(params); | 297 webContents_->OpenURL(params); |
298 return YES; | 298 return YES; |
299 } | 299 } |
300 | 300 |
301 - (void)close { | 301 - (void)close { |
302 base::ResetAndReturn(&closeCallback_).Run(); | 302 base::ResetAndReturn(&closeCallback_).Run(); |
303 } | 303 } |
304 | 304 |
305 @end | 305 @end |
OLD | NEW |