| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "gfx/native_theme_win.h" | 5 #include "ui/gfx/native_theme_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <uxtheme.h> | 8 #include <uxtheme.h> |
| 9 #include <vsstyle.h> | 9 #include <vsstyle.h> |
| 10 #include <vssym32.h> | 10 #include <vssym32.h> |
| 11 | 11 |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/scoped_handle.h" | 13 #include "base/scoped_handle.h" |
| 14 #include "base/win/scoped_gdi_object.h" | 14 #include "base/win/scoped_gdi_object.h" |
| 15 #include "base/win/scoped_hdc.h" | 15 #include "base/win/scoped_hdc.h" |
| 16 #include "base/win/windows_version.h" | 16 #include "base/win/windows_version.h" |
| 17 #include "gfx/gdi_util.h" | |
| 18 #include "gfx/rect.h" | |
| 19 #include "skia/ext/platform_canvas.h" | 17 #include "skia/ext/platform_canvas.h" |
| 20 #include "skia/ext/skia_utils_win.h" | 18 #include "skia/ext/skia_utils_win.h" |
| 21 #include "third_party/skia/include/core/SkShader.h" | 19 #include "third_party/skia/include/core/SkShader.h" |
| 20 #include "ui/gfx/gdi_util.h" |
| 21 #include "ui/gfx/rect.h" |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 void SetCheckerboardShader(SkPaint* paint, const RECT& align_rect) { | 25 void SetCheckerboardShader(SkPaint* paint, const RECT& align_rect) { |
| 26 // Create a 2x2 checkerboard pattern using the 3D face and highlight colors. | 26 // Create a 2x2 checkerboard pattern using the 3D face and highlight colors. |
| 27 SkColor face = skia::COLORREFToSkColor(GetSysColor(COLOR_3DFACE)); | 27 SkColor face = skia::COLORREFToSkColor(GetSysColor(COLOR_3DFACE)); |
| 28 SkColor highlight = skia::COLORREFToSkColor(GetSysColor(COLOR_3DHILIGHT)); | 28 SkColor highlight = skia::COLORREFToSkColor(GetSysColor(COLOR_3DHILIGHT)); |
| 29 SkColor buffer[] = { face, highlight, highlight, face }; | 29 SkColor buffer[] = { face, highlight, highlight, face }; |
| 30 // Confusing bit: we first create a temporary bitmap with our desired pattern, | 30 // Confusing bit: we first create a temporary bitmap with our desired pattern, |
| 31 // then copy it to another bitmap. The temporary bitmap doesn't take | 31 // then copy it to another bitmap. The temporary bitmap doesn't take |
| (...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 865 handle = open_theme_(NULL, L"Spin"); | 865 handle = open_theme_(NULL, L"Spin"); |
| 866 break; | 866 break; |
| 867 default: | 867 default: |
| 868 NOTREACHED(); | 868 NOTREACHED(); |
| 869 } | 869 } |
| 870 theme_handles_[theme_name] = handle; | 870 theme_handles_[theme_name] = handle; |
| 871 return handle; | 871 return handle; |
| 872 } | 872 } |
| 873 | 873 |
| 874 } // namespace gfx | 874 } // namespace gfx |
| OLD | NEW |