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/wrench_menu/menu_tracked_button.h" | 5 #import "chrome/browser/ui/cocoa/wrench_menu/menu_tracked_button.h" |
6 | 6 |
7 #include "base/mac/mac_util.h" | |
8 | |
9 @interface MenuTrackedButton (Private) | 7 @interface MenuTrackedButton (Private) |
10 - (void)doHighlight:(BOOL)highlight; | 8 - (void)doHighlight:(BOOL)highlight; |
11 - (void)checkMouseInRect; | 9 - (void)checkMouseInRect; |
12 - (NSRect)insetBounds; | 10 - (NSRect)insetBounds; |
13 @end | 11 @end |
14 | 12 |
15 @implementation MenuTrackedButton | 13 @implementation MenuTrackedButton |
16 | 14 |
17 @synthesize tracking = tracking_; | 15 @synthesize tracking = tracking_; |
18 | 16 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 } | 91 } |
94 } | 92 } |
95 | 93 |
96 // Returns the bounds of the receiver slightly inset to avoid highlighting both | 94 // Returns the bounds of the receiver slightly inset to avoid highlighting both |
97 // buttons in a pair that overlap. | 95 // buttons in a pair that overlap. |
98 - (NSRect)insetBounds { | 96 - (NSRect)insetBounds { |
99 return NSInsetRect([self bounds], 2, 1); | 97 return NSInsetRect([self bounds], 2, 1); |
100 } | 98 } |
101 | 99 |
102 @end | 100 @end |
OLD | NEW |