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

Side by Side Diff: chrome/browser/ui/cocoa/tabs/tab_view.mm

Issue 6849030: Add support for multi resolution icons (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix try jobs Created 9 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/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 #import "base/mac/mac_util.h" 8 #import "base/mac/mac_util.h"
9 #include "base/mac/scoped_cftyperef.h" 9 #include "base/mac/scoped_cftyperef.h"
10 #include "chrome/browser/themes/theme_service.h" 10 #include "chrome/browser/themes/theme_service.h"
11 #import "chrome/browser/ui/cocoa/tabs/tab_controller.h" 11 #import "chrome/browser/ui/cocoa/tabs/tab_controller.h"
12 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h" 12 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h"
13 #import "chrome/browser/ui/cocoa/themed_window.h" 13 #import "chrome/browser/ui/cocoa/themed_window.h"
14 #import "chrome/browser/ui/cocoa/view_id_util.h" 14 #import "chrome/browser/ui/cocoa/view_id_util.h"
15 #include "grit/generated_resources.h" 15 #include "grit/generated_resources.h"
16 #include "grit/theme_resources.h" 16 #include "grit/theme_resources.h"
17 #include "grit/theme_resources_standard.h"
17 #include "ui/base/l10n/l10n_util.h" 18 #include "ui/base/l10n/l10n_util.h"
18 19
19 namespace { 20 namespace {
20 21
21 // Constants for inset and control points for tab shape. 22 // Constants for inset and control points for tab shape.
22 const CGFloat kInsetMultiplier = 2.0/3.0; 23 const CGFloat kInsetMultiplier = 2.0/3.0;
23 const CGFloat kControlPoint1Multiplier = 1.0/3.0; 24 const CGFloat kControlPoint1Multiplier = 1.0/3.0;
24 const CGFloat kControlPoint2Multiplier = 3.0/8.0; 25 const CGFloat kControlPoint2Multiplier = 3.0/8.0;
25 26
26 // The amount of time in seconds during which each type of glow increases, holds 27 // The amount of time in seconds during which each type of glow increases, holds
(...skipping 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 controlPoint1:NSMakePoint(topRight.x + bottomControlPointInset, 1053 controlPoint1:NSMakePoint(topRight.x + bottomControlPointInset,
1053 topRight.y) 1054 topRight.y)
1054 controlPoint2:NSMakePoint(bottomRight.x - baseControlPointOutset, 1055 controlPoint2:NSMakePoint(bottomRight.x - baseControlPointOutset,
1055 bottomRight.y)]; 1056 bottomRight.y)];
1056 [path lineToPoint:NSMakePoint(bottomRight.x + 1, bottomRight.y)]; 1057 [path lineToPoint:NSMakePoint(bottomRight.x + 1, bottomRight.y)];
1057 [path lineToPoint:NSMakePoint(bottomRight.x + 1, bottomRight.y - 2)]; 1058 [path lineToPoint:NSMakePoint(bottomRight.x + 1, bottomRight.y - 2)];
1058 return path; 1059 return path;
1059 } 1060 }
1060 1061
1061 @end // @implementation TabView(Private) 1062 @end // @implementation TabView(Private)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698