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

Side by Side Diff: services/ui/public/interfaces/window_manager.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: merge 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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 "services/ui/public/interfaces/cursor.mojom"; 7 import "services/ui/public/interfaces/cursor.mojom";
8 import "services/ui/public/interfaces/event_matcher.mojom"; 8 import "services/ui/public/interfaces/event_matcher.mojom";
9 import "services/ui/public/interfaces/window_manager_constants.mojom"; 9 import "services/ui/public/interfaces/window_manager_constants.mojom";
10 import "services/ui/public/interfaces/window_tree_constants.mojom"; 10 import "services/ui/public/interfaces/window_tree_constants.mojom";
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // Asks the WindowManager to interactively move the window. This will return 86 // Asks the WindowManager to interactively move the window. This will return
87 // whether this completed successfully or not through the client's 87 // whether this completed successfully or not through the client's
88 // OnWmMoveLoopCompleted(). 88 // OnWmMoveLoopCompleted().
89 WmPerformMoveLoop(uint32 change_id, uint32 window_id, 89 WmPerformMoveLoop(uint32 change_id, uint32 window_id,
90 MoveLoopSource source, 90 MoveLoopSource source,
91 gfx.mojom.Point cursor_location); 91 gfx.mojom.Point cursor_location);
92 92
93 // Asks the WindowManager to cancel any outstanding move loop on |change_id|. 93 // Asks the WindowManager to cancel any outstanding move loop on |change_id|.
94 WmCancelMoveLoop(uint32 change_id); 94 WmCancelMoveLoop(uint32 change_id);
95 95
96 // An accelerator registered via AddAccelerator() has been triggered. 96 // An accelerator registered via AddAccelerator() has been triggered. If
97 OnAccelerator(uint32 id, ui.mojom.Event event); 97 // |ack_id| is non-zero the accelerator matches a PRE_TARGET and must be
98 // acknowledged by WindowManagerClient::OnAcceleratorAck().
99 OnAccelerator(uint32 ack_id, uint32 accelerator_id, ui.mojom.Event event);
98 }; 100 };
99 101
100 // This interface is only used as an associated interface and is associated 102 // This interface is only used as an associated interface and is associated
101 // with WindowTree. 103 // with WindowTree.
102 interface WindowManagerClient { 104 interface WindowManagerClient {
103 // Enables (or disables) child windows of |window_id| to be activated. 105 // Enables (or disables) child windows of |window_id| to be activated.
104 AddActivationParent(uint32 window_id); 106 AddActivationParent(uint32 window_id);
105 RemoveActivationParent(uint32 window_id); 107 RemoveActivationParent(uint32 window_id);
106 108
107 ActivateNextWindow(); 109 ActivateNextWindow();
108 110
109 // Sets the underlay surface offset for the specified window and additional 111 // Sets the underlay surface offset for the specified window and additional
110 // hit area. The underlay surface is drawn at the bounds of the window minus 112 // hit area. The underlay surface is drawn at the bounds of the window minus
111 // the offset. The hit area is extended from the bounds of the window by 113 // the offset. The hit area is extended from the bounds of the window by
112 // |hit_area|. 114 // |hit_area|.
113 SetUnderlaySurfaceOffsetAndExtendedHitArea(uint32 window_id, 115 SetUnderlaySurfaceOffsetAndExtendedHitArea(uint32 window_id,
114 int32 x_offset, 116 int32 x_offset,
115 int32 y_offset, 117 int32 y_offset,
116 gfx.mojom.Insets hit_area); 118 gfx.mojom.Insets hit_area);
117 119
118 // Add and remove accelerators. When accelerators are registered the 120 // Add and remove accelerators. When accelerators are registered the
119 // WindowManager receives the event via OnAccelerator() rather than the 121 // WindowManager receives the event via OnAccelerator() rather than the
120 // target window. The id is defined by the client and can be used to more 122 // target window. The id is defined by the client and can be used to more
121 // easily identify the accelerator's action. If an accelerator with the same 123 // easily identify the accelerator's action. If an accelerator with the same
122 // id or the same matcher already exists, then the accelerator is not added. 124 // id or the same matcher already exists, then the accelerator is not added.
123 // Accelerator ids 1 << 31 and above are reserved for internal use. 125 // Accelerator ids 1 << 31 and above are reserved for internal use.
126 //
127 // See WindowTree for details on event dispatch.
124 AddAccelerator(uint32 id, EventMatcher matcher) => (bool success); 128 AddAccelerator(uint32 id, EventMatcher matcher) => (bool success);
125 RemoveAccelerator(uint32 id); 129 RemoveAccelerator(uint32 id);
126 130
127 // The window manager has completed a request with the specific change id. 131 // The window manager has completed a request with the specific change id.
128 WmResponse(uint32 change_id, bool response); 132 WmResponse(uint32 change_id, bool response);
129 133
130 // Calls WindowTreeClient::RequestClose() on the embedded app at the 134 // Calls WindowTreeClient::RequestClose() on the embedded app at the
131 // specified window. 135 // specified window.
132 WmRequestClose(uint32 window_id); 136 WmRequestClose(uint32 window_id);
133 137
134 // Sets the frame decoration constants of the display the window manager is 138 // Sets the frame decoration constants of the display the window manager is
135 // associated with. 139 // associated with.
136 WmSetFrameDecorationValues(FrameDecorationValues values); 140 WmSetFrameDecorationValues(FrameDecorationValues values);
137 141
138 // Sets the cursor that the non-client areas of the window should use. 142 // Sets the cursor that the non-client areas of the window should use.
139 WmSetNonClientCursor(uint32 window_id, Cursor cursor_id); 143 WmSetNonClientCursor(uint32 window_id, Cursor cursor_id);
140 144
141 // Response from WmCreateTopLevelWindow() informing the client of the id for 145 // Response from WmCreateTopLevelWindow() informing the client of the id for
142 // the new window. 146 // the new window.
143 OnWmCreatedTopLevelWindow(uint32 change_id, uint32 window_id); 147 OnWmCreatedTopLevelWindow(uint32 change_id, uint32 window_id);
148
149 // See description in WindowManager::OnAccelerator(). |ack_id| is the value
150 // that was passed to OnAccelerator().
151 OnAcceleratorAck(uint32 ack_id, EventResult event_result);
144 }; 152 };
OLDNEW
« no previous file with comments | « services/ui/public/interfaces/event_matcher.mojom ('k') | services/ui/public/interfaces/window_tree.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698