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

Side by Side Diff: third_party/WebKit/Source/platform/testing/WebLayerTreeViewImplForTesting.cpp

Issue 2846303002: Replace ASSERT with DCHECK in platform/ (Closed)
Patch Set: rebase Created 3 years, 7 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 "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 13 matching lines...) Expand all
24 WebLayerTreeViewImplForTesting::WebLayerTreeViewImplForTesting( 24 WebLayerTreeViewImplForTesting::WebLayerTreeViewImplForTesting(
25 const cc::LayerTreeSettings& settings) { 25 const cc::LayerTreeSettings& settings) {
26 animation_host_ = cc::AnimationHost::CreateMainInstance(); 26 animation_host_ = cc::AnimationHost::CreateMainInstance();
27 cc::LayerTreeHost::InitParams params; 27 cc::LayerTreeHost::InitParams params;
28 params.client = this; 28 params.client = this;
29 params.settings = &settings; 29 params.settings = &settings;
30 params.main_task_runner = base::ThreadTaskRunnerHandle::Get(); 30 params.main_task_runner = base::ThreadTaskRunnerHandle::Get();
31 params.task_graph_runner = &task_graph_runner_; 31 params.task_graph_runner = &task_graph_runner_;
32 params.mutator_host = animation_host_.get(); 32 params.mutator_host = animation_host_.get();
33 layer_tree_host_ = cc::LayerTreeHost::CreateSingleThreaded(this, &params); 33 layer_tree_host_ = cc::LayerTreeHost::CreateSingleThreaded(this, &params);
34 ASSERT(layer_tree_host_); 34 DCHECK(layer_tree_host_);
35 } 35 }
36 36
37 WebLayerTreeViewImplForTesting::~WebLayerTreeViewImplForTesting() {} 37 WebLayerTreeViewImplForTesting::~WebLayerTreeViewImplForTesting() {}
38 38
39 // static 39 // static
40 cc::LayerTreeSettings 40 cc::LayerTreeSettings
41 WebLayerTreeViewImplForTesting::DefaultLayerTreeSettings() { 41 WebLayerTreeViewImplForTesting::DefaultLayerTreeSettings() {
42 cc::LayerTreeSettings settings; 42 cc::LayerTreeSettings settings;
43 43
44 // For web contents, layer transforms should scale up the contents of layers 44 // For web contents, layer transforms should scale up the contents of layers
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 201
202 bool WebLayerTreeViewImplForTesting::HaveScrollEventHandlers() const { 202 bool WebLayerTreeViewImplForTesting::HaveScrollEventHandlers() const {
203 return layer_tree_host_->have_scroll_event_handlers(); 203 return layer_tree_host_->have_scroll_event_handlers();
204 } 204 }
205 205
206 bool WebLayerTreeViewImplForTesting::IsForSubframe() { 206 bool WebLayerTreeViewImplForTesting::IsForSubframe() {
207 return false; 207 return false;
208 } 208 }
209 209
210 } // namespace blink 210 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698