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

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

Issue 22677002: Notify ThemeService via callback when supervised user is ready. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT and address nits. 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 76befd6661be937399eacb7a37ab859e3e59f917..97e0ec59387c5c3d8a00783667c0eabef9361289 100644
--- a/chrome/browser/ui/gtk/gtk_theme_service.cc
+++ b/chrome/browser/ui/gtk/gtk_theme_service.cc
@@ -17,6 +17,7 @@
#include "base/stl_util.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/themes/custom_theme_supplier.h"
#include "chrome/browser/themes/theme_properties.h"
#include "chrome/browser/themes/theme_service_factory.h"
#include "chrome/browser/ui/browser.h"
@@ -347,6 +348,7 @@ void GtkThemeService::InitThemesFor(content::NotificationObserver* observer) {
void GtkThemeService::SetTheme(const extensions::Extension* extension) {
profile()->GetPrefs()->SetBoolean(prefs::kUsesSystemTheme, false);
+ use_gtk_ = false;
LoadDefaultValues();
ThemeService::SetTheme(extension);
}
@@ -370,6 +372,14 @@ bool GtkThemeService::UsingDefaultTheme() const {
return !use_gtk_ && ThemeService::UsingDefaultTheme();
}
+void GtkThemeService::SetCustomDefaultTheme(
+ scoped_refptr<CustomThemeSupplier> theme_supplier) {
+ profile()->GetPrefs()->SetBoolean(prefs::kUsesSystemTheme, false);
+ use_gtk_ = false;
+ LoadDefaultValues();
+ ThemeService::SetCustomDefaultTheme(theme_supplier);
+}
+
bool GtkThemeService::ShouldInitWithNativeTheme() const {
return profile()->GetPrefs()->GetBoolean(prefs::kUsesSystemTheme);
}
« 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