| Index: cc/test/fake_scoped_ui_resource.cc
|
| diff --git a/cc/test/fake_scoped_ui_resource.cc b/cc/test/fake_scoped_ui_resource.cc
|
| index 9d1ac454a794dc60723869878bd73f75557c316f..63fa31fd8ea336000d85487e18d433c00fe16722 100644
|
| --- a/cc/test/fake_scoped_ui_resource.cc
|
| +++ b/cc/test/fake_scoped_ui_resource.cc
|
| @@ -5,6 +5,7 @@
|
| #include "cc/test/fake_scoped_ui_resource.h"
|
|
|
| #include "base/memory/ptr_util.h"
|
| +#include "cc/resources/ui_resource_manager.h"
|
| #include "cc/trees/layer_tree_host.h"
|
|
|
| namespace cc {
|
| @@ -19,21 +20,22 @@ UIResourceBitmap CreateMockUIResourceBitmap() {
|
| } // anonymous namespace
|
|
|
| std::unique_ptr<FakeScopedUIResource> FakeScopedUIResource::Create(
|
| - LayerTreeHost* host) {
|
| - return base::WrapUnique(new FakeScopedUIResource(host));
|
| + UIResourceManager* ui_resource_manager) {
|
| + return base::WrapUnique(new FakeScopedUIResource(ui_resource_manager));
|
| }
|
|
|
| -FakeScopedUIResource::FakeScopedUIResource(LayerTreeHost* host)
|
| - : ScopedUIResource(host, CreateMockUIResourceBitmap()) {
|
| +FakeScopedUIResource::FakeScopedUIResource(
|
| + UIResourceManager* ui_resource_manager)
|
| + : ScopedUIResource(ui_resource_manager, CreateMockUIResourceBitmap()) {
|
| // The constructor of ScopedUIResource already created a resource so we need
|
| // to delete the created resource to wipe the state clean.
|
| - host_->DeleteUIResource(id_);
|
| + ui_resource_manager_->DeleteUIResource(id_);
|
| ResetCounters();
|
| - id_ = host_->CreateUIResource(this);
|
| + id_ = ui_resource_manager_->CreateUIResource(this);
|
| }
|
|
|
| void FakeScopedUIResource::DeleteResource() {
|
| - host_->DeleteUIResource(id_);
|
| + ui_resource_manager_->DeleteUIResource(id_);
|
| id_ = 0;
|
| }
|
|
|
|
|