| Index: services/ui/ws/event_dispatcher.cc
|
| diff --git a/services/ui/ws/event_dispatcher.cc b/services/ui/ws/event_dispatcher.cc
|
| index d6536cc9c8c5f50dd0a89caa1f0adcf42e9ded33..837cd3275ebbbde8c48cde803e02373588c3281d 100644
|
| --- a/services/ui/ws/event_dispatcher.cc
|
| +++ b/services/ui/ws/event_dispatcher.cc
|
| @@ -256,6 +256,16 @@ bool EventDispatcher::AddAccelerator(uint32_t id,
|
| return true;
|
| }
|
|
|
| +bool EventDispatcher::AddAccelerators(
|
| + std::vector<ui::mojom::AcceleratorPtr> accelerators) {
|
| + bool all_new_accelerators = true;
|
| + for (auto iter = accelerators.begin(); iter != accelerators.end(); ++iter) {
|
| + if (!AddAccelerator(iter->get()->id, iter->get()->event_matcher.Clone()))
|
| + all_new_accelerators = false;
|
| + }
|
| + return all_new_accelerators;
|
| +}
|
| +
|
| void EventDispatcher::RemoveAccelerator(uint32_t id) {
|
| auto it = accelerators_.find(id);
|
| // Clients may pass bogus ids.
|
|
|