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

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

Issue 2103073003: [Mac][Material Design] Use white tab spinner for dark themes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | 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_strip_controller.h" 5 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h"
6 6
7 #import <QuartzCore/QuartzCore.h> 7 #import <QuartzCore/QuartzCore.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <limits> 10 #include <limits>
(...skipping 1546 matching lines...) Expand 10 before | Expand all | Expand 10 after
1557 1557
1558 TabLoadingState oldState = [tabController loadingState]; 1558 TabLoadingState oldState = [tabController loadingState];
1559 TabLoadingState newState = kTabDone; 1559 TabLoadingState newState = kTabDone;
1560 NSImage* throbberImage = nil; 1560 NSImage* throbberImage = nil;
1561 if (contents->IsCrashed()) { 1561 if (contents->IsCrashed()) {
1562 newState = kTabCrashed; 1562 newState = kTabCrashed;
1563 newHasIcon = true; 1563 newHasIcon = true;
1564 } else if (contents->IsWaitingForResponse()) { 1564 } else if (contents->IsWaitingForResponse()) {
1565 newState = kTabWaiting; 1565 newState = kTabWaiting;
1566 if (ui::MaterialDesignController::IsModeMaterial() && 1566 if (ui::MaterialDesignController::IsModeMaterial() &&
1567 [[[tabController view] window] inIncognitoMode]) { 1567 [[[tabController view] window] hasDarkTheme]) {
1568 throbberImage = throbberWaitingIncognitoImage; 1568 throbberImage = throbberWaitingIncognitoImage;
1569 } else { 1569 } else {
1570 throbberImage = throbberWaitingImage; 1570 throbberImage = throbberWaitingImage;
1571 } 1571 }
1572 } else if (contents->IsLoadingToDifferentDocument()) { 1572 } else if (contents->IsLoadingToDifferentDocument()) {
1573 newState = kTabLoading; 1573 newState = kTabLoading;
1574 if (ui::MaterialDesignController::IsModeMaterial() && 1574 if (ui::MaterialDesignController::IsModeMaterial() &&
1575 [[[tabController view] window] inIncognitoMode]) { 1575 [[[tabController view] window] hasDarkTheme]) {
1576 throbberImage = throbberLoadingIncognitoImage; 1576 throbberImage = throbberLoadingIncognitoImage;
1577 } else { 1577 } else {
1578 throbberImage = throbberLoadingImage; 1578 throbberImage = throbberLoadingImage;
1579 } 1579 }
1580 } 1580 }
1581 1581
1582 if (oldState != newState) 1582 if (oldState != newState)
1583 [tabController setLoadingState:newState]; 1583 [tabController setLoadingState:newState];
1584 1584
1585 // While loading, this function is called repeatedly with the same state. 1585 // While loading, this function is called repeatedly with the same state.
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
2326 2326
2327 - (void)themeDidChangeNotification:(NSNotification*)notification { 2327 - (void)themeDidChangeNotification:(NSNotification*)notification {
2328 [newTabButton_ setImages]; 2328 [newTabButton_ setImages];
2329 } 2329 }
2330 2330
2331 - (void)setVisualEffectsDisabledForFullscreen:(BOOL)fullscreen { 2331 - (void)setVisualEffectsDisabledForFullscreen:(BOOL)fullscreen {
2332 [tabStripView_ setVisualEffectsDisabledForFullscreen:fullscreen]; 2332 [tabStripView_ setVisualEffectsDisabledForFullscreen:fullscreen];
2333 } 2333 }
2334 2334
2335 @end 2335 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698