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

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

Issue 23983047: Pinch/Zoom Infrastructure & Plumbing CL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to r248052. Created 6 years, 10 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 | « webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/renderer/compositor_bindings/web_scrollbar_layer_impl.h" 5 #include "webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.h"
6 6
7 #include "cc/layers/layer.h"
7 #include "cc/layers/painted_scrollbar_layer.h" 8 #include "cc/layers/painted_scrollbar_layer.h"
8 #include "cc/layers/scrollbar_layer_interface.h" 9 #include "cc/layers/scrollbar_layer_interface.h"
9 #include "cc/layers/solid_color_scrollbar_layer.h" 10 #include "cc/layers/solid_color_scrollbar_layer.h"
10 #include "webkit/renderer/compositor_bindings/scrollbar_impl.h" 11 #include "webkit/renderer/compositor_bindings/scrollbar_impl.h"
11 #include "webkit/renderer/compositor_bindings/web_layer_impl.h" 12 #include "webkit/renderer/compositor_bindings/web_layer_impl.h"
12 13
13 using cc::PaintedScrollbarLayer; 14 using cc::PaintedScrollbarLayer;
14 using cc::SolidColorScrollbarLayer; 15 using cc::SolidColorScrollbarLayer;
15 16
16 namespace { 17 namespace {
(...skipping 27 matching lines...) Expand all
44 ConvertOrientation(orientation), 45 ConvertOrientation(orientation),
45 thumb_thickness, 46 thumb_thickness,
46 is_left_side_vertical_scrollbar, 47 is_left_side_vertical_scrollbar,
47 0))) {} 48 0))) {}
48 49
49 WebScrollbarLayerImpl::~WebScrollbarLayerImpl() {} 50 WebScrollbarLayerImpl::~WebScrollbarLayerImpl() {}
50 51
51 blink::WebLayer* WebScrollbarLayerImpl::layer() { return layer_.get(); } 52 blink::WebLayer* WebScrollbarLayerImpl::layer() { return layer_.get(); }
52 53
53 void WebScrollbarLayerImpl::setScrollLayer(blink::WebLayer* layer) { 54 void WebScrollbarLayerImpl::setScrollLayer(blink::WebLayer* layer) {
54 int id = layer ? static_cast<WebLayerImpl*>(layer)->layer()->id() : 0; 55 cc::Layer* scroll_layer =
55 static_cast<PaintedScrollbarLayer*>(layer_->layer())->SetScrollLayerId(id); 56 layer ? static_cast<WebLayerImpl*>(layer)->layer() : 0;
57 layer_->layer()->ToScrollbarLayer()->SetScrollLayer(scroll_layer->id());
58 }
59
60 void WebScrollbarLayerImpl::setClipLayer(blink::WebLayer* layer) {
61 cc::Layer* clip_layer =
62 layer ? static_cast<WebLayerImpl*>(layer)->layer() : 0;
63 layer_->layer()->ToScrollbarLayer()->SetClipLayer(clip_layer->id());
56 } 64 }
57 65
58 } // namespace webkit 66 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698