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

Side by Side Diff: chrome/browser/ui/cocoa/constrained_window/constrained_window_button.mm

Issue 1837803002: Revert of Add keyboard accessibility to ConstrainedWindowButton (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/constrained_window/constrained_window_button.h" 5 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_button.h"
6 6
7 #include "base/mac/scoped_nsobject.h" 7 #include "base/mac/scoped_nsobject.h"
8 #import "chrome/browser/ui/cocoa/key_equivalent_constants.h" 8 #import "chrome/browser/ui/cocoa/key_equivalent_constants.h"
9 #include "skia/ext/skia_utils_mac.h" 9 #include "skia/ext/skia_utils_mac.h"
10 #import "third_party/molokocacao/NSBezierPath+MCAdditions.h" 10 #import "third_party/molokocacao/NSBezierPath+MCAdditions.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 + (void)DrawBorderForPath:(NSBezierPath*)path 238 + (void)DrawBorderForPath:(NSBezierPath*)path
239 withCell:(id<ConstrainedWindowButtonDrawableCell>)cell 239 withCell:(id<ConstrainedWindowButtonDrawableCell>)cell
240 inView:(NSView*)view { 240 inView:(NSView*)view {
241 if ([[[view window] firstResponder] isEqual:view]) 241 if ([[[view window] firstResponder] isEqual:view])
242 [[NSColor colorWithCalibratedRed:0.30 green:0.57 blue:1.0 alpha:1.0] set]; 242 [[NSColor colorWithCalibratedRed:0.30 green:0.57 blue:1.0 alpha:1.0] set];
243 else 243 else
244 [GetButtonBorderColor(cellButtonState(cell)) set]; 244 [GetButtonBorderColor(cellButtonState(cell)) set];
245 [path stroke]; 245 [path stroke];
246 } 246 }
247 247
248 - (BOOL)canBecomeKeyView {
249 return YES;
250 }
251
252 @end 248 @end
253 249
254 @implementation ConstrainedWindowButtonCell 250 @implementation ConstrainedWindowButtonCell
255 251
256 @synthesize isMouseInside = isMouseInside_; 252 @synthesize isMouseInside = isMouseInside_;
257 253
258 - (void)drawBezelWithFrame:(NSRect)frame inView:(NSView*)controlView { 254 - (void)drawBezelWithFrame:(NSRect)frame inView:(NSView*)controlView {
259 // Inset to leave room for shadow. 255 // Inset to leave room for shadow.
260 --frame.size.height; 256 --frame.size.height;
261 257
(...skipping 23 matching lines...) Expand all
285 size.width += kButtonPaddingX * 2; 281 size.width += kButtonPaddingX * 2;
286 return size; 282 return size;
287 } 283 }
288 284
289 - (NSAttributedString*)getAttributedTitle { 285 - (NSAttributedString*)getAttributedTitle {
290 return GetButtonAttributedString( 286 return GetButtonAttributedString(
291 [self title], [self keyEquivalent], self); 287 [self title], [self keyEquivalent], self);
292 } 288 }
293 289
294 @end 290 @end
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698