| Index: ash/mus/accelerator_registrar_impl.cc
|
| diff --git a/ash/mus/accelerator_registrar_impl.cc b/ash/mus/accelerator_registrar_impl.cc
|
| index 0f4502edd45a10198f82d6078d71b4355a497f61..361f8a7f22f6f8ef6060e66a9ee0a62884cb4854 100644
|
| --- a/ash/mus/accelerator_registrar_impl.cc
|
| +++ b/ash/mus/accelerator_registrar_impl.cc
|
| @@ -35,6 +35,7 @@ AcceleratorRegistrarImpl::AcceleratorRegistrarImpl(
|
| binding_(this, std::move(request)),
|
| accelerator_namespace_(accelerator_namespace & 0xffff),
|
| destroy_callback_(destroy_callback) {
|
| + window_manager_->AddObserver(this);
|
| binding_.set_connection_error_handler(base::Bind(
|
| &AcceleratorRegistrarImpl::OnBindingGone, base::Unretained(this)));
|
| }
|
| @@ -57,6 +58,7 @@ void AcceleratorRegistrarImpl::ProcessAccelerator(uint32_t accelerator_id,
|
| }
|
|
|
| AcceleratorRegistrarImpl::~AcceleratorRegistrarImpl() {
|
| + window_manager_->RemoveObserver(this);
|
| RemoveAllAccelerators();
|
| destroy_callback_.Run(this);
|
| }
|
| @@ -132,5 +134,15 @@ void AcceleratorRegistrarImpl::RemoveAccelerator(uint32_t accelerator_id) {
|
| delete this;
|
| }
|
|
|
| +void AcceleratorRegistrarImpl::OnAccelerator(uint32_t id,
|
| + const ui::Event& event) {
|
| + if (OwnsAccelerator(id))
|
| + ProcessAccelerator(id, event);
|
| +}
|
| +
|
| +void AcceleratorRegistrarImpl::OnWindowTreeClientDestroyed() {
|
| + delete this;
|
| +}
|
| +
|
| } // namespace mus
|
| } // namespace ash
|
|
|