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

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

Issue 333017: Fixes up bookmark bubbles and the browser window so that they shut down corre... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 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 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/cocoa/bookmark_bubble_window.h" 5 #import "chrome/browser/cocoa/bookmark_bubble_window.h"
6 6
7 @implementation BookmarkBubbleWindow 7 @implementation BookmarkBubbleWindow
8 8
9 - (id)initWithContentRect:(NSRect)contentRect { 9 - (id)initWithContentRect:(NSRect)contentRect
10 styleMask:(NSUInteger)aStyle
11 backing:(NSBackingStoreType)bufferingType
12 defer:(BOOL)flag {
10 if ((self = [super initWithContentRect:contentRect 13 if ((self = [super initWithContentRect:contentRect
11 styleMask:NSBorderlessWindowMask 14 styleMask:NSBorderlessWindowMask
12 backing:NSBackingStoreBuffered 15 backing:bufferingType
13 defer:YES])) { 16 defer:flag])) {
14 [self setReleasedWhenClosed:NO];
15 [self setBackgroundColor:[NSColor clearColor]]; 17 [self setBackgroundColor:[NSColor clearColor]];
16 [self setExcludedFromWindowsMenu:YES]; 18 [self setExcludedFromWindowsMenu:YES];
17 [self setAlphaValue:1.0]; 19 [self setAlphaValue:1.0];
18 [self setOpaque:NO]; 20 [self setOpaque:NO];
19 [self setHasShadow:YES]; 21 [self setHasShadow:YES];
20 } 22 }
21 return self; 23 return self;
22 } 24 }
23 25
24 // According to 26 // According to
25 // http://www.cocoabuilder.com/archive/message/cocoa/2006/6/19/165953, 27 // http://www.cocoabuilder.com/archive/message/cocoa/2006/6/19/165953,
26 // NSBorderlessWindowMask windows cannot become key or main. In our 28 // NSBorderlessWindowMask windows cannot become key or main. In our
27 // case, however, we don't want all of that behavior. (As an example, 29 // case, however, we don't want all of that behavior. (As an example,
28 // our bubble has buttons!) 30 // our bubble has buttons!)
29 31
30 - (BOOL)canBecomeKeyWindow { 32 - (BOOL)canBecomeKeyWindow {
31 return YES; 33 return YES;
32 } 34 }
33 35
34 @end 36 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698