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

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

Issue 11348274: Force constrained windows from nibs to be borderless (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 | Annotate | Revision Log
« 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 (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
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
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
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