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

Unified Diff: chrome/browser/ui/cocoa/tabs/tab_strip_view.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_strip_controller.mm ('k') | chrome/browser/ui/cocoa/tabs/tab_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_view.mm
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_view.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_view.mm
index 2329650aa54f457d6daf25a517b8faa527c83809..279c36d8aee7d7fd907084f509a1addea63f703b 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_view.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_view.mm
@@ -61,28 +61,6 @@ - (void)drawBottomEdge:(NSRect)dirtyRect {
if (!themeProvider)
return;
- if (!ui::MaterialDesignController::IsModeMaterial()) {
- // First draw the toolbar bitmap, so that theme colors can shine through.
- NSRect backgroundRect = [self bounds];
- backgroundRect.size.height = 2 * [self cr_lineWidth];
- if (NSIntersectsRect(backgroundRect, dirtyRect))
- [self drawBackground:backgroundRect];
-
- // Draw the border bitmap, which is partially transparent.
- NSImage* image = themeProvider->GetNSImageNamed(IDR_TOOLBAR_SHADE_TOP);
- NSRect borderRect = backgroundRect;
- borderRect.size.height = [image size].height;
- if (NSIntersectsRect(borderRect, dirtyRect)) {
- BOOL focused = [window isMainWindow];
- NSDrawThreePartImage(borderRect, nil, image, nil, /*vertical=*/ NO,
- NSCompositeSourceOver,
- focused ? 1.0 : tabs::kImageNoFocusAlpha,
- /*flipped=*/ NO);
- }
-
- return;
- }
-
NSColor* strokeColor;
if (themeProvider->HasCustomImage(IDR_THEME_TOOLBAR) ||
themeProvider->HasCustomColor(ThemeProperties::COLOR_TOOLBAR)) {
@@ -122,7 +100,6 @@ - (void)drawRect:(NSRect)dirtyRect {
const ui::ThemeProvider* themeProvider = [[self window] themeProvider];
bool hasCustomThemeImage = themeProvider &&
themeProvider->HasCustomImage(IDR_THEME_FRAME);
- bool isModeMaterial = ui::MaterialDesignController::IsModeMaterial();
BOOL supportsVibrancy = [self visualEffectView] != nil;
BOOL isMainWindow = [[self window] isMainWindow];
@@ -131,8 +108,7 @@ - (void)drawRect:(NSRect)dirtyRect {
// and not being used to drag tabs between browser windows). The gray is
// somewhat opaque for Incognito mode, very opaque for non-Incognito mode, and
// completely opaque when the window is not active.
- if (themeProvider && !hasCustomThemeImage && isModeMaterial &&
- !inATabDraggingOverlayWindow_) {
+ if (themeProvider && !hasCustomThemeImage && !inATabDraggingOverlayWindow_) {
NSColor* theColor = nil;
if (isMainWindow) {
if (supportsVibrancy &&
@@ -371,12 +347,9 @@ - (void)setNewTabButton:(NewTabButton*)button {
}
- (NSVisualEffectView*)visualEffectView {
- // NSVisualEffectView is only used in Material Design, and only available on
- // OS X 10.10 and higher.
- if (!ui::MaterialDesignController::IsModeMaterial() ||
- !base::mac::IsAtLeastOS10_10()) {
+ // NSVisualEffectView is only available on OS X 10.10 and higher.
+ if (!base::mac::IsAtLeastOS10_10())
return nil;
- }
NSView* rootView = [[[self window] contentView] superview];
Class nsVisualEffectViewClass = NSClassFromString(@"NSVisualEffectView");
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm ('k') | chrome/browser/ui/cocoa/tabs/tab_view.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698