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

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

Issue 1492353002: Consolidate Windows bitmap and DC code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move-printing-dc-from-device
Patch Set: remove !_WIN64 restriction on error reporting Created 4 years, 6 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 #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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 void OnSysColorChange() override; 123 void OnSysColorChange() override;
124 124
125 // Update the locally cached set of system colors. 125 // Update the locally cached set of system colors.
126 void UpdateSystemColors(); 126 void UpdateSystemColors();
127 127
128 // Painting functions that paint to SkCanvas. 128 // Painting functions that paint to SkCanvas.
129 void PaintMenuSeparator(SkCanvas* canvas, const gfx::Rect& rect) const; 129 void PaintMenuSeparator(SkCanvas* canvas, const gfx::Rect& rect) const;
130 void PaintMenuGutter(SkCanvas* canvas, const gfx::Rect& rect) const; 130 void PaintMenuGutter(SkCanvas* canvas, const gfx::Rect& rect) const;
131 void PaintMenuBackground(SkCanvas* canvas, const gfx::Rect& rect) const; 131 void PaintMenuBackground(SkCanvas* canvas, const gfx::Rect& rect) const;
132 132
133 // Paint directly to canvas' HDC. 133 // Paint directly to HDC.
134 void PaintDirect(SkCanvas* canvas, 134 void PaintDirect(HDC hdc,
135 Part part, 135 Part part,
136 State state, 136 State state,
137 const gfx::Rect& rect, 137 const gfx::Rect& rect,
138 const ExtraParams& extra) const; 138 const ExtraParams& extra) const;
139 139
140 // Create a temporary HDC, paint to that, clean up the alpha values in the 140 // Create a temporary HDC, paint to that, clean up the alpha values in the
141 // temporary HDC, and then blit the result to canvas. This is to work around 141 // temporary HDC, and then blit the result to canvas. This is to work around
142 // the fact that Windows XP and some classic themes give bogus alpha values. 142 // the fact that Windows XP and some classic themes give bogus alpha values.
143 void PaintIndirect(SkCanvas* canvas, 143 void PaintIndirect(HDC hdc,
144 Part part, 144 Part part,
145 State state, 145 State state,
146 const gfx::Rect& rect, 146 const gfx::Rect& rect,
147 const ExtraParams& extra) const; 147 const ExtraParams& extra) const;
148 148
149 HRESULT GetThemePartSize(ThemeName themeName, 149 HRESULT GetThemePartSize(ThemeName themeName,
150 HDC hdc, 150 HDC hdc,
151 int part_id, 151 int part_id,
152 int state_id, 152 int state_id,
153 RECT* rect, 153 RECT* rect,
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 HRESULT PaintScrollbarThumb(HDC hdc, 224 HRESULT PaintScrollbarThumb(HDC hdc,
225 Part part, 225 Part part,
226 State state, 226 State state,
227 const gfx::Rect& rect, 227 const gfx::Rect& rect,
228 const ScrollbarThumbExtraParams& extra) const; 228 const ScrollbarThumbExtraParams& extra) const;
229 229
230 // This method is deprecated and will be removed in the near future. 230 // This method is deprecated and will be removed in the near future.
231 // Paints a scrollbar track section. |align_rect| is only used in classic 231 // Paints a scrollbar track section. |align_rect| is only used in classic
232 // mode, and makes sure the checkerboard pattern in |target_rect| is aligned 232 // mode, and makes sure the checkerboard pattern in |target_rect| is aligned
233 // with one presumed to be in |align_rect|. 233 // with one presumed to be in |align_rect|.
234 HRESULT PaintScrollbarTrack(SkCanvas* canvas, 234 HRESULT PaintScrollbarTrack(HDC hdc,
235 HDC hdc,
236 Part part, 235 Part part,
237 State state, 236 State state,
238 const gfx::Rect& rect, 237 const gfx::Rect& rect,
239 const ScrollbarTrackExtraParams& extra) const; 238 const ScrollbarTrackExtraParams& extra) const;
240 239
241 HRESULT PaintSpinButton(HDC hdc, 240 HRESULT PaintSpinButton(HDC hdc,
242 Part part, 241 Part part,
243 State state, 242 State state,
244 const gfx::Rect& rect, 243 const gfx::Rect& rect,
245 const InnerSpinButtonExtraParams& extra) const; 244 const InnerSpinButtonExtraParams& extra) const;
246 245
247 HRESULT PaintTrackbar(SkCanvas* canvas, 246 HRESULT PaintTrackbar(HDC hdc,
248 HDC hdc,
249 Part part, 247 Part part,
250 State state, 248 State state,
251 const gfx::Rect& rect, 249 const gfx::Rect& rect,
252 const TrackbarExtraParams& extra) const; 250 const TrackbarExtraParams& extra) const;
253 251
254 HRESULT PaintProgressBar(HDC hdc, 252 HRESULT PaintProgressBar(HDC hdc,
255 const gfx::Rect& rect, 253 const gfx::Rect& rect,
256 const ProgressBarExtraParams& extra) const; 254 const ProgressBarExtraParams& extra) const;
257 255
258 HRESULT PaintWindowResizeGripper(HDC hdc, const gfx::Rect& rect) const; 256 HRESULT PaintWindowResizeGripper(HDC hdc, const gfx::Rect& rect) const;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 367
370 // Is |is_using_high_contrast_| valid? 368 // Is |is_using_high_contrast_| valid?
371 mutable bool is_using_high_contrast_valid_; 369 mutable bool is_using_high_contrast_valid_;
372 370
373 DISALLOW_COPY_AND_ASSIGN(NativeThemeWin); 371 DISALLOW_COPY_AND_ASSIGN(NativeThemeWin);
374 }; 372 };
375 373
376 } // namespace ui 374 } // namespace ui
377 375
378 #endif // UI_NATIVE_THEME_NATIVE_THEME_WIN_H_ 376 #endif // UI_NATIVE_THEME_NATIVE_THEME_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698