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

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

Issue 2523673004: [NOT FOR COMMIT] Fully replace SkCanvas uses.
Patch Set: Support Android build. Created 4 years 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 | « ui/native_theme/native_theme_win.h ('k') | ui/surface/transport_dib.h » ('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) 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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 state_id, NULL, TS_TRUE, &size))) 263 state_id, NULL, TS_TRUE, &size)))
264 return gfx::Size(size.cx, size.cy); 264 return gfx::Size(size.cx, size.cy);
265 265
266 // TODO(rogerta): For now, we need to support radio buttons and checkboxes 266 // TODO(rogerta): For now, we need to support radio buttons and checkboxes
267 // when theming is not enabled. Support for other parts can be added 267 // when theming is not enabled. Support for other parts can be added
268 // if/when needed. 268 // if/when needed.
269 return (part == kCheckbox || part == kRadio) ? 269 return (part == kCheckbox || part == kRadio) ?
270 gfx::Size(13, 13) : gfx::Size(); 270 gfx::Size(13, 13) : gfx::Size();
271 } 271 }
272 272
273 void NativeThemeWin::Paint(SkCanvas* canvas, 273 void NativeThemeWin::Paint(CdlCanvas* canvas,
274 Part part, 274 Part part,
275 State state, 275 State state,
276 const gfx::Rect& rect, 276 const gfx::Rect& rect,
277 const ExtraParams& extra) const { 277 const ExtraParams& extra) const {
278 if (rect.IsEmpty()) 278 if (rect.IsEmpty())
279 return; 279 return;
280 280
281 switch (part) { 281 switch (part) {
282 case kMenuPopupGutter: 282 case kMenuPopupGutter:
283 PaintMenuGutter(canvas, rect); 283 PaintMenuGutter(canvas, rect);
(...skipping 1818 matching lines...) Expand 10 before | Expand all | Expand 10 after
2102 break; 2102 break;
2103 case LAST: 2103 case LAST:
2104 NOTREACHED(); 2104 NOTREACHED();
2105 break; 2105 break;
2106 } 2106 }
2107 theme_handles_[theme_name] = handle; 2107 theme_handles_[theme_name] = handle;
2108 return handle; 2108 return handle;
2109 } 2109 }
2110 2110
2111 } // namespace ui 2111 } // namespace ui
OLDNEW
« no previous file with comments | « ui/native_theme/native_theme_win.h ('k') | ui/surface/transport_dib.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698