OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/tabs/tab_view.h" | 5 #import "chrome/browser/ui/cocoa/tabs/tab_view.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/browser/themes/theme_service.h" | 8 #include "chrome/browser/themes/theme_service.h" |
9 #import "chrome/browser/ui/cocoa/nsview_additions.h" | 9 #import "chrome/browser/ui/cocoa/nsview_additions.h" |
10 #import "chrome/browser/ui/cocoa/tabs/tab_controller.h" | 10 #import "chrome/browser/ui/cocoa/tabs/tab_controller.h" |
11 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h" | 11 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h" |
12 #import "chrome/browser/ui/cocoa/themed_window.h" | 12 #import "chrome/browser/ui/cocoa/themed_window.h" |
13 #import "chrome/browser/ui/cocoa/view_id_util.h" | 13 #import "chrome/browser/ui/cocoa/view_id_util.h" |
14 #include "grit/generated_resources.h" | 14 #include "grit/generated_resources.h" |
15 #include "grit/theme_resources.h" | 15 #include "grit/theme_resources.h" |
16 #include "grit/theme_resources_standard.h" | |
17 #include "ui/base/l10n/l10n_util.h" | 16 #include "ui/base/l10n/l10n_util.h" |
18 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" | 17 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" |
19 | 18 |
20 namespace { | 19 namespace { |
21 | 20 |
22 // Constants for inset and control points for tab shape. | 21 // Constants for inset and control points for tab shape. |
23 const CGFloat kInsetMultiplier = 2.0/3.0; | 22 const CGFloat kInsetMultiplier = 2.0/3.0; |
24 const CGFloat kControlPoint1Multiplier = 1.0/3.0; | 23 const CGFloat kControlPoint1Multiplier = 1.0/3.0; |
25 const CGFloat kControlPoint2Multiplier = 3.0/8.0; | 24 const CGFloat kControlPoint2Multiplier = 3.0/8.0; |
26 | 25 |
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 NSMakePoint(NSMinX(rect) + kInsetMultiplier * NSHeight(rect), | 670 NSMakePoint(NSMinX(rect) + kInsetMultiplier * NSHeight(rect), |
672 NSMaxY(rect)); | 671 NSMaxY(rect)); |
673 | 672 |
674 NSBezierPath* path = [NSBezierPath bezierPath]; | 673 NSBezierPath* path = [NSBezierPath bezierPath]; |
675 [path moveToPoint:topLeft]; | 674 [path moveToPoint:topLeft]; |
676 [path lineToPoint:topRight]; | 675 [path lineToPoint:topRight]; |
677 return path; | 676 return path; |
678 } | 677 } |
679 | 678 |
680 @end // @implementation TabView(Private) | 679 @end // @implementation TabView(Private) |
OLD | NEW |