- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / cocoa / new_tab_button.h
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.
4
5 #ifndef CHROME_BROWSER_UI_COCOA_NEW_TAB_BUTTON
6 #define CHROME_BROWSER_UI_COCOA_NEW_TAB_BUTTON
7
8 #import <Cocoa/Cocoa.h>
9
10 // 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
12 // use, but no other buttons are so irregularly shaped with respect to their
13 // bounding box.
14
15 @interface NewTabButton : NSButton
16
17 // Returns YES if the given point is over the button.  |point| is in the
18 // superview's coordinate system.
19 - (BOOL)pointIsOverButton:(NSPoint)point;
20 @end
21
22 #endif  // CHROME_BROWSER_UI_COCOA_NEW_TAB_BUTTON