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

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

Issue 2248263003: Updates PointerEventRouter to handle switching move type (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge again Created 4 years, 4 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/cpp/window_tree_client.cc ('k') | services/ui/ws/test_change_tracker.h » ('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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // Releases input event capture for the given |window_id|. This does nothing 80 // Releases input event capture for the given |window_id|. This does nothing
81 // if |window_id| does not currently have capture. 81 // if |window_id| does not currently have capture.
82 ReleaseCapture(uint32 change_id, uint32 window_id); 82 ReleaseCapture(uint32 change_id, uint32 window_id);
83 83
84 // Starts the pointer watcher that monitors pointer events (up/down events if 84 // Starts the pointer watcher that monitors pointer events (up/down events if
85 // |wants_moves| is false, up/down and move if |wants_moves| is true), even if 85 // |wants_moves| is false, up/down and move if |wants_moves| is true), even if
86 // they are not targeted at a window in this tree. For pointer events that 86 // they are not targeted at a window in this tree. For pointer events that
87 // would normally be sent to the requesting client (if the event target is 87 // would normally be sent to the requesting client (if the event target is
88 // this window tree) OnWindowInputEvent() is called, all other matching 88 // this window tree) OnWindowInputEvent() is called, all other matching
89 // pointer events (if the target is another tree) result in 89 // pointer events (if the target is another tree) result in
90 // OnPointerEventObserved(). The client must supply a non-zero 90 // OnPointerEventObserved(). There is only ever one pointer watcher active at
91 // |pointer_watcher_id|, which is reported back with matched events. There is 91 // a given time. The client should prefer |want_moves| to be false, as there's
92 // only ever one pointer watcher active at a given time. The client should 92 // a system-wide performance/battery penalty for listening to moves.
93 // prefer |want_moves| to be false, as there's a system-wide performance/
94 // battery penalty for listening to moves.
95 // 93 //
96 // See class description for details on event delivery. 94 // See class description for details on event delivery.
97 StartPointerWatcher(bool want_moves, uint32 pointer_watcher_id); 95 StartPointerWatcher(bool want_moves);
98 96
99 // Stops the pointer watcher for all events. 97 // Stops the pointer watcher for all events.
100 StopPointerWatcher(); 98 StopPointerWatcher();
101 99
102 // Sets the specified bounds of the specified window. 100 // Sets the specified bounds of the specified window.
103 SetWindowBounds(uint32 change_id, uint32 window_id, gfx.mojom.Rect bounds); 101 SetWindowBounds(uint32 change_id, uint32 window_id, gfx.mojom.Rect bounds);
104 102
105 // Sets the client area of the specified window. The client area is specified 103 // Sets the client area of the specified window. The client area is specified
106 // by way of insets. Everything outside of the insets, and not in 104 // by way of insets. Everything outside of the insets, and not in
107 // |additional_client_areas| is considered non-client area. 105 // |additional_client_areas| is considered non-client area.
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 367
370 // Invoked when a window property is changed. If this change is a removal, 368 // Invoked when a window property is changed. If this change is a removal,
371 // |new_data| is null. 369 // |new_data| is null.
372 OnWindowSharedPropertyChanged(uint32 window, 370 OnWindowSharedPropertyChanged(uint32 window,
373 string name, 371 string name,
374 array<uint8>? new_data); 372 array<uint8>? new_data);
375 373
376 // Invoked when an event is targeted at the specified window. The client must 374 // Invoked when an event is targeted at the specified window. The client must
377 // call WindowTree::OnWindowInputEventAck() with the same |event_id| to notify 375 // call WindowTree::OnWindowInputEventAck() with the same |event_id| to notify
378 // that the event has been processed, and with an EventResult value to notify 376 // that the event has been processed, and with an EventResult value to notify
379 // if the event was consumed. |pointer_watcher_id| is the id supplied to 377 // if the event was consumed. |matches_pointer_watcher| is true if the client
380 // StartPointerWatcher() if the event is a pointer event and the client called 378 // has called StartPointerWatcher() and the event matches the type of events
381 // StartPointerWatcher(). The client will not receive farther events until the 379 // specified by StartPointerWatcher(). The client will not receive farther
382 // event is ack'ed. 380 // events until the event is ack'ed, regardless of the value of
381 // |matches_pointer_watcher|.
383 OnWindowInputEvent(uint32 event_id, 382 OnWindowInputEvent(uint32 event_id,
384 uint32 window, 383 uint32 window,
385 ui.mojom.Event event, 384 ui.mojom.Event event,
386 uint32 pointer_watcher_id); 385 bool matches_pointer_watcher);
387 386
388 // Called when a pointer event that would not normally be targeted at this 387 // Called when a pointer event that would not normally be targeted at this
389 // client is encountered and the client called StartPointerWatcher(). The 388 // client is encountered and the client called StartPointerWatcher(). See
390 // |pointer_watcher_id| is the one supplied to StartPointerWatcher(). See
391 // StartPointerWatcher() for details. |window_id| is the window id of the 389 // StartPointerWatcher() for details. |window_id| is the window id of the
392 // event target, or 0 if the window is not known to this client. The 390 // event target, or 0 if the window is not known to this client. The
393 // client should not acknowledge these events. 391 // client should not acknowledge these events.
394 OnPointerEventObserved(ui.mojom.Event event, 392 OnPointerEventObserved(ui.mojom.Event event, uint32 window_id);
395 uint32 pointer_watcher_id,
396 uint32 window_id);
397 393
398 // Called in two distinct cases: when a window known to the connection gains 394 // Called in two distinct cases: when a window known to the connection gains
399 // focus, or when focus moves from a window known to the connection to a 395 // focus, or when focus moves from a window known to the connection to a
400 // window not known to the connection. In the later case |focused_window_id| 396 // window not known to the connection. In the later case |focused_window_id|
401 // is 0. As with other functions this is only called if the client did not 397 // is 0. As with other functions this is only called if the client did not
402 // initiate the change. 398 // initiate the change.
403 OnWindowFocused(uint32 focused_window_id); 399 OnWindowFocused(uint32 focused_window_id);
404 400
405 OnWindowPredefinedCursorChanged(uint32 window_id, Cursor cursor_id); 401 OnWindowPredefinedCursorChanged(uint32 window_id, Cursor cursor_id);
406 402
407 // A change initiated from the client has completed. See description of 403 // A change initiated from the client has completed. See description of
408 // change ids for details. 404 // change ids for details.
409 OnChangeCompleted(uint32 change_id, bool success); 405 OnChangeCompleted(uint32 change_id, bool success);
410 406
411 // The WindowManager is requesting the specified window to close. If the 407 // The WindowManager is requesting the specified window to close. If the
412 // client allows the change it should delete the window. 408 // client allows the change it should delete the window.
413 RequestClose(uint32 window_id); 409 RequestClose(uint32 window_id);
414 410
415 // See description of WindowManager for details. 411 // See description of WindowManager for details.
416 GetWindowManager(associated WindowManager& internal); 412 GetWindowManager(associated WindowManager& internal);
417 }; 413 };
418 414
419 // Mus provides this interface as a way for clients to connect and obtain a 415 // Mus provides this interface as a way for clients to connect and obtain a
420 // WindowTree handle with a supplied WindowTreeClient handle. The 416 // WindowTree handle with a supplied WindowTreeClient handle. The
421 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one. 417 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one.
422 interface WindowTreeFactory { 418 interface WindowTreeFactory {
423 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client); 419 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client);
424 }; 420 };
OLDNEW
« no previous file with comments | « services/ui/public/cpp/window_tree_client.cc ('k') | services/ui/ws/test_change_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698