| OLD | NEW |
| 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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 HRESULT PaintWindowResizeGripper(HDC hdc, const gfx::Rect& rect) const; | 250 HRESULT PaintWindowResizeGripper(HDC hdc, const gfx::Rect& rect) const; |
| 251 | 251 |
| 252 HRESULT PaintTabPanelBackground(HDC hdc, const gfx::Rect& rect) const; | 252 HRESULT PaintTabPanelBackground(HDC hdc, const gfx::Rect& rect) const; |
| 253 | 253 |
| 254 HRESULT PaintTextField(HDC hdc, | 254 HRESULT PaintTextField(HDC hdc, |
| 255 Part part, | 255 Part part, |
| 256 State state, | 256 State state, |
| 257 const gfx::Rect& rect, | 257 const gfx::Rect& rect, |
| 258 const TextFieldExtraParams& extra) const; | 258 const TextFieldExtraParams& extra) const; |
| 259 | 259 |
| 260 // Paints a theme part, with support for scene scaling in high-DPI mode. |
| 261 // |theme| is the theme handle. |hdc| is the handle for the device context. |
| 262 // |part_id| is the identifier for the part (e.g. thumb gripper). |state_id| |
| 263 // is the identifier for the rendering state of the part (e.g. hover). |rect| |
| 264 // is the bounds for rendering, expressed in logical coordinates. |
| 265 HRESULT PaintScaledTheme(HANDLE theme, |
| 266 HDC hdc, |
| 267 int part_id, |
| 268 int state_id, |
| 269 const gfx::Rect& rect) const; |
| 260 | 270 |
| 261 // Get the windows theme name/part/state. These three helper functions are | 271 // Get the windows theme name/part/state. These three helper functions are |
| 262 // used only by GetPartSize(), as each of the corresponding PaintXXX() | 272 // used only by GetPartSize(), as each of the corresponding PaintXXX() |
| 263 // methods do further validation of the part and state that is required for | 273 // methods do further validation of the part and state that is required for |
| 264 // getting the size. | 274 // getting the size. |
| 265 static ThemeName GetThemeName(Part part); | 275 static ThemeName GetThemeName(Part part); |
| 266 static int GetWindowsPart(Part part, State state, const ExtraParams& extra); | 276 static int GetWindowsPart(Part part, State state, const ExtraParams& extra); |
| 267 static int GetWindowsState(Part part, State state, const ExtraParams& extra); | 277 static int GetWindowsState(Part part, State state, const ExtraParams& extra); |
| 268 | 278 |
| 269 HRESULT GetThemeInt(ThemeName theme, | 279 HRESULT GetThemeInt(ThemeName theme, |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 // The system color change listener and the updated cache of system colors. | 355 // The system color change listener and the updated cache of system colors. |
| 346 gfx::ScopedSysColorChangeListener color_change_listener_; | 356 gfx::ScopedSysColorChangeListener color_change_listener_; |
| 347 mutable std::map<int, SkColor> system_colors_; | 357 mutable std::map<int, SkColor> system_colors_; |
| 348 | 358 |
| 349 DISALLOW_COPY_AND_ASSIGN(NativeThemeWin); | 359 DISALLOW_COPY_AND_ASSIGN(NativeThemeWin); |
| 350 }; | 360 }; |
| 351 | 361 |
| 352 } // namespace ui | 362 } // namespace ui |
| 353 | 363 |
| 354 #endif // UI_NATIVE_THEME_NATIVE_THEME_WIN_H_ | 364 #endif // UI_NATIVE_THEME_NATIVE_THEME_WIN_H_ |
| OLD | NEW |