| Index: cc/trees/swap_promise_monitor.cc
|
| diff --git a/cc/trees/swap_promise_monitor.cc b/cc/trees/swap_promise_monitor.cc
|
| index 56956bf29ac556d243445328f5851e3a6e777679..6a7492aedab8a45aebfa8f7c0f2804cc069c4984 100644
|
| --- a/cc/trees/swap_promise_monitor.cc
|
| +++ b/cc/trees/swap_promise_monitor.cc
|
| @@ -3,27 +3,27 @@
|
| // found in the LICENSE file.
|
|
|
| #include "base/logging.h"
|
| -#include "cc/trees/layer_tree_host.h"
|
| #include "cc/trees/layer_tree_host_impl.h"
|
| +#include "cc/trees/swap_promise_manager.h"
|
| #include "cc/trees/swap_promise_monitor.h"
|
|
|
| namespace cc {
|
|
|
| -SwapPromiseMonitor::SwapPromiseMonitor(LayerTreeHostInterface* layer_tree_host,
|
| +SwapPromiseMonitor::SwapPromiseMonitor(SwapPromiseManager* swap_promise_manager,
|
| LayerTreeHostImpl* layer_tree_host_impl)
|
| - : layer_tree_host_(layer_tree_host),
|
| + : swap_promise_manager_(swap_promise_manager),
|
| layer_tree_host_impl_(layer_tree_host_impl) {
|
| - DCHECK((layer_tree_host && !layer_tree_host_impl) ||
|
| - (!layer_tree_host && layer_tree_host_impl));
|
| - if (layer_tree_host_)
|
| - layer_tree_host_->InsertSwapPromiseMonitor(this);
|
| + DCHECK((swap_promise_manager && !layer_tree_host_impl) ||
|
| + (!swap_promise_manager && layer_tree_host_impl));
|
| + if (swap_promise_manager)
|
| + swap_promise_manager->InsertSwapPromiseMonitor(this);
|
| if (layer_tree_host_impl_)
|
| layer_tree_host_impl_->InsertSwapPromiseMonitor(this);
|
| }
|
|
|
| SwapPromiseMonitor::~SwapPromiseMonitor() {
|
| - if (layer_tree_host_)
|
| - layer_tree_host_->RemoveSwapPromiseMonitor(this);
|
| + if (swap_promise_manager_)
|
| + swap_promise_manager_->RemoveSwapPromiseMonitor(this);
|
| if (layer_tree_host_impl_)
|
| layer_tree_host_impl_->RemoveSwapPromiseMonitor(this);
|
| }
|
|
|