| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/cocoa/tab_view.h" | 5 #import "chrome/browser/cocoa/tab_view.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #import "base/mac_util.h" | 8 #import "base/mac_util.h" |
| 9 #include "base/nsimage_cache_mac.h" | 9 #include "base/nsimage_cache_mac.h" |
| 10 #include "base/scoped_cftyperef.h" | 10 #include "base/scoped_cftyperef.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 return nil; | 89 return nil; |
| 90 | 90 |
| 91 // Sheets, being window-modal, should block contextual menus. For some reason | 91 // Sheets, being window-modal, should block contextual menus. For some reason |
| 92 // they do not. Disallow them ourselves. | 92 // they do not. Disallow them ourselves. |
| 93 if ([[self window] attachedSheet]) | 93 if ([[self window] attachedSheet]) |
| 94 return nil; | 94 return nil; |
| 95 | 95 |
| 96 return [controller_ menu]; | 96 return [controller_ menu]; |
| 97 } | 97 } |
| 98 | 98 |
| 99 - (BOOL)isMouseIn { |
| 100 return isMouseInside_; |
| 101 } |
| 102 |
| 99 // Overridden so that mouse clicks come to this view (the parent of the | 103 // Overridden so that mouse clicks come to this view (the parent of the |
| 100 // hierarchy) first. We want to handle clicks and drags in this class and | 104 // hierarchy) first. We want to handle clicks and drags in this class and |
| 101 // leave the background button for display purposes only. | 105 // leave the background button for display purposes only. |
| 102 - (BOOL)acceptsFirstMouse:(NSEvent*)theEvent { | 106 - (BOOL)acceptsFirstMouse:(NSEvent*)theEvent { |
| 103 return YES; | 107 return YES; |
| 104 } | 108 } |
| 105 | 109 |
| 106 - (void)mouseEntered:(NSEvent*)theEvent { | 110 - (void)mouseEntered:(NSEvent*)theEvent { |
| 107 isMouseInside_ = YES; | 111 isMouseInside_ = YES; |
| 108 [self resetLastGlowUpdateTime]; | 112 [self resetLastGlowUpdateTime]; |
| (...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1042 controlPoint1:NSMakePoint(topRight.x + bottomControlPointInset, | 1046 controlPoint1:NSMakePoint(topRight.x + bottomControlPointInset, |
| 1043 topRight.y) | 1047 topRight.y) |
| 1044 controlPoint2:NSMakePoint(bottomRight.x - baseControlPointOutset, | 1048 controlPoint2:NSMakePoint(bottomRight.x - baseControlPointOutset, |
| 1045 bottomRight.y)]; | 1049 bottomRight.y)]; |
| 1046 [path lineToPoint:NSMakePoint(bottomRight.x + 1, bottomRight.y)]; | 1050 [path lineToPoint:NSMakePoint(bottomRight.x + 1, bottomRight.y)]; |
| 1047 [path lineToPoint:NSMakePoint(bottomRight.x + 1, bottomRight.y - 2)]; | 1051 [path lineToPoint:NSMakePoint(bottomRight.x + 1, bottomRight.y - 2)]; |
| 1048 return path; | 1052 return path; |
| 1049 } | 1053 } |
| 1050 | 1054 |
| 1051 @end // @implementation TabView(Private) | 1055 @end // @implementation TabView(Private) |
| OLD | NEW |