summaryrefslogtreecommitdiffstats
path: root/content/test
diff options
context:
space:
mode:
authorsadrul <sadrul@chromium.org>2015-05-11 10:01:52 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-11 17:02:18 +0000
commit6780f3daea93a14cb81698025685c860b8f41db5 (patch)
treeadf9070b72777a1bb3050e6b1d914317f56200ca /content/test
parente9785bb71f9e0b8a9a3ba321c2c6483c8805e5a1 (diff)
downloadchromium_src-6780f3daea93a14cb81698025685c860b8f41db5.zip
chromium_src-6780f3daea93a14cb81698025685c860b8f41db5.tar.gz
chromium_src-6780f3daea93a14cb81698025685c860b8f41db5.tar.bz2
cc: Add LayerTreeHost::InitParams for LayerTreeHost creation.
Instead of passing in a number of things to the LayerTreeHost constructor, use a struct to simplify the code a bit, and make this more readable. This also makes it easy to maintain a development branch that adds new things. TBR=jam@ for API usage update in android_webview/, components/, and content/ BUG=436952 Review URL: https://codereview.chromium.org/1126253005 Cr-Commit-Position: refs/heads/master@{#329164}
Diffstat (limited to 'content/test')
-rw-r--r--content/test/web_layer_tree_view_impl_for_testing.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/content/test/web_layer_tree_view_impl_for_testing.cc b/content/test/web_layer_tree_view_impl_for_testing.cc
index 1b2f5f6..6d41220 100644
--- a/content/test/web_layer_tree_view_impl_for_testing.cc
+++ b/content/test/web_layer_tree_view_impl_for_testing.cc
@@ -7,6 +7,7 @@
#include "base/command_line.h"
#include "base/strings/string_number_conversions.h"
#include "base/synchronization/lock.h"
+#include "base/thread_task_runner_handle.h"
#include "cc/base/switches.h"
#include "cc/blink/web_layer_impl.h"
#include "cc/input/input_handler.h"
@@ -43,9 +44,11 @@ void WebLayerTreeViewImplForTesting::Initialize() {
// Accelerated animations are enabled for unit tests.
settings.accelerated_animation_enabled = true;
- layer_tree_host_ = cc::LayerTreeHost::CreateSingleThreaded(
- this, this, nullptr, nullptr, nullptr, settings,
- base::MessageLoopProxy::current(), nullptr);
+ cc::LayerTreeHost::InitParams params;
+ params.client = this;
+ params.settings = &settings;
+ params.main_task_runner = base::ThreadTaskRunnerHandle::Get();
+ layer_tree_host_ = cc::LayerTreeHost::CreateSingleThreaded(this, &params);
DCHECK(layer_tree_host_);
}