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

Unified Diff: chrome/browser/cocoa/tab_controller.mm

Issue 2952004: [Mac] Finish implementation of App Tabs. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/cocoa/tab_controller.mm
===================================================================
--- chrome/browser/cocoa/tab_controller.mm (revision 52312)
+++ chrome/browser/cocoa/tab_controller.mm (working copy)
@@ -23,10 +23,6 @@
@synthesize pinned = pinned_;
@synthesize target = target_;
-namespace {
-const CGFloat kAppIconTopOffsetPx = 2.0;
-} // anonymous namespace
-
namespace TabControllerInternal {
// A C++ delegate that handles enabling/disabling menu items and handling when
@@ -68,7 +64,7 @@
+ (CGFloat)minSelectedTabWidth { return 46; }
+ (CGFloat)maxTabWidth { return 220; }
+ (CGFloat)miniTabWidth { return 53; }
-+ (CGFloat)appTabWidth { return 46; }
++ (CGFloat)appTabWidth { return 66; }
- (TabView*)tabView {
return static_cast<TabView*>([self view]);
@@ -134,7 +130,10 @@
contextMenuDelegate_.reset(
new TabControllerInternal::MenuDelegate(target_, self));
contextMenuModel_.reset(new TabMenuModel(contextMenuDelegate_.get(),
- [self pinned], false, true));
+ [self pinned],
+ false, // allow_toolbar_toggle
Mark Mentovai 2010/07/14 18:40:28 OCD: line up the comments.
+ true)); // is_toolbar_visible
+
contextMenuController_.reset(
[[MenuController alloc] initWithModel:contextMenuModel_.get()
useWithPopUpButtonCell:NO]);
@@ -173,8 +172,6 @@
if ([self app]) {
NSRect appIconFrame = [iconView frame];
appIconFrame.origin = originalIconFrame_.origin;
- // Adjust the position to prevent clipping due to the icon's larger size.
- appIconFrame.origin.y -= kAppIconTopOffsetPx;
// Center the icon.
appIconFrame.origin.x = ([TabController appTabWidth] -
NSWidth(appIconFrame)) / 2.0;

Powered by Google App Engine
This is Rietveld 408576698