| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "platform/testing/WebLayerTreeViewImplForTesting.h" | 5 #include "platform/testing/WebLayerTreeViewImplForTesting.h" |
| 6 | 6 |
| 7 #include "base/threading/thread_task_runner_handle.h" | 7 #include "base/threading/thread_task_runner_handle.h" |
| 8 #include "cc/animation/animation_host.h" | 8 #include "cc/animation/animation_host.h" |
| 9 #include "cc/animation/animation_timeline.h" | 9 #include "cc/animation/animation_timeline.h" |
| 10 #include "cc/blink/web_layer_impl.h" | 10 #include "cc/blink/web_layer_impl.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 // For web contents, layer transforms should scale up the contents of layers | 44 // For web contents, layer transforms should scale up the contents of layers |
| 45 // to keep content always crisp when possible. | 45 // to keep content always crisp when possible. |
| 46 settings.layer_transforms_should_scale_layer_contents = true; | 46 settings.layer_transforms_should_scale_layer_contents = true; |
| 47 | 47 |
| 48 return settings; | 48 return settings; |
| 49 } | 49 } |
| 50 | 50 |
| 51 bool WebLayerTreeViewImplForTesting::hasLayer(const WebLayer& layer) | 51 bool WebLayerTreeViewImplForTesting::hasLayer(const WebLayer& layer) |
| 52 { | 52 { |
| 53 return layer.ccLayer()->layer_tree_host() == m_layerTreeHost.get(); | 53 return layer.ccLayer()->GetLayerTreeHostForTesting() == m_layerTreeHost.get(
); |
| 54 } | 54 } |
| 55 | 55 |
| 56 void WebLayerTreeViewImplForTesting::setRootLayer(const blink::WebLayer& root) | 56 void WebLayerTreeViewImplForTesting::setRootLayer(const blink::WebLayer& root) |
| 57 { | 57 { |
| 58 m_layerTreeHost->GetLayerTree()->SetRootLayer(static_cast<const cc_blink::We
bLayerImpl*>(&root)->layer()); | 58 m_layerTreeHost->GetLayerTree()->SetRootLayer(static_cast<const cc_blink::We
bLayerImpl*>(&root)->layer()); |
| 59 } | 59 } |
| 60 | 60 |
| 61 void WebLayerTreeViewImplForTesting::clearRootLayer() | 61 void WebLayerTreeViewImplForTesting::clearRootLayer() |
| 62 { | 62 { |
| 63 m_layerTreeHost->GetLayerTree()->SetRootLayer(scoped_refptr<cc::Layer>()); | 63 m_layerTreeHost->GetLayerTree()->SetRootLayer(scoped_refptr<cc::Layer>()); |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 { | 216 { |
| 217 m_layerTreeHost->GetLayerTree()->SetHaveScrollEventHandlers(haveEentHandlers
); | 217 m_layerTreeHost->GetLayerTree()->SetHaveScrollEventHandlers(haveEentHandlers
); |
| 218 } | 218 } |
| 219 | 219 |
| 220 bool WebLayerTreeViewImplForTesting::haveScrollEventHandlers() const | 220 bool WebLayerTreeViewImplForTesting::haveScrollEventHandlers() const |
| 221 { | 221 { |
| 222 return m_layerTreeHost->GetLayerTree()->have_scroll_event_handlers(); | 222 return m_layerTreeHost->GetLayerTree()->have_scroll_event_handlers(); |
| 223 } | 223 } |
| 224 | 224 |
| 225 } // namespace blink | 225 } // namespace blink |
| OLD | NEW |