| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_H_ | 5 #ifndef CHROME_BROWSER_THEMES_THEME_SERVICE_H_ |
| 6 #define CHROME_BROWSER_THEMES_THEME_SERVICE_H_ | 6 #define CHROME_BROWSER_THEMES_THEME_SERVICE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 virtual void Init(Profile* profile); | 70 virtual void Init(Profile* profile); |
| 71 | 71 |
| 72 // Returns a cross platform image for an id. | 72 // Returns a cross platform image for an id. |
| 73 // | 73 // |
| 74 // TODO(erg): Make this part of the ui::ThemeProvider and the main way to get | 74 // TODO(erg): Make this part of the ui::ThemeProvider and the main way to get |
| 75 // theme properties out of the theme provider since it's cross platform. | 75 // theme properties out of the theme provider since it's cross platform. |
| 76 virtual gfx::Image GetImageNamed(int id) const; | 76 virtual gfx::Image GetImageNamed(int id) const; |
| 77 | 77 |
| 78 // Overridden from ui::ThemeProvider: | 78 // Overridden from ui::ThemeProvider: |
| 79 virtual bool UsingSystemTheme() const OVERRIDE; | 79 virtual bool UsingSystemTheme() const override; |
| 80 virtual gfx::ImageSkia* GetImageSkiaNamed(int id) const OVERRIDE; | 80 virtual gfx::ImageSkia* GetImageSkiaNamed(int id) const override; |
| 81 virtual SkColor GetColor(int id) const OVERRIDE; | 81 virtual SkColor GetColor(int id) const override; |
| 82 virtual int GetDisplayProperty(int id) const OVERRIDE; | 82 virtual int GetDisplayProperty(int id) const override; |
| 83 virtual bool ShouldUseNativeFrame() const OVERRIDE; | 83 virtual bool ShouldUseNativeFrame() const override; |
| 84 virtual bool HasCustomImage(int id) const OVERRIDE; | 84 virtual bool HasCustomImage(int id) const override; |
| 85 virtual base::RefCountedMemory* GetRawData( | 85 virtual base::RefCountedMemory* GetRawData( |
| 86 int id, | 86 int id, |
| 87 ui::ScaleFactor scale_factor) const OVERRIDE; | 87 ui::ScaleFactor scale_factor) const override; |
| 88 #if defined(OS_MACOSX) | 88 #if defined(OS_MACOSX) |
| 89 virtual NSImage* GetNSImageNamed(int id) const OVERRIDE; | 89 virtual NSImage* GetNSImageNamed(int id) const override; |
| 90 virtual NSColor* GetNSImageColorNamed(int id) const OVERRIDE; | 90 virtual NSColor* GetNSImageColorNamed(int id) const override; |
| 91 virtual NSColor* GetNSColor(int id) const OVERRIDE; | 91 virtual NSColor* GetNSColor(int id) const override; |
| 92 virtual NSColor* GetNSColorTint(int id) const OVERRIDE; | 92 virtual NSColor* GetNSColorTint(int id) const override; |
| 93 virtual NSGradient* GetNSGradient(int id) const OVERRIDE; | 93 virtual NSGradient* GetNSGradient(int id) const override; |
| 94 #endif | 94 #endif |
| 95 | 95 |
| 96 // Overridden from content::NotificationObserver: | 96 // Overridden from content::NotificationObserver: |
| 97 virtual void Observe(int type, | 97 virtual void Observe(int type, |
| 98 const content::NotificationSource& source, | 98 const content::NotificationSource& source, |
| 99 const content::NotificationDetails& details) OVERRIDE; | 99 const content::NotificationDetails& details) override; |
| 100 | 100 |
| 101 // Set the current theme to the theme defined in |extension|. | 101 // Set the current theme to the theme defined in |extension|. |
| 102 // |extension| must already be added to this profile's | 102 // |extension| must already be added to this profile's |
| 103 // ExtensionService. | 103 // ExtensionService. |
| 104 virtual void SetTheme(const extensions::Extension* extension); | 104 virtual void SetTheme(const extensions::Extension* extension); |
| 105 | 105 |
| 106 // Reset the theme to default. | 106 // Reset the theme to default. |
| 107 virtual void UseDefaultTheme(); | 107 virtual void UseDefaultTheme(); |
| 108 | 108 |
| 109 // Set the current theme to the system theme. On some platforms, the system | 109 // Set the current theme to the system theme. On some platforms, the system |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 content::NotificationRegistrar registrar_; | 248 content::NotificationRegistrar registrar_; |
| 249 | 249 |
| 250 scoped_ptr<ThemeSyncableService> theme_syncable_service_; | 250 scoped_ptr<ThemeSyncableService> theme_syncable_service_; |
| 251 | 251 |
| 252 base::WeakPtrFactory<ThemeService> weak_ptr_factory_; | 252 base::WeakPtrFactory<ThemeService> weak_ptr_factory_; |
| 253 | 253 |
| 254 DISALLOW_COPY_AND_ASSIGN(ThemeService); | 254 DISALLOW_COPY_AND_ASSIGN(ThemeService); |
| 255 }; | 255 }; |
| 256 | 256 |
| 257 #endif // CHROME_BROWSER_THEMES_THEME_SERVICE_H_ | 257 #endif // CHROME_BROWSER_THEMES_THEME_SERVICE_H_ |
| OLD | NEW |