| 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 #ifndef UI_NATIVE_THEME_NATIVE_THEME_WIN_H_ | 5 #ifndef UI_NATIVE_THEME_NATIVE_THEME_WIN_H_ |
| 6 #define UI_NATIVE_THEME_NATIVE_THEME_WIN_H_ | 6 #define UI_NATIVE_THEME_NATIVE_THEME_WIN_H_ |
| 7 | 7 |
| 8 // A wrapper class for working with custom XP/Vista themes provided in | 8 // A wrapper class for working with custom XP/Vista themes provided in |
| 9 // uxtheme.dll. This is a singleton class that can be grabbed using | 9 // uxtheme.dll. This is a singleton class that can be grabbed using |
| 10 // NativeThemeWin::instance(). | 10 // NativeThemeWin::instance(). |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 private: | 120 private: |
| 121 bool IsUsingHighContrastThemeInternal(); | 121 bool IsUsingHighContrastThemeInternal(); |
| 122 void CloseHandlesInternal(); | 122 void CloseHandlesInternal(); |
| 123 | 123 |
| 124 // gfx::SysColorChangeListener implementation: | 124 // gfx::SysColorChangeListener implementation: |
| 125 void OnSysColorChange() override; | 125 void OnSysColorChange() override; |
| 126 | 126 |
| 127 // Update the locally cached set of system colors. | 127 // Update the locally cached set of system colors. |
| 128 void UpdateSystemColors(); | 128 void UpdateSystemColors(); |
| 129 | 129 |
| 130 // Painting functions that paint to SkCanvas. | 130 // Painting functions that paint to PaintCanvas. |
| 131 void PaintMenuSeparator(SkCanvas* canvas, const gfx::Rect& rect) const; | 131 void PaintMenuSeparator(cc::PaintCanvas* canvas, const gfx::Rect& rect) const; |
| 132 void PaintMenuGutter(SkCanvas* canvas, const gfx::Rect& rect) const; | 132 void PaintMenuGutter(cc::PaintCanvas* canvas, const gfx::Rect& rect) const; |
| 133 void PaintMenuBackground(SkCanvas* canvas, const gfx::Rect& rect) const; | 133 void PaintMenuBackground(cc::PaintCanvas* canvas, |
| 134 const gfx::Rect& rect) const; |
| 134 | 135 |
| 135 // Paint directly to canvas' HDC. | 136 // Paint directly to canvas' HDC. |
| 136 void PaintDirect(SkCanvas* destination_canvas, | 137 void PaintDirect(SkCanvas* destination_canvas, |
| 137 HDC hdc, | 138 HDC hdc, |
| 138 Part part, | 139 Part part, |
| 139 State state, | 140 State state, |
| 140 const gfx::Rect& rect, | 141 const gfx::Rect& rect, |
| 141 const ExtraParams& extra) const; | 142 const ExtraParams& extra) const; |
| 142 | 143 |
| 143 // Create a temporary HDC, paint to that, clean up the alpha values in the | 144 // Create a temporary HDC, paint to that, clean up the alpha values in the |
| 144 // temporary HDC, and then blit the result to canvas. This is to work around | 145 // temporary HDC, and then blit the result to canvas. This is to work around |
| 145 // the fact that Windows XP and some classic themes give bogus alpha values. | 146 // the fact that Windows XP and some classic themes give bogus alpha values. |
| 146 void PaintIndirect(SkCanvas* destination_canvas, | 147 void PaintIndirect(cc::PaintCanvas* destination_canvas, |
| 147 Part part, | 148 Part part, |
| 148 State state, | 149 State state, |
| 149 const gfx::Rect& rect, | 150 const gfx::Rect& rect, |
| 150 const ExtraParams& extra) const; | 151 const ExtraParams& extra) const; |
| 151 | 152 |
| 152 HRESULT GetThemePartSize(ThemeName themeName, | 153 HRESULT GetThemePartSize(ThemeName themeName, |
| 153 HDC hdc, | 154 HDC hdc, |
| 154 int part_id, | 155 int part_id, |
| 155 int state_id, | 156 int state_id, |
| 156 RECT* rect, | 157 RECT* rect, |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 | 371 |
| 371 // Is |is_using_high_contrast_| valid? | 372 // Is |is_using_high_contrast_| valid? |
| 372 mutable bool is_using_high_contrast_valid_; | 373 mutable bool is_using_high_contrast_valid_; |
| 373 | 374 |
| 374 DISALLOW_COPY_AND_ASSIGN(NativeThemeWin); | 375 DISALLOW_COPY_AND_ASSIGN(NativeThemeWin); |
| 375 }; | 376 }; |
| 376 | 377 |
| 377 } // namespace ui | 378 } // namespace ui |
| 378 | 379 |
| 379 #endif // UI_NATIVE_THEME_NATIVE_THEME_WIN_H_ | 380 #endif // UI_NATIVE_THEME_NATIVE_THEME_WIN_H_ |
| OLD | NEW |