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

Unified Diff: chrome/browser/themes/theme_service.h

Issue 19471005: Add custom default theme support and create a managed user default theme. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix bugs. Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/themes/theme_service.h
diff --git a/chrome/browser/themes/theme_service.h b/chrome/browser/themes/theme_service.h
index b6d88696267ebb318459f68a2acea6dd0b853c27..8bbdc84047b74494e36b8350268ab1ad97af5452 100644
--- a/chrome/browser/themes/theme_service.h
+++ b/chrome/browser/themes/theme_service.h
@@ -19,6 +19,7 @@
#include "content/public/browser/notification_registrar.h"
#include "ui/base/theme_provider.h"
+class CustomThemeProvider;
class BrowserThemePack;
class ThemeServiceTest;
class ThemeSyncableService;
@@ -104,6 +105,10 @@ class ThemeService : public base::NonThreadSafe,
// ExtensionService.
virtual void SetTheme(const extensions::Extension* extension);
+ // Set a custom default theme instead of the normal default theme.
+ virtual void SetCustomDefaultTheme(
+ scoped_refptr<CustomThemeProvider> theme_provider);
+
// Reset the theme to default.
virtual void UseDefaultTheme();
@@ -167,6 +172,10 @@ class ThemeService : public base::NonThreadSafe,
void set_ready() { ready_ = true; }
+ const CustomThemeProvider* GetThemeProvider() const {
+ return theme_provider_.get();
+ }
+
private:
friend class ThemeServiceTest;
@@ -215,7 +224,7 @@ class ThemeService : public base::NonThreadSafe,
// ThemeSource no longer uses the ThemeService when it is not ready.
bool ready_;
- scoped_refptr<BrowserThemePack> theme_pack_;
+ scoped_refptr<CustomThemeProvider> theme_provider_;
// The number of infobars currently displayed.
int number_of_infobars_;

Powered by Google App Engine
This is Rietveld 408576698