| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/chooser_content_view_cocoa.h" | 5 #import "chrome/browser/ui/cocoa/chooser_content_view_cocoa.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 base::scoped_nsobject<NSButton> button( | 257 base::scoped_nsobject<NSButton> button( |
| 258 [[ConstrainedWindowButton alloc] initWithFrame:NSZeroRect]); | 258 [[ConstrainedWindowButton alloc] initWithFrame:NSZeroRect]); |
| 259 [button setButtonType:NSMomentaryPushInButton]; | 259 [button setButtonType:NSMomentaryPushInButton]; |
| 260 [button setTitle:title]; | 260 [button setTitle:title]; |
| 261 [button sizeToFit]; | 261 [button sizeToFit]; |
| 262 return button; | 262 return button; |
| 263 } | 263 } |
| 264 | 264 |
| 265 - (base::scoped_nsobject<NSButton>)createConnectButton { | 265 - (base::scoped_nsobject<NSButton>)createConnectButton { |
| 266 NSString* connectTitle = | 266 NSString* connectTitle = |
| 267 l10n_util::GetNSString(IDS_DEVICE_CHOOSER_CONNECT_BUTTON_TEXT); | 267 base::SysUTF16ToNSString(chooserController_->GetOkButtonLabel()); |
| 268 return [self createButtonWithTitle:connectTitle]; | 268 return [self createButtonWithTitle:connectTitle]; |
| 269 } | 269 } |
| 270 | 270 |
| 271 - (base::scoped_nsobject<NSButton>)createCancelButton { | 271 - (base::scoped_nsobject<NSButton>)createCancelButton { |
| 272 NSString* cancelTitle = | 272 NSString* cancelTitle = |
| 273 l10n_util::GetNSString(IDS_DEVICE_CHOOSER_CANCEL_BUTTON_TEXT); | 273 l10n_util::GetNSString(IDS_DEVICE_CHOOSER_CANCEL_BUTTON_TEXT); |
| 274 return [self createButtonWithTitle:cancelTitle]; | 274 return [self createButtonWithTitle:cancelTitle]; |
| 275 } | 275 } |
| 276 | 276 |
| 277 - (base::scoped_nsobject<NSBox>)createSeparator { | 277 - (base::scoped_nsobject<NSBox>)createSeparator { |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 | 361 |
| 362 - (void)close { | 362 - (void)close { |
| 363 chooserController_->Close(); | 363 chooserController_->Close(); |
| 364 } | 364 } |
| 365 | 365 |
| 366 - (void)onHelpPressed:(id)sender { | 366 - (void)onHelpPressed:(id)sender { |
| 367 chooserController_->OpenHelpCenterUrl(); | 367 chooserController_->OpenHelpCenterUrl(); |
| 368 } | 368 } |
| 369 | 369 |
| 370 @end | 370 @end |
| OLD | NEW |