Index: chrome/browser/ui/cocoa/extensions/shell_window_cocoa.mm |
diff --git a/chrome/browser/ui/cocoa/extensions/shell_window_cocoa.mm b/chrome/browser/ui/cocoa/extensions/shell_window_cocoa.mm |
index 479114c31a81bbb470f150af05ffa3fdd2f05708..0333247d248f19f1915c356b473f273e4a4dbdc9 100644 |
--- a/chrome/browser/ui/cocoa/extensions/shell_window_cocoa.mm |
+++ b/chrome/browser/ui/cocoa/extensions/shell_window_cocoa.mm |
@@ -56,16 +56,26 @@ |
@end |
+// This is really a method on NSGrayFrame, so it should only be called on the |
+// view passed into -[NSWindow drawCustomFrameRect:forView:]. |
+@interface NSView (PrivateMethods) |
+- (CGFloat)roundedCornerRadius; |
+@end |
+ |
@implementation ShellNSWindow |
- (void)drawCustomFrameRect:(NSRect)rect forView:(NSView*)view { |
[[NSBezierPath bezierPathWithRect:rect] addClip]; |
[[NSColor clearColor] set]; |
NSRectFill(rect); |
- const CGFloat kWindowBorderRadius = 3.0; |
+ |
+ // Set up our clip. |
+ CGFloat cornerRadius = 4.0; |
+ if ([view respondsToSelector:@selector(roundedCornerRadius)]) |
+ cornerRadius = [view roundedCornerRadius]; |
[[NSBezierPath bezierPathWithRoundedRect:[view bounds] |
- xRadius:kWindowBorderRadius |
- yRadius:kWindowBorderRadius] addClip]; |
+ xRadius:cornerRadius |
+ yRadius:cornerRadius] addClip]; |
[[NSColor whiteColor] set]; |
NSRectFill(rect); |
} |