OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/native_theme/native_theme_win.h" | 5 #include "ui/native_theme/native_theme_win.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <uxtheme.h> | 9 #include <uxtheme.h> |
10 #include <vsstyle.h> | 10 #include <vsstyle.h> |
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
653 case NativeTheme::kColorId_ProminentButtonColor: | 653 case NativeTheme::kColorId_ProminentButtonColor: |
654 return kProminentButtonColorInvert; | 654 return kProminentButtonColorInvert; |
655 default: | 655 default: |
656 return color_utils::InvertColor(GetAuraColor(color_id, this)); | 656 return color_utils::InvertColor(GetAuraColor(color_id, this)); |
657 } | 657 } |
658 } | 658 } |
659 | 659 |
660 return GetAuraColor(color_id, this); | 660 return GetAuraColor(color_id, this); |
661 } | 661 } |
662 | 662 |
663 bool NativeThemeWin::SupportsNinePatch(Part part) const { | |
664 return false; | |
sadrul
2017/03/01 15:38:55
We are using the same compositor on windows. Why w
bokan
2017/03/01 16:22:45
Only the scrollbar thumb for overlay scrollbars wi
| |
665 } | |
666 | |
667 gfx::Size NativeThemeWin::GetNinePatchCanvasSize(Part part) const { | |
668 NOTREACHED() << "NativeThemeWin doesn't support nine-patch resources."; | |
669 return gfx::Size(); | |
670 } | |
671 | |
672 gfx::Rect NativeThemeWin::GetNinePatchAperture(Part part) const { | |
673 NOTREACHED() << "NativeThemeWin doesn't support nine-patch resources."; | |
674 return gfx::Rect(); | |
675 } | |
676 | |
663 void NativeThemeWin::PaintIndirect(cc::PaintCanvas* destination_canvas, | 677 void NativeThemeWin::PaintIndirect(cc::PaintCanvas* destination_canvas, |
664 Part part, | 678 Part part, |
665 State state, | 679 State state, |
666 const gfx::Rect& rect, | 680 const gfx::Rect& rect, |
667 const ExtraParams& extra) const { | 681 const ExtraParams& extra) const { |
668 // TODO(asvitkine): This path is pretty inefficient - for each paint operation | 682 // TODO(asvitkine): This path is pretty inefficient - for each paint operation |
669 // it creates a new offscreen bitmap Skia canvas. This can be sped up by doing | 683 // it creates a new offscreen bitmap Skia canvas. This can be sped up by doing |
670 // it only once per part/state and keeping a cache of the resulting bitmaps. | 684 // it only once per part/state and keeping a cache of the resulting bitmaps. |
671 // | 685 // |
672 // TODO(enne): This could also potentially be sped up for software raster | 686 // TODO(enne): This could also potentially be sped up for software raster |
(...skipping 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2092 break; | 2106 break; |
2093 case LAST: | 2107 case LAST: |
2094 NOTREACHED(); | 2108 NOTREACHED(); |
2095 break; | 2109 break; |
2096 } | 2110 } |
2097 theme_handles_[theme_name] = handle; | 2111 theme_handles_[theme_name] = handle; |
2098 return handle; | 2112 return handle; |
2099 } | 2113 } |
2100 | 2114 |
2101 } // namespace ui | 2115 } // namespace ui |
OLD | NEW |