Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: ui/native_theme/native_theme_win.cc

Issue 2591863003: Use nine-patch resource for drawing Aura overlay scrollbar thumb. (Closed)
Patch Set: Finish Plumbing Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 case NativeTheme::kColorId_ProminentButtonColor: 666 case NativeTheme::kColorId_ProminentButtonColor:
667 return kProminentButtonColorInvert; 667 return kProminentButtonColorInvert;
668 default: 668 default:
669 return color_utils::InvertColor(GetAuraColor(color_id, this)); 669 return color_utils::InvertColor(GetAuraColor(color_id, this));
670 } 670 }
671 } 671 }
672 672
673 return GetAuraColor(color_id, this); 673 return GetAuraColor(color_id, this);
674 } 674 }
675 675
676 bool NativeThemeWin::SupportsNinePatch(Part part) const {
677 return false;
678 }
679
680 gfx::Size NativeThemeWin::GetNinePatchCanvasSize(Part part) const {
681 NOTREACHED() << "NativeThemeWin doesn't support nine-patch resources.";
682 return gfx::Size();
683 }
684
685 gfx::Rect NativeThemeWin::GetNinePatchAperture(Part part) const {
686 NOTREACHED() << "NativeThemeWin doesn't support nine-patch resources.";
687 return gfx::Rect();
688 }
689
676 void NativeThemeWin::PaintIndirect(SkCanvas* destination_canvas, 690 void NativeThemeWin::PaintIndirect(SkCanvas* destination_canvas,
677 HDC destination_hdc, 691 HDC destination_hdc,
678 Part part, 692 Part part,
679 State state, 693 State state,
680 const gfx::Rect& rect, 694 const gfx::Rect& rect,
681 const ExtraParams& extra) const { 695 const ExtraParams& extra) const {
682 // TODO(asvitkine): This path is pretty inefficient - for each paint operation 696 // TODO(asvitkine): This path is pretty inefficient - for each paint operation
683 // it creates a new offscreen bitmap Skia canvas. This can 697 // it creates a new offscreen bitmap Skia canvas. This can
684 // be sped up by doing it only once per part/state and 698 // be sped up by doing it only once per part/state and
685 // keeping a cache of the resulting bitmaps. 699 // keeping a cache of the resulting bitmaps.
(...skipping 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after
2105 break; 2119 break;
2106 case LAST: 2120 case LAST:
2107 NOTREACHED(); 2121 NOTREACHED();
2108 break; 2122 break;
2109 } 2123 }
2110 theme_handles_[theme_name] = handle; 2124 theme_handles_[theme_name] = handle;
2111 return handle; 2125 return handle;
2112 } 2126 }
2113 2127
2114 } // namespace ui 2128 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698