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

Side by Side Diff: ui/aura/mus/window_tree_client.cc

Issue 2626013005: Change CaptureSynchronizer and PointerWatcherEventRouter to support multiple CaptureClients. (Closed)
Patch Set: Created 3 years, 11 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 #include "ui/aura/mus/window_tree_client.h" 5 #include "ui/aura/mus/window_tree_client.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 tree_ptr_->GetWindowManagerClient(MakeRequest( 446 tree_ptr_->GetWindowManagerClient(MakeRequest(
447 &window_manager_internal_client_, tree_ptr_.associated_group())); 447 &window_manager_internal_client_, tree_ptr_.associated_group()));
448 } 448 }
449 } 449 }
450 450
451 void WindowTreeClient::WindowTreeConnectionEstablished( 451 void WindowTreeClient::WindowTreeConnectionEstablished(
452 ui::mojom::WindowTree* window_tree) { 452 ui::mojom::WindowTree* window_tree) {
453 tree_ = window_tree; 453 tree_ = window_tree;
454 454
455 drag_drop_controller_ = base::MakeUnique<DragDropControllerMus>(this, tree_); 455 drag_drop_controller_ = base::MakeUnique<DragDropControllerMus>(this, tree_);
456 capture_synchronizer_ = 456 capture_synchronizer_ = base::MakeUnique<CaptureSynchronizer>(this, tree_);
457 base::MakeUnique<CaptureSynchronizer>(this, tree_, GetCaptureClient());
458 focus_synchronizer_ = base::MakeUnique<FocusSynchronizer>(this, tree_); 457 focus_synchronizer_ = base::MakeUnique<FocusSynchronizer>(this, tree_);
459 } 458 }
460 459
461 void WindowTreeClient::OnConnectionLost() { 460 void WindowTreeClient::OnConnectionLost() {
462 delegate_->OnLostConnection(this); 461 delegate_->OnLostConnection(this);
463 } 462 }
464 463
465 bool WindowTreeClient::HandleInternalPropertyChanged(WindowMus* window, 464 bool WindowTreeClient::HandleInternalPropertyChanged(WindowMus* window,
466 const void* key) { 465 const void* key) {
467 if (key != client::kModalKey) 466 if (key != client::kModalKey)
(...skipping 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1632 transport_properties); 1631 transport_properties);
1633 return window_port; 1632 return window_port;
1634 } 1633 }
1635 1634
1636 void WindowTreeClient::OnWindowTreeHostCreated( 1635 void WindowTreeClient::OnWindowTreeHostCreated(
1637 WindowTreeHostMus* window_tree_host) { 1636 WindowTreeHostMus* window_tree_host) {
1638 // All WindowTreeHosts are destroyed before this, so we don't need to unset 1637 // All WindowTreeHosts are destroyed before this, so we don't need to unset
1639 // the DragDropClient. 1638 // the DragDropClient.
1640 client::SetDragDropClient(window_tree_host->window(), 1639 client::SetDragDropClient(window_tree_host->window(),
1641 drag_drop_controller_.get()); 1640 drag_drop_controller_.get());
1641 window_tree_host->window()->AddObserver(capture_synchronizer_.get());
1642 } 1642 }
1643 1643
1644 void WindowTreeClient::OnTransientChildWindowAdded(Window* parent, 1644 void WindowTreeClient::OnTransientChildWindowAdded(Window* parent,
1645 Window* transient_child) { 1645 Window* transient_child) {
1646 // TransientWindowClient is a singleton and we allow multiple 1646 // TransientWindowClient is a singleton and we allow multiple
1647 // WindowTreeClients. Ignore changes to windows we don't know about (assume 1647 // WindowTreeClients. Ignore changes to windows we don't know about (assume
1648 // they came from another connection). 1648 // they came from another connection).
1649 if (!IsWindowKnown(parent) || !IsWindowKnown(transient_child)) 1649 if (!IsWindowKnown(parent) || !IsWindowKnown(transient_child))
1650 return; 1650 return;
1651 1651
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1717 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( 1717 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>(
1718 this, capture_synchronizer_.get(), window)); 1718 this, capture_synchronizer_.get(), window));
1719 } 1719 }
1720 1720
1721 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { 1721 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) {
1722 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( 1722 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>(
1723 this, focus_synchronizer_.get(), window)); 1723 this, focus_synchronizer_.get(), window));
1724 } 1724 }
1725 1725
1726 } // namespace aura 1726 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698