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

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

Issue 2655553003: Native themes: Add menu separator part (Closed)
Patch Set: Created 3 years, 11 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 SkCanvas.
131 void PaintMenuSeparator(SkCanvas* canvas, const gfx::Rect& rect) const; 131 void PaintMenuSeparator(SkCanvas* canvas,
132 const gfx::Rect& rect,
133 const MenuSeparatorExtraParams& extra) const;
Tom (Use chromium acct) 2017/01/25 22:25:44 sky: Do you think I should get rid of the extra ar
sky 2017/01/25 22:40:10 Yes, I think that would be less confusing.
Tom (Use chromium acct) 2017/01/25 22:49:43 Done.
132 void PaintMenuGutter(SkCanvas* canvas, const gfx::Rect& rect) const; 134 void PaintMenuGutter(SkCanvas* canvas, const gfx::Rect& rect) const;
133 void PaintMenuBackground(SkCanvas* canvas, const gfx::Rect& rect) const; 135 void PaintMenuBackground(SkCanvas* canvas, const gfx::Rect& rect) const;
134 136
135 // Paint directly to canvas' HDC. 137 // Paint directly to canvas' HDC.
136 void PaintDirect(SkCanvas* destination_canvas, 138 void PaintDirect(SkCanvas* destination_canvas,
137 HDC hdc, 139 HDC hdc,
138 Part part, 140 Part part,
139 State state, 141 State state,
140 const gfx::Rect& rect, 142 const gfx::Rect& rect,
141 const ExtraParams& extra) const; 143 const ExtraParams& extra) const;
(...skipping 16 matching lines...) Expand all
158 SIZE* size) const; 160 SIZE* size) const;
159 161
160 HRESULT PaintButton(HDC hdc, 162 HRESULT PaintButton(HDC hdc,
161 State state, 163 State state,
162 const ButtonExtraParams& extra, 164 const ButtonExtraParams& extra,
163 int part_id, 165 int part_id,
164 int state_id, 166 int state_id,
165 RECT* rect) const; 167 RECT* rect) const;
166 168
167 HRESULT PaintMenuSeparator(HDC hdc, 169 HRESULT PaintMenuSeparator(HDC hdc,
168 const gfx::Rect& rect) const; 170 const gfx::Rect& rect,
171 const MenuSeparatorExtraParams& extra) const;
169 172
170 HRESULT PaintMenuGutter(HDC hdc, const gfx::Rect& rect) const; 173 HRESULT PaintMenuGutter(HDC hdc, const gfx::Rect& rect) const;
171 174
172 // |arrow_direction| determines whether the arrow is pointing to the left or 175 // |arrow_direction| determines whether the arrow is pointing to the left or
173 // to the right. In RTL locales, sub-menus open from right to left and 176 // to the right. In RTL locales, sub-menus open from right to left and
174 // therefore the menu arrow should point to the left and not to the right. 177 // therefore the menu arrow should point to the left and not to the right.
175 HRESULT PaintMenuArrow(HDC hdc, 178 HRESULT PaintMenuArrow(HDC hdc,
176 State state, 179 State state,
177 const gfx::Rect& rect, 180 const gfx::Rect& rect,
178 const MenuArrowExtraParams& extra) const; 181 const MenuArrowExtraParams& extra) const;
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 374
372 // Is |is_using_high_contrast_| valid? 375 // Is |is_using_high_contrast_| valid?
373 mutable bool is_using_high_contrast_valid_; 376 mutable bool is_using_high_contrast_valid_;
374 377
375 DISALLOW_COPY_AND_ASSIGN(NativeThemeWin); 378 DISALLOW_COPY_AND_ASSIGN(NativeThemeWin);
376 }; 379 };
377 380
378 } // namespace ui 381 } // namespace ui
379 382
380 #endif // UI_NATIVE_THEME_NATIVE_THEME_WIN_H_ 383 #endif // UI_NATIVE_THEME_NATIVE_THEME_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698