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

Unified Diff: ui/native_theme/native_theme_win.h

Issue 2181153002: Revert of Remove NativeThemeWin::PaintIndirect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/native_theme/native_theme_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/native_theme/native_theme_win.h
diff --git a/ui/native_theme/native_theme_win.h b/ui/native_theme/native_theme_win.h
index 8f8597badc52f5af872491f9b862defd2dfdddd2..03483650bc57ab4f54b36911a12a9fb7621e5696 100644
--- a/ui/native_theme/native_theme_win.h
+++ b/ui/native_theme/native_theme_win.h
@@ -130,6 +130,22 @@
void PaintMenuGutter(SkCanvas* canvas, const gfx::Rect& rect) const;
void PaintMenuBackground(SkCanvas* canvas, const gfx::Rect& rect) const;
+ // Paint directly to canvas' HDC.
+ void PaintDirect(SkCanvas* canvas,
+ Part part,
+ State state,
+ const gfx::Rect& rect,
+ const ExtraParams& extra) const;
+
+ // Create a temporary HDC, paint to that, clean up the alpha values in the
+ // temporary HDC, and then blit the result to canvas. This is to work around
+ // the fact that Windows XP and some classic themes give bogus alpha values.
+ void PaintIndirect(SkCanvas* canvas,
+ Part part,
+ State state,
+ const gfx::Rect& rect,
+ const ExtraParams& extra) const;
+
HRESULT GetThemePartSize(ThemeName themeName,
HDC hdc,
int part_id,
@@ -145,6 +161,11 @@
int state_id,
RECT* rect) const;
+ HRESULT PaintMenuSeparator(HDC hdc,
+ const gfx::Rect& rect) const;
+
+ HRESULT PaintMenuGutter(HDC hdc, const gfx::Rect& rect) const;
+
// |arrow_direction| determines whether the arrow is pointing to the left or
// to the right. In RTL locales, sub-menus open from right to left and
// therefore the menu arrow should point to the left and not to the right.
@@ -153,6 +174,8 @@
const gfx::Rect& rect,
const MenuArrowExtraParams& extra) const;
+ HRESULT PaintMenuBackground(HDC hdc, const gfx::Rect& rect) const;
+
HRESULT PaintMenuCheck(HDC hdc,
State state,
const gfx::Rect& rect,
@@ -161,6 +184,11 @@
HRESULT PaintMenuCheckBackground(HDC hdc,
State state,
const gfx::Rect& rect) const;
+
+ HRESULT PaintMenuItemBackground(HDC hdc,
+ State state,
+ const gfx::Rect& rect,
+ const MenuItemExtraParams& extra) const;
HRESULT PaintPushButton(HDC hdc,
Part part,
« no previous file with comments | « no previous file | ui/native_theme/native_theme_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698