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

Side by Side Diff: webkit/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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "webkit/compositor_bindings/web_scrollbar_layer_impl.h"
6
7 #include "cc/layers/scrollbar_layer.h"
8 #include "webkit/compositor_bindings/web_layer_impl.h"
9 #include "webkit/compositor_bindings/web_to_ccscrollbar_theme_painter_adapter.h"
10
11 using cc::ScrollbarLayer;
12 using cc::ScrollbarThemePainter;
13 using WebKit::WebScrollbarThemePainter;
14
15 namespace webkit {
16
17 WebScrollbarLayerImpl::WebScrollbarLayerImpl(
18 WebKit::WebScrollbar* scrollbar,
19 WebKit::WebScrollbarThemePainter painter,
20 WebKit::WebScrollbarThemeGeometry* geometry)
21 : layer_(new WebLayerImpl(ScrollbarLayer::Create(
22 make_scoped_ptr(scrollbar),
23 WebToCCScrollbarThemePainterAdapter::Create(
24 make_scoped_ptr(new WebScrollbarThemePainter(painter)))
25 .PassAs<ScrollbarThemePainter>(),
26 make_scoped_ptr(geometry),
27 0))) {}
28
29 WebScrollbarLayerImpl::~WebScrollbarLayerImpl() {}
30
31 WebKit::WebLayer* WebScrollbarLayerImpl::layer() { return layer_.get(); }
32
33 void WebScrollbarLayerImpl::setScrollLayer(WebKit::WebLayer* layer) {
34 int id = layer ? static_cast<WebLayerImpl*>(layer)->layer()->id() : 0;
35 static_cast<ScrollbarLayer*>(layer_->layer())->SetScrollLayerId(id);
36 }
37
38 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/compositor_bindings/web_scrollbar_layer_impl.h ('k') | webkit/compositor_bindings/web_solid_color_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698