OLD | NEW |
(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 #import "chrome/browser/cocoa/bookmark_bubble_window.h" |
| 6 |
| 7 @implementation BookmarkBubbleWindow |
| 8 |
| 9 - (id)initWithContentRect:(NSRect)contentRect { |
| 10 if ((self = [super initWithContentRect:contentRect |
| 11 styleMask:NSBorderlessWindowMask |
| 12 backing:NSBackingStoreBuffered |
| 13 defer:YES])) { |
| 14 [self setReleasedWhenClosed:NO]; |
| 15 [self setBackgroundColor:[NSColor clearColor]]; |
| 16 [self setExcludedFromWindowsMenu:YES]; |
| 17 [self setAlphaValue:1.0]; |
| 18 [self setOpaque:NO]; |
| 19 } |
| 20 return self; |
| 21 } |
| 22 |
| 23 // According to |
| 24 // http://www.cocoabuilder.com/archive/message/cocoa/2006/6/19/165953, |
| 25 // NSBorderlessWindowMask windows cannot become key or main. In our |
| 26 // case, however, we don't want all of that behavior. (As an example, |
| 27 // our bubble has buttons!) |
| 28 |
| 29 - (BOOL)canBecomeKeyWindow { |
| 30 return YES; |
| 31 } |
| 32 |
| 33 @end |
OLD | NEW |