| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 bool IsUsingHighContrastThemeInternal(); | 125 bool IsUsingHighContrastThemeInternal(); |
| 126 void CloseHandlesInternal(); | 126 void CloseHandlesInternal(); |
| 127 | 127 |
| 128 // gfx::SysColorChangeListener implementation: | 128 // gfx::SysColorChangeListener implementation: |
| 129 void OnSysColorChange() override; | 129 void OnSysColorChange() override; |
| 130 | 130 |
| 131 // Update the locally cached set of system colors. | 131 // Update the locally cached set of system colors. |
| 132 void UpdateSystemColors(); | 132 void UpdateSystemColors(); |
| 133 | 133 |
| 134 // Painting functions that paint to PaintCanvas. | 134 // Painting functions that paint to PaintCanvas. |
| 135 void PaintMenuSeparator(cc::PaintCanvas* canvas, const gfx::Rect& rect) const; | 135 void PaintMenuSeparator(cc::PaintCanvas* canvas, |
| 136 const MenuSeparatorExtraParams& params) const; |
| 136 void PaintMenuGutter(cc::PaintCanvas* canvas, const gfx::Rect& rect) const; | 137 void PaintMenuGutter(cc::PaintCanvas* canvas, const gfx::Rect& rect) const; |
| 137 void PaintMenuBackground(cc::PaintCanvas* canvas, | 138 void PaintMenuBackground(cc::PaintCanvas* canvas, |
| 138 const gfx::Rect& rect) const; | 139 const gfx::Rect& rect) const; |
| 139 | 140 |
| 140 // Paint directly to canvas' HDC. | 141 // Paint directly to canvas' HDC. |
| 141 void PaintDirect(SkCanvas* destination_canvas, | 142 void PaintDirect(SkCanvas* destination_canvas, |
| 142 HDC hdc, | 143 HDC hdc, |
| 143 Part part, | 144 Part part, |
| 144 State state, | 145 State state, |
| 145 const gfx::Rect& rect, | 146 const gfx::Rect& rect, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 162 int ts, | 163 int ts, |
| 163 SIZE* size) const; | 164 SIZE* size) const; |
| 164 | 165 |
| 165 HRESULT PaintButton(HDC hdc, | 166 HRESULT PaintButton(HDC hdc, |
| 166 State state, | 167 State state, |
| 167 const ButtonExtraParams& extra, | 168 const ButtonExtraParams& extra, |
| 168 int part_id, | 169 int part_id, |
| 169 int state_id, | 170 int state_id, |
| 170 RECT* rect) const; | 171 RECT* rect) const; |
| 171 | 172 |
| 172 HRESULT PaintMenuSeparator(HDC hdc, const gfx::Rect& rect) const; | |
| 173 | |
| 174 HRESULT PaintMenuGutter(HDC hdc, const gfx::Rect& rect) const; | |
| 175 | |
| 176 // |arrow_direction| determines whether the arrow is pointing to the left or | 173 // |arrow_direction| determines whether the arrow is pointing to the left or |
| 177 // to the right. In RTL locales, sub-menus open from right to left and | 174 // to the right. In RTL locales, sub-menus open from right to left and |
| 178 // therefore the menu arrow should point to the left and not to the right. | 175 // therefore the menu arrow should point to the left and not to the right. |
| 179 HRESULT PaintMenuArrow(HDC hdc, | 176 HRESULT PaintMenuArrow(HDC hdc, |
| 180 State state, | 177 State state, |
| 181 const gfx::Rect& rect, | 178 const gfx::Rect& rect, |
| 182 const MenuArrowExtraParams& extra) const; | 179 const MenuArrowExtraParams& extra) const; |
| 183 | 180 |
| 184 HRESULT PaintMenuBackground(HDC hdc, const gfx::Rect& rect) const; | |
| 185 | |
| 186 HRESULT PaintMenuCheck(HDC hdc, | 181 HRESULT PaintMenuCheck(HDC hdc, |
| 187 State state, | 182 State state, |
| 188 const gfx::Rect& rect, | 183 const gfx::Rect& rect, |
| 189 const MenuCheckExtraParams& extra) const; | 184 const MenuCheckExtraParams& extra) const; |
| 190 | 185 |
| 191 HRESULT PaintMenuCheckBackground(HDC hdc, | 186 HRESULT PaintMenuCheckBackground(HDC hdc, |
| 192 State state, | 187 State state, |
| 193 const gfx::Rect& rect) const; | 188 const gfx::Rect& rect) const; |
| 194 | 189 |
| 195 HRESULT PaintMenuItemBackground(HDC hdc, | |
| 196 State state, | |
| 197 const gfx::Rect& rect, | |
| 198 const MenuItemExtraParams& extra) const; | |
| 199 | |
| 200 HRESULT PaintPushButton(HDC hdc, | 190 HRESULT PaintPushButton(HDC hdc, |
| 201 Part part, | 191 Part part, |
| 202 State state, | 192 State state, |
| 203 const gfx::Rect& rect, | 193 const gfx::Rect& rect, |
| 204 const ButtonExtraParams& extra) const; | 194 const ButtonExtraParams& extra) const; |
| 205 | 195 |
| 206 HRESULT PaintRadioButton(HDC hdc, | 196 HRESULT PaintRadioButton(HDC hdc, |
| 207 Part part, | 197 Part part, |
| 208 State state, | 198 State state, |
| 209 const gfx::Rect& rect, | 199 const gfx::Rect& rect, |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 | 365 |
| 376 // Is |is_using_high_contrast_| valid? | 366 // Is |is_using_high_contrast_| valid? |
| 377 mutable bool is_using_high_contrast_valid_; | 367 mutable bool is_using_high_contrast_valid_; |
| 378 | 368 |
| 379 DISALLOW_COPY_AND_ASSIGN(NativeThemeWin); | 369 DISALLOW_COPY_AND_ASSIGN(NativeThemeWin); |
| 380 }; | 370 }; |
| 381 | 371 |
| 382 } // namespace ui | 372 } // namespace ui |
| 383 | 373 |
| 384 #endif // UI_NATIVE_THEME_NATIVE_THEME_WIN_H_ | 374 #endif // UI_NATIVE_THEME_NATIVE_THEME_WIN_H_ |
| OLD | NEW |