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

Unified Diff: chrome/browser/themes/theme_service_mac.mm

Issue 2087893002: [cocoa] increase tab strip contrast in "Increase Contrast" mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix 10.9 detection & themeless windows 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
Index: chrome/browser/themes/theme_service_mac.mm
diff --git a/chrome/browser/themes/theme_service_mac.mm b/chrome/browser/themes/theme_service_mac.mm
index a5654b94eff35a438fc1f8dfdb8cf49d10a3d705..21d2fdc37daee434acc19999e047e4ea0eadf69c 100644
--- a/chrome/browser/themes/theme_service_mac.mm
+++ b/chrome/browser/themes/theme_service_mac.mm
@@ -17,6 +17,12 @@
#include "ui/gfx/color_utils.h"
#include "ui/gfx/image/image.h"
+@interface NSWorkspace (Redeclarations)
+
+@property(readonly) BOOL accessibilityDisplayShouldIncreaseContrast;
+
+@end
+
NSString* const kBrowserThemeDidChangeNotification =
@"BrowserThemeDidChangeNotification";
@@ -405,3 +411,13 @@ NSColor* ThemeService::BrowserThemeProvider::GetNSColorTint(int id) const {
NSGradient* ThemeService::BrowserThemeProvider::GetNSGradient(int id) const {
return theme_service_.GetNSGradient(id);
}
+
+bool ThemeService::BrowserThemeProvider::ShouldIncreaseContrast() const {
+ NSWorkspace* workspace = [NSWorkspace sharedWorkspace];
+ if ([workspace
+ respondsToSelector:@selector(
+ accessibilityDisplayShouldIncreaseContrast)]) {
+ return workspace.accessibilityDisplayShouldIncreaseContrast == YES;
+ }
+ return false;
+}
« no previous file with comments | « chrome/browser/themes/theme_service.h ('k') | chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698