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

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

Issue 2092193004: [Mac][Material Design] Add temporary spinner for Incognito mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/app/theme/theme_resources.grd ('k') | no next file » | 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 2b17c49b8c3984361d84281378a1a0c0632072ac..511ad7e3402526b67da908d231718503fd3aab53 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
@@ -40,6 +40,7 @@
#import "chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.h"
#import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h"
#import "chrome/browser/ui/cocoa/tabs/tab_view.h"
+#import "chrome/browser/ui/cocoa/themed_window.h"
#include "chrome/browser/ui/find_bar/find_bar.h"
#include "chrome/browser/ui/find_bar/find_bar_controller.h"
#include "chrome/browser/ui/find_bar/find_tab_helper.h"
@@ -1531,9 +1532,15 @@ private:
static NSImage* throbberWaitingImage =
ResourceBundle::GetSharedInstance().GetNativeImageNamed(
IDR_THROBBER_WAITING).CopyNSImage();
+ static NSImage* throbberWaitingIncognitoImage =
+ ResourceBundle::GetSharedInstance().GetNativeImageNamed(
+ IDR_THROBBER_WAITING_INCOGNITO).CopyNSImage();
static NSImage* throbberLoadingImage =
ResourceBundle::GetSharedInstance().GetNativeImageNamed(
IDR_THROBBER).CopyNSImage();
+ static NSImage* throbberLoadingIncognitoImage =
+ ResourceBundle::GetSharedInstance().GetNativeImageNamed(
+ IDR_THROBBER_INCOGNITO).CopyNSImage();
static NSImage* sadFaviconImage =
ResourceBundle::GetSharedInstance()
.GetNativeImageNamed(IDR_CRASH_SAD_FAVICON)
@@ -1556,10 +1563,20 @@ private:
newHasIcon = true;
} else if (contents->IsWaitingForResponse()) {
newState = kTabWaiting;
- throbberImage = throbberWaitingImage;
+ if (ui::MaterialDesignController::IsModeMaterial() &&
+ [[[tabController view] window] inIncognitoMode]) {
+ throbberImage = throbberWaitingIncognitoImage;
+ } else {
+ throbberImage = throbberWaitingImage;
+ }
} else if (contents->IsLoadingToDifferentDocument()) {
newState = kTabLoading;
- throbberImage = throbberLoadingImage;
+ if (ui::MaterialDesignController::IsModeMaterial() &&
+ [[[tabController view] window] inIncognitoMode]) {
+ throbberImage = throbberLoadingIncognitoImage;
+ } else {
+ throbberImage = throbberLoadingImage;
+ }
}
if (oldState != newState)
« no previous file with comments | « chrome/app/theme/theme_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698