Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1040)

Unified Diff: chrome/browser/cocoa/new_tab_button.h

Issue 3046016: Restrict new tab button clicks to inside the image bounds, not anywhere in th... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/nibs/BrowserWindow.xib ('k') | chrome/browser/cocoa/new_tab_button.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/new_tab_button.h
===================================================================
--- chrome/browser/cocoa/new_tab_button.h (revision 0)
+++ chrome/browser/cocoa/new_tab_button.h (revision 0)
@@ -0,0 +1,23 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_COCOA_NEW_TAB_BUTTON
+#define CHROME_BROWSER_COCOA_NEW_TAB_BUTTON
+
+#import <Cocoa/Cocoa.h>
+
+#include "base/scoped_nsobject.h"
+
+// Overrides hit-test behavior to only accept clicks inside the image of the
+// button, not just inside the bounding box. This could be abstracted to general
+// use, but no other buttons are so irregularly shaped with respect to their
+// bounding box.
+
+@interface NewTabButton : NSButton {
+ @private
+ scoped_nsobject<NSBezierPath> imagePath_;
+}
+@end
+
+#endif // CHROME_BROWSER_COCOA_NEW_TAB_BUTTON
Property changes on: chrome/browser/cocoa/new_tab_button.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/app/nibs/BrowserWindow.xib ('k') | chrome/browser/cocoa/new_tab_button.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698