Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Side by Side Diff: content/test/web_layer_tree_view_impl_for_testing.cc

Issue 1616653002: CC Animation: Move files from cc_blink to Source/platform/animation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ScrollAnimatorCompositorCoordinator for MSVC. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
11 #include "cc/animation/animation_host.h" 11 #include "cc/animation/animation_host.h"
12 #include "cc/animation/animation_timeline.h" 12 #include "cc/animation/animation_timeline.h"
13 #include "cc/base/switches.h" 13 #include "cc/base/switches.h"
14 #include "cc/blink/web_compositor_animation_timeline_impl.h"
15 #include "cc/blink/web_layer_impl.h" 14 #include "cc/blink/web_layer_impl.h"
16 #include "cc/input/input_handler.h" 15 #include "cc/input/input_handler.h"
17 #include "cc/layers/layer.h" 16 #include "cc/layers/layer.h"
18 #include "cc/scheduler/begin_frame_source.h" 17 #include "cc/scheduler/begin_frame_source.h"
19 #include "cc/trees/layer_tree_host.h" 18 #include "cc/trees/layer_tree_host.h"
20 #include "content/test/test_blink_web_unit_test_support.h" 19 #include "content/test/test_blink_web_unit_test_support.h"
21 #include "third_party/WebKit/public/platform/Platform.h" 20 #include "third_party/WebKit/public/platform/Platform.h"
22 #include "third_party/WebKit/public/platform/WebLayer.h" 21 #include "third_party/WebKit/public/platform/WebLayer.h"
23 #include "third_party/WebKit/public/platform/WebLayerTreeView.h" 22 #include "third_party/WebKit/public/platform/WebLayerTreeView.h"
24 #include "third_party/WebKit/public/platform/WebSize.h" 23 #include "third_party/WebKit/public/platform/WebSize.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 const blink::WebLayer& root) { 58 const blink::WebLayer& root) {
60 layer_tree_host_->SetRootLayer( 59 layer_tree_host_->SetRootLayer(
61 static_cast<const cc_blink::WebLayerImpl*>(&root)->layer()); 60 static_cast<const cc_blink::WebLayerImpl*>(&root)->layer());
62 } 61 }
63 62
64 void WebLayerTreeViewImplForTesting::clearRootLayer() { 63 void WebLayerTreeViewImplForTesting::clearRootLayer() {
65 layer_tree_host_->SetRootLayer(scoped_refptr<cc::Layer>()); 64 layer_tree_host_->SetRootLayer(scoped_refptr<cc::Layer>());
66 } 65 }
67 66
68 void WebLayerTreeViewImplForTesting::attachCompositorAnimationTimeline( 67 void WebLayerTreeViewImplForTesting::attachCompositorAnimationTimeline(
69 blink::WebCompositorAnimationTimeline* compositor_timeline) { 68 cc::AnimationTimeline* compositor_timeline) {
70 DCHECK(compositor_timeline);
71 DCHECK(layer_tree_host_->animation_host()); 69 DCHECK(layer_tree_host_->animation_host());
72 layer_tree_host_->animation_host()->AddAnimationTimeline( 70 layer_tree_host_->animation_host()->AddAnimationTimeline(compositor_timeline);
73 static_cast<const cc_blink::WebCompositorAnimationTimelineImpl*>(
74 compositor_timeline)
75 ->animation_timeline());
76 } 71 }
77 72
78 void WebLayerTreeViewImplForTesting::detachCompositorAnimationTimeline( 73 void WebLayerTreeViewImplForTesting::detachCompositorAnimationTimeline(
79 blink::WebCompositorAnimationTimeline* compositor_timeline) { 74 cc::AnimationTimeline* compositor_timeline) {
80 DCHECK(compositor_timeline);
81 DCHECK(layer_tree_host_->animation_host()); 75 DCHECK(layer_tree_host_->animation_host());
82 layer_tree_host_->animation_host()->RemoveAnimationTimeline( 76 layer_tree_host_->animation_host()->RemoveAnimationTimeline(
83 static_cast<const cc_blink::WebCompositorAnimationTimelineImpl*>( 77 compositor_timeline);
84 compositor_timeline)
85 ->animation_timeline());
86 } 78 }
87 79
88 void WebLayerTreeViewImplForTesting::setViewportSize( 80 void WebLayerTreeViewImplForTesting::setViewportSize(
89 const WebSize& unused_deprecated, 81 const WebSize& unused_deprecated,
90 const WebSize& device_viewport_size) { 82 const WebSize& device_viewport_size) {
91 layer_tree_host_->SetViewportSize(device_viewport_size); 83 layer_tree_host_->SetViewportSize(device_viewport_size);
92 } 84 }
93 85
94 void WebLayerTreeViewImplForTesting::setViewportSize( 86 void WebLayerTreeViewImplForTesting::setViewportSize(
95 const WebSize& device_viewport_size) { 87 const WebSize& device_viewport_size) {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 } 186 }
195 187
196 void WebLayerTreeViewImplForTesting::registerSelection( 188 void WebLayerTreeViewImplForTesting::registerSelection(
197 const blink::WebSelection& selection) { 189 const blink::WebSelection& selection) {
198 } 190 }
199 191
200 void WebLayerTreeViewImplForTesting::clearSelection() { 192 void WebLayerTreeViewImplForTesting::clearSelection() {
201 } 193 }
202 194
203 } // namespace content 195 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698