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

Side by Side Diff: chrome/browser/themes/theme_service_aurax11.cc

Issue 388563004: Fix syncing of system theme on Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/themes/theme_service_aurax11.h ('k') | chrome/browser/themes/theme_syncable_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698