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 #ifndef CHROME_BROWSER_UI_COCOA_NEW_TAB_BUTTON | 5 #ifndef CHROME_BROWSER_UI_COCOA_NEW_TAB_BUTTON |
6 #define CHROME_BROWSER_UI_COCOA_NEW_TAB_BUTTON | 6 #define CHROME_BROWSER_UI_COCOA_NEW_TAB_BUTTON |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
| 10 #import "chrome/browser/ui/cocoa/themed_window.h" |
| 11 |
10 // Overrides hit-test behavior to only accept clicks inside the image of the | 12 // Overrides hit-test behavior to only accept clicks inside the image of the |
11 // button, not just inside the bounding box. This could be abstracted to general | 13 // button, not just inside the bounding box. This could be abstracted to general |
12 // use, but no other buttons are so irregularly shaped with respect to their | 14 // use, but no other buttons are so irregularly shaped with respect to their |
13 // bounding box. | 15 // bounding box. |
14 | 16 |
15 @interface NewTabButton : NSButton | 17 @interface NewTabButton : NSButton<ThemedWindowDrawing> |
16 | 18 |
17 // Returns YES if the given point is over the button. |point| is in the | 19 // Returns YES if the given point is over the button. |point| is in the |
18 // superview's coordinate system. | 20 // superview's coordinate system. |
19 - (BOOL)pointIsOverButton:(NSPoint)point; | 21 - (BOOL)pointIsOverButton:(NSPoint)point; |
20 @end | 22 @end |
21 | 23 |
22 #endif // CHROME_BROWSER_UI_COCOA_NEW_TAB_BUTTON | 24 #endif // CHROME_BROWSER_UI_COCOA_NEW_TAB_BUTTON |
OLD | NEW |