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

Side by Side Diff: services/ui/ws/window_tree.h

Issue 2125663002: mus: Add watcher for all touch events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Overload copy assignment operator for Change struct. 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 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 #ifndef SERVICES_UI_WS_WINDOW_TREE_H_ 5 #ifndef SERVICES_UI_WS_WINDOW_TREE_H_
6 #define SERVICES_UI_WS_WINDOW_TREE_H_ 6 #define SERVICES_UI_WS_WINDOW_TREE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 void ReorderWindow(uint32_t change_Id, 353 void ReorderWindow(uint32_t change_Id,
354 Id window_id, 354 Id window_id,
355 Id relative_window_id, 355 Id relative_window_id,
356 mojom::OrderDirection direction) override; 356 mojom::OrderDirection direction) override;
357 void GetWindowTree( 357 void GetWindowTree(
358 Id window_id, 358 Id window_id,
359 const base::Callback<void(mojo::Array<mojom::WindowDataPtr>)>& callback) 359 const base::Callback<void(mojo::Array<mojom::WindowDataPtr>)>& callback)
360 override; 360 override;
361 void SetCapture(uint32_t change_id, Id window_id) override; 361 void SetCapture(uint32_t change_id, Id window_id) override;
362 void ReleaseCapture(uint32_t change_id, Id window_id) override; 362 void ReleaseCapture(uint32_t change_id, Id window_id) override;
363 void SetEventObserver(mojom::EventMatcherPtr matcher, 363 void AddEventObserver(mojom::EventMatcherPtr matcher,
364 uint32_t observer_id) override; 364 uint32_t observer_id) override;
365 void RemoveEventObserver(uint32_t observer_id) override;
365 void SetWindowBounds(uint32_t change_id, 366 void SetWindowBounds(uint32_t change_id,
366 Id window_id, 367 Id window_id,
367 const gfx::Rect& bounds) override; 368 const gfx::Rect& bounds) override;
368 void SetWindowVisibility(uint32_t change_id, 369 void SetWindowVisibility(uint32_t change_id,
369 Id window_id, 370 Id window_id,
370 bool visible) override; 371 bool visible) override;
371 void SetWindowProperty(uint32_t change_id, 372 void SetWindowProperty(uint32_t change_id,
372 Id transport_window_id, 373 Id transport_window_id,
373 const mojo::String& name, 374 const mojo::String& name,
374 mojo::Array<uint8_t> value) override; 375 mojo::Array<uint8_t> value) override;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 // client (ClientWindowId). 466 // client (ClientWindowId).
466 base::hash_map<ClientWindowId, WindowId> client_id_to_window_id_map_; 467 base::hash_map<ClientWindowId, WindowId> client_id_to_window_id_map_;
467 base::hash_map<WindowId, ClientWindowId> window_id_to_client_id_map_; 468 base::hash_map<WindowId, ClientWindowId> window_id_to_client_id_map_;
468 469
469 uint32_t event_ack_id_; 470 uint32_t event_ack_id_;
470 471
471 // A client is considered janky if it hasn't ACK'ed input events within a 472 // A client is considered janky if it hasn't ACK'ed input events within a
472 // reasonable timeframe. 473 // reasonable timeframe.
473 bool janky_ = false; 474 bool janky_ = false;
474 475
475 // Set when the client is using SetEventObserver() to observe events, 476 // Set when the client is using AddEventObserver() to observe events,
476 // otherwise null. 477 // otherwise null. Key is an ID supplied by the client for the
477 std::unique_ptr<EventMatcher> event_observer_matcher_; 478 // event observer
478 479 std::map<uint32_t, std::unique_ptr<EventMatcher>> event_observer_matchers_;
479 // The ID supplied by the client for the current event observer.
480 uint32_t event_observer_id_ = 0;
481 480
482 // WindowManager the current event came from. 481 // WindowManager the current event came from.
483 WindowManagerState* event_source_wms_ = nullptr; 482 WindowManagerState* event_source_wms_ = nullptr;
484 483
485 std::queue<std::unique_ptr<TargetedEvent>> event_queue_; 484 std::queue<std::unique_ptr<TargetedEvent>> event_queue_;
486 485
487 std::unique_ptr<mojo::AssociatedBinding<mojom::WindowManagerClient>> 486 std::unique_ptr<mojo::AssociatedBinding<mojom::WindowManagerClient>>
488 window_manager_internal_client_binding_; 487 window_manager_internal_client_binding_;
489 mojom::WindowManager* window_manager_internal_; 488 mojom::WindowManager* window_manager_internal_;
490 std::unique_ptr<WindowManagerState> window_manager_state_; 489 std::unique_ptr<WindowManagerState> window_manager_state_;
491 490
492 std::unique_ptr<WaitingForTopLevelWindowInfo> 491 std::unique_ptr<WaitingForTopLevelWindowInfo>
493 waiting_for_top_level_window_info_; 492 waiting_for_top_level_window_info_;
494 bool embedder_intercepts_events_ = false; 493 bool embedder_intercepts_events_ = false;
495 494
496 DISALLOW_COPY_AND_ASSIGN(WindowTree); 495 DISALLOW_COPY_AND_ASSIGN(WindowTree);
497 }; 496 };
498 497
499 } // namespace ws 498 } // namespace ws
500 } // namespace ui 499 } // namespace ui
501 500
502 #endif // SERVICES_UI_WS_WINDOW_TREE_H_ 501 #endif // SERVICES_UI_WS_WINDOW_TREE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698