| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_THEME_PROPERTIES_H_ | 5 #ifndef CHROME_BROWSER_THEMES_THEME_PROPERTIES_H_ |
| 6 #define CHROME_BROWSER_THEMES_THEME_PROPERTIES_H_ | 6 #define CHROME_BROWSER_THEMES_THEME_PROPERTIES_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 static int StringToTiling(const std::string& tiling); | 122 static int StringToTiling(const std::string& tiling); |
| 123 | 123 |
| 124 // Converts a bitmask of Alignment into a string like "top left". The result | 124 // Converts a bitmask of Alignment into a string like "top left". The result |
| 125 // is used to generate a CSS value. | 125 // is used to generate a CSS value. |
| 126 static std::string AlignmentToString(int alignment); | 126 static std::string AlignmentToString(int alignment); |
| 127 | 127 |
| 128 // Converts a Tiling into a string like "no-repeat". The result is used to | 128 // Converts a Tiling into a string like "no-repeat". The result is used to |
| 129 // generate a CSS value. | 129 // generate a CSS value. |
| 130 static std::string TilingToString(int tiling); | 130 static std::string TilingToString(int tiling); |
| 131 | 131 |
| 132 // Returns true if the image is themeable. | |
| 133 static bool IsThemeableImage(int resource_id); | |
| 134 | |
| 135 // Returns the set of IDR_* resources that should be tinted. | 132 // Returns the set of IDR_* resources that should be tinted. |
| 136 // This method is not thread safe. | 133 // This method is not thread safe. |
| 137 static const std::set<int>& GetTintableToolbarButtons(); | 134 static const std::set<int>& GetTintableToolbarButtons(); |
| 138 | 135 |
| 139 // Returns the default tint for the given tint |id| TINT_* enum value. | 136 // Returns the default tint for the given tint |id| TINT_* enum value. |
| 140 // Returns an HSL value of {-1, -1, -1} if |id| is invalid. | 137 // Returns an HSL value of {-1, -1, -1} if |id| is invalid. |
| 141 static color_utils::HSL GetDefaultTint(int id); | 138 static color_utils::HSL GetDefaultTint(int id); |
| 142 | 139 |
| 143 // Returns the default color for the given color |id| COLOR_* enum value. | 140 // Returns the default color for the given color |id| COLOR_* enum value. |
| 144 // Returns SK_ColorRED if |id| is invalid. | 141 // Returns SK_ColorRED if |id| is invalid. |
| 145 static SkColor GetDefaultColor(int id); | 142 static SkColor GetDefaultColor(int id); |
| 146 | 143 |
| 147 // Returns the default value for the given property |id|. Returns -1 if |id| | 144 // Returns the default value for the given property |id|. Returns -1 if |id| |
| 148 // is invalid. | 145 // is invalid. |
| 149 static int GetDefaultDisplayProperty(int id); | 146 static int GetDefaultDisplayProperty(int id); |
| 150 | 147 |
| 151 private: | 148 private: |
| 152 DISALLOW_IMPLICIT_CONSTRUCTORS(ThemeProperties); | 149 DISALLOW_IMPLICIT_CONSTRUCTORS(ThemeProperties); |
| 153 }; | 150 }; |
| 154 | 151 |
| 155 #endif // CHROME_BROWSER_THEMES_THEME_PROPERTIES_H_ | 152 #endif // CHROME_BROWSER_THEMES_THEME_PROPERTIES_H_ |
| OLD | NEW |