OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/bookmarks/bookmark_bar_folder_window.h" | 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_window.h" |
6 | 6 |
7 #import "base/logging.h" | 7 #import "base/logging.h" |
8 #import "base/mac/scoped_nsobject.h" | 8 #import "base/mac/scoped_nsobject.h" |
9 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_constants.h" | 9 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_constants.h" |
10 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h" | 10 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h" |
11 #import "third_party/GTM/AppKit/GTMNSBezierPath+RoundRect.h" | 11 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMNSBezierPath+RoundRect
.h" |
12 #import "third_party/GTM/AppKit/GTMNSColor+Luminance.h" | 12 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMNSColor+Luminance.h" |
13 | 13 |
14 using bookmarks::kBookmarkBarMenuCornerRadius; | 14 using bookmarks::kBookmarkBarMenuCornerRadius; |
15 | 15 |
16 @implementation BookmarkBarFolderWindow | 16 @implementation BookmarkBarFolderWindow |
17 | 17 |
18 - (id)initWithContentRect:(NSRect)contentRect | 18 - (id)initWithContentRect:(NSRect)contentRect |
19 styleMask:(NSUInteger)windowStyle | 19 styleMask:(NSUInteger)windowStyle |
20 backing:(NSBackingStoreType)bufferingType | 20 backing:(NSBackingStoreType)bufferingType |
21 defer:(BOOL)deferCreation { | 21 defer:(BOOL)deferCreation { |
22 if ((self = [super initWithContentRect:contentRect | 22 if ((self = [super initWithContentRect:contentRect |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 // window. However that also allows some scrollWheel: events to leak | 80 // window. However that also allows some scrollWheel: events to leak |
81 // into the NSWindow behind it (even in a different application). | 81 // into the NSWindow behind it (even in a different application). |
82 // Better to plug the scroll leak than to round corners for M5. | 82 // Better to plug the scroll leak than to round corners for M5. |
83 - (void)scrollWheel:(NSEvent *)theEvent { | 83 - (void)scrollWheel:(NSEvent *)theEvent { |
84 DCHECK([[[self window] windowController] | 84 DCHECK([[[self window] windowController] |
85 respondsToSelector:@selector(scrollWheel:)]); | 85 respondsToSelector:@selector(scrollWheel:)]); |
86 [[[self window] windowController] scrollWheel:theEvent]; | 86 [[[self window] windowController] scrollWheel:theEvent]; |
87 } | 87 } |
88 | 88 |
89 @end | 89 @end |
OLD | NEW |