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

Side by Side Diff: chrome/browser/ui/cocoa/fullscreen_window.mm

Issue 1154013009: [OSX] Don't create deferred windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 (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/fullscreen_window.h" 5 #import "chrome/browser/ui/cocoa/fullscreen_window.h"
6 6
7 #import "chrome/browser/ui/cocoa/themed_window.h" 7 #import "chrome/browser/ui/cocoa/themed_window.h"
8 8
9 @implementation FullscreenWindow 9 @implementation FullscreenWindow
10 10
11 // Make sure our designated initializer gets called. 11 // Make sure our designated initializer gets called.
12 - (id)init { 12 - (id)init {
13 return [self initForScreen:[NSScreen mainScreen]]; 13 return [self initForScreen:[NSScreen mainScreen]];
14 } 14 }
15 15
16 - (id)initForScreen:(NSScreen*)screen { 16 - (id)initForScreen:(NSScreen*)screen {
17 NSRect contentRect; 17 NSRect contentRect;
18 contentRect.origin = NSZeroPoint; 18 contentRect.origin = NSZeroPoint;
19 contentRect.size = [screen frame].size; 19 contentRect.size = [screen frame].size;
20 20
21 if ((self = [super initWithContentRect:contentRect 21 if ((self = [super initWithContentRect:contentRect
22 styleMask:NSBorderlessWindowMask 22 styleMask:NSBorderlessWindowMask
23 backing:NSBackingStoreBuffered 23 backing:NSBackingStoreBuffered
24 defer:YES 24 defer:NO
25 screen:screen])) { 25 screen:screen])) {
26 [self setReleasedWhenClosed:NO]; 26 [self setReleasedWhenClosed:NO];
27 // Borderless windows don't usually show up in the Windows menu so whine at 27 // Borderless windows don't usually show up in the Windows menu so whine at
28 // Cocoa until it complies. See -dealloc and -setTitle: as well. 28 // Cocoa until it complies. See -dealloc and -setTitle: as well.
29 [NSApp addWindowsItem:self title:@"" filename:NO]; 29 [NSApp addWindowsItem:self title:@"" filename:NO];
30 [[self contentView] setWantsLayer:YES]; 30 [[self contentView] setWantsLayer:YES];
31 } 31 }
32 return self; 32 return self;
33 } 33 }
34 34
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 // Explicitly enable |-performClose:| (see above); otherwise the fact that 91 // Explicitly enable |-performClose:| (see above); otherwise the fact that
92 // this window does not have a close button results in it being disabled. 92 // this window does not have a close button results in it being disabled.
93 if (action == @selector(performClose:)) 93 if (action == @selector(performClose:))
94 return YES; 94 return YES;
95 95
96 return [super validateUserInterfaceItem:item]; 96 return [super validateUserInterfaceItem:item];
97 } 97 }
98 98
99 @end 99 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/framed_browser_window.mm ('k') | chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698