| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CUSTOM_THEME_SUPPLIER_H_ | 5 #ifndef CHROME_BROWSER_THEMES_CUSTOM_THEME_SUPPLIER_H_ |
| 6 #define CHROME_BROWSER_THEMES_CUSTOM_THEME_SUPPLIER_H_ | 6 #define CHROME_BROWSER_THEMES_CUSTOM_THEME_SUPPLIER_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "content/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
| 10 #include "third_party/skia/include/core/SkColor.h" | 10 #include "third_party/skia/include/core/SkColor.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 // A representation of a theme. All theme properties can be accessed through the | 25 // A representation of a theme. All theme properties can be accessed through the |
| 26 // public methods. Subclasses are expected to override all methods which should | 26 // public methods. Subclasses are expected to override all methods which should |
| 27 // provide non-default values. | 27 // provide non-default values. |
| 28 class CustomThemeSupplier : public base::RefCountedThreadSafe< | 28 class CustomThemeSupplier : public base::RefCountedThreadSafe< |
| 29 CustomThemeSupplier, content::BrowserThread::DeleteOnFileThread> { | 29 CustomThemeSupplier, content::BrowserThread::DeleteOnFileThread> { |
| 30 public: | 30 public: |
| 31 enum ThemeType { | 31 enum ThemeType { |
| 32 EXTENSION, | 32 EXTENSION, |
| 33 NATIVE_X11, | 33 NATIVE_X11, |
| 34 MANAGED_USER_THEME, | 34 SUPERVISED_USER_THEME, |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 explicit CustomThemeSupplier(ThemeType type); | 37 explicit CustomThemeSupplier(ThemeType type); |
| 38 | 38 |
| 39 ThemeType get_theme_type() const { | 39 ThemeType get_theme_type() const { |
| 40 return theme_type_; | 40 return theme_type_; |
| 41 } | 41 } |
| 42 | 42 |
| 43 // Called when the theme starts being used. | 43 // Called when the theme starts being used. |
| 44 virtual void StartUsingTheme(); | 44 virtual void StartUsingTheme(); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 73 friend struct content::BrowserThread::DeleteOnThread< | 73 friend struct content::BrowserThread::DeleteOnThread< |
| 74 content::BrowserThread::FILE>; | 74 content::BrowserThread::FILE>; |
| 75 friend class base::DeleteHelper<CustomThemeSupplier>; | 75 friend class base::DeleteHelper<CustomThemeSupplier>; |
| 76 | 76 |
| 77 ThemeType theme_type_; | 77 ThemeType theme_type_; |
| 78 | 78 |
| 79 DISALLOW_COPY_AND_ASSIGN(CustomThemeSupplier); | 79 DISALLOW_COPY_AND_ASSIGN(CustomThemeSupplier); |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 #endif // CHROME_BROWSER_THEMES_CUSTOM_THEME_SUPPLIER_H_ | 82 #endif // CHROME_BROWSER_THEMES_CUSTOM_THEME_SUPPLIER_H_ |
| OLD | NEW |