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

Side by Side Diff: chrome/browser/ui/cocoa/chooser_content_view_cocoa.mm

Issue 2127203002: Change WebBluetooth chooser OK button's label to be "Pair" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@support_chrome_extension_chooser_title
Patch Set: rebase Created 4 years, 5 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 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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/bluetooth/bluetooth_chooser_controller.cc ('k') | chrome/browser/ui/views/chooser_content_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698