Index: chrome/browser/themes/theme_service.h |
diff --git a/chrome/browser/themes/theme_service.h b/chrome/browser/themes/theme_service.h |
index 7f4cf1e8f074ada397a488bab476f4f03260a51f..d9423f9ab276d23f172f17b0a39984b21763e500 100644 |
--- a/chrome/browser/themes/theme_service.h |
+++ b/chrome/browser/themes/theme_service.h |
@@ -215,6 +215,10 @@ class ThemeService : public base::NonThreadSafe, |
friend class BrowserThemeProvider; |
friend class theme_service_internal::ThemeServiceTest; |
+ // Key for cache of separator colors; pair is <tab color, frame color>. |
+ using SeparatorColorKey = std::pair<SkColor, SkColor>; |
+ using SeparatorColorCache = std::map<SeparatorColorKey, SkColor>; |
+ |
// These methods provide the implementation for ui::ThemeProvider (exposed |
// via BrowserThemeProvider). |
gfx::ImageSkia* GetImageSkiaNamed(int id, bool incognito) const; |
@@ -295,6 +299,10 @@ class ThemeService : public base::NonThreadSafe, |
// The number of infobars currently displayed. |
int number_of_infobars_; |
+ // A cache of already-computed values for COLOR_TOOLBAR_TOP_SEPARATOR, which |
+ // can be expensive to compute. |
+ mutable SeparatorColorCache separator_color_cache_; |
+ |
content::NotificationRegistrar registrar_; |
scoped_ptr<ThemeSyncableService> theme_syncable_service_; |