Chromium Code Reviews| 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 53378609ccdd332607c100d01bc87f7cac4f0fdf..669ecf17dec94697421476da9fc7e86d72728ca5 100644 |
| --- a/chrome/browser/ui/gtk/gtk_theme_service.cc |
| +++ b/chrome/browser/ui/gtk/gtk_theme_service.cc |
| @@ -309,14 +309,6 @@ gfx::ImageSkia* GtkThemeService::GetImageSkiaNamed(int id) const { |
| } |
| gfx::Image GtkThemeService::GetImageNamed(int id) const { |
| - // TODO(akuegel): Remove this once we have the default managed user theme. |
| - if (ManagedUserService::ProfileIsManaged(profile())) { |
| - if (id == IDR_THEME_FRAME) |
| - id = IDR_MANAGED_USER_THEME_FRAME; |
| - else if (id == IDR_THEME_FRAME_INACTIVE) |
| - id = IDR_MANAGED_USER_THEME_FRAME_INACTIVE; |
| - } |
| - |
| // Try to get our cached version: |
| ImageCache::const_iterator it = gtk_images_.find(id); |
| if (it != gtk_images_.end()) |
| @@ -333,14 +325,6 @@ gfx::Image GtkThemeService::GetImageNamed(int id) const { |
| } |
| SkColor GtkThemeService::GetColor(int id) const { |
| - // TODO(akuegel): Remove this once we have the default managed user theme. |
| - if (ManagedUserService::ProfileIsManaged(profile())) { |
| - if (id == ThemeProperties::COLOR_FRAME) |
| - id = ThemeProperties::COLOR_FRAME_MANAGED_USER; |
| - else if (id == ThemeProperties::COLOR_FRAME_INACTIVE) |
| - id = ThemeProperties::COLOR_FRAME_MANAGED_USER_INACTIVE; |
| - } |
| - |
| if (use_gtk_) { |
| ColorMap::const_iterator it = colors_.find(id); |
| if (it != colors_.end()) |
| @@ -386,6 +370,10 @@ bool GtkThemeService::UsingDefaultTheme() const { |
| return !use_gtk_ && ThemeService::UsingDefaultTheme(); |
| } |
| +bool GtkThemeService::ShouldInitWithNativeTheme() { |
| + return profile()->GetPrefs()->GetBoolean(prefs::kUsesSystemTheme); |
| +} |
| + |
| bool GtkThemeService::UsingNativeTheme() const { |
| return use_gtk_; |
| } |
| @@ -650,13 +638,8 @@ void GtkThemeService::ClearAllThemeData() { |
| } |
| void GtkThemeService::LoadThemePrefs() { |
| - if (use_gtk_) { |
| - LoadGtkValues(); |
| - set_ready(); |
|
Elliot Glaysher
2013/07/23 19:57:31
How does |ready_| get set? What are the implicatio
Adrian Kuegel
2013/07/24 12:31:35
Thanks for looking so closely at this. I have miss
|
| - } else { |
| - LoadDefaultValues(); |
| - ThemeService::LoadThemePrefs(); |
| - } |
| + // This takes care of calling SetNativeTheme() if necessary. |
| + ThemeService::LoadThemePrefs(); |
| SetXDGIconTheme(); |
| RebuildMenuIconSets(); |