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

Unified Diff: chrome/browser/ui/gtk/gtk_theme_service.cc

Issue 22578004: Check if theme is ready. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. Created 7 years, 4 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/browser/ui/gtk/gtk_theme_service.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/gtk_theme_service.cc
diff --git a/chrome/browser/ui/gtk/gtk_theme_service.cc b/chrome/browser/ui/gtk/gtk_theme_service.cc
index e2272c40a693b29afb5bd83b567c5c55944bad2a..76befd6661be937399eacb7a37ab859e3e59f917 100644
--- a/chrome/browser/ui/gtk/gtk_theme_service.cc
+++ b/chrome/browser/ui/gtk/gtk_theme_service.cc
@@ -630,13 +630,6 @@ bool GtkThemeService::DefaultUsesSystemTheme() {
return false;
}
-void GtkThemeService::ClearAllThemeData() {
- colors_.clear();
- tints_.clear();
-
- ThemeService::ClearAllThemeData();
-}
-
void GtkThemeService::LoadThemePrefs() {
// Initialize the values sent to webkit with the default values.
// ThemeService::LoadThemePrefs() will replace them with values for the native
@@ -651,6 +644,9 @@ void GtkThemeService::LoadThemePrefs() {
}
void GtkThemeService::NotifyThemeChanged() {
+ if (!ready_)
+ return;
+
ThemeService::NotifyThemeChanged();
// Notify all GtkChromeButtons of their new rendering mode:
@@ -683,6 +679,8 @@ void GtkThemeService::NotifyThemeChanged() {
}
void GtkThemeService::FreePlatformCaches() {
+ colors_.clear();
+ tints_.clear();
ThemeService::FreePlatformCaches();
STLDeleteValues(&gtk_images_);
}
« no previous file with comments | « chrome/browser/ui/gtk/gtk_theme_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698