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

Unified Diff: services/ui/common/accelerator_util.h

Issue 2520093003: WindowManagerClient::AddAccelerator() should take an array (Closed)
Patch Set: Add CreateAcceleratorTransport and rename helper to CreateAcceleratorVector. Add one more test case… Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: services/ui/common/accelerator_util.h
diff --git a/services/ui/common/accelerator_util.h b/services/ui/common/accelerator_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..7c4422ee8d14650800961d3144d02c595ef54d0a
--- /dev/null
+++ b/services/ui/common/accelerator_util.h
@@ -0,0 +1,32 @@
+// 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.
+
+#ifndef SERVICES_UI_COMMON_ACCELERATOR_UTIL_H_
+#define SERVICES_UI_COMMON_ACCELERATOR_UTIL_H_
+
+#include "services/ui/public/interfaces/event_matcher.mojom.h"
+#include "services/ui/public/interfaces/window_manager.mojom.h"
+#include "ui/events/mojo/event_constants.mojom.h"
+#include "ui/events/mojo/keyboard_codes.mojom.h"
+
+namespace ui {
+
+// |flags| is a bitfield of kEventFlag* and kMouseEventFlag* values in
+// input_event_constants.mojom.
+mojom::EventMatcherPtr CreateKeyMatcher(ui::mojom::KeyboardCode code,
+ int flags);
+
+// Construct accelerator from the provided |id| and |event_matcher| and add it
+// to an empty |accelerators| vector.
mfomitchev 2016/11/29 23:27:41 comment needs updating - there's no |accelerators|
thanhph 2016/11/30 01:31:20 Done.
+std::vector<ui::mojom::AcceleratorTransportPtr> CreateAcceleratorVector(
+ uint32_t id,
+ ui::mojom::EventMatcherPtr event_matcher);
+
+ui::mojom::AcceleratorTransportPtr CreateAcceleratorTransport(
mfomitchev 2016/11/29 23:27:41 document
thanhph 2016/11/30 01:31:20 Done.
+ uint32_t id,
+ ui::mojom::EventMatcherPtr event_matcher);
+
+} // namespace ui
+
+#endif // SERVICES_UI_COMMON_ACCELERATOR_TRANSPORT_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698