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

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

Issue 1797053002: Move theme part drawing functions only used on Windows to NativeThemeWin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compile Created 4 years, 9 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
« no previous file with comments | « ui/native_theme/native_theme_aura.cc ('k') | ui/native_theme/native_theme_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 NativeThemeWin(); 118 NativeThemeWin();
119 ~NativeThemeWin() override; 119 ~NativeThemeWin() override;
120 120
121 private: 121 private:
122 // gfx::SysColorChangeListener implementation: 122 // gfx::SysColorChangeListener implementation:
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.
129 void PaintMenuSeparator(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;
132
128 // Paint directly to canvas' HDC. 133 // Paint directly to canvas' HDC.
129 void PaintDirect(SkCanvas* canvas, 134 void PaintDirect(SkCanvas* canvas,
130 Part part, 135 Part part,
131 State state, 136 State state,
132 const gfx::Rect& rect, 137 const gfx::Rect& rect,
133 const ExtraParams& extra) const; 138 const ExtraParams& extra) const;
134 139
135 // 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
136 // 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
137 // 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.
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 369
365 // Is |is_using_high_contrast_| valid? 370 // Is |is_using_high_contrast_| valid?
366 mutable bool is_using_high_contrast_valid_; 371 mutable bool is_using_high_contrast_valid_;
367 372
368 DISALLOW_COPY_AND_ASSIGN(NativeThemeWin); 373 DISALLOW_COPY_AND_ASSIGN(NativeThemeWin);
369 }; 374 };
370 375
371 } // namespace ui 376 } // namespace ui
372 377
373 #endif // UI_NATIVE_THEME_NATIVE_THEME_WIN_H_ 378 #endif // UI_NATIVE_THEME_NATIVE_THEME_WIN_H_
OLDNEW
« no previous file with comments | « ui/native_theme/native_theme_aura.cc ('k') | ui/native_theme/native_theme_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698