| 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/base/native_theme/native_theme_aura.h" | 5 #include "ui/base/native_theme/native_theme_aura.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "grit/ui_resources.h" | 8 #include "grit/ui_resources.h" |
| 9 #include "ui/base/layout.h" | 9 #include "ui/base/layout.h" |
| 10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 gfx::ImageSkia* center = rb.GetImageSkiaNamed( | 220 gfx::ImageSkia* center = rb.GetImageSkiaNamed( |
| 221 IDR_SCROLL_BASE_HORIZONTAL_CENTER_H); | 221 IDR_SCROLL_BASE_HORIZONTAL_CENTER_H); |
| 222 DrawTiledImage(canvas, *center, | 222 DrawTiledImage(canvas, *center, |
| 223 0, 0, 1.0, 1.0, | 223 0, 0, 1.0, 1.0, |
| 224 rect.x() + center_offset, rect.y(), | 224 rect.x() + center_offset, rect.y(), |
| 225 center_width, center->height()); | 225 center_width, center->height()); |
| 226 } | 226 } |
| 227 } | 227 } |
| 228 } | 228 } |
| 229 | 229 |
| 230 void NativeThemeAura::PaintArrowButton(SkCanvas* canvas, | |
| 231 const gfx::Rect& rect, | |
| 232 Part part, | |
| 233 State state) const { | |
| 234 // TODO(jamescook): Should this paint something? We used to DCHECK() here | |
| 235 // that the rect was empty, but that was failing on about: UI pages. | |
| 236 } | |
| 237 | |
| 238 void NativeThemeAura::PaintScrollbarThumb(SkCanvas* canvas, | 230 void NativeThemeAura::PaintScrollbarThumb(SkCanvas* canvas, |
| 239 Part part, | 231 Part part, |
| 240 State state, | 232 State state, |
| 241 const gfx::Rect& rect) const { | 233 const gfx::Rect& rect) const { |
| 242 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 234 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 243 if (part == kScrollbarVerticalThumb) { | 235 if (part == kScrollbarVerticalThumb) { |
| 244 int top_resource_id = | 236 int top_resource_id = |
| 245 state == kHovered ? IDR_SCROLL_THUMB_VERTICAL_TOP_H : | 237 state == kHovered ? IDR_SCROLL_THUMB_VERTICAL_TOP_H : |
| 246 state == kPressed ? IDR_SCROLL_THUMB_VERTICAL_TOP_P : | 238 state == kPressed ? IDR_SCROLL_THUMB_VERTICAL_TOP_P : |
| 247 IDR_SCROLL_THUMB_VERTICAL_TOP; | 239 IDR_SCROLL_THUMB_VERTICAL_TOP; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 DrawTiledImage(canvas, *center, | 293 DrawTiledImage(canvas, *center, |
| 302 0, 0, 1.0, 1.0, | 294 0, 0, 1.0, 1.0, |
| 303 rect.x() + left->width(), rect.y(), | 295 rect.x() + left->width(), rect.y(), |
| 304 rect.width() - left->width() - right->width(), | 296 rect.width() - left->width() - right->width(), |
| 305 center->height()); | 297 center->height()); |
| 306 } | 298 } |
| 307 } | 299 } |
| 308 } | 300 } |
| 309 | 301 |
| 310 } // namespace ui | 302 } // namespace ui |
| OLD | NEW |