| 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 "content/test/web_layer_tree_view_impl_for_testing.h" | 5 #include "content/test/web_layer_tree_view_impl_for_testing.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
| 10 #include "cc/base/switches.h" | 10 #include "cc/base/switches.h" |
| 11 #include "cc/blink/web_layer_impl.h" | 11 #include "cc/blink/web_layer_impl.h" |
| 12 #include "cc/input/input_handler.h" | 12 #include "cc/input/input_handler.h" |
| 13 #include "cc/layers/layer.h" | 13 #include "cc/layers/layer.h" |
| 14 #include "cc/output/output_surface.h" | 14 #include "cc/test/pixel_test_output_surface.h" |
| 15 #include "cc/test/test_context_provider.h" | 15 #include "cc/test/test_context_provider.h" |
| 16 #include "cc/trees/layer_tree_host.h" | 16 #include "cc/trees/layer_tree_host.h" |
| 17 #include "content/test/test_blink_web_unit_test_support.h" | 17 #include "content/test/test_blink_web_unit_test_support.h" |
| 18 #include "third_party/WebKit/public/platform/Platform.h" | 18 #include "third_party/WebKit/public/platform/Platform.h" |
| 19 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" | 19 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" |
| 20 #include "third_party/WebKit/public/platform/WebLayer.h" | 20 #include "third_party/WebKit/public/platform/WebLayer.h" |
| 21 #include "third_party/WebKit/public/platform/WebLayerTreeView.h" | 21 #include "third_party/WebKit/public/platform/WebLayerTreeView.h" |
| 22 #include "third_party/WebKit/public/platform/WebSize.h" | 22 #include "third_party/WebKit/public/platform/WebSize.h" |
| 23 #include "ui/gfx/frame_time.h" | 23 #include "ui/gfx/frame_time.h" |
| 24 | 24 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 float top_controls_delta) {} | 144 float top_controls_delta) {} |
| 145 | 145 |
| 146 void WebLayerTreeViewImplForTesting::ApplyViewportDeltas( | 146 void WebLayerTreeViewImplForTesting::ApplyViewportDeltas( |
| 147 const gfx::Vector2d& scroll_delta, | 147 const gfx::Vector2d& scroll_delta, |
| 148 float page_scale, | 148 float page_scale, |
| 149 float top_controls_delta) {} | 149 float top_controls_delta) {} |
| 150 | 150 |
| 151 void WebLayerTreeViewImplForTesting::RequestNewOutputSurface( | 151 void WebLayerTreeViewImplForTesting::RequestNewOutputSurface( |
| 152 bool fallback) { | 152 bool fallback) { |
| 153 layer_tree_host_->SetOutputSurface(make_scoped_ptr( | 153 layer_tree_host_->SetOutputSurface(make_scoped_ptr( |
| 154 new cc::OutputSurface(cc::TestContextProvider::Create()))); | 154 new cc::PixelTestOutputSurface(cc::TestContextProvider::Create()))); |
| 155 } | 155 } |
| 156 | 156 |
| 157 void WebLayerTreeViewImplForTesting::registerViewportLayers( | 157 void WebLayerTreeViewImplForTesting::registerViewportLayers( |
| 158 const blink::WebLayer* pageScaleLayer, | 158 const blink::WebLayer* pageScaleLayer, |
| 159 const blink::WebLayer* innerViewportScrollLayer, | 159 const blink::WebLayer* innerViewportScrollLayer, |
| 160 const blink::WebLayer* outerViewportScrollLayer) { | 160 const blink::WebLayer* outerViewportScrollLayer) { |
| 161 layer_tree_host_->RegisterViewportLayers( | 161 layer_tree_host_->RegisterViewportLayers( |
| 162 static_cast<const cc_blink::WebLayerImpl*>(pageScaleLayer)->layer(), | 162 static_cast<const cc_blink::WebLayerImpl*>(pageScaleLayer)->layer(), |
| 163 static_cast<const cc_blink::WebLayerImpl*>(innerViewportScrollLayer) | 163 static_cast<const cc_blink::WebLayerImpl*>(innerViewportScrollLayer) |
| 164 ->layer(), | 164 ->layer(), |
| (...skipping 12 matching lines...) Expand all Loading... |
| 177 | 177 |
| 178 void WebLayerTreeViewImplForTesting::registerSelection( | 178 void WebLayerTreeViewImplForTesting::registerSelection( |
| 179 const blink::WebSelectionBound& start, | 179 const blink::WebSelectionBound& start, |
| 180 const blink::WebSelectionBound& end) { | 180 const blink::WebSelectionBound& end) { |
| 181 } | 181 } |
| 182 | 182 |
| 183 void WebLayerTreeViewImplForTesting::clearSelection() { | 183 void WebLayerTreeViewImplForTesting::clearSelection() { |
| 184 } | 184 } |
| 185 | 185 |
| 186 } // namespace content | 186 } // namespace content |
| OLD | NEW |