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

Side by Side Diff: chrome/browser/themes/theme_service_aurax11.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: Don't call NotifyThemeChanged if not ready. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/themes/theme_service.cc ('k') | chrome/browser/themes/theme_service_aurax11.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_BROWSER_THEMES_THEME_SERVICE_AURAX11_H_ 5 #ifndef CHROME_BROWSER_THEMES_THEME_SERVICE_AURAX11_H_
6 #define CHROME_BROWSER_THEMES_THEME_SERVICE_AURAX11_H_ 6 #define CHROME_BROWSER_THEMES_THEME_SERVICE_AURAX11_H_
7 7
8 #include "base/prefs/pref_change_registrar.h"
9 #include "chrome/browser/themes/theme_service.h" 8 #include "chrome/browser/themes/theme_service.h"
10 9
11 // A subclass of ThemeService that queries the current ui::LinuxUI instance for 10 // A subclass of ThemeService that manages the CustomThemeSupplier which
12 // theme data. 11 // provides the native X11 theme.
13 class ThemeServiceAuraX11 : public ThemeService { 12 class ThemeServiceAuraX11 : public ThemeService {
14 public: 13 public:
15 ThemeServiceAuraX11(); 14 ThemeServiceAuraX11();
16 virtual ~ThemeServiceAuraX11(); 15 virtual ~ThemeServiceAuraX11();
17 16
18 // Overridden from ui::ThemeProvider:
19 virtual SkColor GetColor(int id) const OVERRIDE;
20 virtual bool HasCustomImage(int id) const OVERRIDE;
21
22 // Overridden from ThemeService: 17 // Overridden from ThemeService:
23 virtual void Init(Profile* profile) OVERRIDE; 18 virtual bool ShouldInitWithNativeTheme() const OVERRIDE;
24 virtual gfx::Image GetImageNamed(int id) const OVERRIDE;
25 virtual void SetTheme(const extensions::Extension* extension) OVERRIDE;
26 virtual void UseDefaultTheme() OVERRIDE;
27 virtual void SetNativeTheme() OVERRIDE; 19 virtual void SetNativeTheme() OVERRIDE;
28 virtual bool UsingDefaultTheme() const OVERRIDE; 20 virtual bool UsingDefaultTheme() const OVERRIDE;
29 virtual bool UsingNativeTheme() const OVERRIDE; 21 virtual bool UsingNativeTheme() const OVERRIDE;
30 22
31 private: 23 private:
32 void OnUsesSystemThemeChanged();
33
34 // Whether we'll give the ui::LinuxUI object first shot at providing theme
35 // resources.
36 bool use_system_theme_;
37
38 PrefChangeRegistrar registrar_;
39
40 DISALLOW_COPY_AND_ASSIGN(ThemeServiceAuraX11); 24 DISALLOW_COPY_AND_ASSIGN(ThemeServiceAuraX11);
41 }; 25 };
42 26
43 #endif // CHROME_BROWSER_THEMES_THEME_SERVICE_AURAX11_H_ 27 #endif // CHROME_BROWSER_THEMES_THEME_SERVICE_AURAX11_H_
OLDNEW
« no previous file with comments | « chrome/browser/themes/theme_service.cc ('k') | chrome/browser/themes/theme_service_aurax11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698