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

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

Issue 126294: Mac fullscreen mode (with pkasting). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 | Annotate | Revision Log
Property Changes:
Name: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/cocoa/fullscreen_window.h"
6
7 @implementation FullscreenWindow
8
9 // Make sure our designated initializer gets called.
10 - (id)init {
11 return [self initForScreen:[NSScreen mainScreen]];
12 }
13
14 - (id)initForScreen:(NSScreen*)screen {
15 NSRect contentRect;
16 contentRect.origin = NSZeroPoint;
17 contentRect.size = [screen frame].size;
18
19 if ((self = [super initWithContentRect:contentRect
20 styleMask:NSBorderlessWindowMask
21 backing:NSBackingStoreBuffered
22 defer:YES
23 screen:screen])) {
24 [self setReleasedWhenClosed:NO];
25 }
26 return self;
27 }
28
29 // According to
30 // http://www.cocoabuilder.com/archive/message/cocoa/2006/6/19/165953,
31 // NSBorderlessWindowMask windows cannot become key or main.
32 // In our case, however, we don't want that behavior, so we override
33 // canBecomeKeyWindow and canBecomeMainWindow.
34
35 - (BOOL)canBecomeKeyWindow {
36 return YES;
37 }
38
39 - (BOOL)canBecomeMainWindow {
40 return YES;
41 }
42
43 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/fullscreen_window.h ('k') | chrome/browser/cocoa/fullscreen_window_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698