| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/views/theme_helpers.h" | 5 #include "chrome/browser/views/theme_helpers.h" |
| 6 | 6 |
| 7 #include <atlbase.h> | 7 #include <atlbase.h> |
| 8 #include <atlapp.h> | 8 #include <atlapp.h> |
| 9 #include <atltheme.h> | 9 #include <atltheme.h> |
| 10 | 10 |
| 11 #include "base/gfx/bitmap_platform_device_win.h" | |
| 12 #include "chrome/common/gfx/chrome_canvas.h" | 11 #include "chrome/common/gfx/chrome_canvas.h" |
| 13 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "skia/ext/bitmap_platform_device_win.h" |
| 14 #include "SkGradientShader.h" | 14 #include "SkGradientShader.h" |
| 15 | 15 |
| 16 void GetRebarGradientColors(int width, int x1, int x2, SkColor* c1, SkColor* c2)
{ | 16 void GetRebarGradientColors(int width, int x1, int x2, SkColor* c1, SkColor* c2)
{ |
| 17 DCHECK(c1 && c2) << "ThemeHelpers::GetRebarGradientColors - c1 or c2 is NULL!"
; | 17 DCHECK(c1 && c2) << "ThemeHelpers::GetRebarGradientColors - c1 or c2 is NULL!"
; |
| 18 | 18 |
| 19 // To get the colors we need, we draw a horizontal gradient using | 19 // To get the colors we need, we draw a horizontal gradient using |
| 20 // DrawThemeBackground, then extract the pixel values from and return | 20 // DrawThemeBackground, then extract the pixel values from and return |
| 21 // those so calling code can use them to create gradient brushes for use in | 21 // those so calling code can use them to create gradient brushes for use in |
| 22 // rendering in other directions. | 22 // rendering in other directions. |
| 23 | 23 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 } else { | 82 } else { |
| 83 COLORREF shadow_ref = ::GetSysColor(COLOR_3DSHADOW); | 83 COLORREF shadow_ref = ::GetSysColor(COLOR_3DSHADOW); |
| 84 *dark_color = SkColorSetARGB(175, | 84 *dark_color = SkColorSetARGB(175, |
| 85 GetRValue(shadow_ref), | 85 GetRValue(shadow_ref), |
| 86 GetGValue(shadow_ref), | 86 GetGValue(shadow_ref), |
| 87 GetBValue(shadow_ref)); | 87 GetBValue(shadow_ref)); |
| 88 } | 88 } |
| 89 } | 89 } |
| 90 | 90 |
| 91 | 91 |
| OLD | NEW |