| 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 #include "chrome/browser/themes/theme_properties.h" | 5 #include "chrome/browser/themes/theme_properties.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 constexpr color_utils::HSL kDefaultTintFrame = {-1, -1, -1}; | 77 constexpr color_utils::HSL kDefaultTintFrame = {-1, -1, -1}; |
| 78 constexpr color_utils::HSL kDefaultTintFrameInactive = {-1, -1, 0.9}; | 78 constexpr color_utils::HSL kDefaultTintFrameInactive = {-1, -1, 0.9}; |
| 79 constexpr color_utils::HSL kDefaultTintFrameIncognito = {-1, 0.2, 0.35}; | 79 constexpr color_utils::HSL kDefaultTintFrameIncognito = {-1, 0.2, 0.35}; |
| 80 constexpr color_utils::HSL kDefaultTintFrameIncognitoInactive = {-1, 0.2, 0.87}; | 80 constexpr color_utils::HSL kDefaultTintFrameIncognitoInactive = {-1, 0.2, 0.87}; |
| 81 constexpr color_utils::HSL kDefaultTintBackgroundTab = {-1, -1, 0.75}; | 81 constexpr color_utils::HSL kDefaultTintBackgroundTab = {-1, -1, 0.75}; |
| 82 | 82 |
| 83 // ---------------------------------------------------------------------------- | 83 // ---------------------------------------------------------------------------- |
| 84 // Defaults for properties which are not stored in the browser theme pack. | 84 // Defaults for properties which are not stored in the browser theme pack. |
| 85 | 85 |
| 86 constexpr SkColor kDefaultColorControlBackground = SK_ColorWHITE; | 86 constexpr SkColor kDefaultColorControlBackground = SK_ColorWHITE; |
| 87 const SkColor kDefaultDetachedBookmarkBarSeparator = | 87 const SkColor kDefaultToolbarBottomSeparator = |
| 88 SkColorSetRGB(0xB6, 0xB4, 0xB6); | 88 SkColorSetRGB(0xB6, 0xB4, 0xB6); |
| 89 const SkColor kDefaultDetachedBookmarkBarSeparatorIncognito = | 89 const SkColor kDefaultToolbarBottomSeparatorIncognito = |
| 90 SkColorSetRGB(0x28, 0x28, 0x28); | 90 SkColorSetRGB(0x28, 0x28, 0x28); |
| 91 const SkColor kDefaultToolbarTopSeparator = SkColorSetA(SK_ColorBLACK, 0x40); | 91 const SkColor kDefaultToolbarTopSeparator = SkColorSetA(SK_ColorBLACK, 0x40); |
| 92 | 92 |
| 93 #if defined(OS_MACOSX) | 93 #if defined(OS_MACOSX) |
| 94 const SkColor kDefaultColorFrameVibrancyOverlay = | 94 const SkColor kDefaultColorFrameVibrancyOverlay = |
| 95 SkColorSetA(SK_ColorBLACK, 0x19); | 95 SkColorSetA(SK_ColorBLACK, 0x19); |
| 96 const SkColor kDefaultColorFrameVibrancyOverlayIncognito = | 96 const SkColor kDefaultColorFrameVibrancyOverlayIncognito = |
| 97 SkColorSetARGB(0xE6, 0x14, 0x16, 0x18); | 97 SkColorSetARGB(0xE6, 0x14, 0x16, 0x18); |
| 98 const SkColor kDefaultColorToolbarInactive = SkColorSetRGB(0xF6, 0xF6, 0xF6); | 98 const SkColor kDefaultColorToolbarInactive = SkColorSetRGB(0xF6, 0xF6, 0xF6); |
| 99 const SkColor kDefaultColorToolbarInactiveIncognito = | 99 const SkColor kDefaultColorToolbarInactiveIncognito = |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 return TintForUnderline(kDefaultColorNTPSectionLink); | 263 return TintForUnderline(kDefaultColorNTPSectionLink); |
| 264 case COLOR_BUTTON_BACKGROUND: | 264 case COLOR_BUTTON_BACKGROUND: |
| 265 return kDefaultColorButtonBackground; | 265 return kDefaultColorButtonBackground; |
| 266 | 266 |
| 267 // Properties not stored in theme pack. | 267 // Properties not stored in theme pack. |
| 268 case COLOR_CONTROL_BACKGROUND: | 268 case COLOR_CONTROL_BACKGROUND: |
| 269 return kDefaultColorControlBackground; | 269 return kDefaultColorControlBackground; |
| 270 case COLOR_BOOKMARK_BAR_INSTRUCTIONS_TEXT: | 270 case COLOR_BOOKMARK_BAR_INSTRUCTIONS_TEXT: |
| 271 return otr ? kDefaultColorBookmarkInstructionsTextIncognito | 271 return otr ? kDefaultColorBookmarkInstructionsTextIncognito |
| 272 : kDefaultColorBookmarkInstructionsText; | 272 : kDefaultColorBookmarkInstructionsText; |
| 273 case COLOR_TOOLBAR_BOTTOM_SEPARATOR: | |
| 274 case COLOR_DETACHED_BOOKMARK_BAR_SEPARATOR: | 273 case COLOR_DETACHED_BOOKMARK_BAR_SEPARATOR: |
| 275 return otr ? kDefaultDetachedBookmarkBarSeparatorIncognito | 274 // We shouldn't reach this case because the color is calculated from |
| 276 : kDefaultDetachedBookmarkBarSeparator; | 275 // COLOR_TOOLBAR_BOTTOM_SEPARTOR. |
| 276 NOTREACHED(); |
| 277 return gfx::kPlaceholderColor; |
| 277 case COLOR_DETACHED_BOOKMARK_BAR_BACKGROUND: | 278 case COLOR_DETACHED_BOOKMARK_BAR_BACKGROUND: |
| 278 return otr ? kDefaultDetachedBookmarkBarBackgroundIncognito | 279 return otr ? kDefaultDetachedBookmarkBarBackgroundIncognito |
| 279 : kDefaultDetachedBookmarkBarBackground; | 280 : kDefaultDetachedBookmarkBarBackground; |
| 281 case COLOR_TOOLBAR_BOTTOM_SEPARATOR: |
| 282 return otr ? kDefaultToolbarBottomSeparatorIncognito |
| 283 : kDefaultToolbarBottomSeparator; |
| 280 case COLOR_TOOLBAR_TOP_SEPARATOR: | 284 case COLOR_TOOLBAR_TOP_SEPARATOR: |
| 281 case COLOR_TOOLBAR_TOP_SEPARATOR_INACTIVE: | 285 case COLOR_TOOLBAR_TOP_SEPARATOR_INACTIVE: |
| 282 return kDefaultToolbarTopSeparator; | 286 return kDefaultToolbarTopSeparator; |
| 283 #if defined(OS_MACOSX) | 287 #if defined(OS_MACOSX) |
| 284 case COLOR_FRAME_VIBRANCY_OVERLAY: | 288 case COLOR_FRAME_VIBRANCY_OVERLAY: |
| 285 return otr ? kDefaultColorFrameVibrancyOverlayIncognito | 289 return otr ? kDefaultColorFrameVibrancyOverlayIncognito |
| 286 : kDefaultColorFrameVibrancyOverlay; | 290 : kDefaultColorFrameVibrancyOverlay; |
| 287 case COLOR_TOOLBAR_INACTIVE: | 291 case COLOR_TOOLBAR_INACTIVE: |
| 288 return otr ? kDefaultColorToolbarInactiveIncognito | 292 return otr ? kDefaultColorToolbarInactiveIncognito |
| 289 : kDefaultColorToolbarInactive; | 293 : kDefaultColorToolbarInactive; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 315 case COLOR_FRAME_INCOGNITO: | 319 case COLOR_FRAME_INCOGNITO: |
| 316 case COLOR_FRAME_INCOGNITO_INACTIVE: | 320 case COLOR_FRAME_INCOGNITO_INACTIVE: |
| 317 NOTREACHED() << "These values should be queried via their respective " | 321 NOTREACHED() << "These values should be queried via their respective " |
| 318 "non-incognito equivalents and an appropriate |otr| " | 322 "non-incognito equivalents and an appropriate |otr| " |
| 319 "value."; | 323 "value."; |
| 320 return gfx::kPlaceholderColor; | 324 return gfx::kPlaceholderColor; |
| 321 } | 325 } |
| 322 | 326 |
| 323 return gfx::kPlaceholderColor; | 327 return gfx::kPlaceholderColor; |
| 324 } | 328 } |
| OLD | NEW |