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 "webkit/renderer/compositor_bindings/web_compositor_support_impl.h" | 5 #include "webkit/renderer/compositor_bindings/web_compositor_support_impl.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/message_loop/message_loop_proxy.h" | 8 #include "base/message_loop/message_loop_proxy.h" |
9 #include "cc/animation/transform_operations.h" | 9 #include "cc/animation/transform_operations.h" |
10 #include "cc/output/output_surface.h" | 10 #include "cc/output/output_surface.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 } | 71 } |
72 | 72 |
73 WebSolidColorLayer* WebCompositorSupportImpl::createSolidColorLayer() { | 73 WebSolidColorLayer* WebCompositorSupportImpl::createSolidColorLayer() { |
74 return new WebSolidColorLayerImpl(); | 74 return new WebSolidColorLayerImpl(); |
75 } | 75 } |
76 | 76 |
77 WebScrollbarLayer* WebCompositorSupportImpl::createScrollbarLayer( | 77 WebScrollbarLayer* WebCompositorSupportImpl::createScrollbarLayer( |
78 WebScrollbar* scrollbar, | 78 WebScrollbar* scrollbar, |
79 WebScrollbarThemePainter painter, | 79 WebScrollbarThemePainter painter, |
80 WebScrollbarThemeGeometry* geometry) { | 80 WebScrollbarThemeGeometry* geometry) { |
| 81 // TODO(wjmaclean) Remove the Android-specific if-clause here once the |
| 82 // Blink-side changes are made to call createSolidColorScrollbarLayer() |
| 83 // directly. |
| 84 #if defined(OS_ANDROID) |
| 85 const int kThumbThickness = 3; |
| 86 return new WebScrollbarLayerImpl(scrollbar->orientation(), kThumbThickness); |
| 87 #else |
81 return new WebScrollbarLayerImpl(scrollbar, painter, geometry); | 88 return new WebScrollbarLayerImpl(scrollbar, painter, geometry); |
| 89 #endif |
| 90 } |
| 91 |
| 92 WebScrollbarLayer* WebCompositorSupportImpl::createSolidColorScrollbarLayer( |
| 93 WebKit::WebScrollbar::Orientation orientation, int thumb_thickness) { |
| 94 return new WebScrollbarLayerImpl(orientation, thumb_thickness); |
82 } | 95 } |
83 | 96 |
84 WebAnimation* WebCompositorSupportImpl::createAnimation( | 97 WebAnimation* WebCompositorSupportImpl::createAnimation( |
85 const WebKit::WebAnimationCurve& curve, | 98 const WebKit::WebAnimationCurve& curve, |
86 WebKit::WebAnimation::TargetProperty target, | 99 WebKit::WebAnimation::TargetProperty target, |
87 int animation_id) { | 100 int animation_id) { |
88 return new WebAnimationImpl(curve, target, animation_id, 0); | 101 return new WebAnimationImpl(curve, target, animation_id, 0); |
89 } | 102 } |
90 | 103 |
91 WebFloatAnimationCurve* WebCompositorSupportImpl::createFloatAnimationCurve() { | 104 WebFloatAnimationCurve* WebCompositorSupportImpl::createFloatAnimationCurve() { |
92 return new WebFloatAnimationCurveImpl(); | 105 return new WebFloatAnimationCurveImpl(); |
93 } | 106 } |
94 | 107 |
95 WebTransformAnimationCurve* | 108 WebTransformAnimationCurve* |
96 WebCompositorSupportImpl::createTransformAnimationCurve() { | 109 WebCompositorSupportImpl::createTransformAnimationCurve() { |
97 return new WebTransformAnimationCurveImpl(); | 110 return new WebTransformAnimationCurveImpl(); |
98 } | 111 } |
99 | 112 |
100 WebTransformOperations* WebCompositorSupportImpl::createTransformOperations() { | 113 WebTransformOperations* WebCompositorSupportImpl::createTransformOperations() { |
101 return new WebTransformOperationsImpl(); | 114 return new WebTransformOperationsImpl(); |
102 } | 115 } |
103 | 116 |
104 WebFilterOperations* WebCompositorSupportImpl::createFilterOperations() { | 117 WebFilterOperations* WebCompositorSupportImpl::createFilterOperations() { |
105 return new WebFilterOperationsImpl(); | 118 return new WebFilterOperationsImpl(); |
106 } | 119 } |
107 | 120 |
108 } // namespace webkit | 121 } // namespace webkit |
OLD | NEW |