Chromium Code Reviews| 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 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
| 13 #include "third_party/skia/include/core/SkColor.h" | 13 #include "third_party/skia/include/core/SkColor.h" |
| 14 #include "ui/gfx/color_utils.h" | 14 #include "ui/gfx/color_utils.h" |
| 15 | 15 |
| 16 // Static only class for querying which properties / images are themeable and | 16 // Static only class for querying which properties / images are themeable and |
| 17 // the defaults of these properties. | 17 // the defaults of these properties. |
| 18 // All methods are thread safe unless indicated otherwise. | 18 // All methods are thread safe unless indicated otherwise. |
| 19 class ThemeProperties { | 19 class ThemeProperties { |
| 20 public: | 20 public: |
| 21 // --------------------------------------------------------------------------- | 21 // --------------------------------------------------------------------------- |
| 22 // The int values of OverwritableByUserThemeProperties, Alignment, and Tiling | 22 // The int values of OverwritableByUserThemeProperties, Alignment, and Tiling |
| 23 // are used as a key to store the property in the browser theme pack. If you | 23 // are used as a key to store the property in the browser theme pack. If you |
| 24 // modify any of these enums, increment the version number in | 24 // modify any of these enums, increment the version number in |
| 25 // browser_theme_pack.cc. | 25 // browser_theme_pack.cc. |
| 26 | 26 |
| 27 enum OverwritableByUserThemeProperty { | 27 enum OverwritableByUserThemeProperty { |
| 28 COLOR_CONTROL_BACKGROUND, | |
|
Peter Kasting
2016/06/10 01:12:24
If you touch the elements of this enum you need to
Julien Isorce Samsung
2016/06/10 09:51:37
Done.
| |
| 28 COLOR_FRAME, | 29 COLOR_FRAME, |
| 29 COLOR_FRAME_INACTIVE, | 30 COLOR_FRAME_INACTIVE, |
| 30 // Instead of using the INCOGNITO variants directly, most code should | 31 // Instead of using the INCOGNITO variants directly, most code should |
| 31 // use the original color ID in an incognito-aware context (such as | 32 // use the original color ID in an incognito-aware context (such as |
| 32 // GetDefaultColor). | 33 // GetDefaultColor). |
| 33 COLOR_FRAME_INCOGNITO, | 34 COLOR_FRAME_INCOGNITO, |
| 34 COLOR_FRAME_INCOGNITO_INACTIVE, | 35 COLOR_FRAME_INCOGNITO_INACTIVE, |
| 35 COLOR_TOOLBAR, | 36 COLOR_TOOLBAR, |
| 36 COLOR_TAB_TEXT, | 37 COLOR_TAB_TEXT, |
| 37 COLOR_BACKGROUND_TAB_TEXT, | 38 COLOR_BACKGROUND_TAB_TEXT, |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 75 REPEAT_Y = 2, | 76 REPEAT_Y = 2, |
| 76 REPEAT = 3 | 77 REPEAT = 3 |
| 77 }; | 78 }; |
| 78 | 79 |
| 79 // -------------------------------------------------------------------------- | 80 // -------------------------------------------------------------------------- |
| 80 // The int value of the properties in NotOverwritableByUserThemeProperties | 81 // The int value of the properties in NotOverwritableByUserThemeProperties |
| 81 // has no special meaning. Modify the enum to your heart's content. | 82 // has no special meaning. Modify the enum to your heart's content. |
| 82 // The enum takes on values >= 1000 as not to overlap with | 83 // The enum takes on values >= 1000 as not to overlap with |
| 83 // OverwritableByUserThemeProperties. | 84 // OverwritableByUserThemeProperties. |
| 84 enum NotOverwritableByUserThemeProperty { | 85 enum NotOverwritableByUserThemeProperty { |
| 85 COLOR_CONTROL_BACKGROUND = 1000, | |
| 86 | |
| 87 // The color of the line separating the bottom of the toolbar from the | 86 // The color of the line separating the bottom of the toolbar from the |
| 88 // contents. | 87 // contents. |
| 89 COLOR_TOOLBAR_BOTTOM_SEPARATOR, | 88 COLOR_TOOLBAR_BOTTOM_SEPARATOR = 1000, |
| 90 | 89 |
| 91 // The color of a normal toolbar button's icon. | 90 // The color of a normal toolbar button's icon. |
| 92 COLOR_TOOLBAR_BUTTON_ICON, | 91 COLOR_TOOLBAR_BUTTON_ICON, |
| 93 // The color of a disabled toolbar button's icon. | 92 // The color of a disabled toolbar button's icon. |
| 94 COLOR_TOOLBAR_BUTTON_ICON_INACTIVE, | 93 COLOR_TOOLBAR_BUTTON_ICON_INACTIVE, |
| 95 | 94 |
| 96 // The color of the line separating the top of the toolbar from the region | 95 // The color of the line separating the top of the toolbar from the region |
| 97 // above. For a tabbed browser window, this is the line along the bottom | 96 // above. For a tabbed browser window, this is the line along the bottom |
| 98 // edge of the tabstrip, the stroke around the tabs, and the new tab button | 97 // edge of the tabstrip, the stroke around the tabs, and the new tab button |
| 99 // stroke/shadow color. | 98 // stroke/shadow color. |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 180 | 179 |
| 181 // Returns the default color for the given color |id| COLOR_* enum value. | 180 // Returns the default color for the given color |id| COLOR_* enum value. |
| 182 // Returns gfx::kPlaceholderColor if |id| is invalid. | 181 // Returns gfx::kPlaceholderColor if |id| is invalid. |
| 183 static SkColor GetDefaultColor(int id, bool otr); | 182 static SkColor GetDefaultColor(int id, bool otr); |
| 184 | 183 |
| 185 private: | 184 private: |
| 186 DISALLOW_IMPLICIT_CONSTRUCTORS(ThemeProperties); | 185 DISALLOW_IMPLICIT_CONSTRUCTORS(ThemeProperties); |
| 187 }; | 186 }; |
| 188 | 187 |
| 189 #endif // CHROME_BROWSER_THEMES_THEME_PROPERTIES_H_ | 188 #endif // CHROME_BROWSER_THEMES_THEME_PROPERTIES_H_ |
| OLD | NEW |