OLD | NEW |
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_custom_wi
ndow.h" | 5 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_wi
ndow.h" |
6 | 6 |
7 #import "base/memory/scoped_nsobject.h" | 7 #import "base/memory/scoped_nsobject.h" |
8 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_con
troller.h" | 8 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_con
troller.h" |
9 #import "chrome/browser/ui/constrained_window.h" | 9 #import "chrome/browser/ui/constrained_window.h" |
10 #import "chrome/browser/ui/constrained_window_constants.h" | 10 #import "chrome/browser/ui/constrained_window_constants.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 [self setContentView:contentView]; | 23 [self setContentView:contentView]; |
24 } | 24 } |
25 return self; | 25 return self; |
26 } | 26 } |
27 | 27 |
28 - (id)initWithContentRect:(NSRect)contentRect | 28 - (id)initWithContentRect:(NSRect)contentRect |
29 styleMask:(NSUInteger)windowStyle | 29 styleMask:(NSUInteger)windowStyle |
30 backing:(NSBackingStoreType)bufferingType | 30 backing:(NSBackingStoreType)bufferingType |
31 defer:(BOOL)deferCreation { | 31 defer:(BOOL)deferCreation { |
32 if ((self = [super initWithContentRect:contentRect | 32 if ((self = [super initWithContentRect:contentRect |
33 styleMask:windowStyle | 33 styleMask:NSBorderlessWindowMask |
34 backing:bufferingType | 34 backing:bufferingType |
35 defer:NO])) { | 35 defer:NO])) { |
36 [self setHasShadow:YES]; | 36 [self setHasShadow:YES]; |
37 [self setBackgroundColor:[NSColor clearColor]]; | 37 [self setBackgroundColor:[NSColor clearColor]]; |
38 [self setOpaque:NO]; | 38 [self setOpaque:NO]; |
39 [self setReleasedWhenClosed:NO]; | 39 [self setReleasedWhenClosed:NO]; |
40 } | 40 } |
41 return self; | 41 return self; |
42 } | 42 } |
43 | 43 |
(...skipping 26 matching lines...) Expand all Loading... |
70 xRadius:ConstrainedWindowConstants::kBorderRadius | 70 xRadius:ConstrainedWindowConstants::kBorderRadius |
71 yRadius:ConstrainedWindowConstants::kBorderRadius]; | 71 yRadius:ConstrainedWindowConstants::kBorderRadius]; |
72 [gfx::SkColorToCalibratedNSColor( | 72 [gfx::SkColorToCalibratedNSColor( |
73 ConstrainedWindow::GetBackgroundColor()) set]; | 73 ConstrainedWindow::GetBackgroundColor()) set]; |
74 [path fill]; | 74 [path fill]; |
75 | 75 |
76 [[self window] invalidateShadow]; | 76 [[self window] invalidateShadow]; |
77 } | 77 } |
78 | 78 |
79 @end | 79 @end |
OLD | NEW |