| 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_aura.h" | 5 #include "ui/native_theme/native_theme_aura.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 State state, | 173 State state, |
| 174 const ScrollbarTrackExtraParams& extra_params, | 174 const ScrollbarTrackExtraParams& extra_params, |
| 175 const gfx::Rect& rect) const { | 175 const gfx::Rect& rect) const { |
| 176 // Overlay Scrollbar should never paint a scrollbar track. | 176 // Overlay Scrollbar should never paint a scrollbar track. |
| 177 DCHECK(!IsOverlayScrollbarEnabled()); | 177 DCHECK(!IsOverlayScrollbarEnabled()); |
| 178 SkPaint paint; | 178 SkPaint paint; |
| 179 paint.setColor(kTrackColor); | 179 paint.setColor(kTrackColor); |
| 180 canvas->drawIRect(gfx::RectToSkIRect(rect), paint); | 180 canvas->drawIRect(gfx::RectToSkIRect(rect), paint); |
| 181 } | 181 } |
| 182 | 182 |
| 183 void NativeThemeAura::PaintScrollbarThumb(SkCanvas* canvas, | 183 void NativeThemeAura::PaintScrollbarThumb( |
| 184 Part part, | 184 SkCanvas* canvas, |
| 185 State state, | 185 Part part, |
| 186 const gfx::Rect& rect) const { | 186 State state, |
| 187 const ScrollbarThumbExtraParams& extra_params, |
| 188 const gfx::Rect& rect) const { |
| 187 // Do not paint if state is disabled. | 189 // Do not paint if state is disabled. |
| 188 if (state == kDisabled) | 190 if (state == kDisabled) |
| 189 return; | 191 return; |
| 190 | 192 |
| 191 PaintScrollbarThumbStateTransition(canvas, part, state, state, 1.0, rect); | 193 PaintScrollbarThumbStateTransition(canvas, part, state, state, 1.0, rect); |
| 192 } | 194 } |
| 193 | 195 |
| 194 void NativeThemeAura::PaintScrollbarThumbStateTransition( | 196 void NativeThemeAura::PaintScrollbarThumbStateTransition( |
| 195 SkCanvas* canvas, | 197 SkCanvas* canvas, |
| 196 Part part, | 198 Part part, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 State state, | 237 State state, |
| 236 const gfx::Rect& rect) const { | 238 const gfx::Rect& rect) const { |
| 237 // Overlay Scrollbar should never paint a scrollbar corner. | 239 // Overlay Scrollbar should never paint a scrollbar corner. |
| 238 DCHECK(!IsOverlayScrollbarEnabled()); | 240 DCHECK(!IsOverlayScrollbarEnabled()); |
| 239 SkPaint paint; | 241 SkPaint paint; |
| 240 paint.setColor(SkColorSetRGB(0xDC, 0xDC, 0xDC)); | 242 paint.setColor(SkColorSetRGB(0xDC, 0xDC, 0xDC)); |
| 241 canvas->drawIRect(RectToSkIRect(rect), paint); | 243 canvas->drawIRect(RectToSkIRect(rect), paint); |
| 242 } | 244 } |
| 243 | 245 |
| 244 } // namespace ui | 246 } // namespace ui |
| OLD | NEW |