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

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

Issue 7778036: ui/gfx: Get rid of a few static variables from NativeTheme* type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use base::LazyInstance Created 9 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « ui/gfx/native_theme_linux.cc ('k') | ui/gfx/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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // A wrapper class for working with custom XP/Vista themes provided in 5 // A wrapper class for working with custom XP/Vista themes provided in
6 // uxtheme.dll. This is a singleton class that can be grabbed using 6 // uxtheme.dll. This is a singleton class that can be grabbed using
7 // NativeThemeWin::instance(). 7 // NativeThemeWin::instance().
8 // For more information on visual style parts and states, see: 8 // For more information on visual style parts and states, see:
9 // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/plat form/commctls/userex/topics/partsandstates.asp 9 // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/plat form/commctls/userex/topics/partsandstates.asp
10 10
(...skipping 30 matching lines...) Expand all
41 STATUS, 41 STATUS,
42 TAB, 42 TAB,
43 TEXTFIELD, 43 TEXTFIELD,
44 TRACKBAR, 44 TRACKBAR,
45 WINDOW, 45 WINDOW,
46 PROGRESS, 46 PROGRESS,
47 SPIN, 47 SPIN,
48 LAST 48 LAST
49 }; 49 };
50 50
51 NativeThemeWin();
52 virtual ~NativeThemeWin();
53
51 bool IsThemingActive() const; 54 bool IsThemingActive() const;
52 55
53 HRESULT GetThemeColor(ThemeName theme, 56 HRESULT GetThemeColor(ThemeName theme,
54 int part_id, 57 int part_id,
55 int state_id, 58 int state_id,
56 int prop_id, 59 int prop_id,
57 SkColor* color) const; 60 SkColor* color) const;
58 61
59 // Get the theme color if theming is enabled. If theming is unsupported 62 // Get the theme color if theming is enabled. If theming is unsupported
60 // for this part, use Win32's GetSysColor to find the color specified 63 // for this part, use Win32's GetSysColor to find the color specified
(...skipping 29 matching lines...) Expand all
90 HRESULT PaintTextField(HDC hdc, 93 HRESULT PaintTextField(HDC hdc,
91 int part_id, 94 int part_id,
92 int state_id, 95 int state_id,
93 int classic_state, 96 int classic_state,
94 RECT* rect, 97 RECT* rect,
95 COLORREF color, 98 COLORREF color,
96 bool fill_content_area, 99 bool fill_content_area,
97 bool draw_edges) const; 100 bool draw_edges) const;
98 101
99 private: 102 private:
100 NativeThemeWin();
101 ~NativeThemeWin();
102
103 // NativeTheme Implementation: 103 // NativeTheme Implementation:
104 virtual gfx::Size GetPartSize(Part part, 104 virtual gfx::Size GetPartSize(Part part,
105 State state, 105 State state,
106 const ExtraParams& extra) const; 106 const ExtraParams& extra) const;
107 virtual void Paint(SkCanvas* canvas, 107 virtual void Paint(SkCanvas* canvas,
108 Part part, 108 Part part,
109 State state, 109 State state,
110 const gfx::Rect& rect, 110 const gfx::Rect& rect,
111 const ExtraParams& extra) const; 111 const ExtraParams& extra) const;
112 112
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 320
321 // A cache of open theme handles. 321 // A cache of open theme handles.
322 mutable HANDLE theme_handles_[LAST]; 322 mutable HANDLE theme_handles_[LAST];
323 323
324 DISALLOW_COPY_AND_ASSIGN(NativeThemeWin); 324 DISALLOW_COPY_AND_ASSIGN(NativeThemeWin);
325 }; 325 };
326 326
327 } // namespace gfx 327 } // namespace gfx
328 328
329 #endif // UI_GFX_NATIVE_THEME_WIN_H_ 329 #endif // UI_GFX_NATIVE_THEME_WIN_H_
OLDNEW
« no previous file with comments | « ui/gfx/native_theme_linux.cc ('k') | ui/gfx/native_theme_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698