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

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

Issue 2696233002: Mojo C++ bindings: remove some usage of AssociatedGroup from user code. (Closed)
Patch Set: . Created 3 years, 10 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/ws/window_tree_client_unittest.cc ('k') | no next file » | 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 #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
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
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
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
OLDNEW
« no previous file with comments | « services/ui/ws/window_tree_client_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698