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

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

Issue 1413373007: CC AnimationHost: Fix LinkHighlights detach scope. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: GC. Created 5 years, 1 month 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"
12 #include "cc/animation/animation_timeline.h"
11 #include "cc/base/switches.h" 13 #include "cc/base/switches.h"
14 #include "cc/blink/web_compositor_animation_timeline_impl.h"
12 #include "cc/blink/web_layer_impl.h" 15 #include "cc/blink/web_layer_impl.h"
13 #include "cc/input/input_handler.h" 16 #include "cc/input/input_handler.h"
14 #include "cc/layers/layer.h" 17 #include "cc/layers/layer.h"
15 #include "cc/scheduler/begin_frame_source.h" 18 #include "cc/scheduler/begin_frame_source.h"
16 #include "cc/trees/layer_tree_host.h" 19 #include "cc/trees/layer_tree_host.h"
17 #include "content/test/test_blink_web_unit_test_support.h" 20 #include "content/test/test_blink_web_unit_test_support.h"
18 #include "third_party/WebKit/public/platform/Platform.h" 21 #include "third_party/WebKit/public/platform/Platform.h"
19 #include "third_party/WebKit/public/platform/WebLayer.h" 22 #include "third_party/WebKit/public/platform/WebLayer.h"
20 #include "third_party/WebKit/public/platform/WebLayerTreeView.h" 23 #include "third_party/WebKit/public/platform/WebLayerTreeView.h"
21 #include "third_party/WebKit/public/platform/WebSize.h" 24 #include "third_party/WebKit/public/platform/WebSize.h"
(...skipping 29 matching lines...) Expand all
51 void WebLayerTreeViewImplForTesting::setRootLayer( 54 void WebLayerTreeViewImplForTesting::setRootLayer(
52 const blink::WebLayer& root) { 55 const blink::WebLayer& root) {
53 layer_tree_host_->SetRootLayer( 56 layer_tree_host_->SetRootLayer(
54 static_cast<const cc_blink::WebLayerImpl*>(&root)->layer()); 57 static_cast<const cc_blink::WebLayerImpl*>(&root)->layer());
55 } 58 }
56 59
57 void WebLayerTreeViewImplForTesting::clearRootLayer() { 60 void WebLayerTreeViewImplForTesting::clearRootLayer() {
58 layer_tree_host_->SetRootLayer(scoped_refptr<cc::Layer>()); 61 layer_tree_host_->SetRootLayer(scoped_refptr<cc::Layer>());
59 } 62 }
60 63
64 void WebLayerTreeViewImplForTesting::attachCompositorAnimationTimeline(
65 blink::WebCompositorAnimationTimeline* compositor_timeline) {
66 DCHECK(compositor_timeline);
67 DCHECK(layer_tree_host_->animation_host());
68 layer_tree_host_->animation_host()->AddAnimationTimeline(
69 static_cast<const cc_blink::WebCompositorAnimationTimelineImpl*>(
70 compositor_timeline)
71 ->animation_timeline());
72 }
73
74 void WebLayerTreeViewImplForTesting::detachCompositorAnimationTimeline(
75 blink::WebCompositorAnimationTimeline* compositor_timeline) {
76 DCHECK(compositor_timeline);
77 DCHECK(layer_tree_host_->animation_host());
78 layer_tree_host_->animation_host()->RemoveAnimationTimeline(
79 static_cast<const cc_blink::WebCompositorAnimationTimelineImpl*>(
80 compositor_timeline)
81 ->animation_timeline());
82 }
83
61 void WebLayerTreeViewImplForTesting::setViewportSize( 84 void WebLayerTreeViewImplForTesting::setViewportSize(
62 const WebSize& unused_deprecated, 85 const WebSize& unused_deprecated,
63 const WebSize& device_viewport_size) { 86 const WebSize& device_viewport_size) {
64 layer_tree_host_->SetViewportSize(device_viewport_size); 87 layer_tree_host_->SetViewportSize(device_viewport_size);
65 } 88 }
66 89
67 void WebLayerTreeViewImplForTesting::setViewportSize( 90 void WebLayerTreeViewImplForTesting::setViewportSize(
68 const WebSize& device_viewport_size) { 91 const WebSize& device_viewport_size) {
69 layer_tree_host_->SetViewportSize(device_viewport_size); 92 layer_tree_host_->SetViewportSize(device_viewport_size);
70 } 93 }
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 } 190 }
168 191
169 void WebLayerTreeViewImplForTesting::registerSelection( 192 void WebLayerTreeViewImplForTesting::registerSelection(
170 const blink::WebSelection& selection) { 193 const blink::WebSelection& selection) {
171 } 194 }
172 195
173 void WebLayerTreeViewImplForTesting::clearSelection() { 196 void WebLayerTreeViewImplForTesting::clearSelection() {
174 } 197 }
175 198
176 } // namespace content 199 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698