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

Side by Side Diff: webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.cc

Issue 14651027: Move webkit/compositor_bindings into webkit/renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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
OLDNEW
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 "webkit/compositor_bindings/web_scrollbar_layer_impl.h" 5 #include "webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.h"
6 6
7 #include "cc/layers/scrollbar_layer.h" 7 #include "cc/layers/scrollbar_layer.h"
8 #include "webkit/compositor_bindings/web_layer_impl.h" 8 #include "webkit/renderer/compositor_bindings/web_layer_impl.h"
9 #include "webkit/compositor_bindings/web_to_ccscrollbar_theme_painter_adapter.h" 9 #include "webkit/renderer/compositor_bindings/web_to_ccscrollbar_theme_painter_a dapter.h"
10 10
11 using cc::ScrollbarLayer; 11 using cc::ScrollbarLayer;
12 using cc::ScrollbarThemePainter; 12 using cc::ScrollbarThemePainter;
13 using WebKit::WebScrollbarThemePainter; 13 using WebKit::WebScrollbarThemePainter;
14 14
15 namespace webkit { 15 namespace webkit {
16 16
17 WebScrollbarLayerImpl::WebScrollbarLayerImpl( 17 WebScrollbarLayerImpl::WebScrollbarLayerImpl(
18 WebKit::WebScrollbar* scrollbar, 18 WebKit::WebScrollbar* scrollbar,
19 WebKit::WebScrollbarThemePainter painter, 19 WebKit::WebScrollbarThemePainter painter,
20 WebKit::WebScrollbarThemeGeometry* geometry) 20 WebKit::WebScrollbarThemeGeometry* geometry)
21 : layer_(new WebLayerImpl(ScrollbarLayer::Create( 21 : layer_(new WebLayerImpl(ScrollbarLayer::Create(
22 make_scoped_ptr(scrollbar), 22 make_scoped_ptr(scrollbar),
23 WebToCCScrollbarThemePainterAdapter::Create( 23 WebToCCScrollbarThemePainterAdapter::Create(
24 make_scoped_ptr(new WebScrollbarThemePainter(painter))) 24 make_scoped_ptr(new WebScrollbarThemePainter(painter)))
25 .PassAs<ScrollbarThemePainter>(), 25 .PassAs<ScrollbarThemePainter>(),
26 make_scoped_ptr(geometry), 26 make_scoped_ptr(geometry),
27 0))) {} 27 0))) {}
28 28
29 WebScrollbarLayerImpl::~WebScrollbarLayerImpl() {} 29 WebScrollbarLayerImpl::~WebScrollbarLayerImpl() {}
30 30
31 WebKit::WebLayer* WebScrollbarLayerImpl::layer() { return layer_.get(); } 31 WebKit::WebLayer* WebScrollbarLayerImpl::layer() { return layer_.get(); }
32 32
33 void WebScrollbarLayerImpl::setScrollLayer(WebKit::WebLayer* layer) { 33 void WebScrollbarLayerImpl::setScrollLayer(WebKit::WebLayer* layer) {
34 int id = layer ? static_cast<WebLayerImpl*>(layer)->layer()->id() : 0; 34 int id = layer ? static_cast<WebLayerImpl*>(layer)->layer()->id() : 0;
35 static_cast<ScrollbarLayer*>(layer_->layer())->SetScrollLayerId(id); 35 static_cast<ScrollbarLayer*>(layer_->layer())->SetScrollLayerId(id);
36 } 36 }
37 37
38 } // namespace webkit 38 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698