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

Side by Side Diff: services/ui/public/interfaces/window_tree.mojom

Issue 2125883003: Adds ability for pre-target accelerators to not consume events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 4 years, 5 months 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
« no previous file with comments | « services/ui/public/interfaces/window_manager.mojom ('k') | services/ui/test_wm/test_wm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 module ui.mojom; 5 module ui.mojom;
6 6
7 import "cc/ipc/surface_id.mojom"; 7 import "cc/ipc/surface_id.mojom";
8 import "services/ui/public/interfaces/cursor.mojom"; 8 import "services/ui/public/interfaces/cursor.mojom";
9 import "services/ui/public/interfaces/event_matcher.mojom"; 9 import "services/ui/public/interfaces/event_matcher.mojom";
10 import "services/ui/public/interfaces/mus_constants.mojom"; 10 import "services/ui/public/interfaces/mus_constants.mojom";
(...skipping 11 matching lines...) Expand all
22 // The root window is identified with a connection id of 0, and value of 1. 22 // The root window is identified with a connection id of 0, and value of 1.
23 // 23 //
24 // Most functions to the WindowTree take a change_id parameter. When 24 // Most functions to the WindowTree take a change_id parameter. When
25 // WindowTree completes processing of a function WindowTree calls 25 // WindowTree completes processing of a function WindowTree calls
26 // WindowTreeClient::OnChangeCompleted() with the change_id supplied by the 26 // WindowTreeClient::OnChangeCompleted() with the change_id supplied by the
27 // client and the result of the function. This allows the client to track 27 // client and the result of the function. This allows the client to track
28 // whether the call succeeded or not. Calls are done via the client interface 28 // whether the call succeeded or not. Calls are done via the client interface
29 // rather than a callback to ensure ordering. The server does not interpret the 29 // rather than a callback to ensure ordering. The server does not interpret the
30 // change id in anyway, it is up to the client to assign a value and use it. 30 // change id in anyway, it is up to the client to assign a value and use it.
31 // Generally the change id is an ever increasing integer. 31 // Generally the change id is an ever increasing integer.
32 //
33 // Event processing happens in the following order:
34 // . The event is sent to the accelerator registered for the PRE_TARGET. If
35 // the client consumes the event, matching event observers are notified and
36 // processing stops. If the EventMatcher does not consume the event processing
sadrul 2016/07/07 20:04:42 Do you mean 'If the accelerator handler does not c
sky 2016/07/07 21:55:42 I changed it to client as that is what I said on t
37 // continues.
38 // . Target window (lookup of the target window depends upon the event type) and
39 // matching event observers and notified at the same time. The target is only
sadrul 2016/07/07 20:04:42 s/and/are
sky 2016/07/07 21:55:43 Done.
40 // notified once, even if it has a matching event observer registered. If the
41 // target consumes the event, processing stops.
sadrul 2016/07/07 20:04:41 What happens if there is a non-accelerator event f
sky 2016/07/07 21:55:42 Not sure what you mean. If there is no-accelerator
42 // . Accelerator registered for POST_TARGET. No response is expected from the
43 // client for the POST_TARGET and processing of the next continues
44 // immediately.
32 interface WindowTree { 45 interface WindowTree {
33 // Creates a new window with the specified id. It is up to the client to 46 // Creates a new window with the specified id. It is up to the client to
34 // ensure the id is unique to the connection (the id need not be globally 47 // ensure the id is unique to the connection (the id need not be globally
35 // unique). Additionally the connection id (embedded in |window_id|) must 48 // unique). Additionally the connection id (embedded in |window_id|) must
36 // match that of the connection. 49 // match that of the connection.
37 // Errors: 50 // Errors:
38 // ERROR_CODE_VALUE_IN_USE: a window already exists with the specified id. 51 // ERROR_CODE_VALUE_IN_USE: a window already exists with the specified id.
39 // ERROR_CODE_ILLEGAL_ARGUMENT: The connection part of |window_id| does not 52 // ERROR_CODE_ILLEGAL_ARGUMENT: The connection part of |window_id| does not
40 // match the connection id of the client. 53 // match the connection id of the client.
41 NewWindow(uint32 change_id, 54 NewWindow(uint32 change_id,
(...skipping 24 matching lines...) Expand all
66 // Releases input event capture for the given |window_id|. This does nothing 79 // Releases input event capture for the given |window_id|. This does nothing
67 // if |window_id| does not currently have capture. 80 // if |window_id| does not currently have capture.
68 ReleaseCapture(uint32 change_id, uint32 window_id); 81 ReleaseCapture(uint32 change_id, uint32 window_id);
69 82
70 // Sets an observer that monitors all events, even if they are not targeted 83 // Sets an observer that monitors all events, even if they are not targeted
71 // at a window in this tree. If an event matchs |matcher| the observer reports 84 // at a window in this tree. If an event matchs |matcher| the observer reports
72 // it to the WindowTreeClient via OnWindowInputEvent (if the event target is 85 // it to the WindowTreeClient via OnWindowInputEvent (if the event target is
73 // this window tree) or OnEventObserved (if the target is another tree). The 86 // this window tree) or OnEventObserved (if the target is another tree). The
74 // client must supply a non-zero |observer_id|, which is reported back with 87 // client must supply a non-zero |observer_id|, which is reported back with
75 // observed events. Set the matcher to null to clear the observer. 88 // observed events. Set the matcher to null to clear the observer.
89 //
90 // See class description for details on event delivery.
76 SetEventObserver(EventMatcher? matcher, uint32 observer_id); 91 SetEventObserver(EventMatcher? matcher, uint32 observer_id);
77 92
78 // Sets the specified bounds of the specified window. 93 // Sets the specified bounds of the specified window.
79 SetWindowBounds(uint32 change_id, uint32 window_id, gfx.mojom.Rect bounds); 94 SetWindowBounds(uint32 change_id, uint32 window_id, gfx.mojom.Rect bounds);
80 95
81 // Sets the client area of the specified window. The client area is specified 96 // Sets the client area of the specified window. The client area is specified
82 // by way of insets. Everything outside of the insets, and not in 97 // by way of insets. Everything outside of the insets, and not in
83 // |additional_client_areas| is considered non-client area. 98 // |additional_client_areas| is considered non-client area.
84 // TODO(sky): convert additional_client_areas to a path. 99 // TODO(sky): convert additional_client_areas to a path.
85 SetClientArea(uint32 window_id, 100 SetClientArea(uint32 window_id,
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 // See description of WindowManager for details. 395 // See description of WindowManager for details.
381 GetWindowManager(associated WindowManager& internal); 396 GetWindowManager(associated WindowManager& internal);
382 }; 397 };
383 398
384 // Mus provides this interface as a way for clients to connect and obtain a 399 // Mus provides this interface as a way for clients to connect and obtain a
385 // WindowTree handle with a supplied WindowTreeClient handle. The 400 // WindowTree handle with a supplied WindowTreeClient handle. The
386 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one. 401 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one.
387 interface WindowTreeFactory { 402 interface WindowTreeFactory {
388 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client); 403 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client);
389 }; 404 };
OLDNEW
« no previous file with comments | « services/ui/public/interfaces/window_manager.mojom ('k') | services/ui/test_wm/test_wm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698