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

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

Issue 1492423003: Rejigger ThemeService: move exposure of ThemeProvider interface to a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix that unittest Created 5 years 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/themes/theme_service_browsertest.cc ('k') | chrome/browser/themes/theme_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 061e5137244ef74ebc20ac74f313d6397978968d..371df94527d1c8705668c2483113e4a86f07374e 100644
--- a/chrome/browser/themes/theme_service_mac.mm
+++ b/chrome/browser/themes/theme_service_mac.mm
@@ -112,7 +112,7 @@ NSColor* ThemeService::GetNSColor(int id) const {
if (nscolor_iter != nscolor_cache_.end())
return nscolor_iter->second;
- SkColor sk_color = GetColor(id);
+ SkColor sk_color = GetColor(id, false);
NSColor* color = skia::SkColorToCalibratedNSColor(sk_color);
// We loaded successfully. Cache the color.
@@ -286,3 +286,28 @@ void ThemeService::FreePlatformCaches() {
}
nsgradient_cache_.clear();
}
+
+bool ThemeService::BrowserThemeProvider::UsingSystemTheme() const {
+ return theme_service_.UsingSystemTheme();
+}
+
+NSImage* ThemeService::BrowserThemeProvider::GetNSImageNamed(int id) const {
+ return theme_service_.GetNSImageNamed(id);
+}
+
+NSColor* ThemeService::BrowserThemeProvider::GetNSImageColorNamed(
+ int id) const {
+ return theme_service_.GetNSImageColorNamed(id);
+}
+
+NSColor* ThemeService::BrowserThemeProvider::GetNSColor(int id) const {
+ return theme_service_.GetNSColor(id);
+}
+
+NSColor* ThemeService::BrowserThemeProvider::GetNSColorTint(int id) const {
+ return theme_service_.GetNSColorTint(id);
+}
+
+NSGradient* ThemeService::BrowserThemeProvider::GetNSGradient(int id) const {
+ return theme_service_.GetNSGradient(id);
+}
« no previous file with comments | « chrome/browser/themes/theme_service_browsertest.cc ('k') | chrome/browser/themes/theme_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698