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

Unified Diff: chrome/browser/themes/theme_service_aurax11.cc

Issue 244893004: Improve some naming (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
Index: chrome/browser/themes/theme_service_aurax11.cc
diff --git a/chrome/browser/themes/theme_service_aurax11.cc b/chrome/browser/themes/theme_service_aurax11.cc
index 7da0336070fa5bc8861cfa8d210314a9dfb097ef..cb5040c4d98aec9dd4874613f57ccced967ca3cb 100644
--- a/chrome/browser/themes/theme_service_aurax11.cc
+++ b/chrome/browser/themes/theme_service_aurax11.cc
@@ -14,9 +14,9 @@
namespace {
-class NativeThemeX11 : public CustomThemeSupplier {
+class SystemThemeX11 : public CustomThemeSupplier {
public:
- explicit NativeThemeX11(PrefService* pref_service);
+ explicit SystemThemeX11(PrefService* pref_service);
// Overridden from CustomThemeSupplier:
virtual void StartUsingTheme() OVERRIDE;
@@ -26,75 +26,75 @@ class NativeThemeX11 : public CustomThemeSupplier {
virtual bool HasCustomImage(int id) const OVERRIDE;
private:
- virtual ~NativeThemeX11();
+ virtual ~SystemThemeX11();
// These pointers are not owned by us.
views::LinuxUI* const linux_ui_;
PrefService* const pref_service_;
- DISALLOW_COPY_AND_ASSIGN(NativeThemeX11);
+ DISALLOW_COPY_AND_ASSIGN(SystemThemeX11);
};
-NativeThemeX11::NativeThemeX11(PrefService* pref_service)
+SystemThemeX11::SystemThemeX11(PrefService* pref_service)
: CustomThemeSupplier(NATIVE_X11),
linux_ui_(views::LinuxUI::instance()),
pref_service_(pref_service) {}
-void NativeThemeX11::StartUsingTheme() {
+void SystemThemeX11::StartUsingTheme() {
pref_service_->SetBoolean(prefs::kUsesSystemTheme, true);
}
-void NativeThemeX11::StopUsingTheme() {
+void SystemThemeX11::StopUsingTheme() {
pref_service_->SetBoolean(prefs::kUsesSystemTheme, false);
}
-bool NativeThemeX11::GetColor(int id, SkColor* color) const {
+bool SystemThemeX11::GetColor(int id, SkColor* color) const {
return linux_ui_ && linux_ui_->GetColor(id, color);
}
-gfx::Image NativeThemeX11::GetImageNamed(int id) {
+gfx::Image SystemThemeX11::GetImageNamed(int id) {
return linux_ui_ ? linux_ui_->GetThemeImageNamed(id) : gfx::Image();
}
-bool NativeThemeX11::HasCustomImage(int id) const {
+bool SystemThemeX11::HasCustomImage(int id) const {
return linux_ui_ && linux_ui_->HasCustomImage(id);
}
-NativeThemeX11::~NativeThemeX11() {}
+SystemThemeX11::~SystemThemeX11() {}
} // namespace
ThemeServiceAuraX11::ThemeServiceAuraX11() {
views::LinuxUI* linux_ui = views::LinuxUI::instance();
if (linux_ui)
- linux_ui->AddNativeThemeChangeObserver(this);
+ linux_ui->AddSystemThemeChangeObserver(this);
}
ThemeServiceAuraX11::~ThemeServiceAuraX11() {
views::LinuxUI* linux_ui = views::LinuxUI::instance();
if (linux_ui)
- linux_ui->RemoveNativeThemeChangeObserver(this);
+ linux_ui->RemoveSystemThemeChangeObserver(this);
}
-bool ThemeServiceAuraX11::ShouldInitWithNativeTheme() const {
+bool ThemeServiceAuraX11::ShouldInitWithSystemTheme() const {
return profile()->GetPrefs()->GetBoolean(prefs::kUsesSystemTheme);
}
-void ThemeServiceAuraX11::SetNativeTheme() {
- SetCustomDefaultTheme(new NativeThemeX11(profile()->GetPrefs()));
+void ThemeServiceAuraX11::UseSystemTheme() {
+ SetCustomDefaultTheme(new SystemThemeX11(profile()->GetPrefs()));
}
bool ThemeServiceAuraX11::UsingDefaultTheme() const {
- return ThemeService::UsingDefaultTheme() && !UsingNativeTheme();
+ return ThemeService::UsingDefaultTheme() && !UsingSystemTheme();
}
-bool ThemeServiceAuraX11::UsingNativeTheme() const {
+bool ThemeServiceAuraX11::UsingSystemTheme() const {
const CustomThemeSupplier* theme_supplier = get_theme_supplier();
return theme_supplier &&
theme_supplier->get_theme_type() == CustomThemeSupplier::NATIVE_X11;
}
-void ThemeServiceAuraX11::OnNativeThemeChanged() {
- if (UsingNativeTheme())
+void ThemeServiceAuraX11::OnSystemThemeChanged() {
+ if (UsingSystemTheme())
msw 2014/04/22 18:02:13 NotifyThemeChanged should be called regardless of
Evan Stade 2014/04/22 18:16:06 Yea, I noticed that, but there's also a difference
NotifyThemeChanged();
}

Powered by Google App Engine
This is Rietveld 408576698