| OLD | NEW |
| 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 "cc/blink/web_scrollbar_layer_impl.h" | 5 #include "cc/blink/web_scrollbar_layer_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "cc/blink/scrollbar_impl.h" | 10 #include "cc/blink/scrollbar_impl.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 return layer_.get(); | 68 return layer_.get(); |
| 69 } | 69 } |
| 70 | 70 |
| 71 void WebScrollbarLayerImpl::SetScrollLayer(blink::WebLayer* layer) { | 71 void WebScrollbarLayerImpl::SetScrollLayer(blink::WebLayer* layer) { |
| 72 cc::Layer* scroll_layer = | 72 cc::Layer* scroll_layer = |
| 73 layer ? static_cast<WebLayerImpl*>(layer)->layer() : nullptr; | 73 layer ? static_cast<WebLayerImpl*>(layer)->layer() : nullptr; |
| 74 layer_->layer()->ToScrollbarLayer()->SetScrollElementId( | 74 layer_->layer()->ToScrollbarLayer()->SetScrollElementId( |
| 75 scroll_layer ? scroll_layer->element_id() : cc::ElementId()); | 75 scroll_layer ? scroll_layer->element_id() : cc::ElementId()); |
| 76 } | 76 } |
| 77 | 77 |
| 78 void WebScrollbarLayerImpl::SetElementId(const cc::ElementId& element_id) { |
| 79 layer_->SetElementId(element_id); |
| 80 } |
| 81 |
| 78 } // namespace cc_blink | 82 } // namespace cc_blink |
| OLD | NEW |