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

Side by Side Diff: chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.mm

Issue 1950333002: Remove url scheme from the chooser bubble title on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove url scheme from the chooser bubble title on Mac Created 4 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/website_settings/chooser_bubble_ui_cocoa.h" 5 #import "chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cmath> 10 #include <cmath>
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 return browser_->window()->GetNativeWindow(); 447 return browser_->window()->GetNativeWindow();
448 } 448 }
449 449
450 - (base::scoped_nsobject<NSTextField>)bubbleTitle { 450 - (base::scoped_nsobject<NSTextField>)bubbleTitle {
451 base::scoped_nsobject<NSTextField> titleView( 451 base::scoped_nsobject<NSTextField> titleView(
452 [[NSTextField alloc] initWithFrame:NSZeroRect]); 452 [[NSTextField alloc] initWithFrame:NSZeroRect]);
453 [titleView setDrawsBackground:NO]; 453 [titleView setDrawsBackground:NO];
454 [titleView setBezeled:NO]; 454 [titleView setBezeled:NO];
455 [titleView setEditable:NO]; 455 [titleView setEditable:NO];
456 [titleView setSelectable:NO]; 456 [titleView setSelectable:NO];
457 [titleView setStringValue:l10n_util::GetNSStringF( 457 [titleView
458 IDS_CHOOSER_BUBBLE_PROMPT, 458 setStringValue:l10n_util::GetNSStringF(
459 base::ASCIIToUTF16( 459 IDS_CHOOSER_BUBBLE_PROMPT,
460 chooserBubbleController_->GetOrigin() 460 base::ASCIIToUTF16(
461 .Serialize()))]; 461 chooserBubbleController_->GetOrigin().host()))];
462 [titleView setFont:[NSFont systemFontOfSize:[NSFont systemFontSize]]]; 462 [titleView setFont:[NSFont systemFontOfSize:[NSFont systemFontSize]]];
463 // The height is arbitrary as it will be adjusted later. 463 // The height is arbitrary as it will be adjusted later.
464 [titleView setFrameSize:NSMakeSize(kChooserBubbleWidth - 2 * kMarginX, 0.0f)]; 464 [titleView setFrameSize:NSMakeSize(kChooserBubbleWidth - 2 * kMarginX, 0.0f)];
465 [GTMUILocalizerAndLayoutTweaker sizeToFitFixedWidthTextField:titleView]; 465 [GTMUILocalizerAndLayoutTweaker sizeToFitFixedWidthTextField:titleView];
466 return titleView; 466 return titleView;
467 } 467 }
468 468
469 - (base::scoped_nsobject<NSButton>)buttonWithTitle:(NSString*)title 469 - (base::scoped_nsobject<NSButton>)buttonWithTitle:(NSString*)title
470 action:(SEL)action { 470 action:(SEL)action {
471 base::scoped_nsobject<NSButton> button( 471 base::scoped_nsobject<NSButton> button(
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 [chooser_bubble_ui_controller_ onOptionAdded:static_cast<NSInteger>(index)]; 600 [chooser_bubble_ui_controller_ onOptionAdded:static_cast<NSInteger>(index)];
601 } 601 }
602 602
603 void ChooserBubbleUiCocoa::OnOptionRemoved(size_t index) { 603 void ChooserBubbleUiCocoa::OnOptionRemoved(size_t index) {
604 [chooser_bubble_ui_controller_ onOptionRemoved:static_cast<NSInteger>(index)]; 604 [chooser_bubble_ui_controller_ onOptionRemoved:static_cast<NSInteger>(index)];
605 } 605 }
606 606
607 void ChooserBubbleUiCocoa::OnBubbleClosing() { 607 void ChooserBubbleUiCocoa::OnBubbleClosing() {
608 chooser_bubble_ui_controller_ = nil; 608 chooser_bubble_ui_controller_ = nil;
609 } 609 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698