Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(367)

Side by Side Diff: cc/blink/web_scrollbar_layer_impl.cc

Issue 470983004: Move blink<->cc bindings to cc/blink (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/blink/web_scrollbar_layer_impl.h ('k') | cc/blink/web_to_cc_animation_delegate_adapter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/renderer/compositor_bindings/web_scrollbar_layer_impl.h" 5 #include "cc/blink/web_scrollbar_layer_impl.h"
6 6
7 #include "cc/blink/scrollbar_impl.h"
8 #include "cc/blink/web_layer_impl.h"
7 #include "cc/layers/layer.h" 9 #include "cc/layers/layer.h"
8 #include "cc/layers/painted_scrollbar_layer.h" 10 #include "cc/layers/painted_scrollbar_layer.h"
9 #include "cc/layers/scrollbar_layer_interface.h" 11 #include "cc/layers/scrollbar_layer_interface.h"
10 #include "cc/layers/solid_color_scrollbar_layer.h" 12 #include "cc/layers/solid_color_scrollbar_layer.h"
11 #include "content/renderer/compositor_bindings/scrollbar_impl.h"
12 #include "content/renderer/compositor_bindings/web_layer_impl.h"
13 13
14 using cc::PaintedScrollbarLayer; 14 using cc::PaintedScrollbarLayer;
15 using cc::SolidColorScrollbarLayer; 15 using cc::SolidColorScrollbarLayer;
16 16
17 namespace { 17 namespace {
18 18
19 cc::ScrollbarOrientation ConvertOrientation( 19 cc::ScrollbarOrientation ConvertOrientation(
20 blink::WebScrollbar::Orientation orientation) { 20 blink::WebScrollbar::Orientation orientation) {
21 return orientation == blink::WebScrollbar::Horizontal ? cc::HORIZONTAL 21 return orientation == blink::WebScrollbar::Horizontal ? cc::HORIZONTAL
22 : cc::VERTICAL; 22 : cc::VERTICAL;
23 } 23 }
24 24
25 } // namespace 25 } // namespace
26 26
27 namespace content { 27 namespace cc_blink {
28 28
29 WebScrollbarLayerImpl::WebScrollbarLayerImpl( 29 WebScrollbarLayerImpl::WebScrollbarLayerImpl(
30 blink::WebScrollbar* scrollbar, 30 blink::WebScrollbar* scrollbar,
31 blink::WebScrollbarThemePainter painter, 31 blink::WebScrollbarThemePainter painter,
32 blink::WebScrollbarThemeGeometry* geometry) 32 blink::WebScrollbarThemeGeometry* geometry)
33 : layer_(new WebLayerImpl(PaintedScrollbarLayer::Create( 33 : layer_(new WebLayerImpl(PaintedScrollbarLayer::Create(
34 scoped_ptr<cc::Scrollbar>( 34 scoped_ptr<cc::Scrollbar>(
35 new ScrollbarImpl(make_scoped_ptr(scrollbar), 35 new ScrollbarImpl(make_scoped_ptr(scrollbar),
36 painter, 36 painter,
37 make_scoped_ptr(geometry))).Pass(), 37 make_scoped_ptr(geometry))).Pass(),
(...skipping 25 matching lines...) Expand all
63 layer ? static_cast<WebLayerImpl*>(layer)->layer() : 0; 63 layer ? static_cast<WebLayerImpl*>(layer)->layer() : 0;
64 layer_->layer()->ToScrollbarLayer()->SetScrollLayer(scroll_layer->id()); 64 layer_->layer()->ToScrollbarLayer()->SetScrollLayer(scroll_layer->id());
65 } 65 }
66 66
67 void WebScrollbarLayerImpl::setClipLayer(blink::WebLayer* layer) { 67 void WebScrollbarLayerImpl::setClipLayer(blink::WebLayer* layer) {
68 cc::Layer* clip_layer = 68 cc::Layer* clip_layer =
69 layer ? static_cast<WebLayerImpl*>(layer)->layer() : 0; 69 layer ? static_cast<WebLayerImpl*>(layer)->layer() : 0;
70 layer_->layer()->ToScrollbarLayer()->SetClipLayer(clip_layer->id()); 70 layer_->layer()->ToScrollbarLayer()->SetClipLayer(clip_layer->id());
71 } 71 }
72 72
73 } // namespace content 73 } // namespace cc_blink
74
OLDNEW
« no previous file with comments | « cc/blink/web_scrollbar_layer_impl.h ('k') | cc/blink/web_to_cc_animation_delegate_adapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698