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 // Sent whenever the browser theme changes. Object => NSValue wrapping the | 55 // Sent whenever the browser theme changes. Object => NSValue wrapping the |
56 // ThemeService that changed. | 56 // ThemeService that changed. |
57 extern "C" NSString* const kBrowserThemeDidChangeNotification; | 57 extern "C" NSString* const kBrowserThemeDidChangeNotification; |
58 #endif // __OBJC__ | 58 #endif // __OBJC__ |
59 | 59 |
60 class ThemeService : public base::NonThreadSafe, | 60 class ThemeService : public base::NonThreadSafe, |
61 public content::NotificationObserver, | 61 public content::NotificationObserver, |
62 public KeyedService { | 62 public KeyedService { |
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 // KeyedService: | 72 // KeyedService: |
73 void Shutdown() override; | 73 void Shutdown() override; |
74 | 74 |
75 // Overridden from content::NotificationObserver: | 75 // Overridden from content::NotificationObserver: |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 | 298 |
299 BrowserThemeProvider original_theme_provider_; | 299 BrowserThemeProvider original_theme_provider_; |
300 BrowserThemeProvider otr_theme_provider_; | 300 BrowserThemeProvider otr_theme_provider_; |
301 | 301 |
302 base::WeakPtrFactory<ThemeService> weak_ptr_factory_; | 302 base::WeakPtrFactory<ThemeService> weak_ptr_factory_; |
303 | 303 |
304 DISALLOW_COPY_AND_ASSIGN(ThemeService); | 304 DISALLOW_COPY_AND_ASSIGN(ThemeService); |
305 }; | 305 }; |
306 | 306 |
307 #endif // CHROME_BROWSER_THEMES_THEME_SERVICE_H_ | 307 #endif // CHROME_BROWSER_THEMES_THEME_SERVICE_H_ |
OLD | NEW |