| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/themes/theme_service_aurax11.h" | 5 #include "chrome/browser/themes/theme_service_aurax11.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/themes/custom_theme_supplier.h" | 10 #include "chrome/browser/themes/custom_theme_supplier.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 ThemeServiceAuraX11::~ThemeServiceAuraX11() {} | 75 ThemeServiceAuraX11::~ThemeServiceAuraX11() {} |
| 76 | 76 |
| 77 bool ThemeServiceAuraX11::ShouldInitWithSystemTheme() const { | 77 bool ThemeServiceAuraX11::ShouldInitWithSystemTheme() const { |
| 78 return profile()->GetPrefs()->GetBoolean(prefs::kUsesSystemTheme); | 78 return profile()->GetPrefs()->GetBoolean(prefs::kUsesSystemTheme); |
| 79 } | 79 } |
| 80 | 80 |
| 81 void ThemeServiceAuraX11::UseSystemTheme() { | 81 void ThemeServiceAuraX11::UseSystemTheme() { |
| 82 SetCustomDefaultTheme(new SystemThemeX11(profile()->GetPrefs())); | 82 SetCustomDefaultTheme(new SystemThemeX11(profile()->GetPrefs())); |
| 83 } | 83 } |
| 84 | 84 |
| 85 bool ThemeServiceAuraX11::IsSystemThemeDistinctFromDefaultTheme() const { |
| 86 return true; |
| 87 } |
| 88 |
| 85 bool ThemeServiceAuraX11::UsingDefaultTheme() const { | 89 bool ThemeServiceAuraX11::UsingDefaultTheme() const { |
| 86 return ThemeService::UsingDefaultTheme() && !UsingSystemTheme(); | 90 return ThemeService::UsingDefaultTheme() && !UsingSystemTheme(); |
| 87 } | 91 } |
| 88 | 92 |
| 89 bool ThemeServiceAuraX11::UsingSystemTheme() const { | 93 bool ThemeServiceAuraX11::UsingSystemTheme() const { |
| 90 const CustomThemeSupplier* theme_supplier = get_theme_supplier(); | 94 const CustomThemeSupplier* theme_supplier = get_theme_supplier(); |
| 91 return theme_supplier && | 95 return theme_supplier && |
| 92 theme_supplier->get_theme_type() == CustomThemeSupplier::NATIVE_X11; | 96 theme_supplier->get_theme_type() == CustomThemeSupplier::NATIVE_X11; |
| 93 } | 97 } |
| OLD | NEW |