| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 m_layerTreeHost->device_viewport_size().height()); | 85 m_layerTreeHost->device_viewport_size().height()); |
| 86 } | 86 } |
| 87 | 87 |
| 88 void WebLayerTreeViewImplForTesting::setDeviceScaleFactor( | 88 void WebLayerTreeViewImplForTesting::setDeviceScaleFactor( |
| 89 float deviceScaleFactor) { | 89 float deviceScaleFactor) { |
| 90 m_layerTreeHost->SetDeviceScaleFactor(deviceScaleFactor); | 90 m_layerTreeHost->SetDeviceScaleFactor(deviceScaleFactor); |
| 91 } | 91 } |
| 92 | 92 |
| 93 void WebLayerTreeViewImplForTesting::setBackgroundColor(WebColor color) { | 93 void WebLayerTreeViewImplForTesting::setBackgroundColor(WebColor color) { |
| 94 m_layerTreeHost->set_background_color(color); | 94 m_layerTreeHost->set_background_color(color); |
| 95 } | 95 m_layerTreeHost->set_has_transparent_background(SkColorGetA(color) < |
| 96 | 96 SK_AlphaOPAQUE); |
| 97 void WebLayerTreeViewImplForTesting::setHasTransparentBackground( | |
| 98 bool transparent) { | |
| 99 m_layerTreeHost->set_has_transparent_background(transparent); | |
| 100 } | 97 } |
| 101 | 98 |
| 102 void WebLayerTreeViewImplForTesting::setVisible(bool visible) { | 99 void WebLayerTreeViewImplForTesting::setVisible(bool visible) { |
| 103 m_layerTreeHost->SetVisible(visible); | 100 m_layerTreeHost->SetVisible(visible); |
| 104 } | 101 } |
| 105 | 102 |
| 106 void WebLayerTreeViewImplForTesting::setPageScaleFactorAndLimits( | 103 void WebLayerTreeViewImplForTesting::setPageScaleFactorAndLimits( |
| 107 float pageScaleFactor, | 104 float pageScaleFactor, |
| 108 float minimum, | 105 float minimum, |
| 109 float maximum) { | 106 float maximum) { |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 void WebLayerTreeViewImplForTesting::setHaveScrollEventHandlers( | 201 void WebLayerTreeViewImplForTesting::setHaveScrollEventHandlers( |
| 205 bool haveEentHandlers) { | 202 bool haveEentHandlers) { |
| 206 m_layerTreeHost->SetHaveScrollEventHandlers(haveEentHandlers); | 203 m_layerTreeHost->SetHaveScrollEventHandlers(haveEentHandlers); |
| 207 } | 204 } |
| 208 | 205 |
| 209 bool WebLayerTreeViewImplForTesting::haveScrollEventHandlers() const { | 206 bool WebLayerTreeViewImplForTesting::haveScrollEventHandlers() const { |
| 210 return m_layerTreeHost->have_scroll_event_handlers(); | 207 return m_layerTreeHost->have_scroll_event_handlers(); |
| 211 } | 208 } |
| 212 | 209 |
| 213 } // namespace blink | 210 } // namespace blink |
| OLD | NEW |