Chromium Code Reviews| Index: services/ui/common/accelerator_transport_util.cc |
| diff --git a/services/ui/common/accelerator_transport_util.cc b/services/ui/common/accelerator_transport_util.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..bd2c6ac93b6002fcf5de4a603bf1f8456943ac2c |
| --- /dev/null |
| +++ b/services/ui/common/accelerator_transport_util.cc |
| @@ -0,0 +1,23 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "services/ui/common/accelerator_transport_util.h" |
| + |
| +namespace ash { |
| +namespace mus { |
| + |
| +std::vector<ui::mojom::AcceleratorTransportPtr> AddAcceleratorHelper( |
| + std::vector<ui::mojom::AcceleratorTransportPtr> accelerators, |
| + uint32_t id, |
| + ui::mojom::EventMatcherPtr event_matcher) { |
| + ui::mojom::AcceleratorTransportPtr accelerator_transport_ptr = |
| + ui::mojom::AcceleratorTransport::New(); |
| + accelerator_transport_ptr->id = id; |
| + accelerator_transport_ptr->event_matcher = event_matcher.Clone(); |
|
mfomitchev
2016/11/29 01:55:45
use std::move instead of Clone()
thanhph
2016/11/29 16:50:17
Done.
|
| + accelerators.push_back(std::move(accelerator_transport_ptr)); |
| + return accelerators; |
| +} |
| + |
| +} // namespace mus |
| +} // namespace ash |