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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 // ThemeService that changed. | 55 // ThemeService that changed. |
56 extern "C" NSString* const kBrowserThemeDidChangeNotification; | 56 extern "C" NSString* const kBrowserThemeDidChangeNotification; |
57 #endif // __OBJC__ | 57 #endif // __OBJC__ |
58 | 58 |
59 class ThemeService : public base::NonThreadSafe, | 59 class ThemeService : public base::NonThreadSafe, |
60 public content::NotificationObserver, | 60 public content::NotificationObserver, |
61 public KeyedService, | 61 public KeyedService, |
62 public ui::ThemeProvider { | 62 public ui::ThemeProvider { |
63 public: | 63 public: |
64 // Public constants used in ThemeService and its subclasses: | 64 // Public constants used in ThemeService and its subclasses: |
65 static const char* kDefaultThemeID; | 65 static const char kDefaultThemeID[]; |
66 | 66 |
67 ThemeService(); | 67 ThemeService(); |
68 ~ThemeService() override; | 68 ~ThemeService() override; |
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. |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 content::NotificationRegistrar registrar_; | 247 content::NotificationRegistrar registrar_; |
248 | 248 |
249 scoped_ptr<ThemeSyncableService> theme_syncable_service_; | 249 scoped_ptr<ThemeSyncableService> theme_syncable_service_; |
250 | 250 |
251 base::WeakPtrFactory<ThemeService> weak_ptr_factory_; | 251 base::WeakPtrFactory<ThemeService> weak_ptr_factory_; |
252 | 252 |
253 DISALLOW_COPY_AND_ASSIGN(ThemeService); | 253 DISALLOW_COPY_AND_ASSIGN(ThemeService); |
254 }; | 254 }; |
255 | 255 |
256 #endif // CHROME_BROWSER_THEMES_THEME_SERVICE_H_ | 256 #endif // CHROME_BROWSER_THEMES_THEME_SERVICE_H_ |
OLD | NEW |