Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(320)

Side by Side Diff: services/ui/common/accelerator_transport_util.cc

Issue 2520093003: WindowManagerClient::AddAccelerator() should take an array (Closed)
Patch Set: Modify helper to return vector and leverage helper in other files.Rename/format code. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "services/ui/common/accelerator_transport_util.h"
6
7 namespace ash {
8 namespace mus {
9
10 std::vector<ui::mojom::AcceleratorTransportPtr> AddAcceleratorHelper(
11 std::vector<ui::mojom::AcceleratorTransportPtr> accelerators,
12 uint32_t id,
13 ui::mojom::EventMatcherPtr event_matcher) {
14 ui::mojom::AcceleratorTransportPtr accelerator_transport_ptr =
15 ui::mojom::AcceleratorTransport::New();
16 accelerator_transport_ptr->id = id;
17 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.
18 accelerators.push_back(std::move(accelerator_transport_ptr));
19 return accelerators;
20 }
21
22 } // namespace mus
23 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698