| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "webkit/renderer/compositor_bindings/scrollbar_impl.h" | 5 #include "webkit/renderer/compositor_bindings/scrollbar_impl.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "third_party/WebKit/public/platform/WebScrollbar.h" | 8 #include "third_party/WebKit/public/platform/WebScrollbar.h" |
| 9 #include "third_party/WebKit/public/platform/WebScrollbarThemeGeometry.h" | 9 #include "third_party/WebKit/public/platform/WebScrollbarThemeGeometry.h" |
| 10 | 10 |
| 11 using WebKit::WebScrollbar; | 11 using blink::WebScrollbar; |
| 12 | 12 |
| 13 namespace webkit { | 13 namespace webkit { |
| 14 | 14 |
| 15 ScrollbarImpl::ScrollbarImpl( | 15 ScrollbarImpl::ScrollbarImpl( |
| 16 scoped_ptr<WebScrollbar> scrollbar, | 16 scoped_ptr<WebScrollbar> scrollbar, |
| 17 WebKit::WebScrollbarThemePainter painter, | 17 blink::WebScrollbarThemePainter painter, |
| 18 scoped_ptr<WebKit::WebScrollbarThemeGeometry> geometry) | 18 scoped_ptr<blink::WebScrollbarThemeGeometry> geometry) |
| 19 : scrollbar_(scrollbar.Pass()), | 19 : scrollbar_(scrollbar.Pass()), |
| 20 painter_(painter), | 20 painter_(painter), |
| 21 geometry_(geometry.Pass()) {} | 21 geometry_(geometry.Pass()) {} |
| 22 | 22 |
| 23 ScrollbarImpl::~ScrollbarImpl() {} | 23 ScrollbarImpl::~ScrollbarImpl() {} |
| 24 | 24 |
| 25 cc::ScrollbarOrientation ScrollbarImpl::Orientation() const { | 25 cc::ScrollbarOrientation ScrollbarImpl::Orientation() const { |
| 26 if (scrollbar_->orientation() == WebScrollbar::Horizontal) | 26 if (scrollbar_->orientation() == WebScrollbar::Horizontal) |
| 27 return cc::HORIZONTAL; | 27 return cc::HORIZONTAL; |
| 28 return cc::VERTICAL; | 28 return cc::VERTICAL; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 bool thumb_present = geometry_->hasThumb(scrollbar_.get()); | 97 bool thumb_present = geometry_->hasThumb(scrollbar_.get()); |
| 98 if (thumb_present) { | 98 if (thumb_present) { |
| 99 painter_.paintForwardTrackPart(canvas, track_paint_rect); | 99 painter_.paintForwardTrackPart(canvas, track_paint_rect); |
| 100 painter_.paintBackTrackPart(canvas, track_paint_rect); | 100 painter_.paintBackTrackPart(canvas, track_paint_rect); |
| 101 } | 101 } |
| 102 | 102 |
| 103 painter_.paintTickmarks(canvas, track_paint_rect); | 103 painter_.paintTickmarks(canvas, track_paint_rect); |
| 104 } | 104 } |
| 105 | 105 |
| 106 } // namespace webkit | 106 } // namespace webkit |
| OLD | NEW |