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

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

Issue 8597015: Add a new GetSystemColor method to native theme. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more code motion Created 9 years, 1 month 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_gtk.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
11 #ifndef UI_GFX_NATIVE_THEME_WIN_H_ 11 #ifndef UI_GFX_NATIVE_THEME_WIN_H_
12 #define UI_GFX_NATIVE_THEME_WIN_H_ 12 #define UI_GFX_NATIVE_THEME_WIN_H_
13 #pragma once 13 #pragma once
14 14
15 #include <windows.h> 15 #include <windows.h>
16 #include <uxtheme.h> 16 #include <uxtheme.h>
17 17
18 #include "base/basictypes.h" 18 #include "base/basictypes.h"
19 #include "base/compiler_specific.h"
19 #include "third_party/skia/include/core/SkColor.h" 20 #include "third_party/skia/include/core/SkColor.h"
20 #include "ui/gfx/native_theme.h" 21 #include "ui/gfx/native_theme.h"
21 #include "ui/gfx/size.h" 22 #include "ui/gfx/size.h"
22 23
23 class SkCanvas; 24 class SkCanvas;
24 25
25 namespace gfx { 26 namespace gfx {
26 27
27 // Windows implementation of native theme class. 28 // Windows implementation of native theme class.
28 // 29 //
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 bool fill_content_area, 97 bool fill_content_area,
97 bool draw_edges) const; 98 bool draw_edges) const;
98 99
99 private: 100 private:
100 NativeThemeWin(); 101 NativeThemeWin();
101 ~NativeThemeWin(); 102 ~NativeThemeWin();
102 103
103 // NativeTheme Implementation: 104 // NativeTheme Implementation:
104 virtual gfx::Size GetPartSize(Part part, 105 virtual gfx::Size GetPartSize(Part part,
105 State state, 106 State state,
106 const ExtraParams& extra) const; 107 const ExtraParams& extra) const OVERRIDE;
107 virtual void Paint(SkCanvas* canvas, 108 virtual void Paint(SkCanvas* canvas,
108 Part part, 109 Part part,
109 State state, 110 State state,
110 const gfx::Rect& rect, 111 const gfx::Rect& rect,
111 const ExtraParams& extra) const; 112 const ExtraParams& extra) const OVERRIDE;
113 virtual SkColor GetSystemColor(ColorId color_id) const OVERRIDE;
112 114
113 void PaintToNonPlatformCanvas(SkCanvas* canvas, 115 void PaintToNonPlatformCanvas(SkCanvas* canvas,
114 Part part, 116 Part part,
115 State state, 117 State state,
116 const gfx::Rect& rect, 118 const gfx::Rect& rect,
117 const ExtraParams& extra) const; 119 const ExtraParams& extra) const;
118 120
119 HRESULT GetThemePartSize(ThemeName themeName, 121 HRESULT GetThemePartSize(ThemeName themeName,
120 HDC hdc, 122 HDC hdc,
121 int part_id, 123 int part_id,
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 322
321 // A cache of open theme handles. 323 // A cache of open theme handles.
322 mutable HANDLE theme_handles_[LAST]; 324 mutable HANDLE theme_handles_[LAST];
323 325
324 DISALLOW_COPY_AND_ASSIGN(NativeThemeWin); 326 DISALLOW_COPY_AND_ASSIGN(NativeThemeWin);
325 }; 327 };
326 328
327 } // namespace gfx 329 } // namespace gfx
328 330
329 #endif // UI_GFX_NATIVE_THEME_WIN_H_ 331 #endif // UI_GFX_NATIVE_THEME_WIN_H_
OLDNEW
« no previous file with comments | « ui/gfx/native_theme_gtk.cc ('k') | ui/gfx/native_theme_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698