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