Chromium Code Reviews| 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 227 DCHECK(window_manager_delegate_); | 227 DCHECK(window_manager_delegate_); |
| 228 | 228 |
| 229 ui::mojom::WindowManagerWindowTreeFactoryPtr factory; | 229 ui::mojom::WindowManagerWindowTreeFactoryPtr factory; |
| 230 connector_->BindInterface(ui::mojom::kServiceName, &factory); | 230 connector_->BindInterface(ui::mojom::kServiceName, &factory); |
| 231 ui::mojom::WindowTreePtr window_tree; | 231 ui::mojom::WindowTreePtr window_tree; |
| 232 factory->CreateWindowTree(MakeRequest(&window_tree), | 232 factory->CreateWindowTree(MakeRequest(&window_tree), |
| 233 binding_.CreateInterfacePtrAndBind()); | 233 binding_.CreateInterfacePtrAndBind()); |
| 234 SetWindowTree(std::move(window_tree)); | 234 SetWindowTree(std::move(window_tree)); |
| 235 } | 235 } |
| 236 | 236 |
| 237 client::CaptureClient* WindowTreeClient::GetCaptureClient() { | |
| 238 return delegate_->GetCaptureClient(); | |
| 239 } | |
| 240 | |
| 241 void WindowTreeClient::SetCanFocus(Window* window, bool can_focus) { | 237 void WindowTreeClient::SetCanFocus(Window* window, bool can_focus) { |
| 242 DCHECK(tree_); | 238 DCHECK(tree_); |
| 243 DCHECK(window); | 239 DCHECK(window); |
| 244 tree_->SetCanFocus(WindowMus::Get(window)->server_id(), can_focus); | 240 tree_->SetCanFocus(WindowMus::Get(window)->server_id(), can_focus); |
| 245 } | 241 } |
| 246 | 242 |
| 247 void WindowTreeClient::SetPredefinedCursor(WindowMus* window, | 243 void WindowTreeClient::SetPredefinedCursor(WindowMus* window, |
| 248 ui::mojom::Cursor old_cursor, | 244 ui::mojom::Cursor old_cursor, |
| 249 ui::mojom::Cursor new_cursor) { | 245 ui::mojom::Cursor new_cursor) { |
| 250 DCHECK(tree_); | 246 DCHECK(tree_); |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 461 &window_manager_internal_client_, tree_ptr_.associated_group())); | 457 &window_manager_internal_client_, tree_ptr_.associated_group())); |
| 462 } | 458 } |
| 463 } | 459 } |
| 464 | 460 |
| 465 void WindowTreeClient::WindowTreeConnectionEstablished( | 461 void WindowTreeClient::WindowTreeConnectionEstablished( |
| 466 ui::mojom::WindowTree* window_tree) { | 462 ui::mojom::WindowTree* window_tree) { |
| 467 tree_ = window_tree; | 463 tree_ = window_tree; |
| 468 | 464 |
| 469 drag_drop_controller_ = base::MakeUnique<DragDropControllerMus>(this, tree_); | 465 drag_drop_controller_ = base::MakeUnique<DragDropControllerMus>(this, tree_); |
| 470 capture_synchronizer_ = | 466 capture_synchronizer_ = |
| 471 base::MakeUnique<CaptureSynchronizer>(this, tree_, GetCaptureClient()); | 467 base::MakeUnique<CaptureSynchronizer>(this, tree_, GetCaptureClient()); |
|
sky
2017/01/27 20:14:35
Isn't GetCaptureClient() used here?
riajiang
2017/01/27 20:23:21
Yes this CL is dependent on https://codereview.chr
| |
| 472 focus_synchronizer_ = base::MakeUnique<FocusSynchronizer>(this, tree_); | 468 focus_synchronizer_ = base::MakeUnique<FocusSynchronizer>(this, tree_); |
| 473 } | 469 } |
| 474 | 470 |
| 475 void WindowTreeClient::OnConnectionLost() { | 471 void WindowTreeClient::OnConnectionLost() { |
| 476 delegate_->OnLostConnection(this); | 472 delegate_->OnLostConnection(this); |
| 477 } | 473 } |
| 478 | 474 |
| 479 bool WindowTreeClient::HandleInternalPropertyChanged(WindowMus* window, | 475 bool WindowTreeClient::HandleInternalPropertyChanged(WindowMus* window, |
| 480 const void* key) { | 476 const void* key) { |
| 481 if (key != client::kModalKey) | 477 if (key != client::kModalKey) |
| (...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1817 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( | 1813 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( |
| 1818 this, capture_synchronizer_.get(), window)); | 1814 this, capture_synchronizer_.get(), window)); |
| 1819 } | 1815 } |
| 1820 | 1816 |
| 1821 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { | 1817 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { |
| 1822 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( | 1818 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( |
| 1823 this, focus_synchronizer_.get(), window)); | 1819 this, focus_synchronizer_.get(), window)); |
| 1824 } | 1820 } |
| 1825 | 1821 |
| 1826 } // namespace aura | 1822 } // namespace aura |
| OLD | NEW |