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

Side by Side Diff: chrome/browser/ui/cocoa/tabs/tab_window_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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_view.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_window_controller.h" 5 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "base/mac/sdk_forward_declarations.h" 8 #import "base/mac/sdk_forward_declarations.h"
9 #import "chrome/browser/ui/cocoa/browser_window_layout.h" 9 #import "chrome/browser/ui/cocoa/browser_window_layout.h"
10 #import "chrome/browser/ui/cocoa/fast_resize_view.h" 10 #import "chrome/browser/ui/cocoa/fast_resize_view.h"
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 } 352 }
353 353
354 - (void)insertTabStripBackgroundViewIntoWindow:(NSWindow*)window 354 - (void)insertTabStripBackgroundViewIntoWindow:(NSWindow*)window
355 titleBar:(BOOL)hasTitleBar { 355 titleBar:(BOOL)hasTitleBar {
356 DCHECK(tabStripBackgroundView_); 356 DCHECK(tabStripBackgroundView_);
357 NSView* rootView = [[window contentView] superview]; 357 NSView* rootView = [[window contentView] superview];
358 358
359 // In Material Design on 10.10 and higher, the top portion of the window is 359 // In Material Design on 10.10 and higher, the top portion of the window is
360 // blurred using an NSVisualEffectView. 360 // blurred using an NSVisualEffectView.
361 Class nsVisualEffectViewClass = NSClassFromString(@"NSVisualEffectView"); 361 Class nsVisualEffectViewClass = NSClassFromString(@"NSVisualEffectView");
362 if (!ui::MaterialDesignController::IsModeMaterial() || 362 if (!nsVisualEffectViewClass) {
363 !nsVisualEffectViewClass) {
364 [rootView addSubview:tabStripBackgroundView_ 363 [rootView addSubview:tabStripBackgroundView_
365 positioned:NSWindowBelow 364 positioned:NSWindowBelow
366 relativeTo:nil]; 365 relativeTo:nil];
367 return; 366 return;
368 } 367 }
369 368
370 [window setTitlebarAppearsTransparent:YES]; 369 [window setTitlebarAppearsTransparent:YES];
371 370
372 // If the window has a normal titlebar, then do not add NSVisualEffectView. 371 // If the window has a normal titlebar, then do not add NSVisualEffectView.
373 if (hasTitleBar) 372 if (hasTitleBar)
(...skipping 30 matching lines...) Expand all
404 [visualEffectView addSubview:tabStripBackgroundView_]; 403 [visualEffectView addSubview:tabStripBackgroundView_];
405 } 404 }
406 405
407 // Called when the size of the window content area has changed. Override to 406 // Called when the size of the window content area has changed. Override to
408 // position specific views. Base class implementation does nothing. 407 // position specific views. Base class implementation does nothing.
409 - (void)layoutSubviews { 408 - (void)layoutSubviews {
410 NOTIMPLEMENTED(); 409 NOTIMPLEMENTED();
411 } 410 }
412 411
413 @end 412 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_view.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698