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

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

Issue 2521823002: Wires up PointerWatcherEventRouter for views aura-mus (Closed)
Patch Set: cleanup Created 4 years 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 DCHECK(window_manager_delegate_); 204 DCHECK(window_manager_delegate_);
205 205
206 ui::mojom::WindowManagerWindowTreeFactoryPtr factory; 206 ui::mojom::WindowManagerWindowTreeFactoryPtr factory;
207 connector->ConnectToInterface(ui::mojom::kServiceName, &factory); 207 connector->ConnectToInterface(ui::mojom::kServiceName, &factory);
208 ui::mojom::WindowTreePtr window_tree; 208 ui::mojom::WindowTreePtr window_tree;
209 factory->CreateWindowTree(GetProxy(&window_tree), 209 factory->CreateWindowTree(GetProxy(&window_tree),
210 binding_.CreateInterfacePtrAndBind()); 210 binding_.CreateInterfacePtrAndBind());
211 SetWindowTree(std::move(window_tree)); 211 SetWindowTree(std::move(window_tree));
212 } 212 }
213 213
214 client::CaptureClient* WindowTreeClient::GetCaptureClient() {
215 return delegate_->GetCaptureClient();
216 }
217
214 void WindowTreeClient::SetClientArea( 218 void WindowTreeClient::SetClientArea(
215 Window* window, 219 Window* window,
216 const gfx::Insets& client_area, 220 const gfx::Insets& client_area,
217 const std::vector<gfx::Rect>& additional_client_areas) { 221 const std::vector<gfx::Rect>& additional_client_areas) {
218 DCHECK(tree_); 222 DCHECK(tree_);
219 float device_scale_factor = ScaleFactorForDisplay(window); 223 float device_scale_factor = ScaleFactorForDisplay(window);
220 std::vector<gfx::Rect> additional_client_areas_in_pixel; 224 std::vector<gfx::Rect> additional_client_areas_in_pixel;
221 for (const gfx::Rect& area : additional_client_areas) { 225 for (const gfx::Rect& area : additional_client_areas) {
222 additional_client_areas_in_pixel.push_back( 226 additional_client_areas_in_pixel.push_back(
223 gfx::ConvertRectToPixel(device_scale_factor, area)); 227 gfx::ConvertRectToPixel(device_scale_factor, area));
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 tree_ptr_->GetWindowManagerClient(GetProxy(&window_manager_internal_client_, 428 tree_ptr_->GetWindowManagerClient(GetProxy(&window_manager_internal_client_,
425 tree_ptr_.associated_group())); 429 tree_ptr_.associated_group()));
426 } 430 }
427 } 431 }
428 432
429 void WindowTreeClient::WindowTreeConnectionEstablished( 433 void WindowTreeClient::WindowTreeConnectionEstablished(
430 ui::mojom::WindowTree* window_tree) { 434 ui::mojom::WindowTree* window_tree) {
431 tree_ = window_tree; 435 tree_ = window_tree;
432 436
433 drag_drop_controller_ = base::MakeUnique<DragDropControllerMus>(this, tree_); 437 drag_drop_controller_ = base::MakeUnique<DragDropControllerMus>(this, tree_);
434 capture_synchronizer_ = base::MakeUnique<CaptureSynchronizer>( 438 capture_synchronizer_ =
435 this, tree_, delegate_->GetCaptureClient()); 439 base::MakeUnique<CaptureSynchronizer>(this, tree_, GetCaptureClient());
436 focus_synchronizer_ = base::MakeUnique<FocusSynchronizer>(this, tree_); 440 focus_synchronizer_ = base::MakeUnique<FocusSynchronizer>(this, tree_);
437 } 441 }
438 442
439 void WindowTreeClient::OnConnectionLost() { 443 void WindowTreeClient::OnConnectionLost() {
440 delegate_->OnLostConnection(this); 444 delegate_->OnLostConnection(this);
441 } 445 }
442 446
443 bool WindowTreeClient::HandleInternalPropertyChanged(WindowMus* window, 447 bool WindowTreeClient::HandleInternalPropertyChanged(WindowMus* window,
444 const void* key) { 448 const void* key) {
445 if (key != client::kModalKey) 449 if (key != client::kModalKey)
(...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1559 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( 1563 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>(
1560 this, capture_synchronizer_.get(), window)); 1564 this, capture_synchronizer_.get(), window));
1561 } 1565 }
1562 1566
1563 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { 1567 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) {
1564 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( 1568 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>(
1565 this, focus_synchronizer_.get(), window)); 1569 this, focus_synchronizer_.get(), window));
1566 } 1570 }
1567 1571
1568 } // namespace aura 1572 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/mus/window_tree_client.h ('k') | ui/views/mus/BUILD.gn » ('j') | ui/views/mus/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698