OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #include "chrome/browser/cocoa/nsimage_cache.h" | 8 #include "base/nsimage_cache_mac.h" |
9 #import "chrome/browser/cocoa/tab_controller.h" | 9 #import "chrome/browser/cocoa/tab_controller.h" |
10 #import "chrome/browser/cocoa/tab_window_controller.h" | 10 #import "chrome/browser/cocoa/tab_window_controller.h" |
11 | 11 |
12 // Constants for inset and control points for tab shape. | 12 // Constants for inset and control points for tab shape. |
13 static const CGFloat kInsetMultiplier = 2.0/3.0; | 13 static const CGFloat kInsetMultiplier = 2.0/3.0; |
14 static const CGFloat kControlPoint1Multiplier = 1.0/3.0; | 14 static const CGFloat kControlPoint1Multiplier = 1.0/3.0; |
15 static const CGFloat kControlPoint2Multiplier = 3.0/8.0; | 15 static const CGFloat kControlPoint2Multiplier = 3.0/8.0; |
16 | 16 |
17 static const NSTimeInterval kAnimationShowDuration = 0.2; | 17 static const NSTimeInterval kAnimationShowDuration = 0.2; |
18 static const NSTimeInterval kAnimationHideDuration = 0.4; | 18 static const NSTimeInterval kAnimationHideDuration = 0.4; |
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 [[NSGraphicsContext currentContext] restoreGraphicsState]; | 703 [[NSGraphicsContext currentContext] restoreGraphicsState]; |
704 } | 704 } |
705 | 705 |
706 // Called when the user hits the right mouse button (or control-clicks) to | 706 // Called when the user hits the right mouse button (or control-clicks) to |
707 // show a context menu. | 707 // show a context menu. |
708 - (void)rightMouseDown:(NSEvent*)theEvent { | 708 - (void)rightMouseDown:(NSEvent*)theEvent { |
709 [NSMenu popUpContextMenu:[self menu] withEvent:theEvent forView:self]; | 709 [NSMenu popUpContextMenu:[self menu] withEvent:theEvent forView:self]; |
710 } | 710 } |
711 | 711 |
712 @end | 712 @end |
OLD | NEW |