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

Side by Side Diff: ui/native_theme/native_theme_win.cc

Issue 2711253003: [wip] test branch in win native theme (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | no next file » | 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) 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 return; 273 return;
274 case kMenuItemBackground: 274 case kMenuItemBackground:
275 CommonThemePaintMenuItemBackground(this, canvas, state, rect, 275 CommonThemePaintMenuItemBackground(this, canvas, state, rect,
276 extra.menu_item); 276 extra.menu_item);
277 return; 277 return;
278 default: 278 default:
279 break; 279 break;
280 } 280 }
281 281
282 HDC surface = skia::GetNativeDrawingContext(canvas); 282 HDC surface = skia::GetNativeDrawingContext(canvas);
283 CHECK(!surface);
283 284
284 // When drawing the task manager or the bookmark editor, we draw into an 285 // When drawing the task manager or the bookmark editor, we draw into an
285 // offscreen buffer, where we can use OS-specific drawing routines for 286 // offscreen buffer, where we can use OS-specific drawing routines for
286 // UI features like scrollbars. However, we need to set up that buffer, 287 // UI features like scrollbars. However, we need to set up that buffer,
287 // and then read it back when it's done and blit it onto the screen. 288 // and then read it back when it's done and blit it onto the screen.
288 289
289 if (surface) 290 if (surface)
290 PaintDirect(canvas, surface, part, state, rect, extra); 291 PaintDirect(canvas, surface, part, state, rect, extra);
291 else 292 else
292 PaintIndirect(canvas, part, state, rect, extra); 293 PaintIndirect(canvas, part, state, rect, extra);
(...skipping 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after
2101 break; 2102 break;
2102 case LAST: 2103 case LAST:
2103 NOTREACHED(); 2104 NOTREACHED();
2104 break; 2105 break;
2105 } 2106 }
2106 theme_handles_[theme_name] = handle; 2107 theme_handles_[theme_name] = handle;
2107 return handle; 2108 return handle;
2108 } 2109 }
2109 2110
2110 } // namespace ui 2111 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698