| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_aurawin.h" | 5 #include "ui/native_theme/native_theme_aurawin.h" |
| 6 | 6 |
| 7 #include "third_party/skia/include/core/SkCanvas.h" | 7 #include "third_party/skia/include/core/SkCanvas.h" |
| 8 #include "ui/native_theme/common_theme.h" | 8 #include "ui/native_theme/common_theme.h" |
| 9 #include "ui/native_theme/native_theme_win.h" | 9 #include "ui/native_theme/native_theme_win.h" |
| 10 | 10 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 NativeThemeWin::instance()->Paint(canvas, part, state, rect, extra); | 65 NativeThemeWin::instance()->Paint(canvas, part, state, rect, extra); |
| 66 return; | 66 return; |
| 67 } | 67 } |
| 68 | 68 |
| 69 NativeThemeAura::Paint(canvas, part, state, rect, extra); | 69 NativeThemeAura::Paint(canvas, part, state, rect, extra); |
| 70 } | 70 } |
| 71 | 71 |
| 72 gfx::Size NativeThemeAuraWin::GetPartSize(Part part, | 72 gfx::Size NativeThemeAuraWin::GetPartSize(Part part, |
| 73 State state, | 73 State state, |
| 74 const ExtraParams& extra) const { | 74 const ExtraParams& extra) const { |
| 75 gfx::Size part_size = CommonThemeGetPartSize(part, state, extra); | |
| 76 if (!part_size.IsEmpty()) | |
| 77 return part_size; | |
| 78 | |
| 79 // We want aura on windows to use the same size for scrollbars as we would in | 75 // We want aura on windows to use the same size for scrollbars as we would in |
| 80 // the native theme. | 76 // the native theme. |
| 81 if (IsScrollbarPart(part)) | 77 if (IsScrollbarPart(part)) |
| 82 return NativeThemeWin::instance()->GetPartSize(part, state, extra); | 78 return NativeThemeWin::instance()->GetPartSize(part, state, extra); |
| 83 | 79 |
| 84 return NativeThemeAura::GetPartSize(part, state, extra); | 80 return NativeThemeAura::GetPartSize(part, state, extra); |
| 85 } | 81 } |
| 86 | 82 |
| 87 } // namespace ui | 83 } // namespace ui |
| OLD | NEW |