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 #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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 tree_ptr_ = std::move(window_tree_ptr); | 461 tree_ptr_ = std::move(window_tree_ptr); |
462 WindowTreeConnectionEstablished(tree_ptr_.get()); | 462 WindowTreeConnectionEstablished(tree_ptr_.get()); |
463 tree_ptr_->GetCursorLocationMemory( | 463 tree_ptr_->GetCursorLocationMemory( |
464 base::Bind(&WindowTreeClient::OnReceivedCursorLocationMemory, | 464 base::Bind(&WindowTreeClient::OnReceivedCursorLocationMemory, |
465 weak_factory_.GetWeakPtr())); | 465 weak_factory_.GetWeakPtr())); |
466 | 466 |
467 tree_ptr_.set_connection_error_handler(base::Bind( | 467 tree_ptr_.set_connection_error_handler(base::Bind( |
468 &WindowTreeClient::OnConnectionLost, weak_factory_.GetWeakPtr())); | 468 &WindowTreeClient::OnConnectionLost, weak_factory_.GetWeakPtr())); |
469 | 469 |
470 if (window_manager_delegate_) { | 470 if (window_manager_delegate_) { |
471 tree_ptr_->GetWindowManagerClient(MakeRequest( | 471 tree_ptr_->GetWindowManagerClient( |
472 &window_manager_internal_client_, tree_ptr_.associated_group())); | 472 MakeRequest(&window_manager_internal_client_)); |
473 } | 473 } |
474 } | 474 } |
475 | 475 |
476 void WindowTreeClient::WindowTreeConnectionEstablished( | 476 void WindowTreeClient::WindowTreeConnectionEstablished( |
477 ui::mojom::WindowTree* window_tree) { | 477 ui::mojom::WindowTree* window_tree) { |
478 tree_ = window_tree; | 478 tree_ = window_tree; |
479 | 479 |
480 drag_drop_controller_ = base::MakeUnique<DragDropControllerMus>(this, tree_); | 480 drag_drop_controller_ = base::MakeUnique<DragDropControllerMus>(this, tree_); |
481 capture_synchronizer_ = base::MakeUnique<CaptureSynchronizer>(this, tree_); | 481 capture_synchronizer_ = base::MakeUnique<CaptureSynchronizer>(this, tree_); |
482 focus_synchronizer_ = base::MakeUnique<FocusSynchronizer>(this, tree_); | 482 focus_synchronizer_ = base::MakeUnique<FocusSynchronizer>(this, tree_); |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
850 ui::mojom::WindowTreePtr tree, | 850 ui::mojom::WindowTreePtr tree, |
851 int64_t display_id, | 851 int64_t display_id, |
852 Id focused_window_id, | 852 Id focused_window_id, |
853 bool drawn) { | 853 bool drawn) { |
854 DCHECK(!tree_ptr_); | 854 DCHECK(!tree_ptr_); |
855 tree_ptr_ = std::move(tree); | 855 tree_ptr_ = std::move(tree); |
856 | 856 |
857 is_from_embed_ = true; | 857 is_from_embed_ = true; |
858 | 858 |
859 if (window_manager_delegate_) { | 859 if (window_manager_delegate_) { |
860 tree_ptr_->GetWindowManagerClient(MakeRequest( | 860 tree_ptr_->GetWindowManagerClient( |
861 &window_manager_internal_client_, tree_ptr_.associated_group())); | 861 MakeRequest(&window_manager_internal_client_)); |
862 } | 862 } |
863 | 863 |
864 OnEmbedImpl(tree_ptr_.get(), client_id, std::move(root_data), display_id, | 864 OnEmbedImpl(tree_ptr_.get(), client_id, std::move(root_data), display_id, |
865 focused_window_id, drawn); | 865 focused_window_id, drawn); |
866 } | 866 } |
867 | 867 |
868 void WindowTreeClient::OnEmbeddedAppDisconnected(Id window_id) { | 868 void WindowTreeClient::OnEmbeddedAppDisconnected(Id window_id) { |
869 WindowMus* window = GetWindowByServerId(window_id); | 869 WindowMus* window = GetWindowByServerId(window_id); |
870 if (window) | 870 if (window) |
871 window->NotifyEmbeddedAppDisconnected(); | 871 window->NotifyEmbeddedAppDisconnected(); |
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1840 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( | 1840 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( |
1841 this, capture_synchronizer_.get(), window)); | 1841 this, capture_synchronizer_.get(), window)); |
1842 } | 1842 } |
1843 | 1843 |
1844 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { | 1844 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { |
1845 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( | 1845 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( |
1846 this, focus_synchronizer_.get(), window)); | 1846 this, focus_synchronizer_.get(), window)); |
1847 } | 1847 } |
1848 | 1848 |
1849 } // namespace aura | 1849 } // namespace aura |
OLD | NEW |