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

Unified Diff: chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm

Issue 2360343003: cocoa browser: remove non-material tabstrip support (Closed)
Patch Set: restyle fn Created 4 years, 3 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
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_controller.mm ('k') | chrome/browser/ui/cocoa/tabs/tab_strip_view.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
index 2df953314fb0bd30b483c4ac749cb3c5094dbb76..626d742e101675067ae37c08e24de353f009093a 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
@@ -91,7 +91,6 @@
// The amount by which the new tab button is offset (from the tabs).
const CGFloat kNewTabButtonOffset = 10.0;
-const CGFloat kNewTabButtonOffsetNonMD = 8.0;
// Time (in seconds) in which tabs animate to their final position.
const NSTimeInterval kAnimationDuration = 0.125;
@@ -570,11 +569,6 @@ + (CGFloat)tabOverlap {
// will also invalidate parts of the tab to the left, and two tabs's
// backgrounds need to be painted on each throbber frame instead of one.
const CGFloat kTabOverlap = 18.0;
- const CGFloat kTabOverlapNonMD = 19.0;
-
- if (!ui::MaterialDesignController::IsModeMaterial()) {
- return kTabOverlapNonMD;
- }
return kTabOverlap;
}
@@ -931,14 +925,8 @@ - (void)layoutTabsWithAnimation:(BOOL)animate
availableSpace = NSWidth([tabStripView_ frame]);
// Account for the width of the new tab button.
- if (!ui::MaterialDesignController::IsModeMaterial()) {
- availableSpace -=
- NSWidth([newTabButton_ frame]) + kNewTabButtonOffsetNonMD -
- kTabOverlap;
- } else {
- availableSpace -=
- NSWidth([newTabButton_ frame]) + kNewTabButtonOffset - kTabOverlap;
- }
+ availableSpace -=
+ NSWidth([newTabButton_ frame]) + kNewTabButtonOffset - kTabOverlap;
// Account for the right-side controls if not in rapid closure mode.
// (In rapid closure mode, the available width is set based on the
// position of the rightmost tab, not based on the width of the tab strip,
@@ -1566,16 +1554,14 @@ - (void)updateIconsForContents:(content::WebContents*)contents
newHasIcon = true;
} else if (contents->IsWaitingForResponse()) {
newState = kTabWaiting;
- if (ui::MaterialDesignController::IsModeMaterial() &&
- [[[tabController view] window] hasDarkTheme]) {
+ if ([[[tabController view] window] hasDarkTheme]) {
throbberImage = throbberWaitingIncognitoImage;
} else {
throbberImage = throbberWaitingImage;
}
} else if (contents->IsLoadingToDifferentDocument()) {
newState = kTabLoading;
- if (ui::MaterialDesignController::IsModeMaterial() &&
- [[[tabController view] window] hasDarkTheme]) {
+ if ([[[tabController view] window] hasDarkTheme]) {
throbberImage = throbberLoadingIncognitoImage;
} else {
throbberImage = throbberLoadingImage;
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_controller.mm ('k') | chrome/browser/ui/cocoa/tabs/tab_strip_view.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698