| 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 <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 // This class implements ui::ThemeProvider on behalf of ThemeService and keeps | 183 // This class implements ui::ThemeProvider on behalf of ThemeService and keeps |
| 184 // track of the incognito state of the calling code. | 184 // track of the incognito state of the calling code. |
| 185 class BrowserThemeProvider : public ui::ThemeProvider { | 185 class BrowserThemeProvider : public ui::ThemeProvider { |
| 186 public: | 186 public: |
| 187 BrowserThemeProvider(const ThemeService& theme_service, bool incognito); | 187 BrowserThemeProvider(const ThemeService& theme_service, bool incognito); |
| 188 ~BrowserThemeProvider() override; | 188 ~BrowserThemeProvider() override; |
| 189 | 189 |
| 190 // Overridden from ui::ThemeProvider: | 190 // Overridden from ui::ThemeProvider: |
| 191 gfx::ImageSkia* GetImageSkiaNamed(int id) const override; | 191 gfx::ImageSkia* GetImageSkiaNamed(int id) const override; |
| 192 SkColor GetColor(int original_id) const override; | 192 SkColor GetColor(int original_id) const override; |
| 193 color_utils::HSL GetTint(int original_id) const override; |
| 193 int GetDisplayProperty(int id) const override; | 194 int GetDisplayProperty(int id) const override; |
| 194 bool ShouldUseNativeFrame() const override; | 195 bool ShouldUseNativeFrame() const override; |
| 195 bool HasCustomImage(int id) const override; | 196 bool HasCustomImage(int id) const override; |
| 196 base::RefCountedMemory* GetRawData(int id, ui::ScaleFactor scale_factor) | 197 base::RefCountedMemory* GetRawData(int id, ui::ScaleFactor scale_factor) |
| 197 const override; | 198 const override; |
| 198 #if defined(OS_MACOSX) | 199 #if defined(OS_MACOSX) |
| 199 bool UsingSystemTheme() const override; | 200 bool UsingSystemTheme() const override; |
| 200 bool InIncognitoMode() const override; | 201 bool InIncognitoMode() const override; |
| 201 bool HasCustomColor(int id) const override; | 202 bool HasCustomColor(int id) const override; |
| 202 NSImage* GetNSImageNamed(int id) const override; | 203 NSImage* GetNSImageNamed(int id) const override; |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 | 326 |
| 326 BrowserThemeProvider original_theme_provider_; | 327 BrowserThemeProvider original_theme_provider_; |
| 327 BrowserThemeProvider incognito_theme_provider_; | 328 BrowserThemeProvider incognito_theme_provider_; |
| 328 | 329 |
| 329 base::WeakPtrFactory<ThemeService> weak_ptr_factory_; | 330 base::WeakPtrFactory<ThemeService> weak_ptr_factory_; |
| 330 | 331 |
| 331 DISALLOW_COPY_AND_ASSIGN(ThemeService); | 332 DISALLOW_COPY_AND_ASSIGN(ThemeService); |
| 332 }; | 333 }; |
| 333 | 334 |
| 334 #endif // CHROME_BROWSER_THEMES_THEME_SERVICE_H_ | 335 #endif // CHROME_BROWSER_THEMES_THEME_SERVICE_H_ |
| OLD | NEW |