| Index: third_party/WebKit/Source/platform/testing/WebLayerTreeViewImplForTesting.cpp
|
| diff --git a/third_party/WebKit/Source/platform/testing/WebLayerTreeViewImplForTesting.cpp b/third_party/WebKit/Source/platform/testing/WebLayerTreeViewImplForTesting.cpp
|
| index 0a4e6e63257a9179c32cac3c2d6e82e1312335d5..a41b2beabec9d379f4be67d2b9e68e580a77ca0e 100644
|
| --- a/third_party/WebKit/Source/platform/testing/WebLayerTreeViewImplForTesting.cpp
|
| +++ b/third_party/WebKit/Source/platform/testing/WebLayerTreeViewImplForTesting.cpp
|
| @@ -53,12 +53,12 @@ bool WebLayerTreeViewImplForTesting::hasLayer(const WebLayer& layer) {
|
| }
|
|
|
| void WebLayerTreeViewImplForTesting::setRootLayer(const blink::WebLayer& root) {
|
| - m_layerTreeHost->GetLayerTree()->SetRootLayer(
|
| + m_layerTreeHost->SetRootLayer(
|
| static_cast<const cc_blink::WebLayerImpl*>(&root)->layer());
|
| }
|
|
|
| void WebLayerTreeViewImplForTesting::clearRootLayer() {
|
| - m_layerTreeHost->GetLayerTree()->SetRootLayer(scoped_refptr<cc::Layer>());
|
| + m_layerTreeHost->SetRootLayer(scoped_refptr<cc::Layer>());
|
| }
|
|
|
| cc::AnimationHost* WebLayerTreeViewImplForTesting::compositorAnimationHost() {
|
| @@ -70,34 +70,33 @@ void WebLayerTreeViewImplForTesting::setViewportSize(
|
| const WebSize& deviceViewportSize) {
|
| gfx::Size gfxSize(std::max(0, deviceViewportSize.width),
|
| std::max(0, deviceViewportSize.height));
|
| - m_layerTreeHost->GetLayerTree()->SetViewportSize(gfxSize);
|
| + m_layerTreeHost->SetViewportSize(gfxSize);
|
| }
|
|
|
| void WebLayerTreeViewImplForTesting::setViewportSize(
|
| const WebSize& deviceViewportSize) {
|
| gfx::Size gfxSize(std::max(0, deviceViewportSize.width),
|
| std::max(0, deviceViewportSize.height));
|
| - m_layerTreeHost->GetLayerTree()->SetViewportSize(gfxSize);
|
| + m_layerTreeHost->SetViewportSize(gfxSize);
|
| }
|
|
|
| WebSize WebLayerTreeViewImplForTesting::getViewportSize() const {
|
| - return WebSize(
|
| - m_layerTreeHost->GetLayerTree()->device_viewport_size().width(),
|
| - m_layerTreeHost->GetLayerTree()->device_viewport_size().height());
|
| + return WebSize(m_layerTreeHost->device_viewport_size().width(),
|
| + m_layerTreeHost->device_viewport_size().height());
|
| }
|
|
|
| void WebLayerTreeViewImplForTesting::setDeviceScaleFactor(
|
| float deviceScaleFactor) {
|
| - m_layerTreeHost->GetLayerTree()->SetDeviceScaleFactor(deviceScaleFactor);
|
| + m_layerTreeHost->SetDeviceScaleFactor(deviceScaleFactor);
|
| }
|
|
|
| void WebLayerTreeViewImplForTesting::setBackgroundColor(WebColor color) {
|
| - m_layerTreeHost->GetLayerTree()->set_background_color(color);
|
| + m_layerTreeHost->set_background_color(color);
|
| }
|
|
|
| void WebLayerTreeViewImplForTesting::setHasTransparentBackground(
|
| bool transparent) {
|
| - m_layerTreeHost->GetLayerTree()->set_has_transparent_background(transparent);
|
| + m_layerTreeHost->set_has_transparent_background(transparent);
|
| }
|
|
|
| void WebLayerTreeViewImplForTesting::setVisible(bool visible) {
|
| @@ -108,8 +107,8 @@ void WebLayerTreeViewImplForTesting::setPageScaleFactorAndLimits(
|
| float pageScaleFactor,
|
| float minimum,
|
| float maximum) {
|
| - m_layerTreeHost->GetLayerTree()->SetPageScaleFactorAndLimits(
|
| - pageScaleFactor, minimum, maximum);
|
| + m_layerTreeHost->SetPageScaleFactorAndLimits(pageScaleFactor, minimum,
|
| + maximum);
|
| }
|
|
|
| void WebLayerTreeViewImplForTesting::startPageScaleAnimation(
|
| @@ -154,7 +153,7 @@ void WebLayerTreeViewImplForTesting::registerViewportLayers(
|
| const blink::WebLayer* pageScaleLayer,
|
| const blink::WebLayer* innerViewportScrollLayer,
|
| const blink::WebLayer* outerViewportScrollLayer) {
|
| - m_layerTreeHost->GetLayerTree()->RegisterViewportLayers(
|
| + m_layerTreeHost->RegisterViewportLayers(
|
| // The scroll elasticity layer will only exist when using pinch virtual
|
| // viewports.
|
| overscrollElasticityLayer
|
| @@ -174,7 +173,7 @@ void WebLayerTreeViewImplForTesting::registerViewportLayers(
|
| }
|
|
|
| void WebLayerTreeViewImplForTesting::clearViewportLayers() {
|
| - m_layerTreeHost->GetLayerTree()->RegisterViewportLayers(
|
| + m_layerTreeHost->RegisterViewportLayers(
|
| scoped_refptr<cc::Layer>(), scoped_refptr<cc::Layer>(),
|
| scoped_refptr<cc::Layer>(), scoped_refptr<cc::Layer>());
|
| }
|
| @@ -188,7 +187,7 @@ void WebLayerTreeViewImplForTesting::setEventListenerProperties(
|
| blink::WebEventListenerClass eventClass,
|
| blink::WebEventListenerProperties properties) {
|
| // Equality of static_cast is checked in render_widget_compositor.cc.
|
| - m_layerTreeHost->GetLayerTree()->SetEventListenerProperties(
|
| + m_layerTreeHost->SetEventListenerProperties(
|
| static_cast<cc::EventListenerClass>(eventClass),
|
| static_cast<cc::EventListenerProperties>(properties));
|
| }
|
| @@ -198,17 +197,17 @@ WebLayerTreeViewImplForTesting::eventListenerProperties(
|
| blink::WebEventListenerClass eventClass) const {
|
| // Equality of static_cast is checked in render_widget_compositor.cc.
|
| return static_cast<blink::WebEventListenerProperties>(
|
| - m_layerTreeHost->GetLayerTree()->event_listener_properties(
|
| + m_layerTreeHost->event_listener_properties(
|
| static_cast<cc::EventListenerClass>(eventClass)));
|
| }
|
|
|
| void WebLayerTreeViewImplForTesting::setHaveScrollEventHandlers(
|
| bool haveEentHandlers) {
|
| - m_layerTreeHost->GetLayerTree()->SetHaveScrollEventHandlers(haveEentHandlers);
|
| + m_layerTreeHost->SetHaveScrollEventHandlers(haveEentHandlers);
|
| }
|
|
|
| bool WebLayerTreeViewImplForTesting::haveScrollEventHandlers() const {
|
| - return m_layerTreeHost->GetLayerTree()->have_scroll_event_handlers();
|
| + return m_layerTreeHost->have_scroll_event_handlers();
|
| }
|
|
|
| } // namespace blink
|
|
|