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

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

Issue 17494005: linux_aura: Three fixes for switching themes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to tot Created 7 years, 6 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/themes/theme_service.cc ('k') | chrome/browser/themes/theme_service_aurax11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/themes/theme_service_aurax11.h
diff --git a/chrome/browser/themes/theme_service_aurax11.h b/chrome/browser/themes/theme_service_aurax11.h
new file mode 100644
index 0000000000000000000000000000000000000000..0279d84616f3bb80c1061d6d4f14e6058b645ecb
--- /dev/null
+++ b/chrome/browser/themes/theme_service_aurax11.h
@@ -0,0 +1,43 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_THEMES_THEME_SERVICE_AURAX11_H_
+#define CHROME_BROWSER_THEMES_THEME_SERVICE_AURAX11_H_
+
+#include "base/prefs/pref_change_registrar.h"
+#include "chrome/browser/themes/theme_service.h"
+
+// A subclass of ThemeService that queries the current ui::LinuxUI instance for
+// theme data.
+class ThemeServiceAuraX11 : public ThemeService {
+ public:
+ ThemeServiceAuraX11();
+ virtual ~ThemeServiceAuraX11();
+
+ // Overridden from ui::ThemeProvider:
+ virtual SkColor GetColor(int id) const OVERRIDE;
+ virtual bool HasCustomImage(int id) const OVERRIDE;
+
+ // Overridden from ThemeService:
+ virtual void Init(Profile* profile) OVERRIDE;
+ virtual gfx::Image GetImageNamed(int id) const OVERRIDE;
+ virtual void SetTheme(const extensions::Extension* extension) OVERRIDE;
+ virtual void UseDefaultTheme() OVERRIDE;
+ virtual void SetNativeTheme() OVERRIDE;
+ virtual bool UsingDefaultTheme() const OVERRIDE;
+ virtual bool UsingNativeTheme() const OVERRIDE;
+
+ private:
+ void OnUsesSystemThemeChanged();
+
+ // Whether we'll give the ui::LinuxUI object first shot at providing theme
+ // resources.
+ bool use_system_theme_;
+
+ PrefChangeRegistrar registrar_;
+
+ DISALLOW_COPY_AND_ASSIGN(ThemeServiceAuraX11);
+};
+
+#endif // CHROME_BROWSER_THEMES_THEME_SERVICE_AURAX11_H_
« 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