| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 97 |
| 98 void WebLayerTreeViewImplForTesting::setDeviceScaleFactor( | 98 void WebLayerTreeViewImplForTesting::setDeviceScaleFactor( |
| 99 float deviceScaleFactor) { | 99 float deviceScaleFactor) { |
| 100 m_layerTreeHost->GetLayerTree()->SetDeviceScaleFactor(deviceScaleFactor); | 100 m_layerTreeHost->GetLayerTree()->SetDeviceScaleFactor(deviceScaleFactor); |
| 101 } | 101 } |
| 102 | 102 |
| 103 void WebLayerTreeViewImplForTesting::setBackgroundColor(WebColor color) { | 103 void WebLayerTreeViewImplForTesting::setBackgroundColor(WebColor color) { |
| 104 m_layerTreeHost->GetLayerTree()->set_background_color(color); | 104 m_layerTreeHost->GetLayerTree()->set_background_color(color); |
| 105 } | 105 } |
| 106 | 106 |
| 107 bool WebLayerTreeViewImplForTesting::hasTransparentBackground() { |
| 108 return m_layerTreeHost->GetLayerTree()->has_transparent_background(); |
| 109 } |
| 110 |
| 107 void WebLayerTreeViewImplForTesting::setHasTransparentBackground( | 111 void WebLayerTreeViewImplForTesting::setHasTransparentBackground( |
| 108 bool transparent) { | 112 bool transparent) { |
| 109 m_layerTreeHost->GetLayerTree()->set_has_transparent_background(transparent); | 113 m_layerTreeHost->GetLayerTree()->set_has_transparent_background(transparent); |
| 110 } | 114 } |
| 111 | 115 |
| 112 void WebLayerTreeViewImplForTesting::setVisible(bool visible) { | 116 void WebLayerTreeViewImplForTesting::setVisible(bool visible) { |
| 113 m_layerTreeHost->SetVisible(visible); | 117 m_layerTreeHost->SetVisible(visible); |
| 114 } | 118 } |
| 115 | 119 |
| 116 void WebLayerTreeViewImplForTesting::setPageScaleFactorAndLimits( | 120 void WebLayerTreeViewImplForTesting::setPageScaleFactorAndLimits( |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 void WebLayerTreeViewImplForTesting::setHaveScrollEventHandlers( | 218 void WebLayerTreeViewImplForTesting::setHaveScrollEventHandlers( |
| 215 bool haveEentHandlers) { | 219 bool haveEentHandlers) { |
| 216 m_layerTreeHost->GetLayerTree()->SetHaveScrollEventHandlers(haveEentHandlers); | 220 m_layerTreeHost->GetLayerTree()->SetHaveScrollEventHandlers(haveEentHandlers); |
| 217 } | 221 } |
| 218 | 222 |
| 219 bool WebLayerTreeViewImplForTesting::haveScrollEventHandlers() const { | 223 bool WebLayerTreeViewImplForTesting::haveScrollEventHandlers() const { |
| 220 return m_layerTreeHost->GetLayerTree()->have_scroll_event_handlers(); | 224 return m_layerTreeHost->GetLayerTree()->have_scroll_event_handlers(); |
| 221 } | 225 } |
| 222 | 226 |
| 223 } // namespace blink | 227 } // namespace blink |
| OLD | NEW |