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/new_tab_button.h" | 5 #import "chrome/browser/ui/cocoa/new_tab_button.h" |
6 #import "chrome/browser/ui/cocoa/image_button_cell.h" | 6 #import "chrome/browser/ui/cocoa/image_button_cell.h" |
7 #include "grit/theme_resources.h" | 7 #include "grit/theme_resources.h" |
8 #include "ui/base/resource/resource_bundle.h" | 8 #include "ui/base/resource/resource_bundle.h" |
9 | 9 |
10 // A simple override of the ImageButtonCell to disable handling of | 10 // A simple override of the ImageButtonCell to disable handling of |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 } | 48 } |
49 | 49 |
50 // Override to only accept clicks within the bounds of the defined path, not | 50 // Override to only accept clicks within the bounds of the defined path, not |
51 // the entire bounding box. |aPoint| is in the superview's coordinate system. | 51 // the entire bounding box. |aPoint| is in the superview's coordinate system. |
52 - (NSView*)hitTest:(NSPoint)aPoint { | 52 - (NSView*)hitTest:(NSPoint)aPoint { |
53 if ([self pointIsOverButton:aPoint]) | 53 if ([self pointIsOverButton:aPoint]) |
54 return [super hitTest:aPoint]; | 54 return [super hitTest:aPoint]; |
55 return nil; | 55 return nil; |
56 } | 56 } |
57 | 57 |
| 58 // ThemedWindowDrawing implementation. |
| 59 |
| 60 - (void)windowDidChangeTheme { |
| 61 [self setNeedsDisplay:YES]; |
| 62 } |
| 63 |
| 64 - (void)windowDidChangeActive { |
| 65 [self setNeedsDisplay:YES]; |
| 66 } |
| 67 |
58 @end | 68 @end |
OLD | NEW |