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

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

Issue 10310136: ui: Move NativeTheme files into ui/base/native_theme/ directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win Created 8 years, 7 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/base/native_theme/native_theme_gtk.cc ('k') | ui/base/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) 2011 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_BASE_NATIVE_THEME_NATIVE_THEME_WIN_H_
6 #define UI_BASE_NATIVE_THEME_NATIVE_THEME_WIN_H_
7 #pragma once
8
5 // A wrapper class for working with custom XP/Vista themes provided in 9 // 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 10 // uxtheme.dll. This is a singleton class that can be grabbed using
7 // NativeThemeWin::instance(). 11 // NativeThemeWin::instance().
8 // For more information on visual style parts and states, see: 12 // 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 13 // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/plat form/commctls/userex/topics/partsandstates.asp
10 14
11 #ifndef UI_GFX_NATIVE_THEME_WIN_H_
12 #define UI_GFX_NATIVE_THEME_WIN_H_
13 #pragma once
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 "base/compiler_specific.h"
20 #include "third_party/skia/include/core/SkColor.h" 20 #include "third_party/skia/include/core/SkColor.h"
21 #include "ui/gfx/native_theme.h" 21 #include "ui/base/native_theme/native_theme.h"
22 #include "ui/gfx/size.h" 22 #include "ui/gfx/size.h"
23 23
24 class SkCanvas; 24 class SkCanvas;
25 25
26 namespace gfx { 26 namespace ui {
27 27
28 // Windows implementation of native theme class. 28 // Windows implementation of native theme class.
29 // 29 //
30 // At the moment, this class in in transition from an older API that consists 30 // At the moment, this class in in transition from an older API that consists
31 // of several PaintXXX methods to an API, inherited from the NativeTheme base 31 // of several PaintXXX methods to an API, inherited from the NativeTheme base
32 // class, that consists of a single Paint() method with a argument to indicate 32 // class, that consists of a single Paint() method with a argument to indicate
33 // what kind of part to paint. 33 // what kind of part to paint.
34 class UI_EXPORT NativeThemeWin : public NativeTheme { 34 class UI_EXPORT NativeThemeWin : public NativeTheme {
35 public: 35 public:
36 enum ThemeName { 36 enum ThemeName {
(...skipping 25 matching lines...) Expand all
62 // by default_sys_color. 62 // by default_sys_color.
63 SkColor GetThemeColorWithDefault(ThemeName theme, 63 SkColor GetThemeColorWithDefault(ThemeName theme,
64 int part_id, 64 int part_id,
65 int state_id, 65 int state_id,
66 int prop_id, 66 int prop_id,
67 int default_sys_color) const; 67 int default_sys_color) const;
68 68
69 // Get the thickness of the border associated with the specified theme, 69 // Get the thickness of the border associated with the specified theme,
70 // defaulting to GetSystemMetrics edge size if themes are disabled. 70 // defaulting to GetSystemMetrics edge size if themes are disabled.
71 // In Classic Windows, borders are typically 2px; on XP+, they are 1px. 71 // In Classic Windows, borders are typically 2px; on XP+, they are 1px.
72 Size GetThemeBorderSize(ThemeName theme) const; 72 gfx::Size GetThemeBorderSize(ThemeName theme) const;
73 73
74 // Disables all theming for top-level windows in the entire process, from 74 // Disables all theming for top-level windows in the entire process, from
75 // when this method is called until the process exits. All the other 75 // when this method is called until the process exits. All the other
76 // methods in this class will continue to work, but their output will ignore 76 // methods in this class will continue to work, but their output will ignore
77 // the user's theme. This is meant for use when running tests that require 77 // the user's theme. This is meant for use when running tests that require
78 // consistent visual results. 78 // consistent visual results.
79 void DisableTheming() const; 79 void DisableTheming() const;
80 80
81 // Closes cached theme handles so we can unload the DLL or update our UI 81 // Closes cached theme handles so we can unload the DLL or update our UI
82 // for a theme change. 82 // for a theme change.
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 319
320 // Handle to uxtheme.dll. 320 // Handle to uxtheme.dll.
321 HMODULE theme_dll_; 321 HMODULE theme_dll_;
322 322
323 // A cache of open theme handles. 323 // A cache of open theme handles.
324 mutable HANDLE theme_handles_[LAST]; 324 mutable HANDLE theme_handles_[LAST];
325 325
326 DISALLOW_COPY_AND_ASSIGN(NativeThemeWin); 326 DISALLOW_COPY_AND_ASSIGN(NativeThemeWin);
327 }; 327 };
328 328
329 } // namespace gfx 329 } // namespace ui
330 330
331 #endif // UI_GFX_NATIVE_THEME_WIN_H_ 331 #endif // UI_BASE_NATIVE_THEME_NATIVE_THEME_WIN_H_
OLDNEW
« no previous file with comments | « ui/base/native_theme/native_theme_gtk.cc ('k') | ui/base/native_theme/native_theme_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698