Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/display/display.mojom"; | 8 import "services/ui/public/interfaces/display/display.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/window_manager_constants.mojom"; | 10 import "services/ui/public/interfaces/window_manager_constants.mojom"; |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 131 | 131 |
| 132 // Asks the WindowManager to cancel any outstanding move loop on |change_id|. | 132 // Asks the WindowManager to cancel any outstanding move loop on |change_id|. |
| 133 WmCancelMoveLoop(uint32 change_id); | 133 WmCancelMoveLoop(uint32 change_id); |
| 134 | 134 |
| 135 // An accelerator registered via AddAccelerator() has been triggered. If | 135 // An accelerator registered via AddAccelerator() has been triggered. If |
| 136 // |ack_id| is non-zero the accelerator matches a PRE_TARGET and must be | 136 // |ack_id| is non-zero the accelerator matches a PRE_TARGET and must be |
| 137 // acknowledged by WindowManagerClient::OnAcceleratorAck(). | 137 // acknowledged by WindowManagerClient::OnAcceleratorAck(). |
| 138 OnAccelerator(uint32 ack_id, uint32 accelerator_id, ui.mojom.Event event); | 138 OnAccelerator(uint32 ack_id, uint32 accelerator_id, ui.mojom.Event event); |
| 139 }; | 139 }; |
| 140 | 140 |
| 141 struct Accelerator{ | |
|
mfomitchev
2016/12/01 15:32:36
nit: space after Accelerator
thanhph
2016/12/01 19:03:19
Done.
mfomitchev
2016/12/01 20:51:51
No, not a blank line. Space. I.e. "Accelerator {"
| |
| 142 uint32 id; | |
| 143 EventMatcher event_matcher; | |
| 144 }; | |
| 145 | |
| 141 // This interface is only used as an associated interface and is associated | 146 // This interface is only used as an associated interface and is associated |
| 142 // with WindowTree. | 147 // with WindowTree. |
| 143 interface WindowManagerClient { | 148 interface WindowManagerClient { |
| 144 // Enables (or disables) child windows of |window_id| to be activated. | 149 // Enables (or disables) child windows of |window_id| to be activated. |
| 145 AddActivationParent(uint32 window_id); | 150 AddActivationParent(uint32 window_id); |
| 146 RemoveActivationParent(uint32 window_id); | 151 RemoveActivationParent(uint32 window_id); |
| 147 | 152 |
| 148 ActivateNextWindow(); | 153 ActivateNextWindow(); |
| 149 | 154 |
| 150 // Sets the underlay surface offset for the specified window and additional | 155 // Sets the underlay surface offset for the specified window and additional |
| 151 // hit area. The underlay surface is drawn at the bounds of the window minus | 156 // hit area. The underlay surface is drawn at the bounds of the window minus |
| 152 // the offset. The hit area is extended from the bounds of the window by | 157 // the offset. The hit area is extended from the bounds of the window by |
| 153 // |hit_area|. | 158 // |hit_area|. |
| 154 SetUnderlaySurfaceOffsetAndExtendedHitArea(uint32 window_id, | 159 SetUnderlaySurfaceOffsetAndExtendedHitArea(uint32 window_id, |
| 155 int32 x_offset, | 160 int32 x_offset, |
| 156 int32 y_offset, | 161 int32 y_offset, |
| 157 gfx.mojom.Insets hit_area); | 162 gfx.mojom.Insets hit_area); |
| 158 | 163 |
| 159 // Add and remove accelerators. When accelerators are registered the | 164 // Add and remove accelerators. When accelerators are registered the |
| 160 // WindowManager receives the event via OnAccelerator() rather than the | 165 // WindowManager receives the event via OnAccelerator() rather than the |
| 161 // target window. The id is defined by the client and can be used to more | 166 // target window. The id is defined by the client and can be used to more |
| 162 // easily identify the accelerator's action. If an accelerator with the same | 167 // easily identify the accelerator's action. If an accelerator with the same |
| 163 // id or the same matcher already exists, then the accelerator is not added. | 168 // id or matcher already exists, skip it.Returns true if all accelerators were |
|
mfomitchev
2016/12/01 15:32:36
Nit: There's some stuff in this comment specific t
thanhph
2016/12/01 19:03:19
Done.
| |
| 169 // added successfully. | |
| 164 // Accelerator ids 1 << 31 and above are reserved for internal use. | 170 // Accelerator ids 1 << 31 and above are reserved for internal use. |
| 165 // | 171 // |
| 166 // See WindowTree for details on event dispatch. | 172 // See WindowTree for details on event dispatch. |
| 167 AddAccelerator(uint32 id, EventMatcher matcher) => (bool success); | 173 AddAccelerators(array<Accelerator> accelerators) => (bool success); |
| 168 RemoveAccelerator(uint32 id); | 174 RemoveAccelerator(uint32 id); |
| 169 | 175 |
| 170 // The window manager has completed a request with the specific change id. | 176 // The window manager has completed a request with the specific change id. |
| 171 WmResponse(uint32 change_id, bool response); | 177 WmResponse(uint32 change_id, bool response); |
| 172 | 178 |
| 173 // Calls WindowTreeClient::RequestClose() on the embedded app at the | 179 // Calls WindowTreeClient::RequestClose() on the embedded app at the |
| 174 // specified window. | 180 // specified window. |
| 175 WmRequestClose(uint32 window_id); | 181 WmRequestClose(uint32 window_id); |
| 176 | 182 |
| 177 // Sets the frame decoration constants of the display the window manager is | 183 // Sets the frame decoration constants of the display the window manager is |
| 178 // associated with. | 184 // associated with. |
| 179 WmSetFrameDecorationValues(FrameDecorationValues values); | 185 WmSetFrameDecorationValues(FrameDecorationValues values); |
| 180 | 186 |
| 181 // Sets the cursor that the non-client areas of the window should use. | 187 // Sets the cursor that the non-client areas of the window should use. |
| 182 WmSetNonClientCursor(uint32 window_id, Cursor cursor_id); | 188 WmSetNonClientCursor(uint32 window_id, Cursor cursor_id); |
| 183 | 189 |
| 184 // Response from WmCreateTopLevelWindow() informing the client of the id for | 190 // Response from WmCreateTopLevelWindow() informing the client of the id for |
| 185 // the new window. | 191 // the new window. |
| 186 OnWmCreatedTopLevelWindow(uint32 change_id, uint32 window_id); | 192 OnWmCreatedTopLevelWindow(uint32 change_id, uint32 window_id); |
| 187 | 193 |
| 188 // See description in WindowManager::OnAccelerator(). |ack_id| is the value | 194 // See description in WindowManager::OnAccelerator(). |ack_id| is the value |
| 189 // that was passed to OnAccelerator(). | 195 // that was passed to OnAccelerator(). |
| 190 OnAcceleratorAck(uint32 ack_id, EventResult event_result); | 196 OnAcceleratorAck(uint32 ack_id, EventResult event_result); |
| 191 }; | 197 }; |
| OLD | NEW |