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

Unified Diff: services/ui/public/interfaces/window_manager.mojom

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/public/interfaces/window_manager.mojom
diff --git a/services/ui/public/interfaces/window_manager.mojom b/services/ui/public/interfaces/window_manager.mojom
index c9d63f81da8d86a0243164be715647c4f4629350..e7a174e02daf417ced694f2ebfb81d7ebd89643a 100644
--- a/services/ui/public/interfaces/window_manager.mojom
+++ b/services/ui/public/interfaces/window_manager.mojom
@@ -138,6 +138,11 @@ interface WindowManager {
OnAccelerator(uint32 ack_id, uint32 accelerator_id, ui.mojom.Event event);
};
+struct AcceleratorTransport{
mfomitchev 2016/11/29 23:27:41 Are we appending "Transport" to the struct name in
thanhph 2016/11/30 01:31:20 The name Accelerator is already used in class ui::
mfomitchev 2016/11/30 02:33:04 Yes, just like gfx::mojom::Point and gfx::Point. T
thanhph 2016/11/30 14:24:51 Done, thanks!
+ uint32 id;
+ EventMatcher event_matcher;
+};
+
// This interface is only used as an associated interface and is associated
// with WindowTree.
interface WindowManagerClient {
@@ -160,11 +165,12 @@ interface WindowManagerClient {
// WindowManager receives the event via OnAccelerator() rather than the
// target window. The id is defined by the client and can be used to more
// easily identify the accelerator's action. If an accelerator with the same
- // id or the same matcher already exists, then the accelerator is not added.
+ // id or matcher already exists, skip it.Returns true if all accelerators were
+ // added successfully.
// Accelerator ids 1 << 31 and above are reserved for internal use.
//
// See WindowTree for details on event dispatch.
- AddAccelerator(uint32 id, EventMatcher matcher) => (bool success);
+ AddAccelerators(array<AcceleratorTransport> accelerators) => (bool success);
RemoveAccelerator(uint32 id);
// The window manager has completed a request with the specific change id.

Powered by Google App Engine
This is Rietveld 408576698