OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "cc/scrollbar_layer_impl.h" | 5 #include "cc/scrollbar_layer_impl.h" |
6 | 6 |
7 #include "cc/quad_sink.h" | 7 #include "cc/quad_sink.h" |
8 #include "cc/scrollbar_animation_controller.h" | 8 #include "cc/scrollbar_animation_controller.h" |
9 #include "cc/texture_draw_quad.h" | 9 #include "cc/texture_draw_quad.h" |
10 #include "ui/gfx/rect_conversions.h" | 10 #include "ui/gfx/rect_conversions.h" |
11 | 11 |
12 using WebKit::WebRect; | 12 using WebKit::WebRect; |
13 using WebKit::WebScrollbar; | 13 using WebKit::WebScrollbar; |
14 | 14 |
15 namespace cc { | 15 namespace cc { |
16 | 16 |
17 scoped_ptr<ScrollbarLayerImpl> ScrollbarLayerImpl::create(LayerTreeHostImpl* hos
tImpl, int id) | 17 scoped_ptr<ScrollbarLayerImpl> ScrollbarLayerImpl::create(LayerTreeImpl* treeImp
l, int id) |
18 { | 18 { |
19 return make_scoped_ptr(new ScrollbarLayerImpl(hostImpl, id)); | 19 return make_scoped_ptr(new ScrollbarLayerImpl(treeImpl, id)); |
20 } | 20 } |
21 | 21 |
22 ScrollbarLayerImpl::ScrollbarLayerImpl(LayerTreeHostImpl* hostImpl, int id) | 22 ScrollbarLayerImpl::ScrollbarLayerImpl(LayerTreeImpl* treeImpl, int id) |
23 : LayerImpl(hostImpl, id) | 23 : LayerImpl(treeImpl, id) |
24 , m_scrollbar(this) | 24 , m_scrollbar(this) |
25 , m_backTrackResourceId(0) | 25 , m_backTrackResourceId(0) |
26 , m_foreTrackResourceId(0) | 26 , m_foreTrackResourceId(0) |
27 , m_thumbResourceId(0) | 27 , m_thumbResourceId(0) |
28 , m_scrollbarOverlayStyle(WebScrollbar::ScrollbarOverlayStyleDefault) | 28 , m_scrollbarOverlayStyle(WebScrollbar::ScrollbarOverlayStyleDefault) |
29 , m_orientation(WebScrollbar::Horizontal) | 29 , m_orientation(WebScrollbar::Horizontal) |
30 , m_controlSize(WebScrollbar::RegularScrollbar) | 30 , m_controlSize(WebScrollbar::RegularScrollbar) |
31 , m_pressedPart(WebScrollbar::NoPart) | 31 , m_pressedPart(WebScrollbar::NoPart) |
32 , m_hoveredPart(WebScrollbar::NoPart) | 32 , m_hoveredPart(WebScrollbar::NoPart) |
33 , m_isScrollableAreaActive(false) | 33 , m_isScrollableAreaActive(false) |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 { | 211 { |
212 return m_owner->m_isCustomScrollbar; | 212 return m_owner->m_isCustomScrollbar; |
213 } | 213 } |
214 | 214 |
215 const char* ScrollbarLayerImpl::layerTypeAsString() const | 215 const char* ScrollbarLayerImpl::layerTypeAsString() const |
216 { | 216 { |
217 return "ScrollbarLayer"; | 217 return "ScrollbarLayer"; |
218 } | 218 } |
219 | 219 |
220 } // namespace cc | 220 } // namespace cc |
OLD | NEW |