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

Side by Side Diff: chrome/browser/ui/cocoa/passwords/passwords_bubble_utils.mm

Issue 1992633003: Add "Sign In" button to the account chooser on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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/passwords/passwords_bubble_utils.h" 5 #import "chrome/browser/ui/cocoa/passwords/passwords_bubble_utils.h"
6 6
7 #include "base/mac/scoped_nsobject.h" 7 #include "base/mac/scoped_nsobject.h"
8 #include "base/strings/sys_string_conversions.h" 8 #include "base/strings/sys_string_conversions.h"
9 #include "chrome/browser/ui/chrome_style.h" 9 #include "chrome/browser/ui/chrome_style.h"
10 #include "skia/ext/skia_utils_mac.h" 10 #include "skia/ext/skia_utils_mac.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 base::scoped_nsobject<NSButton> button( 100 base::scoped_nsobject<NSButton> button(
101 [[NSButton alloc] initWithFrame:NSZeroRect]); 101 [[NSButton alloc] initWithFrame:NSZeroRect]);
102 [button setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; 102 [button setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
103 [button setTitle:title]; 103 [button setTitle:title];
104 [button setBezelStyle:NSRoundedBezelStyle]; 104 [button setBezelStyle:NSRoundedBezelStyle];
105 [[button cell] setControlSize:NSSmallControlSize]; 105 [[button cell] setControlSize:NSSmallControlSize];
106 [button sizeToFit]; 106 [button sizeToFit];
107 return button.autorelease(); 107 return button.autorelease();
108 } 108 }
109 109
110 NSButton* BiggerDialogButton(NSString* title) {
111 base::scoped_nsobject<NSButton> button(
112 [[NSButton alloc] initWithFrame:NSZeroRect]);
113 CGFloat fontSize = [NSFont systemFontSizeForControlSize:NSRegularControlSize];
114 [button setFont:[NSFont systemFontOfSize:fontSize]];
115 [button setTitle:title];
116 [button setBezelStyle:NSRoundedBezelStyle];
117 [[button cell] setControlSize:NSRegularControlSize];
118 [button sizeToFit];
119 return button.autorelease();
120 }
121
110 HyperlinkTextView* TitleBubbleLabelWithLink(const base::string16& text, 122 HyperlinkTextView* TitleBubbleLabelWithLink(const base::string16& text,
111 gfx::Range range, 123 gfx::Range range,
112 id<NSTextViewDelegate> delegate) { 124 id<NSTextViewDelegate> delegate) {
113 return LabelWithLink( 125 return LabelWithLink(
114 text, SK_ColorBLACK, 126 text, SK_ColorBLACK,
115 [NSFont systemFontOfSize:[NSFont systemFontSize]], 127 [NSFont systemFontOfSize:[NSFont systemFontSize]],
116 range, delegate); 128 range, delegate);
117 } 129 }
118 130
119 HyperlinkTextView* TitleDialogLabelWithLink(const base::string16& text, 131 HyperlinkTextView* TitleDialogLabelWithLink(const base::string16& text,
(...skipping 13 matching lines...) Expand all
133 gfx::Range range, 145 gfx::Range range,
134 id<NSTextViewDelegate> delegate) { 146 id<NSTextViewDelegate> delegate) {
135 return LabelWithLink( 147 return LabelWithLink(
136 text, color, 148 text, color,
137 ResourceBundle::GetSharedInstance() 149 ResourceBundle::GetSharedInstance()
138 .GetFontList(ResourceBundle::SmallFont) 150 .GetFontList(ResourceBundle::SmallFont)
139 .GetPrimaryFont() 151 .GetPrimaryFont()
140 .GetNativeFont(), 152 .GetNativeFont(),
141 range, delegate); 153 range, delegate);
142 } 154 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/passwords/passwords_bubble_utils.h ('k') | chrome/browser/ui/passwords/password_dialog_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698