Chromium Code Reviews| Index: ash/mus/accelerators/accelerator_controller_registrar.cc |
| diff --git a/ash/mus/accelerators/accelerator_controller_registrar.cc b/ash/mus/accelerators/accelerator_controller_registrar.cc |
| index 79d7ea794ccaf9247c1c76c5187e4a1abfe8b742..7c80269cfd08c33d9d99363e3e4f378a4a01277c 100644 |
| --- a/ash/mus/accelerators/accelerator_controller_registrar.cc |
| +++ b/ash/mus/accelerators/accelerator_controller_registrar.cc |
| @@ -13,7 +13,7 @@ |
| #include "ash/mus/bridge/wm_window_mus.h" |
| #include "ash/mus/window_manager.h" |
| #include "base/logging.h" |
| -#include "services/ui/common/event_matcher_util.h" |
| +#include "services/ui/common/accelerator_util.h" |
| #include "services/ui/public/cpp/window_manager_delegate.h" |
| #include "services/ui/public/cpp/window_tree_client.h" |
| #include "ui/base/accelerators/accelerator_history.h" |
| @@ -126,12 +126,16 @@ void AcceleratorControllerRegistrar::OnAcceleratorRegistered( |
| post_event_matcher->accelerator_phase = |
| ui::mojom::AcceleratorPhase::POST_TARGET; |
| - window_manager_->window_manager_client()->AddAccelerator( |
| - ComputeAcceleratorId(id_namespace_, ids.pre_id), std::move(event_matcher), |
| + window_manager_->window_manager_client()->AddAccelerators( |
|
sky
2016/12/01 22:17:04
Is this only the first change you're intending to
thanhph
2016/12/01 23:32:41
To change this I need to change the callback funct
sky
2016/12/02 00:11:16
I don't think that would help as registration adds
thanhph
2016/12/02 15:11:18
Thanks Scott, I'll keep this in mind. Should I put
|
| + ui::CreateAcceleratorVector( |
| + ComputeAcceleratorId(id_namespace_, ids.pre_id), |
| + std::move(event_matcher)), |
| base::Bind(OnAcceleratorAdded, accelerator)); |
| - window_manager_->window_manager_client()->AddAccelerator( |
| - ComputeAcceleratorId(id_namespace_, ids.post_id), |
| - std::move(post_event_matcher), |
| + |
| + window_manager_->window_manager_client()->AddAccelerators( |
| + ui::CreateAcceleratorVector( |
| + ComputeAcceleratorId(id_namespace_, ids.post_id), |
| + std::move(post_event_matcher)), |
| base::Bind(OnAcceleratorAdded, accelerator)); |
| } |