OLD | NEW |
---|---|
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 mus.mojom; | 5 module mus.mojom; |
6 | 6 |
7 import "cc/ipc/surface_id.mojom"; | 7 import "cc/ipc/surface_id.mojom"; |
8 import "components/mus/public/interfaces/cursor.mojom"; | 8 import "components/mus/public/interfaces/cursor.mojom"; |
9 import "components/mus/public/interfaces/event_matcher.mojom"; | 9 import "components/mus/public/interfaces/event_matcher.mojom"; |
10 import "components/mus/public/interfaces/mus_constants.mojom"; | 10 import "components/mus/public/interfaces/mus_constants.mojom"; |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
222 // See documentation for WindowTreeClient::OnWindowInputEvent(). | 222 // See documentation for WindowTreeClient::OnWindowInputEvent(). |
223 OnWindowInputEventAck(uint32 event_id, EventResult result); | 223 OnWindowInputEventAck(uint32 event_id, EventResult result); |
224 | 224 |
225 // See description of WindowManager for details. | 225 // See description of WindowManager for details. |
226 GetWindowManagerClient(associated WindowManagerClient& internal); | 226 GetWindowManagerClient(associated WindowManagerClient& internal); |
227 | 227 |
228 // Returns a shared memory segment that contains two 16-bit ints packed into a | 228 // Returns a shared memory segment that contains two 16-bit ints packed into a |
229 // single Atomic32, which represent the current location of the mouse cursor | 229 // single Atomic32, which represent the current location of the mouse cursor |
230 // where the location is (x << 16) | y. | 230 // where the location is (x << 16) | y. |
231 GetCursorLocationMemory() => (handle<shared_buffer> cursor_buffer); | 231 GetCursorLocationMemory() => (handle<shared_buffer> cursor_buffer); |
232 | |
233 // Tells the window manager to start moving the window. OnChangeCompleted is | |
234 // called on whether the move was canceled. Because there's a delay between | |
235 // when a client sends this message and when the window manager starts acting | |
sky
2016/06/22 23:47:56
There is a delay, but isn't this sent before the c
Elliot Glaysher
2016/06/24 17:41:55
Experimentally, the delay is actually pretty big a
sky
2016/06/24 19:27:00
It's worth understanding why this happens.
| |
236 // on it, pass the cursor location at the start of the move. | |
237 PerformWindowMove(uint32 change_id, uint32 window_id, gfx.mojom.Point cursor); | |
238 | |
239 // Tells the window manager to cancel any in progress window move started with | |
240 // StartWindowMove() and to revert the window bounds to how they were. | |
241 CancelWindowMove(uint32 window_id); | |
232 }; | 242 }; |
233 | 243 |
234 // Changes to windows are not sent to the connection that originated the | 244 // Changes to windows are not sent to the connection that originated the |
235 // change. For example, if connection 1 changes the bounds of a window by | 245 // change. For example, if connection 1 changes the bounds of a window by |
236 // calling SetWindowBounds(), connection 1 does not receive | 246 // calling SetWindowBounds(), connection 1 does not receive |
237 // OnWindowBoundsChanged(). | 247 // OnWindowBoundsChanged(). |
238 interface WindowTreeClient { | 248 interface WindowTreeClient { |
239 // Invoked when the client application has been embedded at |root|. | 249 // Invoked when the client application has been embedded at |root|. |
240 // See Embed() on WindowTree for more details. |tree| will be a handle back to | 250 // See Embed() on WindowTree for more details. |tree| will be a handle back to |
241 // the window manager service, unless the connection is to the root connection | 251 // the window manager service, unless the connection is to the root connection |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
351 // is 0. As with other functions this is only called if the client did not | 361 // is 0. As with other functions this is only called if the client did not |
352 // initiate the change. | 362 // initiate the change. |
353 OnWindowFocused(uint32 focused_window_id); | 363 OnWindowFocused(uint32 focused_window_id); |
354 | 364 |
355 OnWindowPredefinedCursorChanged(uint32 window_id, Cursor cursor_id); | 365 OnWindowPredefinedCursorChanged(uint32 window_id, Cursor cursor_id); |
356 | 366 |
357 // A change initiated from the client has completed. See description of | 367 // A change initiated from the client has completed. See description of |
358 // change ids for details. | 368 // change ids for details. |
359 OnChangeCompleted(uint32 change_id, bool success); | 369 OnChangeCompleted(uint32 change_id, bool success); |
360 | 370 |
371 // Called in response to PerformWindowMove(). | |
372 OnMoveLoopCompleted(uint32 change_id, bool success); | |
sky
2016/06/22 23:47:57
Can't you use OnChangeCompleted() for this?
Elliot Glaysher
2016/06/24 17:41:55
OnMoveLoopCompleted() does additional things like
sky
2016/06/24 19:27:00
Isn't that an implementation detail though? By tha
| |
373 | |
361 // The WindowManager is requesting the specified window to close. If the | 374 // The WindowManager is requesting the specified window to close. If the |
362 // client allows the change it should delete the window. | 375 // client allows the change it should delete the window. |
363 RequestClose(uint32 window_id); | 376 RequestClose(uint32 window_id); |
364 | 377 |
365 // See description of WindowManager for details. | 378 // See description of WindowManager for details. |
366 GetWindowManager(associated WindowManager& internal); | 379 GetWindowManager(associated WindowManager& internal); |
367 }; | 380 }; |
368 | 381 |
369 // Mus provides this interface as a way for clients to connect and obtain a | 382 // Mus provides this interface as a way for clients to connect and obtain a |
370 // WindowTree handle with a supplied WindowTreeClient handle. The | 383 // WindowTree handle with a supplied WindowTreeClient handle. The |
371 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one. | 384 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one. |
372 interface WindowTreeFactory { | 385 interface WindowTreeFactory { |
373 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client); | 386 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client); |
374 }; | 387 }; |
OLD | NEW |