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 #include "ui/native_theme/native_theme_win.h" | 5 #include "ui/native_theme/native_theme_win.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <uxtheme.h> | 9 #include <uxtheme.h> |
10 #include <vsstyle.h> | 10 #include <vsstyle.h> |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 return; | 286 return; |
287 case kMenuItemBackground: | 287 case kMenuItemBackground: |
288 CommonThemePaintMenuItemBackground(this, canvas, state, rect, | 288 CommonThemePaintMenuItemBackground(this, canvas, state, rect, |
289 extra.menu_item); | 289 extra.menu_item); |
290 return; | 290 return; |
291 default: | 291 default: |
292 break; | 292 break; |
293 } | 293 } |
294 | 294 |
295 skia::ScopedPlatformPaint paint(canvas); | 295 skia::ScopedPlatformPaint paint(canvas); |
296 HDC surface = paint.GetPlatformSurface(); | 296 HDC surface = paint.GetNativeDrawingContext(); |
297 | 297 |
298 // When drawing the task manager or the bookmark editor, we draw into an | 298 // When drawing the task manager or the bookmark editor, we draw into an |
299 // offscreen buffer, where we can use OS-specific drawing routines for | 299 // offscreen buffer, where we can use OS-specific drawing routines for |
300 // UI features like scrollbars. However, we need to set up that buffer, | 300 // UI features like scrollbars. However, we need to set up that buffer, |
301 // and then read it back when it's done and blit it onto the screen. | 301 // and then read it back when it's done and blit it onto the screen. |
302 | 302 |
303 if (skia::SupportsPlatformPaint(canvas)) | 303 if (skia::SupportsPlatformPaint(canvas)) |
304 PaintDirect(canvas, surface, part, state, rect, extra); | 304 PaintDirect(canvas, surface, part, state, rect, extra); |
305 else | 305 else |
306 PaintIndirect(canvas, surface, part, state, rect, extra); | 306 PaintIndirect(canvas, surface, part, state, rect, extra); |
(...skipping 1805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2112 break; | 2112 break; |
2113 case LAST: | 2113 case LAST: |
2114 NOTREACHED(); | 2114 NOTREACHED(); |
2115 break; | 2115 break; |
2116 } | 2116 } |
2117 theme_handles_[theme_name] = handle; | 2117 theme_handles_[theme_name] = handle; |
2118 return handle; | 2118 return handle; |
2119 } | 2119 } |
2120 | 2120 |
2121 } // namespace ui | 2121 } // namespace ui |
OLD | NEW |